This is the mail archive of the gcc@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: gcc.dg/debug/debug-[12].c failures on cmov targets


> 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~


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