From 269700972c2016492d6373b68712af485b0d97e2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 22 Sep 2007 18:16:52 -0700 Subject: [PATCH] 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. --- nasm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nasm.c b/nasm.c index 161a216..f9917b1 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; -- 2.7.4