<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 --- - [mips] MipsAsmParser doesn't handle expressions with multiple leading parens" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23734&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=xyR2_nhhOTBW5JW02j7ct0s2hhYO2SFozF7640c50UE&s=WQM-mU3H7ltGNXwJn1MVjIwyVDoyNxOIxvGQq415jXk&e=">23734</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[mips] MipsAsmParser doesn't handle expressions with multiple leading parens
</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>All
</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: MIPS
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>csdavec@swan.ac.uk
</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>These expressions occur a lot in the FreeBSD kernel, as a result of macro
expansion. For example (simplified from the original):
sd $7, ((8) - 1) + 40 ($29)
The loop in MipsAsmParser::parseMemOffset consumes the two leading parens and
then calls MCAsmParser::parseParenExpression(). This then parses until the end
of the ((8) - 1) expression. The next token is then +, which is unexpected
(lparen then register is expected).
This is caused by the desire to be able to parse ((%lo .... )) expressions,
using the existing infrastructure. I suspect that the correct solution is to
extend AsmParser to allow unrecognised tokens to be handled by targets in
parseExpression().</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>