aboutsummaryrefslogtreecommitdiff
path: root/x86_64-gen.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-05-04 04:19:24 +0300
committerseyko <seyko2@gmail.com>2015-05-04 04:19:24 +0300
commitc75d0deecf6823421e088ec252a9d51445d013a0 (patch)
treec03eae4c8e742e7dd5bde9a2064e5cbe476dec76 /x86_64-gen.c
parent999274ca900b23da11abeda5f38413eb6fbec9a8 (diff)
downloadtinycc-c75d0deecf6823421e088ec252a9d51445d013a0.tar.gz
tinycc-c75d0deecf6823421e088ec252a9d51445d013a0.tar.bz2
VLA code minor fix
Diffstat (limited to 'x86_64-gen.c')
-rw-r--r--x86_64-gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c
index 5a080af..b51adb3 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -2225,6 +2225,8 @@ ST_FUNC void gen_vla_sp_restore(int addr) {
/* Subtract from the stack pointer, and push the resulting value onto the stack */
ST_FUNC void gen_vla_alloc(CType *type, int align) {
+ int r;
+ get_flags();
#ifdef TCC_TARGET_PE
/* alloca does more than just adjust %rsp on Windows */
vpush_global_sym(&func_old_type, TOK_alloca);
@@ -2232,7 +2234,6 @@ ST_FUNC void gen_vla_alloc(CType *type, int align) {
gfunc_call(1);
vset(type, REG_IRET, 0);
#else
- int r;
r = gv(RC_INT); /* allocation size */
/* sub r,%rsp */
o(0x2b48);