diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-29 00:44:21 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-29 00:44:21 +0000 |
commit | f3653a6424c77c01335e9e8aa3c63d4a62f1f7dc (patch) | |
tree | d7a7f8b66cdb1d768634a359009e273bb3b645dd /gcc/recog.c | |
parent | 19f716e5141690248d566ab28cc6d03049d28b46 (diff) | |
download | gcc-f3653a6424c77c01335e9e8aa3c63d4a62f1f7dc.tar.gz |
* local-alloc.c (requires_inout): Don't use reserved range for
EXTRA_CONSTRAINTS; use anything not matched by REG_CLASS_FROM_LETTER.
* recog.c (asm_operand_ok): Likewise.
(preprocess_constraints, constrain_operands): Likewise.
* regclass.c (record_reg_classes): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
(reload_cse_simplify_operands): Likewise.
* stmt.c (expand_asm_operands): Likewise.
* md.texi: Update constraints documentation.
* tm.texi (EXTRA_CONSTRAINT): Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36023 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 99 |
1 files changed, 35 insertions, 64 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 87a8ec4e96a..76c46177dd5 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1571,7 +1571,8 @@ asm_operand_ok (op, constraint) while (*constraint) { - switch (*constraint++) + char c = *constraint++; + switch (c) { case '=': case '+': @@ -1731,35 +1732,21 @@ asm_operand_ok (op, constraint) return 1; break; + default: + /* For all other letters, we first check for a register class, + otherwise it is an EXTRA_CONSTRAINT. */ + if (REG_CLASS_FROM_LETTER (c) != NO_REGS) + { + case 'r': + if (GET_MODE (op) == BLKmode) + break; + if (register_operand (op, VOIDmode)) + return 1; + } #ifdef EXTRA_CONSTRAINT - case 'Q': - if (EXTRA_CONSTRAINT (op, 'Q')) - return 1; - break; - case 'R': - if (EXTRA_CONSTRAINT (op, 'R')) - return 1; - break; - case 'S': - if (EXTRA_CONSTRAINT (op, 'S')) - return 1; - break; - case 'T': - if (EXTRA_CONSTRAINT (op, 'T')) + if (EXTRA_CONSTRAINT (op, c)) return 1; - break; - case 'U': - if (EXTRA_CONSTRAINT (op, 'U')) - return 1; - break; #endif - - case 'r': - default: - if (GET_MODE (op) == BLKmode) - break; - if (register_operand (op, VOIDmode)) - return 1; break; } } @@ -2138,9 +2125,6 @@ preprocess_constraints () case 's': case 'i': case 'n': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': -#ifdef EXTRA_CONSTRAINT - case 'Q': case 'R': case 'S': case 'T': case 'U': -#endif /* These don't say anything we care about. */ break; @@ -2372,20 +2356,6 @@ constrain_operands (strict) win = 1; break; - case 'r': - if (strict < 0 - || (strict == 0 - && GET_CODE (op) == REG - && REGNO (op) >= FIRST_PSEUDO_REGISTER) - || (strict == 0 && GET_CODE (op) == SCRATCH) - || (GET_CODE (op) == REG - && ((GENERAL_REGS == ALL_REGS - && REGNO (op) < FIRST_PSEUDO_REGISTER) - || reg_fits_class_p (op, GENERAL_REGS, - offset, mode)))) - win = 1; - break; - case 'X': /* This is used for a MATCH_SCRATCH in the cases when we don't actually need anything. So anything goes @@ -2472,17 +2442,6 @@ constrain_operands (strict) win = 1; break; -#ifdef EXTRA_CONSTRAINT - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - if (EXTRA_CONSTRAINT (op, c)) - win = 1; - break; -#endif - case 'V': if (GET_CODE (op) == MEM && ((strict > 0 && ! offsettable_memref_p (op)) @@ -2507,15 +2466,27 @@ constrain_operands (strict) break; default: - if (strict < 0 - || (strict == 0 - && GET_CODE (op) == REG - && REGNO (op) >= FIRST_PSEUDO_REGISTER) - || (strict == 0 && GET_CODE (op) == SCRATCH) - || (GET_CODE (op) == REG - && reg_fits_class_p (op, REG_CLASS_FROM_LETTER (c), - offset, mode))) - win = 1; + { + enum reg_class class; + + class = (c == 'r' ? GENERAL_REGS : REG_CLASS_FROM_LETTER (c)); + if (class != NO_REGS) + { + if (strict < 0 + || (strict == 0 + && GET_CODE (op) == REG + && REGNO (op) >= FIRST_PSEUDO_REGISTER) + || (strict == 0 && GET_CODE (op) == SCRATCH) + || (GET_CODE (op) == REG + && reg_fits_class_p (op, class, offset, mode))) + win = 1; + } +#ifdef EXTRA_CONSTRAINT + else if (EXTRA_CONSTRAINT (op, c)) + win = 1; +#endif + break; + } } constraints[opno] = p; |