From 5b7369d7e0e256684bc92ab2ec8a822d9eb32e32 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sun, 5 Jul 2020 02:16:13 -0700 Subject: 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) --- test/exitrep.asm | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/exitrep.asm b/test/exitrep.asm index 4e1b6e3c..755f05d5 100644 --- a/test/exitrep.asm +++ b/test/exitrep.asm @@ -1,16 +1,40 @@ -%macro testrep 0.nolist +%macro testrep 0-1 %assign i 1 - %rep 4 + %rep %1 4 mov eax,i %if i==3 %exitrep %endif mov ebx,i + %warning in %?%1 iteration i %if i >= 3 %error iteration i should not be seen %endif %assign i i+1 %endrep + ret %endmacro -testrep +%macro testrep_nl 0-1.nolist + %assign i 1 + %rep %1 4 + mov eax,i + %if i==3 + %exitrep + %endif + %warning in %?%1 iteration i + mov ebx,i + %if i >= 3 + %error iteration i should not be seen + %endif + %assign i i+1 + %endrep + ret +%endmacro + + + testrep + testrep .nolist + + testrep_nl + testrep_nl .nolist -- cgit v1.2.1