about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 5434Kartik Agaram2019-07-216-2/+18
|
* 5433Kartik Agaram2019-07-216-2/+2
|
* 5432Kartik Agaram2019-07-211-0/+0
|
* 5431 - starting to translate std libKartik Agaram2019-07-201-0/+33
| | | | | | | | | | Currently failing at layer 54: ``` $ time ./translate 049memory_layout.subx 05[0-4]*.subx; ./subx run a.elf test leaky-get-or-insert-slice: too many segments ``` Emulation is also damn slow. But running in native mode is fast.
* 5430 - all examples passingKartik Agaram2019-07-206-41/+333
| | | | | We now have a new pass called 'tests' which code-generates a new function called 'run-tests', just like the C++ layer `tests.cc`.
* 5429Kartik Agaram2019-07-209-0/+0
| | | | Fix CI.
* 5428Kartik Agaram2019-07-201-10/+22
|
* 5427Kartik Agaram2019-07-202-18/+1
|
* 5426Kartik Agaram2019-07-208-19/+23
|
* 5425Kartik Agaram2019-07-202-0/+14
|
* 5424Kartik Agaram2019-07-191-12/+12
|
* 5423Kartik Agaram2019-07-191-1/+1
|
* 5422Kartik Agaram2019-07-196-12/+52
| | | | | Various buffer sizes needed to be grown for ex11. But the next bottleneck is that we need to code-generate run-tests.
* 5421Kartik Agaram2019-07-191-0/+24
|
* 5420Kartik Agaram2019-07-191-0/+29
|
* 5419Kartik Agaram2019-07-193-40/+552
| | | | | | | | | | | Bugfix fourteen: we need different address computation logic for code vs data labels. It's really about different categories of instructions having different address computation logic. This subtle distinction will make good error messages hard. But that's a problem for later. Now there's just one example program not translating.
* 5418 - vim tweaksKartik Agaram2019-07-191-1/+12
| | | | | When running a single test, stop always opening the trace. Instead create a separate affordance for that, and also have it reuse windows.
* 5417Kartik Agaram2019-07-183-9/+8
| | | | Clean up.
* 5416Kartik Agaram2019-07-183-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Figured out what's going in with bug fourteen: displacement operands aren't always used relative to the PC. Does this mean I need to track instruction boundaries past pack? :'( No, I just need different logic for labels in code vs data segments. This was an interesting bug for reminding me of the difference between the emulator-level trace and the application-level trace. The former has 1.5 million lines, while the latter has a dozen. Luckily, just dumping the latter immediately made obvious what the issue was. Though this experience does suggest some further ideas for debugging tools: slice trace by line and phase slice trace by start and end label debug UI for SubX translator 2D layout: rows = lines of code; columns = translator phases each 'cell' in this layout contains a list of log lines shows what came in, what was emitted easily collapse any cell These are domain-specific tools. Special-cased to the SubX translator phases.
* 5415Kartik Agaram2019-07-174-8/+56
| | | | | | | | Bugfix thirteen: displacement calculations were wrong because current offset was not being updated properly as words were being read and emitted. Now 10/12 example programs are translated correctly.
* 5414Kartik Agaram2019-07-171-4/+4
|
* 5413Kartik Agaram2019-07-173-6/+104
| | | | | | | Bugfix twelve: ModR/M was being incorrectly computed. This is one of two problems with subx/examples/ex3, so no new passing examples.
* 5412Kartik Agaram2019-07-171-3/+3
| | | | Fix CI.
* 5411Kartik Agaram2019-07-171-1/+1
| | | | Fix CI.
* 5410 - 4 examples passingKartik Agaram2019-07-1718-13/+72
| | | | | Clean up other examples as well to satisfy the requirements in commit 5404.
* 5409Kartik Agaram2019-07-173-4/+16
| | | | | Bugfix eleven: segment flags were incorrectly computed. examples/ex1 now verified! Added to CI.
* 5408Kartik Agaram2019-07-1613-64/+418
| | | | | | | | | | | | Bugfix ten: type error in `convert`. I was calling `rewind-stream` on a `buffered-file`. examples/ex1 is now just one nibble off the canonical. I *have* found one missing feature in the self-hosted translator, though: dquotes doesn't support newlines in strings, even though the C++ version does. dquotes parses them right, but the value initialized in the data segment is wrong.
* 5407Kartik Agaram2019-07-152-0/+7
| | | | | | | Bugfix nine: flush(out) after translation is done. Still one remaining bug from comparing ELF binaries: emit-segments prints nothing for some reason.
* 5406Kartik Agaram2019-07-152-4/+4
| | | | | | | Bugfix eight: incorrect segment count in ELF header. The generated examples/ex1 is still not right. But it has the second segment now. Or almost all of it. Final byte is missing for some reason.
* 5405Kartik Agaram2019-07-154-14/+12
|
* 5404 - subx/examples/ex1 now translatingKartik Agaram2019-07-154-10/+47
| | | | | | | | | | | | | | | | | | | The result isn't an identical binary to before, and it segfaults when run. But it's bugfix seven. A couple of places where we make .subx files a little more strict: a) All .subx files must define a data segment. Even if they have no data. b) All .subx files must define an `Entry` label for the binary to start at. Earlier we used to default to the start of the code label. That's not too hard to add; we'd just need to: i) rename `get` to `get-or-abort` ii) clone a third variant of `get-or-insert` called `get` that returns null if the key is not found. iii) use `get` rather than `get-or-abort` when looking up the `Entry` label.
* 5403Kartik Agaram2019-07-141-3/+3
|
* update roadmap in subx/ReadmeKartik Agaram2019-07-141-7/+1
|
* .Kartik Agaram2019-07-1467-20762/+26544
|
* .Kartik Agaram2019-07-131-1/+0
|
* Merge pull request #34 from akkartik/surveyKartik Agaram2019-07-1353-2704/+9228
|\ | | | | SubX in SubX: computing addresses for labels
| * .Kartik Agaram2019-07-132-132/+132
| | | | | | | | Clean up.
| * add subx/apps/survey to CIKartik Agaram2019-07-131-0/+10
| |
| * .Kartik Agaram2019-07-133-0/+0
| |
| * survey.subx now passing all testsKartik Agaram2019-07-132-8/+34
| |
| * grow the output stream; test now completesKartik Agaram2019-07-131-2/+18
| | | | | | | | All assertions in `test-convert-computes-addresses` still failing.
| * `test-convert-computes-addresses` bugfix sixKartik Agaram2019-07-132-72/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | map of how far we've gotten by now (functions with '*' independently tested): ✓ compute-offsets* ✓ compute-addresses* ✓ emit-output ✓ emit-headers ✓ emit-elf-header ✓ emit-hex-array* ✓ first emit-elf-program-header-entry ✓ emit-hex-array* ? second emit-elf-program-header-entry emit-hex-array* emit-segments*
| * .Kartik Agaram2019-07-133-0/+0
| |
| * fixed fifth bug, hit sixthKartik Agaram2019-07-132-5/+6
| |
| * .Kartik Agaram2019-07-132-170/+0
| | | | | | | | Clean up.
| * fixed fourth bug, hit fifthKartik Agaram2019-07-132-50/+289
| |
| * fixed third bug, hit fourthKartik Agaram2019-07-131-1/+1
| |
| * .Kartik Agaram2019-07-132-190/+0
| | | | | | | | Clean up.
| * fixed second bug, hit thirdKartik Agaram2019-07-133-6/+293
| |
| * .Kartik Agaram2019-07-133-41/+39
| |