<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 --- - MIPS does not implement __builtin_eh_return_data_regno correctly"
href="http://llvm.org/bugs/show_bug.cgi?id=15225">15225</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>MIPS does not implement __builtin_eh_return_data_regno correctly
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>awg@embtoolkit.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>Created <span class=""><a href="attachment.cgi?id=9995" name="attach_9995" title="Proposed fix">attachment 9995</a> <a href="attachment.cgi?id=9995&action=edit" title="Proposed fix">[details]</a></span>
Proposed fix
Current MIPS TargetInfo (MipsTargetInfoBase) does not implement
getEHDataRegisterNumber() ie __builtin_eh_return_data_regno().
This makes c++ exception handling not working with libcxx/libcxxrt as
libcxxrt __gxx_personality_v0() function uses this builtin.
The simple attached patch makes the following test code works without
aborting, with libcxx/libcxxrt used as c++ standard library.
#include <stdio.h>
#include <exception>
int main(int argc, char **argv)
{
try {
throw 20;
} catch (int e) {
printf("Exception Nr %d occurred\n", e);
}
return 0;
}</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>