diff options
Diffstat (limited to 'lib/utils/gchelper.h')
-rw-r--r-- | lib/utils/gchelper.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/utils/gchelper.h b/lib/utils/gchelper.h index 7149b6a72..4b6ead6ba 100644 --- a/lib/utils/gchelper.h +++ b/lib/utils/gchelper.h @@ -28,7 +28,21 @@ #include <stdint.h> -uintptr_t gc_helper_get_sp(void); -uintptr_t gc_helper_get_regs_and_sp(uintptr_t *regs); +#if MICROPY_GCREGS_SETJMP +#include <setjmp.h> +typedef jmp_buf gc_helper_regs_t; +#else + +#if defined(__x86_64__) +typedef uintptr_t gc_helper_regs_t[6]; +#elif defined(__i386__) +typedef uintptr_t gc_helper_regs_t[4]; +#elif defined(__thumb2__) || defined(__thumb__) || defined(__arm__) +typedef uintptr_t gc_helper_regs_t[10]; +#endif + +#endif + +void gc_helper_collect_regs_and_stack(void); #endif // MICROPY_INCLUDED_LIB_UTILS_GCHELPER_H |