We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f38065f commit a99c7d7Copy full SHA for a99c7d7
include/aws/common/byte_order.inl
@@ -35,10 +35,8 @@ AWS_STATIC_IMPL uint64_t aws_hton64(uint64_t x) {
35
if (aws_is_big_endian()) {
36
return x;
37
}
38
-#if defined(__x86_64__) && (defined(__GNUC__) || defined(__clang__)) && !defined(CBMC)
39
- uint64_t v;
40
- __asm__("bswap %q0" : "=r"(v) : "0"(x));
41
- return v;
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(CBMC)
+ return __builtin_bswap64(x);
42
#elif defined(_MSC_VER)
43
return _byteswap_uint64(x);
44
#else
0 commit comments