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:
Jan (janneke) Nieuwenhuizen 2020-11-28 20:55:01 +01:00
parent fc93202abe
commit 2613fb5d63
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -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")