aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-06-25 06:13:31 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-06-25 06:13:31 -0400
commite5671f2b6ef5a998cefe72b889dffaac288e6379 (patch)
tree1cde4a100759eeab9da1b710ece6235698594123 /gcc/explow.c
parentcd10f7b60831de7ea1077ad3249526809010d27a (diff)
downloadgcc-e5671f2b6ef5a998cefe72b889dffaac288e6379.zip
gcc-e5671f2b6ef5a998cefe72b889dffaac288e6379.tar.gz
gcc-e5671f2b6ef5a998cefe72b889dffaac288e6379.tar.bz2
*** empty log message ***
From-SVN: r1281
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index c0d6972..587bde6 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -99,17 +99,13 @@ plus_constant (x, c)
Look for constant term in the sum and combine
with C. For an integer constant term, we make a combined
integer. For a constant term that is not an explicit integer,
- we cannot really combine, but group them together anyway. */
- if (GET_CODE (XEXP (x, 0)) == CONST_INT)
- {
- c += INTVAL (XEXP (x, 0));
- x = XEXP (x, 1);
- }
- else if (GET_CODE (XEXP (x, 1)) == CONST_INT)
- {
- c += INTVAL (XEXP (x, 1));
- x = XEXP (x, 0);
- }
+ we cannot really combine, but group them together anyway.
+
+ Use a recursive call in case the remaining operand is something
+ that we handle specially, such as a SYMBOL_REF. */
+
+ if (GET_CODE (XEXP (x, 1)) == CONST_INT)
+ return plus_constant (XEXP (x, 0), c + INTVAL (XEXP (x, 1)));
else if (CONSTANT_P (XEXP (x, 0)))
return gen_rtx (PLUS, mode,
plus_constant (XEXP (x, 0), c),
@@ -131,7 +127,7 @@ plus_constant (x, c)
return x;
}
-/* This is the same a `plus_constant', except that it handles LO_SUM. */
+/* This is the same as `plus_constant', except that it handles LO_SUM. */
rtx
plus_constant_for_output (x, c)