tcc on i386 are still having problems at work.Thank Roy report again. Struck on several variables can be connected to commit in the register. I am worried whether tcc can run the os. Since my machine is ubuntu 64 bits I can test my machine.
This commit is contained in:
37
tccgen.c
37
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
|
||||
vpushi(0);
|
||||
vpushs(size);
|
||||
# endif
|
||||
gfunc_call(3);
|
||||
#else
|
||||
vseti(VT_LOCAL, c);
|
||||
gen_putz(vtop, size);
|
||||
vtop--;
|
||||
vpushi(0);
|
||||
vpushs(size);
|
||||
#endif
|
||||
gfunc_call(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user