< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page

*** 5881,5901 **** decrement(cnt); jccb(Assembler::greaterEqual, L_sloop); BIND(L_end); } ! void MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk) { ! #ifndef _LP64 ! super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); ! #else // A value type might be returned. If fields are in registers we // need to allocate a value type instance and initialize it with // the value of the fields. ! Label skip, slow_case; // We only need a new buffered value if a new one is not returned testptr(rax, 1); jcc(Assembler::zero, skip); // Try to allocate a new buffered value (from the heap) if (UseTLAB) { // FIXME -- for smaller code, the inline allocation (and the slow case) should be moved inside the pack handler. if (vk != NULL) { --- 5881,5902 ---- decrement(cnt); jccb(Assembler::greaterEqual, L_sloop); BIND(L_end); } ! int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_interpreter) { // A value type might be returned. If fields are in registers we // need to allocate a value type instance and initialize it with // the value of the fields. ! Label skip; // We only need a new buffered value if a new one is not returned testptr(rax, 1); jcc(Assembler::zero, skip); + int call_offset = -1; + + #ifdef _LP64 + Label slow_case; // Try to allocate a new buffered value (from the heap) if (UseTLAB) { // FIXME -- for smaller code, the inline allocation (and the slow case) should be moved inside the pack handler. if (vk != NULL) {
*** 5945,5957 **** bind(slow_case); // We failed to allocate a new value, fall back to a runtime // call. Some oop field may be live in some registers but we can't // tell. That runtime call will take care of preserving them // across a GC if there's one. super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); bind(skip); ! #endif } // Move a value between registers/stack slots and update the reg_state bool MacroAssembler::move_helper(VMReg from, VMReg to, BasicType bt, RegState reg_state[], int ret_off, int extra_stack_offset) { --- 5946,5966 ---- bind(slow_case); // We failed to allocate a new value, fall back to a runtime // call. Some oop field may be live in some registers but we can't // tell. That runtime call will take care of preserving them // across a GC if there's one. + #endif + + if (from_interpreter) { super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); + } else { + call(RuntimeAddress(StubRoutines::store_value_type_fields_to_buf())); + call_offset = offset(); + } + bind(skip); ! return call_offset; } // Move a value between registers/stack slots and update the reg_state bool MacroAssembler::move_helper(VMReg from, VMReg to, BasicType bt, RegState reg_state[], int ret_off, int extra_stack_offset) {
< prev index next >