aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp18
-rw-r--r--test/MC/AsmParser/x86_instructions.s3
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index c3e292eb7e..4643211867 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()))
diff --git a/test/MC/AsmParser/x86_instructions.s b/test/MC/AsmParser/x86_instructions.s
index 436e2e08fb..0d3367a03f 100644
--- a/test/MC/AsmParser/x86_instructions.s
+++ b/test/MC/AsmParser/x86_instructions.s
@@ -49,3 +49,6 @@
// RUN: grep {MCInst(opcode=.*, operands=.reg:21, reg:0, reg:19.)} %t
subl %eax, %ebx
+// FIXME: Check that this matches the correct instruction.
+// RUN: grep {MCInst(opcode=.*, operands=.reg:80.)} %t
+ call *%rax