mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8212043: Add floating-point Math.min/max intrinsics
Floating-point Math.min() and Math.max() intrinsics are enabled on AArch64 platform Reviewed-by: adinn, aph
This commit is contained in:
parent
8b6b63b38b
commit
556d79b518
14 changed files with 214 additions and 1 deletions
|
@ -1460,6 +1460,7 @@ public final class Math {
|
|||
* @param b another argument.
|
||||
* @return the larger of {@code a} and {@code b}.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static float max(float a, float b) {
|
||||
if (a != a)
|
||||
return a; // a is NaN
|
||||
|
@ -1486,6 +1487,7 @@ public final class Math {
|
|||
* @param b another argument.
|
||||
* @return the larger of {@code a} and {@code b}.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static double max(double a, double b) {
|
||||
if (a != a)
|
||||
return a; // a is NaN
|
||||
|
@ -1541,6 +1543,7 @@ public final class Math {
|
|||
* @param b another argument.
|
||||
* @return the smaller of {@code a} and {@code b}.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static float min(float a, float b) {
|
||||
if (a != a)
|
||||
return a; // a is NaN
|
||||
|
@ -1567,6 +1570,7 @@ public final class Math {
|
|||
* @param b another argument.
|
||||
* @return the smaller of {@code a} and {@code b}.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static double min(double a, double b) {
|
||||
if (a != a)
|
||||
return a; // a is NaN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue