* Merged in new trap code (twisti-branch).
[cacao.git] / src / vm / jit / m68k / codegen.c
index 478b6f3cf578a07a739152f77a9a0669ab3b40a1..41bd7c7f7f83e459c527546e81fe368a01bbdf8b 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdint.h>
 
 #include "md-abi.h"
-#include "md-os.h"
 
 #include "vm/types.h"
 #include "vm/jit/m68k/codegen.h"
@@ -60,6 +59,7 @@
 #include "vm/jit/reg.h"
 #include "vm/jit/replace.h"
 #include "vm/jit/stacktrace.h"
+#include "vm/jit/trap.h"
 
 #include "vmcore/loader.h"
 #include "vmcore/options.h"
@@ -258,7 +258,7 @@ bool codegen_emit(jitdata *jd)
                        M_ALD(REG_ATMP1, REG_SP, cd->stackframesize + 4);
                        M_ATST(REG_ATMP1);
                        M_BNE(2);
-                       M_TRAP(M68K_EXCEPTION_HARDWARE_NULLPOINTER);
+                       M_TRAP(TRAP_NullPointerException);
                }
 
                M_AST(REG_ATMP1, REG_SP, rd->memuse * 8);