-
Enhancement
-
Resolution: Fixed
-
P4
-
22
-
b22
-
riscv
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8319267 | 21.0.2 | Gui Cao | P4 | Resolved | Fixed | b05 |
JDK-8319312 | 17.0.10 | Gui Cao | P4 | Resolved | Fixed | b02 |
The current test_bit assembly function needs to accept a temporary register because it needs one if it goes to the andi else branch. However, in this case we can actually avoid calling andi and accomplish the same thing by logically shifting to the right and testing the lowest bit. The advantage is that it makes the test_bit function much simpler. Also, to reduce the number of instructions in a given case (consider the mv function), mv actually calls the li function, which generates more than one instruction when the parameter imm exceeds the 32-bit range[1].
[1] https://github.com/openjdk/jdk/blob/9123961aaa47aa58ec436640590d2cceedb8cbb1/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L804-L840
[1] https://github.com/openjdk/jdk/blob/9123961aaa47aa58ec436640590d2cceedb8cbb1/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L804-L840
- backported by
-
JDK-8319267 RISC-V: Small refactoring for MacroAssembler::test_bit
-
- Resolved
-
-
JDK-8319312 RISC-V: Small refactoring for MacroAssembler::test_bit
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/348a703c
-
Commit openjdk/jdk21u/6e217669
-
Commit openjdk/jdk/988e1dfe
-
Review openjdk/jdk17u-dev/1941
-
Review openjdk/jdk21u/301
-
Review openjdk/jdk/16391
(3 links to)