Skip to content

Commit

Permalink
8287425: Remove unnecessary register push for MacroAssembler::check_k…
Browse files Browse the repository at this point in the history
…lass_subtype_slow_path

Reviewed-by: phh
Backport-of: b5a646ee6cfd432cef6b7e69a177959227a38ace
  • Loading branch information
parttimenerd authored and RealCLanger committed Nov 22, 2022
1 parent 7964440 commit 7340e1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
if (!IS_A_TEMP(r2)) pushed_registers += r2;
if (!IS_A_TEMP(r5)) pushed_registers += r5;

if (super_klass != r0 || UseCompressedOops) {
if (super_klass != r0) {
if (!IS_A_TEMP(r0)) pushed_registers += r0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/macroAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4785,7 +4785,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,

// Get super_klass value into rax (even if it was in rdi or rcx).
bool pushed_rax = false, pushed_rcx = false, pushed_rdi = false;
if (super_klass != rax || UseCompressedOops) {
if (super_klass != rax) {
if (!IS_A_TEMP(rax)) { push(rax); pushed_rax = true; }
mov(rax, super_klass);
}
Expand Down

1 comment on commit 7340e1b

@openjdk-notifier
Copy link

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.