RFR: 8146709: AArch64: Incorrect use of ADRP for byte_map_base
adinn at redhat.com
Mon Jan 11 16:23:32 UTC 2016
On 11/01/16 15:18, Andrew Haley wrote:
> The adrp() (address of page) assembler macro can reach anywhere in the
> 48-bit AArch64 address space. However, byte_map_base is not
> necessarily an address: it might even wrap around the address space so
> that it is a negative 64-bit constant. in that case, we should not use
> ADRP to form its address.
> While investigating this bug we discovered that the code stubs for
> C1's G1 pre- and post-barriers push the incorrect set of registers. We
> must include the call-clobbered vector registers too; they probably
> won't be used by the native runtime, but the ABI says that they may be
> so we must save them.
The patch looks good.
However, I am not clear how we arrive at the circumstance it is meant to
fix. How do we end up with a negative byte_map_base -- is that when we
have a zero-based heap? How do we get a circumstance where it is 'not
[necessarily] an address'?
If we do have a negative value with a zero-based heap then
load_byte_map_base calls mov_immediate64. Would it plant a single movz
and single movk in this case or will it require more than one movk?
More information about the hotspot-dev