]> gcc.gnu.org Git - gcc.git/commitdiff
c4x.c (c4x_check_legit_addr): Rename to c4x_legitimate_address_p.
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>
Mon, 26 Jan 2004 00:12:05 +0000 (00:12 +0000)
committerMichael Hayes <m.hayes@gcc.gnu.org>
Mon, 26 Jan 2004 00:12:05 +0000 (00:12 +0000)
* config/c4x/c4x.c (c4x_check_legit_addr): Rename to
c4x_legitimate_address_p.  Fix post_modify check.
* config/c4x/c4x-protos.h (c4x_check_legit_addr): Adjust.
* config/c4x/c4x.h (c4x_check_legit_addr): Adjust.

From-SVN: r76601

gcc/ChangeLog
gcc/config/c4x/c4x-protos.h
gcc/config/c4x/c4x.c
gcc/config/c4x/c4x.h

index 5d2e8167f2d26f14b8b01e2377f99faebf39f30c..ef3ac21dd678cebb3a4d6af5320d4ed9798ea55e 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-26  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+
+       * config/c4x/c4x.c (c4x_check_legit_addr): Rename to
+       c4x_legitimate_address_p.  Fix post_modify check.
+       * config/c4x/c4x-protos.h (c4x_check_legit_addr): Adjust.
+       * config/c4x/c4x.h (c4x_check_legit_addr): Adjust.
+       
 2004-01-25  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/pa/pa-protos.h: Remove the prototype for
@@ -27,7 +34,7 @@
        (PROMOTE_PROTOTYPES): Remove.
 
 2004-01-26  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+       
         * config/c4x/c4x.h (LEGITIMIZE_RELOAD_ADDRESS):  Handle symref.
  
 2003-04-25  Chris Demetriou  <cgd@broadcom.com>
index 36bf96164c18803bc461dee651aa1323a6cb0e70..19ee2d733ed64d2efb665c041f29eb83a86cef10 100644 (file)
@@ -68,7 +68,7 @@ extern void c4x_init_builtins (void);
 #ifdef RTX_CODE
 extern struct rtx_def *c4x_gen_compare_reg (enum rtx_code, rtx, rtx);
 
-extern int c4x_check_legit_addr (enum machine_mode, rtx, int);
+extern int c4x_legitimate_address_p (enum machine_mode, rtx, int);
 
 extern int c4x_hard_regno_mode_ok (unsigned int, enum machine_mode);
 
index 28e13359f940021027d4563b809685c4840a6b9b..2c46ec1341e0f99c7bcc52b3021f3dbe3fb50f64 100644 (file)
@@ -1432,7 +1432,7 @@ c4x_emit_libcall_mulhi (rtx libcall, enum rtx_code code,
 
 
 int
-c4x_check_legit_addr (enum machine_mode mode, rtx addr, int strict)
+c4x_legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
 {
   rtx base = NULL_RTX;         /* Base register (AR0-AR7).  */
   rtx indx = NULL_RTX;         /* Index register (IR0,IR1).  */
@@ -1471,7 +1471,9 @@ c4x_check_legit_addr (enum machine_mode mode, rtx addr, int strict)
            || (GET_CODE (op1) != PLUS && GET_CODE (op1) != MINUS))
          return 0;
        base = XEXP (op1, 0);
-       if (base != op0)
+       if (! REG_P (base))
+           return 0;
+       if (REGNO (base) != REGNO (op0))
          return 0;
        if (REG_P (XEXP (op1, 1)))
          indx = XEXP (op1, 1);
index ca82dd8121681503a6fde520bfaa5815f565dfe6..8ee98a47cc3ff0f31bf01a8a788b3317d67495f7 100644 (file)
@@ -1259,7 +1259,7 @@ CUMULATIVE_ARGS;
 
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                                \
 {                                                                      \
-  if (c4x_check_legit_addr (MODE, X, 0))                               \
+  if (c4x_legitimate_address_p (MODE, X, 0))                           \
     goto ADDR;                                                         \
 }
 
@@ -1275,7 +1275,7 @@ CUMULATIVE_ARGS;
 
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                                \
 {                                                                      \
-  if (c4x_check_legit_addr (MODE, X, 1))                               \
+  if (c4x_legitimate_address_p (MODE, X, 1))                           \
     goto ADDR;                                                         \
 }
 
This page took 0.069812 seconds and 5 git commands to generate.