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

Martin Doerr mdoerr at openjdk.org
Wed Jan 15 20:41:39 UTC 2025


On Thu, 9 Jan 2025 09:07:21 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:
> 
>   restore

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

> 678:   __ li(temp1, 0xc2);
> 679:   __ sldi(temp1, temp1, 56);
> 680:   __ vxor(vZero, vZero, vZero);

I think `vspltisb(vZero, 0);` would be better readable (and also avoid an unnecessary data dependency on a previous instruction using the same register).

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

> 679:   __ sldi(temp1, temp1, 56);
> 680:   __ vxor(vZero, vZero, vZero);
> 681:   // Load the vector from memory into vConstC2

This comment is not correct. It's not loaded from memory.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1917304528
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1917303293


More information about the hotspot-dev mailing list