Use intrinsics rather than inline assembly where possible
[folly.git] / folly / Portability.h
index a9348e5c9557d2f95a91d248690ebcc1b3a4894f..cbf1b71c3ef2ed2713307caf6c2b1915fad64944 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-// Break caches 20160401 (#8764509) @nocommit
 #pragma once
 
 #include <string.h>
@@ -93,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