[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] VLAs broken on mob branch
From: |
Sergey Korshunoff |
Subject: |
Re: [Tinycc-devel] VLAs broken on mob branch |
Date: |
Sat, 25 Apr 2015 10:35:23 +0300 |
Hi!
> It looks that
> + vla_sp_save();
> is enough to fix a problem
I don't understand a problem but
another version of the patch is:
--- tinycc.orig/tccgen.c 2015-04-25 06:55:48.000000000 +0300
+++ tinycc/tccgen.c 2015-04-25 10:11:07.000000000 +0300
@@ -5450,7 +5450,7 @@
int a;
/* save current stack pointer */
- if (vla_flags & VLA_NEED_NEW_FRAME) {
+ if (vla_flags & (VLA_NEED_NEW_FRAME | VLA_IN_SCOPE)) {
vla_sp_save();
vla_flags = VLA_IN_SCOPE;
vla_sp_loc = &vla_sp_loc_tmp;
I also try the following:
static void vla_sp_save(void) {
if (!(vla_flags & VLA_SP_LOC_SET)) {
*vla_sp_loc = (loc -= PTR_SIZE);
vla_flags |= VLA_SP_LOC_SET;
}
// if (!(vla_flags & VLA_SP_SAVED)) {
gen_vla_sp_save(*vla_sp_loc);
// vla_flags |= VLA_SP_SAVED;
// }
}
Why vla_sp_save() is protected by VLA_SP_SAVED ? How it works with a
multiple VLA's ?
- [Tinycc-devel] VLAs broken on mob branch, Pip Cet, 2015/04/24
- Re: [Tinycc-devel] VLAs broken on mob branch, Sergey Korshunoff, 2015/04/25
- Re: [Tinycc-devel] VLAs broken on mob branch, Pip Cet, 2015/04/25
- Re: [Tinycc-devel] VLAs broken on mob branch, Sergey Korshunoff, 2015/04/25
- Re: [Tinycc-devel] VLAs broken on mob branch, Sergey Korshunoff, 2015/04/26
- Re: [Tinycc-devel] VLAs broken on mob branch, Pip Cet, 2015/04/27
- Re: [Tinycc-devel] VLAs broken on mob branch, Sergey Korshunoff, 2015/04/27