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.
master
Thomas Preud'homme 2014-02-03 22:27:23 +08:00
parent 1415d7e6b6
commit 4e5f15c685
1 changed files with 5 additions and 0 deletions

View File

@ -5157,8 +5157,13 @@ static void init_putz(CType *t, Section *sec, unsigned long c, int size)
} else {
vpush_global_sym(&func_old_type, TOK_memset);
vseti(VT_LOCAL, c);
#ifdef TCC_TARGET_ARM
vpushs(size);
vpushi(0);
#else
vpushi(0);
vpushs(size);
#endif
gfunc_call(3);
}
}