RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]
Vladimir Ivanov
vlivanov at openjdk.org
Tue Nov 15 00:51:07 UTC 2022
On Tue, 15 Nov 2022 00:25:46 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> src/hotspot/cpu/x86/stubGenerator_x86_64_poly.cpp line 387:
>>
>>> 385: const Register t2 = r14;
>>> 386:
>>> 387: __ movq(a0, Address(limbs, 0));
>>
>> I don't understand how it works. `limbs` comes directly from `c_rarg2` and contains raw oop. So, `Address(limbs, 0)` reads object mark word rather than the first element from the array.
>>
>> (Same situation in `poly1305_limbs_out`. And now I'm curious why doesn't object header corruption trigger a crash.)
>
> library_call.cpp takes care of that, it passes the address of 0'th element to the stub.
Ah, got it. Worth elaborating that in the comments. Otherwise, they confuse rather than help:
// void processBlocks(byte[] input, int len, int[5] a, int[5] r)
const Register input = rdi; //input+offset
const Register length = rbx;
const Register accumulator = rcx;
const Register R = r8;
-------------
PR: https://git.openjdk.org/jdk/pull/10582
More information about the hotspot-dev
mailing list