Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk19u Public archive

Commit

Permalink
8288992: AArch64: CMN should be handled the same way as CMP
Browse files Browse the repository at this point in the history
Backport-of: cc2b792
  • Loading branch information
TobiHartmann committed Sep 27, 2022
1 parent e6bd2c9 commit d0b021b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3355,7 +3355,7 @@ void MacroAssembler::kernel_crc32_using_crc32(Register crc, Register buf,
crc32x(crc, crc, tmp2);
crc32x(crc, crc, tmp3);
br(Assembler::GE, CRC_by32_loop);
cmn(len, 32);
cmn(len, (u1)32);
br(Assembler::NE, CRC_less32);
b(L_exit);

Expand Down Expand Up @@ -3418,7 +3418,7 @@ void MacroAssembler::kernel_crc32_using_crc32(Register crc, Register buf,

sub(len, len, 64);
add(buf, buf, 8);
cmn(len, 128);
cmn(len, (u1)128);
br(Assembler::NE, CRC_less64);
BIND(L_exit);
mvnw(crc, crc);
Expand Down Expand Up @@ -3652,7 +3652,7 @@ void MacroAssembler::kernel_crc32c_using_crc32c(Register crc, Register buf,
crc32cx(crc, crc, tmp2);
crc32cx(crc, crc, tmp3);
br(Assembler::GE, CRC_by32_loop);
cmn(len, 32);
cmn(len, (u1)32);
br(Assembler::NE, CRC_less32);
b(L_exit);

Expand Down Expand Up @@ -3715,7 +3715,7 @@ void MacroAssembler::kernel_crc32c_using_crc32c(Register crc, Register buf,

sub(len, len, 64);
add(buf, buf, 8);
cmn(len, 128);
cmn(len, (u1)128);
br(Assembler::NE, CRC_less64);
BIND(L_exit);
}
Expand Down
7 changes: 5 additions & 2 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,11 @@ class MacroAssembler: public Assembler {
inline void cmp(Register Rd, unsigned char imm8) { subs(zr, Rd, imm8); }
inline void cmp(Register Rd, unsigned imm) = delete;

inline void cmnw(Register Rd, unsigned imm) { addsw(zr, Rd, imm); }
inline void cmn(Register Rd, unsigned imm) { adds(zr, Rd, imm); }
template<class T>
inline void cmnw(Register Rd, T imm) { addsw(zr, Rd, imm); }

inline void cmn(Register Rd, unsigned char imm8) { adds(zr, Rd, imm8); }
inline void cmn(Register Rd, unsigned imm) = delete;

void cset(Register Rd, Assembler::Condition cond) {
csinc(Rd, zr, zr, ~cond);
Expand Down

1 comment on commit d0b021b

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