]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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 960c6cbe3d37ddf9745a524359355d63a3f48148..e5d795e63e93a4f35befb4e63d61a3b72aadba9a 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 {