mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
Fix alloca and arm problems
alloca is only defined for i386 and x86_64 arm has __aeabi_ prefixes for mem... calls
This commit is contained in:
parent
40671f76e4
commit
fc05da3c0b
2
tccgen.c
2
tccgen.c
@ -1919,8 +1919,10 @@ ST_FUNC void gbound_args(int nb_args)
|
||||
gfunc_call(1);
|
||||
func_bound_add_epilog = 1;
|
||||
}
|
||||
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
||||
if (v == TOK_alloca)
|
||||
func_bound_add_epilog = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
7
tccpp.c
7
tccpp.c
@ -3706,6 +3706,13 @@ static void tcc_predefs(CString *cstr)
|
||||
"__MAYBE_REDIR(void,free,(void*))\n"
|
||||
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
||||
"__BOTH(void*,alloca,(__SIZE_TYPE__))\n"
|
||||
#endif
|
||||
#if defined(TCC_TARGET_ARM) && defined(TCC_ARM_EABI)
|
||||
"__BOUND(void*,__aeabi_memcpy,(void*,const void*,__SIZE_TYPE__))\n"
|
||||
"__BOUND(void*,__aeabi_memmove,(void*,const void*,__SIZE_TYPE__))\n"
|
||||
"__BOUND(void*,__aeabi_memmove4,(void*,const void*,__SIZE_TYPE__))\n"
|
||||
"__BOUND(void*,__aeabi_memmove8,(void*,const void*,__SIZE_TYPE__))\n"
|
||||
"__BOUND(void*,__aeabi_memset,(void*,int,__SIZE_TYPE__))\n"
|
||||
#endif
|
||||
"__BUILTIN(void,abort,(void))\n"
|
||||
"__BOUND(int,longjmp,())\n"
|
||||
|
Loading…
Reference in New Issue
Block a user