aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-07-30 15:25:00 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-07-30 15:25:00 -0700
commit0e6e0138136dd3201f55fccd5fb149051f68d7e1 (patch)
tree6b0fed01a9eb47791bc9b3f9706e40276b988bbc /asm
parente56c2dc5b7223f231d4d080690cb32a301ba8766 (diff)
downloadnasm-0e6e0138136dd3201f55fccd5fb149051f68d7e1.tar.gz
nasm-0e6e0138136dd3201f55fccd5fb149051f68d7e1.tar.xz
nasm-0e6e0138136dd3201f55fccd5fb149051f68d7e1.zip
nasm: don't make -L+ imply -Lw
-Lw really is only useful to debug NASM crashes, and can hugely slow down the assembler. Make -L+ simply imply full verbosity; if NASM crashes use -Lw+ instead. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/listing.h17
-rw-r--r--asm/nasm.c4
2 files changed, 14 insertions, 7 deletions
diff --git a/asm/listing.h b/asm/listing.h
index 351fc69e..f62fc08f 100644
--- a/asm/listing.h
+++ b/asm/listing.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 1996-2019 The NASM Authors - All Rights Reserved
+ * Copyright 1996-2020 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
@@ -134,12 +134,13 @@ extern uint64_t list_options, active_list_options;
* 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.
+ * The character + represents ALL listing options except -Lw (flush
+ * after every line.)
*
* This returns 0 for invalid values, so that no bit is accessed
* for unsupported characters.
*/
-static inline const_func uint64_t list_option_mask(unsigned char x)
+static inline const_func uint64_t list_option_mask_val(unsigned char x)
{
if (x >= 'a') {
if (x > 'z')
@@ -153,8 +154,6 @@ 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;
}
@@ -162,6 +161,14 @@ static inline const_func uint64_t list_option_mask(unsigned char x)
return UINT64_C(1) << x;
}
+static inline const_func uint64_t list_option_mask(unsigned char x)
+{
+ if (x == '+')
+ return ~list_option_mask_val('w');
+ else
+ return list_option_mask_val(x);
+}
+
static inline pure_func bool list_option(unsigned char x)
{
return unlikely(active_list_options & list_option_mask(x));
diff --git a/asm/nasm.c b/asm/nasm.c
index a0e17193..c5d03c8a 100644
--- a/asm/nasm.c
+++ b/asm/nasm.c
@@ -2266,8 +2266,8 @@ static void help(FILE *out)
" -Lm show multi-line macro calls with expanded parmeters\n"
" -Lp output a list file every pass, in case of errors\n"
" -Ls show all single-line macro definitions\n"
- " -Lw flush the output after every line\n"
- " -L+ enable all listing options (very verbose!)\n"
+ " -Lw flush the output after every line (very slow!)\n"
+ " -L+ enable all listing options except -Lw (very verbose!)\n"
"\n"
" -Oflags... optimize opcodes, immediates and branch offsets\n"
" -O0 no optimization\n"