Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311726 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
A cleanup which can also reduce some code size. The main purpose is to separate mixed movptr usages: movptr's semantics allow it to be used for fixed-length patchable addresses. In the backend several places which are not patchable use movptr (6 instructions) as well, but that's unnecessary for we can use li(1~6 instructions) to substitute them.
Originally some non-patchable callsites:
```
;; 0x401ab1dc40
0x000000401372b324: lui t0,0x201
0x000000401372b328: addi t0,t0,-680 # 0x0000000000200d58
0x000000401372b32c: slli t0,t0,0xb
0x000000401372b32e: addi t0,t0,1905
0x000000401372b332: slli t0,t0,0x6
0x000000401372b334: jalr t0
```
Now:
```
0x000000401b2bd9f4: lui t0,0x4003
0x000000401b2bd9f8: addiw t0,t0,-1275
0x000000401b2bd9fc: slli t0,t0,0xc
0x000000401b2bda00: jalr 1080(t0) # 0x0000000004003438
```
Originally some non-patchable callsites:
```
;; 0x401ab1dc40
0x000000401372b324: lui t0,0x201
0x000000401372b328: addi t0,t0,-680 # 0x0000000000200d58
0x000000401372b32c: slli t0,t0,0xb
0x000000401372b32e: addi t0,t0,1905
0x000000401372b332: slli t0,t0,0x6
0x000000401372b334: jalr t0
```
Now:
```
0x000000401b2bd9f4: lui t0,0x4003
0x000000401b2bd9f8: addiw t0,t0,-1275
0x000000401b2bd9fc: slli t0,t0,0xc
0x000000401b2bda00: jalr 1080(t0) # 0x0000000004003438
```
- backported by
-
JDK-8311726 RISC-V: Use li instead of patchable movptr at non-patchable callsites
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/1decdcee
-
Commit openjdk/riscv-port-jdk17u/4d5ed8fe
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/10462
-
Review openjdk/riscv-port-jdk17u/37
(2 links to)