mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10: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);
|
gfunc_call(1);
|
||||||
func_bound_add_epilog = 1;
|
func_bound_add_epilog = 1;
|
||||||
}
|
}
|
||||||
|
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
||||||
if (v == TOK_alloca)
|
if (v == TOK_alloca)
|
||||||
func_bound_add_epilog = 1;
|
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"
|
"__MAYBE_REDIR(void,free,(void*))\n"
|
||||||
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
||||||
"__BOTH(void*,alloca,(__SIZE_TYPE__))\n"
|
"__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
|
#endif
|
||||||
"__BUILTIN(void,abort,(void))\n"
|
"__BUILTIN(void,abort,(void))\n"
|
||||||
"__BOUND(int,longjmp,())\n"
|
"__BOUND(int,longjmp,())\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user