From 82bddb5aa27873695d22a5af9150a6c763c6351b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 9 Oct 2022 01:47:02 -0400 Subject: Registry name generation --- tnslc/compile/compile.tnsl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tnslc/compile/compile.tnsl') diff --git a/tnslc/compile/compile.tnsl b/tnslc/compile/compile.tnsl index 80656e4..6bfa07e 100644 --- a/tnslc/compile/compile.tnsl +++ b/tnslc/compile/compile.tnsl @@ -15,10 +15,12 @@ #/ /; module compile + # :include "compile/arch/arch.tnsl" # :include "compile/comp.tnsl" ;/ +:include "isa_x86.tnsl" ;{}{}charp COMMON_ASM = { "\tret", @@ -57,7 +59,17 @@ /; index_to_loc (int index, ~VTrack tab) [{}charp] ;{}charp out = "" + ;int stack_bytes = 0 + ;int reg = 0 + ;int i = 0 + /; loop (i < index) [i++] + /; if (tab`.sym_types{i}._size <= 8 && reg < 7) + ;reg++ + ;; else + ;stack_bytes = stack_bytes + tab`.sym_types{i}._size + ;/ + ;/ ;/ -- cgit v1.2.3