Interrupts need to be on 8-byte (or 64-bit) bounds. I had mistakenly
decided to shift right by 5 (which isn't even dividing by 64, it's 32)
-but since this an address pointing at byte ranges, that should be
divided by 8, or >> 3.
Additionally, interrupts add all 32 general purpose registers to the
stack because otherwise they become useless.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Aligned values are a little funky, because the size of the line can't be
determined without knowing what address we're at. So the
DataLines iterator now takes a start address, so it is able to correctly
calculate alignment padding.
Also, the length of the data section uses the DataLines iterator now so
there isn't a complex re-implementation of the same logic.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Lots of null bytes in a row are a common thing, so the instructions
available can't start with a null pair of bytes anymore.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Interrupts require functions being aligned on 64-bit boundaries.
Alignment is now allowed via the .align <intsize> directive, aligning
the current address to a new alignment.
* Datasection iteration doesn't require keeping track of the current
position.
* Rudimentary disassembler for breaking down the contents of an object
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Instruction assembler used to use macros for handling source,
dest-source, source-source, etc instructions. It did not have a
source-source implementation, however, so the two source-source
instructions (cmpeq and cmplt) were treated as dest-source. This has
been refactored into some local methods that handle this now.
* Syntax for interrupts and interrupt returns are implemented and appear
to be working
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>