summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-19 16:45:27 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-19 16:45:27 -0700
commitf991f5ae56468b225b5df848b47b5173dedf8332 (patch)
treec7c4d4f29533e3b4ec38f3a40175d472bcff94ae /macros
parent9f9fcfa45577306420643206739d163f63710d68 (diff)
downloadnasm-f991f5ae56468b225b5df848b47b5173dedf8332.tar.gz
smartalign: use a "times" construct rather than %rep
Use a "times" construct rather than "%rep" for higher performance. No need to preprocess the same line over and over for no good reason. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'macros')
-rw-r--r--macros/smartalign.mac5
1 files changed, 2 insertions, 3 deletions
diff --git a/macros/smartalign.mac b/macros/smartalign.mac
index 4dc8fd5c..48c07de5 100644
--- a/macros/smartalign.mac
+++ b/macros/smartalign.mac
@@ -186,9 +186,8 @@ USE: smartalign
times (((%1) - (($-$$) % (%1))) % (%1)) nop
%$end:
%else
- %rep %$pad / __ALIGN_%[__BITS__]BIT_GROUP__
- db __ALIGN_%[__BITS__]BIT_%[__ALIGN_%[__BITS__]BIT_GROUP__]B__
- %endrep
+ times (%$pad / __ALIGN_%[__BITS__]BIT_GROUP__) \
+ db __ALIGN_%[__BITS__]BIT_%[__ALIGN_%[__BITS__]BIT_GROUP__]B__
%assign %$pad %$pad % __ALIGN_%[__BITS__]BIT_GROUP__
%if %$pad > 0
db __ALIGN_%[__BITS__]BIT_%[%$pad]B__