Copyright (C) 2000-2012 |
GNU Info (nasm.info)Section 10.1.110.1.1. NASM Generates Inefficient Code --------------------------------------- We sometimes get `bug' reports about NASM generating inefficient, or even `wrong', code on instructions such as `ADD ESP,8'. This is a deliberate design feature, connected to predictability of output: NASM, on seeing `ADD ESP,8', will generate the form of the instruction which leaves room for a 32-bit offset. You need to code `ADD ESP,BYTE 8' if you want the space-efficient form of the instruction. This isn't a bug, it's user error: if you prefer to have NASM produce the more efficient code automatically enable optimization with the `-On' option (see *Note Section 2.1.16::). automatically generated by info2www version 1.2.2.9 |