[coreboot] __attribute__((stdcall)) vs. __attribute__((regparm(0)))

Myles Watson mylesgw at gmail.com
Thu Oct 16 17:45:06 CEST 2008



> -----Original Message-----
> From: ron minnich [mailto:rminnich at gmail.com]
> Sent: Thursday, October 16, 2008 9:41 AM
> To: Myles Watson
> Cc: Segher Boessenkool; Carl-Daniel Hailfinger; Coreboot
> Subject: Re: [coreboot] __attribute__((stdcall)) vs.
> __attribute__((regparm(0)))
> 
> On Thu, Oct 16, 2008 at 7:58 AM, Myles Watson <mylesgw at gmail.com> wrote:
> 
> >
> > The question is what attribute can be used to make those functions have
> the
> > normal calling convention when compiling with -mregparm=3.  We're using
> > -mregparm=3 for speed reasons.
> >
> 
> The simplest thing: put all the functions that need regparm=0 in one
> file, compile that file with regparm=0

There's a warning in the man pages for gcc that says that you have to
compile all the functions (including libraries) with the same setting.

Myles






More information about the coreboot mailing list