[llvm-commits] [dragonegg] r139388 - /dragonegg/trunk/include/x86/dragonegg/Target.h

Duncan Sands baldrick at free.fr
Fri Sep 9 12:40:06 PDT 2011


Author: baldrick
Date: Fri Sep  9 14:40:06 2011
New Revision: 139388

URL: http://llvm.org/viewvc/llvm-project?rev=139388&view=rev
Log:
Add support for some extra x86 target features that are selectable
(or deselectable) from the command line: aes, cmpxchg16b, fma4 and popcnt.

Modified:
    dragonegg/trunk/include/x86/dragonegg/Target.h

Modified: dragonegg/trunk/include/x86/dragonegg/Target.h
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/include/x86/dragonegg/Target.h?rev=139388&r1=139387&r2=139388&view=diff
==============================================================================
--- dragonegg/trunk/include/x86/dragonegg/Target.h (original)
+++ dragonegg/trunk/include/x86/dragonegg/Target.h Fri Sep  9 14:40:06 2011
@@ -273,11 +273,6 @@
     else if (target_flags_explicit & OPTION_MASK_ISA_64BIT)	\
       F.AddFeature("64bit", false);				\
 								\
-    if (TARGET_MMX)						\
-      F.AddFeature("mmx");					\
-    else if (target_flags_explicit & OPTION_MASK_ISA_MMX)	\
-      F.AddFeature("mmx", false);				\
-								\
     if (TARGET_3DNOW)						\
       F.AddFeature("3dnow");					\
     else if (target_flags_explicit & OPTION_MASK_ISA_3DNOW)	\
@@ -288,6 +283,41 @@
     else if (target_flags_explicit & OPTION_MASK_ISA_3DNOW_A)	\
       F.AddFeature("3dnowa", false);				\
 								\
+    if (TARGET_AES)						\
+      F.AddFeature("aes");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_AES)	\
+      F.AddFeature("aes", false);				\
+								\
+    if (TARGET_AVX)						\
+      F.AddFeature("avx");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_AVX)	\
+      F.AddFeature("avx", false);				\
+								\
+    if (TARGET_CMPXCHG16B)					\
+      F.AddFeature("cmpxchg16b");				\
+    else if (target_flags_explicit & OPTION_MASK_ISA_CX16)	\
+      F.AddFeature("cmpxchg16b", false);			\
+								\
+    if (TARGET_FMA)						\
+      F.AddFeature("fma3");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_FMA)	\
+      F.AddFeature("fma3", false);				\
+								\
+    if (TARGET_FMA4)						\
+      F.AddFeature("fma4");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_FMA4)	\
+      F.AddFeature("fma4", false);				\
+								\
+    if (TARGET_MMX)						\
+      F.AddFeature("mmx");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_MMX)	\
+      F.AddFeature("mmx", false);				\
+								\
+    if (TARGET_POPCNT)						\
+      F.AddFeature("popcnt");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_POPCNT)	\
+      F.AddFeature("popcnt", false);				\
+								\
     if (TARGET_SSE)						\
       F.AddFeature("sse");					\
     else if (target_flags_explicit & OPTION_MASK_ISA_SSE)	\
@@ -303,11 +333,6 @@
     else if (target_flags_explicit & OPTION_MASK_ISA_SSE3)	\
       F.AddFeature("sse3", false);				\
 								\
-    if (TARGET_SSSE3)						\
-      F.AddFeature("ssse3");					\
-    else if (target_flags_explicit & OPTION_MASK_ISA_SSSE3)	\
-      F.AddFeature("ssse3", false);				\
-								\
     if (TARGET_SSE4_1)						\
       F.AddFeature("sse41");					\
     else if (target_flags_explicit & OPTION_MASK_ISA_SSE4_1)	\
@@ -318,20 +343,15 @@
     else if (target_flags_explicit & OPTION_MASK_ISA_SSE4_2)	\
       F.AddFeature("sse42", false);				\
 								\
-    if (TARGET_AVX)						\
-      F.AddFeature("avx");					\
-    else if (target_flags_explicit & OPTION_MASK_ISA_AVX)	\
-      F.AddFeature("avx", false);				\
-								\
-    if (TARGET_FMA)						\
-      F.AddFeature("fma3");					\
-    else if (target_flags_explicit & OPTION_MASK_ISA_FMA)	\
-      F.AddFeature("fma3", false);				\
-								\
     if (TARGET_SSE4A)						\
       F.AddFeature("sse4a");					\
     else if (target_flags_explicit & OPTION_MASK_ISA_SSE4A)	\
       F.AddFeature("sse4a", false);				\
+								\
+    if (TARGET_SSSE3)						\
+      F.AddFeature("ssse3");					\
+    else if (target_flags_explicit & OPTION_MASK_ISA_SSSE3)	\
+      F.AddFeature("ssse3", false);				\
   }
 
 #define LLVM_SET_IMPLICIT_FLOAT(flag_no_implicit_float)       \





More information about the llvm-commits mailing list