llvm.org GIT mirror llvm / 595bc15
Merging r181366: ------------------------------------------------------------------------ r181366 | enderby | 2013-05-07 14:40:58 -0700 (Tue, 07 May 2013) | 6 lines Fix a bug in the MC asm parser evaluating expressions. It was treating: A = 9 B = 3 * A - 2 * A + 1 as B = 3 * A - (2 * A + 1) rdar://13816516 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182438 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
2 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
10911091 MCBinaryExpr::Opcode Dummy;
10921092 unsigned NextTokPrec = getBinOpPrecedence(Lexer.getKind(), Dummy);
10931093 if (TokPrec < NextTokPrec) {
1094 if (ParseBinOpRHS(Precedence+1, RHS, EndLoc)) return true;
1094 if (ParseBinOpRHS(TokPrec+1, RHS, EndLoc)) return true;
10951095 }
10961096
10971097 // Merge LHS and RHS according to operator.
4444 check_expr 0 || 0, 0
4545 check_expr 1 + 2 < 3 + 4, 1
4646 check_expr 1 << 8 - 1, 128
47 check_expr 3 * 9 - 2 * 9 + 1, 10
4748
4849 .set c, 10
4950 check_expr c + 1, 11