RFR(S)[13]: AArch64: float point register corruption in ZBarrierSetAssembler::load_at

Stuart Monteith stuart.monteith at linaro.org
Mon Jun 24 09:06:51 UTC 2019

Ok, r19 might have been a bad choice, but I'll work something out.
rscratch1/2 might not be safe to use

"load_at" is called by "access_load_at". If you look at
templateTable_aarch64.cpp you see 25 instances of "noreg" being passed
as tmp, 5 matches in methodHandles_aarch64.cpp. You'll find a similar
story in arm and x86 and for store_at.

I'd like to suggest I address the use of rscratch1/2 and the passing
of noreg separately, the latter is a larger issue that should be
handled in the original bug.  I can open a bug to handle the use of
noreg, if that is appropriate.


On Sat, 22 Jun 2019 at 09:01, Andrew Haley <aph at redhat.com> wrote:
> On 6/21/19 5:02 PM, Stuart Monteith wrote:
> >    I'm trying passing r19 instead of rscratch1 to __ load_mirror and
> > also checking that rscratch1,2 aren't passed to load_at. That would
> > free up rscratch1 and 2 to be used, and not saved, in load_at.
> Yes. Better.
> > The tmp register is more often than not set to rscratch2 or noreg,
> > so it isn't a terribly useful parameter.
> Huh? It makes no sense to pass noreg as a tmp. A callee has a right
> to assume that a reg passed as tmp can be used.
> --
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-gc-dev mailing list