OSDN Git Service

* config/pa/pa.h (PRINT_OPERAND_ADDRESS): Use gcc_assert, remove
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Apr 2005 16:48:18 +0000 (16:48 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Apr 2005 16:48:18 +0000 (16:48 +0000)
unnecessary noncanonical RTL handling.
* config/pa/pa64-linux.h (INITIAL_ELIMINATION_OFFSET): Use
gcc_assert and gcc_unreachable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98852 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa.h
gcc/config/pa/pa64-linux.h

index fdc72d2..01947cd 100644 (file)
@@ -1,5 +1,10 @@
 2005-04-27  Nathan Sidwell  <nathan@codesourcery.com>
 
+       * config/pa/pa.h (PRINT_OPERAND_ADDRESS): Use gcc_assert, remove
+       unnecessary noncanonical RTL handling.
+       * config/pa/pa64-linux.h (INITIAL_ELIMINATION_OFFSET): Use
+       gcc_assert and gcc_unreachable.
+
        * config/arm/arm.h (ARM_PRINT_OPERAND_ADDRESS): Use gcc_assert and
        gcc_unreachable as appropriate.
        (THUMB_PRINT_OPERAND_ADDRESS): Likewise.
index 0738b49..f94d531 100644 (file)
@@ -1870,22 +1870,16 @@ forget_section (void)                                                   \
 /* Print a memory address as an operand to reference that memory location.  */
 
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
-{ register rtx addr = ADDR;                                            \
-  register rtx base;                                                   \
-  int offset;                                                          \
+{ rtx addr = ADDR;                                                     \
   switch (GET_CODE (addr))                                             \
     {                                                                  \
     case REG:                                                          \
       fprintf (FILE, "0(%s)", reg_names [REGNO (addr)]);               \
       break;                                                           \
     case PLUS:                                                         \
-      if (GET_CODE (XEXP (addr, 0)) == CONST_INT)                      \
-       offset = INTVAL (XEXP (addr, 0)), base = XEXP (addr, 1);        \
-      else if (GET_CODE (XEXP (addr, 1)) == CONST_INT)                 \
-       offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0);        \
-      else                                                             \
-       abort ();                                                       \
-      fprintf (FILE, "%d(%s)", offset, reg_names [REGNO (base)]);      \
+      gcc_assert (GET_CODE (XEXP (addr, 1)) == CONST_INT);             \
+      fprintf (FILE, "%d(%s)", (int)INTVAL (XEXP (addr, 1)),           \
+              reg_names [REGNO (XEXP (addr, 0))]);                     \
       break;                                                           \
     case LO_SUM:                                                       \
       if (!symbolic_operand (XEXP (addr, 1), VOIDmode))                        \
index 5d7fdbe..908cb6c 100644 (file)
@@ -52,8 +52,7 @@ Boston, MA 02111-1307, USA.  */
          break;                                                \
        }                                                       \
                                                                \
-      if ((TO) != STACK_POINTER_REGNUM)                                \
-       abort ();                                               \
+      gcc_assert ((TO) == STACK_POINTER_REGNUM);               \
                                                                \
       switch (FROM)                                            \
        {                                                       \
@@ -66,7 +65,7 @@ Boston, MA 02111-1307, USA.  */
          break;                                                \
                                                                \
        default:                                                \
-         abort ();                                             \
+         gcc_unreachable ();                                   \
        }                                                       \
     } while (0)
 #endif