Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311716 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
Currently, there are two different ways of moving function pointer on riscv with either 'li' or 'mv' assembler functions. For example, in file shenandoahBarrierSetAssembler_riscv.cpp, we use 'li' function:
li(ra, (int64_t)(uintptr_t)ShenandoahRuntime::load_reference_barrier_strong_narrow)
But in file templateInterpreterGenerator_riscv.cpp, we use 'mv' function:
mv(t1, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans))
Use of 'mv' here calls 'movptr' and will emits fixed length instruction sequence, which is neither necessary nor optimal compared with use of 'li'.
We should change to use 'li' instead of 'movptr' to implement 'mv' thus unifying the way of moving function pointer.
li(ra, (int64_t)(uintptr_t)ShenandoahRuntime::load_reference_barrier_strong_narrow)
But in file templateInterpreterGenerator_riscv.cpp, we use 'mv' function:
mv(t1, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans))
Use of 'mv' here calls 'movptr' and will emits fixed length instruction sequence, which is neither necessary nor optimal compared with use of 'li'.
We should change to use 'li' instead of 'movptr' to implement 'mv' thus unifying the way of moving function pointer.
- backported by
-
JDK-8311716 RISC-V: Unify the way of moving function pointer
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/fc5f97fe
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/10194
-
Review openjdk/riscv-port-jdk17u/35
-
Review(riscv-port) openjdk/riscv-port-jdk11u/33
(2 links to)