mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-16 07:49:32 +08:00
bfin.c (bfin_delegitimize_address): New.
* config/bfin/bfin.c (bfin_delegitimize_address): New. (TARGET_DELEGITIMIZE_ADDRESS): Define. From-SVN: r114269
This commit is contained in:
parent
5c3c36836e
commit
54aefc3672
@ -1,3 +1,8 @@
|
||||
2006-05-31 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* config/bfin/bfin.c (bfin_delegitimize_address): New.
|
||||
(TARGET_DELEGITIMIZE_ADDRESS): Define.
|
||||
|
||||
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* Makefile.in (CATALOGS): Add po/ prefix.
|
||||
|
@ -1030,6 +1030,25 @@ legitimize_address (rtx x ATTRIBUTE_UNUSED, rtx oldx ATTRIBUTE_UNUSED,
|
||||
return NULL_RTX;
|
||||
}
|
||||
|
||||
static rtx
|
||||
bfin_delegitimize_address (rtx orig_x)
|
||||
{
|
||||
rtx x = orig_x, y;
|
||||
|
||||
if (GET_CODE (x) != MEM)
|
||||
return orig_x;
|
||||
|
||||
x = XEXP (x, 0);
|
||||
if (GET_CODE (x) == PLUS
|
||||
&& GET_CODE (XEXP (x, 1)) == UNSPEC
|
||||
&& XINT (XEXP (x, 1), 1) == UNSPEC_MOVE_PIC
|
||||
&& GET_CODE (XEXP (x, 0)) == REG
|
||||
&& REGNO (XEXP (x, 0)) == PIC_OFFSET_TABLE_REGNUM)
|
||||
return XVECEXP (XEXP (x, 1), 0, 0);
|
||||
|
||||
return orig_x;
|
||||
}
|
||||
|
||||
/* This predicate is used to compute the length of a load/store insn.
|
||||
OP is a MEM rtx, we return nonzero if its addressing mode requires a
|
||||
32 bit instruction. */
|
||||
@ -3643,4 +3662,7 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
|
||||
#undef TARGET_SECONDARY_RELOAD
|
||||
#define TARGET_SECONDARY_RELOAD bfin_secondary_reload
|
||||
|
||||
#undef TARGET_DELEGITIMIZE_ADDRESS
|
||||
#define TARGET_DELEGITIMIZE_ADDRESS bfin_delegitimize_address
|
||||
|
||||
struct gcc_target targetm = TARGET_INITIALIZER;
|
||||
|
Loading…
Reference in New Issue
Block a user