summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-22 18:16:52 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-22 18:20:49 -0700
commit269700972c2016492d6373b68712af485b0d97e2 (patch)
tree9f5fb2e56388bfbcdb7ede961d891515c3abcae1 /nasm.c
parent25a993488ca79dc469ae6363ad062f9fbda19492 (diff)
downloadnasm-269700972c2016492d6373b68712af485b0d97e2.tar.gz
Disallow optimizing by less than 5 passes.
Disallow optimizing by less than 5 passes. If the user requests 2-4 passes, run 5 passes anyway.
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nasm.c b/nasm.c
index 161a2164..f9917b15 100644
--- a/nasm.c
+++ b/nasm.c
@@ -407,8 +407,12 @@ static int process_arg(char *p, char *q)
optimizing = -1; /* 0.98 behaviour */
else if (opt == 1)
optimizing = 0; /* Two passes, 0.98.09 behavior */
- else
- optimizing = opt; /* Multiple passes */
+ else if (opt <= 5)
+ /* The optimizer seems to have problems with
+ < 5 passes? Hidden bug? */
+ optimizing = 5; /* 5 passes */
+ else
+ optimizing = opt; /* More than 5 passes */
} else {
if (*param == 'v' || *param == '+') {
++param;