diff options
author | Richard Stallman <rms@gnu.org> | 1992-04-15 18:01:55 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-04-15 18:01:55 +0000 |
commit | c6f3187f9ab91126bcf34d3d51ef55644868e555 (patch) | |
tree | 2fef69ad21dc06d929c2c4486b83258a7a6195d1 | |
parent | 1460addfd3689012abc7394f7942b4b1128bbcd3 (diff) | |
download | gcc-c6f3187f9ab91126bcf34d3d51ef55644868e555.zip gcc-c6f3187f9ab91126bcf34d3d51ef55644868e555.tar.gz gcc-c6f3187f9ab91126bcf34d3d51ef55644868e555.tar.bz2 |
*** empty log message ***
From-SVN: r748
-rw-r--r-- | gcc/config/mips/mips.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 5d8ce77..25cc56c 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -1952,7 +1952,9 @@ output_block_move (insn, operands, num_regs) int num = 0; int offset = 0; int use_lwl_lwr = FALSE; + int last_operand = num_regs+4; int i; + int j; rtx xoperands[10]; struct { @@ -1963,6 +1965,25 @@ output_block_move (insn, operands, num_regs) enum machine_mode mode; /* mode to use on (MEM) */ } load_store[4]; + /* Work around a bug in GCC, where it can give us a register + the same as one of the addressing registers. */ + for (i = 4; i < last_operand; i++) + { + if (reg_mentioned_p (operands[i], operands[0]) + || reg_mentioned_p (operands[i], operands[1])) + { + warning ("register $%d passed as address and temp register to block move", + REGNO (operands[i])); + + for (j = i+1; j < last_operand; j++) + operands[j-1] = operands[j]; + + operands[--last_operand] = (rtx)0; + if (--num_regs == 0) + abort (); + } + } + /* If we are given global or static addresses, and we would be emitting a few instructions, try to save time by using a temporary register for the pointer. */ |