On Thu, 31 Oct 2024, LIU Hao wrote:


--

Overall, I'm not familiar enough with nontrivial aspects of x86 assembly to comment reasonably on it - so I guess it's mostly "probably ok, if you say so".

However this bit caught my eye:

First, these intrins read from and write to thread-local memory, so the asm statement shall be `volatile`.

Can you elaborate about the reasoning here? Isn't volatile primarily needed if the assembly has some side effect that otherwise can't be modelled - e.g. if the outputs of the inline assembly isn't needed, we still can't skip the whole assembly.

I don't quite see why that's specifically needed for thread local memory - but I have nothing against adding volatile here either. I'm just curious about the reasoning.

// Martin



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to