Commit e1ff012c by Richard Henderson Committed by Richard Henderson

i386.c: Don't error on EXTRA_CONSTRAINT defined.

        * config/i386/i386.c: Don't error on EXTRA_CONSTRAINT defined.
        (call_insn_operand): Don't expect a surrounding mem.
        (constant_call_address_operand): Likewise.
        * config/i386/i386.h (PREDICATE_CODES): Update.
        * config/i386/i386.md (call patterns): Move the match_operand
        for the call destination inside the mem.

From-SVN: r36024
parent c2cba7a9
2000-08-28 Richard Henderson <rth@cygnus.com> 2000-08-28 Richard Henderson <rth@cygnus.com>
* config/i386/i386.c: Don't error on EXTRA_CONSTRAINT defined.
(call_insn_operand): Don't expect a surrounding mem.
(constant_call_address_operand): Likewise.
* config/i386/i386.h (PREDICATE_CODES): Update.
* config/i386/i386.md (call patterns): Move the match_operand
for the call destination inside the mem.
2000-08-28 Richard Henderson <rth@cygnus.com>
* local-alloc.c (requires_inout): Don't use reserved range for * local-alloc.c (requires_inout): Don't use reserved range for
EXTRA_CONSTRAINTS; use anything not matched by REG_CLASS_FROM_LETTER. EXTRA_CONSTRAINTS; use anything not matched by REG_CLASS_FROM_LETTER.
* recog.c (asm_operand_ok): Likewise. * recog.c (asm_operand_ok): Likewise.
......
...@@ -42,15 +42,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,15 +42,6 @@ Boston, MA 02111-1307, USA. */
#include "basic-block.h" #include "basic-block.h"
#include "ggc.h" #include "ggc.h"
#ifdef EXTRA_CONSTRAINT
/* If EXTRA_CONSTRAINT is defined, then the 'S'
constraint in REG_CLASS_FROM_LETTER will no longer work, and various
asm statements that need 'S' for class SIREG will break. */
error EXTRA_CONSTRAINT conflicts with S constraint letter
/* The previous line used to be #error, but some compilers barf
even if the conditional was untrue. */
#endif
#ifndef CHECK_STACK_LIMIT #ifndef CHECK_STACK_LIMIT
#define CHECK_STACK_LIMIT -1 #define CHECK_STACK_LIMIT -1
#endif #endif
...@@ -1078,10 +1069,6 @@ call_insn_operand (op, mode) ...@@ -1078,10 +1069,6 @@ call_insn_operand (op, mode)
rtx op; rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != MEM)
return 0;
op = XEXP (op, 0);
/* Disallow indirect through a virtual register. This leads to /* Disallow indirect through a virtual register. This leads to
compiler aborts when trying to eliminate them. */ compiler aborts when trying to eliminate them. */
if (GET_CODE (op) == REG if (GET_CODE (op) == REG
...@@ -1114,9 +1101,7 @@ constant_call_address_operand (op, mode) ...@@ -1114,9 +1101,7 @@ constant_call_address_operand (op, mode)
rtx op; rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == MEM return GET_CODE (op) == SYMBOL_REF;
&& CONSTANT_ADDRESS_P (XEXP (op, 0))
&& GET_CODE (XEXP (op, 0)) != CONST_INT);
} }
/* Match exactly zero and one. */ /* Match exactly zero and one. */
......
...@@ -2585,8 +2585,8 @@ do { long l; \ ...@@ -2585,8 +2585,8 @@ do { long l; \
{"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \ {"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM}}, \ LABEL_REF, SUBREG, REG, MEM}}, \
{"pic_symbolic_operand", {CONST}}, \ {"pic_symbolic_operand", {CONST}}, \
{"call_insn_operand", {MEM}}, \ {"call_insn_operand", {REG, SUBREG, MEM, SYMBOL_REF}}, \
{"constant_call_address_operand", {MEM}}, \ {"constant_call_address_operand", {SYMBOL_REF}}, \
{"const0_operand", {CONST_INT, CONST_DOUBLE}}, \ {"const0_operand", {CONST_INT, CONST_DOUBLE}}, \
{"const1_operand", {CONST_INT}}, \ {"const1_operand", {CONST_INT}}, \
{"const248_operand", {CONST_INT}}, \ {"const248_operand", {CONST_INT}}, \
......
...@@ -8457,12 +8457,12 @@ ...@@ -8457,12 +8457,12 @@
&& (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF && (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF
|| !SYMBOL_REF_FLAG (XEXP (operands[0], 0)))) || !SYMBOL_REF_FLAG (XEXP (operands[0], 0))))
current_function_uses_pic_offset_table = 1; current_function_uses_pic_offset_table = 1;
if (! call_insn_operand (operands[0], QImode)) if (! call_insn_operand (XEXP (operands[0], 0), Pmode))
XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
}") }")
(define_insn "*call_pop_0" (define_insn "*call_pop_0"
[(call (match_operand:QI 0 "constant_call_address_operand" "") [(call (mem:QI (match_operand:SI 0 "constant_call_address_operand" ""))
(match_operand:SI 1 "" "")) (match_operand:SI 1 "" ""))
(set (reg:SI 7) (plus:SI (reg:SI 7) (set (reg:SI 7) (plus:SI (reg:SI 7)
(match_operand:SI 3 "immediate_operand" "")))] (match_operand:SI 3 "immediate_operand" "")))]
...@@ -8477,21 +8477,20 @@ ...@@ -8477,21 +8477,20 @@
[(set_attr "type" "call")]) [(set_attr "type" "call")])
(define_insn "*call_pop_1" (define_insn "*call_pop_1"
[(call (match_operand:QI 0 "call_insn_operand" "m") [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm"))
(match_operand:SI 1 "" "")) (match_operand:SI 1 "" ""))
(set (reg:SI 7) (plus:SI (reg:SI 7) (set (reg:SI 7) (plus:SI (reg:SI 7)
(match_operand:SI 3 "immediate_operand" "i")))] (match_operand:SI 3 "immediate_operand" "i")))]
"" ""
"* "*
{ {
if (constant_call_address_operand (operands[0], QImode)) if (constant_call_address_operand (operands[0], Pmode))
{ {
if (SIBLING_CALL_P (insn)) if (SIBLING_CALL_P (insn))
return \"jmp\\t%P0\"; return \"jmp\\t%P0\";
else else
return \"call\\t%P0\"; return \"call\\t%P0\";
} }
operands[0] = XEXP (operands[0], 0);
if (SIBLING_CALL_P (insn)) if (SIBLING_CALL_P (insn))
return \"jmp\\t%*%0\"; return \"jmp\\t%*%0\";
else else
...@@ -8513,12 +8512,12 @@ ...@@ -8513,12 +8512,12 @@
&& (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF && (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF
|| !SYMBOL_REF_FLAG (XEXP (operands[0], 0)))) || !SYMBOL_REF_FLAG (XEXP (operands[0], 0))))
current_function_uses_pic_offset_table = 1; current_function_uses_pic_offset_table = 1;
if (! call_insn_operand (operands[0], QImode)) if (! call_insn_operand (XEXP (operands[0], 0), Pmode))
XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
}") }")
(define_insn "*call_0" (define_insn "*call_0"
[(call (match_operand:QI 0 "constant_call_address_operand" "") [(call (mem:QI (match_operand:SI 0 "constant_call_address_operand" ""))
(match_operand:SI 1 "" ""))] (match_operand:SI 1 "" ""))]
"" ""
"* "*
...@@ -8531,7 +8530,7 @@ ...@@ -8531,7 +8530,7 @@
[(set_attr "type" "call")]) [(set_attr "type" "call")])
(define_insn "*call_1" (define_insn "*call_1"
[(call (match_operand:QI 0 "call_insn_operand" "m") [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm"))
(match_operand:SI 1 "" ""))] (match_operand:SI 1 "" ""))]
"" ""
"* "*
...@@ -8543,7 +8542,6 @@ ...@@ -8543,7 +8542,6 @@
else else
return \"call\\t%P0\"; return \"call\\t%P0\";
} }
operands[0] = XEXP (operands[0], 0);
if (SIBLING_CALL_P (insn)) if (SIBLING_CALL_P (insn))
return \"jmp\\t%*%0\"; return \"jmp\\t%*%0\";
else else
...@@ -8576,7 +8574,7 @@ ...@@ -8576,7 +8574,7 @@
&& (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF && (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF
|| !SYMBOL_REF_FLAG (XEXP (operands[1], 0)))) || !SYMBOL_REF_FLAG (XEXP (operands[1], 0))))
current_function_uses_pic_offset_table = 1; current_function_uses_pic_offset_table = 1;
if (! call_insn_operand (operands[1], QImode)) if (! call_insn_operand (XEXP (operands[1], 0), Pmode))
XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
}") }")
...@@ -8595,7 +8593,7 @@ ...@@ -8595,7 +8593,7 @@
&& (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF && (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF
|| !SYMBOL_REF_FLAG (XEXP (operands[1], 0)))) || !SYMBOL_REF_FLAG (XEXP (operands[1], 0))))
current_function_uses_pic_offset_table = 1; current_function_uses_pic_offset_table = 1;
if (! call_insn_operand (operands[1], QImode)) if (! call_insn_operand (XEXP (operands[1], 0), Pmode))
XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
}") }")
...@@ -11056,7 +11054,7 @@ ...@@ -11056,7 +11054,7 @@
(define_insn "*call_value_pop_0" (define_insn "*call_value_pop_0"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
(call (match_operand:QI 1 "constant_call_address_operand" "") (call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
(match_operand:SI 2 "" ""))) (match_operand:SI 2 "" "")))
(set (reg:SI 7) (plus:SI (reg:SI 7) (set (reg:SI 7) (plus:SI (reg:SI 7)
(match_operand:SI 4 "immediate_operand" "")))] (match_operand:SI 4 "immediate_operand" "")))]
...@@ -11072,7 +11070,7 @@ ...@@ -11072,7 +11070,7 @@
(define_insn "*call_value_pop_1" (define_insn "*call_value_pop_1"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
(call (match_operand:QI 1 "call_insn_operand" "m") (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm"))
(match_operand:SI 2 "" ""))) (match_operand:SI 2 "" "")))
(set (reg:SI 7) (plus:SI (reg:SI 7) (set (reg:SI 7) (plus:SI (reg:SI 7)
(match_operand:SI 4 "immediate_operand" "i")))] (match_operand:SI 4 "immediate_operand" "i")))]
...@@ -11086,7 +11084,6 @@ ...@@ -11086,7 +11084,6 @@
else else
return \"call\\t%P1\"; return \"call\\t%P1\";
} }
operands[1] = XEXP (operands[1], 0);
if (SIBLING_CALL_P (insn)) if (SIBLING_CALL_P (insn))
return \"jmp\\t%*%1\"; return \"jmp\\t%*%1\";
else else
...@@ -11096,7 +11093,7 @@ ...@@ -11096,7 +11093,7 @@
(define_insn "*call_value_0" (define_insn "*call_value_0"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
(call (match_operand:QI 1 "constant_call_address_operand" "") (call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
(match_operand:SI 2 "" "")))] (match_operand:SI 2 "" "")))]
"" ""
"* "*
...@@ -11110,7 +11107,7 @@ ...@@ -11110,7 +11107,7 @@
(define_insn "*call_value_1" (define_insn "*call_value_1"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
(call (match_operand:QI 1 "call_insn_operand" "m") (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm"))
(match_operand:SI 2 "" "")))] (match_operand:SI 2 "" "")))]
"" ""
"* "*
...@@ -11122,7 +11119,6 @@ ...@@ -11122,7 +11119,6 @@
else else
return \"call\\t%P1\"; return \"call\\t%P1\";
} }
operands[1] = XEXP (operands[1], 0);
if (SIBLING_CALL_P (insn)) if (SIBLING_CALL_P (insn))
return \"jmp\\t%*%1\"; return \"jmp\\t%*%1\";
else else
......
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