373 // caller of the deoptee has been extracted into the vframeArray 374 // and will be stuffed into the c2i adapter we create for later 375 // restoration so only result registers need to be restored here. 376 377 // Restore fp result register 378 __ movdbl(xmm0, Address(rsp, xmm0_offset_in_bytes())); 379 // Restore integer result register 380 __ movptr(rax, Address(rsp, rax_offset_in_bytes())); 381 __ movptr(rdx, Address(rsp, rdx_offset_in_bytes())); 382 383 // Pop all of the register save are off the stack except the return address 384 __ addptr(rsp, return_offset_in_bytes()); 385 } 386 387 // Is vector's size (in bytes) bigger than a size saved by default? 388 // 16 bytes XMM registers are saved by default using fxsave/fxrstor instructions. 389 bool SharedRuntime::is_wide_vector(int size) { 390 return size > 16; 391 } 392 393 // The java_calling_convention describes stack locations as ideal slots on 394 // a frame with no abi restrictions. Since we must observe abi restrictions 395 // (like the placement of the register window) the slots must be biased by 396 // the following value. 397 static int reg2offset_in(VMReg r) { 398 // Account for saved rbp and return address 399 // This should really be in_preserve_stack_slots 400 return (r->reg2stack() + 4) * VMRegImpl::stack_slot_size; 401 } 402 403 static int reg2offset_out(VMReg r) { 404 return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size; 405 } 406 407 // --------------------------------------------------------------------------- 408 // Read the array of BasicTypes from a signature, and compute where the 409 // arguments should go. Values in the VMRegPair regs array refer to 4-byte 410 // quantities. Values less than VMRegImpl::stack0 are registers, those above 411 // refer to 4-byte stack slots. All stack slots are based off of the stack pointer 412 // as framesizes are fixed. | 373 // caller of the deoptee has been extracted into the vframeArray 374 // and will be stuffed into the c2i adapter we create for later 375 // restoration so only result registers need to be restored here. 376 377 // Restore fp result register 378 __ movdbl(xmm0, Address(rsp, xmm0_offset_in_bytes())); 379 // Restore integer result register 380 __ movptr(rax, Address(rsp, rax_offset_in_bytes())); 381 __ movptr(rdx, Address(rsp, rdx_offset_in_bytes())); 382 383 // Pop all of the register save are off the stack except the return address 384 __ addptr(rsp, return_offset_in_bytes()); 385 } 386 387 // Is vector's size (in bytes) bigger than a size saved by default? 388 // 16 bytes XMM registers are saved by default using fxsave/fxrstor instructions. 389 bool SharedRuntime::is_wide_vector(int size) { 390 return size > 16; 391 } 392 393 size_t SharedRuntime::trampoline_size() { 394 return 16; 395 } 396 397 void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) { 398 __ jump(RuntimeAddress(destination)); 399 } 400 401 // The java_calling_convention describes stack locations as ideal slots on 402 // a frame with no abi restrictions. Since we must observe abi restrictions 403 // (like the placement of the register window) the slots must be biased by 404 // the following value. 405 static int reg2offset_in(VMReg r) { 406 // Account for saved rbp and return address 407 // This should really be in_preserve_stack_slots 408 return (r->reg2stack() + 4) * VMRegImpl::stack_slot_size; 409 } 410 411 static int reg2offset_out(VMReg r) { 412 return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size; 413 } 414 415 // --------------------------------------------------------------------------- 416 // Read the array of BasicTypes from a signature, and compute where the 417 // arguments should go. Values in the VMRegPair regs array refer to 4-byte 418 // quantities. Values less than VMRegImpl::stack0 are registers, those above 419 // refer to 4-byte stack slots. All stack slots are based off of the stack pointer 420 // as framesizes are fixed. |