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

Martin Doerr mdoerr at openjdk.org
Wed Jan 8 20:51:40 UTC 2025


On Wed, 8 Jan 2025 17:41:22 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

>> src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 713:
>> 
>>> 711:   __ vxor(vTmp1, vTmp1, vTmp1);
>>> 712:   __ vxor(vZero, vZero, vZero);
>>> 713:   __ mtctr(blocks);
>> 
>> Can `blocks` be 0?
>> `blocks` is an int. The higher half of the register may possibly contain garbage and should be cleared. (Can be combined with 0 check if needed.)
>
> (https://github.com/openjdk/jdk/blob/a641932427cbe8453130593355372837d70a098f/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java#L281) In the java code, the 0 check is handled.

The C2 compiler replaces this Java code by the intrinsic.

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

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


More information about the hotspot-dev mailing list