This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -mno-accumulate-outgoing-args -fasynchronous-unwind-tables (PR rtl-optimization/36419, take 2)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: "Jason Merrill" <jason at redhat dot com>, "Eric Botcazou" <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org, "Xuepeng Guo" <xuepeng dot guo at intel dot com>, "Joey Ye" <joey dot ye at intel dot com>
- Date: Sun, 27 Jul 2008 12:55:44 -0700
- Subject: Re: [PATCH] Fix -mno-accumulate-outgoing-args -fasynchronous-unwind-tables (PR rtl-optimization/36419, take 2)
- References: <20080611133108.GM8133@devserv.devel.redhat.com> <200806151630.27801.ebotcazou@adacore.com> <20080615155952.GH8133@devserv.devel.redhat.com> <200806152358.59302.ebotcazou@adacore.com> <20080619194814.GT8133@devserv.devel.redhat.com> <6dc9ffc80807212233u6660e40fo894632c9f8204749@mail.gmail.com> <20080727193121.GI8133@devserv.devel.redhat.com>
On Sun, Jul 27, 2008 at 12:31 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Jul 21, 2008 at 10:33:23PM -0700, H.J. Lu wrote:
>> On Thu, Jun 19, 2008 at 12:48 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> > On Sun, Jun 15, 2008 at 11:58:59PM +0200, Eric Botcazou wrote:
>> Don't you also need
>>
>> Index: dwarf2out.c
>> ===================================================================
>> --- dwarf2out.c (revision 3335)
>> +++ dwarf2out.c (working copy)
>> @@ -1672,6 +1672,9 @@ dwarf2out_frame_debug_expr (rtx expr, co
>> if (cfa.reg == STACK_POINTER_REGNUM)
>> cfa.offset += offset;
>>
>> + if (cfa_store.reg == STACK_POINTER_REGNUM)
>> + cfa_store.offset += offset;
>> +
>> #ifndef STACK_GROWS_DOWNWARD
>> offset = -offset;
>> #endif
>>
>> Otherwise, cfa_store.offset will be wrong if it is ever used. It does
>> happen in a testcase on stack branch.
>
> No. def_cfa_1 will take care of updating it, similarly how it does
> that for dwarf2out_stack_adjust.
Only if
if (cfa_store.reg == loc.reg && loc.indirect == 0)
cfa_store.offset = loc.offset;
It doesn't cover cfa.reg != STACK_POINTER_REGNUM and
cfa_store.reg == STACK_POINTER_REGNUM. It happens
in the prologue on stack branch when dynamic realign
argument pointer register is used.
--
H.J.