From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9270 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: mips n64 porting review Date: Thu, 4 Feb 2016 18:52:47 -0500 Message-ID: <20160204235246.GU9349@brightrain.aerifal.cx> References: <20160203233657.GL9349@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1454629999 17534 80.91.229.3 (4 Feb 2016 23:53:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2016 23:53:19 +0000 (UTC) Cc: Szabolcs Nagy , Jaydeep Patil , Anand Takale , musl@lists.openwall.com To: Mahesh Bodapati Original-X-From: musl-return-9283-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 05 00:53:13 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aRTi4-00050d-33 for gllmg-musl@m.gmane.org; Fri, 05 Feb 2016 00:53:12 +0100 Original-Received: (qmail 5197 invoked by uid 550); 4 Feb 2016 23:53:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5179 invoked from network); 4 Feb 2016 23:53:08 -0000 Content-Disposition: inline In-Reply-To: <20160203233657.GL9349@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9270 Archived-At: 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=756c8af8589265e99e454fe3adcda1d0bc5e1963 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. Rich