aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1995-01-17 16:42:12 -0700
committerJeff Law <law@gcc.gnu.org>1995-01-17 16:42:12 -0700
commit2d7b2c36ac91e3064d7e977663fd2d8bef9d4f19 (patch)
tree3178f6cb12d4cf3c1d5a96d69dde15a9a824d962 /gcc
parenta360da3a3d66e12a477381aab8d4e8a995ab62fc (diff)
downloadgcc-2d7b2c36ac91e3064d7e977663fd2d8bef9d4f19.zip
gcc-2d7b2c36ac91e3064d7e977663fd2d8bef9d4f19.tar.gz
gcc-2d7b2c36ac91e3064d7e977663fd2d8bef9d4f19.tar.bz2
pa.c (emit_move_sequence): Also handle displacements which do not fit in 14 bits for fp load/store...
* pa.c (emit_move_sequence): Also handle displacements which do not fit in 14 bits for fp load/store secondary reloads. From-SVN: r8769
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 59c1466..72a86b5 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -797,7 +797,19 @@ emit_move_sequence (operands, mode, scratch_reg)
operand1 = XEXP (operand1, 0);
scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg));
- emit_move_insn (scratch_reg, XEXP (operand1, 0));
+
+ /* D might not fit in 14 bits either; for such cases load D into
+ scratch reg. */
+ if (!memory_address_p (SImode, XEXP (operand1, 0)))
+ {
+ emit_move_insn (scratch_reg, XEXP (XEXP (operand1, 0), 1));
+ emit_move_insn (scratch_reg, gen_rtx (GET_CODE (XEXP (operand1, 0)),
+ SImode,
+ XEXP (XEXP (operand1, 0), 0),
+ scratch_reg));
+ }
+ else
+ emit_move_insn (scratch_reg, XEXP (operand1, 0));
emit_insn (gen_rtx (SET, VOIDmode, operand0, gen_rtx (MEM, mode,
scratch_reg)));
return 1;
@@ -814,7 +826,18 @@ emit_move_sequence (operands, mode, scratch_reg)
operand0 = XEXP (operand0, 0);
scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg));
- emit_move_insn (scratch_reg, XEXP (operand0, 0));
+ /* D might not fit in 14 bits either; for such cases load D into
+ scratch reg. */
+ if (!memory_address_p (SImode, XEXP (operand0, 0)))
+ {
+ emit_move_insn (scratch_reg, XEXP (XEXP (operand0, 0), 1));
+ emit_move_insn (scratch_reg, gen_rtx (GET_CODE (XEXP (operand0, 0)),
+ SImode,
+ XEXP (XEXP (operand0, 0), 0),
+ scratch_reg));
+ }
+ else
+ emit_move_insn (scratch_reg, XEXP (operand0, 0));
emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (MEM, mode, scratch_reg),
operand1));
return 1;