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
19191919 gfunc_call(1);
19201920 func_bound_add_epilog = 1;
19211921 }
1922+#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
19221923 if (v == TOK_alloca)
19231924 func_bound_add_epilog = 1;
1925+#endif
19241926 }
19251927 }
19261928
tccpp.c+7−0
@@ -3706,6 +3706,13 @@ static void tcc_predefs(CString *cstr) · 3705 unmodified lines
37063706 "__MAYBE_REDIR(void,free,(void*))\n"
37073707 #if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
37083708 "__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"
37093716 #endif
37103717 "__BUILTIN(void,abort,(void))\n"
37113718 "__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