< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Print this page




 239       __ xorl(rax, rax); // use zero reg to clear memory (shorter code)
 240       __ store_klass_gap(r13, rax);  // zero klass gap for compressed oops
 241       __ mov(rax, rbx);
 242       __ store_klass(r13, rbx);  // klass
 243 
 244       // We have our new buffered value, initialize its fields with a
 245       // value class specific handler
 246       __ movptr(rbx, Address(rax, ValueKlass::pack_handler_offset()));
 247       __ mov(rax, r13);
 248       __ call(rbx);
 249       __ jmp(skip);
 250     }
 251 
 252     __ bind(slow_case);
 253     // We failed to allocate a new value, fall back to a runtime
 254     // call. Some oop field may be live in some registers but we can't
 255     // tell. That runtime call will take care of preserving them
 256     // across a GC if there's one.
 257     __ super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf());
 258     __ bind(skip);













 259 #endif
 260   }
 261 
 262   __ restore_bcp();
 263   __ restore_locals();
 264 
 265   if (state == atos) {
 266     Register mdp = rbx;
 267     Register tmp = rcx;
 268     __ profile_return_type(mdp, rax, tmp);
 269   }
 270 
 271   const Register cache = rbx;
 272   const Register index = rcx;
 273   __ get_cache_and_index_at_bcp(cache, index, 1, index_size);
 274 
 275   const Register flags = cache;
 276   __ movl(flags, Address(cache, index, Address::times_ptr, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()));
 277   __ andl(flags, ConstantPoolCacheEntry::parameter_size_mask);
 278   __ lea(rsp, Address(rsp, flags, Interpreter::stackElementScale()));




 239       __ xorl(rax, rax); // use zero reg to clear memory (shorter code)
 240       __ store_klass_gap(r13, rax);  // zero klass gap for compressed oops
 241       __ mov(rax, rbx);
 242       __ store_klass(r13, rbx);  // klass
 243 
 244       // We have our new buffered value, initialize its fields with a
 245       // value class specific handler
 246       __ movptr(rbx, Address(rax, ValueKlass::pack_handler_offset()));
 247       __ mov(rax, r13);
 248       __ call(rbx);
 249       __ jmp(skip);
 250     }
 251 
 252     __ bind(slow_case);
 253     // We failed to allocate a new value, fall back to a runtime
 254     // call. Some oop field may be live in some registers but we can't
 255     // tell. That runtime call will take care of preserving them
 256     // across a GC if there's one.
 257     __ super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf());
 258     __ bind(skip);
 259 
 260     if (ReturnValuesInThreadLocalBuffer) {
 261       // vt_alloc_ptr adjustment
 262       Label no_adjustment;
 263       __ cmpptr(rax, Address(r15_thread, in_bytes(JavaThread::vt_alloc_ptr_offset())));
 264       __ jcc(Assembler::notEqual, no_adjustment);
 265       __ load_klass(rbx, rax);
 266       __ movl(r13, Address(rbx, Klass::layout_helper_offset()));
 267       __ lea(r14, Address(rax, r13, Address::times_1));
 268       __ movptr(Address(r15_thread, in_bytes(JavaThread::vt_alloc_ptr_offset())), r14);
 269       __ bind(no_adjustment);
 270     }
 271 
 272 #endif
 273   }
 274 
 275   __ restore_bcp();
 276   __ restore_locals();
 277 
 278   if (state == atos) {
 279     Register mdp = rbx;
 280     Register tmp = rcx;
 281     __ profile_return_type(mdp, rax, tmp);
 282   }
 283 
 284   const Register cache = rbx;
 285   const Register index = rcx;
 286   __ get_cache_and_index_at_bcp(cache, index, 1, index_size);
 287 
 288   const Register flags = cache;
 289   __ movl(flags, Address(cache, index, Address::times_ptr, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()));
 290   __ andl(flags, ConstantPoolCacheEntry::parameter_size_mask);
 291   __ lea(rsp, Address(rsp, flags, Interpreter::stackElementScale()));


< prev index next >