[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2017-03-28 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #26 from uros at gcc dot gnu.org --- Author: uros Date: Tue Mar 28 16:51:00 2017 New Revision: 246543 URL: https://gcc.gnu.org/viewcvs?rev=246543&root=gcc&view=rev Log: PR target/53383 * config/i386/i386.c (ix86_option

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2017-03-28 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #25 from Uroš Bizjak --- (In reply to Katsunori Kumatani from comment #24) > I think this bug should be reopened because the current behavior is > restricting. [...] I agree. Let's remove this artificial dependency on -msse. Patch

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2017-03-28 Thread katsunori.kumatani at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 Katsunori Kumatani changed: What|Removed |Added CC||katsunori.kumatani at gmail dot co

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2015-07-06 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #23 from hjl at gcc dot gnu.org --- Author: hjl Date: Mon Jul 6 11:50:47 2015 New Revision: 225452 URL: https://gcc.gnu.org/viewcvs?rev=225452&root=gcc&view=rev Log: Allow -mincoming-stack-boundary=3 with -mno-sse Similar to -mpref

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2015-07-05 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #22 from H.J. Lu --- (In reply to Andy Lutomirski from comment #21) > $ touch foo.c > $ gcc -c -mno-sse -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3 > foo.c > foo.c:1:0: error: -mincoming-stack-boundary=3 is not between 4

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2015-07-05 Thread luto at mit dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #21 from Andy Lutomirski --- (In reply to H.J. Lu from comment #20) > (In reply to Andy Lutomirski from comment #19) > > I don't think the fix is correct. > > > > This works: > > > > gcc -mno-sse -mpreferred-stack-boundary=3 ... > >

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2015-07-05 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #20 from H.J. Lu --- (In reply to Andy Lutomirski from comment #19) > I don't think the fix is correct. > > This works: > > gcc -mno-sse -mpreferred-stack-boundary=3 ... > > This does not: > > gcc -mno-sse -mpreferred-stack-bounda

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2015-07-05 Thread luto at mit dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 Andy Lutomirski changed: What|Removed |Added CC||luto at mit dot edu --- Comment #19 fr

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2013-02-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 Paolo Carlini changed: What|Removed |Added CC||ogoffart at kde dot org --- Com

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-06-22 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-06-22 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-06-22 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #16 from hjl at gcc dot gnu.org 2012-06-22 17:11:10 UTC --- Author: hjl Date: Fri Jun 22 17:10:58 2012 New Revision: 188893 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188893 Log: Allow -mpreferred-stack-boundary=3 on x86-6

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 H.J. Lu changed: What|Removed |Added URL||http://gcc.gnu.org/ml/gcc-p |

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #14 from H.J. Lu 2012-05-20 14:28:18 UTC --- (In reply to comment #12) > > Not when you call function with -fpreferred-stack-boundary=3 > and it is itself compiled with -fpreferred-stack-boudnary=4 > and calls another functions passi

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #13 from Jan Hubicka 2012-05-20 11:34:27 UTC --- > > This isn't necessary. If __int128 is put on stack by caller, > > the stack must be aligned at 16 bytes. > > Not when you call function with -fpreferred-stack-boundary=3 > and it i

Re: [Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread Jan Hubicka
> > This isn't necessary. If __int128 is put on stack by caller, > > the stack must be aligned at 16 bytes. > > Not when you call function with -fpreferred-stack-boundary=3 > and it is itself compiled with -fpreferred-stack-boudnary=4 > and calls another functions passing __int128. > Thus the ABI

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #12 from Jan Hubicka 2012-05-20 10:15:06 UTC --- > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 > > --- Comment #11 from H.J. Lu 2012-05-20 02:04:40 > UTC --- > (In reply to comment #10) > > The problem is va_args doing alignm

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-19 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #11 from H.J. Lu 2012-05-20 02:04:40 UTC --- (In reply to comment #10) > The problem is va_args doing alignment based on stack pointer, i.e. in: > int > > return va_arg (p, __int128); > } > > addq$15, %rax > an

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-19 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #10 from Jan Hubicka 2012-05-19 21:47:39 UTC --- The problem is va_args doing alignment based on stack pointer, i.e. in: int test (int a, ...) { va_list p; va_start (p, a); va_arg (p, int); va_arg (p, int); va_arg (p,

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-19 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #9 from H.J. Lu 2012-05-19 21:03:10 UTC --- With this patch: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index eca542c..3e4e768 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3660,9 +3660,14 @@

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-19 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #8 from Jan Hubicka 2012-05-19 19:14:18 UTC --- __int128 do not require SSE and yet it is 128bit aligned I am not against allowing smaller alignments, we just need to document it breaks ABI and it would be nice to explain how (and

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-18 Thread hpa at zytor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #7 from H. Peter Anvin 2012-05-18 15:23:05 UTC --- We can't use the SSE parts of the ABI anyway in the kernel, and I sure hope that -mno-sse (or perhaps -mcmodel=kernel, but that would be ugly) prevents those from being generated. Ye

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-18 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment #6 f

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-18 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-17 Thread hpa at zytor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #5 from H. Peter Anvin 2012-05-17 16:09:19 UTC --- The point is that the key is -mno-sse, not -mcmodel=kernel.

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-17 Thread hpa at zytor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #4 from H. Peter Anvin 2012-05-17 15:59:28 UTC --- Only if the program in question is actually using SSE. If SSE is disallowed (because it is kernel code, or some other embedded piece of code) it is irrelevant.

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #3 from H.J. Lu 2012-05-17 15:37:02 UTC --- Following the x86-64 psABI, GCC assumes incoming stack is 16byte aligned and generates 16-byte aligned vector move on stack. If it isn't true, you will get segfault at run-time.

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-17 Thread hpa at zytor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 --- Comment #2 from H. Peter Anvin 2012-05-17 14:11:23 UTC --- Why would -mcmodel=kernel matter for this? (For the record, there is C code in the Linux kernel which doesn't use -mcmodel=kernel, too, and other embedded programs may very well have

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 H.J. Lu changed: What|Removed |Added CC||hjl.tools at gmail dot com, |