RFR: 8319973: AArch64: Save and restore FPCR in the call stub
Andrew Haley
aph at openjdk.org
Mon Nov 20 16:40:51 UTC 2023
On Mon, 20 Nov 2023 15:37:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> On AArch64 we don't save and restore the default floating-point control state when we enter and leave Java code. We really should, because if we're called via the JNI invocation interface with a weird FP control state we'll not be Java compatible.
>
> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 145:
>
>> 143: // ...
>> 144: // -29 [ argument word 1 ]
>> 145: // -28 [ saved Floating-point Control Register ]
>
> Why the 1-word gap? Alignment?
Yes, exactly. AArch64 stack is 16-aligned, and this is enforced by hardware.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16637#discussion_r1399468749
More information about the hotspot-dev
mailing list