Skip to content

Commit

Permalink
8252311: AArch64: save two words in itable lookup stub
Browse files Browse the repository at this point in the history
Reviewed-by: adinn, aph
  • Loading branch information
Boris Ulasevich committed Sep 19, 2020
1 parent 22f7af7 commit 224a30f
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,27 +1004,22 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
// }
Label search, found_method;

for (int peel = 1; peel >= 0; peel--) {
ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes()));
cmp(intf_klass, method_result);

if (peel) {
br(Assembler::EQ, found_method);
} else {
br(Assembler::NE, search);
// (invert the test to fall through to found_method...)
}

if (!peel) break;

bind(search);

// Check that the previous entry is non-null. A null entry means that
// the receiver class doesn't implement the interface, and wasn't the
// same as when the caller was compiled.
cbz(method_result, L_no_such_interface);
ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes()));
cmp(intf_klass, method_result);
br(Assembler::EQ, found_method);
bind(search);
// Check that the previous entry is non-null. A null entry means that
// the receiver class doesn't implement the interface, and wasn't the
// same as when the caller was compiled.
cbz(method_result, L_no_such_interface);
if (itableOffsetEntry::interface_offset_in_bytes() != 0) {
add(scan_temp, scan_temp, scan_step);
ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes()));
} else {
ldr(method_result, Address(pre(scan_temp, scan_step)));
}
cmp(intf_klass, method_result);
br(Assembler::NE, search);

bind(found_method);

Expand Down

1 comment on commit 224a30f

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 224a30f Sep 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.