Liste des Groupes | Revenir à c arch |
Why in the world would GCC use an XCHG instruction for the following code. The damn XCHG has an implied LOCK prefix! Yikes!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://godbolt.org/z/Thxchdcr8
_______________________
#include <atomic>
int main()
{
std::atomic<unsigned long> m_state = 0;
m_state.store(std::memory_order_relaxed);
return 0;[...]
}
_______________________
Les messages affichés proviennent d'usenet.