sparc.c (sparc_delegitimize_address): New function.
* config/sparc/sparc.c (sparc_delegitimize_address): New function. (TARGET_DELEGITIMIZE_ADDRESS): Define to above. From-SVN: r166563
This commit is contained in:
parent
94d13ad18d
commit
8e7a6ed68c
2 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-11-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* config/sparc/sparc.c (sparc_delegitimize_address): New function.
|
||||
(TARGET_DELEGITIMIZE_ADDRESS): Define to above.
|
||||
|
||||
2010-11-10 Quentin Neill <quentin.neill.gnu@gmail.com>
|
||||
|
||||
* config.gcc (i[34567]86-*-*): Include tbmintrin.h.
|
||||
|
|
|
@ -420,6 +420,7 @@ static bool sparc_tls_referenced_p (rtx);
|
|||
static rtx sparc_legitimize_tls_address (rtx);
|
||||
static rtx sparc_legitimize_pic_address (rtx, rtx);
|
||||
static rtx sparc_legitimize_address (rtx, rtx, enum machine_mode);
|
||||
static rtx sparc_delegitimize_address (rtx);
|
||||
static bool sparc_mode_dependent_address_p (const_rtx);
|
||||
static bool sparc_pass_by_reference (CUMULATIVE_ARGS *,
|
||||
enum machine_mode, const_tree, bool);
|
||||
|
@ -524,6 +525,8 @@ static const struct default_options sparc_option_optimization_table[] =
|
|||
|
||||
#undef TARGET_LEGITIMIZE_ADDRESS
|
||||
#define TARGET_LEGITIMIZE_ADDRESS sparc_legitimize_address
|
||||
#undef TARGET_DELEGITIMIZE_ADDRESS
|
||||
#define TARGET_DELEGITIMIZE_ADDRESS sparc_delegitimize_address
|
||||
#undef TARGET_MODE_DEPENDENT_ADDRESS_P
|
||||
#define TARGET_MODE_DEPENDENT_ADDRESS_P sparc_mode_dependent_address_p
|
||||
|
||||
|
@ -3568,6 +3571,24 @@ sparc_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
|||
return x;
|
||||
}
|
||||
|
||||
/* Delegitimize an address that was legitimized by the above function. */
|
||||
|
||||
static rtx
|
||||
sparc_delegitimize_address (rtx x)
|
||||
{
|
||||
x = delegitimize_mem_from_attrs (x);
|
||||
|
||||
if (GET_CODE (x) == LO_SUM
|
||||
&& GET_CODE (XEXP (x, 1)) == UNSPEC
|
||||
&& XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
|
||||
{
|
||||
x = XVECEXP (XEXP (x, 1), 0, 0);
|
||||
gcc_assert (GET_CODE (x) == SYMBOL_REF);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
/* SPARC implementation of LEGITIMIZE_RELOAD_ADDRESS. Returns a value to
|
||||
replace the input X, or the original X if no replacement is called for.
|
||||
The output parameter *WIN is 1 if the calling macro should goto WIN,
|
||||
|
|
Loading…
Add table
Reference in a new issue