mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
fix a parsing problem on instructions like:
movw $8, (_cost_table_-L97$pb)+66(%eax) After the parens, we could still have a binop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd7da4f368
commit
75f265fbbb
@ -331,10 +331,9 @@ bool AsmParser::ParseExpression(const MCExpr *&Res, SMLoc &EndLoc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AsmParser::ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) {
|
bool AsmParser::ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) {
|
||||||
if (ParseParenExpr(Res, EndLoc))
|
Res = 0;
|
||||||
return true;
|
return ParseParenExpr(Res, EndLoc) ||
|
||||||
|
ParseBinOpRHS(1, Res, EndLoc);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AsmParser::ParseAbsoluteExpression(int64_t &Res) {
|
bool AsmParser::ParseAbsoluteExpression(int64_t &Res) {
|
||||||
|
@ -300,8 +300,8 @@ X86Operand *X86ATTAsmParser::ParseMemOperand() {
|
|||||||
|
|
||||||
// We have to disambiguate a parenthesized expression "(4+5)" from the start
|
// We have to disambiguate a parenthesized expression "(4+5)" from the start
|
||||||
// of a memory operand with a missing displacement "(%ebx)" or "(,%eax)". The
|
// of a memory operand with a missing displacement "(%ebx)" or "(,%eax)". The
|
||||||
// only way to do this without lookahead is to eat the ( and see what is after
|
// only way to do this without lookahead is to eat the '(' and see what is
|
||||||
// it.
|
// after it.
|
||||||
const MCExpr *Disp = MCConstantExpr::Create(0, getParser().getContext());
|
const MCExpr *Disp = MCConstantExpr::Create(0, getParser().getContext());
|
||||||
if (getLexer().isNot(AsmToken::LParen)) {
|
if (getLexer().isNot(AsmToken::LParen)) {
|
||||||
SMLoc ExprEnd;
|
SMLoc ExprEnd;
|
||||||
|
@ -60,3 +60,4 @@ n:
|
|||||||
nop
|
nop
|
||||||
|
|
||||||
|
|
||||||
|
movw $8, (42)+66(%eax)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user