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 debug/17406


Richard Henderson wrote:
> On Thu, Oct 28, 2004 at 10:24:41AM +1300, Danny Smith wrote:
>> I confess that I do not quite understand all the rules in
>> dwarf2out_frame_debug_expr, but setting cfa_temp.reg to EAX here
>> seems wrong, Simply removing the flag from this instruction (as
>> suggested by the Big Picture comment in dwarf2out.c) fixes the later
>> assert failure when restoring EAX and saving to stack
>
> I can't believe this is correct.  Otherwise the dwarf2 bits do not,
> while processing the allocate_stack_worker insn, have the size of
> the allocated stack.
>

OK, this works as well, but it was removed as a "hack" the last time  it
was added.

        * config/i386/i386.c (ix86_expand_prologue):  Emit blockage.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.735
diff -c -3 -p -r1.735 i386.c
*** i386.c 12 Oct 2004 17:14:42 -0000 1.735
--- i386.c 3 Nov 2004 20:50:18 -0000
*************** ix86_expand_prologue (void)
*** 4307,4312 ****
--- 4307,4313 ----
            t = plus_constant (stack_pointer_rtx, allocate);
            emit_move_insn (eax, gen_rtx_MEM (SImode, t));
          }
+       emit_insn (gen_blockage (const0_rtx));
      }

    if (frame.save_regs_using_mov && !TARGET_RED_ZONE)


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