[llvm-commits] [llvm] r141446 - in /llvm/trunk: lib/Target/ARM/ARMInstrFormats.td lib/Target/ARM/ARMInstrNEON.td lib/Target/ARM/AsmParser/ARMAsmParser.cpp lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp lib/Target/ARM/InstPrinter/ARMInstPrinter.h t
NAKAMURA Takumi
geek4civic at gmail.com
Wed Jan 25 20:44:48 PST 2012
Jim, excuse me to comment to an old commit. ;)
2011/10/8 Jim Grosbach <grosbach at apple.com>:
> Author: grosbach
> Date: Fri Oct 7 18:56:00 2011
> New Revision: 141446
>
> URL: http://llvm.org/viewvc/llvm-project?rev=141446&view=rev
> Log:
> ARM NEON assembly parsing and encoding for VDUP(scalar).
>
> Modified:
> llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
> llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
> llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
> llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
> llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
> llvm/trunk/test/MC/ARM/neont2-dup-encoding.s
> llvm/trunk/utils/TableGen/EDEmitter.cpp
> --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Oct 7 18:56:00 2011
> @@ -1815,6 +1903,37 @@
> Operands.push_back(ARMOperand::CreateToken(ExclaimTok.getString(),
> ExclaimTok.getLoc()));
> Parser.Lex(); // Eat exclaim token
> + return false;
> + }
> +
> + // Also check for an index operand. This is only legal for vector registers,
> + // but that'll get caught OK in operand matching, so we don't need to
> + // explicitly filter everything else out here.
> + if (Parser.getTok().is(AsmToken::LBrac)) {
> + SMLoc SIdx = Parser.getTok().getLoc();
> + Parser.Lex(); // Eat left bracket token.
> +
> + const MCExpr *ImmVal;
> + SMLoc ExprLoc = Parser.getTok().getLoc();
> + if (getParser().ParseExpression(ImmVal))
> + return MatchOperand_ParseFail;
> + const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
> + if (!MCE) {
> + TokError("immediate value expected for vector index");
> + return MatchOperand_ParseFail;
> + }
> +
> + SMLoc E = Parser.getTok().getLoc();
> + if (Parser.getTok().isNot(AsmToken::RBrac)) {
> + Error(E, "']' expected");
> + return MatchOperand_ParseFail;
> + }
> +
> + Parser.Lex(); // Eat right bracket token.
> +
> + Operands.push_back(ARMOperand::CreateVectorIndex(MCE->getValue(),
> + SIdx, E,
> + getContext()));
> }
>
> return false;
I think "MatchOperand_ParseFail" would be incompatible against "bool".
I have found ms cl.exe warns about it.
...Takumi
More information about the llvm-commits
mailing list