RFR: 8073093: AARCH64: C2 generates poor code for ByteBuffer accesses
aph at redhat.com
Mon Feb 16 09:38:29 UTC 2015
On 14/02/15 22:10, Dean Long wrote:
> On 2/14/2015 12:07 AM, Andrew Haley wrote:
>> On 02/13/2015 10:52 PM, Dean Long wrote:
>>> My understanding is that whether or not aarch64 allows unaligned
>>> accesses is based on a system setting, so this change is too
>> Disabling unaligned access would be a really perverse thing to do, and
>> I suspect that GCC and glibc already assume that unaligned accesses
>> work so it would require a recompilation of libjvm (and probably the
>> whole OS) to make it work. However, if you really think there's a
>> point to making this a runtime flag I won't resist.
> Even if linux-aarch64 always allows unaligned, checking only for
> "aarch64" is not future-proof because it doesn't take the OS into
Sure, but we can't predict all the crazy things that writers of future
operating systems might do.
> However, I really don't like having to enumerate all relevant
> platforms in multiple places in shared code, so I disagree with the
> existing code and with perpetuating the pattern. As long as the
> decision is in platform-specific code, a build-time decision may be
> entirely appropriate.
That makes sense. I don't like the way that the decision is hidden in
shared code either: if it had been in a more obvious place I would
have found it earlier. I'll have a look at writing an Unsafe method
which does the right thing.
More information about the hotspot-dev