Zeroing registers
Zeroing registers
Posted Sep 25, 2021 18:44 UTC (Sat) by khim (subscriber, #9252)In reply to: Zeroing registers by epa
Parent article: Two security improvements for GCC
No. On moderc CPU it's not trivial at all. Looks on Fog's tables. VZEROALL is either slow or really slow on modern CPUs
MOV register, #0 may have zero latency, but only if there are one such mov. Add dozen of them in row — and there would be noticeable slowdown. You forget about register renaming — it plays poorly with such instructions.