Comment 29 for bug 705689

Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

OK, if I'm disassembling this correctly the output from compiling with -S -dP (thanks Richard) is:

@ 0 "" 2
        .thumb
        ldr r3, .L515+16 @ 152 pic_load_addr_32bit [length = 4]
.LPIC36:
        add r3, pc @ 155 tls_load_dot_plus_four/1 [length = 4]
        ldr r3, [r3]
        cmp r3, #0 @ 157 *thumb2_cbz/1 [length = 8]
        beq .L514
.L496:
        movs r0, #4 @ 420 *thumb2_movsi_shortim [length = 2]
.LPIC39:
        add r3, pc @ 176 tls_load_dot_plus_four/1 [length = 4]
        ldr r3, [r3]
.LEHB27:
        bl operator new(unsigned int)(PLT) @ 178 *call_value_symbol [length = 4]
.LEHE27:
        mov r5, r0 @ 179 *thumb2_movsi_vfp/1 [length = 4]

so it looks like the rtl chunk @176 is the dodgy one?
from the 212r.mach rtl file we have:

(insn:TI 152 147 155 2 ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:80 (set (reg:SI 3 r3 [orig:178 D.147509 ] [178])
        (unspec:SI [
                (mem:SI (const (plus (label_ref 451)
                            (const_int 16 [0x10]))) [0 S4 A32])
            ] 3)) 167 {pic_load_addr_32bit} (expr_list:REG_EQUAL (unspec:SI [
                (const:SI (unspec:SI [
                            (symbol_ref/i:SI ("_ZZN11QMetaTypeIdIN2Qt12GestureStateEE14qt_metatype_idEvE11metatype_id") [flags 0x82] <var_decl 0x410a91e0 metatype_id>)
                            (const:SI (plus:SI (unspec:SI [
                                            (const_int 36 [0x24])
                                        ] 21)
                                    (const_int 4 [0x4])))
                        ] 27))
            ] 3)
        (nil)))

(insn:TI 155 152 157 2 ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:80 (parallel [
            (set (reg:SI 3 r3 [orig:178 D.147509 ] [178])
                (mem/s/v:SI (unspec:SI [
                            (reg:SI 3 r3 [orig:178 D.147509 ] [178])
                            (const_int 4 [0x4])
                            (const_int 36 [0x24])
                        ] 4) [3 metatype_id._q_value+0 S4 A32]))
            (clobber (scratch:SI))
        ]) 666 {tls_load_dot_plus_four} (nil))

(jump_insn:TI 157 155 171 2 ../../include/QtGui/private/../../../src/gui/kernel/qgesture.h:56 (parallel [
            (set (pc)
                (if_then_else (eq (reg:SI 3 r3 [orig:178 D.147509 ] [178])
                        (const_int 0 [0x0]))
                    (label_ref:SI 423)
                    (pc)))
            (clobber (reg:CC 24 cc))
        ]) 721 {*thumb2_cbz} (expr_list:REG_UNUSED (reg:CC 24 cc)
        (expr_list:REG_BR_PROB (const_int 3898 [0xf3a])
            (nil)))
 -> 423)

(code_label 171 157 172 3 496 "" [1 uses])

(note 172 171 174 3 [bb 3] NOTE_INSN_BASIC_BLOCK)

(note 174 172 420 3 NOTE_INSN_DELETED)

(insn:TI 420 174 176 3 kernel/qgesturemanager.cpp:85 (parallel [
            (set (reg:SI 0 r0)
                (const_int 4 [0x4]))
            (clobber (reg:CC 24 cc))
        ]) 711 {*thumb2_movsi_shortim} (expr_list:REG_UNUSED (reg:CC 24 cc)
        (nil)))
(insn 176 420 178 3 ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:85 (parallel [
            (set (reg:SI 3 r3 [orig:180 D.147506 ] [180])
                (mem/s/v:SI (unspec:SI [
                            (reg:SI 3 r3 [orig:180 D.147506 ] [180])
                            (const_int 4 [0x4])
                            (const_int 39 [0x27])
                        ] 4) [3 metatype_id._q_value+0 S4 A32]))
            (clobber (scratch:SI))
        ]) 666 {tls_load_dot_plus_four} (expr_list:REG_UNUSED (reg:SI 3 r3 [orig:180 D.147506 ] [180])
        (nil)))

(call_insn:TI 178 176 346 3 kernel/qgesturemanager.cpp:85 (parallel [
            (set (reg:SI 0 r0)
                (call (mem:SI (symbol_ref:SI ("_Znwj") [flags 0x41] <function_decl 0xa0300a80 operator new>) [0 S4 A32])
                    (const_int 0 [0x0])))
            (use (const_int 0 [0x0]))
            (clobber (reg:SI 14 lr))
        ]) 256 {*call_value_symbol} (expr_list:REG_EH_REGION (const_int 10 [0xa])
        (nil))
    (expr_list:REG_DEP_TRUE (use (reg:SI 0 r0))
        (nil)))

(note 346 178 179 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

(insn:TI 179 346 183 4 kernel/qgesturemanager.cpp:85 (set (reg/f:SI 5 r5 [orig:134 D.119024 ] [134])
        (reg:SI 0 r0)) 591 {*thumb2_movsi_vfp} (nil))