From 4d3cea21c7753c244069178c956b5fa8bec73bc6 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 21 Jan 1993 09:34:59 -0700 Subject: [PATCH] * pa.c (emit_move_sequence): Handle secondary reloads for SAR. From-SVN: r3298 --- gcc/config/pa/pa.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 40610b30644..98848f34d8a 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -528,6 +528,8 @@ emit_move_sequence (operands, mode, scratch_reg) register rtx operand0 = operands[0]; register rtx operand1 = operands[1]; + /* Handle secondary reloads for loads/stores of FP registers from + REG+D addresses where D does not fit in 5 bits. */ if (fp_reg_operand (operand0, mode) && GET_CODE (operand1) == MEM && !short_memory_operand (operand1, mode) @@ -548,6 +550,19 @@ emit_move_sequence (operands, mode, scratch_reg) operand1)); return 1; } + /* Handle secondary reloads for SAR. These occur when trying to load + the SAR from memory or from a FP register. */ + else if (GET_CODE (operand0) == REG + && REGNO_REG_CLASS (REGNO (operand0)) == SHIFT_REGS + && (GET_CODE (operand1) == MEM + || (GET_CODE (operand1) == REG + && FP_REG_CLASS_P (REGNO_REG_CLASS (REGNO (operand1))))) + && scratch_reg) + { + emit_move_insn (scratch_reg, operand1); + emit_move_insn (operand0, scratch_reg); + return 1; + } /* Handle most common case: storing into a register. */ else if (register_operand (operand0, mode)) { -- 2.30.2