RFR: JDK-8216437 : PPC64: Add intrinsic for GHASH algorithm [v22]

Martin Doerr mdoerr at openjdk.org
Tue Feb 11 10:55:15 UTC 2025


On Tue, 11 Feb 2025 07:15:27 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 two additional commits since the last revision:
> 
>  - common code function
>  - common code function

src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 692:

> 690:   __ b(L_unaligned_loop);
> 691:   __ bind(L_aligned_loop);
> 692:     __ vspltisb(vZero, 0);

This can be moved out of the loop, now. It's no longer modified in the loop.

src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 703:

> 701:     __ lvx(vHigh, temp1, data);
> 702:     __ addi(data, data, 16);
> 703:     __ lvx(vLow, temp1, data);

2 loads in the loop can be avoided by loading once before the loop and keeping the previous 16 Bytes in a register.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1950624036
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1950626325


More information about the hotspot-dev mailing list