RFR: 8344169: RISC-V: Use more meaningful frame::metadata_words where possible
Fei Yang
fyang at openjdk.org
Thu Nov 14 07:48:37 UTC 2024
Hello, please review this RISC-V specific change which improves code readability.
Some background to help understand. We have following frame enumerations in file frame_riscv.hpp:
enum {
link_offset = -2,
return_addr_offset = -1,
sender_sp_offset = 0
};
The values are compatible with the platform ABI and are different from the other platforms like x64 or aarch64. Especially, `sender_sp_offset` is 0 for RISC-V compared to 2 for the other platforms. As a result, there exists some differences in places where code uses value of `sender_sp_offset` as an sp offset when fp is needed. For RISC-V, we used constant number 2 instead of `sender_sp_offset` as the sp offset. But the code will be more readable if we use `frame::metadata_words` which has the same value.
Testing on linux-riscv64:
- [x] "hotspot_loom jdk_loom" (release & fastdebug)
-------------
Commit messages:
- 8344169: RISC-V: Use more meaningful frame::metadata_words where possible
Changes: https://git.openjdk.org/jdk/pull/22096/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22096&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8344169
Stats: 27 lines in 7 files changed: 5 ins; 0 del; 22 mod
Patch: https://git.openjdk.org/jdk/pull/22096.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22096/head:pull/22096
PR: https://git.openjdk.org/jdk/pull/22096
More information about the hotspot-dev
mailing list