Remove vnrott (duplicate vrotb)

This commit is contained in:
Thomas Preud'homme 2012-03-14 15:39:16 +01:00
parent 3d25213c16
commit 53c5715cca
3 changed files with 2 additions and 19 deletions

View File

@ -798,7 +798,7 @@ void gfunc_call(int nb_args)
} }
args_size = keep = 0; args_size = keep = 0;
for(i = 0;i < nb_args; i++) { for(i = 0;i < nb_args; i++) {
vnrott(keep+1); vrotb(keep+1);
if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) { if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
size = type_size(&vtop->type, &align); size = type_size(&vtop->type, &align);
/* align to stack align size */ /* align to stack align size */
@ -911,7 +911,7 @@ save_regs(keep); /* save used temporary registers */
} }
args_size-=n*4; args_size-=n*4;
} }
vnrott(keep); vrotb(keep);
func_sym = vtop->type.ref; func_sym = vtop->type.ref;
gcall_or_jmp(0); gcall_or_jmp(0);
if (args_size) if (args_size)

1
tcc.h
View File

@ -1140,7 +1140,6 @@ ST_FUNC void vpush_global_sym(CType *type, int v);
ST_FUNC void vrott(int n); ST_FUNC void vrott(int n);
#ifdef TCC_TARGET_ARM #ifdef TCC_TARGET_ARM
ST_FUNC int get_reg_ex(int rc, int rc2); ST_FUNC int get_reg_ex(int rc, int rc2);
ST_FUNC void vnrott(int n);
ST_FUNC void lexpand_nr(void); ST_FUNC void lexpand_nr(void);
#endif #endif
ST_FUNC void vpushv(SValue *v); ST_FUNC void vpushv(SValue *v);

View File

@ -967,22 +967,6 @@ ST_FUNC void vrott(int n)
vtop[-n + 1] = tmp; vtop[-n + 1] = tmp;
} }
#ifdef TCC_TARGET_ARM
/* like vrott but in other direction
In ... I1 -> I(n-1) ... I1 In [top is right]
*/
ST_FUNC void vnrott(int n)
{
int i;
SValue tmp;
tmp = vtop[-n + 1];
for(i = n - 1; i > 0; i--)
vtop[-i] = vtop[-i + 1];
vtop[0] = tmp;
}
#endif
/* pop stack value */ /* pop stack value */
ST_FUNC void vpop(void) ST_FUNC void vpop(void)
{ {