Support for the TSO memory model on Arm CPUs
Support for the TSO memory model on Arm CPUs
Posted Apr 29, 2024 10:04 UTC (Mon) by farnz (subscriber, #17727)In reply to: Support for the TSO memory model on Arm CPUs by ringerc
Parent article: Support for the TSO memory model on Arm CPUs
There's also the fact that, at least in theory, compilers are permitted to reorder atomic accesses based on the rules of the language memory model (not the CPU memory model), adding a whole extra layer of complexity.
I don't believe any compiler currently does so for accesses other than "relaxed" type accesses (although I've seen discussions that suggest that LLVM is thinking about this), but it's not forbidden by any language spec I've seen. I have a suspicion, though, that there's plenty of source code out there that's buggy if a compiler does start doing reorderings permitted by the language spec that aren't permitted by TSO.
