[aarch64-port-dev ] RFR(M): 8233743: AArch64: Make r27 conditionally allocatable
Andrew Haley
aph at redhat.com
Fri Nov 29 10:07:38 UTC 2019
On 11/29/19 3:41 AM, Pengfei Li (Arm Technology China) wrote:
> The 4G alignment search may still fail after the fix.
It may, but very unlikely.
Regarding to my second webrev, do you agree that checking the base and shift values in a function in aarch64.ad? See my last email [1] for detail explanations.
>
> [1] https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2019-November/008278.html
Not really, no. A method should be called exactly once from the code
that does the memory allocation, and then set a flag to be read
thereafter. It is not ideal to do it from the MacroAssembler
constructor, because Assembler instances are created wihte very hihg
frequency. I don't undestand why you simply can't do what I suggested.
You say
> But we have to do it in Metaspace::set_narrow_klass_base_and_shift()
> where the base and shift are finally determined and introduce new
> code block of "#ifdef AARCH64 #endif" in HotSpot shared code.
So do that, or perhaps introduce an overridable function in
AbstractAssembler which does nothing on other ports. But don't keep
executing the same logic again and again. Once base and shift are set
they never change.
--
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-compiler-dev
mailing list