#include <assert.h>
#include <stdint.h>
+#include "vm/jit/s390/codegen.h"
+#include "vm/jit/s390/emit.h"
+#include "vm/jit/s390/md-abi.h"
+
#include "mm/memory.h"
#include "threads/lock-common.h"
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "vm/global.h"
+#include "vm/types.h"
+
#include "vm/jit/abi.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/asmpart.h"
#include "vm/jit/patcher-common.h"
#include "vm/jit/replace.h"
#include "vm/jit/trace.h"
-#include "vm/jit/s390/codegen.h"
-#include "vm/jit/s390/emit.h"
-#include "vm/jit/s390/md-abi.h"
-#include "vm/types.h"
+#include "vm/jit/trap.h"
+
#include "vmcore/options.h"
+
/* emit_load *******************************************************************
Emits a possible load of an operand.
mcode = *((u2 *) cd->mcodeptr);
- M_ILL(EXCEPTION_HARDWARE_PATCHER);
+ M_ILL(TRAP_PATCHER);
return mcode;
}
}
}
-void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg) {
+void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
+{
if (INSTRUCTION_MUST_CHECK(iptr)) {
M_TEST(reg);
M_BNE(SZ_BRC + SZ_ILL);
- M_ILL(EXCEPTION_HARDWARE_ARITHMETIC);
+ M_ILL(TRAP_ArithmeticException);
}
}
*/
N_CL(s2, OFFSET(java_array_t, size), RN, s1);
M_BLT(SZ_BRC + SZ_ILL);
- M_ILL2(s2, EXCEPTION_HARDWARE_ARRAYINDEXOUTOFBOUNDS);
+ M_ILL2(s2, TRAP_ArrayIndexOutOfBoundsException);
}
}
if (INSTRUCTION_MUST_CHECK(iptr)) {
M_TEST(REG_RESULT);
M_BNE(SZ_BRC + SZ_ILL);
- M_ILL(EXCEPTION_HARDWARE_ARRAYSTORE);
+ M_ILL(TRAP_ArrayStoreException);
}
}
default:
vm_abort("emit_classcast_check: unknown condition %d", condition);
}
- M_ILL2(s1, EXCEPTION_HARDWARE_CLASSCAST);
+ M_ILL2(s1, TRAP_ClassCastException);
}
}
-void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg) {
+void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)
+{
if (INSTRUCTION_MUST_CHECK(iptr)) {
M_TEST(reg);
M_BNE(SZ_BRC + SZ_ILL);
- M_ILL(EXCEPTION_HARDWARE_NULLPOINTER);
+ M_ILL(TRAP_NullPointerException);
}
}
-void emit_exception_check(codegendata *cd, instruction *iptr) {
+void emit_exception_check(codegendata *cd, instruction *iptr)
+{
if (INSTRUCTION_MUST_CHECK(iptr)) {
M_TEST(REG_RESULT);
M_BNE(SZ_BRC + SZ_ILL);
- M_ILL(EXCEPTION_HARDWARE_EXCEPTION);
+ M_ILL(TRAP_CHECK_EXCEPTION);
}
}
void emit_trap_compiler(codegendata *cd)
{
- M_ILL2(REG_METHODPTR, EXCEPTION_HARDWARE_COMPILER);
+ M_ILL2(REG_METHODPTR, TRAP_COMPILER);
}
/*