BUILD: intops: on x86_64, the bswap instruction is called bswapq
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Sep 2020 07:31:50 +0000 (09:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Sep 2020 07:31:50 +0000 (09:31 +0200)
Building with tcc fails on "bswap" which in fact ought to be called
"bswapq". Let's rename it as gas doesn't care.

include/haproxy/intops.h

index 960c6cb..e5d795e 100644 (file)
@@ -220,7 +220,7 @@ static inline unsigned long nbits(int bits)
 static inline unsigned long long my_htonll(unsigned long long a)
 {
 #if defined(__x86_64__)
-       __asm__ volatile("bswap %0" : "=r"(a) : "0"(a));
+       __asm__ volatile("bswapq %0" : "=r"(a) : "0"(a));
        return a;
 #else
        union {