Fix bug detected by Michael snyder.

This commit is contained in:
Nick Clifton 1998-02-25 02:05:09 +00:00
parent 89154e47a3
commit 39149be224
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
start-sanitize-m32rx
Tue Feb 24 18:03:25 1998 Nick Clifton <nickc@cygnus.com>
* config/tc-m32r.c (first_writes_to_seconds_operands):
Reinitialise b_operands for each pass of the inner loop.
end-sanitize-m32rx
start-sanitize-sky
Tue Feb 24 11:01:25 1998 Doug Evans <devans@canuck.cygnus.com>

View File

@ -410,13 +410,13 @@ first_writes_to_seconds_operands (a, b, check_outputs)
const int check_outputs;
{
const CGEN_OPERAND_INSTANCE * a_operands = CGEN_INSN_OPERANDS (a->insn);
const CGEN_OPERAND_INSTANCE * b_operands = CGEN_INSN_OPERANDS (b->insn);
const CGEN_OPERAND_INSTANCE * b_ops = CGEN_INSN_OPERANDS (b->insn);
int a_index;
/* If at least one of the instructions takes no operands, then there is
nothing to check. There really are instructions without operands,
eg 'nop'. */
if (a_operands == NULL || b_operands == NULL)
if (a_operands == NULL || b_ops == NULL)
return 0;
/* Scan the operand list of 'a' looking for an output operand. */
@ -427,6 +427,7 @@ first_writes_to_seconds_operands (a, b, check_outputs)
if (CGEN_OPERAND_INSTANCE_TYPE (a_operands) == CGEN_OPERAND_INSTANCE_OUTPUT)
{
int b_index;
const CGEN_OPERAND_INSTANCE * b_operands = b_ops;
/* Special Case:
The Condition bit 'C' is a shadow of the CBR register (control