aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c9
1 files changed, 5 insertions, 4 deletions
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);
}
}