boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
197 stars 162 forks source link

x86 inline assembly should provide an alternative for Intel syntax #383

Open lhmouse opened 1 year ago

lhmouse commented 1 year ago

Instead of https://github.com/boostorg/thread/blob/52b62ee7b029028126c4eaf36e377833b0666510/include/boost/thread/win32/interlocked_read.hpp#L158

we should have

 __asm__ __volatile__ ("{ movl %1, %0 | mov %0, %1 }" : "=r" (res) : "m" (*x) : "memory");