1 //====- X86Instr3DNow.td - The 3DNow! Instruction Set ------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the 3DNow! instruction set, which extends MMX to support
11 // floating point and also adds a few more random instructions for good measure.
13 //===----------------------------------------------------------------------===//
15 // FIXME: We don't support any intrinsics for these instructions yet.
17 class I3DNow<bits<8> o, Format F, dag outs, dag ins, string asm,
19 : I<o, F, outs, ins, asm, pattern>, TB, Requires<[Has3DNow]>,
21 // FIXME: The disassembler doesn't support 3DNow! yet.
22 let isAsmParserOnly = 1;
26 let Constraints = "$src1 = $dst" in {
27 // MMXI_binop_rm_int - Simple MMX binary operator based on intrinsic.
28 // When this is cleaned up, remove the FIXME from X86RecognizableInstr.cpp.
29 multiclass I3DNow_binop_rm<bits<8> opc, string Mnemonic> {
30 def rr : I3DNow<opc, MRMSrcReg, (outs VR64:$dst),
31 (ins VR64:$src1, VR64:$src2),
32 !strconcat(Mnemonic, "\t{$src2, $dst|$dst, $src2}"), []>;
33 def rm : I3DNow<opc, MRMSrcMem, (outs VR64:$dst),
34 (ins VR64:$src1, i64mem:$src2),
35 !strconcat(Mnemonic, "\t{$src2, $dst|$dst, $src2}"), []>;
39 defm PAVGUSB : I3DNow_binop_rm<0xBF, "pavgusb">;
44 // TODO: Add support for the rest of the 3DNow! and "3DNowA" instructions.