aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1995-05-05 12:55:27 -0600
committerJeff Law <law@gcc.gnu.org>1995-05-05 12:55:27 -0600
commitbc4a9f172b1c5842b39254ded265449c2e377cd1 (patch)
treed9f3292ad97bf61530565b08619996e7f7711238
parentddcf4abcac77d72fa6ba16f07d276511968292bc (diff)
downloadgcc-bc4a9f172b1c5842b39254ded265449c2e377cd1.zip
gcc-bc4a9f172b1c5842b39254ded265449c2e377cd1.tar.gz
gcc-bc4a9f172b1c5842b39254ded265449c2e377cd1.tar.bz2
pa.c (emit_move_sequence): Force problematical constants into memory during the reload pass when...
* pa.c (emit_move_sequence): Force problematical constants into memory during the reload pass when generating PIC. From-SVN: r9581
-rw-r--r--gcc/config/pa/pa.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 6afbbcf..70722cc 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -976,6 +976,21 @@ emit_move_sequence (operands, mode, scratch_reg)
operands[1] = force_const_mem (mode, operand1);
emit_move_sequence (operands, mode, temp);
}
+ /* Likewise for (const (plus (symbol) (const_int)) when generating
+ pic code during or after reload and const_int will not fit
+ in 14 bits. */
+ else if (GET_CODE (operand1) == CONST
+ && GET_CODE (XEXP (operand1, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (operand1, 0), 1)) == CONST_INT
+ && !INT_14_BITS (XEXP (XEXP (operand1, 0), 1))
+ && (reload_completed || reload_in_progress)
+ && flag_pic)
+ {
+ operands[1] = force_const_mem (mode, operand1);
+ operands[1] = legitimize_pic_address (XEXP (operands[1], 0),
+ mode, temp);
+ emit_move_sequence (operands, mode, temp);
+ }
else
{
operands[1] = legitimize_pic_address (operand1, mode, temp);