* [gentoo-commits] gentoo commit in src/patchsets/gcc/4.7.2/gentoo: 95_all_pr55940_4.7.3_x86-stack-parameters.patch README.history
@ 2013-02-25 3:49 Ryan Hill (dirtyepic)
0 siblings, 0 replies; only message in thread
From: Ryan Hill (dirtyepic) @ 2013-02-25 3:49 UTC (permalink / raw
To: gentoo-commits
dirtyepic 13/02/25 03:49:18
Modified: README.history
Added: 95_all_pr55940_4.7.3_x86-stack-parameters.patch
Log:
Add patch for PR55940.
Revision Changes Path
1.9 src/patchsets/gcc/4.7.2/gentoo/README.history
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?r1=1.8&r2=1.9
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- README.history 23 Feb 2013 19:41:24 -0000 1.8
+++ README.history 25 Feb 2013 03:49:18 -0000 1.9
@@ -1,9 +1,10 @@
-1.4 [pending]
+1.4 24 Jan 2013
- 03_all_java-nomulti.patch
+ 48_all_x86_pr53113_libitm-avx.patch
- 49_all_gcc-4.7-x86-libitm-pr52695.patch
+ 49_all_x86_pr52695_libitm-m64.patch
+ 82_all_alpha_4.6.4_pr56023_bootstrap.patch
+ + 95_all_pr55940_4.7.3_x86-stack-parameters.patch
1.3 04 Nov 2012
+ 93_all_pr33763_4.7.3_extern-inline.patch
1.1 src/patchsets/gcc/4.7.2/gentoo/95_all_pr55940_4.7.3_x86-stack-parameters.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/95_all_pr55940_4.7.3_x86-stack-parameters.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/95_all_pr55940_4.7.3_x86-stack-parameters.patch?rev=1.1&content-type=text/plain
Index: 95_all_pr55940_4.7.3_x86-stack-parameters.patch
===================================================================
Incorrect code for accessing parameters with 32-bit Intel hosts
http://gcc.gnu.org/PR55940
commit eccae624ce764c52ff7ffbc3db95fc58c01ab5d4
Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Feb 1 14:09:38 2013 +0000
Backported from mainline
2013-01-15 Jakub Jelinek <jakub@redhat.com>
PR target/55940
* function.c (thread_prologue_and_epilogue_insns): Always
add crtl->drap_reg to set_up_by_prologue.set, even if
stack_realign_drap is false.
* gcc.dg/pr55940.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@195656 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/function.c | 2 +-
gcc/testsuite/gcc.dg/pr55940.c | 54 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 67 insertions(+), 1 deletion(-)
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5961,7 +5961,7 @@ thread_prologue_and_epilogue_insns (void)
if (pic_offset_table_rtx)
add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
PIC_OFFSET_TABLE_REGNUM);
- if (stack_realign_drap && crtl->drap_reg)
+ if (crtl->drap_reg)
add_to_hard_reg_set (&set_up_by_prologue.set,
GET_MODE (crtl->drap_reg),
REGNO (crtl->drap_reg));
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55940.c
@@ -0,0 +1,54 @@
+/* PR target/55940 */
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+/* { dg-additional-options "-mpreferred-stack-boundary=2" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+
+struct S { int s; unsigned long t; };
+
+__attribute__ ((noinline, noclone)) unsigned long long
+bar (struct S *x, unsigned long y)
+{
+ asm volatile ("" : : "r" (x), "r" (y) : "memory");
+ return x->s + y;
+}
+
+__attribute__ ((noinline, noclone)) unsigned long long
+foo (struct S *x, unsigned long y)
+{
+ unsigned long a;
+ if (__builtin_expect (((__UINTPTR_TYPE__) (x) + 0x1000U < 0x2000U), 0))
+ return ~0ULL;
+ if (__builtin_expect (x->s <= 0 || x->s > 9, 0))
+ return ~0ULL;
+ a = x->t >> 12;
+ if (y == a)
+ return ~0ULL;
+ if (x->s == 3)
+ return x->t + y * 4096;
+ return bar (x, y);
+}
+
+int va, vb, vc, vd;
+
+int
+main ()
+{
+ struct S s;
+ asm volatile ("" : : : "memory");
+ int a = va, b = vb, c = vc, d = vd;
+ asm volatile ("" : : : "memory");
+ int i;
+ for (i = 0; i < 64; i++)
+ if (foo ((struct S *) 0, 0) != ~0ULL)
+ __builtin_abort ();
+ s.s = 3;
+ s.t = 2 << 12;
+ if (foo (&s, 2) != ~0ULL)
+ __builtin_abort ();
+ if (foo (&s, 3) != (2 << 12) + 3 * 4096)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+ va = a; vb = b; vc = c; vd = d;
+ asm volatile ("" : : : "memory");
+ return 0;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-25 3:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 3:49 [gentoo-commits] gentoo commit in src/patchsets/gcc/4.7.2/gentoo: 95_all_pr55940_4.7.3_x86-stack-parameters.patch README.history Ryan Hill (dirtyepic)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox