x86 使用的是 TSO (Total Store Ordering), 而 ARM 是 weak memory ordering 。
苹果在 Apple Silicon (M1/A12Z)中内置了一个状态寄存器来模拟 TSO,这个操作是 per-thread 的,且只能运行在大核上。
这是代码: https://github.com/saagarjha/TSOEnabler
这是最近的讨论: https://www.reddit.com/r/hardware/comments/i0mido/apple_silicon_has_a_runtime_toggle_for_tso_to/
这是几个月前的讨论: https://www.realworldtech.com/forum/?threadid=193883&curpostid=193883