i386.md: Use define_constants for unspec numbers.
* config/i386/i386.md: Use define_constants for unspec numbers. * config/i386/i386.c: Likewise. From-SVN: r53448
This commit is contained in:
parent
3b7dcffac9
commit
8ee41eaf16
@ -1,3 +1,8 @@
|
||||
2002-05-14 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/i386/i386.md: Use define_constants for unspec numbers.
|
||||
* config/i386/i386.c: Likewise.
|
||||
|
||||
2002-05-13 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* fixinc/inclhack.def (winidss_valist): Limit applicability.
|
||||
|
@ -2885,9 +2885,9 @@ symbolic_operand (op, mode)
|
||||
if (GET_CODE (op) == SYMBOL_REF
|
||||
|| GET_CODE (op) == LABEL_REF
|
||||
|| (GET_CODE (op) == UNSPEC
|
||||
&& (XINT (op, 1) == 6
|
||||
|| XINT (op, 1) == 7
|
||||
|| XINT (op, 1) == 15)))
|
||||
&& (XINT (op, 1) == UNSPEC_GOT
|
||||
|| XINT (op, 1) == UNSPEC_GOTOFF
|
||||
|| XINT (op, 1) == UNSPEC_GOTPCREL)))
|
||||
return 1;
|
||||
if (GET_CODE (op) != PLUS
|
||||
|| GET_CODE (XEXP (op, 1)) != CONST_INT)
|
||||
@ -2899,7 +2899,7 @@ symbolic_operand (op, mode)
|
||||
return 1;
|
||||
/* Only @GOTOFF gets offsets. */
|
||||
if (GET_CODE (op) != UNSPEC
|
||||
|| XINT (op, 1) != 7)
|
||||
|| XINT (op, 1) != UNSPEC_GOTOFF)
|
||||
return 0;
|
||||
|
||||
op = XVECEXP (op, 0, 0);
|
||||
@ -3649,8 +3649,7 @@ x86_64_sign_extended_value (value)
|
||||
cases. */
|
||||
case CONST:
|
||||
if (GET_CODE (XEXP (value, 0)) == UNSPEC
|
||||
&& XVECLEN (XEXP (value, 0), 0) == 1
|
||||
&& XINT (XEXP (value, 0), 1) == 15)
|
||||
&& XINT (XEXP (value, 0), 1) == UNSPEC_GOTPCREL)
|
||||
return 1;
|
||||
else if (GET_CODE (XEXP (value, 0)) == PLUS)
|
||||
{
|
||||
@ -4629,8 +4628,7 @@ ix86_find_base_term (x)
|
||||
|| GET_CODE (XEXP (term, 1)) == CONST_DOUBLE))
|
||||
term = XEXP (term, 0);
|
||||
if (GET_CODE (term) != UNSPEC
|
||||
|| XVECLEN (term, 0) != 1
|
||||
|| XINT (term, 1) != 15)
|
||||
|| XINT (term, 1) != UNSPEC_GOTPCREL)
|
||||
return x;
|
||||
|
||||
term = XVECEXP (term, 0, 0);
|
||||
@ -4653,8 +4651,7 @@ ix86_find_base_term (x)
|
||||
term = XEXP (term, 0);
|
||||
|
||||
if (GET_CODE (term) != UNSPEC
|
||||
|| XVECLEN (term, 0) != 1
|
||||
|| XINT (term, 1) != 7)
|
||||
|| XINT (term, 1) != UNSPEC_GOTOFF)
|
||||
return x;
|
||||
|
||||
term = XVECEXP (term, 0, 0);
|
||||
@ -4699,8 +4696,7 @@ legitimate_pic_address_disp_p (disp)
|
||||
/* We are unsafe to allow PLUS expressions. This limit allowed distance
|
||||
of GOT tables. We should not need these anyway. */
|
||||
if (GET_CODE (disp) != UNSPEC
|
||||
|| XVECLEN (disp, 0) != 1
|
||||
|| XINT (disp, 1) != 15)
|
||||
|| XINT (disp, 1) != UNSPEC_GOTPCREL)
|
||||
return 0;
|
||||
|
||||
if (GET_CODE (XVECEXP (disp, 0, 0)) != SYMBOL_REF
|
||||
@ -4716,17 +4712,15 @@ legitimate_pic_address_disp_p (disp)
|
||||
disp = XEXP (disp, 0);
|
||||
}
|
||||
|
||||
if (GET_CODE (disp) != UNSPEC
|
||||
|| XVECLEN (disp, 0) != 1)
|
||||
if (GET_CODE (disp) != UNSPEC)
|
||||
return 0;
|
||||
|
||||
/* Must be @GOT or @GOTOFF. */
|
||||
switch (XINT (disp, 1))
|
||||
{
|
||||
case 6: /* @GOT */
|
||||
case UNSPEC_GOT:
|
||||
return GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF;
|
||||
|
||||
case 7: /* @GOTOFF */
|
||||
case UNSPEC_GOTOFF:
|
||||
return local_symbolic_operand (XVECEXP (disp, 0, 0), Pmode);
|
||||
}
|
||||
|
||||
@ -4998,7 +4992,7 @@ legitimize_pic_address (orig, reg)
|
||||
base address (@GOTOFF). */
|
||||
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 7);
|
||||
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);
|
||||
|
||||
@ -5014,7 +5008,7 @@ legitimize_pic_address (orig, reg)
|
||||
if (TARGET_64BIT)
|
||||
{
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 15);
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL);
|
||||
new = gen_rtx_CONST (Pmode, new);
|
||||
new = gen_rtx_MEM (Pmode, new);
|
||||
RTX_UNCHANGING_P (new) = 1;
|
||||
@ -5034,7 +5028,7 @@ legitimize_pic_address (orig, reg)
|
||||
Global Offset Table (@GOT). */
|
||||
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), 6);
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT);
|
||||
new = gen_rtx_CONST (Pmode, new);
|
||||
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
|
||||
new = gen_rtx_MEM (Pmode, new);
|
||||
@ -5075,7 +5069,8 @@ legitimize_pic_address (orig, reg)
|
||||
if (!TARGET_64BIT)
|
||||
{
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), 7);
|
||||
new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0),
|
||||
UNSPEC_GOTOFF);
|
||||
new = gen_rtx_PLUS (Pmode, new, op1);
|
||||
new = gen_rtx_CONST (Pmode, new);
|
||||
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
|
||||
@ -5394,16 +5389,16 @@ output_pic_addr_const (file, x, code)
|
||||
output_pic_addr_const (file, XVECEXP (x, 0, 0), code);
|
||||
switch (XINT (x, 1))
|
||||
{
|
||||
case 6:
|
||||
case UNSPEC_GOT:
|
||||
fputs ("@GOT", file);
|
||||
break;
|
||||
case 7:
|
||||
case UNSPEC_GOTOFF:
|
||||
fputs ("@GOTOFF", file);
|
||||
break;
|
||||
case 8:
|
||||
case UNSPEC_PLT:
|
||||
fputs ("@PLT", file);
|
||||
break;
|
||||
case 15:
|
||||
case UNSPEC_GOTPCREL:
|
||||
fputs ("@GOTPCREL(%RIP)", file);
|
||||
break;
|
||||
default:
|
||||
@ -5456,7 +5451,7 @@ i386_simplify_dwarf_addr (orig_x)
|
||||
{
|
||||
if (GET_CODE (x) != CONST
|
||||
|| GET_CODE (XEXP (x, 0)) != UNSPEC
|
||||
|| XINT (XEXP (x, 0), 1) != 15
|
||||
|| XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL
|
||||
|| GET_CODE (orig_x) != MEM)
|
||||
return orig_x;
|
||||
return XVECEXP (XEXP (x, 0), 0, 0);
|
||||
@ -5492,8 +5487,8 @@ i386_simplify_dwarf_addr (orig_x)
|
||||
|
||||
x = XEXP (XEXP (x, 1), 0);
|
||||
if (GET_CODE (x) == UNSPEC
|
||||
&& ((XINT (x, 1) == 6 && GET_CODE (orig_x) == MEM)
|
||||
|| (XINT (x, 1) == 7 && GET_CODE (orig_x) != MEM)))
|
||||
&& ((XINT (x, 1) == UNSPEC_GOT && GET_CODE (orig_x) == MEM)
|
||||
|| (XINT (x, 1) == UNSPEC_GOTOFF && GET_CODE (orig_x) != MEM)))
|
||||
{
|
||||
if (y)
|
||||
return gen_rtx_PLUS (Pmode, y, XVECEXP (x, 0, 0));
|
||||
@ -5503,8 +5498,9 @@ i386_simplify_dwarf_addr (orig_x)
|
||||
if (GET_CODE (x) == PLUS
|
||||
&& GET_CODE (XEXP (x, 0)) == UNSPEC
|
||||
&& GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||
&& ((XINT (XEXP (x, 0), 1) == 6 && GET_CODE (orig_x) == MEM)
|
||||
|| (XINT (XEXP (x, 0), 1) == 7 && GET_CODE (orig_x) != MEM)))
|
||||
&& ((XINT (XEXP (x, 0), 1) == UNSPEC_GOT && GET_CODE (orig_x) == MEM)
|
||||
|| (XINT (XEXP (x, 0), 1) == UNSPEC_GOTOFF
|
||||
&& GET_CODE (orig_x) != MEM)))
|
||||
{
|
||||
x = gen_rtx_PLUS (VOIDmode, XVECEXP (XEXP (x, 0), 0, 0), XEXP (x, 1));
|
||||
if (y)
|
||||
@ -7492,7 +7488,7 @@ ix86_expand_fp_compare (code, op0, op1, scratch, second_test, bypass_test)
|
||||
else
|
||||
{
|
||||
tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1);
|
||||
tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), 9);
|
||||
tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), UNSPEC_FNSTSW);
|
||||
if (!scratch)
|
||||
scratch = gen_reg_rtx (HImode);
|
||||
emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2));
|
||||
@ -7515,7 +7511,7 @@ ix86_expand_fp_compare (code, op0, op1, scratch, second_test, bypass_test)
|
||||
{
|
||||
/* Sadness wrt reg-stack pops killing fpsr -- gotta get fnstsw first. */
|
||||
tmp = gen_rtx_COMPARE (fpcmp_mode, op0, op1);
|
||||
tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), 9);
|
||||
tmp2 = gen_rtx_UNSPEC (HImode, gen_rtvec (1, tmp), UNSPEC_FNSTSW);
|
||||
if (!scratch)
|
||||
scratch = gen_reg_rtx (HImode);
|
||||
emit_insn (gen_rtx_SET (VOIDmode, scratch, tmp2));
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user