summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-17 15:31:12 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-17 15:31:12 +0000
commited4439b12944ccd426f51eb63f9fc234a7517e2a (patch)
treea71c2c5cb75f6a5f78a826569ea10fb95b94af4b
parent362719194246abdf7c193bc9fffbe9819009fa9f (diff)
downloadppe42-gcc-ed4439b12944ccd426f51eb63f9fc234a7517e2a.tar.gz
ppe42-gcc-ed4439b12944ccd426f51eb63f9fc234a7517e2a.zip
gcc/
PR middle-end/28403 * optabs.c (expand_doubleword_shift): Wrap the call to do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP. gcc/testsuite/ PR middle-end/28403 * gcc.c-torture/execute/pr28403.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115525 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/optabs.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr28403.c23
4 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e9dba8e4995..7a7b79f159b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2006-07-17 Richard Sandiford <richard@codesourcery.com>
+ PR middle-end/28403
+ * optabs.c (expand_doubleword_shift): Wrap the call to
+ do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP.
+
+2006-07-17 Richard Sandiford <richard@codesourcery.com>
+
PR middle-end/28402
* optabs.c (expand_binop): Pass next_methods rather than methods
to expand_doubleword_shift.
diff --git a/gcc/optabs.c b/gcc/optabs.c
index a8be6f98ce3..fe7ae065962 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -959,8 +959,10 @@ expand_doubleword_shift (enum machine_mode op1_mode, optab binoptab,
subword_label = gen_label_rtx ();
done_label = gen_label_rtx ();
+ NO_DEFER_POP;
do_compare_rtx_and_jump (cmp1, cmp2, cmp_code, false, op1_mode,
0, 0, subword_label);
+ OK_DEFER_POP;
if (!expand_superword_shift (binoptab, outof_input, superword_op1,
outof_target, into_target,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e79fd296a7e..a9398a3f467 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2006-07-17 Richard Sandiford <richard@codesourcery.com>
+ PR middle-end/28403
+ * gcc.c-torture/execute/pr28403.c: New test.
+
+2006-07-17 Richard Sandiford <richard@codesourcery.com>
+
PR middle-end/28402
* gcc.dg/pr28402.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr28403.c b/gcc/testsuite/gcc.c-torture/execute/pr28403.c
new file mode 100644
index 00000000000..8f85ea08505
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr28403.c
@@ -0,0 +1,23 @@
+typedef unsigned long long ull;
+int global;
+
+int __attribute__((noinline))
+foo (int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8)
+{
+ global = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
+}
+
+ull __attribute__((noinline))
+bar (ull x)
+{
+ foo (1, 2, 1, 3, 1, 4, 1, 5);
+ return x >> global;
+}
+
+int
+main (void)
+{
+ if (bar (0x123456789abcdefULL) != (0x123456789abcdefULL >> 18))
+ abort ();
+ exit (0);
+}
OpenPOWER on IntegriCloud