Commit Graph

7 Commits

Author SHA1 Message Date
H. Peter Anvin
9e6747ccac Add copyright headers to the *.c/*.h files in the main directory
Add copyright headers to the *.c/*.h files in the main directory.  For
files where I'm sure enough that we have all the approvals, I have
given them the 2-BSD license, the others have been given the "LGPL for
now" license header.  Most of them can probably be changed after
auditing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-28 17:13:04 -07:00
H. Peter Anvin
edb58f7813 SAA: add saa_writeaddr() similar to other locations
Provide saa_writeaddr() to write an integer in x86 format.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-17 19:30:34 -07:00
H. Peter Anvin
3c7e6b396f saa: fix indentation
Apply standard indentation to the SAA code, not sure why it was
different...
2008-06-19 23:09:11 -07:00
H. Peter Anvin
51997d3d44 Introduce likely/unlikely macros, use them in saa.c
Introduce the likely() and unlikely() macros, as used in Linux.
They are compiler-dependent hints that a particular boolean expression
is likely to be true or false, respectively.

Currently only implemented for gcc.
2008-06-10 09:35:26 -07:00
H. Peter Anvin
8cc5aa7829 SAA: optimize all power-of-two lengths
We can actually use the shift optimization whenever blk_len ==
SAA_BLKLEN, which will be true for all powers of two.
2008-06-10 09:31:31 -07:00
H. Peter Anvin
1cff81e356 SAA: optimize seeks when used on a byte array
In practice, we only ever use the seeking functions on byte arrays
(elem_len == 1).  Optimize for that case, to avoid a general divmod
operation.
2008-06-10 09:29:20 -07:00
H. Peter Anvin
1803dedae8 Move all the SAA code out of nasmlib
Move all the SAA code out of nasmlib; it's not used by anything than
nasm itself.  Cleaning out the kitchen sink known as nasmlib is a good
thing, too.
2008-06-09 17:32:43 -07:00