From: Eddie Hung Date: Tue, 9 Jul 2019 16:35:09 +0000 (-0700) Subject: Rename __builtin_bswap32 -> bswap32 X-Git-Tag: working-ls180~1214^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a0f2e43c796ed91693d60261bd75a489f778a3a;p=yosys.git Rename __builtin_bswap32 -> bswap32 --- diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 869b741a6..69f63486c 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -21,13 +21,15 @@ // https://stackoverflow.com/a/46137633 #ifdef _MSC_VER #include -#define __builtin_bswap32 _byteswap_ulong +#define bswap32 _byteswap_ulong #elif defined(__APPLE__) #include -#define __builtin_bswap32 OSSwapInt32 -#elif !defined(__GNUC__) +#define bswap32 OSSwapInt32 +#elif defined(__GNUC__) +#define bswap32 __builtin_bswap32 +#else #include -inline uint32_t __builtin_bswap32(uint32_t x) +inline static uint32_t bswap32(uint32_t x) { // https://stackoverflow.com/a/27796212 register uint32_t value = number_to_be_reversed;