RFR: JDK-8216437 : PPC64: Add intrinsic for GHASH algorithm [v20]
Martin Doerr
mdoerr at openjdk.org
Mon Feb 10 15:42:15 UTC 2025
On Mon, 10 Feb 2025 14:27:54 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 661:
>>
>>> 659: __ andi(temp1, data, 15);
>>> 660: __ cmpwi(CR0, temp1, 0);
>>> 661: __ beq(CR0, L_aligned); // Check if address is aligned (mask lower 4 bits)
>>
>> The alignment check should not be in the loop. Better check before and use 2 loops.
>> It would be interesting to know how often the data is aligned.
>
> You mean 1 loop for aligned address and one for unaligned ? Is there a way to write the common code of both in a function ?
Yes, you can move the common code into a static function and pass the masm, Registers, etc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20235#discussion_r1949356411
More information about the hotspot-dev
mailing list