[LLVMbugs] [Bug 18231] New: Unwind code in Android uses .code 32 in inline assembly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 12 12:40:46 PST 2013


            Bug ID: 18231
           Summary: Unwind code in Android uses .code 32 in inline
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

A feature recently being introduced to avoid the madness of having .arm/.thumb
(.code 32/.code 16) in inline assembly will break the Android build because the
unwind code uses that extensively.

Here's a snippet. As you can see, the function is Thumb (.code 16), the inline
ASM changes it to ARM (.code 32), than the function continues and returns with
an instruction that is only valid in Thumb mode (pop.w).

    .section    .text._ZN13UnwindCurrent6UnwindEj,"ax",%progbits
    .globl    _ZN13UnwindCurrent6UnwindEj
    .align    2
    .type    _ZN13UnwindCurrent6UnwindEj,%function
    .code    16
    .loc    1 66 0
    .loc    1 0 0
    push.w    {r11, lr}
    mov    r2, r0
    .loc    1 67 0 prologue_end
    add.w    r0, r2, #8
    .align 2
bx pc
.code 32
stmia r0, {r0-r15}
orr r0, pc, #1
bx r0
    .loc    1 72 0
    mov    r0, r2
    movs    r2, #1
    bl    _ZN13UnwindCurrent17UnwindFromContextEjb(PLT)
    .loc    1 73 0
    pop.w    {r11, pc}

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131212/e6daf4c8/attachment.html>

More information about the llvm-bugs mailing list