[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-18 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 Michael Matz matz at gcc dot gnu.org changed: What|Removed |Added CC||matz at gcc dot

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #6 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-17 13:29:56 UTC --- (In reply to comment #5) Yeah, 128 bytes below %rsp can be freely used on x86_64, interrupts must not clobber those. I should have mentioned that this

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #7 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-17 13:42:23 UTC --- I think what is happening in the compiler BTW is that a sub $XX, %rsp is dropping out, perhaps as an optimization. If for example, you comment out the

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-17 14:01:51 UTC --- It is of course fine if an interrupt uses the same stack, after all, user interrupts do that too. But the ABI says that 128 bytes below the %rsp are reserved,

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #10 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-17 14:49:33 UTC --- And the compile (and the compile in the rc script here) is indeed specifying -mcmodel=kernel in the flags.

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #9 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-17 14:47:34 UTC --- (In reply to comment #8) ... the ABI says that 128 bytes below the %rsp are reserved, so the interrupt code first needs to subtract 128 from %rsp before

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #11 from Mikael Pettersson mikpe at it dot uu.se 2011-05-17 16:58:02 UTC --- (In reply to comment #10) And the compile (and the compile in the rc script here) is indeed specifying -mcmodel=kernel in the flags. -mcmodel=kernel isn't

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-17 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #12 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-17 18:42:47 UTC --- (In reply to comment #11) (In reply to comment #10) And the compile (and the compile in the rc script here) is indeed specifying -mcmodel=kernel

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-16 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #1 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-16 22:45:58 UTC --- Created attachment 24257 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24257 The source file which generates the problem This file, when compiled via

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-16 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #2 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-16 22:49:14 UTC --- Created attachment 24258 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24258 The output of running rc with -v -save-temps added. This is the output

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-16 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #4 from Andrew Pinski pinskia at gcc dot gnu.org 2011-05-16 23:09:13 UTC --- Well x86_64 ABI has a red zone which allows for these references to happen if they are under 128 bytes.

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-16 Thread merrill_707_1 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 --- Comment #3 from Lee Merrill merrill_707_1 at yahoo dot com 2011-05-16 22:51:33 UTC --- A disassembly snippet to show the problem: fcPostWrite: 0: 55 push %rbp 1: 48 89 e5mov

[Bug c/49016] always_inline causes references below the current stack pointer

2011-05-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED