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

src/cpu/x86/vm/templateInterpreter_x86_32.cpp

Print this page
rev 5401 : 8026054: New type profiling points: type of return values at calls
Summary: x86 interpreter and c1 type profiling for return values at calls
Reviewed-by:


 174   // to end up back on the FPU so it can operate on them.
 175   if (incoming_state == ftos && UseSSE >= 1) {
 176     __ subptr(rsp, wordSize);
 177     __ movflt(Address(rsp, 0), xmm0);
 178     __ fld_s(Address(rsp, 0));
 179     __ addptr(rsp, wordSize);
 180   } else if (incoming_state == dtos && UseSSE >= 2) {
 181     __ subptr(rsp, 2*wordSize);
 182     __ movdbl(Address(rsp, 0), xmm0);
 183     __ fld_d(Address(rsp, 0));
 184     __ addptr(rsp, 2*wordSize);
 185   }
 186 
 187   __ MacroAssembler::verify_FPU(state == ftos || state == dtos ? 1 : 0, "generate_return_entry_for in interpreter");
 188 
 189   // Restore stack bottom in case i2c adjusted stack
 190   __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
 191   // and NULL it as marker that rsp is now tos until next java call
 192   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
 193 





 194   __ restore_bcp();
 195   __ restore_locals();
 196 
 197   Label L_got_cache, L_giant_index;
 198   if (EnableInvokeDynamic) {
 199     __ cmpb(Address(rsi, 0), Bytecodes::_invokedynamic);
 200     __ jcc(Assembler::equal, L_giant_index);
 201   }
 202   __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
 203   __ bind(L_got_cache);
 204   __ movl(rbx, Address(rbx, rcx,
 205                     Address::times_ptr, ConstantPoolCache::base_offset() +
 206                     ConstantPoolCacheEntry::flags_offset()));
 207   __ andptr(rbx, 0xFF);
 208   __ lea(rsp, Address(rsp, rbx, Interpreter::stackElementScale()));
 209   __ dispatch_next(state, step);
 210 
 211   // out of the main line of code...
 212   if (EnableInvokeDynamic) {
 213     __ bind(L_giant_index);




 174   // to end up back on the FPU so it can operate on them.
 175   if (incoming_state == ftos && UseSSE >= 1) {
 176     __ subptr(rsp, wordSize);
 177     __ movflt(Address(rsp, 0), xmm0);
 178     __ fld_s(Address(rsp, 0));
 179     __ addptr(rsp, wordSize);
 180   } else if (incoming_state == dtos && UseSSE >= 2) {
 181     __ subptr(rsp, 2*wordSize);
 182     __ movdbl(Address(rsp, 0), xmm0);
 183     __ fld_d(Address(rsp, 0));
 184     __ addptr(rsp, 2*wordSize);
 185   }
 186 
 187   __ MacroAssembler::verify_FPU(state == ftos || state == dtos ? 1 : 0, "generate_return_entry_for in interpreter");
 188 
 189   // Restore stack bottom in case i2c adjusted stack
 190   __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
 191   // and NULL it as marker that rsp is now tos until next java call
 192   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
 193 
 194   if (incoming_state == atos) {
 195     Register mdp = rsi;
 196     Register tmp = rdi;
 197     __ profile_return_type(mdp, rax, tmp);
 198   }
 199   __ restore_bcp();
 200   __ restore_locals();
 201 
 202   Label L_got_cache, L_giant_index;
 203   if (EnableInvokeDynamic) {
 204     __ cmpb(Address(rsi, 0), Bytecodes::_invokedynamic);
 205     __ jcc(Assembler::equal, L_giant_index);
 206   }
 207   __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
 208   __ bind(L_got_cache);
 209   __ movl(rbx, Address(rbx, rcx,
 210                     Address::times_ptr, ConstantPoolCache::base_offset() +
 211                     ConstantPoolCacheEntry::flags_offset()));
 212   __ andptr(rbx, 0xFF);
 213   __ lea(rsp, Address(rsp, rbx, Interpreter::stackElementScale()));
 214   __ dispatch_next(state, step);
 215 
 216   // out of the main line of code...
 217   if (EnableInvokeDynamic) {
 218     __ bind(L_giant_index);


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