]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/60941 (miscompilation of firefox javascript interpreter)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 25 Apr 2014 10:39:14 +0000 (10:39 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 25 Apr 2014 10:39:14 +0000 (10:39 +0000)
PR target/60941
* config/sparc/sparc.md (ashlsi3_extend): Delete.

From-SVN: r209790

gcc/ChangeLog
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20140425-1.c [new file with mode: 0644]

index 484fc515fd1fdbce862f67195a87df2a2be8e5c0..86e9aa3efe1689c41d2613b6732d4f8e57d2f563 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR target/60941
+       * config/sparc/sparc.md (ashlsi3_extend): Delete.
+
 2014-04-25  Marc Glisse  <marc.glisse@inria.fr>
 
        PR preprocessor/56540
index 8b6c647fc00861a6f58a57bfc2adfb28e02e141b..e2a4669e05d297d568f71618c6611bcf85361ebc 100644 (file)
 }
   [(set_attr "type" "shift")])
 
-(define_insn "*ashlsi3_extend"
-  [(set (match_operand:DI 0 "register_operand" "=r")
-       (zero_extend:DI
-         (ashift:SI (match_operand:SI 1 "register_operand" "r")
-                    (match_operand:SI 2 "arith_operand" "rI"))))]
-  "TARGET_ARCH64"
-{
-  if (GET_CODE (operands[2]) == CONST_INT)
-    operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
-  return "sll\t%1, %2, %0";
-}
-  [(set_attr "type" "shift")])
-
 (define_expand "ashldi3"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (ashift:DI (match_operand:DI 1 "register_operand" "r")
index d7a3677588972163b44fe54e5a163c38c188fc7e..ad87aa27eed1a8bfb9c0a28eab28ef7048058e4e 100644 (file)
@@ -1,3 +1,7 @@
+2014-04-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.c-torture/execute/20140425-1.c: New test.
+
 2014-04-25  Marek Polacek  <polacek@redhat.com>
 
        PR c/60156
diff --git a/gcc/testsuite/gcc.c-torture/execute/20140425-1.c b/gcc/testsuite/gcc.c-torture/execute/20140425-1.c
new file mode 100644 (file)
index 0000000..c447ef9
--- /dev/null
@@ -0,0 +1,23 @@
+/* PR target/60941 */
+/* Reported by Martin Husemann <martin@netbsd.org> */
+
+extern void abort (void);
+
+static void __attribute__((noinline))
+set (unsigned long *l)
+{
+  *l = 31;
+}
+
+int main (void)
+{
+  unsigned long l;
+  int i;
+
+  set (&l);
+  i = (int) l;
+  l = (unsigned long)(2U << i);
+  if (l != 0)
+    abort ();
+  return 0;
+}