PATCH: Add LOAD_ARG[1-6]_TYPE and x32 posix_fallocate.c
Roland McGrath
roland@hack.frob.com
Mon May 21 21:19:00 GMT 2012
That is inordinately ugly.
AFAICT the existing x86_64 behavior for a syscall argument of a
smaller integer type (e.g. int, i.e. int32_t) is to sign-extend that
value to 64 bits in the syscall argument register. So what would be
the practical effect of just making LOAD_ARGS* just use 'long long
int' throughout? It won't make any difference to x86_64, and for x32
it will just sign-extend any signed smaller-typed values (and make no
difference for unsigned types). I think if you actually make it
'unsigned long long int' then that will correctly sign-extend int32_t
(and smaller integer types) but zero-extend pointer types.
Thanks,
Roland
More information about the Libc-alpha
mailing list