lkml.org 
[lkml]   [2004]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: long long on 32-bit machines
H. Peter Anvin writes:

> 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?

Are you are talking about passing arguments to a function? PPC32
passes long long arguments in two registers in the order you would
expect (hi, lo), BUT you have to use an odd/even register pair. In
other words, if you have a function like this:

int foo(int a, long long b)

then a will be passed in r3 and b will be passed in r5 and r6, and r4
will be unused.

Regards,
Paul.
-
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: 2005-03-22 14:00    [W:0.119 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site