3 ms·
// Check support for LSE atomics MOVBU internal∕cpu·ARM64+const_offsetARM64HasATOMICS(SB), R4 CBZ R4, load_store_loop Why is this a runtime decision? Shouldn
by perryizgr8 3y ago
// Check support for LSE atomics
MOVBU internal∕cpu·ARM64+const_offsetARM64HasATOMICS(SB), R4
CBZ R4, load_store_loop
Why is this a runtime decision? Shouldn't the compiler know if the target machine supports the instruction or not?
- enz 3y agoI believe Go wants to support "ARM64" that just works among the heterogeneous fleets of Arm machines (from Raspberry Pi to Graviton EC2 instances) and let the programmer not to worry about it. GCC seems to do the same if I believe the article linked on "MySQL on ARM": it emits code that dynamically decides to either use CAS or LL/SC depending on the LSE support.