summaryrefslogtreecommitdiff
path: root/saa.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-17Fix saa_writeaddr for big-endian caseCyrill Gorcunov1-1/+2
saa_writeaddr on big-endian archs didn't write converted argument, fix it. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-07-18Remove function pointers in output, simplify error handlingH. Peter Anvin1-24/+7
Remove a bunch of function pointers in the output stage; they are never changed and don't add any value. Also make "ofile" a global variable and let the backend use it directly. All we ever did with these variables were stashing it in locals and using them as-is anyway for no benefit. Also change the global error function, nasm_error() into a true function which invokes a function pointer internally. That lets us use direct calls to it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-28Add copyright headers to the *.c/*.h files in the main directoryH. Peter Anvin1-0/+33
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>
2008-10-17SAA: add saa_writeaddr() similar to other locationsH. Peter Anvin1-0/+21
Provide saa_writeaddr() to write an integer in x86 format. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-06-19saa: fix indentationH. Peter Anvin1-112/+112
Apply standard indentation to the SAA code, not sure why it was different...
2008-06-10Introduce likely/unlikely macros, use them in saa.cH. Peter Anvin1-2/+2
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-10SAA: optimize all power-of-two lengthsH. Peter Anvin1-3/+2
We can actually use the shift optimization whenever blk_len == SAA_BLKLEN, which will be true for all powers of two.
2008-06-10SAA: optimize seeks when used on a byte arrayH. Peter Anvin1-5/+17
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-09Move all the SAA code out of nasmlibH. Peter Anvin1-0/+369
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.