This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH V2 06/10] C-SKY: Linux Syscall Interface
Hi,
Thanks for the comment.
On Mon, Apr 23, 2018 at 08:32:16AM -0300, Adhemerval Zanella wrote:
> > +#ifdef __CSKYABIV2__
> > + int result = INLINE_SYSCALL (ftruncate64, 3, fd,
> > + __LONG_LONG_PAIR (high, low));
> > +#else
> > + int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
> > + __LONG_LONG_PAIR (high, low));
> > +#endif
> > + return result;
> > +}
> > +weak_alias (__ftruncate64, ftruncate64)
>
> If I understand correctly the ABIv1 requires oven register for 64 bit argument
> passing, which is represented inside glibc as __ASSUME_ALIGNED_REGISTER_PAIRS
> set to 1. So setting it correctly for ABIv1 should make it possible to use
> the generic 'sysdeps/unix/sysv/linux/ftruncate64.c' for c-sky.
>
OK, I'll try the macro and the generic implementation.
> > +
> > +ssize_t
> > +__readahead (int fd, off64_t offset, size_t count)
> > +{
> > + return INLINE_SYSCALL_CALL (readahead, fd,
> > + __ALIGNMENT_ARG SYSCALL_LL64 (offset), count);
> > +}
> > +
> > +weak_alias (__readahead, readahead)
>
> I just sent a patch to consolidate Linux readahead implementation [1]. So most
> likely this new arch-specific file for c-sky would be unnecessary.
>
>
> > +++ b/sysdeps/unix/sysv/linux/csky/scandir64.c
> > @@ -0,0 +1 @@
> > +#include <sysdeps/unix/sysv/linux/i386/scandir64.c>
>
> The 'scandir{at}{64}' consolidation is pushed upstream [2], so this file should
> be unnecessary as well.
>
> [1] https://sourceware.org/ml/libc-alpha/2018-04/msg00471.html
> [2] https://sourceware.org/git/?p=glibc.git;a=commit;h=c0123b3b1118419210879e935620eb2ad987c2f1
OK, I'll change to the consolidated implementation.
Best Regards,
Mao Han