From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24360 invoked by alias); 23 Aug 2005 11:41:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24157 invoked by alias); 23 Aug 2005 11:41:30 -0000 Date: Tue, 23 Aug 2005 11:42:00 -0000 Message-ID: <20050823114130.24156.qmail@sourceware.org> From: "ncunningham at cyclades dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030805124527.11807.aw11@os.inf.tu-dresden.de> References: <20030805124527.11807.aw11@os.inf.tu-dresden.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug inline-asm/11807] GCC should error out when clobbering the stack pointer and frame pointer X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02662.txt.bz2 List-Id: ------- Additional Comments From ncunningham at cyclades dot com 2005-08-23 11:41 ------- Subject: Re: GCC should error out when clobbering the stack pointer and frame pointer The function needs to be inlined - the return value especially is pivotal in the transition from the booted kernel context to the suspended one. That said, I'm no x86 assembly guru, so there might be a way around it. Regards, Nigel On Tue, 2005-08-23 at 21:34, pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-23 11:34 ------- > (In reply to comment #20) > > gcc shouldn't always error out in this situation. For suspend to disk, we > > clobber all registers when restoring the original cpu context after copying back > > the original kernel context. We could lie to gcc and say we don't clobber the > > register, but I'd prefer to be honest :> > > You know you can use a function to do that and a .s file for that right? You don't need to use an inline- > asm, right? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11807