src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/x86/vm/stubGenerator_x86_32.cpp Thu Jun 16 10:41:40 2011
--- new/src/cpu/x86/vm/stubGenerator_x86_32.cpp Thu Jun 16 10:41:40 2011
*** 2149,2158 ****
--- 2149,2160 ----
// Note that we only have to preserve callee-saved registers since
// the compilers are responsible for supplying a continuation point
// if they expect all registers to be preserved.
enum layout {
thread_off, // last_java_sp
+ arg1_off,
+ arg2_off,
rbp_off, // callee saved register
ret_pc,
framesize
};
*** 2183,2193 ****
--- 2185,2195 ----
// continuation_for_implicit_division_by_zero_exception. All other implicit
// exceptions (e.g., NullPointerException or AbstractMethodError on entry) are
// either at call sites or otherwise assume that stack unwinding will be initiated,
// so caller saved registers were assumed volatile in the compiler.
address generate_throw_exception(const char* name, address runtime_entry,
! bool restore_saved_exception_pc, Register arg1 = noreg, Register arg2 = noreg) {
int insts_size = 256;
int locs_size = 32;
CodeBuffer code(name, insts_size, locs_size);
*** 2216,2225 ****
--- 2218,2234 ----
int frame_complete = __ pc() - start;
// push java thread (becomes first argument of C function)
__ movptr(Address(rsp, thread_off * wordSize), java_thread);
+ if (arg1 != noreg) {
+ __ movptr(Address(rsp, arg1_off * wordSize), arg1);
+ }
+ if (arg2 != noreg) {
+ assert(arg1 != noreg, "missing reg arg");
+ __ movptr(Address(rsp, arg2_off * wordSize), arg2);
+ }
// Set up last_Java_sp and last_Java_fp
__ set_last_Java_frame(java_thread, rsp, rbp, NULL);
// Call runtime
*** 2307,2316 ****
--- 2316,2331 ----
StubRoutines::x86::_verify_fpu_cntrl_wrd_entry = generate_verify_fpu_cntrl_wrd();
StubRoutines::_d2i_wrapper = generate_d2i_wrapper(T_INT,
CAST_FROM_FN_PTR(address, SharedRuntime::d2i));
StubRoutines::_d2l_wrapper = generate_d2i_wrapper(T_LONG,
CAST_FROM_FN_PTR(address, SharedRuntime::d2l));
+
+ // Build this early so it's available for the interpreter
+ StubRoutines::_throw_WrongMethodTypeException_entry =
+ generate_throw_exception("WrongMethodTypeException throw_exception",
+ CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException),
+ false, rax, rcx);
}
void generate_all() {
// Generates all stubs and initializes the entry points
src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File