summaryrefslogtreecommitdiff
path: root/macros
AgeCommit message (Collapse)AuthorFilesLines
2010-05-07New %use package "fp"H. Peter Anvin1-0/+54
New standard macro package with utility macros for floating-point constants. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-04-21Rename SEGALIGN to SECTALIGNCyrill Gorcunov1-1/+1
"sectalign" is preferred over "segalign" since it operates over section attributes. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21smartalign.mac: align macro should align a segment as wellCyrill Gorcunov1-0/+1
This change may have backward compatibility issue but most probably the sane program never used sections with base address less then instruction alignment. Note that alignment may only increase which means if a section is aligned on 2^5 the align 2^4 will not affect the section. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21smartalign: Introduce nojmp modeCyrill Gorcunov1-3/+7
This allows to force nasm to generate multibyte NOPs without jmp injected. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-06-28Add copyright headers to standard macro packagesH. Peter Anvin2-0/+66
These are all recent and written by me. BSD license them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-25smartalign: clean up unnecessary duplication; tweak dependenciesH. Peter Anvin1-64/+13
Remove unnecessary duplicated patterns; with indirection we can handle lists of any length. For 16-bit generic padding, alternate between SI and DI dependencies. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-19smartalign: use a "times" construct rather than %repH. Peter Anvin1-3/+2
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>
2008-10-19smartalign: rewrite to use the indirect construct, %[...]H. Peter Anvin1-83/+21
This code can be made so much smaller with clever use of the indirection construct. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-01Already aligned aligns should be 0 bytes, not %1.Victor van den Elzen1-3/+3
2008-09-25Actually make non-power-of-2 alignments workH. Peter Anvin1-3/+3
We can't use ($$-$) % (%1) since the wraparound will be wrong except for powers of 2. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-07-17smartalign: use context-local labelH. Peter Anvin1-2/+2
Use a context-local label in the smart align macro.
2008-07-17smartalign: adjust the alignment thresholdH. Peter Anvin1-2/+11
Apparently the current recommendation is for a smaller threshold when using the "generic"-style alignment macros (short jumps are cheaper on newer CPUs.) Also change the alignment threshold definition to reflect the maximum number of padding instead of when to start using jumps.
2008-07-17smartalign: 16-bit generic alignment macrosH. Peter Anvin1-12/+11
Smart alignment content for 16-bit "generic" mode
2008-07-17smartalign: 16-bit P6 NOPsH. Peter Anvin1-6/+6
Add 16-bit P6 NOPs
2008-07-16smartalign.mac: smart alignments macro packageH. Peter Anvin1-0/+255
"%use smartalign" followed by an optional "alignmode" can be used to enable smart macros.
2008-06-19preproc: add support for builtin include modules (%use)H. Peter Anvin1-0/+74
Add a builtin equivalent to the %include directive called %use. %use includes a standard macro file compiled into the binary; these come from the macros/ directory in the source code. The idea here is to be able to provide optional macro packages with the distribution, without adding complex host filesystem dependencies.