summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Don't sort opcodes; move all pseudo-ops to the beginningH. Peter Anvin2017-05-011-58/+0
| | | | | | | | | | | | We don't need to sort opcodes anymore, since we are using an O(1) hash and not binary search. Instead, sort them in the order they first appear in insns.dat; this lets us move all the pseudo-ops to a contiguous range at the start of the file, for more efficient handling. Change the functions that process pseudo-ops accordingly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* a) Fix handling of DZ/ZWORD; b) don't crash on TIMES JMPH. Peter Anvin2017-05-011-0/+29
| | | | | | | | | | | | | | | a) Fix a number of missing instances of DZ and ZWORD. b) NASM would crash if TIMES was used on an instruction which varies in size, e.g. JMP. Fix this by moving the handling of TIMES at a higher level, so we generate the instruction "de novo" for each iteration. The exception is INCBIN, so we can avoid reading the included file over and over. c) When using the RESx instructions, just fold TIMES into the reserved space size; there is absolutely no point to iterate over it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Reorganize the source code into subdirectoriesH. Peter Anvin2016-05-251-0/+93
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>