diff options
-rw-r--r-- | macros/standard.mac | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/macros/standard.mac b/macros/standard.mac index a6c50b68..03944ee7 100644 --- a/macros/standard.mac +++ b/macros/standard.mac @@ -1,6 +1,6 @@ ;; -------------------------------------------------------------------------- ;; -;; Copyright 1996-2016 The NASM Authors - All Rights Reserved +;; Copyright 1996-2019 The NASM Authors - All Rights Reserved ;; See the file AUTHORS included with the NASM distribution for ;; the specific copyright holders. ;; @@ -68,17 +68,13 @@ STD: nasm %endmacro %define __SECTALIGN_ALIGN_UPDATES_SECTION__ 1 -%imacro sectalign 1.nolist - %ifnum %1 - %if __SECTALIGN_ALIGN_UPDATES_SECTION__ = 1 - [sectalign %1] - %endif +%imacro sectalign 1+.nolist + %ifidni %1,off + %define __SECTALIGN_ALIGN_UPDATES_SECTION__ 0 + %elifidni %1,on + %define __SECTALIGN_ALIGN_UPDATES_SECTION__ 1 %else - %ifidni %1,off - %define __SECTALIGN_ALIGN_UPDATES_SECTION__ 0 - %elifidni %1,on - %define __SECTALIGN_ALIGN_UPDATES_SECTION__ 1 - %endif + [sectalign %1] %endif %endmacro @@ -117,12 +113,16 @@ STD: nasm %endmacro %imacro align 1-2+.nolist nop - sectalign %1 + %if __SECTALIGN_ALIGN_UPDATES_SECTION__ + sectalign %1 + %endif times (((%1) - (($-$$) % (%1))) % (%1)) %2 %endmacro %imacro alignb 1-2+.nolist - sectalign %1 + %if __SECTALIGN_ALIGN_UPDATES_SECTION__ + sectalign %1 + %endif %ifempty %2 resb (((%1) - (($-$$) % (%1))) % (%1)) %else |