[riscv-port] RFR: 8277883: riscv: Fix a temp register usage in eden_allocate

zhengxiaolinX duke at openjdk.java.net
Mon Nov 29 03:51:47 UTC 2021

Hi team,

A trivial fix for a small C1 crash - this issue could be directly reproduced by using `java -XX:+UseSerialGC -XX:-UseTLAB -XX:TieredStopAtLevel=1`. The reason is simple: the eden_allocate uses t2 as a register and zaps it, whereas C1 will use it as a register allocation candidate, leading to a crash. In this function, t0 never gets a use so we can use it safely. Tested in all cases. [The original patch](https://github.com/riscv-collab/riscv-openjdk/pull/15)



Commit messages:
 - Fix a temp register usage in eden_allocate

Changes: https://git.openjdk.java.net/riscv-port/pull/16/files
 Webrev: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=16&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277883
  Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/riscv-port/pull/16.diff
  Fetch: git fetch https://git.openjdk.java.net/riscv-port pull/16/head:pull/16

PR: https://git.openjdk.java.net/riscv-port/pull/16

More information about the riscv-port-dev mailing list