diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-02 02:09:07 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-02 02:09:07 +0000 |
commit | 9bff6531fd344adc7b3ab441aadadbfb3c8c6e7e (patch) | |
tree | a61d8b77d6104bc8e983f075d77b28a32695dbda /llvm/tools/llvm-mc/AsmParser.h | |
parent | 36a20070593d0f48c2b9550e5be1ea90b586d4c3 (diff) | |
download | bcm5719-llvm-9bff6531fd344adc7b3ab441aadadbfb3c8c6e7e.tar.gz bcm5719-llvm-9bff6531fd344adc7b3ab441aadadbfb3c8c6e7e.zip |
llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
(I think).
- We weren't properly parsing the leading parenthesized expression in something
like 'push (4)(%eax)'.
- Added ParseParenRelocatableExpression to support this. I suspect we should
just use lookahead, though.
- Test case to follow.
llvm-svn: 74685
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.h')
-rw-r--r-- | llvm/tools/llvm-mc/AsmParser.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.h b/llvm/tools/llvm-mc/AsmParser.h index ae5c414c03d..333b284eac9 100644 --- a/llvm/tools/llvm-mc/AsmParser.h +++ b/llvm/tools/llvm-mc/AsmParser.h @@ -73,6 +73,16 @@ private: /// @result - False on success. bool ParseRelocatableExpression(MCValue &Res); + /// ParseParenRelocatableExpression - Parse an expression which must be + /// relocatable, assuming that an initial '(' has already been consumed. + /// + /// @param Res - The relocatable expression value. The result is undefined on + /// error. + /// @result - False on success. + /// + /// @see ParseRelocatableExpression, ParseParenExpr. + bool ParseParenRelocatableExpression(MCValue &Res); + bool ParsePrimaryExpr(AsmExpr *&Res); bool ParseBinOpRHS(unsigned Precedence, AsmExpr *&Res); bool ParseParenExpr(AsmExpr *&Res); |