diff --git a/tccgen.c b/tccgen.c
index 6a5ba03b..c5e368e9 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -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);
     }
 }