fix its own making bug. Improved init_putz (). Modify the tests / Makefile to make the test more secure

This commit is contained in:
jiang
2014-05-01 15:15:01 +08:00
parent 9e3713facd
commit 87a850f553
4 changed files with 68 additions and 52 deletions

View File

@ -5224,16 +5224,17 @@ static void init_putz(CType *t, Section *sec, unsigned long c, int size)
if (sec) {
/* nothing to do because globals are already set to zero */
} else {
#ifdef TCC_TARGET_ARM
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);
#else
vseti(VT_LOCAL, c);
gen_putz(vtop, size);
vtop--;
#endif
}
}