mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-31 18:20:22 +08:00
Document the -Ov option, minor fix for gcc -Og
The -Ov option is useful but was undocumented. Add an initialization to keep gcc from complaining at optimization level -Og. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
0402a2d402
commit
1e2358b17f
@ -1135,6 +1135,7 @@ static bool process_arg(char *p, char *q, int pass)
|
||||
break;
|
||||
}
|
||||
|
||||
olen = 0; /* Placate gcc at lower optimization levels */
|
||||
plen = strlen(p);
|
||||
for (tx = textopts; tx->label; tx++) {
|
||||
olen = strlen(tx->label);
|
||||
@ -1985,10 +1986,11 @@ static void help(const char xopt)
|
||||
" -l listfile write listing to a listfile\n\n"
|
||||
" -Ipath add a pathname to the include file path\n");
|
||||
printf
|
||||
(" -Olevel optimize opcodes, immediates and branch offsets\n"
|
||||
(" -Oflags... optimize opcodes, immediates and branch offsets\n"
|
||||
" -O0 no optimization\n"
|
||||
" -O1 minimal optimization\n"
|
||||
" -Ox multipass optimization (default)\n"
|
||||
" -Ov display the number of passes executed at the end\n"
|
||||
" -Pfile pre-include a file (also --include)\n"
|
||||
" -Dmacro[=str] pre-define a macro\n"
|
||||
" -Umacro undefine a macro\n"
|
||||
|
@ -746,7 +746,9 @@ with a \i{stub preprocessor} which does nothing.
|
||||
\S{opt-O} The \i\c{-O} Option: Specifying \i{Multipass Optimization}
|
||||
|
||||
Using the \c{-O} option, you can tell NASM to carry out different
|
||||
levels of optimization. The syntax is:
|
||||
levels of optimization. Multiple flags can be specified after the
|
||||
\c{-O} options, some of which can be combined in a single option,
|
||||
e.g. \c{-Oxv}.
|
||||
|
||||
\b \c{-O0}: No optimization. All operands take their long forms,
|
||||
if a short form is not specified, except conditional jumps.
|
||||
@ -764,6 +766,9 @@ levels of optimization. The syntax is:
|
||||
releases, the letter \c{x} may also be any number greater than
|
||||
one. This number has no effect on the actual number of passes.
|
||||
|
||||
\b \c{-Ov}: At the end of assembly, print the number of passes
|
||||
actually executed.
|
||||
|
||||
The \c{-Ox} mode is recommended for most uses, and is the default
|
||||
since NASM 2.09.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user