mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-04 08:20:12 +08:00
gen_putz () and struct_copy (), is to reduce the third-party call that
generates faster code tcc Now only for x86-64 parse_number also to reduce the reliance on third-party libraries, allowing faster analysis tcc
This commit is contained in:
parent
ee99fd45ab
commit
5b52a44b52
11
tccgen.c
11
tccgen.c
@ -2543,18 +2543,20 @@ ST_FUNC void vstore(void)
|
|||||||
vtop -=2;
|
vtop -=2;
|
||||||
}else{
|
}else{
|
||||||
size = type_size(&vtop->type, &align);
|
size = type_size(&vtop->type, &align);
|
||||||
#ifdef TCC_ARM_EABI
|
#ifndef TCC_TARGET_X86_64
|
||||||
/* destination */
|
/* destination */
|
||||||
vswap();
|
vswap();
|
||||||
vtop->type.t = VT_PTR;
|
vtop->type.t = VT_PTR;
|
||||||
gaddrof();
|
gaddrof();
|
||||||
|
|
||||||
/* address of memcpy() */
|
/* address of memcpy() */
|
||||||
|
# ifdef TCC_ARM_EABI
|
||||||
if(!(align & 7))
|
if(!(align & 7))
|
||||||
vpush_global_sym(&func_old_type, TOK_memcpy8);
|
vpush_global_sym(&func_old_type, TOK_memcpy8);
|
||||||
else if(!(align & 3))
|
else if(!(align & 3))
|
||||||
vpush_global_sym(&func_old_type, TOK_memcpy4);
|
vpush_global_sym(&func_old_type, TOK_memcpy4);
|
||||||
else
|
else
|
||||||
|
# endif
|
||||||
vpush_global_sym(&func_old_type, TOK_memcpy);
|
vpush_global_sym(&func_old_type, TOK_memcpy);
|
||||||
|
|
||||||
vswap();
|
vswap();
|
||||||
@ -5239,11 +5241,16 @@ static void init_putz(CType *t, Section *sec, unsigned long c, int size)
|
|||||||
if (sec) {
|
if (sec) {
|
||||||
/* nothing to do because globals are already set to zero */
|
/* nothing to do because globals are already set to zero */
|
||||||
} else {
|
} else {
|
||||||
#ifdef TCC_TARGET_ARM
|
#ifndef TCC_TARGET_X86_64
|
||||||
vpush_global_sym(&func_old_type, TOK_memset);
|
vpush_global_sym(&func_old_type, TOK_memset);
|
||||||
vseti(VT_LOCAL, c);
|
vseti(VT_LOCAL, c);
|
||||||
|
#ifdef TCC_TARGET_ARM
|
||||||
vpushs(size);
|
vpushs(size);
|
||||||
vpushi(0);
|
vpushi(0);
|
||||||
|
#else
|
||||||
|
vpushi(0);
|
||||||
|
vpushs(size);
|
||||||
|
#endif
|
||||||
gfunc_call(3);
|
gfunc_call(3);
|
||||||
#else
|
#else
|
||||||
vseti(VT_LOCAL, c);
|
vseti(VT_LOCAL, c);
|
||||||
|
Loading…
Reference in New Issue
Block a user