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

Yangfei (Felix) felix.yang at huawei.com
Thu May 30 06:31:23 UTC 2019


> I don't know. How well do you remember your intentions when coding six
> years ago? :-)
> 
> If I had to guess, I'd say that the x86 code on which it was based was
> not exactly clear: the comment was "Save Integer and Float state",
> although you're quite right to say it saves the flags. CR is so very
> volatile that I wouldn't expect it to be saved anywhere, really.
> 
> But it's of no matter. There isn't any need to save and restore the
> flags: push_CPU_state/ pop_CPU_state are called from only two places,
> RegisterSaver::save_live_registers and patch_callers_callsite, which
> do not have any contract to save the flags.

Thanks for confirming that.

> > If true, then I would suggest renaming push_CPU_state/ pop_CPU_state to
> some other name.
> 
> Probably. What we must do is correct this comment in
> RegisterSaver::save_live_registers:
> 
> // Save registers, fpu state, and flags.
> 

New webrev: http://cr.openjdk.java.net/~fyang/8224828/webrev.01
This is tested in the same environment for 24 hours, no failure witnessed. 
Also passed jtreg hotspot test with an aarch64 fastdebug build.  OK ? 
Should I also push this change to the aarch64 8u repo? 


Thanks,
Felix


More information about the hotspot-runtime-dev mailing list