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>
This commit is contained in:
H. Peter Anvin 2008-10-19 16:45:27 -07:00
parent 9f9fcfa455
commit f991f5ae56

View file

@ -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__