RFR: 8280457: Duplicate implementation of dprecision_rounding and dstore_rounding [v2]

Aleksey Shipilev shade at openjdk.java.net
Mon Jan 24 09:32:04 UTC 2022


On Mon, 24 Jan 2022 02:33:57 GMT, Jie Fu <jiefu at openjdk.org> wrote:

>> src/hotspot/share/opto/graphKit.hpp line 790:
>> 
>>> 788:   Node* precision_rounding(Node* n);
>>> 789: 
>>> 790:   // rounding for strict double precision conformance
>> 
>> Isn't the reference to "strict" here and in the cpp file no longer applicable?
>
>> Isn't the reference to "strict" here and in the cpp file no longer applicable?
> 
> 
>   // Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
> #ifdef _LP64
>   static const bool strict_fp_requires_explicit_rounding = false;
> #else
>   static const bool strict_fp_requires_explicit_rounding = true;
> #endif
> 
> It seems that only x86_32 needs explicit rounding for strict_fp operations.

Yup, "strict" is still meaningful on x86_32 FPU. It might be confusing due to fact that JDK 17 is now strictfp-by-default, but rounding to support strictfp is still needed for some awkward arches.

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

PR: https://git.openjdk.java.net/jdk/pull/7176


More information about the hotspot-compiler-dev mailing list