On Thu, 10 Dec 2020 10:01:49 GMT, Nick Gasson <[email protected]> wrote:

>> src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp line 3192:
>> 
>>> 3190:       spills += RegSet::of(output->as_Register());
>>> 3191:     } else if (output->is_FloatRegister()) {
>>> 3192:       fp_spills += RegSet::of((Register)output->as_FloatRegister());
>> 
>> This looks very strange. Does it generate the correct code for 
>> FloatRegisters?
>
> Er... no. But not because of the cast. The `push(fp_spills)` below should be 
> `push_fp(fp_spills)`. I'll add a FloatRegister constructor to RegSet so it 
> doesn't need that any more. There's one other place that does it in 
> cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp

push_fp() doesn't make much sense if the RegSet is a set of Registers, which 
are by definition not FloatRegisters. That casting of Register to FloatRegister 
in gc/z is evil.

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

PR: https://git.openjdk.java.net/jdk/pull/1711

Reply via email to