Skip to content

Commit a99c7d7

Browse files
Fix byte helpers for mingw 32 bit (#1210)
1 parent f38065f commit a99c7d7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/aws/common/byte_order.inl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ AWS_STATIC_IMPL uint64_t aws_hton64(uint64_t x) {
3535
if (aws_is_big_endian()) {
3636
return x;
3737
}
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;
38+
#if (defined(__GNUC__) || defined(__clang__)) && !defined(CBMC)
39+
return __builtin_bswap64(x);
4240
#elif defined(_MSC_VER)
4341
return _byteswap_uint64(x);
4442
#else

0 commit comments

Comments
 (0)