Commit 3b6c3bb0 by James E Wilson Committed by Jim Wilson

Fix problem noticed by Dale Johannesen on the gcc list.

	* recog.c (asm_operand_ok): Add missing break after case 'X'.
	Change if statements to else if statements in default case.
	(extract_constrain_insn_cached): Fix misspelling of constrain_operands
	in comment.
	(constrain_operands_cached): Likewise.
	(constrain_operands): Change if statements to else if statements in
	default case.
	* reload.c (find_reloads): Likewise.

From-SVN: r73074
parent a126dc3a
2003-10-29 James E Wilson <wilson@specifixinc.com>
* recog.c (asm_operand_ok): Add missing break after case 'X'.
Change if statements to else if statements in default case.
(extract_constrain_insn_cached): Fix misspelling of constrain_operands
in comment.
(constrain_operands_cached): Likewise.
(constrain_operands): Change if statements to else if statements in
default case.
* reload.c (find_reloads): Likewise.
2003-10-29 Richard Henderson <rth@redhat.com> 2003-10-29 Richard Henderson <rth@redhat.com>
* config/m68k/m68k.c (notice_update_cc): Clear cc status for * config/m68k/m68k.c (notice_update_cc): Clear cc status for
......
...@@ -1746,6 +1746,7 @@ asm_operand_ok (rtx op, const char *constraint) ...@@ -1746,6 +1746,7 @@ asm_operand_ok (rtx op, const char *constraint)
case 'X': case 'X':
result = 1; result = 1;
break;
case 'g': case 'g':
if (general_operand (op, VOIDmode)) if (general_operand (op, VOIDmode))
...@@ -1764,20 +1765,16 @@ asm_operand_ok (rtx op, const char *constraint) ...@@ -1764,20 +1765,16 @@ asm_operand_ok (rtx op, const char *constraint)
result = 1; result = 1;
} }
#ifdef EXTRA_CONSTRAINT_STR #ifdef EXTRA_CONSTRAINT_STR
if (EXTRA_CONSTRAINT_STR (op, c, constraint)) else if (EXTRA_CONSTRAINT_STR (op, c, constraint))
result = 1; result = 1;
if (EXTRA_MEMORY_CONSTRAINT (c, constraint)) else if (EXTRA_MEMORY_CONSTRAINT (c, constraint)
{
/* Every memory operand can be reloaded to fit. */ /* Every memory operand can be reloaded to fit. */
if (memory_operand (op, VOIDmode)) && memory_operand (op, VOIDmode))
result = 1; result = 1;
} else if (EXTRA_ADDRESS_CONSTRAINT (c, constraint)
if (EXTRA_ADDRESS_CONSTRAINT (c, constraint))
{
/* Every address operand can be reloaded to fit. */ /* Every address operand can be reloaded to fit. */
if (address_operand (op, VOIDmode)) && address_operand (op, VOIDmode))
result = 1; result = 1;
}
#endif #endif
break; break;
} }
...@@ -1970,7 +1967,7 @@ extract_insn_cached (rtx insn) ...@@ -1970,7 +1967,7 @@ extract_insn_cached (rtx insn)
extract_insn (insn); extract_insn (insn);
recog_data.insn = insn; recog_data.insn = insn;
} }
/* Do cached extract_insn, constrain_operand and complain about failures. /* Do cached extract_insn, constrain_operands and complain about failures.
Used by insn_attrtab. */ Used by insn_attrtab. */
void void
extract_constrain_insn_cached (rtx insn) extract_constrain_insn_cached (rtx insn)
...@@ -1980,7 +1977,7 @@ extract_constrain_insn_cached (rtx insn) ...@@ -1980,7 +1977,7 @@ extract_constrain_insn_cached (rtx insn)
&& !constrain_operands (reload_completed)) && !constrain_operands (reload_completed))
fatal_insn_not_found (insn); fatal_insn_not_found (insn);
} }
/* Do cached constrain_operand and complain about failures. */ /* Do cached constrain_operands and complain about failures. */
int int
constrain_operands_cached (int strict) constrain_operands_cached (int strict)
{ {
...@@ -2535,27 +2532,20 @@ constrain_operands (int strict) ...@@ -2535,27 +2532,20 @@ constrain_operands (int strict)
else if (EXTRA_CONSTRAINT_STR (op, c, p)) else if (EXTRA_CONSTRAINT_STR (op, c, p))
win = 1; win = 1;
if (EXTRA_MEMORY_CONSTRAINT (c, p)) else if (EXTRA_MEMORY_CONSTRAINT (c, p)
{
/* Every memory operand can be reloaded to fit. */ /* Every memory operand can be reloaded to fit. */
if (strict < 0 && GET_CODE (op) == MEM) && ((strict < 0 && GET_CODE (op) == MEM)
win = 1; /* Before reload, accept what reload can turn
into mem. */
/* Before reload, accept what reload can turn into mem. */ || (strict < 0 && CONSTANT_P (op))
if (strict < 0 && CONSTANT_P (op))
win = 1;
/* During reload, accept a pseudo */ /* During reload, accept a pseudo */
if (reload_in_progress && GET_CODE (op) == REG || (reload_in_progress && GET_CODE (op) == REG
&& REGNO (op) >= FIRST_PSEUDO_REGISTER) && REGNO (op) >= FIRST_PSEUDO_REGISTER)))
win = 1; win = 1;
} else if (EXTRA_ADDRESS_CONSTRAINT (c, p)
if (EXTRA_ADDRESS_CONSTRAINT (c, p))
{
/* Every address operand can be reloaded to fit. */ /* Every address operand can be reloaded to fit. */
if (strict < 0) && strict < 0)
win = 1; win = 1;
}
#endif #endif
break; break;
} }
......
...@@ -3264,12 +3264,13 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, ...@@ -3264,12 +3264,13 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
win = 1; win = 1;
/* If the address was already reloaded, /* If the address was already reloaded,
we win as well. */ we win as well. */
if (GET_CODE (operand) == MEM && address_reloaded[i]) else if (GET_CODE (operand) == MEM
&& address_reloaded[i])
win = 1; win = 1;
/* Likewise if the address will be reloaded because /* Likewise if the address will be reloaded because
reg_equiv_address is nonzero. For reg_equiv_mem reg_equiv_address is nonzero. For reg_equiv_mem
we have to check. */ we have to check. */
if (GET_CODE (operand) == REG else if (GET_CODE (operand) == REG
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER && REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (operand)] < 0 && reg_renumber[REGNO (operand)] < 0
&& ((reg_equiv_mem[REGNO (operand)] != 0 && ((reg_equiv_mem[REGNO (operand)] != 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment