Commit Graph

5876 Commits

Author SHA1 Message Date
Kartik Agaram 7e7a8a6eae 5876 - address -> addr 2020-01-03 01:36:34 -08:00
Kartik Agaram c9bda4d13e 5875 2020-01-02 15:23:01 -08:00
Kartik Agaram 6f1581e77b 5874 2020-01-02 15:13:44 -08:00
Kartik Agaram 300aa16720 5873 2020-01-02 15:11:10 -08:00
Kartik Agaram 8bbafb1397 5872 2020-01-02 14:12:46 -08:00
Kartik Agaram 42b4da908e 5871 2020-01-02 13:57:47 -08:00
Kartik Agaram ffb1bab667 5870 2020-01-02 12:46:57 -08:00
Kartik Agaram e968735e60 5869 2020-01-02 12:43:24 -08:00
Kartik Agaram 7fd4a87066 5868
Follow stupid GNU convention, because why not:
  https://www.gnu.org/prep/standards/html_node/Releases.html
2020-01-02 12:27:35 -08:00
Kartik Agaram cdcf5d71c0 5867 2020-01-02 02:14:48 -08:00
Kartik Agaram ab02bb6632 5866
Stop requiring '--debug' in 'bootstrap run'. Now it's smart enough to turn
on when needed.

This creates some small chance of reading stale debug info for the wrong
binary, but in practice that hasn't been an issue.
2020-01-02 02:02:37 -08:00
Kartik Agaram 9e5e87ca37 5865
Give the bootstrap C++ program a less salient name.
2020-01-02 02:01:41 -08:00
Kartik Agaram df8498fb82 5864 2020-01-02 01:38:54 -08:00
Kartik Agaram d02aa9ac0b 5863
Just clarified for myself why `subx translate` and `subx run` need to share
code: emulation supports the tests first and foremost.

In the process we clean up our architecture for levels of layers. It's
a good idea but unused once we reconceive of "level 1" as just part of
the test harness.
2020-01-02 01:28:24 -08:00
Kartik Agaram 01013f2ad2 5862
Deemphasize details of x86 addressing modes. I want people using SubX's
syntax sugar now.
2020-01-01 23:30:47 -08:00
Kartik Agaram a7088a2fff 5861 - describe Mu language in the Readme 2020-01-01 20:49:45 -08:00
Kartik Agaram 7936ad5ca2 5860 2020-01-01 20:31:01 -08:00
Kartik Agaram f4bef91bd9 5859
Move script to create a Linux-based boot image into a sub-directory.
2020-01-01 19:40:28 -08:00
Kartik Agaram 65409d2312 5858
Move script to create a Soso boot image into a sub-directory.

I'm trying to streamline newcomer attention to just a couple of use cases.
2020-01-01 18:42:48 -08:00
Kartik Agaram a6da50ad30 5857 2020-01-01 17:26:59 -08:00
Kartik Agaram 113bae7311 5856 2020-01-01 17:23:29 -08:00
Kartik Agaram 1b050736ee 5855 2020-01-01 17:11:05 -08:00
Kartik Agaram cace386e1f 5854 2020-01-01 17:05:57 -08:00
Kartik Agaram cc227e67d7 5853 2020-01-01 17:05:15 -08:00
Kartik Agaram 2a4088119c 5852 2020-01-01 17:04:37 -08:00
Kartik Agaram 23fd294d85 5851
Rename a few scripts to be more consistent.

I'm also starting to feel the urge to bud off `subx run` into its own program,
say tools/emulate_x86. It doesn't really rely on the SubX notation at all.

And then I could rename `subx translate` to `translate_subx_bootstrap`.

Only problem: the commands in the Readme get verbose. But the Readme is
gonna need surgery soon anyway to put translate_mu front and center.
2020-01-01 16:45:30 -08:00
Kartik Agaram 7ca19e4e1d 5850 - driver script for translating Mu programs 2020-01-01 16:35:02 -08:00
Kartik Agaram dafef4e30f 5849 - more integration testing of function calls
I can now run this program:

  fn main -> result/ebx: int {
    result <- do-add 3 4
  }

  fn do-add a: int, b: int -> result/ebx: int {
    result <- copy a
    result <- add b
  }

We still can't define local variables, but can write any programs involving
ints by passing in enough arguments for temporaries.
2020-01-01 15:55:12 -08:00
Kartik Agaram 6126361821 5848 2020-01-01 14:51:07 -08:00
Kartik Agaram a9baaac00b 5847 - literal inputs 2019-12-31 21:58:52 -08:00
Kartik Agaram f1344589da 5846 2019-12-30 01:34:39 -08:00
Kartik Agaram dcb20a225f 5845 2019-12-30 01:33:34 -08:00
Kartik Agaram 46c947224f 5844
Let's start putting r32 first in compare instructions that need it. Ordering
there is quite subtle and of great import.
2019-12-30 01:21:00 -08:00
Kartik Agaram d6f886a51f 5843 2019-12-29 13:40:22 -08:00
Kartik Agaram cd11144f52 5842
Extremely crappy syntax highlighting for Emacs. I just can't wrap my head
around elisp, and I'm inclined to blame elisp. Checking this off my todo
list and moving on.
2019-12-29 01:32:46 -08:00
Kartik Agaram b6e3ce576f 5841 - rudimentary syntax highlighting for gedit 2019-12-28 20:02:45 -08:00
Kartik Agaram ecd1a406e6 5840 - syntax highlighting for nano (!!) 2019-12-28 19:16:24 -08:00
Kartik Agaram dc6bd625f2 5839 - colors for comments and string literals 2019-12-28 18:40:44 -08:00
Kartik Agaram bc81e77197 5838 - syntax highlighting for atom 2019-12-28 17:34:38 -08:00
Kartik Agaram 535755316b 5837 - better colors for trace browser 2019-12-28 14:06:25 -08:00
Kartik Agaram ad6ae009ad 5836 2019-12-28 01:07:12 -08:00
Kartik Agaram 03a1de4536 5835 2019-12-28 00:02:29 -08:00
Kartik Agaram 2b665cc552 5834
Bugfix.
2019-12-27 23:59:07 -08:00
Kartik Agaram 1d70540ab3 5833 2019-12-27 23:42:35 -08:00
Kartik Agaram 8961f4f0aa 5832 - support for function outputs
We haven't implemented it yet, but there's now a design for how we check
whether a function has written its output correctly. Functions must write
to each output at the top level at least once, and never overwrite an output
register in the top-level once it's been defined.

This is conservative (it can be perfectly reasonable for functions to write
the output, reuse the register for a temporary, and then write the output
again) but easy to check.
2019-12-27 22:38:06 -08:00
Kartik Agaram 80e0188214 5831 2019-12-27 20:00:30 -08:00
Kartik Agaram 8e8a38ea81 5830
Bugfix: statements defining a new register variable require an initializer
instruction.
2019-12-26 02:43:14 -08:00
Kartik Agaram 1d7d6e2ee7 5829 2019-12-26 02:43:05 -08:00
Kartik Agaram bf03b1d9fa 5828 - copy (mov) instructions 2019-12-26 02:21:55 -08:00
Kartik Agaram 1210b77362 5827 - give primitives one more bit of metadata
Copy (mov) instructions are unlike instructions we've encoded so far, in
that their destination is not read.
2019-12-26 02:07:48 -08:00