[master] RFR: Fix loading Klass* in C1 on AArch64

Roman Kennke rkennke at openjdk.java.net
Fri Jan 21 11:20:18 UTC 2022


On Fri, 21 Jan 2022 11:11:46 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Why this new stub is different, i.e. why can it return not in `r0`? I am looking at e.g. `NewObjectArrayStub::emit_code`, and it has `assert(_result->as_register() == r0, "result must in r0");`. In fact, I cannot see any stub call with `far_call` that saves the registers itself...

The most correct way to do it would be to tell C1 to allocate the result register in r0. I tried that. However, it doesn't work with the code here:
https://github.com/openjdk/lilliput/blob/master/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp#L337

Mostly because there is control flow (that probably shouldn't be there) and that confuses the register allocator.

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

PR: https://git.openjdk.java.net/lilliput/pull/34


More information about the lilliput-dev mailing list