Date: Mon, 15 Feb 2016 04:46:47 +0000 From: Jaydeep Patil <Jaydeep.Patil@...tec.com> To: Rich Felker <dalias@...c.org>, Mahesh Bodapati <Mahesh.Bodapati@...tec.com> CC: Szabolcs Nagy <nsz@...t70.net>, Anand Takale <Anand.Takale@...tec.com>, "musl@...ts.openwall.com" <musl@...ts.openwall.com> Subject: RE: Re: mips n64 porting review Hi Rich, Thanks for your comments. We are working on rebasing the patch. Regards, Jaydeep -----Original Message----- From: Rich Felker [mailto:dalias@...ifal.cx] On Behalf Of Rich Felker Sent: 13 February 2016 AM 12:21 To: Mahesh Bodapati Cc: Szabolcs Nagy; Jaydeep Patil; Anand Takale; musl@...ts.openwall.com Subject: Re: [musl] Re: mips n64 porting review On Thu, Feb 04, 2016 at 11:27:34PM -0500, Rich Felker wrote: > On Thu, Feb 04, 2016 at 06:52:47PM -0500, Rich Felker wrote: > > On Wed, Feb 03, 2016 at 06:36:57PM -0500, Rich Felker wrote: > > > On Wed, Feb 03, 2016 at 03:41:13PM +0000, Mahesh Bodapati wrote: > > > > Hi Rich, > > > > I have attached the patch which has all the MIPS n64 porting > > > > work. I have created mips64port remote branch on GitHub and the > > > > repository is > > > > https://github.com/MaheshBodapati/musl/tree/mips64port which has > > > > the broken down patches and the base revision on which I have prepared patch is v1.1.12-41-g3abb094. > > > > > > Some preliminary review: > > > > One more thing that came up in reviewing syscall_cp.s was actually a > > bug copied from existing code in musl, which is fixed by this commit: > > > > http://git.musl-libc.org/cgit/musl/commit/?id=756c8af8589265e99e454f > > e3adcda1d0bc5e1963 > > > > In practice the code seemed to work but it was wrong with respect to > > ABI requirements. > > > > I think the way you're saving $gp on the stack in sigsetjmp.s is > > also invalid since that part of the stack will have been clobbered > > by the time setjmp returns a second time. You could save it inside > > an unused part of the jump buffer, but it might be better to just > > avoid the $gp register and instead use temp registers and possibly > > some pc-relative address computations. > > Likewise in pipe.s, it's overly complicated by the fact that it's > saving $gp on the stack and thereby can't make a tail call to > __syscall_ret like it's intended to. If you just use a different > register instead of $gp that's call-clobbered you can tail-call just > like the 32-bit mips version. Alternatively it's possible now to write > src/unistd/mips64/pipe.c instead using inline asm and let the compiler > handle the nastiness of the calling convention. I'd be happy with > either approach; the C version is probably mildly nicer, especially if > the compiler still does the tail-call right and doesn't generate come > bloated monstrosity. (Note that you can't use C for sigsetjmp though > because it can't use the stack.) > > At this point I think I've looked through all the mips64 files at > least once and caught all the important issues. Ping. Any questions or updates on mips64? Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.