about summary refs log tree commit diff stats
path: root/subx/apps/crenshaw2-1b.subx
Commit message (Collapse)AuthorAgeFilesLines
* .Kartik Agaram2019-06-121-4/+0
| | | | | Now that we don't have to edit code to run a single test, delete that commented out fragment everywhere.
* new primitive: parse-array-of-intsKartik Agaram2019-05-251-0/+9
| | | | | | | | | | Mostly for tests. For every new type we want to compare in a test, we're now going to start using some primitive that can parse its value from string. In this manner we can get syntax for literals in machine code. Open question: parsing aggregates of aggregates. Like an array of structs. This is the first time we allocate from the heap in standard library tests. So we now need to start initializing the heap in all our apps.
* standardize function namesKartik Agaram2019-05-021-3/+4
| | | | | Operations on buffered-file now always include the word 'buffered'. More verbose, but hopefully this highlights holes in the library.
* 5090Kartik Agaram2019-04-131-30/+6
| | | | | | | Start using the new newline escape in string literals everywhere. I could use it more aggressively, but it makes tests harder to read. So only one line of text per string for now.
* 5080Kartik Agaram2019-04-111-9/+5
|
* 5074Kartik Agaram2019-04-101-1/+10
| | | | | | | | | | | | | Fail early when writing to a fake file runs out of space. Makes debugging tests easier. Reads from files, on the other hand, are only buffering to a temporary stream, so it makes sense to silently stop when they run out of space. In the process I uncovered a testing bug in pack.subx: I was missing a trailing space in the expected result, but the test still passed because the space was getting truncated. Being principled about aborting on overflow by default will help avoid such issues.
* 5037Kartik Agaram2019-03-291-3/+3
|
* 5009Kartik Agaram2019-03-201-2/+2
|
* 4981 - no, go back to 3 phasesKartik Agaram2019-02-181-1/+2
| | | | | | | | | | | | | Considering how much trouble a merge phase would be (commit 4978), it seems simpler to just add the extra syntax for controlling the entry point of the generated ELF binary. But I wouldn't have noticed this if I hadn't taken the time to write out the commit messages of 4976 and 4978. Even if we happened to already have linked list primitives built, this may still be a good idea considering that I'm saving quite a lot of code in duplicated entrypoints.
* 4973Kartik Agaram2019-02-151-10/+10
| | | | | Support immediate operands in the data segment in all the ways we support them in the code segment.
* 4966Kartik Agaram2019-02-141-6/+5
| | | | Standardize how we show register allocation decisions.
* 4961Kartik Agaram2019-02-141-11/+11
|
* 4934Kartik Agaram2019-01-161-1/+1
|
* 4933Kartik Agaram2019-01-161-1/+1
|
* 4888Kartik Agaram2018-12-291-28/+28
| | | | We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
* 4886Kartik Agaram2018-12-281-2/+2
|
* 4879Kartik Agaram2018-12-281-6/+6
|
* 4847Kartik Agaram2018-12-061-4/+4
|
* 4840Kartik Agaram2018-12-041-1/+1
| | | | New helper: printing a string to a buffered file.
* 4837Kartik Agaram2018-12-041-1/+1
| | | | Let's standardize to use opcode 39 rather than 3b by default.
* 4832Kartik Agaram2018-12-041-0/+2
| | | | | | Let's start adding ':end' labels in all functions, just because it helps us visualize where function calls end in traces, thanks to the '--map' commandline argument.
* 4826Kartik Agaram2018-12-031-1/+1
|
* 4821Kartik Agaram2018-12-021-41/+0
|
* 4819Kartik Agaram2018-12-021-3/+3
|
* 4818Kartik Agaram2018-12-021-6/+6
|
* 4815Kartik Agaram2018-12-021-4/+9
|
* 4813Kartik Agaram2018-12-011-1/+1
|
* 4812Kartik Agaram2018-11-301-1/+1
|
* 4808 - clean up comments in all subx filesKartik Agaram2018-11-301-110/+106
|
* 4802Kartik Agaram2018-11-301-210/+210
| | | | | | | | | | | | | | | | Some automated commenting cleanup. Still needs more careful manual scanning. sed -i 's/^# 1-3/# . 1-3/' *.subx */*.subx sed -i 's/^# op/# . op/' *.subx */*.subx sed -i 's/# vim/# . . vim/' *.subx */*.subx sed -i 's/^ # push args/ # . . push args/' *.subx */*.subx sed -i 's/^ # discard args/ # . . discard args/' *.subx */*.subx sed -i 's/^ # call/ # . . call/' *.subx */*.subx sed -i 's/^ # prolog/ # . prolog/' *.subx */*.subx sed -i 's/^ # epilog/ # . epilog/' *.subx */*.subx sed -i 's/^ # save registers/ # . save registers/' *.subx */*.subx sed -i 's/^ # restore registers/ # . restore registers/' *.subx */*.subx sed -i 's/ operand / register /' *.subx */*.subx
* 4801Kartik Agaram2018-11-301-568/+568
| | | | Reindent all SubX code to make some room for the new comment style.
* 4800Kartik Agaram2018-11-301-6/+6
|
* 4799Kartik Agaram2018-11-301-4/+4
|
* 4797Kartik Agaram2018-11-301-1/+1
|
* 4776Kartik Agaram2018-11-251-1/+1
| | | | | | | | | | | | | Crenshaw compiler now runs natively as well. It turns out I was misreading the Intel manual, and the jump instructions that I thought take disp16 operands actually take disp32 operands by default on both i686 and x86_64 processors. The disp16 versions are some holdover from the 16-bit days. This was the first time I've used one of these erstwhile-disp16 instructions, but I still haven't tested most of them. We'll see if we run into future issues.
* 4775Kartik Agaram2018-11-241-0/+836
Start with an exactly corresponding version to Crenshaw 2-1: single-digit numbers. The only change: we assume the number is in hex. The next version now supports multi-digit hex numbers.