Navigation Menu

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

Co-authored-by: Wei Kuai <kuaiwei.kw@alibaba-inc.com>
Reviewed-by: kvn
  • Loading branch information
2 people authored and Vladimir Kozlov committed Jun 2, 2022
1 parent 26048ea commit b5a646e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Expand Up @@ -1125,7 +1125,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/riscv/macroAssembler_riscv.cpp
Expand Up @@ -2624,7 +2624,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
pushed_registers += x15;
}

if (super_klass != x10 || UseCompressedOops) {
if (super_klass != x10) {
if (!IS_A_TEMP(x10)) {
pushed_registers += x10;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/macroAssembler_x86.cpp
Expand Up @@ -4163,7 +4163,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 b5a646e

@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.