src/cpu/x86/vm/templateInterpreter_x86_64.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_64.cpp

Print this page
rev 5404 : 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:
rev 5407 : imported patch fixreturn


 160 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) {
 161   address entry = __ pc();
 162   // NULL last_sp until next java call
 163   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
 164   __ dispatch_next(state);
 165   return entry;
 166 }
 167 
 168 
 169 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) {
 170   address entry = __ pc();
 171 
 172   // Restore stack bottom in case i2c adjusted stack
 173   __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
 174   // and NULL it as marker that esp is now tos until next java call
 175   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
 176 
 177   __ restore_bcp();
 178   __ restore_locals();
 179 






 180   Label L_got_cache, L_giant_index;
 181   if (EnableInvokeDynamic) {
 182     __ cmpb(Address(r13, 0), Bytecodes::_invokedynamic);
 183     __ jcc(Assembler::equal, L_giant_index);
 184   }
 185   __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
 186   __ bind(L_got_cache);
 187   __ movl(rbx, Address(rbx, rcx,
 188                        Address::times_ptr,
 189                        in_bytes(ConstantPoolCache::base_offset()) +
 190                        3 * wordSize));
 191   __ andl(rbx, 0xFF);
 192   __ lea(rsp, Address(rsp, rbx, Address::times_8));
 193   __ dispatch_next(state, step);
 194 
 195   // out of the main line of code...
 196   if (EnableInvokeDynamic) {
 197     __ bind(L_giant_index);
 198     __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u4));
 199     __ jmp(L_got_cache);




 160 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) {
 161   address entry = __ pc();
 162   // NULL last_sp until next java call
 163   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
 164   __ dispatch_next(state);
 165   return entry;
 166 }
 167 
 168 
 169 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) {
 170   address entry = __ pc();
 171 
 172   // Restore stack bottom in case i2c adjusted stack
 173   __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
 174   // and NULL it as marker that esp is now tos until next java call
 175   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
 176 
 177   __ restore_bcp();
 178   __ restore_locals();
 179 
 180   if (state == atos) {
 181     Register mdp = rbx;
 182     Register tmp = rcx;
 183     __ profile_return_type(mdp, rax, tmp);
 184   }
 185 
 186   Label L_got_cache, L_giant_index;
 187   if (EnableInvokeDynamic) {
 188     __ cmpb(Address(r13, 0), Bytecodes::_invokedynamic);
 189     __ jcc(Assembler::equal, L_giant_index);
 190   }
 191   __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
 192   __ bind(L_got_cache);
 193   __ movl(rbx, Address(rbx, rcx,
 194                        Address::times_ptr,
 195                        in_bytes(ConstantPoolCache::base_offset()) +
 196                        3 * wordSize));
 197   __ andl(rbx, 0xFF);
 198   __ lea(rsp, Address(rsp, rbx, Address::times_8));
 199   __ dispatch_next(state, step);
 200 
 201   // out of the main line of code...
 202   if (EnableInvokeDynamic) {
 203     __ bind(L_giant_index);
 204     __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u4));
 205     __ jmp(L_got_cache);


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