From 87a850f5537cccabc56d2f9b76faefe1454e4b19 Mon Sep 17 00:00:00 2001 From: jiang <30155751@qq.com> Date: Thu, 1 May 2014 15:15:01 +0800 Subject: fix its own making bug. Improved init_putz (). Modify the tests / Makefile to make the test more secure --- tccgen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index daf5f48..20011a0 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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); } } -- cgit v1.3.1