On 2/13/2015 3:04 PM, chris...@zoulas.com wrote:
On Feb 13, 2:52pm, dean.l...@oracle.com (Dean Long) wrote:
-- Subject: Re: RFR: 8073093: AARCH64: C2 generates poor code for ByteBuffer
| My understanding is that whether or not aarch64 allows unaligned=20
| accesses is based on a
| system setting, so this change is too simplistic. I would prefer that=20
| this was controlled with
| something more flexible, like "sun.cpu.unaligned".
So does x86_64 and you can ask the CPU if it is enabled... I am not sure
if a variable setting makes sense because if alignment is required you
get a signal (BUS error -- hi linux, SEGV), or incorrect results.
christos
So it sounds like we need to determine if unaligned accesses are
supported during startup,
in a platform-specific way. This could be exposed through a property
like I suggested,
or perhaps a new Unsafe method.
Regarding x86_64, there may be places in the JVM that already assume
unaligned accesses
are allowed, so disabling them may completely break the JVM until those
assumptions
are fixed.
dl