diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1992-04-10 20:04:10 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1992-04-10 20:04:10 +0000 |
commit | 0cebb05d0b451ca7c314ba7e0a0c756e7a5d6c19 (patch) | |
tree | b1b5025e457134ae1573563218cee162927b350a /gcc | |
parent | 371ffa39e201d1868ddaf2964f6f46d72f688166 (diff) | |
download | gcc-0cebb05d0b451ca7c314ba7e0a0c756e7a5d6c19.tar.gz |
*** empty log message ***
From-SVN: r719
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/mips/mips.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 821caaf80d1..5d8ce773978 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -1951,6 +1951,7 @@ output_block_move (insn, operands, num_regs) int align = INTVAL (operands[3]); int num = 0; int offset = 0; + int use_lwl_lwr = FALSE; int i; rtx xoperands[10]; @@ -2013,6 +2014,23 @@ output_block_move (insn, operands, num_regs) bytes -= UNITS_PER_WORD; } + else if (bytes >= UNITS_PER_WORD && TARGET_GAS) + { +#if BYTES_BIG_ENDIAN + load_store[num].load = "lwl\t%0,%1\n\tlwr\t%0,%2"; + load_store[num].load_nop = "lwl\t%0,%1\n\tlwr\t%0,%2%#"; + load_store[num].store = "swl\t%0,%1\n\tswr\t%0,%2"; +#else + load_store[num].load = "lwl\t%0,%2\n\tlwr\t%0,%1"; + load_store[num].load_nop = "lwl\t%0,%2\n\tlwr\t%0,%1%#"; + load_store[num].store = "swl\t%0,%2\n\tswr\t%0,%1"; +#endif + load_store[num].mode = SImode; + offset += UNITS_PER_WORD; + bytes -= UNITS_PER_WORD; + use_lwl_lwr = TRUE; + } + else if (bytes >= UNITS_PER_WORD) { load_store[num].load = "ulw\t%0,%1"; @@ -2067,27 +2085,43 @@ output_block_move (insn, operands, num_regs) for (i = 0; i < num; i++) { + int offset; + if (!operands[i+4]) abort (); if (GET_MODE (operands[i+4]) != load_store[i].mode) operands[i+4] = gen_rtx (REG, load_store[i].mode, REGNO (operands[i+4])); + offset = load_store[i].offset; xoperands[0] = operands[i+4]; xoperands[1] = gen_rtx (MEM, load_store[i].mode, - plus_constant (src_reg, load_store[i].offset)); + plus_constant (src_reg, offset)); + + if (use_lwl_lwr) + xoperands[2] = gen_rtx (MEM, load_store[i].mode, + plus_constant (src_reg, UNITS_PER_WORD-1+offset)); + output_asm_insn (load_store[i].load, xoperands); } for (i = 0; i < num; i++) { + int offset = load_store[i].offset; xoperands[0] = operands[i+4]; xoperands[1] = gen_rtx (MEM, load_store[i].mode, - plus_constant (dest_reg, load_store[i].offset)); + plus_constant (dest_reg, offset)); + + + if (use_lwl_lwr) + xoperands[2] = gen_rtx (MEM, load_store[i].mode, + plus_constant (dest_reg, UNITS_PER_WORD-1+offset)); + output_asm_insn (load_store[i].store, xoperands); } num = 0; /* reset load_store */ + use_lwl_lwr = FALSE; /* reset whether or not we used lwl/lwr */ } } |