<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Unwind code in Android uses .code 32 in inline assembly"
   href="http://llvm.org/bugs/show_bug.cgi?id=18231">18231</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unwind code in Android uses .code 32 in inline assembly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
    .thumb_func
_ZN13UnwindCurrent6UnwindEj:
.Lfunc_begin3:
    .loc    1 66 0
    .loc    1 0 0
    push.w    {r11, lr}
    mov    r2, r0
.Ltmp7:
    .loc    1 67 0 prologue_end
    add.w    r0, r2, #8
.Ltmp8:
    @APP
    .align 2
bx pc
nop
.code 32
stmia r0, {r0-r15}
orr r0, pc, #1
bx r0
    @NO_APP
.Ltmp9:
    .loc    1 72 0
    mov    r0, r2
    movs    r2, #1
.Ltmp10:
    bl    _ZN13UnwindCurrent17UnwindFromContextEjb(PLT)
    .loc    1 73 0
    pop.w    {r11, pc}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>