Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Jan 5, 2024
1 parent c30caa0 commit f677ca3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/hotspot/cpu/riscv/assembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,9 @@ class Assembler : public AbstractAssembler {
}

INSN(lb, 0b0000011, 0b000);
INSN(_lbu, 0b0000011, 0b100); // Zcb
INSN(_lh, 0b0000011, 0b001); // Zcb
INSN(_lhu, 0b0000011, 0b101); // Zcb
INSN(_lbu, 0b0000011, 0b100);
INSN(_lh, 0b0000011, 0b001);
INSN(_lhu, 0b0000011, 0b101);
INSN(_lw, 0b0000011, 0b010);
INSN(lwu, 0b0000011, 0b110);
INSN(_ld, 0b0000011, 0b011);
Expand Down Expand Up @@ -2959,7 +2959,7 @@ enum Nf {
}
}

// Format CU, c.[sz]ext.*, c.no
// Format CU, c.[sz]ext.*, c.not
template <uint8_t InstructionType>
void c_u_if(Register Rs1) {
assert_cond(do_compress_zcb(Rs1));
Expand Down Expand Up @@ -3094,7 +3094,6 @@ enum Nf {
// Prerequisites: Zcb, Zbb
// Format CS
void c_zext_h(Register Rs1) {
//assert(instruction_premitted<VM_Version::rv_ext_Zbb, VM_Version::rv_ext_Zcb>(Rs1), "invalid");
c_u_if<0b010>(Rs1);
}

Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ class MacroAssembler: public Assembler {
}

inline void zext_b(Register Rd, Register Rs) {
if (do_compress_zcb(Rd, Rs) &&
(Rd == Rs)) {
if (do_compress_zcb(Rd, Rs) && (Rd == Rs)) {
c_zext_b(Rd);
} else {
andi(Rd, Rs, 0xFF);
Expand Down

0 comments on commit f677ca3

Please sign in to comment.