< prev index next >

src/java.base/share/classes/java/lang/Math.java

Print this page
rev 52233 : 8212043: Add floating-point Math.min/max intrinsics
Summary: Floating-point Math.min() and Math.max() intrinsics are enabled on AArch64 platform
Reviewed-by: duke

@@ -1458,10 +1458,11 @@
      *
      * @param   a   an argument.
      * @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
         if ((a == 0.0f) &&
             (b == 0.0f) &&

@@ -1484,10 +1485,11 @@
      *
      * @param   a   an argument.
      * @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
         if ((a == 0.0d) &&
             (b == 0.0d) &&

@@ -1539,10 +1541,11 @@
      *
      * @param   a   an argument.
      * @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
         if ((a == 0.0f) &&
             (b == 0.0f) &&

@@ -1565,10 +1568,11 @@
      *
      * @param   a   an argument.
      * @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
         if ((a == 0.0d) &&
             (b == 0.0d) &&
< prev index next >