[LLVMbugs] [Bug 23734] New: [mips] MipsAsmParser doesn't handle expressions with multiple leading parens
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 2 08:16:12 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23734
Bug ID: 23734
Summary: [mips] MipsAsmParser doesn't handle expressions with
multiple leading parens
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: MIPS
Assignee: unassignedbugs at nondot.org
Reporter: csdavec at swan.ac.uk
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
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().
--
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/20150602/008544bf/attachment.html>
More information about the llvm-bugs
mailing list