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:
Jie Zhang 2006-05-31 15:42:22 +00:00 committed by Jie Zhang
parent 5c3c36836e
commit 54aefc3672
2 changed files with 27 additions and 0 deletions

View File

@ -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.

View File

@ -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;