Commit 03d937fc by J"orn Rennecke Committed by Joern Rennecke

explow.c (plus_constant_wide): Don't immediately return with result of recursive call.

	* explow.c (plus_constant_wide): Don't immediately return with
	result of recursive call.

From-SVN: r24195
parent e6cfb550
Tue Dec 8 22:33:18 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* explow.c (plus_constant_wide): Don't immediately return with
result of recursive call.
Tue Dec 8 15:32:56 EST 1998 Andrew MacLeod <amacleod@cygnus.com> Tue Dec 8 15:32:56 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
* eh-common.h (struct eh_context): Add table_index for rethrows. * eh-common.h (struct eh_context): Add table_index for rethrows.
......
...@@ -116,19 +116,32 @@ plus_constant_wide (x, c) ...@@ -116,19 +116,32 @@ plus_constant_wide (x, c)
integer. For a constant term that is not an explicit integer, integer. For a constant term that is not an explicit integer,
we cannot really combine, but group them together anyway. we cannot really combine, but group them together anyway.
Use a recursive call in case the remaining operand is something Restart or use a recursive call in case the remaining operand is
that we handle specially, such as a SYMBOL_REF. */ something that we handle specially, such as a SYMBOL_REF.
We may not immediately return from the recursive call here, lest
all_constant gets lost. */
if (GET_CODE (XEXP (x, 1)) == CONST_INT) if (GET_CODE (XEXP (x, 1)) == CONST_INT)
return plus_constant (XEXP (x, 0), c + INTVAL (XEXP (x, 1))); {
c += INTVAL (XEXP (x, 1));
x = XEXP (x, 0);
goto restart;
}
else if (CONSTANT_P (XEXP (x, 0))) else if (CONSTANT_P (XEXP (x, 0)))
return gen_rtx_PLUS (mode, {
x = gen_rtx_PLUS (mode,
plus_constant (XEXP (x, 0), c), plus_constant (XEXP (x, 0), c),
XEXP (x, 1)); XEXP (x, 1));
c = 0;
}
else if (CONSTANT_P (XEXP (x, 1))) else if (CONSTANT_P (XEXP (x, 1)))
return gen_rtx_PLUS (mode, {
x = gen_rtx_PLUS (mode,
XEXP (x, 0), XEXP (x, 0),
plus_constant (XEXP (x, 1), c)); plus_constant (XEXP (x, 1), c));
c = 0;
}
break; break;
default: default:
......
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