From 78d6d306024dc04eac01d1b4a2487e69857527cf Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 25 Apr 2014 10:46:18 +0000 Subject: [PATCH] re PR target/60941 (miscompilation of firefox javascript interpreter) PR target/60941 * config/sparc/sparc.md (ashlsi3_extend): Delete. From-SVN: r209792 --- gcc/ChangeLog | 5 ++++ gcc/config/sparc/sparc.md | 13 ----------- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.c-torture/execute/20140425-1.c | 23 +++++++++++++++++++ 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20140425-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f824654c316b..64444df5b4cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-04-25 Eric Botcazou + + PR target/60941 + * config/sparc/sparc.md (ashlsi3_extend): Delete. + 2014-04-22 Michael Meissner Back port from main line: diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 96bf1e733735..d81d9521529a 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -5838,19 +5838,6 @@ } [(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") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c24f54b157e9..fe651b2b17db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-04-25 Eric Botcazou + + * gcc.c-torture/execute/20140425-1.c: New test. + 2014-04-23 Michael Meissner Back port from main line: 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 index 000000000000..c447ef95b6c1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20140425-1.c @@ -0,0 +1,23 @@ +/* PR target/60941 */ +/* Reported by Martin Husemann */ + +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; +} -- 2.47.2