[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Semaphore assembly-code bug

On Fri, 29 Oct 2004, Andi Kleen wrote:
> > Richard, Jan, Andi? Or does it already exist somewhere?
> How about just using __attribute__((regparm(1))) ? Then the
> problem doesn't appear.

Yes, we could use regparm for all assembly. Right now "asmlinkage"
actually _disables_ regparm so that we always have the same calling
convention for assembly regardless of whether the rest of the kernel is
compiled with regparm or not, but we could certainly change that

#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))

to use "regparm(3)" instead. I guess it's stable these days, since we use
it for FASTCALL() and friends too.

> Would be faster too. It should work reliable on all supported compilers.

What's happens if there are more arguments than three? It happens for
several system calls - does gcc still consider the stack part of the thing
to be owned by the callee?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.098 / U:5.460 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site