#include <stdint.h>
#include "md-abi.h"
-#include "md-os.h"
#include "vm/types.h"
#include "vm/jit/m68k/codegen.h"
#include "vm/jit/m68k/emit.h"
#include "mm/memory.h"
-#include "native/jni.h"
+
#include "native/localref.h"
#include "native/native.h"
#include "threads/lock-common.h"
-#include "vm/builtin.h"
-#include "vm/exceptions.h"
+#include "vm/jit/builtin.hpp"
+#include "vm/exceptions.hpp"
#include "vm/global.h"
-#include "vm/stringlocal.h"
-#include "vm/vm.h"
+#include "vm/loader.hpp"
+#include "vm/options.h"
+#include "vm/utf8.h"
+#include "vm/vm.hpp"
#include "vm/jit/asmpart.h"
-#include "vm/jit/codegen-common.h"
-#include "vm/jit/patcher-common.h"
+#include "vm/jit/codegen-common.hpp"
+#include "vm/jit/patcher-common.hpp"
#include "vm/jit/dseg.h"
#include "vm/jit/linenumbertable.h"
-#include "vm/jit/emit-common.h"
-#include "vm/jit/jit.h"
+#include "vm/jit/emit-common.hpp"
+#include "vm/jit/jit.hpp"
#include "vm/jit/abi.h"
#include "vm/jit/parse.h"
#include "vm/jit/reg.h"
-#include "vm/jit/replace.h"
-#include "vm/jit/stacktrace.h"
-
-#include "vmcore/loader.h"
-#include "vmcore/options.h"
-#include "vmcore/utf8.h"
+#include "vm/jit/replace.hpp"
+#include "vm/jit/stacktrace.hpp"
+#include "vm/jit/trap.h"
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);
superindex = super->index;
}
- if ((super == NULL) || !(super->flags & ACC_INTERFACE))
- CODEGEN_CRITICAL_SECTION_NEW;
-
s1 = emit_load_s1(jd, iptr, REG_ATMP1);
d = codegen_reg_of_dst(jd, iptr, REG_ITMP2);
M_ALD(REG_ATMP1, s1, OFFSET(java_object_t, vftbl));
- CODEGEN_CRITICAL_SECTION_START;
-
M_ILD(REG_ITMP1, REG_ATMP1, OFFSET(vftbl_t, baseval));
M_ILD(REG_ITMP3, REG_ATMP2, OFFSET(vftbl_t, baseval));
M_ILD(REG_ITMP2, REG_ATMP2, OFFSET(vftbl_t, diffval));
- CODEGEN_CRITICAL_SECTION_END;
-
M_ISUB(REG_ITMP3, REG_ITMP1);
M_ICMP(REG_ITMP2, REG_ITMP1);
M_BHI(4);
superindex = super->index;
}
- if ((super == NULL) || !(super->flags & ACC_INTERFACE))
- CODEGEN_CRITICAL_SECTION_NEW;
-
s1 = emit_load_s1(jd, iptr, REG_ATMP1);
assert(VAROP(iptr->s1)->type == TYPE_ADR);
M_ALD(REG_ATMP2, s1, OFFSET(java_object_t, vftbl));
- CODEGEN_CRITICAL_SECTION_START;
-
M_ILD(REG_ITMP3, REG_ATMP2, OFFSET(vftbl_t, baseval)); /* REG_ITMP3 == sub->vftbl->baseval */
M_ILD(REG_ITMP1, REG_ATMP3, OFFSET(vftbl_t, baseval));
M_ILD(REG_ITMP2, REG_ATMP3, OFFSET(vftbl_t, diffval));
- CODEGEN_CRITICAL_SECTION_END;
-
M_ISUB(REG_ITMP1, REG_ITMP3);
M_ICMP(REG_ITMP2, REG_ITMP3); /* XXX was CMPU */
M_AST(REG_ATMP3, REG_SP, 1 * 4);
/* env ist first argument */
- M_AMOV_IMM(_Jv_env, REG_ATMP1);
+ M_AMOV_IMM(VM_get_jnienv(), REG_ATMP1);
M_AST(REG_ATMP1, REG_SP, 0 * 4);
}