Copyright (C) 2000-2012 |
GNU Info (nasm.info)Section 2.1.162.1.16. The `-On' Option: Specifying Multipass Optimization. ------------------------------------------------------------ NASM defaults to being a two pass assembler. This means that if you have a complex source file which needs more than 2 passes to assemble optimally, you have to enable extra passes. Using the `-O' option, you can tell NASM to carry out multiple passes. The syntax is: * `-O0' strict two-pass assembly, JMP and Jcc are handled more like v0.98, except that backward JMPs are short, if possible. Immediate operands take their long forms if a short form is not specified. * `-O1' strict two-pass assembly, but forward branches are assembled with code guaranteed to reach; may produce larger code than -O0, but will produce successful assembly more often if branch offset sizes are not specified. Additionally, immediate operands which will fit in a signed byte are optimised, unless the long form is specified. * `-On' multi-pass optimization, minimize branch offsets; also will minimize signed immediate bytes, overriding size specification unless the `strict' keyword has been used (see *Note Section 3.7::). The number specifies the maximum number of passes. The more passes, the better the code, but the slower is the assembly. Note that this is a capital O, and is different from a small o, which is used to specify the output format. See *Note Section 2.1.1::. automatically generated by info2www version 1.2.2.9 |