Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-14 Thread Segher Boessenkool
On Thu, Dec 13, 2018 at 05:31:28PM -0700, Jeff Law wrote: > On 12/7/18 4:35 PM, Segher Boessenkool wrote: > > Would that work well? Only warn for naked functions? It would work > > better for all users that do *not* mess with the stack in their asm ;-) > What I'm questioning is whether or not thi

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-13 Thread Jeff Law
On 12/7/18 4:35 PM, Segher Boessenkool wrote: > Hi! > > On Fri, Dec 07, 2018 at 07:51:35AM +, Niklas DAHLQUIST wrote: >> On 12/1/18 1:15 AM, Jeff Law wrote: >>> One could argue that allocating stack space inside an ASM is a really >>> bad idea. Consider things like dwarf debugging and unwind

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-08 Thread Segher Boessenkool
Hi! On Fri, Dec 07, 2018 at 07:51:35AM +, Niklas DAHLQUIST wrote: > On 12/1/18 1:15 AM, Jeff Law wrote: > > One could argue that allocating stack space inside an ASM is a really > > bad idea. Consider things like dwarf debugging and unwind tables. If > > you're allocating stack inside an ASM

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-07 Thread Segher Boessenkool
Hi Torbjorn, Just some formatting nitpicking: On Tue, Nov 27, 2018 at 07:45:59PM +, Torbjorn SVENSSON wrote: > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 38e27a50a1e..e61ddc3260b 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -6456,7 +6456,7 @@ Warn if

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-06 Thread Niklas DAHLQUIST
On 12/1/18 1:15 AM, Jeff Law wrote: > On 11/26/18 7:02 AM, Torbjorn SVENSSON wrote: >> Hi, >> >> Attached is a small patch that, in case of inline assembler code, >> indicates that the function stack usage is uncertain due to inline >> assembler. >> >> The test suite are using "nop" as an assembler

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-11-30 Thread Jeff Law
On 11/26/18 7:02 AM, Torbjorn SVENSSON wrote: > Hi, > > Attached is a small patch that, in case of inline assembler code, > indicates that the function stack usage is uncertain due to inline > assembler. > > The test suite are using "nop" as an assembler instruction on all > targets, is this a

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-11-27 Thread Torbjorn SVENSSON
Hi! Thanks for the feedback. Attached is an updated patch where I switched to the NOP define instead. I'm not sure if stack-usage-naked.c should be moved to gcc.dg-tree, or if it should skip using the nop.h file (it feels wrong to do #include "../../gcc.dg/nop.h" from within gcc.taget-tree). To

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-11-27 Thread Segher Boessenkool
Hi! On Mon, Nov 26, 2018 at 02:02:49PM +, Torbjorn SVENSSON wrote: > Attached is a small patch that, in case of inline assembler code, > indicates that the function stack usage is uncertain due to inline > assembler. > > The test suite are using "nop" as an assembler instruction on all > t

[PATCH] Added information about inline assembler in stack calculations (.su files)

2018-11-26 Thread Torbjorn SVENSSON
Hi, Attached is a small patch that, in case of inline assembler code, indicates that the function stack usage is uncertain due to inline assembler. The test suite are using "nop" as an assembler instruction on all targets, is this acceptable or is there a better way to test this? Patch has be