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 19, 2023
1 parent 4078fb9 commit 1776b3d
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 @@ -2787,7 +2787,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 @@ -2802,7 +2808,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 1776b3d

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