]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/arm/arm.c
Merge from trunk.
[thirdparty/gcc.git] / gcc / config / arm / arm.c
index e8b5f8376ec9c55975570cc1fc043bf82abc5185..12934233a480b04642daafb71b6578afe54a808a 100644 (file)
@@ -4746,9 +4746,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
                      - tree_to_uhwi (TYPE_MIN_VALUE (index)));
 
        /* There must be no padding.  */
-       if (!tree_fits_uhwi_p (TYPE_SIZE (type))
-           || ((HOST_WIDE_INT) tree_to_uhwi (TYPE_SIZE (type))
-               != count * GET_MODE_BITSIZE (*modep)))
+       if (wi::ne_p (TYPE_SIZE (type), count * GET_MODE_BITSIZE (*modep)))
          return -1;
 
        return count;
@@ -4776,9 +4774,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
          }
 
        /* There must be no padding.  */
-       if (!tree_fits_uhwi_p (TYPE_SIZE (type))
-           || ((HOST_WIDE_INT) tree_to_uhwi (TYPE_SIZE (type))
-               != count * GET_MODE_BITSIZE (*modep)))
+       if (wi::ne_p (TYPE_SIZE (type), count * GET_MODE_BITSIZE (*modep)))
          return -1;
 
        return count;
@@ -4808,9 +4804,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
          }
 
        /* There must be no padding.  */
-       if (!tree_fits_uhwi_p (TYPE_SIZE (type))
-           || ((HOST_WIDE_INT) tree_to_uhwi (TYPE_SIZE (type))
-               != count * GET_MODE_BITSIZE (*modep)))
+       if (wi::ne_p (TYPE_SIZE (type), count * GET_MODE_BITSIZE (*modep)))
          return -1;
 
        return count;
@@ -11404,8 +11398,8 @@ vfp3_const_double_index (rtx x)
   int sign, exponent;
   unsigned HOST_WIDE_INT mantissa, mant_hi;
   unsigned HOST_WIDE_INT mask;
-  HOST_WIDE_INT m1, m2;
   int point_pos = 2 * HOST_BITS_PER_WIDE_INT - 1;
+  bool fail;
 
   if (!TARGET_VFP3 || !CONST_DOUBLE_P (x))
     return -1;
@@ -11425,9 +11419,9 @@ vfp3_const_double_index (rtx x)
      WARNING: If there's ever a VFP version which uses more than 2 * H_W_I - 1
      bits for the mantissa, this may fail (low bits would be lost).  */
   real_ldexp (&m, &r, point_pos - exponent);
-  REAL_VALUE_TO_INT (&m1, &m2, m);
-  mantissa = m1;
-  mant_hi = m2;
+  wide_int w = real_to_integer (&m, &fail, HOST_BITS_PER_WIDE_INT * 2);
+  mantissa = w.elt (0);
+  mant_hi = w.elt (1);
 
   /* If there are bits set in the low part of the mantissa, we can't
      represent this value.  */