JDK-8293323 : test case for f2hf and hf2f methods in sharedRuntime.cpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-09-02
  • Updated: 2022-09-27
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.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
Add IR framework test for the newly added nodes in addition to test cases for the newly added methods in sharedRuntime.cpp
Comments
We already have existing Java tests (jtreg tests) that test the Java implementation and the intrinsic implementation. It would be useful to leverage some or all of those tests to test the native implementations in sharedRuntime.cpp, rather than writing a gtest. The symbols of the f2hf and hf2f methods are not exported (appropriately), so we cannot use Panama to lookup those symbols and bind the native methods. However, perhaps there is a way to export those symbols using the WhiteBox API? If so we can still use Panama, but perhaps we use `SymbolLookup` implementation and/or a `Linker` implementation specific to HotSpot. I suspect this could generalize to other such methods (the intent is not to replace gtests, but in some cases leverage existing Java tests or writing tests in Java is very beneficial).
06-09-2022