diff options
| author | jiang <30155751@qq.com> | 2014-05-01 15:15:01 +0800 |
|---|---|---|
| committer | jiang <30155751@qq.com> | 2014-05-01 15:15:01 +0800 |
| commit | 87a850f5537cccabc56d2f9b76faefe1454e4b19 (patch) | |
| tree | 2f4078dc037e873d630b8e4d68518fe2697179a7 /tccgen.c | |
| parent | 9e3713facd9d857201326ac2038ab6a8fb64a5fc (diff) | |
| download | tinycc-87a850f5537cccabc56d2f9b76faefe1454e4b19.tar.gz tinycc-87a850f5537cccabc56d2f9b76faefe1454e4b19.tar.bz2 | |
fix its own making bug. Improved init_putz (). Modify the tests / Makefile to make the test more secure
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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); + gfunc_call(3); #else - vpushi(0); - vpushs(size); + vseti(VT_LOCAL, c); + gen_putz(vtop, size); + vtop--; #endif - gfunc_call(3); } } |
