]> granicus.if.org Git - llvm/commitdiff
[X86] Finish the subtarget and predicate implementation of CLWB.
authorCraig Topper <craig.topper@intel.com>
Tue, 29 Aug 2017 23:13:36 +0000 (23:13 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 29 Aug 2017 23:13:36 +0000 (23:13 +0000)
We don't have an intrinsic implemented for this instruction yet, but it looked odd that we were missing the accessor method from the subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312064 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86Subtarget.h

index f20841bd02e177581ea3c042433ac3a2f848b8d8..1c7e84de522880237e579baf15ba27e7cc630451 100644 (file)
@@ -872,6 +872,7 @@ def FPStackf32   : Predicate<"!Subtarget->hasSSE1()">;
 def FPStackf64   : Predicate<"!Subtarget->hasSSE2()">;
 def HasMPX       : Predicate<"Subtarget->hasMPX()">;
 def HasCLFLUSHOPT : Predicate<"Subtarget->hasCLFLUSHOPT()">;
+def HasCLWB      : Predicate<"Subtarget->hasCLWB()">;
 def HasCmpxchg16b: Predicate<"Subtarget->hasCmpxchg16b()">;
 def Not64BitMode : Predicate<"!Subtarget->is64Bit()">,
                              AssemblerPredicate<"!Mode64Bit", "Not 64-bit mode">;
@@ -2718,6 +2719,9 @@ let Predicates = [HasTBM] in {
 let Predicates = [HasCLFLUSHOPT] in
 def CLFLUSHOPT : I<0xAE, MRM7m, (outs), (ins i8mem:$src),
                    "clflushopt\t$src", [(int_x86_clflushopt addr:$src)]>, PD;
+
+// TODO: Add an instrincis for this.
+let Predicates = [HasCLWB] in
 def CLWB       : I<0xAE, MRM6m, (outs), (ins i8mem:$src), "clwb\t$src", []>, PD;
 
 
index e1e1cdfb8da8839a22704639f2c64ca6cf270d13..8b869022d761e181ec71486fb94bceccf90cff73 100644 (file)
@@ -507,6 +507,7 @@ public:
   bool hasPKU() const { return HasPKU; }
   bool hasMPX() const { return HasMPX; }
   bool hasCLFLUSHOPT() const { return HasCLFLUSHOPT; }
+  bool hasCLWB() const { return HasCLWB; }
 
   bool isXRaySupported() const override { return is64Bit(); }