cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to arg_pointer_rtx fixed if...
authorJeffrey A Law <law@cygnus.com>
Wed, 15 Sep 1999 04:05:38 +0000 (04:05 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 15 Sep 1999 04:05:38 +0000 (22:05 -0600)
        * cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to
        arg_pointer_rtx fixed if the argument pointer register is
        not fixed.
        (NONZERO_BASE_PLUS_P): Likewise.

From-SVN: r29425

gcc/ChangeLog
gcc/cse.c

index abb1094..d710b09 100644 (file)
@@ -1,3 +1,10 @@
+Tue Sep 14 21:47:06 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to
+       arg_pointer_rtx fixed if the argument pointer register is
+       not fixed.
+       (NONZERO_BASE_PLUS_P): Likewise.
+
 Tue Sep 14 20:26:02 1999  Richard Henderson  <rth@cygnus.com>
 
        * rtl.def (match_insn, match_insn2): Remove match_insn; rename
index 75952b0..4da61f8 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -596,13 +596,14 @@ struct cse_basic_block_data {
 
 #define FIXED_BASE_PLUS_P(X)                                   \
   ((X) == frame_pointer_rtx || (X) == hard_frame_pointer_rtx   \
-   || (X) == arg_pointer_rtx                                   \
+   || ((X) == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])\
    || (X) == virtual_stack_vars_rtx                            \
    || (X) == virtual_incoming_args_rtx                         \
    || (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == CONST_INT \
        && (XEXP (X, 0) == frame_pointer_rtx                    \
           || XEXP (X, 0) == hard_frame_pointer_rtx             \
-          || XEXP (X, 0) == arg_pointer_rtx                    \
+          || ((X) == arg_pointer_rtx                           \
+              && fixed_regs[ARG_POINTER_REGNUM])               \
           || XEXP (X, 0) == virtual_stack_vars_rtx             \
           || XEXP (X, 0) == virtual_incoming_args_rtx))        \
    || GET_CODE (X) == ADDRESSOF)
@@ -620,7 +621,8 @@ struct cse_basic_block_data {
    || (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == CONST_INT \
        && (XEXP (X, 0) == frame_pointer_rtx                    \
           || XEXP (X, 0) == hard_frame_pointer_rtx             \
-          || XEXP (X, 0) == arg_pointer_rtx                    \
+          || ((X) == arg_pointer_rtx                           \
+              && fixed_regs[ARG_POINTER_REGNUM])               \
           || XEXP (X, 0) == virtual_stack_vars_rtx             \
           || XEXP (X, 0) == virtual_incoming_args_rtx))        \
    || (X) == stack_pointer_rtx                                 \