diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2023-10-31 00:12:51 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2023-10-31 00:12:51 +0100 |
| commit | 2bc3d9a3815a6cd172b3b4f7696c46a006021b13 (patch) | |
| tree | bd77783f22f010976af6176336bfc4977987eac7 /include/uskel.s | |
| parent | 8504d72bda94c3a1668ebbdd262ae8a4963a23c1 (diff) | |
| download | uskel-2bc3d9a3815a6cd172b3b4f7696c46a006021b13.tar.gz uskel-2bc3d9a3815a6cd172b3b4f7696c46a006021b13.tar.bz2 | |
gc kinda almost there
Diffstat (limited to 'include/uskel.s')
| -rw-r--r-- | include/uskel.s | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/include/uskel.s b/include/uskel.s index bca33c9..f59a1f7 100644 --- a/include/uskel.s +++ b/include/uskel.s @@ -8,47 +8,16 @@ _start: .include "include/macros.s" -# this has globals .section .bss _unix_rsp: # back-up of program entry rsp (aka the actual stack given by the # actual OS; we might like to use it at some point, maybe) cell 0 -_write_region_start: - # begin of the active memory area - cell 0 -_write_region_end: - # end of the active memory area (%rsp kinda starts here and goes down - # towars the start) - cell 0 -_gc_last_size: - # how much data we evacuated last time - cell 0 -_gc_min_alloc: - # minimum possible allocation - cell 0x100000 # tunable constant -_gc_min_expect_ratio: - # 256th's of the minimal amount of memory increment compared to the - # last time. New minimal amount is compared as: - # (ratio * last size) >> 8 - cell 0x200 # tunable constant -_gc_region_start: - # in GC, this region is being evacuated and will eventually disappear - cell 0 -_gc_region_end: - # end of the disappear region - cell 0 -_gc_backup_thunk: - # backup of %rsi so that we can use the register for other nonsense - cell 0 -_gc_backup_cont: - # backup of %rbp for same reason - cell 0 - -.section .text .include "include/gc.s" +.section .text + _uskel_start: # we use the stack pointer for easy writing to the heap; # back it up to memory state just if we ever needed it again. @@ -56,7 +25,7 @@ _uskel_start: # allocate the initial chunk of memory mov $_uskel_start_main, %rsi - jmp _uskel_alloc + jmp _uskel_gc_init _uskel_start_main: # push a thunk for main |
