The x86 instruction for this would be LOCK CMPXCHG8B and would allow atomically writing 64 bits. (The x64 version would be LOCK CMPXCHG16B for writing 128 bits.)
Instruction goes back a while, there was a bug on pentium <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pentium_F00F_bug" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pentium_F00F_bug</a>