2007-10-19 Marek Habersack <mhabersack@novell.com>
[mono.git] / mono / mini / mini-codegen.c
index 93938bebd868c658b44cc1ea7db30bdc6e562e30..d4b1acb282129d0a6736c2cf160d801cb555cab7 100644 (file)
@@ -6,7 +6,9 @@
 
 #include <string.h>
 #include <math.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
@@ -766,7 +768,10 @@ assign_reg (MonoCompile *cfg, MonoRegState *rs, int reg, int hreg, gboolean fp)
        else {
                g_assert (reg >= MONO_MAX_IREGS);
                g_assert (hreg < MONO_MAX_IREGS);
+#ifndef __arm__
+               /* this seems to trigger a gcc compilation bug sometime (hreg is 0) */
                g_assert (! is_global_ireg (hreg));
+#endif
 
                rs->vassign [reg] = hreg;
                rs->isymbolic [hreg] = reg;
@@ -1855,7 +1860,7 @@ mono_opcode_to_type (int opcode, int cmp_opcode)
                return CMP_TYPE_L;
        else if ((opcode >= OP_CEQ) && (opcode <= OP_CLT_UN))
                return CMP_TYPE_L;
-       else if ((opcode >= OP_IBEQ) && (opcode <= OP_IBLE_UN))
+       else if ((opcode >= OP_IBEQ) && (opcode <= OP_IBLT_UN))
                return CMP_TYPE_I;
        else if ((opcode >= OP_ICEQ) && (opcode <= OP_ICLT_UN))
                return CMP_TYPE_I;
@@ -1863,7 +1868,7 @@ mono_opcode_to_type (int opcode, int cmp_opcode)
                return CMP_TYPE_L;
        else if ((opcode >= OP_LCEQ) && (opcode <= OP_LCLT_UN))
                return CMP_TYPE_L;
-       else if ((opcode >= OP_FBEQ) && (opcode <= OP_FBLE_UN))
+       else if ((opcode >= OP_FBEQ) && (opcode <= OP_FBLT_UN))
                return CMP_TYPE_F;
        else if ((opcode >= OP_FCEQ) && (opcode <= OP_FCLT_UN))
                return CMP_TYPE_F;