Commit Graph

11 Commits

Author SHA1 Message Date
H. Peter Anvin
a168ab1e01 smartalign: clean up unnecessary duplication; tweak dependencies
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-25 17:48:33 -07:00
H. Peter Anvin
f991f5ae56 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>
2008-10-19 16:45:27 -07:00
H. Peter Anvin
777cdbee01 smartalign: rewrite to use the indirect construct, %[...]
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-19 16:38:28 -07:00
Victor van den Elzen
fd49408ed9 Already aligned aligns should be 0 bytes, not %1. 2008-10-01 13:21:02 +02:00
H. Peter Anvin
152656f8d3 Actually make non-power-of-2 alignments work
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-09-25 02:31:50 -07:00
H. Peter Anvin
7f0ac96fed smartalign: use context-local label
Use a context-local label in the smart align macro.
2008-07-17 14:28:29 -07:00
H. Peter Anvin
ca66ec5eec smartalign: adjust the alignment threshold
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-17 14:22:10 -07:00
H. Peter Anvin
1ac41d34ba smartalign: 16-bit generic alignment macros
Smart alignment content for 16-bit "generic" mode
2008-07-17 14:20:06 -07:00
H. Peter Anvin
47b0c2d428 smartalign: 16-bit P6 NOPs
Add 16-bit P6 NOPs
2008-07-17 14:13:53 -07:00
H. Peter Anvin
f5975eead1 smartalign.mac: smart alignments macro package
"%use smartalign" followed by an optional "alignmode" can be used to
enable smart macros.
2008-07-16 14:41:39 -07:00
H. Peter Anvin
d2456590fc preproc: add support for builtin include modules (%use)
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.
2008-06-19 15:04:18 -07:00