RFR: 8224828: aarch64: save and restore the rflags register in push_CPU_state and pop_CPU_state

Andrew Dinn adinn at redhat.com
Tue May 28 15:27:53 UTC 2019


On 28/05/2019 14:50, Andrew Haley wrote:
> Great catch! I'm somewhat appalled that flags are live across
> safepoint polls.  I know that they are not live on x86.

I was thinking exactly the same thing.

I am not really clear how the cmp and cset instructions got separated in
the instruction scheduling. It would be good to understand how this
arose and see if it has any implications for other rules, encodings or
even masm method definitions.

Felix, were you able to identify what happened during graph lowering
that caused this interleaving of the cmp, safepoint and cset
instructions?  Are you able to provide any details of the C2 graph that
produced this code?

> I don't think you should do this. Instead, please apply
> 
>   effect(KILL cr);
> 
> to instruct safePoint in aarch64.ad.
Yes, that is a far better fix.

regards,


Andrew Dinn
-----------



More information about the hotspot-runtime-dev mailing list