pread64/pwrite64 cleanup
Ralf Baechle
ralf@uni-koblenz.de
Mon May 29 15:54:00 GMT 2000
On Mon, May 29, 2000 at 09:11:24AM +0200, Andreas Jaeger wrote:
> Ralf> Please undo the MIPS part of the change. 32-bit MIPS passed the 64-bit
> Ralf> offset not as the 5th but 6th argument. Praise the ABI ...
>
> Are you sure that it was correct before? We had (for pread.c):
>
> # if defined(__MIPSEB__)
> result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
> # elif defined(__MIPSEL__)
> result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
> # endif
This is correct.
> According to your comment this should be for both endianesses:
> result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0)
No, this must be an missunderstanding. Basically the problem is that a
64-bit argument has to be split into two 32-bit arguments for the
32-bit ABI. Such a pair of arguments has to be passed in an aligned
pair of arguments, that is argumnts 0/1, 2/3, 4/5 etc. but not 1/2 etc.
If necessary fill arguments have to be used.
Ralf
More information about the Libc-hacker
mailing list