summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-07-03 01:58:35 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-07-02 21:58:35 -0400
commited8908e739ba82f3903d5f3e9ff80ed6865cf978 (patch)
tree20f4c1fadc86f3b89ef524490fc2bd176650f76c /gcc/explow.c
parentaee96fe99b16dc13f61ebd1076b80335e8a71f8b (diff)
downloadgcc-ed8908e739ba82f3903d5f3e9ff80ed6865cf978.tar.gz
explow.c (plus_constant_wide, [...]): New case.
* explow.c (plus_constant_wide, case LO_SUM): New case. (plus_constant_for_output_wide): Delete. * rtl.h (plus_constant_for_output): Delete. * alias.c (canon_rtx, init_alias_analysis): Call plus_constant instead of plus_constant_for_output. * recog.c (offsettable_address_p, adj_offsettable_operand): Likewise. * config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise. * config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise. * config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise. * config/sparc/sparc.md: Likewise. Convert some change_address calls to adjust_address. From-SVN: r43720
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 0281826508a..a6a05f57cbf 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -174,6 +174,11 @@ plus_constant_wide (x, c)
c = 0;
}
break;
+
+ case LO_SUM:
+ return gen_rtx_LO_SUM (mode, XEXP (x, 0),
+ plus_constant (XEXP (x, 1), c));
+
default:
break;
@@ -189,25 +194,6 @@ plus_constant_wide (x, c)
else
return x;
}
-
-/* This is the same as `plus_constant', except that it handles LO_SUM.
-
- This function should be used via the `plus_constant_for_output' macro. */
-
-rtx
-plus_constant_for_output_wide (x, c)
- register rtx x;
- register HOST_WIDE_INT c;
-{
- register enum machine_mode mode = GET_MODE (x);
-
- if (GET_CODE (x) == LO_SUM)
- return gen_rtx_LO_SUM (mode, XEXP (x, 0),
- plus_constant_for_output (XEXP (x, 1), c));
-
- else
- return plus_constant (x, c);
-}
/* If X is a sum, return a new sum like X but lacking any constant terms.
Add all the removed constant terms into *CONSTPTR.