RFR(M): 8152172: PPC64: Support AES intrinsics

Doerr, Martin martin.doerr at sap.com
Tue Mar 22 17:03:38 UTC 2016

Hi Hiroshi,

thanks for implementing it. We have tested it. Looks good.

Can somebody from Oracle take a look at the shared part of the change, please?
We will need a sponsor from Oracle.

Best regards,

From: Hiroshi H Horii [mailto:HORII at jp.ibm.com]
Sent: Dienstag, 22. März 2016 16:47
To: hotspot-compiler-dev at openjdk.java.net
Cc: Doerr, Martin <martin.doerr at sap.com>; Tim Ellison <Tim_Ellison at uk.ibm.com>; Vladimir Kozlov <vladimir.kozlov at oracle.com>; Simonis, Volker <volker.simonis at sap.com>
Subject: RFR(M): 8152172: PPC64: Support AES intrinsics

Dear all:

Can I please request reviews for the following change?
This change was created for JDK 9 to enable POWER8's AES
instructions for AES calculation.

This request follows this discussion.

This change adds stub routines support for single-block AES
encryption and decryption operations on the POWER8 platform.
They are available only when the application is configured to
use SunJCE crypto provider on little endian.

These stubs make use of efficient hardware AES instructions
and thus offer significant performance improvements over
JITed code on POWER8 as on x86 and SPARC. AES stub routines
are enabled by default on POWER8 platforms that support AES
instructions (vcipher). They can be explicitly enabled or
disabled on the command-line using UseAES and
UseAESIntrinsics JVM flags. Unlike x86 and SPARC, vcipher
and vnchiper of POWER8 need the same round keys of AES.
Therefore, inline_aescrypt_Block in library_call.cpp calls the
stub with AESCrypt.sessionK[0] as round keys.

Summary of source code changes:

   - Adds support for vrld instruction to rotate vector register values
      with left doubleword.

   - Defines stubs for single-block AES encryption and decryption
      routines supporting all key sizes (128, 192 and 256-bit).
   - Current POWER AES decryption instructions are not compatible
      with SunJCE expanded decryption key format. Thus decryption
      stubs read the expanded encryption keys (sessionK[0]) with
      descendant order.
   - Encryption stubs use SunJCE expanded encryption key as their
      is no incompatibility issue between POWER8 AES encryption
      instructions and SunJCE expanded encryption keys.

   - Detects AES capabilities of the underlying CPU by using
   - Enables UseAES and UseAESIntrinsics flags if the underlying
      CPU supports AES instructions and neither of them is explicitly
      disabled on the command-line. Generate warning message if
      either of these flags are enabled on the command-line
      whereas the underlying CPU does not support AES instructions.

    - Passes the first input parameter, reference to sessionK[0] to the
       AES stubs only on the POWER platform.

    - Supports T_NARROWOOP type for GraphKit::load_array_element.

Bug: https://bugs.openjdk.java.net/browse/JDK-8152172
Webrev: http://cr.openjdk.java.net/~mdoerr/8152172_ppc64le_aes/webrev.00/

Hiroshi Horii,
IBM Research - Tokyo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160322/593c03aa/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list