History

Fix alloca and arm problems

alloca is only defined for i386 and x86_64 arm has __aeabi_ prefixes for mem... calls

herman ten brugge committed 6 years ago

Commit fc05da31 parent 40671f72 files · +9 −0Browse files

Unified · Split

2 files
  1. tccgen.c +2 −0
  2. tccpp.c +7 −0
tccgen.c+2−0
@@ -1919,8 +1919,10 @@ ST_FUNC void gbound_args(int nb_args) · 1918 unmodified lines
1919 gfunc_call(1);1919 gfunc_call(1);
1920 func_bound_add_epilog = 1;1920 func_bound_add_epilog = 1;
1921 }1921 }
1922#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
1922 if (v == TOK_alloca)1923 if (v == TOK_alloca)
1923 func_bound_add_epilog = 1;1924 func_bound_add_epilog = 1;
1925#endif
1924 }1926 }
1925}1927}
1926 1928
tccpp.c+7−0
@@ -3706,6 +3706,13 @@ static void tcc_predefs(CString *cstr) · 3705 unmodified lines
3706 "__MAYBE_REDIR(void,free,(void*))\n"3706 "__MAYBE_REDIR(void,free,(void*))\n"
3707#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_643707#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
3708 "__BOTH(void*,alloca,(__SIZE_TYPE__))\n"3708 "__BOTH(void*,alloca,(__SIZE_TYPE__))\n"
3709#endif
3710#if defined(TCC_TARGET_ARM) && defined(TCC_ARM_EABI)
3711 "__BOUND(void*,__aeabi_memcpy,(void*,const void*,__SIZE_TYPE__))\n"
3712 "__BOUND(void*,__aeabi_memmove,(void*,const void*,__SIZE_TYPE__))\n"
3713 "__BOUND(void*,__aeabi_memmove4,(void*,const void*,__SIZE_TYPE__))\n"
3714 "__BOUND(void*,__aeabi_memmove8,(void*,const void*,__SIZE_TYPE__))\n"
3715 "__BOUND(void*,__aeabi_memset,(void*,int,__SIZE_TYPE__))\n"
3709#endif3716#endif
3710 "__BUILTIN(void,abort,(void))\n"3717 "__BUILTIN(void,abort,(void))\n"
3711 "__BOUND(int,longjmp,())\n"3718 "__BOUND(int,longjmp,())\n"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t