mirror of
https://github.com/frida/tinycc
synced 2024-12-24 05:56:49 +03:00
use vpushv in some places
This commit is contained in:
parent
50b040ef83
commit
4a01eb09d8
1
tcc.h
1
tcc.h
@ -1015,6 +1015,7 @@ ST_FUNC void vpushi(int v);
|
||||
ST_FUNC Sym *external_global_sym(int v, CType *type, int r);
|
||||
ST_FUNC void vset(CType *type, int r, int v);
|
||||
ST_FUNC void vswap(void);
|
||||
ST_FUNC void vpushv(SValue *v);
|
||||
ST_FUNC void save_reg(int r);
|
||||
ST_FUNC int get_reg(int rc);
|
||||
ST_FUNC void save_regs(int n);
|
||||
|
2
tccgen.c
2
tccgen.c
@ -400,7 +400,7 @@ ST_FUNC void vswap(void)
|
||||
vtop[-1] = tmp;
|
||||
}
|
||||
|
||||
static void vpushv(SValue *v)
|
||||
ST_FUNC void vpushv(SValue *v)
|
||||
{
|
||||
if (vtop >= vstack + (VSTACK_SIZE - 1))
|
||||
error("memory full");
|
||||
|
2
tccpe.c
2
tccpe.c
@ -1620,7 +1620,7 @@ ST_FUNC int pe_dllimport(int r, SValue *sv, void (*fn)(int r, SValue *sv))
|
||||
sv->sym->type.t = t & ~VT_IMPORT;
|
||||
//printf("import %x %04x %s\n", t, ind, get_tok_str(sv->sym->v, NULL));
|
||||
|
||||
*++vtop = *sv;
|
||||
vpushv(sv);
|
||||
vtop->type.t &= ~(VT_ARRAY|VT_IMPORT);
|
||||
mk_pointer(&vtop->type);
|
||||
indir();
|
||||
|
@ -611,7 +611,7 @@ void gfunc_call(int nb_args)
|
||||
|
||||
/* generate memcpy call */
|
||||
vset(&sv->type, r | VT_LVAL, 0);
|
||||
*++vtop = *sv;
|
||||
vpushv(sv);
|
||||
vstore();
|
||||
--vtop;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user