<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Incorrect unwind tables when saving high register on Thumb1 target"
href="https://bugs.llvm.org/show_bug.cgi?id=42408">42408</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect unwind tables when saving high register on Thumb1 target
</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>enhancement
</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>oliver.stannard@arm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
</td>
</tr></table>
<p>
<div>
<pre>For Thumb1-only targets (e.g. Armv6M) we emit incorrect unwind tables when
saving high registers (which aren't normally allocatable, but can be usind in
inline assembly):
// test.cpp
extern void foo();
void bar() {
asm("" : : : "r8");
foo();
}
$ clang --target=arm-arm-none-eabi -march=armv6-m -c test.cpp -Os -o - -S
...
_Z3barv:
.fnstart
@ %bb.0: @ %entry
.save {lr}
push {lr}
mov lr, r8
push {lr}
@APP
@NO_APP
bl _Z3foov
pop {r0}
mov r8, r0
pop {pc}
.Lfunc_end0:
.size _Z3barv, .Lfunc_end0-_Z3barv
.fnend
...
This means that debuggers and the C++ exception unwinder won't be able to
unwind through functions like this.</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>