Skip to content

Commit

Permalink
8311862: RISC-V: small improvements to shift immediate instructions
Browse files Browse the repository at this point in the history
Backport-of: f3b96f6937395246f09ac2ef3dfca5854217a0da
  • Loading branch information
Vladimir Kempik committed Jul 18, 2023
1 parent 6d4bfb7 commit d79c2ef
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/hotspot/cpu/riscv/assembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,13 @@ enum Nf {
c_slli(Rd, shamt); \
return; \
} \
_slli(Rd, Rs1, shamt); \
if (shamt != 0) { \
_slli(Rd, Rs1, shamt); \
} else { \
if (Rd != Rs1) { \
addi(Rd, Rs1, 0); \
} \
} \
}

INSN(slli);
Expand All @@ -2692,7 +2698,13 @@ enum Nf {
C_NAME(Rd, shamt); \
return; \
} \
NORMAL_NAME(Rd, Rs1, shamt); \
if (shamt != 0) { \
NORMAL_NAME(Rd, Rs1, shamt); \
} else { \
if (Rd != Rs1) { \
addi(Rd, Rs1, 0); \
} \
} \
}

INSN(srai, c_srai, _srai);
Expand Down

1 comment on commit d79c2ef

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