diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-16 21:17:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-16 21:17:26 -0700 |
commit | e31b1509ebb518548780aa2544459337854af48e (patch) | |
tree | b30ef7d8bb1db97ba8ad7bad4299b349c87f2756 /gc.c | |
parent | c77cd7d90f4a1549dacbf4b5e34827df2d6e4f03 (diff) | |
download | txr-e31b1509ebb518548780aa2544459337854af48e.tar.gz txr-e31b1509ebb518548780aa2544459337854af48e.tar.bz2 txr-e31b1509ebb518548780aa2544459337854af48e.zip |
Port to aarch64 (ARM 8).
Continuations don't work yet.
* gc.c (STACK_TOP_EXTRA_WORDS): New macro.
(mark): On aarch64, we must include four words above
the stack top. Some live root pointers sometimes
hide there which are not in any of the callee-saved register
that end up in the machine context via jmp_save.
* jmp.S (jmp_save, jmp_restore): Implement for aarch64.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -52,6 +52,12 @@ #define FRESHOBJ_VEC_SIZE (8 * HEAP_SIZE) #define DFL_MALLOC_DELTA_THRESH (64L * 1024 * 1024) +#if __aarch64__ +#define STACK_TOP_EXTRA_WORDS 4 +#else +#define STACK_TOP_EXTRA_WORDS 0 +#endif + typedef struct heap { struct heap *next; obj_t block[HEAP_SIZE]; @@ -499,7 +505,7 @@ static void mark(mach_context_t *pmc, val *gc_stack_top) /* * Finally, the stack. */ - mark_mem_region(gc_stack_top, gc_stack_bottom); + mark_mem_region(gc_stack_top - STACK_TOP_EXTRA_WORDS, gc_stack_bottom); } static int sweep_one(obj_t *block) |