lkml.org 
[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.271 / U:8.480 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site