]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/52408 (Incorrect assembler generated for zvdep_imm64)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sun, 4 Mar 2012 21:31:25 +0000 (21:31 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 4 Mar 2012 21:31:25 +0000 (21:31 +0000)
Backport from mainline
2012-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

PR target/52408
* config/pa/pa.md (zvdep_imm32): Change type of variable x from int to
unsigned HOST_WIDE_INT.
(zvdep_imm64): Likewise.
(vdepi_ior): Change type of variable x from int to HOST_WIDE_INT.
(vdepi_and): Likewise.
Likewise for unamed 64-bit patterns.
* config/pa/predicates.md (lhs_lshift_cint_operand): Update comment.

From-SVN: r184902

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

index 7a198a13925fbdd1ad3391dac6b9b6ab8707e062..fb6c92c84a23ac7dc2bb3c256e7fc14d41fe474f 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       Backport from mainline
+       2012-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/52408
+       * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to
+       unsigned HOST_WIDE_INT.
+       (zvdep_imm64): Likewise.
+       (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT.
+       (vdepi_and): Likewise.
+       Likewise for unamed 64-bit patterns.
+       * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment.
+
 2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
 
        Backport from mainline
index d354b266198a8bcfb9643a60de9736ceca861ad6..8736c232b0bf9bc061ade64aa69f2dc34f761d6b 100644 (file)
   ""
   "*
 {
-  int x = INTVAL (operands[1]);
+  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
   operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
   operands[1] = GEN_INT ((x & 0xf) - 0x10);
   return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
   "exact_log2 (INTVAL (operands[1]) + 1) > 0"
   "*
 {
-  int x = INTVAL (operands[1]);
+  HOST_WIDE_INT x = INTVAL (operands[1]);
   operands[2] = GEN_INT (exact_log2 (x + 1));
   return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
 }"
   "INTVAL (operands[1]) == -2"
   "*
 {
-  int x = INTVAL (operands[1]);
+  HOST_WIDE_INT x = INTVAL (operands[1]);
   operands[2] = GEN_INT (exact_log2 ((~x) + 1));
   return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
 }"
   "TARGET_64BIT"
   "*
 {
-  int x = INTVAL (operands[1]);
+  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
   operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
   operands[1] = GEN_INT ((x & 0x1f) - 0x20);
   return \"depdi,z %1,%%sar,%2,%0\";
   "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
   "*
 {
-  int x = INTVAL (operands[1]);
+  HOST_WIDE_INT x = INTVAL (operands[1]);
   operands[2] = GEN_INT (exact_log2 (x + 1));
   return \"depdi -1,%%sar,%2,%0\";
 }"
   "TARGET_64BIT && INTVAL (operands[1]) == -2"
   "*
 {
-  int x = INTVAL (operands[1]);
+  HOST_WIDE_INT x = INTVAL (operands[1]);
   operands[2] = GEN_INT (exact_log2 ((~x) + 1));
   return \"depdi 0,%%sar,%2,%0\";
 }"
index 902ef4f195c92ecda9c8e47248601cb58c117164..b64834f38c8742e04802a9a1a8acb7a9fe9d99d8 100644 (file)
   (ior (match_operand 0 "register_operand")
        (match_operand 0 "cint_ior_operand")))
 
-;; True iff OP is a CONST_INT of the forms 0...0xxxx or
-;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
-;; r), using the zvdepi instruction.
+;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
+;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
+;; using the zvdepi instruction.
 
 (define_predicate "lhs_lshift_cint_operand"
   (match_code "const_int")