top | item 41926609

(no title)

smaddox | 1 year ago

Not the OP, and not at all an expert in this area, but I was curious what the answer was, and from a bit of reading it seems like a potential reason that might not work is because volatile also prevents caching the value in a register. So if you want to keep the computation in a register, but you want to explicitly clear the value to zero before writing to it, it seems like C semantics are insufficient (at least without inline assembly).

discuss

order

manoweb|1 year ago

Excuse me but what would be the use of zeroing a register before overwriting it?