]> gcc.gnu.org Git - gcc.git/commitdiff
* pa.c (emit_move_sequence): Handle secondary reloads for SAR.
authorJeff Law <law@gcc.gnu.org>
Thu, 21 Jan 1993 16:34:59 +0000 (09:34 -0700)
committerJeff Law <law@gcc.gnu.org>
Thu, 21 Jan 1993 16:34:59 +0000 (09:34 -0700)
From-SVN: r3298

gcc/config/pa/pa.c

index 40610b3064468a6d26f81d3bc52692f4b6231a00..98848f34d8a36627f54d580ef9b07078a1be6634 100644 (file)
@@ -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))
     {
This page took 0.064712 seconds and 5 git commands to generate.