> On 24 May 2026, at 14:02, Sergey Bugaev <[email protected]> wrote:
> 
> ...why cannot it? What would prevent it from doing so? These are still
> just memory loads, and the problematic instruction is a perfectly fine
> way to do memory loads as far as the compiler is concerned, right?
> (Was this suggested by an LLM?)
> 
> What you really want to prevent issues like that is either building
> this function (or perhaps this whole file) with a compiler option that
> explicitly tells it to avoid those sorts of assumptions /
> instructions, or as a simpler hack, using volatile.
Yes, this was indeed suggested by the LLM, my C is a bit rusty,
have been working with higher level languages and projects
for too long, should have spotted this. volatile indeed works
and is the proper way to fix this. Will fix it for v2

Reply via email to