This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 5/8] Detect a frameless frame by comparing the FP register to -1.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: John Baldwin <jhb at freebsd dot org>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, binutils at sourceware dot org
- Date: Wed, 15 Jun 2016 09:44:55 +0100
- Subject: Re: [PATCH 5/8] Detect a frameless frame by comparing the FP register to -1.
- Authentication-results: sourceware.org; auth=none
- References: <1465678115-58170-1-git-send-email-jhb at FreeBSD dot org> <1465678115-58170-6-git-send-email-jhb at FreeBSD dot org> <CAH=s-PPAjOdQkctdxcOWXoBeNNhcyT=4iR4k=9RRKFy0jb+_LA at mail dot gmail dot com> <2059915 dot yo7jaW82vP at ralph dot baldwin dot cx>
On Tue, Jun 14, 2016 at 7:46 PM, John Baldwin <email@example.com> wrote:
> On Monday, June 13, 2016 12:22:41 PM Yao Qi wrote:
>> On Sat, Jun 11, 2016 at 9:48 PM, John Baldwin <firstname.lastname@example.org> wrote:
>> > - if (cache->saved_regs[MEDIA_FP_REGNUM] >= 0)
>> > + if (cache->saved_regs[MEDIA_FP_REGNUM] == -1)
>> > cache->uses_fp = 1;
>> I suspect it should be " != -1". saved_regs[MEDIA_FP_REGNUM] is initialized
>> to -1, so if it is not the initialized value (-1), FP should be set in
>> the prologue, and mark the flag uses_fp.
> Yes, you are correct. Alternatively, we could change this code to explicitly
> set 'cache->uses_fp' in the cases earlier in this function where it sets
> MEDIA_FP_REGNUM to a value. sh-tdep.c follows this model, but it only needs
> to set uses_fp in a few places.
That is fine by me.