Re: long long on 32-bit machines

From: Arnd Bergmann
Date: Wed Jan 28 2004 - 14:28:41 EST



H.P.A wrote:

> Does anyone happen to know if there are *any* 32-bit architectures (on
> which Linux runs) for which the ABI for a "long long" is different from
> passing two "longs" in the appropriate order, i.e. (hi,lo) for bigendian
> or (lo,hi) for littleendian?

Some architectures require long long arguments to be passed as an
even/odd register pair. For example on s390,

void f(int a, int b, long long x)

uses registers 2, 3, 4 and 5, while

void f(int a, long long x, int b)

uses registers 2, 4, 5 and 6. AFAIK, mips does the same, probably others
as well.

Arnd <><
-
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/