Hi all,
I think that the following behaviour of gcc is intended, but it's strange
that gcc uses only one register to return a long long value from a
function and expands it in a curious way to be a 64-bit value again
(something like mov r1, r0, asr #31).
The following just won't work:
long long foo(long long test) {return test;}
int main() {
long long test = 0x1010101010101010;
if (foo(test) == test) printf("I'm happy");
}
Another thing that just won't work is the use of llseek() in defrag. I had
to use the syscall wrapper and change all the function calls to its own
llseek() implementation to use long long * as the return value. Thats what
the kernel does. But this means that the libc llseek() won't work in every
case (when the returned value is compared to a "real" long long the
values will not match even if they should).
Does APCS definitely forbid the use of r0 & r1 as return registers for
long longs??
Thanks for any answers
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++