RFR (XS) 8215354: x86_32 build failures after JDK-8214074 (Ghash optimization using AVX instructions)

Aleksey Shipilev shade at redhat.com
Thu Dec 13 13:40:48 UTC 2018


Bug:
 https://bugs.openjdk.java.net/browse/JDK-8215354

New methods are declared in _LP64 block. Their definitions should also be protected with _LP64,
otherwise x86_32 build fails. It is a separate question if those implementations should even be
supported on x86_32, and if the intent was to have them only in 64-bit variant.

Fix:

diff -r 6108789077bb src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp
--- a/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp    Thu Dec 13 14:10:00 2018 +0100
+++ b/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp    Thu Dec 13 14:33:33 2018 +0100
@@ -27,10 +27,11 @@
 #include "asm/assembler.hpp"
 #include "asm/assembler.inline.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "macroAssembler_x86.hpp"

+#ifdef _LP64
 // Multiply 128 x 128 bits, using 4 pclmulqdq operations
 void MacroAssembler::schoolbookAAD(int i, Register htbl, XMMRegister data,
     XMMRegister tmp0, XMMRegister tmp1, XMMRegister tmp2, XMMRegister tmp3) {
     movdqu(xmm15, Address(htbl, i * 16));
     vpclmulhqlqdq(tmp3, data, xmm15); // 0x01
@@ -317,6 +318,7 @@
     // zero out xmm registers used for Htbl storage
     vpxor(xmm0, xmm0, xmm0, Assembler::AVX_128bit);
     vpxor(xmm1, xmm1, xmm1, Assembler::AVX_128bit);
     vpxor(xmm3, xmm3, xmm3, Assembler::AVX_128bit);
     vpxor(xmm15, xmm15, xmm15, Assembler::AVX_128bit);
-}
\ No newline at end of file
+}
+#endif // _LP64


Testing: x86_32 build, x86_64 build

Thanks,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20181213/b52ed7b6/signature.asc>


More information about the hotspot-compiler-dev mailing list