llvm.org GIT mirror llvm / 229baff
Add the emms intrinsic for MMX support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34938 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 12 years ago
3 changed file(s) with 24 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
534534 Intrinsic<[llvm_void_ty, llvm_i32_ty,
535535 llvm_i32_ty], [IntrWriteMem]>;
536536 }
537
538 //===----------------------------------------------------------------------===//
539 // MMX
540
541 // Empty MMX state op.
542 let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
543 def int_x86_mmx_emms : GCCBuiltin<"__builtin_ia32_emms">,
544 Intrinsic<[llvm_void_ty], [IntrWriteMem]>;
545 }
3131
3232 def : Pat<(v4i16 (undef)), (IMPLICIT_DEF_VR64)>, Requires<[HasMMX]>;
3333 def : Pat<(v2i32 (undef)), (IMPLICIT_DEF_VR64)>, Requires<[HasMMX]>;
34
35 // EMMS
36 def EMMS : I<0x77, RawFrm, (ops), "emms", [(int_x86_mmx_emms)]>, TB,
37 Requires<[HasMMX]>;
3438
3539 // Move Instructions
3640 def MOVD64rr : I<0x6E, MRMSrcReg, (ops VR64:$dst, GR32:$src),
9397 def MASKMOVQ : I<0xF7, MRMDestMem, (ops VR64:$src, VR64:$mask),
9498 "maskmovq {$mask, $src|$src, $mask}", []>, TB,
9599 Requires<[HasMMX]>;
96
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx | grep emms
1 define void @foo() {
2 entry:
3 call void @llvm.x86.mmx.emms( )
4 br label %return
5
6 return: ; preds = %entry
7 ret void
8 }
9
10 declare void @llvm.x86.mmx.emms()