diff options
author | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-04 12:55:59 +0000 |
---|---|---|
committer | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-04 12:55:59 +0000 |
commit | 78e49515f67a3b85292ce00180eade5e0d53aef7 (patch) | |
tree | 7eac8b63b458dd5da67b48a5a4d8ca0d0304223f /gcc/recog.h | |
parent | bd22b1ba93be98421ce88247a143c8027983664a (diff) | |
download | gcc-78e49515f67a3b85292ce00180eade5e0d53aef7.tar.gz |
* final.c (cleanup_subreg_operands): Delete some unused code.
* recog.h (MAX_RECOG_ALTERNATIVES): New macro.
(struct insn_alternative): New structure definition.
(recog_op_alt): Declare variable.
(preprocess_constraints): Declare function.
* recog.c (recog_op_alt): New variable.
(extract_insn): Verify number of alternatives is in range.
(preprocess_constraints): New function.
* reg-stack.c: Include recog.h.
(constrain_asm_operands): Delete.
(get_asm_operand_lengths): Delete.
(get_asm_operand_n_inputs): New function.
(record_asm_reg_life): Delete OPERANDS, CONSTRAINTS, N_INPUTS and
N_OUTPUTS args. All callers changed.
Compute number of inputs and outputs here by calling
get_asm_operand_n_inputs.
Instead of constrain_asm_operands, call extract_insn,
constrain_operands and preprocess_constaints. Use information
computed by these functions throughout.
(record_reg_life): Delete code that is unused due to changes in
record_asm_reg_life.
(subst_asm_stack_regs): Delete OPERANDS, OPERAND_LOC, CONSTRAINTS,
N_INPUTS and N_OUTPUTS args. All callers changed.
Similar changes as in record_asm_reg_life.
(subst_stack_regs): Move n_operands declaration into the if statement
where it's used.
Delete code that is unused due to changes in subst_asm_stack_regs.
* stmt.c (expand_asm_operands): Verify number of alternatives is in
range.
* Makefile.in (reg-stack.o): Depend on recog.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index bbed6c18d23..d30b9929faa 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -18,6 +18,9 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Random number that should be large enough for all purposes. */ +#define MAX_RECOG_ALTERNATIVES 30 + /* Types of operands. */ enum op_type { OP_IN, @@ -25,6 +28,44 @@ enum op_type { OP_INOUT }; +struct operand_alternative +{ + /* Pointer to the beginning of the constraint string for this alternative, + for easier access by alternative number. */ + char *constraint; + + /* The register class valid for this alternative (possibly NO_REGS). */ + enum reg_class class; + + /* "Badness" of this alternative, computed from number of '?' and '!' + characters in the constraint string. */ + unsigned int reject; + + /* -1 if no matching constraint was found, or an operand number. */ + int matches; + /* The same information, but reversed: -1 if this operand is not + matched by any other, or the operand number of the operand that + matches this one. */ + int matched; + + /* Nonzero if '&' was found in the constraint string. */ + unsigned int earlyclobber:1; + /* Nonzero if 'm' was found in the constraint string. */ + unsigned int memory_ok:1; + /* Nonzero if 'o' was found in the constraint string. */ + unsigned int offmem_ok:1; + /* Nonzero if 'V' was found in the constraint string. */ + unsigned int nonoffmem_ok:1; + /* Nonzero if '<' was found in the constraint string. */ + unsigned int decmem_ok:1; + /* Nonzero if '>' was found in the constraint string. */ + unsigned int incmem_ok:1; + /* Nonzero if 'X' was found in the constraint string, or if the constraint + string for this alternative was empty. */ + unsigned int anything_ok:1; +}; + + extern void init_recog PROTO((void)); extern void init_recog_no_volatile PROTO((void)); extern int recog_memoized PROTO((rtx)); @@ -67,6 +108,7 @@ extern int recog PROTO((rtx, rtx, int *)); extern void add_clobbers PROTO((rtx, int)); extern void insn_extract PROTO((rtx)); extern void extract_insn PROTO((rtx)); +extern void preprocess_constraints PROTO((void)); /* Nonzero means volatile operands are recognized. */ extern int volatile_ok; @@ -116,6 +158,10 @@ extern enum op_type recog_op_type[]; extern char recog_operand_address_p[]; #endif +/* Contains a vector of operand_alternative structures for every operand. + Set up by preprocess_constraints. */ +struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES]; + /* Access the output function for CODE. */ #define OUT_FCN(CODE) (*insn_outfun[(int) (CODE)]) |