This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix -mno-accumulate-outgoing-args -fasynchronous-unwind-tables (PR rtl-optimization/36419, take 2)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]