diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2003-11-23 16:10:52 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2003-11-23 16:10:52 +0000 |
commit | 8c2a5582fb57306c48c39462476dcca6a5d92335 (patch) | |
tree | 85531f5eef295907a5c4fde4b9b109c76e05a167 | |
parent | bf058d221efaf883b850d459809373cfaf5e05f2 (diff) | |
download | gcc-8c2a5582fb57306c48c39462476dcca6a5d92335.tar.gz |
recog.c (preprocess_constraints): Only zero those elements of recog_op_alt that are needed for this insn.
* recog.c (preprocess_constraints): Only zero those elements of
recog_op_alt that are needed for this insn.
* arm.c (note_invalid_constants): A function can't contain invalid
constants if it has no constraints.
From-SVN: r73855
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 3 | ||||
-rw-r--r-- | gcc/recog.c | 5 |
3 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38614844760..7d745ddcb10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-11-23 Richard Earnshaw <rearnsha@arm.com> + + * recog.c (preprocess_constraints): Only zero those elements of + recog_op_alt that are needed for this insn. + * arm.c (note_invalid_constants): A function can't contain invalid + constants if it has no constraints. + 2003-11-22 Jan Hubicka <jh@suse.cz> * i386.c (classify_argument): Pass __float128 in memory. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 44a5fa02847..5ec79df9c12 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -6908,6 +6908,9 @@ note_invalid_constants (rtx insn, HOST_WIDE_INT address, int do_pushes) if (!constrain_operands (1)) fatal_insn_not_found (insn); + if (recog_data.n_alternatives == 0) + return false; + /* Fill in recog_op_alt with information about the constraints of this insn. */ preprocess_constraints (); diff --git a/gcc/recog.c b/gcc/recog.c index 3c67bd85193..f0e75c272f0 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2093,7 +2093,10 @@ preprocess_constraints (void) { int i; - memset (recog_op_alt, 0, sizeof recog_op_alt); + for (i = 0; i < recog_data.n_operands; i++) + memset (recog_op_alt[i], 0, (recog_data.n_alternatives + * sizeof (struct operand_alternative))); + for (i = 0; i < recog_data.n_operands; i++) { int j; |