* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
@ 2004-05-21 12:36 ` pinskia at gcc dot gnu dot org
2004-05-29 22:47 ` mmitchel at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-21 12:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Summary|-mtune=pentium4 -O2 with |[3.4/3.5? Regression] -
|sjlj EH breaks stack probe |mtune=pentium4 -O2 with
|worker on windows32 targets|sjlj EH breaks stack probe
| |worker on windows32 targets
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
2004-05-21 12:36 ` [Bug target/15551] [3.4/3.5? Regression] " pinskia at gcc dot gnu dot org
@ 2004-05-29 22:47 ` mmitchel at gcc dot gnu dot org
2004-06-01 20:44 ` kcook at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-05-29 22:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-05-28 22:08 -------
Kelley --
It looks like your patch is causing a problem. Would you please look into this?
-- Mark
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kcook at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
2004-05-21 12:36 ` [Bug target/15551] [3.4/3.5? Regression] " pinskia at gcc dot gnu dot org
2004-05-29 22:47 ` mmitchel at gcc dot gnu dot org
@ 2004-06-01 20:44 ` kcook at gcc dot gnu dot org
2004-06-07 20:01 ` kcook at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: kcook at gcc dot gnu dot org @ 2004-06-01 20:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kcook at gcc dot gnu dot org 2004-06-01 20:44 -------
I'll confirm that this is a new regression and that it is also present on Cygwin.
Furthermore I'll state that though installing a blocker insn is basically a
kludge, fixing the C++ sjlj 'feature' that fooled the compiler into thinking
that it was perfectly OK to write to memory that wasn't yet allocated is not
nearly as simple nor would it be as target specific.
So I would say go for putting the kludge back :)
I'll also confirm that Danny's patch fixes the same error under Cygwin.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-01 20:44:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (2 preceding siblings ...)
2004-06-01 20:44 ` kcook at gcc dot gnu dot org
@ 2004-06-07 20:01 ` kcook at gcc dot gnu dot org
2004-06-10 12:47 ` kcook at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: kcook at gcc dot gnu dot org @ 2004-06-07 20:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kcook at gcc dot gnu dot org 2004-06-07 20:00 -------
Created an attachment (id=6488)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6488&action=view)
A potential more correct fix
After deciphering the twisty passages. I think this is a more correct fix.
The problem was not really a scheduling problem, it was that the Win32 alloca
routine was marking that it clobbered memory, so gcc felt free to move stuff
above the call to __alloca.
I still need to regtest it (as that is REALLY slow on cygwin), but it survived
a c,c++ bootstrap on i686-pc-cygwin and fixed the bug (writing to unalloca
memory) as evidenced by below:
$ diff -u pm-gcc_35_orig.s pm-p4new.s
--- pm-gcc_35_orig.s 2004-06-01 14:25:47.170950500 -0400
+++ pm-p4new.s 2004-06-07 15:26:04.193903000 -0400
@@ -23,26 +23,26 @@
movl %esp, %ebp
pushl %edi
pushl %esi
- movl $___gxx_personality_sj0, -20052(%ebp)
- movl $LLSDA1422, -20048(%ebp)
pushl %ebx
- movl $L4, -20040(%ebp)
call __alloca
movl $16, %eax
andl $-16, %esp
call __alloca
leal -24(%ebp), %eax
+ movl $___gxx_personality_sj0, -20052(%ebp)
movl %eax, -20044(%ebp)
leal -20076(%ebp), %eax
- movl %esp, -20036(%ebp)
+ movl $LLSDA1422, -20048(%ebp)
movl %eax, (%esp)
+ movl $L4, -20040(%ebp)
+ movl %esp, -20036(%ebp)
call __Unwind_SjLj_Register
call ___main
movl $256, (%esp)
movl $-1, -20072(%ebp)
call __Znwj
- movl %eax, -20080(%ebp)
movl $16, 8(%esp)
+ movl %eax, -20080(%ebp)
movl $LC0, 4(%esp)
movl %eax, (%esp)
movl $1, -20072(%ebp)
This patch was against mainline, OK if it passes a complete regtest?
The patch also applies to 3.4 and I'll also regtest it there.
Mark, OK for 3.4.1 assuming that passes?
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kcook at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (3 preceding siblings ...)
2004-06-07 20:01 ` kcook at gcc dot gnu dot org
@ 2004-06-10 12:47 ` kcook at gcc dot gnu dot org
2004-06-10 13:43 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: kcook at gcc dot gnu dot org @ 2004-06-10 12:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kcook at gcc dot gnu dot org 2004-06-10 12:47 -------
Subject: Re: [3.4/3.5? Regression] -mtune=pentium4 -O2
I previously wrote
> The patch also applies to 3.4 and passed an all languages bootstrap;
> I'll also regtest it there.
>
> Mark, after a week on mainline, would this be OK for 3.4.1 assuming that
> it also passes?
>
> 2004-06-07 Kelley Cook <kcook@gcc.gnu.org>
>
> * config/i386/i386.c (ix86_expand_prologue): Mark win32 allocate insn
> as prologue.
> * config/i386/i386.md (allocate_stack): Clobber alloca memory.
> (allocate_stack_worker_postreload): Likewise.
> (allocate_stack_worker_rex64): Likewise.
> (allocate_stack_worker_rex64_postreload): Likewise.
> (allocate_stack_worker_1): Likewise.
For what it is worth, on both mainline and 3.4.1 this patch, under
pentium4-pc-cygwin, created no new regressions. Moreover, it fixed one of them:
g77.f-torture/execute/labug1.f execution
OK to install?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (4 preceding siblings ...)
2004-06-10 12:47 ` kcook at gcc dot gnu dot org
@ 2004-06-10 13:43 ` mmitchel at gcc dot gnu dot org
2004-06-15 17:42 ` me at cgf dot cx
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-10 13:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-10 13:43 -------
Kelley --
If this patch is approved for mainline, it's OK for 3.4.1. Perhaps Richard
Henderson can review it for you?
-- Mark
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (5 preceding siblings ...)
2004-06-10 13:43 ` mmitchel at gcc dot gnu dot org
@ 2004-06-15 17:42 ` me at cgf dot cx
2004-06-19 17:47 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: me at cgf dot cx @ 2004-06-15 17:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From me at cgf dot cx 2004-06-15 17:42 -------
Subject: Re: [3.4/3.5? Regression] -mtune=pentium4 -O2
On Thu, Jun 10, 2004 at 08:47:21AM -0400, Kelley Cook wrote:
>I previously wrote
>>The patch also applies to 3.4 and passed an all languages bootstrap;
>>I'll also regtest it there.
>>
>>Mark, after a week on mainline, would this be OK for 3.4.1 assuming that
>>it also passes?
>>
>>2004-06-07 Kelley Cook <kcook@gcc.gnu.org>
>>
>> * config/i386/i386.c (ix86_expand_prologue): Mark win32 allocate insn
>> as prologue.
>> * config/i386/i386.md (allocate_stack): Clobber alloca memory.
>> (allocate_stack_worker_postreload): Likewise.
>> (allocate_stack_worker_rex64): Likewise.
>> (allocate_stack_worker_rex64_postreload): Likewise.
>> (allocate_stack_worker_1): Likewise.
>
>For what it is worth, on both mainline and 3.4.1 this patch, under
>pentium4-pc-cygwin, created no new regressions. Moreover, it fixed one of
>them:
>
>g77.f-torture/execute/labug1.f execution
>
>OK to install?
This doesn't seem to have been added yet.
I think this particular problem has been kicked around quite a bit in
various incarnations. I believe that this was code that Richard
Henderson added not so long ago. Maybe it would be a good idea to have
him verify that it is correct?
cgf
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (6 preceding siblings ...)
2004-06-15 17:42 ` me at cgf dot cx
@ 2004-06-19 17:47 ` mmitchel at gcc dot gnu dot org
2004-06-19 19:18 ` rth at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-19 17:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-19 17:47 -------
Richard, there's a request for a review from you on this patch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (7 preceding siblings ...)
2004-06-19 17:47 ` mmitchel at gcc dot gnu dot org
@ 2004-06-19 19:18 ` rth at gcc dot gnu dot org
2004-06-21 18:38 ` rth at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-06-19 19:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-06-19 19:18 -------
The revised patch isn't correct. The two correct changes I can think of are
(1) the gen_blockage as already written, or (2) change the alloc_stack_worker
unspec to be an unspec_volatile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (8 preceding siblings ...)
2004-06-19 19:18 ` rth at gcc dot gnu dot org
@ 2004-06-21 18:38 ` rth at gcc dot gnu dot org
2004-06-21 21:26 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-06-21 18:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-06-21 18:38 -------
Patch is ok.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (9 preceding siblings ...)
2004-06-21 18:38 ` rth at gcc dot gnu dot org
@ 2004-06-21 21:26 ` mmitchel at gcc dot gnu dot org
2004-06-21 22:52 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-21 21:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-21 21:26 -------
Postponed until GCC 3.4.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (10 preceding siblings ...)
2004-06-21 21:26 ` mmitchel at gcc dot gnu dot org
@ 2004-06-21 22:52 ` cvs-commit at gcc dot gnu dot org
2004-06-22 21:47 ` cvs-commit at gcc dot gnu dot org
2004-06-22 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-21 22:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-21 22:52 -------
Subject: Bug 15551
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: kcook@gcc.gnu.org 2004-06-21 22:52:04
Modified files:
gcc : ChangeLog
gcc/config/i386: i386.md
Log message:
2004-06-21 Kelley Cook <kcook@gcc.gnu.org>
PR target/15551
* config/i386/i386.md: Change UNSPEC_STACK_PROBE to UNSPECV_STACK_PROBE.
(allocate_stack_worker): Make unspec_volatile.
(allocate_stack_worker_rex64): Likewise.
(allocate_stack_worker_postreload): Likewise.
(allocate_stack_worker_rex64_postreload): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4067&r2=2.4068
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.544&r2=1.545
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (11 preceding siblings ...)
2004-06-21 22:52 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-22 21:47 ` cvs-commit at gcc dot gnu dot org
2004-06-22 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-22 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-22 21:47 -------
Subject: Bug 15551
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: kcook@gcc.gnu.org 2004-06-22 21:47:47
Modified files:
gcc : ChangeLog
gcc/testsuite : ChangeLog
gcc/config/i386: i386.md
Added files:
gcc/testsuite/g++.dg/opt: pr15551.c
Log message:
2004-06-22 Kelley Cook <kcook@gcc.gnu.org>
PR target/15551
* config/i386/i386.md: Change UNSPEC_STACK_PROBE to UNSPECV_STACK_PROBE.
(allocate_stack_worker): Make unspec_volatile.
(allocate_stack_worker_rex64): Likewise.
(allocate_stack_worker_postreload): Likewise.
(allocate_stack_worker_rex64_postreload): Likewise.
[testsuite]
2004-06-22 Kelley Cook <kcook@gcc.gnu.org>
* g++.dg/opt/pr15551.C: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.518&r2=2.2326.2.519
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.213&r2=1.3389.2.214
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.502.2.4&r2=1.502.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr15551.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets
2004-05-21 11:45 [Bug target/15551] New: -mtune=pentium4 -O2 with sjlj EH breaks stack probe worker on windows32 targets dannysmith at users dot sourceforge dot net
` (12 preceding siblings ...)
2004-06-22 21:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-22 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-22 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-22 22:16 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|3.4.2 |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15551
^ permalink raw reply [flat|nested] 15+ messages in thread