Proper i386 mnemonics
[cacao.git] / src / vm / jit / i386 / emit.c
index 74e7f493f4868c06c0bf437314c13f48d0dfca88..0abf598a8e9b17265d4075453fbc5b457df063e3 100644 (file)
@@ -460,9 +460,15 @@ void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 r
                case BRANCH_LE:
                        M_BGT(6);
                        break;
+               case BRANCH_GE:
+                       M_BLT(6);
+                       break;
                case BRANCH_EQ:
                        M_BNE(6);
                        break;
+               case BRANCH_NE:
+                       M_BEQ(6);
+                       break;
                case BRANCH_ULE:
                        M_BBE(6);
                        break;
@@ -1072,6 +1078,11 @@ void emit_alu_imm_memabs(codegendata *cd, s4 opc, s4 imm, s4 disp)
        }
 }
 
+void emit_alu_memindex_reg(codegendata *cd, s4 opc, s4 disp, s4 basereg, s4 indexreg, s4 scale, s4 reg)
+{
+       *(cd->mcodeptr++) = (((u1) (opc)) << 3) + 3;
+       emit_memindex(cd, (reg),(disp),(basereg),(indexreg),(scale));
+}
 
 void emit_test_reg_reg(codegendata *cd, s4 reg, s4 dreg)
 {
@@ -1092,6 +1103,12 @@ void emit_test_imm_reg(codegendata *cd, s4 imm, s4 reg)
 /*
  * inc, dec operations
  */
+void emit_inc_reg(codegendata *cd, s4 reg)
+{
+       *(cd->mcodeptr++) = 0xff;
+       emit_reg(0,(reg));
+}
+
 void emit_dec_mem(codegendata *cd, s4 mem)
 {
        *(cd->mcodeptr++) = 0xff;