src/cpu/x86/vm/interp_masm_x86.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/cpu/x86/vm/interp_masm_x86.cpp	Fri Aug  7 15:41:38 2015
--- new/src/cpu/x86/vm/interp_masm_x86.cpp	Fri Aug  7 15:41:38 2015

*** 353,364 **** --- 353,364 ---- case ltos: movptr(rax, val_addr); break; case btos: // fall through case ctos: // fall through case stos: // fall through case itos: movl(rax, val_addr); break; ! case ftos: movflt(xmm0, val_addr); break; ! case dtos: movdbl(xmm0, val_addr); break; ! case ftos: load_float(val_addr); break; ! case dtos: load_double(val_addr); break; case vtos: /* nothing to do */ break; default : ShouldNotReachHere(); } // Clean up tos value in the thread object movl(tos_addr, (int) ilgl);
*** 374,385 **** --- 374,385 ---- movl(rdx, val_addr1); // fall through case btos: // fall through case ctos: // fall through case stos: // fall through case itos: movl(rax, val_addr); break; ! case ftos: fld_s(val_addr); break; ! case dtos: fld_d(val_addr); break; ! case ftos: load_float(val_addr); break; ! case dtos: load_double(val_addr); break; case vtos: /* nothing to do */ break; default : ShouldNotReachHere(); } #endif // _LP64 // Clean up tos value in the thread object
*** 576,632 **** --- 576,632 ---- void InterpreterMacroAssembler::push_i(Register r) { push(r); } #ifdef _LP64 void InterpreterMacroAssembler::pop_i(Register r) { // XXX can't use pop currently, upper half non clean movl(r, Address(rsp, 0)); addptr(rsp, wordSize); } void InterpreterMacroAssembler::pop_l(Register r) { movq(r, Address(rsp, 0)); addptr(rsp, 2 * Interpreter::stackElementSize); + void InterpreterMacroAssembler::push_f(XMMRegister r) { + subptr(rsp, wordSize); + movflt(Address(rsp, 0), r); } void InterpreterMacroAssembler::pop_f(XMMRegister r) { movflt(r, Address(rsp, 0)); addptr(rsp, wordSize); } + void InterpreterMacroAssembler::push_d(XMMRegister r) { + subptr(rsp, 2 * wordSize); + movdbl(Address(rsp, 0), r); + } + void InterpreterMacroAssembler::pop_d(XMMRegister r) { movdbl(r, Address(rsp, 0)); addptr(rsp, 2 * Interpreter::stackElementSize); } void InterpreterMacroAssembler::push_l(Register r) { subptr(rsp, 2 * wordSize); movq(Address(rsp, 0), r); + #ifdef _LP64 + void InterpreterMacroAssembler::pop_i(Register r) { + // XXX can't use pop currently, upper half non clean + movl(r, Address(rsp, 0)); + addptr(rsp, wordSize); } ! void InterpreterMacroAssembler::push_f(XMMRegister r) { ! subptr(rsp, wordSize); ! movflt(Address(rsp, 0), r); ! void InterpreterMacroAssembler::pop_l(Register r) { ! movq(r, Address(rsp, 0)); ! addptr(rsp, 2 * Interpreter::stackElementSize); } ! void InterpreterMacroAssembler::push_d(XMMRegister r) { ! void InterpreterMacroAssembler::push_l(Register r) { subptr(rsp, 2 * wordSize); ! movdbl(Address(rsp, 0), r); ! movq(Address(rsp, 0), r); } void InterpreterMacroAssembler::pop(TosState state) { switch (state) { case atos: pop_ptr(); break; case btos: case ctos: case stos: case itos: pop_i(); break; case ltos: pop_l(); break; ! case ftos: pop_f(); break; ! case dtos: pop_d(); break; ! case ftos: pop_f(xmm0); break; ! case dtos: pop_d(xmm0); break; case vtos: /* nothing to do */ break; default: ShouldNotReachHere(); } verify_oop(rax, state); }
*** 638,649 **** --- 638,649 ---- case btos: case ctos: case stos: case itos: push_i(); break; case ltos: push_l(); break; ! case ftos: push_f(); break; ! case dtos: push_d(); break; ! case ftos: push_f(xmm0); break; ! case dtos: push_d(xmm0); break; case vtos: /* nothing to do */ break; default : ShouldNotReachHere(); } } #else
*** 673,684 **** --- 673,696 ---- case btos: // fall through case ctos: // fall through case stos: // fall through case itos: pop_i(rax); break; case ltos: pop_l(rax, rdx); break; - case ftos: pop_f(); break; case dtos: pop_d(); break; + if (UseSSE >= 1) { + pop_f(xmm0); + } else { + pop_f(); + } + break; + case dtos: + if (UseSSE >= 2) { + pop_d(xmm0); + } else { + pop_d(); + } + break; case vtos: /* nothing to do */ break; default : ShouldNotReachHere(); } verify_oop(rax, state); }
*** 693,703 **** --- 705,715 ---- // Do not schedule for no AGI! Never write beyond rsp! subptr(rsp, 1 * wordSize); fstp_s(Address(rsp, 0)); } - void InterpreterMacroAssembler::push_d(Register r) { // Do not schedule for no AGI! Never write beyond rsp! subptr(rsp, 2 * wordSize); fstp_d(Address(rsp, 0)); }
*** 709,720 **** --- 721,744 ---- case btos: // fall through case ctos: // fall through case stos: // fall through case itos: push_i(rax); break; case ltos: push_l(rax, rdx); break; - case ftos: push_f(); break; case dtos: push_d(rax); break; + if (UseSSE >= 1) { + push_f(xmm0); + } else { + push_f(); + } + break; + case dtos: + if (UseSSE >= 2) { + push_d(xmm0); + } else { + push_d(); + } + break; case vtos: /* nothing to do */ break; default : ShouldNotReachHere(); } } #endif // _LP64
*** 993,1018 **** --- 1017,1026 ---- movptr(rbx, Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize)); leave(); // remove frame anchor pop(ret_addr); // get return address mov(rsp, rbx); // set sp to sender sp #ifndef _LP64 if (UseSSE) { // float and double are returned in xmm register in SSE-mode if (state == ftos && UseSSE >= 1) { subptr(rsp, wordSize); fstp_s(Address(rsp, 0)); movflt(xmm0, Address(rsp, 0)); addptr(rsp, wordSize); } else if (state == dtos && UseSSE >= 2) { subptr(rsp, 2*wordSize); fstp_d(Address(rsp, 0)); movdbl(xmm0, Address(rsp, 0)); addptr(rsp, 2*wordSize); } } #endif // _LP64 } #endif // !CC_INTERP void InterpreterMacroAssembler::get_method_counters(Register method, Register mcs, Label& skip) {
*** 1781,1791 **** --- 1789,1802 ---- } } void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { #ifndef _LP64 ! if (state == ftos || state == dtos) MacroAssembler::verify_FPU(stack_depth); ! if ((state == ftos && UseSSE < 1) || + (state == dtos && UseSSE < 2)) { + MacroAssembler::verify_FPU(stack_depth); + } #endif } // Jump if ((*counter_addr += increment) & mask) satisfies the condition. void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,

src/cpu/x86/vm/interp_masm_x86.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File