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]

[Patch] Fix debug/17406


This bug 

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17406

is triggered by the designation of the
  mov allocate %eax 
insn in config/i386/i386.c (ix86_expand_prologue) as RTX_FRAME_RELATED_P

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

Removing the flag causes no testsuite regressions on mingw32 nor have I
seen any new bugs in code that exercises this windows-specific section of
ix86_expand_prologue. 

Bootstapped and regtested on i686-pc-mingw32 (c,c++,objc,java)

I would appreciate if someone with more expertise in this area
could review.

ChangeLog

2004-10-28  Danny Smith  <dannysmith@users.sourceforge.net>

	PR debug/17406
	* config/i386/i386.c (ix86_expand_prologue): Don't
	set RTX_FRAME_RELATED_P when moving allocate to eax.


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	26 Oct 2004 22:04:32 -0000
*************** ix86_expand_prologue (void)
*** 4289,4296 ****
  	  allocate -= 4;
  	}
  
!       insn = emit_move_insn (eax, GEN_INT (allocate));
!       RTX_FRAME_RELATED_P (insn) = 1;
  
        insn = emit_insn (gen_allocate_stack_worker (eax));
        RTX_FRAME_RELATED_P (insn) = 1;
--- 4289,4295 ----
  	  allocate -= 4;
  	}
  
!       emit_move_insn (eax, GEN_INT (allocate));
  
        insn = emit_insn (gen_allocate_stack_worker (eax));
        RTX_FRAME_RELATED_P (insn) = 1;

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


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