[PATCH] [mips] [IAS] Fix parsing of memory offset expressions with parenthesis depth >1.
Toma Tabacu
toma.tabacu at imgtec.com
Wed May 13 07:08:47 PDT 2015
Hi dsanders, rafael,
In an expression such as "(((a+b)+c)+d)", parseParenExpression() would only parse the "a+b)+c", which would result in an error later on in the parser.
This means that we can only parse one level of inner parentheses.
In order to fix this, I added a new function called parseParenExprOfDepth(), which parses a specified number of trailing parenthesis expressions
(except for the outermost parenthesis), and changed MipsAsmParser to use it in parseMemOffset instead of parseParenExpression().
http://reviews.llvm.org/D9742
Files:
include/llvm/MC/MCParser/MCAsmParser.h
lib/MC/MCParser/AsmParser.cpp
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/expr1.s
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9742.25679.patch
Type: text/x-patch
Size: 5084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150513/1c289c03/attachment.bin>
More information about the llvm-commits
mailing list