32-bit ABI for passing 64-bit quantities to functions
the 32-bit ABI specifies that 64-bit quantities are passed aligned to 64-bit boundaries. So int foo(int a, long long b) passes a in gr26, and b in gr24 & gr23, leaving gr25 unused. this is a problem in our syscall interface, because glibc picks the 64-bit quantity apart into high and low words and passes them individually. meanwhile the syscall is prototyped as above and expects the arguments in different registers... strangely, this fails to work well.
now, all the syscalls are marked with `asmlinkage', which is currently null on pa. if we had an __attribute__((packed-args)) we could use that with little pain. alternatively, we could add a -fpacked-args compile option, which tells gcc to always pack arguments. we could compile the whole kernel with this -- i don't know why this ABI choice was made. Cary, could you comment?
Signature · 1 line
Revolutions do not require corporate support.