Commit 91bb873f by Richard Henderson Committed by Richard Henderson

reload.c (operands_match_p): Handle rtvecs.

        * reload.c (operands_match_p): Handle rtvecs.
        * i386.c (legitimate_pic_address_disp_p): New.
        (legitimate_address_p): Use it.
        (legitimize_pic_address): Use unspecs to represent @GOT and @GOTOFF.
        Handle constant pool symbols just like statics.
        (emit_pic_move): Use Pmode not SImode for clarity.
        (output_pic_addr_const) [SYMBOL_REF]: Remove @GOT and @GOTOFF hacks.
        [UNSPEC]: New, handling what we killed above.
        [PLUS]: Detect and abort on invalid symbol arithmetic.
        * i386.h (CONSTANT_ADDRESS_P): Remove HIGH.

From-SVN: r21968
parent 264fac34
Tue Aug 25 12:23:20 PDT 1998 Richard Henderson <rth@cygnus.com>
* reload.c (operands_match_p): Handle rtvecs.
* i386.c (legitimate_pic_address_disp_p): New.
(legitimate_address_p): Use it.
(legitimize_pic_address): Use unspecs to represent @GOT and @GOTOFF.
Handle constant pool symbols just like statics.
(emit_pic_move): Use Pmode not SImode for clarity.
(output_pic_addr_const) [SYMBOL_REF]: Remove @GOT and @GOTOFF hacks.
[UNSPEC]: New, handling what we killed above.
[PLUS]: Detect and abort on invalid symbol arithmetic.
* i386.h (CONSTANT_ADDRESS_P): Remove HIGH.
Tue Aug 25 12:02:23 1998 Mark Mitchell <mark@markmitchell.com>
* alias.c: Include output.h.
......
......@@ -1703,10 +1703,9 @@ do { \
#define MAX_REGS_PER_ADDRESS 2
#define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
#define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
......@@ -64,6 +64,9 @@
;; prevent insns referencing it being scheduled across the initial
;; decrement of the stack pointer.
;; 5 This is a `bsf' operation.
;; 6 This is the @GOT offset of a PIC address.
;; 7 This is the @GOTOFF offset of a PIC address.
;; 8 This is a reference to a symbol's @PLT address.
;; This shadows the processor_type enumeration, so changes must be made
;; to i386.h at the same time.
......
......@@ -2031,7 +2031,7 @@ operands_match_p (x, y)
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
int val;
int val, j;
switch (fmt[i])
{
case 'w':
......@@ -2057,6 +2057,19 @@ operands_match_p (x, y)
case '0':
break;
case 'E':
if (XVECLEN (x, i) != XVECLEN (y, i))
return 0;
for (j = XVECLEN (x, i) - 1; j >= 0; --j)
{
val = operands_match_p (XVECEXP (x, i, j), XVECEXP (y, i, j));
if (val == 0)
return 0;
if (val == 2)
success_2 = 1;
}
break;
/* It is believed that rtx's at this level will never
contain anything but integers and other rtx's,
except for within LABEL_REFs and SYMBOL_REFs. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment