https://bugs.llvm.org/show_bug.cgi?id=42408
Bug ID: 42408
Summary: Incorrect unwind tables when saving high register on
Thumb1 target
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: ARM
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs