RFR: 8073093: AARCH64: C2 generates poor code for ByteBuffer accesses
christos at zoulas.com
Sat Feb 14 03:34:41 UTC 2015
On Feb 13, 4:29pm, vladimir.kozlov at oracle.com (Vladimir Kozlov) wrote:
-- Subject: Re: RFR: 8073093: AARCH64: C2 generates poor code for ByteBuffer
| On 2/13/15 4:22 PM, Dean Long wrote:
| > There is a system register bit to read, but I don't think it can be
| > accessed by an application, only the kernel.
| > If the OS won't provide this information, you could do something similar
| > to safeFetchN and catch the
| > resulting SIGBUS.
| Yes, I agree it could be done this way too.
| On x86 we trigger SEGV to verify that OS's signal handler correctly
| save/restore AVX registers so we can use them.
It is PSL_AC (0x40000) and it is accessible by applications. Now
if it works or not depends on the flavor of the x86... As I mentioned
before there are implementations (for example pre-arm-v6 flavors)
where unaligned accesses don't signal (but don't work). There is
an even 3rd category where unaligned accesses trap, but the kernel
can fix them if the binary is marked specially (sparc with misaligned
The "portable" to verify what's going on is to do the misaligned
access and see if it works (dealing with SIGBUS/SIGSEGV). Even
then (even when it works) you might not want to do it because of
performance reasons (for example when the kernel fixes it).
More information about the hotspot-dev