]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa.c (pa_output_move_double): Enhance to handle HIGH CONSTANT_P operands.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 12 Sep 2015 13:58:10 +0000 (13:58 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 12 Sep 2015 13:58:10 +0000 (13:58 +0000)
* config/pa/pa.c (pa_output_move_double): Enhance to handle HIGH
CONSTANT_P operands.

From-SVN: r227708

gcc/ChangeLog
gcc/config/pa/pa.c

index 31a500be769748fdcf4a10b45c002eec7cb94358..2b1899e32ebf1e8a289afab993fc918abadd939c 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-12  John David Anglin  <danglin@gcc.gnu.org>
+
+       * config/pa/pa.c (pa_output_move_double): Enhance to handle HIGH
+       CONSTANT_P operands.
+
 2015-09-09  Alan Modra  <amodra@gmail.com>
 
        PR target/67378
index bae1cf424f557ab070e0bcaed43b4b4e0acfebca..1d67768f796c2ed5b616cf0e260e1969abaae4d8 100644 (file)
@@ -2435,6 +2435,7 @@ pa_output_move_double (rtx *operands)
   enum { REGOP, OFFSOP, MEMOP, CNSTOP, RNDOP } optype0, optype1;
   rtx latehalf[2];
   rtx addreg0 = 0, addreg1 = 0;
+  int highonly = 0;
 
   /* First classify both operands.  */
 
@@ -2645,7 +2646,14 @@ pa_output_move_double (rtx *operands)
   else if (optype1 == OFFSOP)
     latehalf[1] = adjust_address_nv (operands[1], SImode, 4);
   else if (optype1 == CNSTOP)
-    split_double (operands[1], &operands[1], &latehalf[1]);
+    {
+      if (GET_CODE (operands[1]) == HIGH)
+       {
+         operands[1] = XEXP (operands[1], 0);
+         highonly = 1;
+       }
+      split_double (operands[1], &operands[1], &latehalf[1]);
+    }
   else
     latehalf[1] = operands[1];
 
@@ -2699,8 +2707,11 @@ pa_output_move_double (rtx *operands)
   if (addreg1)
     output_asm_insn ("ldo 4(%0),%0", &addreg1);
 
-  /* Do that word.  */
-  output_asm_insn (pa_singlemove_string (latehalf), latehalf);
+  /* Do high-numbered word.  */
+  if (highonly)
+    output_asm_insn ("ldil L'%1,%0", latehalf);
+  else
+    output_asm_insn (pa_singlemove_string (latehalf), latehalf);
 
   /* Undo the adds we just did.  */
   if (addreg0)