about summary refs log tree commit diff stats
path: root/subx/apps/factorial
Commit message (Collapse)AuthorAgeFilesLines
* 4567 - support automated tests in SubXKartik Agaram2018-09-211-0/+0
| | | | | | | | | All it takes is to code-generate a simple function called 'run_tests' that calls all functions starting with 'test_' one by one. I've temporarily switched the factorial app to run as a test. But that's temporary, because all the code to print '.' vs 'F' needs to get extracted out into a helper.
* 4554Kartik Agaram2018-09-201-0/+0
|
* 4537Kartik Agaram2018-09-071-0/+0
| | | | | | | | | | | | | | | Streamline the factorial function; we don't need to save a stack variable into a register before operating on it. All instructions can take a stack variable directly. In the process we found two bugs: a) Opcode f7 was not implemented correctly. It was internally consistent but I'd never validated it against a natively running program. Turns out it encodes multiple instructions, not just 'not'. b) The way we look up imm32 operands was sometimes reading them before disp8/disp32 operands.
* 4530 - create an apps/ directoryKartik Agaram2018-09-011-0/+0