aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmParser/X86AsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 7dbd2217d1..c9e210795d 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -1082,6 +1082,13 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
Operands[0] = X86Operand::CreateToken("xor", NameLoc);
}
+ // FIXME: Hack to handle recognize "aa[dm]" -> "aa[dm] $0xA".
+ if ((Name.startswith("aad") || Name.startswith("aam")) &&
+ Operands.size() == 1) {
+ const MCExpr *A = MCConstantExpr::Create(0xA, getParser().getContext());
+ Operands.push_back(X86Operand::CreateImm(A, NameLoc, NameLoc));
+ }
+
return false;
}