aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/ns32k/ns32k.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-07-02 19:47:44 +0000
committerRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-07-02 19:47:44 +0000
commit66204714f8491ca06792271adae18f8138f5d1b9 (patch)
tree35bfff21e3c73e0c27ad267a7d90a3719cfb86af /gcc/config/ns32k/ns32k.c
parent59a5c351f50932060a86cbb87b2f6f97793ae5f3 (diff)
* emit-rtl.c (adjust_address): New function.
* expr.h (adjust_address): Add declaration. * builtins.c: Replace some calls to change_address with calls to it or to validize_mem. * caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise. * function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise. * config/arm/arm.c, config/convex/convex.c: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/ia64/ia64.c, config/ia64/ia64.md: Likewise. * config/m32r/m32r.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.c, config/mips/mips.md: Likewise. * config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise. * config/sh/sh.c, config/sparc/sparc.md: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@43702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ns32k/ns32k.c')
-rw-r--r--gcc/config/ns32k/ns32k.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c
index 22a4b49b88e..f2d0fe6d7f3 100644
--- a/gcc/config/ns32k/ns32k.c
+++ b/gcc/config/ns32k/ns32k.c
@@ -1,5 +1,5 @@
/* Subroutines for assembler code output on the NS32000.
- Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -423,23 +423,13 @@ move_tail (operands, bytes, offset)
{
if (bytes & 2)
{
- rtx src, dest;
- dest = change_address (operands[0], HImode,
- plus_constant (XEXP (operands[0], 0), offset));
- src = change_address (operands[1], HImode,
- plus_constant (XEXP (operands[1], 0), offset));
- emit_move_insn (dest, src);
+ emit_move_insn (adjust_address (operands[0], HImode, offset),
+ adjust_address (operands[1], HImode, offset));
offset += 2;
}
if (bytes & 1)
- {
- rtx src, dest;
- dest = change_address (operands[0], QImode,
- plus_constant (XEXP (operands[0], 0), offset));
- src = change_address (operands[1], QImode,
- plus_constant (XEXP (operands[1], 0), offset));
- emit_move_insn (dest, src);
- }
+ emit_move_insn (adjust_address (operands[0], QImode, offset),
+ adjust_address (operands[1], QImode, offset));
}
void
@@ -461,20 +451,16 @@ expand_block_move (operands)
if (constp && bytes < 20)
{
int words = bytes >> 2;
+
if (words)
{
if (words < 3 || flag_unroll_loops)
{
int offset = 0;
+
for (; words; words--, offset += 4)
- {
- rtx src, dest;
- dest = change_address (operands[0], SImode,
- plus_constant (XEXP (operands[0], 0), offset));
- src = change_address (operands[1], SImode,
- plus_constant (XEXP (operands[1], 0), offset));
- emit_move_insn (dest, src);
- }
+ emit_move_insn (adjust_address (operands[0], SImode, offset),
+ adjust_address (operands[1], SImode, offset));
}
else
{