Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2010 05:59:07 -0800
From:      Randall Stewart <rrs@lakerest.net>
To:        Neelkanth Natu <neelnatu@yahoo.com>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: mips ptrace.S fix
Message-ID:  <F48F7847-2147-4A6E-AEC0-7D61A041A096@lakerest.net>
In-Reply-To: <203531.99897.qm@web34402.mail.mud.yahoo.com>
References:  <203531.99897.qm@web34402.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <neelnatu@yahoo.com> wrote:
>
>> From: Neelkanth Natu <neelnatu@yahoo.com>
>> Subject: Re: mips ptrace.S fix
>> To: "C. Jayachandran" <c.jayachandran@gmail.com>
>> Cc: "Rui Paulo" <rpaulo@freebsd.org>, freebsd-mips@freebsd.org
>> Date: Wednesday, February 3, 2010, 6:56 PM
>> Hi JC,
>>
>> --- On Wed, 2/3/10, C. Jayachandran <c.jayachandran@gmail.com>
>> wrote:
>>
>>> From: C. Jayachandran <c.jayachandran@gmail.com>
>>> Subject: Re: mips ptrace.S fix
>>> To: "Neelkanth Natu" <neelnatu@yahoo.com>
>>> Cc: "Rui Paulo" <rpaulo@freebsd.org>,
>> freebsd-mips@freebsd.org
>>> Date: Wednesday, February 3, 2010, 6:09 PM
>>> On Thu, Feb 4, 2010 at 1:01 AM,
>>> Neelkanth Natu <neelnatu@yahoo.com>
>>> 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)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F48F7847-2147-4A6E-AEC0-7D61A041A096>