Collapsed the inc/dec codegen into the loadEAX function, because it
allows us to generate better code for inc/dec'ing a global variable
on ARM, because we don't have to load the variable's address twice.
Added C++-style "//..end-of-line" comments, since I kept trying to use them when writing
test programs.
The biggest known missing piece is global variables.
+ Improved li to handle all 32-bit values.
+ Implemented push/pop of temp registers during evaluation
+ Implemented the unary and binary easy math operators (+,-,*,<<,>>,|,&,^,~)
+ Implemented global function calling.
This program works:
main() { return 42; }
The disassembler was borrowed from codeflinger, and just modified enough to compile
under C++ without warnings.
Implemented gsym
Implemented a hack verison of li, only works for -256..255
Implemented gjmp
+ Changed indentation, causes the stats to say there's a lot of lines changed.
+ Should be able to compile multiple times with the same compiler object.
+ Create a CodeBuffer class to hold the code.
+ Create a CodeGenerator class to encapsulate knowlege of the CPU instruction set.
+ Started filling in the code generator.
Add a license.
Indent the code.
Add includes for external functions.
Improve function prototypes.
Start adding the correct type to things that are pointers.
Start fixing compiler warnings.
Instead of directly executing the compiled code (which only works on x86 Linux),
write the internal compiler state to stdout. This makes it easier to test whether
or not our refactoring is breaking anything.
Return a zero status on success.
Add error checking for a missing input file.