summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2016-12-27 16:58:09 +0000
committerChad Rosier <mcrosier@codeaurora.org>2016-12-27 16:58:09 +0000
commit2ff37b8615e19131148142de72ebd2d000a8ddbb (patch)
treecbd04704267c7bc4e1613532757872bf54390199 /llvm/lib/Target
parenta01cce888704873f1c9b8c6f370711c99867a2ac (diff)
downloadbcm5719-llvm-2ff37b8615e19131148142de72ebd2d000a8ddbb.tar.gz
bcm5719-llvm-2ff37b8615e19131148142de72ebd2d000a8ddbb.zip
[AArch64][AsmParser] Add support for parsing shift/extend operands with symbols.
Differential Revision: https://reviews.llvm.org/D27953 llvm-svn: 290609
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index 1a7cc023bd6..db84afacf30 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -2406,17 +2406,19 @@ AArch64AsmParser::tryParseOptionalShiftExtend(OperandVector &Operands) {
return MatchOperand_ParseFail;
}
- // "extend" type operatoins don't need an immediate, #0 is implicit.
+ // "extend" type operations don't need an immediate, #0 is implicit.
SMLoc E = SMLoc::getFromPointer(getLoc().getPointer() - 1);
Operands.push_back(
AArch64Operand::CreateShiftExtend(ShOp, 0, false, S, E, getContext()));
return MatchOperand_Success;
}
- // Make sure we do actually have a number or a parenthesized expression.
+ // Make sure we do actually have a number, identifier or a parenthesized
+ // expression.
SMLoc E = Parser.getTok().getLoc();
if (!Parser.getTok().is(AsmToken::Integer) &&
- !Parser.getTok().is(AsmToken::LParen)) {
+ !Parser.getTok().is(AsmToken::LParen) &&
+ !Parser.getTok().is(AsmToken::Identifier)) {
Error(E, "expected integer shift amount");
return MatchOperand_ParseFail;
}
OpenPOWER on IntegriCloud