aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Instr3DNow.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-10-03 18:08:05 +0000
committerChris Lattner <sabre@nondot.org>2010-10-03 18:08:05 +0000
commit548abfcbd671b1144bf517b17643259dcae76f4f (patch)
treef8ea433a9113b9eefe20e54a802438ddc9337a03 /lib/Target/X86/X86Instr3DNow.td
parent5dd76fa50a63c6460957d11d2542469f0a7d65d7 (diff)
Implement support for the bizarre 3DNow! encoding (which is unlike anything
else in X86), and add support for pavgusb. This is apparently the only instruction (other than movsx) that is preventing ffmpeg from building with clang. If someone else is interested in banging out the rest of the 3DNow! instructions, it should be quite easy now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Instr3DNow.td')
-rw-r--r--lib/Target/X86/X86Instr3DNow.td31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Instr3DNow.td b/lib/Target/X86/X86Instr3DNow.td
index 7615f845a4..9efa2a6cd3 100644
--- a/lib/Target/X86/X86Instr3DNow.td
+++ b/lib/Target/X86/X86Instr3DNow.td
@@ -11,3 +11,34 @@
// floating point and also adds a few more random instructions for good measure.
//
//===----------------------------------------------------------------------===//
+
+// FIXME: We don't support any intrinsics for these instructions yet.
+
+class I3DNow<bits<8> o, Format F, dag outs, dag ins, string asm,
+ list<dag> pattern>
+ : I<o, F, outs, ins, asm, pattern>, TB, Requires<[Has3DNow]>,
+ Has3DNow0F0FOpcode {
+ // FIXME: The disassembler doesn't support 3DNow! yet.
+ let isAsmParserOnly = 1;
+}
+
+
+let Constraints = "$src1 = $dst" in {
+ // MMXI_binop_rm_int - Simple MMX binary operator based on intrinsic.
+ // When this is cleaned up, remove the FIXME from X86RecognizableInstr.cpp.
+ multiclass I3DNow_binop_rm<bits<8> opc, string Mnemonic> {
+ def rr : I3DNow<opc, MRMSrcReg, (outs VR64:$dst),
+ (ins VR64:$src1, VR64:$src2),
+ !strconcat(Mnemonic, "\t{$src2, $dst|$dst, $src2}"), []>;
+ def rm : I3DNow<opc, MRMSrcMem, (outs VR64:$dst),
+ (ins VR64:$src1, i64mem:$src2),
+ !strconcat(Mnemonic, "\t{$src2, $dst|$dst, $src2}"), []>;
+ }
+}
+
+defm PAVGUSB : I3DNow_binop_rm<0xBF, "pavgusb">;
+
+
+
+
+// TODO: Add support for the rest of the 3DNow! and "3DNowA" instructions.