RFR: 8293100: RISC-V: Need to save and restore callee-saved FloatRegisters in StubGenerator::generate_call_stub

Xiaolin Zheng xlinzheng at openjdk.org
Thu Sep 1 04:17:57 UTC 2022


Hi team,

1. Tests described in JDK-8293100 are failed, for callee-saved float registers used in C++ code are observed being killed after entering the Java world since callee-saved float registers are unfortunately missed to be saved in `StubGenerator::generate_call_stub()`. So the phenomenon presented in the failed tests seems to be weird.

2. This patch also fixes some typos in `vmreg_riscv.cpp` when debugging the same issue:
(before)
![140D1DC7-39AD-4D5E-ABDE-38AACB658E3F](https://user-images.githubusercontent.com/38156692/187642108-9b3c5b81-f753-4e02-8a71-1baa984f1c74.png)
This one seems not right, either; and it also gets fixed in this patch:
(after)
![6374B608-F574-4883-9DB5-D0525BE2536A](https://user-images.githubusercontent.com/38156692/187642140-43d0647a-0ae6-4e11-951e-d90b239bd75a.png)

3. Also, branch nodes for float registers in OptoAssembly didn't show their destination blocks. This patch adds a little enhancement for those.

Hotspot tier1 has passed both on my board and qemu, and `vmTestbase/nsk/stress` tests failed before have passed as well.
The test process on the board is slow and I am testing the remaining but I consider this as ready for review.

Best,
Xiaolin

-------------

Commit messages:
 - riscv: Forgot to save callee-saved FloatRegisters in StubGenerator::generate_call_stub
 - riscv: Print dest blocks of branch instructions for OptoAssembly
 - riscv: Fix VMReg names for Float/Vector Registers

Changes: https://git.openjdk.org/jdk/pull/10095/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10095&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293100
  Stats: 79 lines in 4 files changed: 64 ins; 0 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/10095.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10095/head:pull/10095

PR: https://git.openjdk.org/jdk/pull/10095


More information about the hotspot-dev mailing list