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

src/cpu/x86/vm/templateTable_x86_32.cpp

Print this page




2908   if (load_receiver) {
2909     __ movl(recv, flags);
2910     __ andl(recv, ConstantPoolCacheEntry::parameter_size_mask);
2911     const int no_return_pc_pushed_yet = -1;  // argument slot correction before we push return address
2912     const int receiver_is_at_end      = -1;  // back off one slot to get receiver
2913     Address recv_addr = __ argument_address(recv, no_return_pc_pushed_yet + receiver_is_at_end);
2914     __ movptr(recv, recv_addr);
2915     __ verify_oop(recv);
2916   }
2917 
2918   if (save_flags) {
2919     __ mov(rsi, flags);
2920   }
2921 
2922   // compute return type
2923   __ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
2924   // Make sure we don't need to mask flags after the above shift
2925   ConstantPoolCacheEntry::verify_tos_state_shift();
2926   // load return address
2927   {
2928     const address table_addr = (is_invokeinterface || is_invokedynamic) ?
2929         (address)Interpreter::return_5_addrs_by_index_table() :
2930         (address)Interpreter::return_3_addrs_by_index_table();
2931     ExternalAddress table(table_addr);
2932     __ movptr(flags, ArrayAddress(table, Address(noreg, flags, Address::times_ptr)));
2933   }
2934 
2935   // push return address
2936   __ push(flags);
2937 
2938   // Restore flags value from the constant pool cache, and restore rsi
2939   // for later null checks.  rsi is the bytecode pointer
2940   if (save_flags) {
2941     __ mov(flags, rsi);
2942     __ restore_bcp();
2943   }
2944 }
2945 
2946 
2947 void TemplateTable::invokevirtual_helper(Register index,
2948                                          Register recv,
2949                                          Register flags) {
2950   // Uses temporary registers rax, rdx




2908   if (load_receiver) {
2909     __ movl(recv, flags);
2910     __ andl(recv, ConstantPoolCacheEntry::parameter_size_mask);
2911     const int no_return_pc_pushed_yet = -1;  // argument slot correction before we push return address
2912     const int receiver_is_at_end      = -1;  // back off one slot to get receiver
2913     Address recv_addr = __ argument_address(recv, no_return_pc_pushed_yet + receiver_is_at_end);
2914     __ movptr(recv, recv_addr);
2915     __ verify_oop(recv);
2916   }
2917 
2918   if (save_flags) {
2919     __ mov(rsi, flags);
2920   }
2921 
2922   // compute return type
2923   __ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
2924   // Make sure we don't need to mask flags after the above shift
2925   ConstantPoolCacheEntry::verify_tos_state_shift();
2926   // load return address
2927   {
2928     const address table_addr = (address) Interpreter::invoke_return_entry_table_for(code);


2929     ExternalAddress table(table_addr);
2930     __ movptr(flags, ArrayAddress(table, Address(noreg, flags, Address::times_ptr)));
2931   }
2932 
2933   // push return address
2934   __ push(flags);
2935 
2936   // Restore flags value from the constant pool cache, and restore rsi
2937   // for later null checks.  rsi is the bytecode pointer
2938   if (save_flags) {
2939     __ mov(flags, rsi);
2940     __ restore_bcp();
2941   }
2942 }
2943 
2944 
2945 void TemplateTable::invokevirtual_helper(Register index,
2946                                          Register recv,
2947                                          Register flags) {
2948   // Uses temporary registers rax, rdx


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