blob: f44526d664b62d1955921985581686eee7adbf27 [file] [log] [blame]
Evan Chengffcb95b2006-02-21 19:13:53 +00001//====- X86InstrMMX.td - Describe the X86 Instruction Set -------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the Evan Cheng and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the X86 MMX instruction set, defining the instructions,
11// and properties of the instructions which are needed for code generation,
12// machine code emission, and analysis.
13//
14//===----------------------------------------------------------------------===//
15
Evan Chengba753c62006-03-20 06:04:52 +000016// Some 'special' instructions
17def IMPLICIT_DEF_VR64 : I<0, Pseudo, (ops VR64:$dst),
18 "#IMPLICIT_DEF $dst",
19 [(set VR64:$dst, (v8i8 (undef)))]>,
20 Requires<[HasMMX]>;
21
22def : Pat<(v4i16 (undef)), (IMPLICIT_DEF_VR64)>, Requires<[HasMMX]>;
23def : Pat<(v2i32 (undef)), (IMPLICIT_DEF_VR64)>, Requires<[HasMMX]>;
24
Evan Chengffcb95b2006-02-21 19:13:53 +000025// Move Instructions
26def MOVD64rr : I<0x6E, MRMSrcReg, (ops VR64:$dst, R32:$src),
Evan Cheng4a7da362006-03-21 23:04:23 +000027 "movd {$src, $dst|$dst, $src}", []>, TB,
Evan Chengffcb95b2006-02-21 19:13:53 +000028 Requires<[HasMMX]>;
29def MOVD64rm : I<0x6E, MRMSrcMem, (ops VR64:$dst, i32mem:$src),
30 "movd {$src, $dst|$dst, $src}", []>, TB,
31 Requires<[HasMMX]>;
32def MOVD64mr : I<0x7E, MRMDestMem, (ops i32mem:$dst, VR64:$src),
33 "movd {$src, $dst|$dst, $src}", []>, TB,
34 Requires<[HasMMX]>;
35
Evan Chengffcb95b2006-02-21 19:13:53 +000036def MOVQ64rr : I<0x6F, MRMSrcReg, (ops VR64:$dst, VR64:$src),
37 "movq {$src, $dst|$dst, $src}", []>, TB,
38 Requires<[HasMMX]>;
39def MOVQ64rm : I<0x6F, MRMSrcMem, (ops VR64:$dst, i64mem:$src),
40 "movq {$src, $dst|$dst, $src}", []>, TB,
41 Requires<[HasMMX]>;
42def MOVQ64mr : I<0x7F, MRMDestMem, (ops i64mem:$dst, VR64:$src),
43 "movq {$src, $dst|$dst, $src}", []>, TB,
44 Requires<[HasMMX]>;
Evan Cheng3246e062006-03-25 01:31:59 +000045
46// Conversion instructions
47def CVTTPS2PIrr: I<0x2C, MRMSrcReg, (ops VR64:$dst, VR128:$src),
48 "cvttps2pi {$src, $dst|$dst, $src}", []>, TB,
49 Requires<[HasSSE2]>;
Evan Chengcc4f0472006-03-25 06:00:03 +000050def CVTTPS2PIrm: I<0x2C, MRMSrcMem, (ops VR64:$dst, f64mem:$src),
Evan Cheng3246e062006-03-25 01:31:59 +000051 "cvttps2pi {$src, $dst|$dst, $src}", []>, TB,
52 Requires<[HasMMX]>;