@@ -3487,7 +3487,7 @@ void TemplateTable::invokevirtual(int byte_no) {
3487
3487
if (RewriteBytecodes && !UseSharedSpaces && !CDSConfig::is_dumping_static_archive ()) {
3488
3488
patch_bytecode (Bytecodes::_fast_invokevfinal, Rnew_bc, R12_scratch2);
3489
3489
}
3490
- invokevfinal_helper (Rcache, R11_scratch1, R12_scratch2, Rflags /* tmp */ );
3490
+ invokevfinal_helper (Rcache, R11_scratch1, R12_scratch2, Rflags /* tmp */ , Rrecv /* tmp */ );
3491
3491
3492
3492
__ align (32 , 12 );
3493
3493
__ bind (LnotFinal);
@@ -3510,36 +3510,24 @@ void TemplateTable::fast_invokevfinal(int byte_no) {
3510
3510
assert (byte_no == f2_byte, " use this argument" );
3511
3511
Register Rcache = R31;
3512
3512
__ load_method_entry (Rcache, R11_scratch1);
3513
- invokevfinal_helper (Rcache, R11_scratch1, R12_scratch2, R22_tmp2);
3513
+ invokevfinal_helper (Rcache, R11_scratch1, R12_scratch2, R22_tmp2, R23_tmp3 );
3514
3514
}
3515
3515
3516
- void TemplateTable::invokevfinal_helper (Register Rcache, Register Rscratch1, Register Rscratch2, Register Rscratch3) {
3516
+ void TemplateTable::invokevfinal_helper (Register Rcache,
3517
+ Register Rscratch1, Register Rscratch2, Register Rscratch3, Register Rscratch4) {
3517
3518
3518
- assert_different_registers (Rcache, Rscratch1, Rscratch2, Rscratch3);
3519
+ assert_different_registers (Rcache, Rscratch1, Rscratch2, Rscratch3, Rscratch4 );
3519
3520
3520
- // Load receiver from stack slot.
3521
- Register Rmethod = Rscratch3;
3522
- __ ld (Rmethod, in_bytes (ResolvedMethodEntry::method_offset ()), Rcache);
3521
+ Register Rrecv = Rscratch2,
3522
+ Rmethod = Rscratch3,
3523
+ Rret_addr = Rscratch4;
3524
+ prepare_invoke (Rcache, Rret_addr, Rrecv, Rscratch1);
3523
3525
3524
- // Get return address.
3525
- Register Rtable_addr = Rscratch2,
3526
- Rret_addr = Rcache,
3527
- Rret_type = Rscratch1;
3528
- // Get return type. It's coded into the upper 4 bits of the lower half of the 64 bit value.
3529
- __ lbz (Rret_type, in_bytes (ResolvedMethodEntry::type_offset ()), Rcache);
3530
- __ load_dispatch_table (Rtable_addr, Interpreter::invoke_return_entry_table ());
3531
- __ sldi (Rret_type, Rret_type, LogBytesPerWord);
3532
- __ ldx (Rret_addr, Rret_type, Rtable_addr); // kills Rcache
3533
-
3534
- Register Rnum_params = Rscratch2,
3535
- Rrecv = Rscratch2;
3536
- __ ld (Rnum_params, in_bytes (Method::const_offset ()), Rmethod);
3537
- __ lhz (Rnum_params /* number of params */ , in_bytes (ConstMethod::size_of_parameters_offset ()), Rnum_params);
3538
-
3539
- // Load receiver and receiver null check.
3540
- __ load_receiver (Rnum_params, Rrecv);
3526
+ // Receiver null check.
3541
3527
__ null_check_throw (Rrecv, -1 , Rscratch1);
3542
3528
3529
+ __ ld (Rmethod, in_bytes (ResolvedMethodEntry::method_offset ()), Rcache);
3530
+
3543
3531
__ profile_final_call (Rrecv, Rscratch1);
3544
3532
// Argument and return type profiling.
3545
3533
__ profile_arguments_type (Rmethod, Rscratch1, Rscratch2, true );
@@ -3558,9 +3546,9 @@ void TemplateTable::invokespecial(int byte_no) {
3558
3546
Rmethod = R31;
3559
3547
3560
3548
load_resolved_method_entry_special_or_static (Rcache, // ResolvedMethodEntry*
3561
- Rmethod, // Method* or itable index
3549
+ Rmethod, // Method*
3562
3550
noreg); // flags
3563
- prepare_invoke (Rcache, Rret_addr, Rreceiver, R11_scratch1); // recv
3551
+ prepare_invoke (Rcache, Rret_addr, Rreceiver, R11_scratch1);
3564
3552
3565
3553
// Receiver null check.
3566
3554
__ null_check_throw (Rreceiver, -1 , R11_scratch1);
@@ -3578,10 +3566,10 @@ void TemplateTable::invokestatic(int byte_no) {
3578
3566
Register Rcache = R3_ARG1,
3579
3567
Rret_addr = R4_ARG2;
3580
3568
3581
- load_resolved_method_entry_special_or_static (Rcache, // ResolvedMethodEntry*
3582
- R19_method, // Method* or itable index
3583
- noreg); // flags
3584
- prepare_invoke (Rcache, Rret_addr, noreg, R11_scratch1); // recv
3569
+ load_resolved_method_entry_special_or_static (Rcache, // ResolvedMethodEntry*
3570
+ R19_method, // Method*
3571
+ noreg); // flags
3572
+ prepare_invoke (Rcache, Rret_addr, noreg, R11_scratch1);
3585
3573
3586
3574
__ profile_call (R11_scratch1, R12_scratch2);
3587
3575
// Argument and return type profiling.
@@ -3639,7 +3627,7 @@ void TemplateTable::invokeinterface(int byte_no) {
3639
3627
Rcache = R31;
3640
3628
3641
3629
load_resolved_method_entry_interface (Rcache, noreg, noreg, Rflags);
3642
- prepare_invoke (Rcache, Rret_addr, Rreceiver, Rscratch1); // recv
3630
+ prepare_invoke (Rcache, Rret_addr, Rreceiver, Rscratch1);
3643
3631
3644
3632
// First check for Object case, then private interface method,
3645
3633
// then regular interface method.
@@ -3757,7 +3745,7 @@ void TemplateTable::invokehandle(int byte_no) {
3757
3745
Rcache = R31;
3758
3746
3759
3747
load_resolved_method_entry_handle (Rcache, // ResolvedMethodEntry*
3760
- Rmethod, // Method* or itable index
3748
+ Rmethod, // Method*
3761
3749
Rscratch1,
3762
3750
Rflags);
3763
3751
prepare_invoke (Rcache, Rret_addr, Rrecv, Rscratch1);
0 commit comments