This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR debug/36980: [4.4 Regression] Bootstrap broken with RTL checking on i586
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Cc: Joey Ye <joey dot ye at intel dot com>, Xuepeng Guo <xuepeng dot guo at intel dot com>
- Date: Thu, 31 Jul 2008 06:48:57 -0700
- Subject: PATCH: PR debug/36980: [4.4 Regression] Bootstrap broken with RTL checking on i586
The insn in question is
(insn/f 38 37 39 /tmp/crtfastmath.i:8 (set (mem:SI (pre_dec:SI
(reg/f:SI 7 sp)) [0 S4 A8])
(mem/c:SI (plus:SI (reg:SI 2 cx)
(const_int -4 [0xfffffffffffffffc])) [0 S4 A8])) 40 {*pushsi2} (nil))
It pushes return address onto stack. It is handle by rule 17. We
should check it before rule 19. I am testing it on Linux/ia32,
Linux/ia64 and Linux/Intel64. OK for trunk if all pass?
Thanks.
H.J.
----
2008-07-31 H.J. Lu <hongjiu.lu@intel.com>
PR debug/36980
* dwarf2out.c (dwarf2out_frame_debug_expr): Move rule 17 before
rule 19.
--- gcc/dwarf2out.c.drap 2008-07-31 06:01:29.000000000 -0700
+++ gcc/dwarf2out.c 2008-07-31 06:42:27.000000000 -0700
@@ -2027,6 +2027,13 @@ dwarf2out_frame_debug_expr (rtx expr, co
gcc_unreachable ();
}
+ /* Rule 17 */
+ /* If the source operand of this MEM operation is not a
+ register, basically the source is return address. Here
+ we only care how much stack grew and we don't save it. */
+ if (!REG_P (src))
+ break;
+
if (REGNO (src) != STACK_POINTER_REGNUM
&& REGNO (src) != HARD_FRAME_POINTER_REGNUM
&& (unsigned) REGNO (src) == cfa.reg)
@@ -2085,12 +2092,6 @@ dwarf2out_frame_debug_expr (rtx expr, co
break;
}
}
- /* Rule 17 */
- /* If the source operand of this MEM operation is not a
- register, basically the source is return address. Here
- we only care how much stack grew and we don't save it. */
- if (!REG_P (src))
- break;
def_cfa_1 (label, &cfa);
{