mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 10:04:46 +08:00
i386.c (legitimate_pic_address_disp_p): Do not accept PLUS in the GOTOFF operand.
* i386.c (legitimate_pic_address_disp_p): Do not accept PLUS in the GOTOFF operand. (legitimize_pic_address): Move plus outside the unspec. * i386.c (legitimate_constant_p): Check (CONST (PLUS (UNSPEC ... for validity. From-SVN: r65367
This commit is contained in:
parent
3e71e0028f
commit
799b33a028
@ -1,3 +1,11 @@
|
||||
Tue Apr 8 11:12:07 CEST 2003 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* i386.c (legitimate_pic_address_disp_p): Do not accept PLUS in the
|
||||
GOTOFF operand.
|
||||
(legitimize_pic_address): Move plus outside the unspec.
|
||||
* i386.c (legitimate_constant_p): Check (CONST (PLUS (UNSPEC ...
|
||||
for validity.
|
||||
|
||||
2003-04-08 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* gcov-io.h (gcov_save_position): Remove __inline__ from
|
||||
|
@ -5674,6 +5674,13 @@ legitimate_constant_p (x)
|
||||
&& tls_symbolic_operand (XEXP (inner, 0), Pmode))
|
||||
return false;
|
||||
|
||||
if (GET_CODE (inner) == PLUS)
|
||||
{
|
||||
if (GET_CODE (XEXP (inner, 1)) != CONST_INT)
|
||||
return false;
|
||||
inner = XEXP (inner, 0);
|
||||
}
|
||||
|
||||
/* Only some unspecs are valid as "constants". */
|
||||
if (GET_CODE (inner) == UNSPEC)
|
||||
switch (XINT (inner, 1))
|
||||
@ -5833,7 +5840,10 @@ legitimate_pic_address_disp_p (disp)
|
||||
return false;
|
||||
return GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF;
|
||||
case UNSPEC_GOTOFF:
|
||||
return local_symbolic_operand (XVECEXP (disp, 0, 0), Pmode);
|
||||
if (GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF
|
||||
|| GET_CODE (XVECEXP (disp, 0, 0)) == LABEL_REF)
|
||||
return local_symbolic_operand (XVECEXP (disp, 0, 0), Pmode);
|
||||
return false;
|
||||
case UNSPEC_GOTTPOFF:
|
||||
case UNSPEC_GOTNTPOFF:
|
||||
case UNSPEC_INDNTPOFF:
|
||||
@ -6146,7 +6156,15 @@ legitimize_pic_address (orig, reg)
|
||||
|
||||
if (reload_in_progress)
|
||||
regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
|
||||
if (GET_CODE (addr) == CONST)
|
||||
addr = XEXP (addr, 0);
|
||||
if (GET_CODE (addr) == PLUS)
|
||||
{
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, XEXP (addr, 0)), UNSPEC_GOTOFF);
|
||||
new = gen_rtx_PLUS (Pmode, new, XEXP (addr, 1));
|
||||
}
|
||||
else
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
|
||||
new = gen_rtx_CONST (Pmode, new);
|
||||
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user