sched-vis.c (print_value): Use CONST_DOUBLE_LOW and CONST_DOUBLE_HIGH.
authorDavid S. Miller <davem@davemloft.net>
Sat, 23 Apr 2005 00:33:44 +0000 (00:33 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Sat, 23 Apr 2005 00:33:44 +0000 (17:33 -0700)
* sched-vis.c (print_value): Use CONST_DOUBLE_LOW and
CONST_DOUBLE_HIGH.
* config/sparc/sparc.c (sparc_rtx_costs): Likewise, and
fix check on CONST_DOUBLE mode.  It should be VOIDmode
when it is representing an integer.

From-SVN: r98596

gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/sched-vis.c

index f29d6a2fa1c68dcacfb9902f72dd56a0ecaeabc8..65268c14cca04ebb7656bbb45345eb8cc86ee7c9 100644 (file)
@@ -1,3 +1,11 @@
+2005-04-22  David S. Miller  <davem@davemloft.net>
+
+       * sched-vis.c (print_value): Use CONST_DOUBLE_LOW and
+       CONST_DOUBLE_HIGH.
+       * config/sparc/sparc.c (sparc_rtx_costs): Likewise, and
+       fix check on CONST_DOUBLE mode.  It should be VOIDmode
+       when it is representing an integer.
+
 2005-04-22  Nathan Sidwell  <nathan@codesourcery.com>
 
        * builtins.c (gimplify_va_arg_expr): Reword comments to avoid
index 8e2893d4cd3e9ba30fbc4e3127ed3cf1391f7922..1349cc79432fa5212f8a2cb4ac58fb32e9c24b4a 100644 (file)
@@ -7897,12 +7897,12 @@ sparc_rtx_costs (rtx x, int code, int outer_code, int *total)
       return true;
 
     case CONST_DOUBLE:
-      if (GET_MODE (x) == DImode
-         && ((XINT (x, 3) == 0
-              && (unsigned HOST_WIDE_INT) XINT (x, 2) < 0x1000)
-             || (XINT (x, 3) == -1
-                 && XINT (x, 2) < 0
-                 && XINT (x, 2) >= -0x1000)))
+      if (GET_MODE (x) == VOIDmode
+         && ((CONST_DOUBLE_HIGH (x) == 0
+              && CONST_DOUBLE_LOW (x) < 0x1000)
+             || (CONST_DOUBLE_HIGH (x) == -1
+                 && CONST_DOUBLE_LOW (x) < 0
+                 && CONST_DOUBLE_LOW (x) >= -0x1000)))
        *total = 0;
       else
        *total = 8;
@@ -7960,11 +7960,11 @@ sparc_rtx_costs (rtx x, int code, int outer_code, int *total)
                    nbits++;
                }
              else if (GET_CODE (XEXP (x, 1)) == CONST_DOUBLE
-                      && GET_MODE (XEXP (x, 1)) == DImode)
+                      && GET_MODE (XEXP (x, 1)) == VOIDmode)
                {
                  rtx x1 = XEXP (x, 1);
-                 unsigned HOST_WIDE_INT value1 = XINT (x1, 2);
-                 unsigned HOST_WIDE_INT value2 = XINT (x1, 3);
+                 unsigned HOST_WIDE_INT value1 = CONST_DOUBLE_LOW (x1);
+                 unsigned HOST_WIDE_INT value2 = CONST_DOUBLE_HIGH (x1);
 
                  for (nbits = 0; value1 != 0; value1 &= value1 - 1)
                    nbits++;
index aa228317ba08dfbe241e6a768226a34458eb875a..8920fb6a32085e9cb3d69ad21b0ca58bdbbdbff3 100644 (file)
@@ -435,7 +435,7 @@ print_value (char *buf, rtx x, int verbose)
       if (FLOAT_MODE_P (GET_MODE (x)))
        real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1);
       else
-       sprintf (t, "<0x%lx,0x%lx>", (long) XWINT (x, 2), (long) XWINT (x, 3));
+       sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x));
       cur = safe_concat (buf, cur, t);
       break;
     case CONST_STRING: