Re:NASM Assembly Language Tutorials
by glandium on Monday January 03, 2022 @09:06PM
(#29790283)
Actually, nasm does have optimization passes. https://nasm.us/doc/nasmdoc2.html#section-2.1.24 That's not full of details, but one thing that it does on x86_64, for example is replace instructions that set 64-bits registers to immediate values smaller than 2^32 with instructions that set the equivalent 32-bits register (because that's a shorter equivalent, because those instructions zero-extend the value).
[ Parent
| on HN ]