On Tue, 17 Oct 2023 02:15:45 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Comments only.
>>  - Review feedback
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 5169:
> 
>> 5167:       // Perform a little arithmetic to make sure that denormal
>> 5168:       // numbers are handled correctly, i.e. that the "Denormals Are
>> 5169:       // Zeros" flag has not been set.
> 
> I don't understand what this part is doing. I thought it was simply checking 
> so you could log/warn if the unexpected mode was detected. But it seems to 
> cause MXCSR to not be restored when there is an issue, where I would expect 
> you would always want to restore to overwrite the invalid mode the JNI call 
> made. ??

If we reach `FAIL`, MXCSR is reloaded from `addr_mxcsr_std()`, restoring 
correct IEEE behaviour. That's what RestoreMXCSROnJNICalls is supposed to do, 
as far as I can tell.

But I will take this part out, because there are other flags in MXCSR, so there 
is a potential compatibility problem if e.g. the Precision Mask were set in a 
JNI call.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10661#discussion_r1361920261

Reply via email to