This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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, RFC] MIPS: Implement the getcontext API


On Sat, Apr 18, 2009 at 05:32:48PM +0000, Joseph S. Myers wrote:
> On Sat, 18 Apr 2009, Ralf Baechle wrote:
> 
> > On Wed, Apr 15, 2009 at 08:19:33PM +0000, Joseph S. Myers wrote:
> > 
> > > >  Here is code to implement the getcontext API for MIPS.  This glibc patch 
> > > > is sent to the linux-mips mailing list, because it makes use of an 
> > > > internal syscall which has not been designated as a part of the public 
> > > > ABI.  I am writing to request this syscall to become fixed as a part of 
> > > > the ABI or to seek for an alternative.  See below for the rationale.
> > > 
> > > Was there any conclusion about whether the assumptions this patch makes 
> > > about the kernel are OK (and so it can go in) or not?
> > 
> > I've probably not spelled it out clearly enough in an earlier email on
> > this topic but yes, I think it's ok.  In all reality the stackframe has
> > de facto become a part of the ABI that needs to be kept stable.
> 
> Thanks - I've now committed the patch.
> 

Note that this code does not compile on mips64, I get the following
error from binutils (2.19.1):
../ports/sysdeps/unix/sysv/linux/mips/getcontext.S: Assembler messages:
../ports/sysdeps/unix/sysv/linux/mips/getcontext.S:102: Error: illegal operands `s.d fs6,(30*8+296)($4)'
../ports/sysdeps/unix/sysv/linux/mips/getcontext.S:103: Error: illegal operands `s.d fs7,(31*8+296)($4)'

The corresponding code lines are:

 98        s.d     fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
 99        s.d     fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
100        s.d     fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
101        s.d     fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
102        s.d     fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
103        s.d     fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


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