[llvm-bugs] [Bug 27102] New: r6/r7 are not saved/restored when modified only by landing pad entry
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 28 16:12:51 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27102
Bug ID: 27102
Summary: r6/r7 are not saved/restored when modified only by
landing pad entry
Product: libraries
Version: trunk
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: SystemZ
Assignee: unassignedbugs at nondot.org
Reporter: koriakin at 0x04.net
CC: llvm-bugs at lists.llvm.org, uweigand at de.ibm.com
Classification: Unclassified
Created attachment 16106
--> https://llvm.org/bugs/attachment.cgi?id=16106&action=edit
Proposed patch.
$ cat x.cc
void f();
void g() {
try {
f();
} catch (...) {
}
}
$ clang --target=s390x-unknown-linux-gnu x.cc -S
$ cat x.s
[...]
stmg %r11, %r15, 88(%r15)
[...]
Only r11-r15 are saved and restored, despite r6 and r7 being modified by
landing pad entry. This can result in the function clobbering r6 and r7,
violating the ABI.
Proposed patch attached, but I'm not sure if it's the right place - some
generic code could be a better option, but I couldn't find an easy way to plumb
the register information from TargetLowering. What do you think?
Found while porting ASan to s390 (breaks throw_catch.cc test).
--
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/20160328/a7ad5358/attachment.html>
More information about the llvm-bugs
mailing list