This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add LOAD_ARG[1-6]_TYPE and x32 posix_fallocate.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]