llvm-6502/lib/Target/X86/X86Instr3DNow.td
Chris Lattner 548abfcbd6 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
2010-10-03 18:08:05 +00:00

45 lines
1.7 KiB
TableGen

//====- X86Instr3DNow.td - The 3DNow! Instruction Set ------*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file describes the 3DNow! instruction set, which extends MMX to support
// 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.