summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-07-25 12:43:30 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-07-25 12:43:30 -0700
commitab5bd05d8238415436f9a6087976fcda0efd837c (patch)
treebf8643dd245bdae2fb67564b6b8e6e0b62e92904 /nasm.c
parentb453c866ab27b4f4df36be9f0098337fea3b0432 (diff)
downloadnasm-ab5bd05d8238415436f9a6087976fcda0efd837c.tar.gz
nasm-ab5bd05d8238415436f9a6087976fcda0efd837c.tar.bz2
nasm-ab5bd05d8238415436f9a6087976fcda0efd837c.zip
Revert "Improve process_ea and introduce -OL"
This reverts commit ac732cb6a599836bf4c988e59ac6de4498758c72. Resolved Conflicts: doc/nasmdoc.src Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/nasm.c b/nasm.c
index f6a710a..7a63afb 100644
--- a/nasm.c
+++ b/nasm.c
@@ -674,22 +674,14 @@ static bool process_arg(char *p, char *q)
case '5': case '6': case '7': case '8': case '9':
opt = strtoul(param, &param, 10);
- if (opt == 0)
- /* no optimization */
- optimizing = -2;
- else if (opt == 1)
- /* 0.98.09 behaviour */
- optimizing = 0;
+ /* -O0 -> optimizing == -1, 0.98 behaviour */
+ /* -O1 -> optimizing == 0, 0.98.09 behaviour */
+ if (opt < 2)
+ optimizing = opt - 1;
else
optimizing = opt;
break;
- case 'L':
- /* 0.98 behaviour */
- param++;
- optimizing = -1;
- break;
-
case 'v':
case '+':
param++;
@@ -791,11 +783,10 @@ static bool process_arg(char *p, char *q)
" -F format select a debugging format\n\n"
" -I<path> adds a pathname to the include file path\n");
printf
- (" -O<digit> optimize code size\n"
- " -O0: No optimization\n"
- " -OL: Legacy optimization\n"
+ (" -O<digit> optimize branch offsets\n"
+ " -O0: No optimization (default)\n"
" -O1: Minimal optimization\n"
- " -Ox: Full optimization (default)\n\n"
+ " -Ox: Multipass optimization (recommended)\n\n"
" -P<file> pre-includes a file\n"
" -D<macro>[=<value>] pre-defines a macro\n"
" -U<macro> undefines a macro\n"