summaryrefslogtreecommitdiff
path: root/nasmlib/raa.c
Commit message (Collapse)AuthorAgeFilesLines
* preproc: massive cleanup of smacro expansionH. Peter Anvin (Intel)2019-04-251-5/+0
| | | | | | | | | | | | | | | | The smacro expansion code was virtually impossible to understand, and was leading to very strange failures. Clean it up, and do much better handling of magic macros. This should also allow for recursive macros, but recursive macros are extremely tricky in that it is very hard to keep them from recursing forever, unless there is at least one argument which is never expanded. They are not currently implemented. Even so, I believe token pasting makes it possible to create infinite loops; e.g.: %define foo foo %+ Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* RAA: clean up the RAA infrastructure, make it support larger indiciesH. Peter Anvin2018-06-141-61/+59
| | | | | | | | | | | | | Make the RAA infrastructure a bit cleaner, make it support 64-bit indicies, and reduce the memory overhead of a sparse or small RAA -- the old code would allocate a *minimum* of 256K for each RAA. The new code reduces that to 16K, and will not mandatorily allocate an entry in the zero position. The new shift, 11, was chosen so that a 32-bit RAA value will need 3 layers and a 64-bit value 6 layers, without excessive waste. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* RAA: add functions for storing pointers in RAA'sH. Peter Anvin2018-06-141-19/+51
| | | | | | | | | | RAAs can, and should be, usable for storing pointers as well as integers. In reality it is exactly the same code, but make it explicit by having different entry points. In the actual RAA the data is stored as a union, which in practice will not occupy any more space than the existing code. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Reorganize the source code into subdirectoriesH. Peter Anvin2016-05-251-0/+173
Make the source code easier to understand and keep track of by organizing it into subdirectories depending on the function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>