On Sun, 20 Jun 2021, Tyge Løvset wrote:

on win64 I get an undefined intrinsic symbol   __faststorefence(). It can be implemented as an mfence instruction, but I think microsoft implements it with xchgl or similar

It appears to be implemented as  lock or $0,(%rsp).
I would guess the reasoning that or with 0 is special-cased by the
processor as a no-op, so it doesn't actually perform a write, but the
lock still takes effect?
Regardless, I think it's a good idea to implement such intrinsics.

 -E
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to