[llvm-commits] [llvm] r126336 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/exprs.s test/MC/AsmParser/paren.s
Jim Grosbach
grosbach at apple.com
Wed Feb 23 13:26:51 PST 2011
Author: grosbach
Date: Wed Feb 23 15:26:51 2011
New Revision: 126336
URL: http://llvm.org/viewvc/llvm-project?rev=126336&view=rev
Log:
Revert r125595, which is an X86-only undocumented assembly syntax extension
enabled for all targets. Non-X86 targets should not have this behavior
enabled by default.
Joerg, if you would like to resubmit with the behavior conditionalized to be
X86-ELF only, that's fine.
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
llvm/trunk/test/MC/AsmParser/exprs.s
llvm/trunk/test/MC/AsmParser/paren.s
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=126336&r1=126335&r2=126336&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Feb 23 15:26:51 2011
@@ -173,7 +173,6 @@
bool ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc);
bool ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res, SMLoc &EndLoc);
bool ParseParenExpr(const MCExpr *&Res, SMLoc &EndLoc);
- bool ParseBracketExpr(const MCExpr *&Res, SMLoc &EndLoc);
/// ParseIdentifier - Parse an identifier or string (as a quoted identifier)
/// and set \arg Res to the identifier contents.
@@ -493,20 +492,6 @@
return false;
}
-/// ParseBracketExpr - Parse a bracket expression and return it.
-/// NOTE: This assumes the leading '[' has already been consumed.
-///
-/// bracketexpr ::= expr]
-///
-bool AsmParser::ParseBracketExpr(const MCExpr *&Res, SMLoc &EndLoc) {
- if (ParseExpression(Res)) return true;
- if (Lexer.isNot(AsmToken::RBrac))
- return TokError("expected ']' in brackets expression");
- EndLoc = Lexer.getLoc();
- Lex();
- return false;
-}
-
/// ParsePrimaryExpr - Parse a primary expression and return it.
/// primaryexpr ::= (parenexpr
/// primaryexpr ::= symbol
@@ -602,9 +587,6 @@
case AsmToken::LParen:
Lex(); // Eat the '('.
return ParseParenExpr(Res, EndLoc);
- case AsmToken::LBrac:
- Lex(); // Eat the '['.
- return ParseBracketExpr(Res, EndLoc);
case AsmToken::Minus:
Lex(); // Eat the operator.
if (ParsePrimaryExpr(Res, EndLoc))
Modified: llvm/trunk/test/MC/AsmParser/exprs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/exprs.s?rev=126336&r1=126335&r2=126336&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/exprs.s (original)
+++ llvm/trunk/test/MC/AsmParser/exprs.s Wed Feb 23 15:26:51 2011
@@ -35,8 +35,6 @@
check_expr 1 << 1, 2
check_expr 2 >> 1, 1
check_expr (~0 >> 1), -1
- check_expr [~0 >> 1], -1
- check_expr 4 * [4 + (3 + [2 * 2] + 1)], 48
check_expr 3 - 2, 1
check_expr 1 ^ 3, 2
check_expr 1 && 2, 1
Modified: llvm/trunk/test/MC/AsmParser/paren.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/paren.s?rev=126336&r1=126335&r2=126336&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/paren.s (original)
+++ llvm/trunk/test/MC/AsmParser/paren.s Wed Feb 23 15:26:51 2011
@@ -1,8 +0,0 @@
-// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t1 > %t2
-// RUN: FileCheck < %t1 %s
-
-// CHECK: error: expected ']' in brackets expression
-.size x, [.-x)
-
-// CHECK: error: expected ')' in parentheses expression
-.size y, (.-y]
More information about the llvm-commits
mailing list