[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2018-05-05 Thread harald at gigawatt dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 Harald van Dijk changed: What|Removed |Added CC||harald at gigawatt dot nl --- Comment

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2017-08-01 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 H.J. Lu changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #89 from H.J

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2014-02-16 Thread jackie.rosen at hushmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 Jackie Rosen changed: What|Removed |Added CC||jackie.rosen at hushmail dot com --- Comm

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2011-03-13 Thread mahatma at eu dot by
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 --- Comment #87 from Dzianis Kahanovich 2011-03-13 16:56:05 UTC --- (In reply to comment #85) > Am I the only one who thinks this bug should be nominated as the first > priority > GCC 4.6.0 bug? Some lazy people ;) may use global mstackrealign

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2011-01-18 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 --- Comment #86 from H.J. Lu 2011-01-18 21:07:26 UTC --- I am in the process of updating i386 psABI to specify 16byte stack alignment.

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2011-01-18 Thread t.artem at mailcity dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 --- Comment #85 from Artem S. Tashkinov 2011-01-18 21:02:43 UTC --- Am I the only one who thinks this bug should be nominated as the first priority GCC 4.6.0 bug? I don't really care if the fix would be backported to 4.5.x or 4.4.x releases, but

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-25 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #84 from mikulas at artax dot karlin dot mff dot cuni dot cz 2010-08-25 21:27 --- (In reply to comment #83) If the bug is not related to stack alignment (i.e. it crashes not on unaligned SSE access), simplify it and file another bugzilla entry. -- http://gcc.gnu.org/bu

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-24 Thread jasmin at revisionfx dot com
--- Comment #83 from jasmin at revisionfx dot com 2010-08-24 22:09 --- (In reply to comment #82) > -mstackrealign is available from gcc 4.5.0. So 1) you are right that somehow - mpreferred-stack-boundary=2 does not always work - I found a case where I crash 2) so I compiled gcc 4.5.1

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-17 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #82 from mikulas at artax dot karlin dot mff dot cuni dot cz 2010-08-17 21:17 --- -mstackrealign is available from gcc 4.5.0. For gcc 4.4 you can use my patch GCC-4.4.1-ALIGN-PATCH from this bugzilla or H.J.Lu's last patch. It basically does the same as -mstackrealign (but i

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-17 Thread jasmin at revisionfx dot com
--- Comment #81 from jasmin at revisionfx dot com 2010-08-17 21:03 --- (In reply to comment #80) > Comment #79: > > -mstackrealign does the right thing, it realigns the stack when needed, but > keeps it 16-byte aligned on function output. It should be used. > I don't have that optio

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-17 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #80 from mikulas at artax dot karlin dot mff dot cuni dot cz 2010-08-17 20:17 --- Comment #79: -mpreferred-stack-boundary=2 adheres to the sysv ABI but it doesn't adhere to the Linux ABI (that requires 16-byte alignment), so if you compile anything with -mpreferred-stack-bo

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-11 Thread jasmin at revisionfx dot com
--- Comment #79 from jasmin at revisionfx dot com 2010-08-11 21:26 --- > I am not exactly sure how to report a bug here Find the answer here: https://bugs.launchpad.net/sbcl/+bug/539632 " Compile with -mpreferred-stack-boundary=2. This will force GCC to compile code that adheres to

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-08-08 Thread jasmin at revisionfx dot com
--- Comment #78 from jasmin at revisionfx dot com 2010-08-09 01:56 --- I am not exactly sure how to report a bug here - but it seems highly related to this thread (I am pie...@revisionfx.com, since I am not sure if I am auto-subscribed to this thread, and so will get email back about th

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-05-12 Thread jcea at hispasec dot com
--- Comment #77 from jcea at hispasec dot com 2010-05-12 13:14 --- Discussión in progress: http://mail.python.org/pipermail/python-dev/2010-May/100044.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-05-12 Thread jcea at hispasec dot com
--- Comment #76 from jcea at hispasec dot com 2010-05-12 13:00 --- [Zlib-devel] HEADS UP: Apparent bad compilation under (just released) GCC 4.5.0 http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002267.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread dirtyepic at gentoo dot org
--- Comment #75 from dirtyepic at gentoo dot org 2010-04-29 22:58 --- if some libraries, (zlib and fontconfig i've had personal experience with, i've also heard libgcrypt) are compiled with -ftree-vectorize (ie. -O3) on x86 systems supporting SSE2, it causes segfaults in certain packages

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread t dot artem at mailcity dot com
--- Comment #74 from t dot artem at mailcity dot com 2010-04-29 08:29 --- Guys, you are talking in riddles. There's a fact: with -msse2 -O2 -m32 flags GCC generate bad code for some properly coded applications, so I wonder what users are supposed to do. There are already six duplicate

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread ubizjak at gmail dot com
--- Comment #73 from ubizjak at gmail dot com 2010-04-29 07:50 --- >From the manual: `-mstackrealign' Realign the stack at entry. On the Intel x86, the `-mstackrealign' option will generate an alternate prologue and epilogue that realigns the runtime stack if necessary.

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread jakub at gcc dot gnu dot org
--- Comment #72 from jakub at gcc dot gnu dot org 2010-04-29 07:33 --- There is no agreement on this being actually a bug, -mpreferred-stack-boundary is actually an ABI changing option and if you use it you are supposed to deal with the things it is causing (such as using -mstackrealign

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread t dot artem at mailcity dot com
--- Comment #71 from t dot artem at mailcity dot com 2010-04-29 07:24 --- (In reply to comment #70) No, I haven't used -mstackrealign as I presumed that the patch is sufficient - and since you make me sound like I'm wrong, then the patch is also wrong, since GCC must be producing a wor

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-28 Thread ubizjak at gmail dot com
--- Comment #70 from ubizjak at gmail dot com 2010-04-29 06:29 --- (In reply to comment #69) > (In reply to comment #64) > > Subject: Bug 40838 > > > > This patch is not sufficient, some applications still crash after I've applied > it to GCC 4.4 branch (to be more precise gcc-4.4-2010

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-28 Thread t dot artem at mailcity dot com
--- Comment #69 from t dot artem at mailcity dot com 2010-04-29 02:12 --- (In reply to comment #64) > Subject: Bug 40838 > This patch is not sufficient, some applications still crash after I've applied it to GCC 4.4 branch (to be more precise gcc-4.4-20100427.tar.bz2). I still wonder

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-20 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #68 from mikulas at artax dot karlin dot mff dot cuni dot cz 2010-04-20 07:48 --- gcc 4.5 is affected too. It would be nice if they fixed it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-17 Thread t dot artem at mailcity dot com
--- Comment #67 from t dot artem at mailcity dot com 2010-04-17 14:28 --- Am I right assuming that GCC 4.5 is also affected by this bug? Is this bug going to be resolved? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-12-26 Thread hjl dot tools at gmail dot com
--- Comment #66 from hjl dot tools at gmail dot com 2009-12-26 22:19 --- *** Bug 42513 has been marked as a duplicate of this bug. *** -- hjl dot tools at gmail dot com changed: What|Removed |Added -

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-31 Thread hjl dot tools at gmail dot com
--- Comment #65 from hjl dot tools at gmail dot com 2009-10-31 16:47 --- Here are the differences of "-m32 -O3 -msse2 -mfpmath=sse -ffast-math -funroll-loops" vs. "-m32 -O3 -msse2 -mfpmath=sse -ffast-math -funroll-loops -mstackrealign" using ix86/gcc-4_4-branch on Intel Core i7: 164.gz

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-30 Thread hjl at gcc dot gnu dot org
--- Comment #64 from hjl at gcc dot gnu dot org 2009-10-30 15:45 --- Subject: Bug 40838 Author: hjl Date: Fri Oct 30 15:45:23 2009 New Revision: 153757 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153757 Log: gcc/ 2009-10-30 H.J. Lu Backport from mainline:

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-30 Thread hjl at gcc dot gnu dot org
--- Comment #63 from hjl at gcc dot gnu dot org 2009-10-30 14:32 --- Subject: Bug 40838 Author: hjl Date: Fri Oct 30 14:32:26 2009 New Revision: 153750 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153750 Log: Optimize -mstackrealign. gcc/ 2009-10-30 H.J. Lu PR ta

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread hjl dot tools at gmail dot com
--- Comment #62 from hjl dot tools at gmail dot com 2009-10-16 02:48 --- (In reply to comment #61) > > As for the updated patch --- why does it modify the autovectorizer? Anything > that the autovectorizer does can be done manually without the autovectorizer. > So, if there is a case w

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #61 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-10-16 02:10 --- > Why should gcc align the stack when SSE registers aren't used > at all? Because it passes pointer to the structure containing vector entries to someone else who expects it to be aligned. As

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread hjl dot tools at gmail dot com
--- Comment #60 from hjl dot tools at gmail dot com 2009-10-16 00:56 --- Created an attachment (id=18805) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18805&action=view) An updated patch This patch aligns stack if there is a stack variable with 128bit alignment. -- hjl dot t

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread hjl dot tools at gmail dot com
--- Comment #59 from hjl dot tools at gmail dot com 2009-10-15 20:54 --- (In reply to comment #58) > (In reply to comment #53) > > Created an attachment (id=18656) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18656&action=view) [edit] > > An updated patch for gcc 4.4 > > Seamonk

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #58 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-10-15 20:24 --- (In reply to comment #53) > Created an attachment (id=18656) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18656&action=view) [edit] > An updated patch for gcc 4.4 Seamonkey is correct w

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-10-15 Thread mahatma at eu dot by
--- Comment #57 from mahatma at eu dot by 2009-10-15 14:29 --- (In reply to comment #53) > Created an attachment (id=18656) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18656&action=view) [edit] > An updated patch for gcc 4.4 > > Oops. Wrong patch. Trry this one. > Looks good

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-27 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #56 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-27 09:36 --- As for this "old code that assumes 16-byte alignment": this is wrong code generated by old versions of gcc. It only works as long as it is called from other gcc >= 3 code (call it from gcc < 3,

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-27 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #55 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-27 09:07 --- "If we assume incoming stack is 4byte aligned, we have to realign stack for every function due to #2, which isn't acceptable." No, you don't. All you have to do is to allocate the stack frame

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-27 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #54 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-27 09:03 --- (In reply to comment #51) For 4.4, the designers held two wrong assumptions: 1) the incoming stack is always aligned on -mincoming-stack-boundary (wrong for functions called from assembler or

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-26 Thread hjl dot tools at gmail dot com
--- Comment #53 from hjl dot tools at gmail dot com 2009-09-26 16:58 --- Created an attachment (id=18656) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18656&action=view) An updated patch for gcc 4.4 Oops. Wrong patch. Trry this one. -- hjl dot tools at gmail dot com changed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-26 Thread hjl dot tools at gmail dot com
--- Comment #49 from hjl dot tools at gmail dot com 2009-09-26 14:06 --- (In reply to comment #48) > It can be seen from the patch. I don't know how to detect that a structure > contains an array with required SSE align, so I realign the stack for all > types Please find a testcase fi

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-26 Thread hjl dot tools at gmail dot com
--- Comment #52 from hjl dot tools at gmail dot com 2009-09-26 16:55 --- Created an attachment (id=18655) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18655&action=view) An updated patch for gcc 4.4 Please try this patch for gcc 4.4. -- hjl dot tools at gmail dot com changed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-26 Thread hjl dot tools at gmail dot com
--- Comment #51 from hjl dot tools at gmail dot com 2009-09-26 16:15 --- (In reply to comment #50) > > I am saying that the patch could be included in 4.4 as a quick fix and that > 4.5 > needs stack alignment redesign. You can't redesign it by incrementally testing > against a set of

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-26 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #50 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-26 15:44 --- > Please find a testcase first. Otherwise, nothing will be done. Thanks. I don't want anything to be done (unless the patch causes generation of wrong code --- I am not aware of such case). I

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-25 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #48 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-26 04:25 --- It can be seen from the patch. I don't know how to detect that a structure contains an array with required SSE align, so I realign the stack for all types BLKmode with alignment >= 16. That may

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-24 Thread hjl dot tools at gmail dot com
--- Comment #47 from hjl dot tools at gmail dot com 2009-09-25 02:31 --- (In reply to comment #46) > Created an attachment (id=18646) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18646&action=view) [edit] > A patch for gcc 4.4.1 > > I decided to make a patch on my own. Seamonkey

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-24 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #46 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-25 00:56 --- Created an attachment (id=18646) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18646&action=view) A patch for gcc 4.4.1 I decided to make a patch on my own. Seamonkey works with it. It s

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-23 Thread mahatma at eu dot by
--- Comment #45 from mahatma at eu dot by 2009-09-23 18:37 --- (In reply to comment #41) > Created an attachment (id=18618) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18618&action=view) [edit] > An updated patch for gcc 4.4 > Seamonkey still segfault. Still required -mstackrea

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-23 Thread hjl dot tools at gmail dot com
--- Comment #44 from hjl dot tools at gmail dot com 2009-09-23 16:34 --- (In reply to comment #43) > With the patch from comment #41, my test examples pass but seamonkey is still > miscompiled, the function pow5mult still doesn't align the stack and spills > xmm0 on it. > Please find

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #43 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-23 16:28 --- With the patch from comment #41, my test examples pass but seamonkey is still miscompiled, the function pow5mult still doesn't align the stack and spills xmm0 on it. -- http://gcc.gnu.org/

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-20 Thread hjl dot tools at gmail dot com
--- Comment #42 from hjl dot tools at gmail dot com 2009-09-20 18:44 --- (In reply to comment #39) > The updated patch fixes align-counterexample1.c, but not > align-counterexample2.c. Note that you must align the stack for all functions > that have some SSE operations, because you neve

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-20 Thread hjl dot tools at gmail dot com
--- Comment #41 from hjl dot tools at gmail dot com 2009-09-20 18:44 --- Created an attachment (id=18618) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18618&action=view) An updated patch for gcc 4.4 -- hjl dot tools at gmail dot com changed: What|Removed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-20 Thread hjl dot tools at gmail dot com
--- Comment #40 from hjl dot tools at gmail dot com 2009-09-20 18:43 --- Created an attachment (id=18617) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18617&action=view) An updated patch for gcc trunk -- hjl dot tools at gmail dot com changed: What|Removed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-19 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #39 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-20 06:30 --- The updated patch fixes align-counterexample1.c, but not align-counterexample2.c. Note that you must align the stack for all functions that have some SSE operations, because you never know if t

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-19 Thread hjl dot tools at gmail dot com
--- Comment #38 from hjl dot tools at gmail dot com 2009-09-19 21:40 --- (In reply to comment #32) > Created an attachment (id=18578) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18578&action=view) [edit] > A bug example for 4.4 patch > > Shows a bug in 4.4 patch > Please try

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-19 Thread hjl dot tools at gmail dot com
--- Comment #37 from hjl dot tools at gmail dot com 2009-09-19 21:38 --- (In reply to comment #33) > Created an attachment (id=18579) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18579&action=view) [edit] > Another bug in 4.4 patch > > Another bug in 4.4 patch. > This one does

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-19 Thread hjl dot tools at gmail dot com
--- Comment #36 from hjl dot tools at gmail dot com 2009-09-19 21:38 --- Created an attachment (id=18611) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18611&action=view) An updated patch for gcc trunk -- hjl dot tools at gmail dot com changed: What|Removed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-19 Thread hjl dot tools at gmail dot com
--- Comment #35 from hjl dot tools at gmail dot com 2009-09-19 21:37 --- Created an attachment (id=18610) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18610&action=view) An updated patch for gcc 4.4 -- hjl dot tools at gmail dot com changed: What|Removed

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-13 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #34 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-13 14:07 --- So I posted these two examples that show that the patch is insufficient: 1) if the array is embedded in a structure and that structure is on the stack, the stack is not aligned. (if the array

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-13 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #33 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-13 13:59 --- Created an attachment (id=18579) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18579&action=view) Another bug in 4.4 patch Another bug in 4.4 patch. -- http://gcc.gnu.org/bugzilla/s

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-13 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #32 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-13 13:58 --- Created an attachment (id=18578) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18578&action=view) A bug example for 4.4 patch Shows a bug in 4.4 patch -- http://gcc.gnu.org/bugzilla

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-27 Thread mahatma at eu dot by
--- Comment #31 from mahatma at eu dot by 2009-08-27 19:17 --- Seamonkey still more unstable then with 4.3.3. With system libs, -O3 & sse - ruuning only in "safe-mode". All system rebuilt with 4.4.1 & this patch. There are looks like "seamonkey problem" (and I will add "-mno-sse" into eb

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #30 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-08-23 19:28 --- I tested the 4.4 patch and it works fine. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-19 Thread mahatma at eu dot by
--- Comment #29 from mahatma at eu dot by 2009-08-19 19:08 --- (In reply to comment #28) ... > This is not mine and isn't needed. OK. New patch working. While only so (tested in seamonkey with all included libs). Are realigning needed for both states of "TREE_STATIC (decl)"? Now in tre

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-18 Thread hjl dot tools at gmail dot com
--- Comment #28 from hjl dot tools at gmail dot com 2009-08-18 14:01 --- (In reply to comment #27) > (In reply to comment #26) > > *** Bug 40985 has been marked as a duplicate of this bug. *** > > (In reply to comment #25) > > Created an attachment (id=18393) --> (http://gcc.gnu.org/b

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-18 Thread mahatma at eu dot by
--- Comment #27 from mahatma at eu dot by 2009-08-18 11:28 --- (In reply to comment #26) > *** Bug 40985 has been marked as a duplicate of this bug. *** (In reply to comment #25) > Created an attachment (id=18393) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18393&action=view) [e

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-17 Thread hjl dot tools at gmail dot com
--- Comment #26 from hjl dot tools at gmail dot com 2009-08-18 04:50 --- *** Bug 40985 has been marked as a duplicate of this bug. *** -- hjl dot tools at gmail dot com changed: What|Removed |Added -

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-17 Thread hjl dot tools at gmail dot com
--- Comment #25 from hjl dot tools at gmail dot com 2009-08-18 04:43 --- Created an attachment (id=18393) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18393&action=view) A patch for gcc 4.4 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-16 Thread hjl dot tools at gmail dot com
--- Comment #24 from hjl dot tools at gmail dot com 2009-08-16 17:37 --- (In reply to comment #23) > (In reply to comment #21) > > Unfortunatelly, that patch is wrong. It aligns when there is some vector type > in the function but it doesn't align if the autovectorizer creates SSE > in

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-08 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #23 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-08-08 17:30 --- (In reply to comment #21) Unfortunatelly, that patch is wrong. It aligns when there is some vector type in the function but it doesn't align if the autovectorizer creates SSE instructions. Try

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-06 Thread hjl dot tools at gmail dot com
--- Comment #22 from hjl dot tools at gmail dot com 2009-08-06 21:43 --- A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00392.html -- hjl dot tools at gmail dot com changed: What|Removed |Added -

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-06 Thread hjl dot tools at gmail dot com
--- Comment #21 from hjl dot tools at gmail dot com 2009-08-06 21:05 --- Created an attachment (id=18314) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18314&action=view) A patch Here is a patch to automatically realign stack if any SSE variable is put on stack. -- http://gc

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-08-06 Thread hjl dot tools at gmail dot com
--- Comment #20 from hjl dot tools at gmail dot com 2009-08-06 16:48 --- (In reply to comment #19) > (In reply to comment #18) > > Yes. But not an option. Make it default and make it optional to disable the > alignment. Make it default, because such option would be useless if all > lib

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #19 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 16:17 --- (In reply to comment #18) Yes. But not an option. Make it default and make it optional to disable the alignment. Make it default, because such option would be useless if all libraries didn't u

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread hjl dot tools at gmail dot com
--- Comment #18 from hjl dot tools at gmail dot com 2009-07-31 15:51 --- (In reply to comment #17) > "Even if we align the incoming stack properly, we still have to align the > outgoing stack to 16byte" > > I'm not opposing it. What I mean is: every function will have stack frame size

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #17 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 15:31 --- "Even if we align the incoming stack properly, we still have to align the outgoing stack to 16byte" I'm not opposing it. What I mean is: every function will have stack frame size that is multi

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #16 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 15:22 --- H.J. Lu: No, you only have to align the stack in functions that do 16-byte SSE. I mean this: there are two possible reasons for aligning the stack 1) improved performance (double, long double

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread hjl dot tools at gmail dot com
--- Comment #15 from hjl dot tools at gmail dot com 2009-07-31 14:27 --- It is too late to change now. Even if we align the incoming stack properly, we still have to align the outgoing stack to 16byte since the existing binaries which use SSE won't align the stack. That means we have to

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #14 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 13:54 --- Jakub: And how many other "bugs" like this are there? 75% of binaries in /bin are "buggy". Do you think it is really sensible to declare that majority of Linux software is buggy? -- http:/

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-31 Thread jakub at gcc dot gnu dot org
--- Comment #13 from jakub at gcc dot gnu dot org 2009-07-31 07:12 --- So, you found a glibc bug, which can be easily fixed by: --- libc/malloc/Makefile 2009-05-16 19:23:36.0 +0200 +++ libc/malloc/Makefile 2009-07-31 09:09:51.760080072 +0200 @@ -104,6 +104,7 @@ $(objpfx)memusages

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-30 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #12 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 01:04 --- Created an attachment (id=18276) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18276&action=view) Crash because gcc assumes false stack alignment Here I'm submitting an example code that

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-30 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #11 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 01:00 --- So I did this experiment whether the stack is aligned in current Linux binaries. I applied this patch for gcc, so that it crashes on function entry if the function has stack not aligned on 16 b

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #10 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-23 14:36 --- Jakub: so try that "test $15, %esp; jnz abort" at every function, as I proposed in bug #38496. There are much more places that will trigger this. Just go catch them. -- http://gcc.gnu.org/

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread hjl dot tools at gmail dot com
--- Comment #9 from hjl dot tools at gmail dot com 2009-07-23 13:56 --- (In reply to comment #7) > > Another point: if gcc realigns the stack, why then use movdqu to store the > values on the stack? That is suboptimal. > This is a dup for PR 39315. -- http://gcc.gnu.org/bugzilla/

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread jakub at gcc dot gnu dot org
--- Comment #8 from jakub at gcc dot gnu dot org 2009-07-23 13:54 --- Please read Joseph's responses in PR38496. If you are aware of places in glibc that don't maintain 16 byte stack alignment, please report them. Certainly calling glibc (or any other default compiler flags compiled) l

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #7 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-23 13:49 --- See bug #27537, quoting "GNU/Linux follows the SYSV x86 ABI which is documented, maybe you cannot find it but it does exist. The SYSV x86 ABI says the stack is aligned 4 byte aligned." That bug

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread hjl dot tools at gmail dot com
--- Comment #6 from hjl dot tools at gmail dot com 2009-07-23 13:43 --- *** This bug has been marked as a duplicate of 39315 *** -- hjl dot tools at gmail dot com changed: What|Removed |Added --

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread jakub at gcc dot gnu dot org
--- Comment #5 from jakub at gcc dot gnu dot org 2009-07-23 13:24 --- The ABI has changed 8+ years ago, you are coming too late. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #4 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-23 13:19 --- "Linux/ix86 ABI says that stack must be 16 byte aligned." No it doesn't. There is a plenty of Linux code that doesn't have the stack aligned on 16-byte boundary. (at least anything that was com

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread mikulas at artax dot karlin dot mff dot cuni dot cz
--- Comment #3 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-23 13:15 --- What I would propose to fix this and bug #40667: Each type has required alignment and preferred alignment. Enforced alignment is what is needed to not crash and not violate the ABI, preferred a

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread jakub at gcc dot gnu dot org
--- Comment #2 from jakub at gcc dot gnu dot org 2009-07-23 13:13 --- *** This bug has been marked as a duplicate of 38496 *** -- jakub at gcc dot gnu dot org changed: What|Removed |Added --

[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-07-23 Thread jakub at gcc dot gnu dot org
--- Comment #1 from jakub at gcc dot gnu dot org 2009-07-23 12:56 --- Linux/ix86 ABI says that stack must be 16 byte aligned. So GCC can rely on it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838