r356862 - [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromium build.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 24 11:00:20 PDT 2019
Author: ctopper
Date: Sun Mar 24 11:00:20 2019
New Revision: 356862
URL: http://llvm.org/viewvc/llvm-project?rev=356862&view=rev
Log:
[X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromium build.
This intrinsic was added in r356848 but was implemented as a macro to match gcc.
Modified:
cfe/trunk/lib/Headers/ia32intrin.h
Modified: cfe/trunk/lib/Headers/ia32intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ia32intrin.h?rev=356862&r1=356861&r2=356862&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/ia32intrin.h (original)
+++ cfe/trunk/lib/Headers/ia32intrin.h Sun Mar 24 11:00:20 2019
@@ -78,7 +78,11 @@ __bswapd(int __A) {
return __builtin_bswap32(__A);
}
-#define _bswap(A) __bswapd((A))
+static __inline__ int __attribute__((__always_inline__, __nodebug__))
+_bswap(int __A) {
+ return __builtin_bswap32(__A);
+}
+
#define _bit_scan_forward(A) __bsfd((A))
#define _bit_scan_reverse(A) __bsrd((A))
More information about the cfe-commits
mailing list