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

Fei Yang fyang at openjdk.java.net
Mon Nov 29 08:13:59 UTC 2021

On Mon, 29 Nov 2021 08:05:03 GMT, zhengxiaolinX <duke at openjdk.java.net> wrote:

>> 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)
>> Thanks,
>> Xiaolin
> zhengxiaolinX has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>   Fix a temp register usage in eden_allocate

Looks good. It's definitely inappropriate to use an allocatable general-purpose register here.


Marked as reviewed by fyang (Lead).

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

More information about the riscv-port-dev mailing list