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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu.org

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
On x86-64 the problem is iteration of crossjumping and dwarf2cfi.  We
introduce:


(insn:TI 559 558 2420 38 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0  S4 A8])
        (reg/f:SI 6 bp [orig:159 bs ] [159]))
../../../../libgo/go/encoding/binary/binary.go:263 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
        (nil)))
(code_label 2420 559 2418 39 722 "" [1 uses])
(note 2418 2420 772 39 [bb 39] NOTE_INSN_BASIC_BLOCK)
(insn:TI 772 2418 773 39 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [6  S4
A32])
        (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 64 [0x40])) [57 %sfp+-220 S4 A32]))
../../../../libgo/go/encoding/binary/binary.go:273 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 32 [0x20])
        (nil)))
(call_insn:TI 773 772 774 39 (call (mem:QI (reg/f:SI 0 ax [orig:233 D.6194 ]
[233]) [0  S1 A8])
        (const_int 32 [0x20]))
../../../../libgo/go/encoding/binary/binary.go:273 672 {*call}
     (expr_list:REG_DEAD (reg/f:SI 0 ax [orig:233 D.6194 ] [233])
        (nil))
    (nil))
(insn:TI 774 773 100 39 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int 32 [0x20])))
            (clobber (reg:CC 17 flags))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 0 [0])
            (nil))))
(insn 100 774 101 39 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 24 [0x18])) [57 %sfp+-232 S4 A32])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:272
90 {*movsi_internal}
     (nil))
(insn 101 100 2682 39 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 12 [0xc])) [57 %sfp+-244 S4 A32])
        (const_int 2 [0x2])) ../../../../libgo/go/encoding/binary/binary.go:272
90 {*movsi_internal}
     (nil))
(jump_insn:TI 2682 101 2683 39 (set (pc)
        (label_ref 1634)) 667 {jump}
     (nil)
 -> 1634)

dwarf2cfi is apparently not able to merge these calls since they have different
stack pointers at that time:
(gdb) p *ti->beg_row
$7 = {cfa = {offset = 316, base_offset = 0, reg = 4, indirect = 0, in_use = 0},
cfa_cfi = 0x0, reg_save = 0x7ffff6f7ecd0}
(gdb) p *cur_row
$8 = {cfa = {offset = 304, base_offset = 0, reg = 4, indirect = 0, in_use = 0},
cfa_cfi = 0x0, reg_save = 0x7ffff6f9f730}
(gdb)

I am not quite sure why they are different, since the calls both leads to
normal return and seem to expect sp to be sane.

Reply via email to