From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 02:09:34 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 D331D106568B; Thu, 4 Feb 2010 02:09:34 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id A1CFA8FC22; Thu, 4 Feb 2010 02:09:33 +0000 (UTC) Received: by pxi13 with SMTP id 13so817348pxi.3 for ; Wed, 03 Feb 2010 18:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VZPVqlMANYP4lFilxI+J6IGRbyOwdmHVEiFetdL5jmU=; b=gHA3wSjmgaiPXc3FEMtU5zOyex2CqlWYvgSAULjIuNu/fQUF+3kkrBDf6bcSIdZ1Ua pP6r4+sNFgXS12IxqtwGJud7yOYvu7s9/Un8QbyuYF39FFiK5sk/SFNyldrvcqbfJaKu /95NEcRvw7vjAZnBX8NRNukIZGv6Gxe5sR11E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YcyAcJxJ8/as7tkkDuTsxmV8x6gHukgxUHfwf5g6r50VNK4kevlTLcT29sksl9x+/4 po/GY/XzZlPiYTKUA32SdmX+3BJHUAdT+KhQbDwH03ZzmH6sYYVhcM8groLe3frQ18j0 poz2gOsZ6+XTmHoQSgZ4+QdHVzar0pLsIRByY= MIME-Version: 1.0 Received: by 10.141.23.16 with SMTP id a16mr331559rvj.95.1265249372313; Wed, 03 Feb 2010 18:09:32 -0800 (PST) In-Reply-To: <296949.49663.qm@web34402.mail.mud.yahoo.com> References: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> <296949.49663.qm@web34402.mail.mud.yahoo.com> Date: Thu, 4 Feb 2010 07:39:32 +0530 Message-ID: <98a59be81002031809p70f0154dnd9a1744ade7aac33@mail.gmail.com> From: "C. Jayachandran" To: Neelkanth Natu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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:09:34 -0000 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lib/libc/mips/sys/ptrace.S =C2=A0(revision 203379) > +++ lib/libc/mips/sys/ptrace.S =C2=A0(working copy) > @@ -42,14 +42,26 @@ > =C2=A0#endif /* LIBC_SCCS and not lint */ > > =C2=A0LEAF(ptrace) > + =C2=A0 =C2=A0 =C2=A0 .frame =C2=A0sp,40,ra > >>> space missing after the ',' > > + =C2=A0 =C2=A0 =C2=A0 .mask =C2=A0 0x80000000, -8 > =C2=A0#ifdef __ABICALLS__ > =C2=A0 =C2=A0 =C2=A0 =C2=A0.set =C2=A0 =C2=A0noreorder > =C2=A0 =C2=A0 =C2=A0 =C2=A0.cpload t9 > =C2=A0 =C2=A0 =C2=A0 =C2=A0.set =C2=A0 =C2=A0reorder > =C2=A0#endif > + =C2=A0 =C2=A0 =C2=A0 subu =C2=A0 =C2=A0sp, sp, 40 > + =C2=A0 =C2=A0 =C2=A0 sw =C2=A0 =C2=A0 =C2=A0ra, =C2=A032(sp) > +#ifdef __ABICALLS__ > + =C2=A0 =C2=A0 =C2=A0 .cprestore 16 > +#endif > =C2=A0 =C2=A0 =C2=A0 =C2=A0la =C2=A0 =C2=A0 =C2=A0t9, _C_LABEL(__error) = =C2=A0 # locate address of errno > - =C2=A0 =C2=A0 =C2=A0 jalr =C2=A0 =C2=A0t9 > + =C2=A0 =C2=A0 =C2=A0 jalr =C2=A0 =C2=A0t9 > >>> this change is not required - the newly added line has a tab at the end= . > > +#ifdef __ABICALLS__ > + =C2=A0 =C2=A0 =C2=A0 lw =C2=A0 =C2=A0 =C2=A0gp, 16(sp) > +#endif > >>> this is redundant - the assembler will generate exactly the same line o= f >>> 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. Regards, JC.