Enforcing data alignment for intrinsics

Bruno Alexandre Rosa bruno.rosa at eldorado.org.br
Wed Jan 25 11:37:28 UTC 2017


I came up with a solution for my problem: since I already have to copy the buffer locally to deal with endianness differences, I enforce the alignment of said copy instead of the original buffer.

Regards,
Bruno Rosa 

-----Original Message-----
From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Bruno Alexandre Rosa
Sent: sexta-feira, 20 de janeiro de 2017 16:44
To: hotspot-compiler-dev at openjdk.java.net
Subject: FW: Enforcing data alignment for intrinsics



-----Original Message-----
From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-bounces at openjdk.java.net] On Behalf Of Bruno Alexandre Rosa
Sent: sexta-feira, 20 de janeiro de 2017 16:43
To: compiler-dev at openjdk.java.net; ppc-aix-port-dev at openjdk.java.net
Subject: Enforcing data alignment for intrinsics

Hi all,

Currently I'm working on a patch to implement SHA2 intrinsics for ppc64 and came upon this issue: vector load instructions (lvx) assume that the data is 16bytes-aligned. It is possible to access unaligned data, but that requires more than just one instruction, incurring in a performance loss. 

Is it possible to enforce 16bytes alignment for the input buffer available to the intrinsics? If it is so, can someone give me pointers for making this change?

Regards,
Bruno Rosa


More information about the hotspot-compiler-dev mailing list