continued on register allocator rewrite, slow progress as scoping is

proving to be a challenge
This commit is contained in:
2026-02-14 02:46:29 +00:00
parent d66baf6f99
commit 201b18069b
10 changed files with 1153 additions and 790 deletions
+21 -21
View File
@@ -1,9 +1,9 @@
// GENERATED BY DSC COMPILER
// Generated at 2026-02-10 19:26:10
// Generated at 2026-02-14 02:44:56
// Imports
include print: "./lib/io/print.dsa"
include arena: "./lib/memory/arena_alloc.dsa"
include print: "./lib/io/print.dsa"
//
// Globals & Reserved Memory
//
@@ -11,7 +11,7 @@ include arena: "./lib/memory/arena_alloc.dsa"
dw stack: 0x010000
db message: "Process Exited with code:"
_init:
ldw stack, bpr 0
ldw stack, bpr, 0
mov bpr, spr
push zero
call main
@@ -52,9 +52,9 @@ main:
pop rg3
pop zero
lli 32, rg0
ldw spr, rg2 0
stw rg2, spr 0
ldw spr, rg2, 0
push rg3
stw rg2, spr, 4
// push arg 1
push rg0
// push arg 0
@@ -62,48 +62,48 @@ main:
call arena::alloc
pop rg4
pop zero
ldw spr, rg0 4
ldw spr, rg0, 4
stw rg0, spr, 4
push rg4
stw rg0, spr 8
// push arg 0
push rg0
call print::print_hex_word
pop zero
call print::print_newline
ldw spr, rg0 4
stw rg0, spr 4
ldw spr, rg0, 4
stw rg0, spr, 4
// push arg 0
push rg0
call print::print_hex_word
pop zero
call print::print_newline
ldw spr, rg0 0
stw rg0, spr 0
ldw spr, rg0, 0
stw rg0, spr, 0
// push arg 0
push rg0
call print::print_hex_word
pop zero
call print::print_newline
ldw spr, rg0 0
ldw rg0, rg2 0
stw rg0, spr 0
ldw spr, rg0, 0
ldw rg0, rg2, 0
stw rg0, spr, 0
// push arg 0
push rg2
call print::print_num
pop zero
call print::print_newline
lli 42, rg2
ldw spr, rg5 0
stw rg2, rg5 0
stw rg5, spr 0
ldw spr, rg5, 0
stw rg2, rg5, 0
stw rg5, spr, 0
// push arg 0
push rg5
call print::print_hex_word
pop zero
call print::print_newline
ldw spr, rg2 0
ldw rg2, rg5 0
stw rg2, spr 0
ldw spr, rg2, 0
ldw rg2, rg5, 0
stw rg2, spr, 0
// push arg 0
push rg5
call print::print_num
@@ -115,5 +115,5 @@ main:
call print::println
pop zero
lli 0, rg5
stw rg5, bpr 8
stw rg5, bpr, 8
jmp _ret