From ae438913afd0f78551e7c652d5250868feae7d01 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 22 May 2002 05:40:50 +0000 Subject: [PATCH] Document the STRICT keyword --- doc/nasmdoc.src | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index c854917..02f8387 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -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 -- 2.7.4