Use intrinsics rather than inline assembly where possible
[folly.git] / folly / Portability.h
index c9616ea7caa23dcaa304007be149877249218b88..cbf1b71c3ef2ed2713307caf6c2b1915fad64944 100644 (file)
@@ -92,6 +92,13 @@ constexpr bool kHasUnalignedAccess = false;
 # define FOLLY_ALWAYS_INLINE inline
 #endif
 
+// target
+#ifdef _MSC_VER
+# define FOLLY_TARGET_ATTRIBUTE(target)
+#else
+# define FOLLY_TARGET_ATTRIBUTE(target) __attribute__((__target__(target)))
+#endif
+
 // detection for 64 bit
 #if defined(__x86_64__) || defined(_M_X64)
 # define FOLLY_X64 1