Comment 8 for bug 771903

Revision history for this message
In , Michael Hope (michaelh1) wrote :

Part of the difference is that 4.5 inlines the other functions and 4.6 doesn't. Adding an __attribute__((always_inline)) to both gives the following:

For 4.5, main is:

main:
        movw r3, #22136
        movt r3, 4660
        and r3, r0, r3
        cbnz r3, .L10
        mvn r3, #15
        lsls r2, r0, r3
        ubfx r0, r0, #30, #10
        and r3, r0, #768
        lsrs r0, r2, #24
        orr r0, r3, r0
        bx lr
.L10:
        ubfx r3, r0, #22, #2
        lsrs r0, r0, #24
        lsls r3, r3, #8
        orr r0, r3, r0
        bx lr

For 4.6 it becomes:

main:
        movw r3, #22136
        movt r3, 4660
        ands r3, r3, r0
        cbz r3, .L13
        ubfx r3, r0, #22, #2
        lsrs r0, r0, #24
        lsls r3, r3, #8
.L12:
        orrs r0, r0, r3
        bx lr
.L13:
        mov r0, r3
        b .L12