On Fri, 4 Jun 2021 23:49:31 GMT, Smita Kamath <[email protected]> wrote:
>> I would like to submit AES-GCM optimization for x86_64 architectures
>> supporting AVX3+VAES (Evex encoded AES). This optimization interleaves AES
>> and GHASH operations.
>> Performance gain of ~1.5x - 2x for message sizes 8k and above.
>
> Smita Kamath has updated the pull request incrementally with one additional
> commit since the last revision:
>
> 8267125:Updated intrinsic signature to remove copies of counter, state and
> subkeyHtbl
Do you plan to implement `decrypt` intrinsic too?
src/hotspot/share/opto/library_call.cpp line 547:
> 545:
> 546: case vmIntrinsics::_galoisCounterMode_AESCrypt:
> 547: return inline_galoisCounterMode_AESCrypt(intrinsic_id());
You don't need to pass `intrinsic_id()` for this implementation unless you plan
to add decrypt intrinsic later.
src/hotspot/share/opto/library_call.cpp line 6545:
> 6543: top_out != NULL && top_out->klass() != NULL, "args are
> strange");
> 6544:
> 6545: // checks are the responsibility of the caller
Do you have all NULL for all objects and range checks in Java code for this
intrinsic?
src/hotspot/share/opto/library_call.cpp line 6564:
> 6562: Node* subkeyHtbl = load_field_from_object(ghash_object, "subkeyHtbl",
> "[J");
> 6563: Node* state = load_field_from_object(ghash_object, "state", "[J");
> 6564: if (embeddedCipherObj == NULL || counter == NULL || subkeyHtbl ==
> NULL || state == NULL) return false;
Follow coding style for such long condition:
if () {
return false;
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/4019