Document the STRICT keyword

This commit is contained in:
H. Peter Anvin 2002-05-22 05:40:50 +00:00
parent 4c8aaa01b5
commit ae438913af

View File

@ -187,7 +187,6 @@ Object File Format
\IA{standard section names}{standardised section names}
\IR{symbols, exporting from dlls} symbols, exporting from DLLs
\IR{symbols, importing from dlls} symbols, importing from DLLs
\IR{tasm} \c{TASM}
\IR{test subdirectory} \c{test} subdirectory
\IR{tlink} \c{TLINK}
\IR{underscore, in c symbols} underscore, in C symbols
@ -1480,6 +1479,26 @@ NASM supports no convenient synonym for this, though you can always
invent one using the macro processor.
\H{strict} \i\c{STRICT}: Inhibiting Optimization
When compiling with the optimizer set to level 2 or higher (see
\k{opt-On}), NASM will use size specifiers (\c{BYTE}, \c{WORD},
\c{DWORD}, \c{QWORD}, or \c{TWORD}) strictly to choose the address- or
operand-size of the instruction. The keyword \c{STRICT} can be used
to inhibit optimization and force a particular operand to be emitted
in the specified size. For example, with the optimizer on, and in
\c{BITS 16} mode,
\c push dword 33
is encoded in three bytes \c{66 6A 21}, whereas
\c push strict dword 33
is encoded in six bytes, with a full dword immediate operand \c{66 68
21 00 00 00}.
\H{crit} \i{Critical Expressions}
A limitation of NASM is that it is a \i{two-pass assembler}; unlike