summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2010-10-18 17:04:36 +0000
committerKevin Enderby <enderby@apple.com>2010-10-18 17:04:36 +0000
commitb9783dd9bc7a5175e2526264bb83a22cd70a6a59 (patch)
tree5d9b0273efe598fa4f97c7036c0622f7a0774760 /llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
parent3521f8467db02f777c26e9274cd28825b0618318 (diff)
downloadbcm5719-llvm-b9783dd9bc7a5175e2526264bb83a22cd70a6a59.tar.gz
bcm5719-llvm-b9783dd9bc7a5175e2526264bb83a22cd70a6a59.zip
Added a handful of x86-32 instructions that were missing so that llvm-mc would
be more complete. These are only expected to be used by llvm-mc with assembly source so there is no pattern, [], in the .td files. Most are being added to X86InstrInfo.td as Chris suggested and only comments about register uses are added. Suggestions welcome on the .td changes as I'm not sure on every detail of the x86 records. More missing instructions will be coming. llvm-svn: 116716
Diffstat (limited to 'llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r--llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 7dbd2217d19..c9e210795dd 100644
--- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud