Explorar el Código

2009-01-07 Zoltan Varga <[email protected]>

	* mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
	__GNUC_MINOR__ which can break when the major version changes.

svn path=/trunk/mono/; revision=122702
Zoltan Varga hace 17 años
padre
commit
9ab993c1d6
Se han modificado 2 ficheros con 10 adiciones y 1 borrados
  1. 5 0
      mono/mini/ChangeLog
  2. 5 1
      mono/mini/mini-arm.c

+ 5 - 0
mono/mini/ChangeLog

@@ -1,3 +1,8 @@
+2009-01-07  Zoltan Varga  <[email protected]>
+
+	* mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
+	__GNUC_MINOR__ which can break when the major version changes.
+
 2009-01-07  Rodrigo Kumpera  <[email protected]>
 
 	* basic-simd.cs: Add tests for usage of the sizeof opcode.

+ 5 - 1
mono/mini/mini-arm.c

@@ -576,12 +576,16 @@ mono_arch_regalloc_cost (MonoCompile *cfg, MonoMethodVar *vmv)
 	return 2;
 }
 
+#ifndef __GNUC_PREREQ
+#define __GNUC_PREREQ(maj, min) (0)
+#endif
+
 void
 mono_arch_flush_icache (guint8 *code, gint size)
 {
 #if __APPLE__
 	sys_icache_invalidate (code, size);
-#elif ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1))
+#elif __GNUC_PREREQ(4, 1)
 	__clear_cache (code, code + size);
 #else
 	__asm __volatile ("mov r0, %0\n"