On Wednesday, 8 January 2025 at 11:37:48 UTC, Richard (Rikki) Andrew Cattermole wrote:
>Dmd will not inline functions with inline assembly, any function calls should prevent reordering cpu side.
So any concern for ordering you have shouldn't matter for dmd, its ldc and gdc that you need to be worried about.
Visible reordering can occur due to the asynchronous nature of inter-core communication, which is relevant for ARM and other architectures.
So it looks like we need macros that will insert inline opcodes for memory barriers:
writeToBuffer;
mixin(Store_Store);
writeToOffset;
readFromBuffer;
mixin(Load_Store);
writeToOffset;