On Wed, 2004-03-17 at 09:38 -0500, Alan Cox wrote:
On Wed, Mar 17, 2004 at 12:47:13AM +0100, Earle Robert Nietzel
wrote:
> Come to find out that in "arch/i386/Makefile":
>
> CFLAGS += -pipe -mregparm=3 -msoft-float -fno-builtin-sprintf -fno-
> builtin-log2 -fno-builtin-puts
>
> You'll notice "-mregparm=3"?
>
> After removing this compiler flag my binary modules began to load
> correctly.
>
> Anyone care to comment on this?
Your binary modules need to match the kernel. -mregparm=3 tells the
kernel to try and use registers for some of the argument passing, and
thus be more efficient
I patched the ATI fglrx driver so that it compiles with -mregparm=3 and
the performance difference is noticably faster.
I understand the reason for using fastcalls but could you explain the
syntax implementation?
For example I know GCC uses a __attribute__((cdecl)) but the actual
details behind this are not obvious to me.
Thanks for your time and patience!