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] mips/o32: fix internal_syscall5/6/7


On 2017-08-18 23:27, Maciej W. Rozycki wrote:
> On Fri, 18 Aug 2017, Aurelien Jarno wrote:
> 
> > > > I am using GCC 6, so if the fix went in GCC 7, that's normal the issue
> > > > is present.
> > > 
> > >  OK then; you can use the workaround I suggested to verify MIPS16 
> > > compilation then.
> > 
> > The workaround didn't work.
> 
>  Hmm, that means there's something wrong with binutils which needs fixing.  
> Can you please send me the failing .s file and the command line used to 
> assemble it (from `gcc -v')?

Please find that attached.

> > > > That's an interesting idea. If we use a different stub depending on the
> > > > number of arguments, we can actually pass the syscall number last, which
> > > > is probably more readable. Could also be used for mips16 in all cases?
> > > 
> > >  MIPS16 wrappers do that already, which is also why there is an individual 
> > > one for each syscall argument count.
> > 
> > Please find below a new patch implementing that. It started to be
> > complicated to get the MIPS16 related defines used to build the 
> > equivalent code through GCC to work, so I decided to also implement
> > __libc_do_syscall0 to __libc_do_syscall4 in libc-do-syscall.S. I looked
> > at the original code generated by GCC, it's very similar to what I used,
> > sometimes just a bit longer (sometimes GCC saves the syscall number to
> > the stack to reload it just after).
> 
>  The MIPS16 wrappers were split into individual files so that only ones 
> that are actually used by `ld.so' are pulled.  I think it would be good if 
> we preserved that.  I'll see if I can experiment with keeping the original 
> MIPS16 0-3 wrappers.

For what I have seen, ld.so already uses syscalls with 1 to 4 arguments.
It doesn't use any syscall without argument though. So it's only 4
instructions overhead.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

Attachment: dl-tunables.cmd.gz
Description: application/gzip

Attachment: dl-tunables.s.gz
Description: application/gzip


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