summaryrefslogtreecommitdiff
path: root/macros
Commit message (Collapse)AuthorAgeFilesLines
* New %use package "fp"H. Peter Anvin2010-05-071-0/+54
| | | | | | | New standard macro package with utility macros for floating-point constants. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Rename SEGALIGN to SECTALIGNCyrill Gorcunov2010-04-211-1/+1
| | | | | | | "sectalign" is preferred over "segalign" since it operates over section attributes. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* smartalign.mac: align macro should align a segment as wellCyrill Gorcunov2010-04-211-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>
* smartalign: Introduce nojmp modeCyrill Gorcunov2010-04-211-3/+7
| | | | | | | This allows to force nasm to generate multibyte NOPs without jmp injected. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Add copyright headers to standard macro packagesH. Peter Anvin2009-06-282-0/+66
| | | | | | These are all recent and written by me. BSD license them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* smartalign: clean up unnecessary duplication; tweak dependenciesH. Peter Anvin2008-10-251-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>
* smartalign: use a "times" construct rather than %repH. Peter Anvin2008-10-191-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>
* smartalign: rewrite to use the indirect construct, %[...]H. Peter Anvin2008-10-191-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>
* Already aligned aligns should be 0 bytes, not %1.Victor van den Elzen2008-10-011-3/+3
|
* Actually make non-power-of-2 alignments workH. Peter Anvin2008-09-251-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>
* smartalign: use context-local labelH. Peter Anvin2008-07-171-2/+2
| | | | Use a context-local label in the smart align macro.
* smartalign: adjust the alignment thresholdH. Peter Anvin2008-07-171-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.
* smartalign: 16-bit generic alignment macrosH. Peter Anvin2008-07-171-12/+11
| | | | Smart alignment content for 16-bit "generic" mode
* smartalign: 16-bit P6 NOPsH. Peter Anvin2008-07-171-6/+6
| | | | Add 16-bit P6 NOPs
* smartalign.mac: smart alignments macro packageH. Peter Anvin2008-07-161-0/+255
| | | | | "%use smartalign" followed by an optional "alignmode" can be used to enable smart macros.
* preproc: add support for builtin include modules (%use)H. Peter Anvin2008-06-191-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.