src/cpu/x86/vm/templateInterpreter_x86_64.cpp

changeset 2318
0fc262af204f
parent 2314
f95d63e2154a
child 2438
dd031b2226de
equal deleted inserted replaced
2314:f95d63e2154a 2318:0fc262af204f
1067 // call_VM_leaf either as it will check to see if r13 & r14 are 1067 // call_VM_leaf either as it will check to see if r13 & r14 are
1068 // preserved and correspond to the bcp/locals pointers. So we do a 1068 // preserved and correspond to the bcp/locals pointers. So we do a
1069 // runtime call by hand. 1069 // runtime call by hand.
1070 // 1070 //
1071 __ mov(c_rarg0, r15_thread); 1071 __ mov(c_rarg0, r15_thread);
1072 __ mov(r12, rsp); // remember sp 1072 __ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
1073 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows 1073 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
1074 __ andptr(rsp, -16); // align stack as required by ABI 1074 __ andptr(rsp, -16); // align stack as required by ABI
1075 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans))); 1075 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)));
1076 __ mov(rsp, r12); // restore sp 1076 __ mov(rsp, r12); // restore sp
1077 __ reinit_heapbase(); 1077 __ reinit_heapbase();
1114 __ cmpl(Address(r15_thread, JavaThread::stack_guard_state_offset()), 1114 __ cmpl(Address(r15_thread, JavaThread::stack_guard_state_offset()),
1115 JavaThread::stack_guard_yellow_disabled); 1115 JavaThread::stack_guard_yellow_disabled);
1116 __ jcc(Assembler::notEqual, no_reguard); 1116 __ jcc(Assembler::notEqual, no_reguard);
1117 1117
1118 __ pusha(); // XXX only save smashed registers 1118 __ pusha(); // XXX only save smashed registers
1119 __ mov(r12, rsp); // remember sp 1119 __ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
1120 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows 1120 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
1121 __ andptr(rsp, -16); // align stack as required by ABI 1121 __ andptr(rsp, -16); // align stack as required by ABI
1122 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages))); 1122 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)));
1123 __ mov(rsp, r12); // restore sp 1123 __ mov(rsp, r12); // restore sp
1124 __ popa(); // XXX only restore smashed registers 1124 __ popa(); // XXX only restore smashed registers
1905 // The run-time runtime saves the right registers, depending on 1905 // The run-time runtime saves the right registers, depending on
1906 // the tosca in-state for the given template. 1906 // the tosca in-state for the given template.
1907 1907
1908 assert(Interpreter::trace_code(t->tos_in()) != NULL, 1908 assert(Interpreter::trace_code(t->tos_in()) != NULL,
1909 "entry must have been generated"); 1909 "entry must have been generated");
1910 __ mov(r12, rsp); // remember sp 1910 __ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
1911 __ andptr(rsp, -16); // align stack as required by ABI 1911 __ andptr(rsp, -16); // align stack as required by ABI
1912 __ call(RuntimeAddress(Interpreter::trace_code(t->tos_in()))); 1912 __ call(RuntimeAddress(Interpreter::trace_code(t->tos_in())));
1913 __ mov(rsp, r12); // restore sp 1913 __ mov(rsp, r12); // restore sp
1914 __ reinit_heapbase(); 1914 __ reinit_heapbase();
1915 } 1915 }

mercurial