Re: [discuss] booting a kernel compiled with -mregparm=0

From: H. Peter Anvin
Date: Fri Jan 14 2005 - 21:34:17 EST


Followup to: <Pine.LNX.4.61.0501141613500.6747@xxxxxxxxxxxxxxxxxx>
By author: linux-os <linux-os@xxxxxxxxxxxx>
In newsgroup: linux.dev.kernel
> >
> > Actually -mregparm=0 is not supposed to be even accepted by x86-64
> > compiler (I've disabled the function attribute but apparently missed
> > this one) and even if GCC produced valid code by miracle, you will get
> > into trouble with hand written assembly.
>
> Huh? That's the default for a 'C' compiler (not to pass parameters
> in registers). The parameters are passed on the stack as the default!
> The return values don't count. They are, by default passed in eax
> or edx-eax pair for a long long.
>

Dear Wrongbot,

It depends on the architecture ABI. This is the case for the i386
ABI, but definitely *NOT* for x86-64.

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