This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add unwind information to mips epilogues
- From: Richard Henderson <rth at redhat dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "'Richard Sandiford'" <richard dot sandiford at linaro dot org>, rdsandiford at googlemail dot com
- Date: Mon, 05 Sep 2011 07:06:48 +0530
- Subject: Re: Add unwind information to mips epilogues
- References: <4E5E6E6D.8050905@codesourcery.com> <87zkipl8uv.fsf@firetop.home> <4E5EA981.5010203@codesourcery.com>
On 09/01/2011 03:07 AM, Bernd Schmidt wrote:
> On 08/31/11 20:43, Richard Sandiford wrote:
>> Bernd Schmidt <bernds@codesourcery.com> writes:
>>> This is necessary when adding shrink-wrapping; otherwise dwarf2cfi sees
>>> inconsistent information and aborts.
>>>
>>> Tested on mips64-elf together with the rest of the shrink-wrapping
>>> patches. Ok?
>>
>> It looks like the current code doesn't handle the RESTORE instruction.
>> Could you also test that somehow? A mipsisa32-elf run with -mips16
>> ought to work, but some sort of spot-checking of shrink-wrapping +
>> RESTORE would be fine if that's easier.
>
> Will look into that. You mean the mips16e_build_save_restore function?
>
>> Also, for the frame_pointer_required case, it looks like there's a
>> window between the restoration of the frame pointer and the deallocation
>> of the stack in which the CFA is still defined in terms of the frame
>> pointer register. Is that significant? If not (e.g. because we
>> should never need to unwind at that point) then why do we still
>> update the CFA here:
>
> CC'ing rth, as I'm still not terribly familiar with these issues. I've
> tried to follow alpha.c, which seems to ignore this issue.
Alpha isn't a great example here, because it hasn't been updated to
generate unwind info for epilogues at all.
At the point you restore the frame pointer, you should add a
REG_{DEF,ADJUST}_CFA note.
r~