aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorjiang <30155751@qq.com>2014-05-02 23:45:48 +0800
committerjiang <30155751@qq.com>2014-05-02 23:45:48 +0800
commite647c3137d91f5daa1096b21e09d689ddf71335b (patch)
treef7544e0b50f09aa2fe800888f869196af0e1fcb6 /tcc.h
parent6c8207633fd42e420e32bdf4912be9fbf307f5ad (diff)
downloadtinycc-e647c3137d91f5daa1096b21e09d689ddf71335b.tar.gz
tinycc-e647c3137d91f5daa1096b21e09d689ddf71335b.tar.bz2
Fix x86-64 vla
For example, it should look like this High stack ------------- ----- Func_ret_sub ------------ ---- Vla stack ------------- ---- Known loc -------------- Low Increased loc_stack () function is used for temporary stack management, call save_reg (), released by load () Like this Before use High ----- Known loc ---- --- ---- ---- Pop_stack Low loc_stack (size, 1) After use High ----- Known loc ---- Pop_stack --- ---- ---- Low
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcc.h b/tcc.h
index 266b43a..f56273f 100644
--- a/tcc.h
+++ b/tcc.h
@@ -761,7 +761,7 @@ struct TCCState {
#define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED)
#define VT_BOUNDED 0x8000 /* value is bounded. The address of the
bounding function call point is in vc */
-#define VT_TMP 0x10000
+#define VT_TMP 0x10000 /* luck or tmp stack */
/* types */
#define VT_BTYPE 0x000f /* mask for basic type */
@@ -1212,6 +1212,7 @@ ST_FUNC int ieee_finite(double d);
ST_FUNC void test_lvalue(void);
ST_FUNC void swap(int *p, int *q);
ST_FUNC void vpushi(int v);
+ST_FUNC void vpushs(addr_t 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);
@@ -1247,6 +1248,7 @@ ST_FUNC void gen_inline_functions(void);
ST_FUNC void decl(int l);
ST_FUNC void vdup(void);
ST_FUNC void gaddrof(void);
+ST_FUNC int loc_stack(int size, int is_sub);
#if defined CONFIG_TCC_BCHECK || defined TCC_TARGET_C67
ST_FUNC Sym *get_sym_ref(CType *type, Section *sec, unsigned long offset, unsigned long size);
#endif