-
Enhancement
-
Resolution: Fixed
-
P4
-
22
-
b03
-
riscv
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8342396 | 21.0.6 | Gui Cao | P4 | Resolved | Fixed | b01 |
MacroAssembler::cmpxchg/cmpxchgptr/cmpxchg_obj_header is non-trivial on linux-riscv64 platform. Passing t0(aka x5) as temporary register to this functions can also be error prone. As a reserved scratch register, t0 is implicitly clobberred by various assembler functions.
This issue is used to track avoid passing t0 as a temporary register in the following cases:
1. avoid passing t0 as temp register to MacroAssembler::cmpxchg/cmpxchgptr/cmpxchg_obj_header.
2. avoid passing t0 as temp register to x_load_barrier and x_load_barrier_slow_path function in x_riscv.ad
3. avoid passing t0 as temp register to z_store_barrier and z_color function in z_riscv.ad
Note that I didn't touch MacroAssembler::cmpxchg because it seems to me that this function is designed that it allows t0 to be used as the result register. As the result register will be set on exits, there should be no risk when using t0 for receiving the result.
This issue is used to track avoid passing t0 as a temporary register in the following cases:
1. avoid passing t0 as temp register to MacroAssembler::cmpxchg/cmpxchgptr/cmpxchg_obj_header.
2. avoid passing t0 as temp register to x_load_barrier and x_load_barrier_slow_path function in x_riscv.ad
3. avoid passing t0 as temp register to z_store_barrier and z_color function in z_riscv.ad
Note that I didn't touch MacroAssembler::cmpxchg because it seems to me that this function is designed that it allows t0 to be used as the result register. As the result register will be set on exits, there should be no risk when using t0 for receiving the result.
- backported by
-
JDK-8342396 RISC-V: Avoid passing t0 as temp register to MacroAssembler:: cmpxchg_obj_header/cmpxchgptr
- Resolved
- links to
-
Commit openjdk/jdk/0be0775a
-
Commit(master) openjdk/jdk21u-dev/f7660807
-
Review openjdk/jdk/16880
-
Review(master) openjdk/jdk21u-dev/1053