| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Fix CI.
|
| |
|
| |
|
|
|
|
|
|
| |
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*.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
We don't yet support emulating these instructions in `bootstrap`. But generated
binaries containing them run natively just fine.
|
|
|
|
| |
Some bugfixes to the previous commit.
|
| |
|
|
|
|
| |
(Though the generated code doesn't work yet.)
|
|
|
|
|
| |
New fields for primitives to support code-generation for floating-point
primitives.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Using it will currently emit incorrect programs.
|
| |
|
| |
|
| |
|
|
|
|
| |
Readme-driven development for Mu's floating-point operations.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Teach the self-hosted translator about the new /xm32 and /x32 metadata
for floating-point registers.
|
|
|
|
| |
Teach `bootstrap translate` about the new /xm32 and /x32 arguments.
|
|
|
|
|
| |
subx.md distinguishes between operands and arguments. Let's use that terminology
more consistently in the sources.
|
| |
|
|
|
|
|
|
|
|
|
| |
I spent some time deciding on the instructions. x87 is a stack ISA, so
not a good fit for the rest of SubX. So we use SSE instead. They operate
on 32-bit floats, which seems like a good fit.
SSE has a bunch of instructions for operating on up to 4 floats at once.
We'll ignore all that and just focus on so-called scalar instructions.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We need the state of the stack at the call-site. But rendering is already
working surprisingly well.
|
|
|
|
| |
Extract a new function.
|
| |
|
|
|
|
| |
Track just whether to step inside or not.
|
|
|
|
| |
Back to commit 6872.
|
|
|
|
|
| |
Snapshot. Caching subsidiary stacks is a dead end; they're just the final
iteration. We need to render all iterations.
|
| |
|
|
|
|
| |
Now saving the subsidiary stack.
|
|
|
|
| |
Hackily show function definition.
|
|
|
|
| |
Segfault now fixed. Everything seems to be working again.
|