diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-14 23:23:17 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-14 23:23:17 +0000 |
| commit | ec8a2ceccee08f7ce443792a77012622dfae4d67 (patch) | |
| tree | 90fc3d83b06445a99964e9388ae95062502885c5 | |
| parent | ba952bbf8148d262e8ef2f13dc679461fe937912 (diff) | |
| download | ppe42-gcc-ec8a2ceccee08f7ce443792a77012622dfae4d67.tar.gz ppe42-gcc-ec8a2ceccee08f7ce443792a77012622dfae4d67.zip | |
* recog.h (struct recog_data): Make dup_num, operand_address_p,
n_operands, n_dups, n_alternatives `char' instead of `unsigned char'.
(struct insn_data): Likewise with n_operands, n_dups,
n_alternatives, output_format.
* regclass.c (scan_one_insn): Cast n_operands to int before
arithmetic inside comparison.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29413 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 9 | ||||
| -rw-r--r-- | gcc/recog.h | 28 | ||||
| -rw-r--r-- | gcc/regclass.c | 2 |
3 files changed, 29 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cdf1ee5ea11..62d9e51cb7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Tue Sep 14 16:20:24 1999 Richard Henderson <rth@cygnus.com> + + * recog.h (struct recog_data): Make dup_num, operand_address_p, + n_operands, n_dups, n_alternatives `char' instead of `unsigned char'. + (struct insn_data): Likewise with n_operands, n_dups, + n_alternatives, output_format. + * regclass.c (scan_one_insn): Cast n_operands to int before + arithmetic inside comparison. + Tue Sep 14 15:13:36 1999 Richard Henderson <rth@cygnus.com> * toplev.c (compile_function): Unconditionally emit nop. diff --git a/gcc/recog.h b/gcc/recog.h index e5875d59293..869bb31455c 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -156,21 +156,31 @@ struct recog_data /* Gives the operand number that was duplicated in the Nth duplicate-appearance of an operand. */ - unsigned char dup_num[MAX_DUP_OPERANDS]; + char dup_num[MAX_DUP_OPERANDS]; #ifndef REGISTER_CONSTRAINTS /* Nonzero if operand N should be an address. */ - unsigned char operand_address_p[MAX_RECOG_OPERANDS]; + char operand_address_p[MAX_RECOG_OPERANDS]; #endif + /* ??? Note that these are `char' instead of `unsigned char' to (try to) + avoid certain lossage from K&R C, wherein `unsigned char' default + promotes to `unsigned int' instead of `int' as in ISO C. As of 1999, + the most common places to bootstrap from K&R C are SunOS and HPUX, + both of which have signed characters by default. The only other + supported natives that have both K&R C and unsigned characters are + ROMP and Irix 3, and neither have been seen for a while, but do + continue to consider unsignedness when performing arithmetic inside + a comparison. */ + /* The number of operands of the insn. */ - unsigned char n_operands; + char n_operands; /* The number of MATCH_DUPs in the insn. */ - unsigned char n_dups; + char n_dups; /* The number of alternatives in the constraints for the insn. */ - unsigned char n_alternatives; + char n_alternatives; }; extern struct recog_data recog_data; @@ -225,10 +235,10 @@ struct insn_data insn_gen_fn genfun; const struct insn_operand_data *operand; - unsigned char n_operands; - unsigned char n_dups; - unsigned char n_alternatives; - unsigned char output_format; + char n_operands; + char n_dups; + char n_alternatives; + char output_format; }; extern const struct insn_data insn_data[]; diff --git a/gcc/regclass.c b/gcc/regclass.c index 5867024c93b..1963a95a474 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -901,7 +901,7 @@ scan_one_insn (insn, pass) have been initialized. We must do this even if one operand is a constant--see addsi3 in m68k.md. */ - for (i = 0; i < recog_data.n_operands - 1; i++) + for (i = 0; i < (int) recog_data.n_operands - 1; i++) if (constraints[i][0] == '%') { const char *xconstraints[MAX_RECOG_OPERANDS]; |

