RFR: JDK-8216437 : PPC64: Add intrinsic for GHASH algorithm [v19]
Martin Doerr
mdoerr at openjdk.org
Wed Feb 5 14:46:21 UTC 2025
On Wed, 5 Feb 2025 08:38:58 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> JBS Issue : [JDK-8216437](https://bugs.openjdk.org/browse/JDK-8216437)
>>
>> Currently acceleration code for GHASH is missing for PPC64.
>>
>> The current implementation utlilises SIMD instructions on Power and uses Karatsuba multiplication for obtaining the final result.
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>
> adapt Condition registers
Changes requested by mdoerr (Reviewer).
src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 626:
> 624: #ifdef ASSERT
> 625: __ cmpwi(CR0, blocks, 0);
> 626: __ beq(CR0, L_error);
I suggest using `asm_assert_eq` which is more simple. You can get rid of the Label and the extra code at the end, too.
src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 655:
> 653: // https://web.archive.org/web/20110609115824/https://software.intel.com/file/24918
> 654: //
> 655: Label loop;
Please try if aligning the loop entry improves performance. I'd insert `__ align(32);` here.
src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 5085:
> 5083: StubRoutines::_data_cache_writeback = generate_data_cache_writeback();
> 5084: StubRoutines::_data_cache_writeback_sync = generate_data_cache_writeback_sync();
> 5085: }
Please add an empty line.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 284:
> 282: // The AES intrinsic stubs require AES instruction support.
> 283: if (has_vcipher()) {
> 284: if (FLAG_IS_DEFAULT(UseAES)) {
Please revert this change.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20235#pullrequestreview-2595990712
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1943067976
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1943070142
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1943071278
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1943071762
More information about the hotspot-dev
mailing list