Support for AES on ppc64le
vladimir.kozlov at oracle.com
Mon Mar 14 20:24:49 UTC 2016
About library_call.cpp changes.
You don't need GraphKit::
And you can use load_array_element() instead:
Node* objAESCryptKey = load_array_element(control(), objSessionK,
You may need additional check and cast because next expression expects
the objAESCryptKey points to int:
Node* k_start = array_element_address(objAESCryptKey, intcon(0), T_INT);
On 3/14/16 9:34 AM, Hiroshi H Horii wrote:
> Dear all:
> Can I please request reviews for the following change?
> This change was created for JDK 9.
> 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
> 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 as round keys.
> Summary of source code changes:
> - Adds support for vrld instruction to rotate vector register values
> left doubleword.
> - Defines stubs for single-block AES encryption and decryption routines
> supporting all key sizes (128-bit, 192-bit 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) 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 has_vcipher().
> - 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
> AES instructions.
> - Passes the first input parameter, reference to sessionK to the
> AES stubs
> only on the POWER platform.
> Code change:
> Please see an attached diff file that was generated with "hg diff
> -g" under
> the latest hotspot directory.
> Passed tests:
> jtreg compiler/codegen/7184394/
> jtreg compiler/cpuflags/ (after removing @ignored annotation)
> * This is my first post of a change. I'm sorry in advance if I don't
> follow the
> community manners.
> * I wrote this description based on the follows.
> Hiroshi Horii,
> IBM Research - Tokyo
More information about the hotspot-compiler-dev