< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page

@@ -5881,21 +5881,22 @@
   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
+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, slow_case;
+  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,13 +5946,21 @@
   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);
-#endif
+  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 >