From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 02:56:21 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 E476B1065672 for ; Thu, 4 Feb 2010 02:56:21 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34402.mail.mud.yahoo.com (web34402.mail.mud.yahoo.com [66.163.178.151]) by mx1.freebsd.org (Postfix) with SMTP id A2D948FC0C for ; Thu, 4 Feb 2010 02:56:21 +0000 (UTC) Received: (qmail 7550 invoked by uid 60001); 4 Feb 2010 02:56:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265252180; bh=80ZybuTSxXH62XFI9LCSKfqVvtcwSraHcJhh0beOiHY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=JAkBsE/2+1B0D8MHGN2xp8aFdGh+XpgLVbYdEbMsCOqX4Qce6tb+TTry9ETAHYfCFsxoZuXPHoWuGNUqQJtA9pNDtK+56X2ka0tidFN/6WRvgI7grYiX8cHhN6DO++nhEJQhw6JLwsEHBWbVBU03zCoxl00oYRQKmuCIA6ccwe8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=wC7gNFwVEcxNRYRbPB8+czOOBSkmkjwZjZg+qmaRlExm/gILua62/6N7Tap0ZrwkfaIkKEnE22GvIDcd1Wu/ciPgNt0D/zKLmf+LIZu0za1XesK4q1T9hFd6OqzURSrv4hThANgYTbtdJFAKlqofhyA/xW/STSRLaV+to4f0x0E=; Message-ID: <940379.6969.qm@web34402.mail.mud.yahoo.com> X-YMail-OSG: 8MMGFToVM1nZt9aBiyKfWzQ3ZbkPFepfvJdtWXAcW3M4L921qP26MAW74rz88TnEiDZrBEvtqSpcoKojWls4XfnxNnIDCs1Q08GWirq1FpKbG6mVvSyqw0d0XsjJMzdw408dKNuIEZ4BTp6bNyfNVpfK97349dVHzwMEGMxgH9kpIa6yku02UT55ZD45YbmYFJ8_fdGjv2eok0Q0y7pWkZd0tWi5F1DGiG6wOY8Zp5VbwcABI6YEmJggSWB6P.Mzfmqs3HqstuLTQAk7gwqSRc.UsOnx.6Ld2a26f8fPNIvxpfox5yL4RjZRvuRTAkThjWIR6icQwhmC_g-- Received: from [198.95.226.228] by web34402.mail.mud.yahoo.com via HTTP; Wed, 03 Feb 2010 18:56:20 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Wed, 3 Feb 2010 18:56:20 -0800 (PST) From: Neelkanth Natu To: "C. Jayachandran" In-Reply-To: <98a59be81002031809p70f0154dnd9a1744ade7aac33@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 02:56:22 -0000 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. >