aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-19 13:09:46 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-19 13:11:34 -0700
commitb83621350cd69649782426ebcfa4c0f26f9aa939 (patch)
tree366e4cf736fdd7292eacf709f5a8a74c517eb61e
parent2586cee21dfc45c24b1bec47c0e0f7ddfae3dca8 (diff)
downloadnasm-b83621350cd69649782426ebcfa4c0f26f9aa939.tar.gz
nasm-b83621350cd69649782426ebcfa4c0f26f9aa939.tar.xz
nasm-b83621350cd69649782426ebcfa4c0f26f9aa939.zip
listing: add the -L+ option to enable all listing options
-L+ or %pragma list options ++ will enable all possible listing options. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--asm/listing.h8
-rw-r--r--asm/nasm.c1
-rw-r--r--test/Makefile2
3 files changed, 9 insertions, 2 deletions
diff --git a/asm/listing.h b/asm/listing.h
index 6156df5a..351fc69e 100644
--- a/asm/listing.h
+++ b/asm/listing.h
@@ -130,7 +130,11 @@ extern uint64_t list_options, active_list_options;
* (with two bits left over for future use! This isn't particularly
* efficient code, but just about every instance of it should be
* fed a constant, so the entire function can be precomputed at
- * compile time.
+ * compile time. The only cases where the full computation is needed
+ * is when parsing the -L option or %pragma list options, neither of
+ * which is in any way performance critical.
+ *
+ * The character + represents ALL listing options.
*
* This returns 0 for invalid values, so that no bit is accessed
* for unsupported characters.
@@ -149,6 +153,8 @@ static inline const_func uint64_t list_option_mask(unsigned char x)
if (x > '9')
return 0;
x = x - '0' + 26*2;
+ } else if (x == '+') {
+ return ~UINT64_C(0);
} else {
return 0;
}
diff --git a/asm/nasm.c b/asm/nasm.c
index 65116ab3..b80d7d6f 100644
--- a/asm/nasm.c
+++ b/asm/nasm.c
@@ -2025,6 +2025,7 @@ static void help(FILE *out)
" -Lf ignore .nolist (force output)\n"
" -Lm show all single-line macro definitions\n"
" -Lp output a list file every pass, in case of errors\n"
+ " -L+ enable all listing options (very verbose!)\n"
"\n"
" -Oflags... optimize opcodes, immediates and branch offsets\n"
" -O0 no optimization\n"
diff --git a/test/Makefile b/test/Makefile
index e7b4647e..5f0676b0 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -2,7 +2,7 @@
NASMDEP = ../nasm
NASM = ../nasm
-NASMOPT = -Ox -I../misc $(OPT)
+NASMOPT = -Ox -I../misc -L+ $(OPT)
PERL = perl
TESTS = $(wildcard *.asm)
RM_F = rm -f