aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-11 05:00:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-11 05:00:25 +0000
commit0db68f4e3a8be1641dbba72a41baa6ff1b5dd6af (patch)
tree6004ccced6d4a2e032c7b1653186882d9bcabdbb /lib/Target
parent1e840b2c6150838815c1041562f9876560b0b465 (diff)
downloadexternal_llvm-0db68f4e3a8be1641dbba72a41baa6ff1b5dd6af.zip
external_llvm-0db68f4e3a8be1641dbba72a41baa6ff1b5dd6af.tar.gz
external_llvm-0db68f4e3a8be1641dbba72a41baa6ff1b5dd6af.tar.bz2
llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index c3e292e..4643211 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -263,17 +263,6 @@ bool X86ATTAsmParser::ParseOperand(X86Operand &Op) {
Op = X86Operand::CreateImm(Val);
return false;
}
- case AsmToken::Star:
- getLexer().Lex(); // Eat the star.
-
- if (getLexer().is(AsmToken::Register)) {
- if (ParseRegister(Op))
- return true;
- } else if (ParseMemOperand(Op))
- return true;
-
- // FIXME: Note the '*' in the operand for use by the matcher.
- return false;
}
}
@@ -406,6 +395,13 @@ bool X86ATTAsmParser::ParseInstruction(const StringRef &Name, MCInst &Inst) {
SMLoc Loc = getLexer().getTok().getLoc();
if (getLexer().isNot(AsmToken::EndOfStatement)) {
+
+ // Parse '*' modifier.
+ if (getLexer().is(AsmToken::Star)) {
+ getLexer().Lex(); // Eat the star.
+ Operands.push_back(X86Operand::CreateToken("*"));
+ }
+
// Read the first operand.
Operands.push_back(X86Operand());
if (ParseOperand(Operands.back()))