2963 if (load_receiver) {
2964 __ movl(recv, flags);
2965 __ andl(recv, ConstantPoolCacheEntry::parameter_size_mask);
2966 const int no_return_pc_pushed_yet = -1; // argument slot correction before we push return address
2967 const int receiver_is_at_end = -1; // back off one slot to get receiver
2968 Address recv_addr = __ argument_address(recv, no_return_pc_pushed_yet + receiver_is_at_end);
2969 __ movptr(recv, recv_addr);
2970 __ verify_oop(recv);
2971 }
2972
2973 if (save_flags) {
2974 __ movl(r13, flags);
2975 }
2976
2977 // compute return type
2978 __ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
2979 // Make sure we don't need to mask flags after the above shift
2980 ConstantPoolCacheEntry::verify_tos_state_shift();
2981 // load return address
2982 {
2983 const address table_addr = (is_invokeinterface || is_invokedynamic) ?
2984 (address)Interpreter::return_5_addrs_by_index_table() :
2985 (address)Interpreter::return_3_addrs_by_index_table();
2986 ExternalAddress table(table_addr);
2987 __ lea(rscratch1, table);
2988 __ movptr(flags, Address(rscratch1, flags, Address::times_ptr));
2989 }
2990
2991 // push return address
2992 __ push(flags);
2993
2994 // Restore flags value from the constant pool cache, and restore rsi
2995 // for later null checks. r13 is the bytecode pointer
2996 if (save_flags) {
2997 __ movl(flags, r13);
2998 __ restore_bcp();
2999 }
3000 }
3001
3002
3003 void TemplateTable::invokevirtual_helper(Register index,
3004 Register recv,
3005 Register flags) {
|
2963 if (load_receiver) {
2964 __ movl(recv, flags);
2965 __ andl(recv, ConstantPoolCacheEntry::parameter_size_mask);
2966 const int no_return_pc_pushed_yet = -1; // argument slot correction before we push return address
2967 const int receiver_is_at_end = -1; // back off one slot to get receiver
2968 Address recv_addr = __ argument_address(recv, no_return_pc_pushed_yet + receiver_is_at_end);
2969 __ movptr(recv, recv_addr);
2970 __ verify_oop(recv);
2971 }
2972
2973 if (save_flags) {
2974 __ movl(r13, flags);
2975 }
2976
2977 // compute return type
2978 __ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
2979 // Make sure we don't need to mask flags after the above shift
2980 ConstantPoolCacheEntry::verify_tos_state_shift();
2981 // load return address
2982 {
2983 const address table_addr = (address) Interpreter::invoke_return_entry_table_for(code);
2984 ExternalAddress table(table_addr);
2985 __ lea(rscratch1, table);
2986 __ movptr(flags, Address(rscratch1, flags, Address::times_ptr));
2987 }
2988
2989 // push return address
2990 __ push(flags);
2991
2992 // Restore flags value from the constant pool cache, and restore rsi
2993 // for later null checks. r13 is the bytecode pointer
2994 if (save_flags) {
2995 __ movl(flags, r13);
2996 __ restore_bcp();
2997 }
2998 }
2999
3000
3001 void TemplateTable::invokevirtual_helper(Register index,
3002 Register recv,
3003 Register flags) {
|