[PATCH 3/4] Consolidate pread/pread64 implementations
Mike Frysinger
vapier@gentoo.org
Tue Jan 5 00:53:00 GMT 2016
On 04 Jan 2016 10:42, Adhemerval Zanella wrote:
> On 29-12-2015 15:28, Mike Frysinger wrote:
> > On 18 Nov 2015 12:02, Adhemerval Zanella wrote:
> >> This patch consolidates all the pread/pread64 implementation for Linux
> >> in only one (sysdeps/unix/sysv/linux/pread.c). It also removes the
> >> syscall from the auto-generation using assembly macros.
> >>
> >> For pread{64} offset argument placement the new SYSCALL_LL{64} macro
> >> is used. For pread ports that do not define __NR_pread will use
> >> __NR_pread64 and for pread64 ports that dot define __NR_pread64 will
> >> use __NR_pread for the syscall.
> >
> > pretty sure you just broke sh here. while it doesn't have the 64-bit
> > arg alignment issue, it has a wart where it copied the kernel interface
> > of one. you can see it in the files you deleted:
>
> Indeed, my understanding is SH also requires __ASSUME_ALIGNED_REGISTER_PAIRS.
> I will change it for the 1/4 patch part.
just to be clear, SuperH (the ABI) does not have these 64-bit register
pair requirements like ARM/EABI. its syscall ABI for pread64/pwrite64
has legacy cruft where there's a dummy reg before the 64-bit value. so
you can (and want) to use the same logic just for these two syscalls as
the result happens to look the same.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160105/9c5540ca/attachment.sig>
More information about the Libc-alpha
mailing list