From: nasm-bot f. H. P. A. <hp...@li...> - 2016-01-15 19:19:09
|
Commit-ID: f29123b936b1751c6d72dad86b05eb293cca5c6c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=f29123b936b1751c6d72dad86b05eb293cca5c6c Author: H. Peter Anvin <hp...@li...> AuthorDate: Fri, 15 Jan 2016 10:46:12 -0800 Committer: H. Peter Anvin <hp...@li...> CommitDate: Fri, 15 Jan 2016 11:03:40 -0800 smartalign.mac: Ignore smartalign in preprocess-only mode When running in preprocess-only mode generate the equivalent of standard alignment using nops. This at the very least allows some kind of reasonable output and allows for dependency generation to proceed; the only way to *really* address this problem is to move alignment generation into the assembler proper; this would also allow the align/alignb distinction to be removed and handle padding with instructions which are more than one byte. This should resolve bug 3392319. Signed-off-by: H. Peter Anvin <hp...@li...> --- macros/smartalign.mac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/macros/smartalign.mac b/macros/smartalign.mac index 9b37f12..e5c0b99 100644 --- a/macros/smartalign.mac +++ b/macros/smartalign.mac @@ -1,6 +1,6 @@ ;; -------------------------------------------------------------------------- ;; -;; Copyright 1996-2009 The NASM Authors - All Rights Reserved +;; Copyright 1996-2016 The NASM Authors - All Rights Reserved ;; See the file AUTHORS included with the NASM distribution for ;; the specific copyright holders. ;; @@ -164,6 +164,8 @@ USE: smartalign sectalign %1 ; align a segment as well %ifnempty %2 times (((%1) - (($-$$) % (%1))) % (%1)) %2 + %elif __PASS__ == 0 || __PASS__ == 3 + times (((%1) - (($-$$) % (%1))) % (%1)) nop %else %push %assign %$pad (((%1) - (($-$$) % (%1))) % (%1)) |