This is the mail archive of the
mailing list for the GCC project.
Re: Can shrink-wrapping ever move prologue past an ASM statement?
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Josh Poimboeuf <jpoimboe at redhat dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>, Vojtech Pavlik <vojtech at suse dot cz>
- Date: Wed, 8 Jul 2015 11:37:35 -0500
- Subject: Re: Can shrink-wrapping ever move prologue past an ASM statement?
- Authentication-results: sourceware.org; auth=none
- References: <20150707175349 dot GA2325 at virgil dot suse dot cz> <20150707184415 dot GB13004 at gate dot crashing dot org> <20150708092309 dot GB2325 at virgil dot suse dot cz> <20150708103631 dot GA23975 at gate dot crashing dot org> <20150708162234 dot GB4687 at treble dot redhat dot com>
On Wed, Jul 08, 2015 at 11:22:34AM -0500, Josh Poimboeuf wrote:
> > Writing the asm with a clobber of the stack pointer causes all stack
> > accesses to go via the frame pointer, which causes pretty horrible
> > code.
> As far as I can tell, most (but not all) kernel stack accesses already
> occur via the frame pointer anyway. Is that bad? Can you clarify what
> you mean by horrible code?
If you already have a frame pointer anyway it won't get much worse,
If you don't have one yet you will get one, and a stack frame, and
all that boilerplate. You don't want to force that if you don't