News for hackers. Stuff that matters.
Re:Arm's Cortex X925: Reaching Desktop Performance by vardump on Tuesday March 03, 2026 @05:28AM (#47230541)
That's a possibility. Some code still assumes (without realizing!) x86 style ordered loads and stores. This is called a strong memory model, specifically TSO, Total Store Order. If you tell x86 to execute "a=1; b=2;", it will always store value to 'a' first. Of course compilers might reorder stores and loads, but that's another matter.

ARM is free to reorder stores and loads. This is called a weak memory model. So unless it's explicitly told to the compiler, like C++ memory_order::acquire and memory_order::release, you might get invalid behavior. Heisenbugs in the worst case.

Re:Arm's Cortex X925: Reaching Desktop Performance by Fire-Dragon-DoL on Tuesday March 03, 2026 @11:02PM (#47242906)
Is this only for constants or even for instructions?

Like:

a=fooMethod(); b=otherMethod()

Will this be reordered?

Re:Arm's Cortex X925: Reaching Desktop Performance by vardump on Wednesday March 04, 2026 @03:37AM (#47244724)
Depends on the processor's store queue. It might be. Of course if otherMethod() is anything more complicated, 'a' will almost certainly be assigned first. Of course you should still do the order dependent assignment correctly, like by using C++ std::memory_order or atomics.