* src/vm/jit/emit-common.h,
[cacao.git] / src / vm / jit / i386 / emit.c
index ae20ab6ebf72bd2f3a121e3236eca8c7e2981969..e2e762bd0f1ca464b64df1486e1dfe179fc0c8be 100644 (file)
@@ -517,6 +517,20 @@ void emit_trap_compiler(codegendata *cd)
        M_ALD_MEM(REG_METHODPTR, TRAP_COMPILER);
 }
 
+/* emit_trap_countdown *********************************************************
+
+   Emit a countdown trap.
+
+   counter....absolute address of the counter variable
+
+*******************************************************************************/
+
+void emit_trap_countdown(codegendata *cd, s4 *counter)
+{
+       M_ISUB_IMM_MEMABS(1, (s4) counter);
+       M_BNS(6);
+       M_ALD_MEM(REG_METHODPTR, TRAP_COUNTDOWN);
+}
 
 /* emit_trap *******************************************************************