about summary refs log tree commit diff stats
path: root/subx/apps/crenshaw2-1.subx
Commit message (Collapse)AuthorAgeFilesLines
* 5090Kartik Agaram2019-04-131-29/+5
| | | | | | | 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-2/+9
| | | | | | | | | | | | | 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-2/+2
|
* 5009Kartik Agaram2019-03-201-1/+1
|
* 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-8/+8
|
* 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-4/+4
|
* 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/+4
| | | | | | 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-1/+1
|
* 4818Kartik Agaram2018-12-021-6/+7
|
* 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-69/+67
|
* 4803Kartik Agaram2018-11-301-128/+128
|
* 4802Kartik Agaram2018-11-301-29/+29
| | | | | | | | | | | | | | | | 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-429/+429
| | | | Reindent all SubX code to make some room for the new comment style.
* 4800Kartik Agaram2018-11-301-4/+5
|
* 4797Kartik Agaram2018-11-301-1/+1
|
* 4796Kartik Agaram2018-11-301-146/+146
|
* 4775Kartik Agaram2018-11-241-213/+11
| | | | | | | 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.
* 4774Kartik Agaram2018-11-241-19/+2
| | | | Simplification.
* 4773 - done with crenshaw chapter 2-1Kartik Agaram2018-11-241-7/+121
| | | | In the process I had to fix a couple more bugs in support for disp16 instructions.
* 4770Kartik Agaram2018-11-241-6/+6
|
* 4766Kartik Agaram2018-11-241-3/+4
|
* 4765Kartik Agaram2018-11-231-1/+2
|
* 4764Kartik Agaram2018-11-231-5/+221
|
* 4763 - back to the 'trivial' crenshaw2-1 compilerKartik Agaram2018-11-231-2/+422
| | | | | This time I've ported (and test-driven) 'GetChar' and 'GetNum'. The new tests bring together our new testable interfaces for read() and exit().
* 4733Kartik Agaram2018-10-281-1/+1
|
* 4731Kartik Agaram2018-10-281-6/+6
|
* 4729Kartik Agaram2018-10-281-38/+50
| | | | | | Start injecting all dependencies in the Crenshaw compiler app. In the process I realized the non-fake code path of 'stop' had a bug.
* 4710Kartik Agaram2018-10-171-8/+8
| | | | | Start using write() instead of _write().. and we promptly find a typo when dealing with real file descriptors.
* 4699Kartik Agaram2018-10-141-43/+16
|
* 4698Kartik Agaram2018-10-141-4/+4
|
* 4668Kartik Agaram2018-10-051-6/+6
|
* 4667Kartik Agaram2018-10-051-9/+9
| | | | | Standardize on hyphens in all names. And we'll use colons for namespacing labels in functions.
* 4662Kartik Agaram2018-10-051-1/+1
|
* 4655Kartik Agaram2018-10-021-2/+2
|