aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/tccgen.c b/tccgen.c
index d504572..c2481b0 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -873,7 +873,7 @@ ST_FUNC int gv(int rc)
#endif
r = vtop->r & VT_VALMASK;
- if((rc & ~RC_MASK) && (rc != RC_ST0))
+ if(rc & ~RC_MASK)
rc2 = ex_rc;
else
rc2 = (rc & RC_FLOAT) ? RC_FLOAT : RC_INT;
@@ -2624,20 +2624,19 @@ ST_FUNC void vstore(void)
vtop -=2;
}else{
size = type_size(&vtop->type, &align);
-#ifndef TCC_TARGET_X86_64
/* destination */
vswap();
vtop->type.t = VT_PTR;
gaddrof();
/* address of memcpy() */
-# ifdef TCC_ARM_EABI
+#ifdef TCC_ARM_EABI
if(!(align & 7))
vpush_global_sym(&func_old_type, TOK_memcpy8);
else if(!(align & 3))
vpush_global_sym(&func_old_type, TOK_memcpy4);
else
-# endif
+#endif
vpush_global_sym(&func_old_type, TOK_memcpy);
vswap();
@@ -2646,22 +2645,8 @@ ST_FUNC void vstore(void)
vtop->type.t = VT_PTR;
gaddrof();
/* type size */
- vpushs(size);
+ vpushi(size);
gfunc_call(3);
-#else
- /* destination */
- vswap();
- vtop->type.t = VT_PTR;
- gaddrof();
- /* source */
- vpushv(vtop - 1);
- vtop->type.t = VT_PTR;
- gaddrof();
- /* size */
- vpushs(size);
- struct_copy(&vtop[-2], &vtop[-1], &vtop[0]);
- vtop -=3;
-#endif
}
} else {
vswap();
@@ -5354,22 +5339,16 @@ 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 {
-#ifndef TCC_TARGET_X86_64
vpush_global_sym(&func_old_type, TOK_memset);
vseti(VT_LOCAL, c);
-# ifdef TCC_TARGET_ARM
+#ifdef TCC_TARGET_ARM
vpushs(size);
vpushi(0);
-# else
+#else
vpushi(0);
vpushs(size);
-# endif
- gfunc_call(3);
-#else
- vseti(VT_LOCAL, c);
- gen_putz(vtop, size);
- vtop--;
#endif
+ gfunc_call(3);
}
}