defaults.h (LEGITIMATE_PIC_OPERAND_P): Provide default definition.
authorZack Weinberg <zack@codesourcery.com>
Tue, 3 Aug 2004 23:37:34 +0000 (23:37 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 3 Aug 2004 23:37:34 +0000 (23:37 +0000)
* defaults.h (LEGITIMATE_PIC_OPERAND_P): Provide default definition.
* recog.c (general_operand, immediate_operand, nonmemory_operand)
(asm_operand_ok): Remove #ifdefs on LEGITIMATE_PICOPERAND_P.
* regclass.c (record_reg_classes): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (reload): Likewise.

From-SVN: r85512

gcc/ChangeLog
gcc/defaults.h
gcc/recog.c
gcc/regclass.c
gcc/reload.c
gcc/reload1.c

index fb925f8c9c4d955f46f29ec4055897c3cf3bed39..be575fbe4c78e4aaa066352a705bc2862e4d564b 100644 (file)
@@ -1,3 +1,12 @@
+2004-08-03  Zack Weinberg  <zack@codesourcery.com>
+
+       * defaults.h (LEGITIMATE_PIC_OPERAND_P): Provide default definition.
+       * recog.c (general_operand, immediate_operand, nonmemory_operand)
+       (asm_operand_ok): Remove #ifdefs on LEGITIMATE_PICOPERAND_P.
+       * regclass.c (record_reg_classes): Likewise.
+       * reload.c (find_reloads): Likewise.
+       * reload1.c (reload): Likewise.
+
 2004-08-03  Zack Weinberg  <zack@codesourcery.com>
 
        * gensupport.c (init_md_reader_args_cb): Renamed from
index 763601c5f7ab16c12edd4389e8d7792c2ce5f0d2..cd45f9180ec5b500a741927f77a73cf3b7c10982 100644 (file)
@@ -768,6 +768,10 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
 #endif
 
+#ifndef LEGITIMATE_PIC_OPERAND_P
+#define LEGITIMATE_PIC_OPERAND_P(X) 1
+#endif
+
 #ifndef REVERSIBLE_CC_MODE
 #define REVERSIBLE_CC_MODE(MODE) 0
 #endif
index 82fb12ec429e74be56ca9ce4b627662033908657..12b0fbf68a15496c26933514ed56d782af4a62a1 100644 (file)
@@ -922,9 +922,7 @@ general_operand (rtx op, enum machine_mode mode)
   if (CONSTANT_P (op))
     return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode
             || mode == VOIDmode)
-#ifdef LEGITIMATE_PIC_OPERAND_P
            && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
            && LEGITIMATE_CONSTANT_P (op));
 
   /* Except for certain constants with VOIDmode, already checked for,
@@ -1102,9 +1100,7 @@ immediate_operand (rtx op, enum machine_mode mode)
   return (CONSTANT_P (op)
          && (GET_MODE (op) == mode || mode == VOIDmode
              || GET_MODE (op) == VOIDmode)
-#ifdef LEGITIMATE_PIC_OPERAND_P
          && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
          && LEGITIMATE_CONSTANT_P (op));
 }
 
@@ -1170,9 +1166,7 @@ nonmemory_operand (rtx op, enum machine_mode mode)
 
       return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode
               || mode == VOIDmode)
-#ifdef LEGITIMATE_PIC_OPERAND_P
              && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
              && LEGITIMATE_CONSTANT_P (op));
     }
 
@@ -1677,11 +1671,7 @@ asm_operand_ok (rtx op, const char *constraint)
          /* Fall through.  */
 
        case 'i':
-         if (CONSTANT_P (op)
-#ifdef LEGITIMATE_PIC_OPERAND_P
-             && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
-             )
+         if (CONSTANT_P (op) && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op)))
            result = 1;
          break;
 
index f341c39c2145609b76a2d22489be81c930bb2181..1f51af610c2f135f22113036bd683d6a4d9200c5 100644 (file)
@@ -1614,10 +1614,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
                    break;
                case 'i':
                  if (CONSTANT_P (op)
-#ifdef LEGITIMATE_PIC_OPERAND_P
-                     && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
-                     )
+                     && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op)))
                    win = 1;
                  break;
 
@@ -1648,10 +1645,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
                case 'g':
                  if (MEM_P (op)
                      || (CONSTANT_P (op)
-#ifdef LEGITIMATE_PIC_OPERAND_P
-                         && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
-#endif
-                         ))
+                         && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))))
                    win = 1;
                  allows_mem[i] = 1;
                case 'r':
index 4011f0f7a6122dd95accdb9d4bb1a84e3022cd38..0996511020455cd86cb84fa2e37777bf5a6ad5cd 100644 (file)
@@ -3228,10 +3228,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
                  break;
              case 'i':
                if (CONSTANT_P (operand)
-#ifdef LEGITIMATE_PIC_OPERAND_P
-                   && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (operand))
-#endif
-                   )
+                   && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (operand)))
                  win = 1;
                break;
 
@@ -3266,11 +3263,9 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
                    && GET_CODE (operand) != PLUS
                    /* A SCRATCH is not a valid operand.  */
                    && GET_CODE (operand) != SCRATCH
-#ifdef LEGITIMATE_PIC_OPERAND_P
                    && (! CONSTANT_P (operand)
                        || ! flag_pic
                        || LEGITIMATE_PIC_OPERAND_P (operand))
-#endif
                    && (GENERAL_REGS == ALL_REGS
                        || !REG_P (operand)
                        || (REGNO (operand) >= FIRST_PSEUDO_REGISTER
index 1fc55c33cfd5fdaee0062a8b576d925d2044ebec..3eb20b02ff80bedb030ac556938c06babf153aae 100644 (file)
@@ -734,16 +734,13 @@ reload (rtx first, int global)
        {
          rtx note = find_reg_note (insn, REG_EQUIV, NULL_RTX);
          if (note
-#ifdef LEGITIMATE_PIC_OPERAND_P
              && (! function_invariant_p (XEXP (note, 0))
                  || ! flag_pic
                  /* A function invariant is often CONSTANT_P but may
                     include a register.  We promise to only pass
                     CONSTANT_P objects to LEGITIMATE_PIC_OPERAND_P.  */
                  || (CONSTANT_P (XEXP (note, 0))
-                     && LEGITIMATE_PIC_OPERAND_P (XEXP (note, 0))))
-#endif
-             )
+                     && LEGITIMATE_PIC_OPERAND_P (XEXP (note, 0)))))
            {
              rtx x = XEXP (note, 0);
              i = REGNO (SET_DEST (set));