On ARM, TOK_memset is executed via __aeabi_memset which reverse the order of the last two parameters.
Unified · Split
| @@ -5157,8 +5157,13 @@ static void init_putz(CType *t, Section *sec, unsigned long c, int size) · 5156 unmodified lines | ||
| 5157 | 5157 | } else { |
| 5158 | 5158 | vpush_global_sym(&func_old_type, TOK_memset); |
| 5159 | 5159 | vseti(VT_LOCAL, c); |
| 5160 | +#ifdef TCC_TARGET_ARM | |
| 5161 | + vpushs(size); | |
| 5162 | + vpushi(0); | |
| 5163 | +#else | |
| 5160 | 5164 | vpushi(0); |
| 5161 | 5165 | vpushs(size); |
| 5166 | +#endif | |
| 5162 | 5167 | gfunc_call(3); |
| 5163 | 5168 | } |
| 5164 | 5169 | } |