]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/30039 (HPPA: Incorrect code generated on 64bit host)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sat, 9 Dec 2006 03:35:43 +0000 (03:35 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 9 Dec 2006 03:35:43 +0000 (03:35 +0000)
PR target/30039
* pa.md (high:DI and lo_sum:DI): Handle 64-bit CONST_INTs in 32-bit
patterns.  Correct length of high:DI instruction sequence.

From-SVN: r119685

gcc/ChangeLog
gcc/config/pa/pa.md

index 43202958dba364a820fe808ada73277425cd4dcd..3da6b308d2ef1f175737559f40ef46355fadfb82 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/30039
+       * pa.md (high:DI and lo_sum:DI): Handle 64-bit CONST_INTs in 32-bit
+       patterns.  Correct length of high:DI instruction sequence.
+
 2006-11-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (return_addr_rtx): Change 0xe0400002 to -532676606.
index e779d4d4ce1f65b09e614fe3b364ef484190cb37..02a947a6f1a4a46444bc40d42ff817d606fece50 100644 (file)
 
   if (GET_CODE (op1) == CONST_INT)
     {
+#if HOST_BITS_PER_WIDE_INT <= 32
       operands[0] = operand_subword (op0, 1, 0, DImode);
       output_asm_insn (\"ldil L'%1,%0\", operands);
 
       else
        output_asm_insn (\"ldi 0,%0\", operands);
       return \"\";
+#else
+      operands[0] = operand_subword (op0, 1, 0, DImode);
+      operands[1] = GEN_INT (INTVAL (op1) & 0xffffffff));
+      output_asm_insn (\"ldil L'%1,%0\", operands);
+
+      operands[0] = operand_subword (op0, 0, 0, DImode);
+      operands[1] = GEN_INT (INTVAL (op1) >> 32);
+      output_asm_insn (singlemove_string (operands), operands);
+      return \"\";
+#endif
     }
   else if (GET_CODE (op1) == CONST_DOUBLE)
     {
     abort ();
 }"
   [(set_attr "type" "move")
-   (set_attr "length" "8")])
+   (set_attr "length" "12")])
 
 (define_insn ""
   [(set (match_operand:DI 0 "move_dest_operand"
      handle it correctly.  */
   if (GET_CODE (operands[2]) == CONST_DOUBLE)
     operands[2] = GEN_INT (CONST_DOUBLE_LOW (operands[2]));
+  else if (HOST_BITS_PER_WIDE_INT > 32
+          && GET_CODE (operands[2]) == CONST_INT)
+    operands[2] = GEN_INT (INTVAL (operands[2]) & 0xffffffff);
   if (which_alternative == 1)
     output_asm_insn (\"copy %1,%0\", operands);
   return \"ldo R'%G2(%R1),%R0\";