Kartik Agaram
b8d613e7c2
6946 - print floats somewhat intuitively in hex
2020-10-04 11:18:23 -07:00
Kartik Agaram
0371140abe
6945
2020-10-04 01:33:49 -07:00
Kartik Agaram
21ff6d831a
6944
2020-10-04 01:25:02 -07:00
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
faeeef34f5
6941 - detective story for the day
2020-10-03 23:17:17 -07:00
Kartik Agaram
2f5a8496e6
6940
2020-10-03 22:55:19 -07:00
Kartik Agaram
b6cf4f1db3
6939
2020-10-03 22:53:05 -07:00
Kartik Agaram
93a4ada6a1
6938 - start colorizing floating-point registers
2020-10-03 20:29:31 -07:00
Kartik Agaram
f6eba67645
6937
2020-10-03 20:24:14 -07:00
Kartik Agaram
6112864aea
6936
2020-10-03 20:17:43 -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
ac608bc72e
6929
2020-10-03 00:25:55 -07:00
Kartik Agaram
04dcb8f3c2
6928
2020-10-03 00:25:13 -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
ab1cf1593a
6926
2020-10-02 09:24:16 -07:00
Kartik Agaram
4230946e6a
6925 - tile: don't try to print escape sequences
2020-10-01 22:49:31 -07:00
Kartik Agaram
8e607b128c
6924
2020-10-01 21:43:04 -07:00
Kartik Agaram
d75b712974
6923
2020-10-01 20:40:22 -07:00
Kartik Agaram
f3ca0e3cb3
6922
2020-10-01 20:39:56 -07:00
Kartik Agaram
c79b93ca6c
6921
2020-10-01 20:35:14 -07:00
Kartik Agaram
611e9f2e08
6920
2020-10-01 00:49:09 -07:00
Kartik Agaram
3d053e34b7
6919
2020-10-01 00:46:38 -07:00
Kartik Agaram
df04b364a6
6918
...
Fix CI.
2020-10-01 00:01:15 -07:00
Kartik Agaram
11b4bd3e60
6917
2020-09-30 23:55:01 -07:00
Kartik Agaram
7bb57da24e
6916
2020-09-30 23:52:26 -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
bc3ebe820b
6914
2020-09-30 23:14:57 -07:00
Kartik Agaram
6453bbbff8
6913 - copying floats around
2020-09-30 23:12:39 -07:00
Kartik Agaram
d44bd51f90
6912
2020-09-30 22:56:45 -07:00
Kartik Agaram
656b840e7f
6911 - comparing floats
...
It turns out floating-point operations set different flags than most instructions.
We have to branch on them using unsigned jumps.
https://stackoverflow.com/questions/7057501/x86-assembler-floating-point-compare/7057771#7057771
2020-09-30 22:53:14 -07:00
Kartik Agaram
d564633b24
6910 - emulate most floating-point operations
2020-09-30 22:09:26 -07:00
Kartik Agaram
8b215b65cf
6909
2020-09-30 21:33:14 -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
f334aa73e9
6897
2020-09-29 03:41:05 -07:00