mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-04 06:30:10 +08:00
FreeBSD (on arm64): partial support, only -run works - WIP
This commit is contained in:
parent
eab324a7cf
commit
f48a9ed001
6
libtcc.c
6
libtcc.c
@ -881,9 +881,13 @@ LIBTCCAPI TCCState *tcc_new(void)
|
||||
tcc_define_symbol(s, "__linux", NULL);
|
||||
# endif
|
||||
# if defined(__FreeBSD__)
|
||||
tcc_define_symbol(s, "__FreeBSD__", "__FreeBSD__");
|
||||
tcc_define_symbol(s, "__FreeBSD__", "12");
|
||||
/* No 'Thread Storage Local' on FreeBSD with tcc */
|
||||
tcc_define_symbol(s, "__NO_TLS", NULL);
|
||||
# if defined(__aarch64__)
|
||||
/* FIXME, __int128_t is used by setjump */
|
||||
tcc_define_symbol(s, "__int128_t", "struct { unsigned char _dummy[16]; }");
|
||||
# endif
|
||||
# endif
|
||||
# if defined(__FreeBSD_kernel__)
|
||||
tcc_define_symbol(s, "__FreeBSD_kernel__", NULL);
|
||||
|
3
tccrun.c
3
tccrun.c
@ -678,6 +678,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc)
|
||||
#elif defined(__arm__)
|
||||
rc->ip = uc->uc_mcontext.arm_pc;
|
||||
rc->fp = uc->uc_mcontext.arm_fp;
|
||||
#elif defined(__aarch64__) && defined(__FreeBSD__)
|
||||
rc->ip = uc->uc_mcontext.mc_gpregs.gp_elr; /* aka REG_PC */
|
||||
rc->fp = uc->uc_mcontext.mc_gpregs.gp_x[29];
|
||||
#elif defined(__aarch64__)
|
||||
rc->ip = uc->uc_mcontext.pc;
|
||||
rc->fp = uc->uc_mcontext.regs[29];
|
||||
|
Loading…
Reference in New Issue
Block a user