From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 13:59:09 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C678F106566C for ; Thu, 4 Feb 2010 13:59:09 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 688148FC19 for ; Thu, 4 Feb 2010 13:59:09 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o14Dx7uk027097 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 4 Feb 2010 08:59:08 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: Neelkanth Natu In-Reply-To: <203531.99897.qm@web34402.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 4 Feb 2010 05:59:07 -0800 References: <203531.99897.qm@web34402.mail.mud.yahoo.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 13:59:09 -0000 Thanks Neel ;-) I would imagine you did NOT put the wrong spacing back in though.. right? R On Feb 3, 2010, at 9:52 PM, Neelkanth Natu wrote: > Hi, > > I have committed JC's original patch to restore the 'gp' register > after the 'jalr'. > > http://svn.freebsd.org/viewvc/base?view=revision&revision=203475 > > Sorry about the churn. > > best > Neel > > --- On Wed, 2/3/10, Neelkanth Natu wrote: > >> From: Neelkanth Natu >> Subject: Re: mips ptrace.S fix >> To: "C. Jayachandran" >> Cc: "Rui Paulo" , freebsd-mips@freebsd.org >> Date: Wednesday, February 3, 2010, 6:56 PM >> Hi JC, >> >> --- On Wed, 2/3/10, C. Jayachandran >> wrote: >> >>> From: C. Jayachandran >>> Subject: Re: mips ptrace.S fix >>> To: "Neelkanth Natu" >>> Cc: "Rui Paulo" , >> freebsd-mips@freebsd.org >>> Date: Wednesday, February 3, 2010, 6:09 PM >>> On Thu, Feb 4, 2010 at 1:01 AM, >>> Neelkanth Natu >>> wrote: >>>> Your patch looks good. I have a few comments >> though. >>> See inline: >>>> >>>> Index: lib/libc/mips/sys/ptrace.S >>>> >>> >> =================================================================== >>>> --- lib/libc/mips/sys/ptrace.S (revision >> 203379) >>>> +++ lib/libc/mips/sys/ptrace.S (working >> copy) >>>> @@ -42,14 +42,26 @@ >>>> #endif /* LIBC_SCCS and not lint */ >>>> >>>> LEAF(ptrace) >>>> + .frame >> sp,40,ra >>>> >>>>>> space missing after the ',' >>>> >>>> + >> .mask 0x80000000, -8 >>>> #ifdef __ABICALLS__ >>>> .set >> noreorder >>>> .cpload t9 >>>> .set >> reorder >>>> #endif >>>> + subu >> sp, sp, 40 >>>> + sw >> ra, 32(sp) >>>> +#ifdef __ABICALLS__ >>>> + .cprestore 16 >>>> +#endif >>>> la >> t9, _C_LABEL(__error) # >>> locate address of errno >>>> - jalr >> t9 >>>> + jalr >> t9 >>>> >>>>>> this change is not required - the newly >> added >>> line has a tab at the end. >>>> >>>> +#ifdef __ABICALLS__ >>>> + lw >> gp, 16(sp) >>>> +#endif >>>> >>>>>> this is redundant - the assembler will >>> generate exactly the same line of >>>>>> code due to the .cprestore directive >> above. >>> >>> Are you sure about this? I think the assembler >>> generates the gp load >>> only for the 'jal' and 'bal' not for 'jalr'. >>> >>> Probably the two lines(la and jalr) can be replaced by >> a >>> jal. >>> >> >> You are right. My eyes glossed over between the 'jal' and >> 'jalr'. I think >> combining the two instructions into a single 'jal' is the >> way to go. >> >> best >> Neel >> >>> Regards, >>> JC. >>> >> >> >> >> > > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct)