bootstrappable: ARM: generate __memcpy, __memmove, __memset.
* tccgen.c (vstore)[BOOTSTRAP && __arm__]: Generate TOK__memove. (init_putz): Generate TOK__memset. * tcctok.h[BOOTSTRAP && __arm__]: Add __memcpy, __memmove, __memset.
This commit is contained in:
parent
fc93202abe
commit
2613fb5d63
8
tccgen.c
8
tccgen.c
|
@ -2963,7 +2963,11 @@ ST_FUNC void vstore(void)
|
|||
else
|
||||
#endif
|
||||
/* Use memmove, rather than memcpy, as dest and src may be same: */
|
||||
#if BOOTSTRAP && __arm__
|
||||
vpush_global_sym(&func_old_type, TOK___memmove);
|
||||
#else
|
||||
vpush_global_sym(&func_old_type, TOK_memmove);
|
||||
#endif
|
||||
|
||||
vswap();
|
||||
/* source */
|
||||
|
@ -6036,7 +6040,11 @@ static void init_putz(Section *sec, unsigned long c, int size)
|
|||
if (sec) {
|
||||
/* nothing to do because globals are already set to zero */
|
||||
} else {
|
||||
#if BOOTSTRAP && __arm__
|
||||
vpush_global_sym(&func_old_type, TOK___memset);
|
||||
#else
|
||||
vpush_global_sym(&func_old_type, TOK_memset);
|
||||
#endif
|
||||
vseti(VT_LOCAL, c);
|
||||
#ifdef TCC_TARGET_ARM
|
||||
vpushs(size);
|
||||
|
|
5
tcctok.h
5
tcctok.h
|
@ -167,6 +167,11 @@
|
|||
|
||||
/* builtin functions or variables */
|
||||
#ifndef TCC_ARM_EABI
|
||||
#if BOOTSTRAP && __arm__
|
||||
DEF(TOK___memcpy, "__memcpy")
|
||||
DEF(TOK___memmove, "__memmove")
|
||||
DEF(TOK___memset, "__memset")
|
||||
#endif
|
||||
DEF(TOK_memcpy, "memcpy")
|
||||
DEF(TOK_memmove, "memmove")
|
||||
DEF(TOK_memset, "memset")
|
||||
|
|
Loading…
Reference in New Issue