Kartik Agaram
93c6352dda
6943
...
Move some implementation around for floating-point.
I originally thought I wouldn't bother supporting sigils like %xmm0. But
it turns out I need them to pass floats into SubX function calls. And it
turns out the sigils work fine for free.
2020-10-04 00:54:57 -07:00
Kartik Agaram
1bf5d5f44e
6942
2020-10-04 00:19:54 -07:00
Kartik Agaram
2f5a8496e6
6940
2020-10-03 22:55:19 -07:00
Kartik Agaram
f6eba67645
6937
2020-10-03 20:24:14 -07:00
Kartik Agaram
cce9cda971
6935 - raytracing using floats
2020-10-03 20:17:08 -07:00
Kartik Agaram
4787d7d4b8
6934
2020-10-03 20:06:27 -07:00
Kartik Agaram
7b85e97ea8
6933
2020-10-03 19:50:24 -07:00
Kartik Agaram
42500e3f47
6932 - another bug related to floats
...
For most of Mu's history we've selected between primitives based on types
just by checking whether a type is a literal or not. Now we've started
checking if it's a float as well. However, floats need one additional check:
the call site may have an (addr float) that is dereferenced.
2020-10-03 13:55:52 -07:00
Kartik Agaram
c2ec9e21c9
6931 - support fp registers in variable lookup
2020-10-03 12:05:53 -07:00
Kartik Agaram
8719ea906d
6930
2020-10-03 11:40:26 -07:00
Kartik Agaram
b94e94e035
6927 - working on a raytracing tutorial
...
https://raytracing.github.io/books/RayTracingInOneWeekend.html
2020-10-03 00:24:57 -07:00
Kartik Agaram
4230946e6a
6925 - tile: don't try to print escape sequences
2020-10-01 22:49:31 -07:00
Kartik Agaram
f3ca0e3cb3
6922
2020-10-01 20:39:56 -07:00
Kartik Agaram
df04b364a6
6918
...
Fix CI.
2020-10-01 00:01:15 -07:00
Kartik Agaram
8d32a9aab9
6915 - a new family of Mu branch instructions
...
The realization of commit 6916 means that we should be using jump-if-addr*
after comparing floats. Which is super ugly. Let's create aliases to them
called jump-if-float*.
2020-09-30 23:46:43 -07:00
Kartik Agaram
72c42f90cf
6908 - compiling all floating-point operations
...
We don't yet support emulating these instructions in `bootstrap`. But generated
binaries containing them run natively just fine.
2020-09-30 21:17:37 -07:00
Kartik Agaram
558bf57587
6907 - converting to and from floating-point
...
Some bugfixes to the previous commit.
2020-09-29 22:17:25 -07:00
Kartik Agaram
c3176a3f70
6906
2020-09-29 21:41:58 -07:00
Kartik Agaram
a4ef7ce888
6905 - first floating-point instruction compiling
...
(Though the generated code doesn't work yet.)
2020-09-29 21:33:51 -07:00
Kartik Agaram
092205deb3
6904
...
New fields for primitives to support code-generation for floating-point
primitives.
2020-09-29 20:53:59 -07:00
Kartik Agaram
8246324ebb
6903
...
Make a few tests more self-contained.
I'd prefer to just run a function called `setup` first thing on startup
and move this portion of convert-mu to it:
# initialize global data structures
c7 0/subop/copy *Next-block-index 1/imm32
8b/-> *Primitive-type-ids 0/r32/eax
89/<- *Type-id 0/r32/eax # stream-write
c7 0/subop/copy *_Program-functions 0/imm32
c7 0/subop/copy *_Program-functions->payload 0/imm32
c7 0/subop/copy *_Program-types 0/imm32
c7 0/subop/copy *_Program-types->payload 0/imm32
c7 0/subop/copy *_Program-signatures 0/imm32
c7 0/subop/copy *_Program-signatures->payload 0/imm32
However, this approach doesn't fix my run_one_test tooling.
2020-09-29 20:33:29 -07:00
Kartik Agaram
cf1ddc4170
6902
2020-09-29 19:24:29 -07:00
Kartik Agaram
d2b9c7283a
6901
2020-09-29 09:14:09 -07:00
Kartik Agaram
55847cde87
6900 - mu.subx: new primitive type 'float'
...
Using it will currently emit incorrect programs.
2020-09-29 03:51:32 -07:00
Kartik Agaram
8cd797a165
6899
2020-09-29 03:51:32 -07:00
Kartik Agaram
8b1da9bbb2
6898 - names for floating-point xmm* registers
2020-09-29 03:51:19 -07:00
Kartik Agaram
3a2888ae47
6895
2020-09-28 22:19:18 -07:00
Kartik Agaram
64a39b29eb
6891
2020-09-27 23:14:18 -07:00
Kartik Agaram
4f872e345a
6889
...
Teach the self-hosted translator about the new /xm32 and /x32 metadata
for floating-point registers.
2020-09-27 23:00:04 -07:00
Kartik Agaram
7258083c6f
6884
2020-09-27 07:32:08 -07:00
Kartik Agaram
866cccca76
6883
2020-09-26 23:55:44 -07:00
Kartik Agaram
abab2fdefd
6882
2020-09-26 23:51:23 -07:00
Kartik Agaram
fec64dbc76
6881 - tile: function calls can now be expanded
2020-09-26 23:50:05 -07:00
Kartik Agaram
6e0ff0e5dc
6880
...
We need the state of the stack at the call-site. But rendering is already
working surprisingly well.
2020-09-26 23:40:47 -07:00
Kartik Agaram
4578687622
6879
...
Extract a new function.
2020-09-26 23:29:14 -07:00
Kartik Agaram
6f4ff604de
6878 - tile: mock-up for expanding function calls
2020-09-26 23:24:55 -07:00
Kartik Agaram
009559f1fb
6877
...
Track just whether to step inside or not.
2020-09-26 23:07:11 -07:00
Kartik Agaram
866e6e72a8
6876
...
Back to commit 6872.
2020-09-26 23:05:36 -07:00
Kartik Agaram
e5aa1b3cb6
6875
...
Snapshot. Caching subsidiary stacks is a dead end; they're just the final
iteration. We need to render all iterations.
2020-09-26 23:02:39 -07:00
Kartik Agaram
270dce161f
6874
2020-09-26 23:02:03 -07:00
Kartik Agaram
78cfd370e5
6873
...
Now saving the subsidiary stack.
2020-09-26 22:27:09 -07:00
Kartik Agaram
62c539d8ac
6872
...
Hackily show function definition.
2020-09-26 22:14:36 -07:00
Kartik Agaram
ef7f0a540a
6871
...
Segfault now fixed. Everything seems to be working again.
2020-09-26 22:10:34 -07:00
Kartik Agaram
ebb93c6d58
6870
...
Emit a stack of not ints but more complex objects containing the int payload.
Function calls again segfaulting.
2020-09-26 21:59:50 -07:00
Kartik Agaram
65e6633b79
6869
2020-09-26 21:30:04 -07:00
Kartik Agaram
5babe16f2d
6868
...
First function call working in apps/tile!
2020-09-26 21:26:20 -07:00
Kartik Agaram
e46cfc2e0c
6867
...
Segfault fixed. This shouldn't have been so hard.
2020-09-26 20:47:52 -07:00
Kartik Agaram
42349345f4
6866
2020-09-26 20:15:45 -07:00
Kartik Agaram
b8682e7349
6865
2020-09-26 20:14:06 -07:00
Kartik Agaram
a060a4dc30
6864
2020-09-26 20:07:58 -07:00