c4x-protos.h (c4x_legitimize_reload_address): Remove.
* c4x-protos.h (c4x_legitimize_reload_address): Remove. * c4x.c (c4x_legitimize_reload_address): Remove. * c4x.h (LEGITIMIZE_RELOAD_ADDRESS): Rewrite to generate correct reload address for ldp(k) insn. From-SVN: r39194
This commit is contained in:
parent
2caa0ddfc9
commit
eb253d90de
4 changed files with 54 additions and 38 deletions
|
@ -1,3 +1,10 @@
|
|||
2001-01-23 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
|
||||
|
||||
* c4x-protos.h (c4x_legitimize_reload_address): Remove.
|
||||
* c4x.c (c4x_legitimize_reload_address): Remove.
|
||||
* c4x.h (LEGITIMIZE_RELOAD_ADDRESS): Rewrite to generate correct
|
||||
reload address for ldp(k) insn.
|
||||
|
||||
Mon Jan 22 20:53:47 2001 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* pa.md (return_internal): Add a USE of the PIC register to ensure
|
||||
|
|
|
@ -91,8 +91,6 @@ extern int c4x_hard_regno_mode_ok PARAMS ((unsigned int, enum machine_mode));
|
|||
extern struct rtx_def *c4x_legitimize_address PARAMS ((rtx,
|
||||
enum machine_mode));
|
||||
|
||||
extern struct rtx_def *c4x_legitimize_reload_address PARAMS ((rtx, enum machine_mode, rtx));
|
||||
|
||||
extern int c4x_address_cost PARAMS ((rtx));
|
||||
|
||||
extern void c4x_print_operand PARAMS ((FILE *, rtx, int));
|
||||
|
|
|
@ -1679,32 +1679,6 @@ c4x_legitimize_address (orig, mode)
|
|||
}
|
||||
|
||||
|
||||
rtx
|
||||
c4x_legitimize_reload_address (orig, mode, insn)
|
||||
rtx orig ATTRIBUTE_UNUSED;
|
||||
enum machine_mode mode;
|
||||
rtx insn;
|
||||
{
|
||||
if (mode != HImode
|
||||
&& mode != HFmode
|
||||
&& GET_MODE (orig) != HImode
|
||||
&& GET_MODE (orig) != HFmode
|
||||
&& (GET_CODE (orig) == CONST
|
||||
|| GET_CODE (orig) == SYMBOL_REF
|
||||
|| GET_CODE (orig) == LABEL_REF))
|
||||
{
|
||||
rtx dp_reg = gen_rtx_REG (Pmode, DP_REGNO);
|
||||
if (! TARGET_SMALL)
|
||||
emit_insn_before (gen_rtx_SET (VOIDmode, dp_reg,
|
||||
gen_rtx_HIGH (Pmode, orig)),
|
||||
insn);
|
||||
return gen_rtx_LO_SUM (Pmode, dp_reg, orig);
|
||||
}
|
||||
|
||||
return NULL_RTX;
|
||||
}
|
||||
|
||||
|
||||
/* Provide the costs of an addressing mode that contains ADDR.
|
||||
If ADDR is not a valid address, its cost is irrelevant.
|
||||
This is used in cse and loop optimisation to determine
|
||||
|
|
|
@ -1705,18 +1705,55 @@ CUMULATIVE_ARGS;
|
|||
|
||||
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \
|
||||
{ \
|
||||
rtx new; \
|
||||
new = c4x_legitimize_reload_address (X, MODE, insn); \
|
||||
if (new != NULL_RTX) \
|
||||
{ \
|
||||
(X) = new; \
|
||||
/* We do not have to call push_reload because we do not require \
|
||||
any more reloads. */ \
|
||||
goto WIN; \
|
||||
} \
|
||||
if (MODE != HImode \
|
||||
&& MODE != HFmode \
|
||||
&& GET_MODE (X) != HImode \
|
||||
&& GET_MODE (X) != HFmode \
|
||||
&& (GET_CODE (X) == CONST \
|
||||
|| GET_CODE (X) == SYMBOL_REF \
|
||||
|| GET_CODE (X) == LABEL_REF)) \
|
||||
{ \
|
||||
if (! TARGET_SMALL) \
|
||||
{ \
|
||||
int i; \
|
||||
X = gen_rtx_LO_SUM (GET_MODE (X), \
|
||||
gen_rtx_HIGH (GET_MODE (X), X), X); \
|
||||
i = push_reload (XEXP (X, 0), NULL_RTX, \
|
||||
&XEXP (X, 0), NULL_PTR, \
|
||||
DP_REG, GET_MODE (X), VOIDmode, 0, 0, \
|
||||
OPNUM, TYPE); \
|
||||
/* The only valid reg is DP. This is a fixed reg and will \
|
||||
normally not be used so force it. */ \
|
||||
rld[i].reg_rtx = gen_rtx_REG (Pmode, DP_REGNO); \
|
||||
rld[i].nocombine = 1; \
|
||||
} \
|
||||
goto WIN; \
|
||||
} \
|
||||
else if (MODE != HImode \
|
||||
&& MODE != HFmode \
|
||||
&& GET_MODE (X) != HImode \
|
||||
&& GET_MODE (X) != HFmode \
|
||||
&& GET_CODE (X) == LO_SUM \
|
||||
&& GET_CODE (XEXP (X,0)) == HIGH \
|
||||
&& (GET_CODE (XEXP (XEXP (X,0),0)) == CONST \
|
||||
|| GET_CODE (XEXP (XEXP (X,0),0)) == SYMBOL_REF \
|
||||
|| GET_CODE (XEXP (XEXP (X,0),0)) == LABEL_REF)) \
|
||||
{ \
|
||||
if (! TARGET_SMALL) \
|
||||
{ \
|
||||
int i = push_reload (XEXP (X, 0), NULL_RTX, \
|
||||
&XEXP (X, 0), NULL_PTR, \
|
||||
DP_REG, GET_MODE (X), VOIDmode, 0, 0, \
|
||||
OPNUM, TYPE); \
|
||||
/* The only valid reg is DP. This is a fixed reg and will \
|
||||
normally not be used so force it. */ \
|
||||
rld[i].reg_rtx = gen_rtx_REG (Pmode, DP_REGNO); \
|
||||
rld[i].nocombine = 1; \
|
||||
} \
|
||||
goto WIN; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/* No mode-dependent addresses on the C4x are autoincrements. */
|
||||
|
||||
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
|
||||
|
|
Loading…
Add table
Reference in a new issue