RFR[15] JDK-8243114: Implement montgomery{Multiply, Square}intrinsics on Windows
Andrew Haley
aph at redhat.com
Mon Jun 22 09:00:01 UTC 2020
On 18/06/2020 19:33, Martin Balao wrote:
> * sharedRuntime_x86_64.cpp
> * L3685
> * Do we still need 'long long' type for 'i' and 'cnt' local variables?
No, but this is 64-bit-only code. And len is a long, so let's keep it.
> * L3724
> * The last argument of 'sub' has type 'int', while in the not-Windows
> variant is a long. Can we align this?
We should do that, yes. Better it be long everywhere.
> * L3729
> * Is it possible to directly store in a[i]? (instead of going through
> 'tmp')
I'm not sure this would add anything. In fact, I think this change would
make it harder to read.
> * I guess the compiler will easily optimize this, but we may still
> get rid of the 2nd line
> * I've seen in L3753 you directly store
>
> Note: it's a bit unfortunate that we don't have x86-64 inline assembly
> in CL to maintain the same logic, as there is nothing OS-specific here.
I think the problem is that MS never had a nice way to do inline
assembly in 32-bit C, so they just gave up altogether when they went
64-bit.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the security-dev
mailing list