switch last 2 params of TOK_memset on ARM
On ARM, TOK_memset is executed via __aeabi_memset which reverse the order of the last two parameters.
This commit is contained in:
5
tccgen.c
5
tccgen.c
@ -5157,8 +5157,13 @@ static void init_putz(CType *t, Section *sec, unsigned long c, int size)
|
|||||||
} else {
|
} else {
|
||||||
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);
|
||||||
|
vpushi(0);
|
||||||
|
#else
|
||||||
vpushi(0);
|
vpushi(0);
|
||||||
vpushs(size);
|
vpushs(size);
|
||||||
|
#endif
|
||||||
gfunc_call(3);
|
gfunc_call(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user