From: Michael Hayes Date: Mon, 26 Jan 2004 00:12:05 +0000 (+0000) Subject: c4x.c (c4x_check_legit_addr): Rename to c4x_legitimate_address_p. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e903c616ecfe423377daf798b1213700d0e27b9;p=platform%2Fupstream%2Fgcc.git c4x.c (c4x_check_legit_addr): Rename to c4x_legitimate_address_p. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d2e816..ef3ac21 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-26 Michael Hayes + + * 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 * config/pa/pa-protos.h: Remove the prototype for @@ -27,7 +34,7 @@ (PROMOTE_PROTOTYPES): Remove. 2004-01-26 Michael Hayes - + * config/c4x/c4x.h (LEGITIMIZE_RELOAD_ADDRESS): Handle symref. 2003-04-25 Chris Demetriou diff --git a/gcc/config/c4x/c4x-protos.h b/gcc/config/c4x/c4x-protos.h index 36bf961..19ee2d7 100644 --- a/gcc/config/c4x/c4x-protos.h +++ b/gcc/config/c4x/c4x-protos.h @@ -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); diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 28e1335..2c46ec1 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -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); diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h index ca82dd8..8ee98a4 100644 --- a/gcc/config/c4x/c4x.h +++ b/gcc/config/c4x/c4x.h @@ -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; \ }