Re: [nasm:HEAD] preproc.c: fix exitmacro to account for if/endif blocks

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [nasm:HEAD] preproc.c: fix exitmacro to account for if/endif blocks

by anonymous coward-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> preproc.c: fix exitmacro to account for if/endif blocks
>
> -           l->finishes->in_progress = 0;

Uhm, did you really mean to remove that line?

# cat a.asm
%macro m 1
 %if %1
  %exitmacro
 %endif
%endmacro

m 0
m 1
m 2
hlt

# ./nasm -v
NASM version 2.08rc1 compiled on Oct 26 2009

# ./nasm -l a.lst a.asm

# cat a.lst
     1                                  %macro m 1
     2                                   %if %1
     3                                    %exitmacro
     4                                   %endif
     5                                  %endmacro
     6
     7                                  m 0
     8                              <1>  %if %1
     9                              <1>  %exitmacro
    10                              <1>  %endif
    11                                  m 1
    12                              <1>  %if %1
    13                              <1>  %exitmacro
    14                                  m 2
    15                              <1>  %if %1
    16                              <1>  %exitmacro
    17 00000000 F4                      hlt

The taken %EXITMACRO suppresses all of the "dead"
code after it from appearing in the list file.

Note how the not taken %IF...%ENDIF doesn't do that.

Also, fwiw, I did not require this explicit cond-in-mmac
handling in the code I posted under SF #1842438. So
I am wondering... is it really needed... or just masking
an issue elsewhere in preproc.c?

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Nasm-devel mailing list
Nasm-devel@...
https://lists.sourceforge.net/lists/listinfo/nasm-devel