JDK-8330094 : RISC-V: Save and restore FRM in the call stub
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: riscv
  • Submitted: 2024-04-11
  • Updated: 2024-05-05
  • Resolved: 2024-04-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 21 JDK 22 JDK 23
17.0.12Fixed 21.0.4Fixed 22.0.2Fixed 23 b20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
As discussed at https://github.com/openjdk/jdk/pull/17745#discussion_r1558783467, we should do the similar thing as JDK-8319973 on aarch64, difference is that we only need to save/restore frm rather than other bits in fcsr.
Comments
Fix Request (22u): Hi, The same issue also exists in jdk22u. So I would like to backport JDK-8330094 to jdk22u. With this change, we save and restore the default floating-point control state when we enter and leave Java code, ensuring that we are still Java compatible if we're called via the JNI invocation interface with a weird FP control state. RISC-V specific change, risk is low.
01-05-2024

Fix Request (21u): Hi, The same issue also exists in JDK21u. So I would like to backport JDK-8330094 to jdk21u-dev. With this change, we save and restore the default floating-point control state when we enter and leave Java code, ensuring that we are still Java compatible if we're called via the JNI invocation interface with a weird FP control state. RISC-V specific change, risk is low.
01-05-2024

Fix Request (17u): Hi, The same issue also exists in JDK17u. So I would like to backport JDK-8330094 to jdk17u-dev. With this change, we save and restore the default floating-point control state when we enter and leave Java code, ensuring that we are still Java compatible if we're called via the JNI invocation interface with a weird FP control state. RISC-V specific change, risk is low.
01-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22u/pull/174 Date: 2024-04-30 13:25:35 +0000
30-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2442 Date: 2024-04-30 13:10:18 +0000
30-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/545 Date: 2024-04-30 13:08:50 +0000
30-04-2024

Changeset: b0496096 Author: Hamlin Li <mli@openjdk.org> Date: 2024-04-18 11:13:10 +0000 URL: https://git.openjdk.org/jdk/commit/b0496096dc8d7dc7acf28aa006141a3ecea446de
18-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18758 Date: 2024-04-12 12:16:44 +0000
12-04-2024