<html>
<head>
<base href="https://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 --- - r6/r7 are not saved/restored when modified only by landing pad entry"
href="https://llvm.org/bugs/show_bug.cgi?id=27102">27102</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>r6/r7 are not saved/restored when modified only by landing pad entry
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</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: SystemZ
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>koriakin@0x04.net
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, uweigand@de.ibm.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16106" name="attach_16106" title="Proposed patch.">attachment 16106</a> <a href="attachment.cgi?id=16106&action=edit" title="Proposed patch.">[details]</a></span>
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).</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>