This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc.dg/debug/debug-[12].c failures on cmov targets
- From: Richard Henderson <rth at redhat dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 3 Dec 2003 15:03:03 -0800
- Subject: Re: gcc.dg/debug/debug-[12].c failures on cmov targets
- References: <200312030801.51406.ebotcazou@libertysurf.fr>
> so the lexical block containing xyzzy is discarded and the variable with it.
No, the lexical block should still exist. I wrote this test for
Alpha, which also has conditional moves. At -O2 -g I get:
cmpult $31,$16,$0
addq $0,$0,$0
ret $31,($26),1
.uleb128 0x5 # (DIE (0x70) DW_TAG_variable)
.4byte $LASF2 # DW_AT_name: "xyzzy"
.byte 0x1 # DW_AT_decl_file
.byte 0x4 # DW_AT_decl_line
.4byte 0x7f # DW_AT_type
.byte 0x1 # DW_AT_location
.byte 0x50 # DW_OP_reg0
That doesn't use cmov, but change the source to be = 20 and I get
mov $31,$0
cmovne $16,20,$0
ret $31,($26),1
(which is 1 cycle slower on ev6, which is why we prefer the former
if we can use it). I still get proper debug info for xyzzy.
You should dig deeper to determine where the block gets lost.
r~