#include <atomic>
#include <cstdint>
-#if defined(__s390x__) || (defined(__mips__) && _MIPS_SIM ==_ABI64 )
+#if defined(__s390x__) || (defined(__mips__) && _MIPS_SIM ==_ABI64 ) \
+ || (defined __riscv && __riscv_xlen == 64)
// Boost needs 16-byte atomics for tagged pointers.
// These are implemented via inline instructions on the platform
// if 16-byte alignment can be proven, and are delegated to libatomic
std::atomic<uint16_t> w2;
std::atomic<uint32_t> w4;
std::atomic<uint64_t> w8;
- return w1 + w2 + w4 + w8;
+ return ++w1 + ++w2 + ++w4 + ++w8;
}
" ${var})
endfunction(check_cxx_atomics)