> it would be nice if there was some way to specify how memory in certain address ranges need to be addressed.
If making the respective loads and stores volatile doesn't solve this problem please feel free to file a bug against the compiler.
If making the respective loads and stores volatile doesn't solve this problem please feel free to file a bug against the compiler.
Andrew (or any Zig mavens) - What would be the idiomatic way of solving this issue? Can you define your own memcpy with @std.mem.doNotOptimizeAway or something?
There’s a proposal for a way to disable LLVM generating builtin calls like memcpy. But I’d argue volatile would still be more appropriate in this case.
https://github.com/ziglang/zig/issues/22110
Edit: this comment from later in the thread is also relevant: