Commit Graph

3 Commits

Author SHA1 Message Date
H. Peter Anvin (Intel)
5b7369d7e0 Make debug info and error messages correctly reflect macros and reps
1. Error messages would issue with the line number of %endrep.
2. Debug line information would ignore both macros and reps.
   This is doubly wrong; macros are semantically equivalent to
   inline functions, and it is expected that debuggers trace
   into these functions.

These changes finishes the last parts of moving all responsibility for
the listing enable/disable into the preprocessor, so remove the
way over-complicated macro inhibit facility from the listing module
entirely.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-05 02:16:13 -07:00
H. Peter Anvin
d03a6c8ffe preproc: fix the detection of the >= operator
There are *four* operators starting with ">": > >> >>> and >=.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-10-07 21:29:05 -07:00
H. Peter Anvin
d983b62233 preproc: make %exitrep do what it is supposed to
%exitrep should should stop emitting code immediately, not just
terminate the loop when we hit %endrep. There is a bunch of hacky code
that special-cases that using istk->in_progress == 0.

The handling of the tail of %exitrep, %include and non-emitting
conditionals using entirely different mechanisms is just dumb. They
need to be unified.

Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392612
Reported-by: Jason Hood <jadoxa@yahoo.com.au>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-10-07 21:25:18 -07:00