8064611: AARCH64: Changes to HotSpot shared code

Everything except cpu/ and os_cpu/

Reviewed-by: dholmes, goetz, dlong, coleenp, kvn
This commit is contained in:
Andrew Haley 2014-12-11 13:11:53 -08:00
parent ee49c27e76
commit 0b30e012ee
75 changed files with 420 additions and 23 deletions

View file

@ -722,6 +722,8 @@ JRT_ENTRY(void, Runtime1::deoptimize(JavaThread* thread, jint trap_request))
JRT_END
#ifndef DEOPTIMIZE_WHEN_PATCHING
static Klass* resolve_field_return_klass(methodHandle caller, int bci, TRAPS) {
Bytecode_field field_access(caller, bci);
// This can be static or non-static field access
@ -1210,6 +1212,33 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_i
}
JRT_END
#else // DEOPTIMIZE_WHEN_PATCHING
JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_id ))
RegisterMap reg_map(thread, false);
NOT_PRODUCT(_patch_code_slowcase_cnt++;)
if (TracePatching) {
tty->print_cr("Deoptimizing because patch is needed");
}
frame runtime_frame = thread->last_frame();
frame caller_frame = runtime_frame.sender(&reg_map);
// It's possible the nmethod was invalidated in the last
// safepoint, but if it's still alive then make it not_entrant.
nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
if (nm != NULL) {
nm->make_not_entrant();
}
Deoptimization::deoptimize_frame(thread, caller_frame.id());
// Return to the now deoptimized frame.
JRT_END
#endif // DEOPTIMIZE_WHEN_PATCHING
//
// Entry point for compiled code. We want to patch a nmethod.
// We don't do a normal VM transition here because we want to