[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 12:15:01 +0300 |
Hi!
I suugest the following patch for the case 4:
make an extra call to the vla_sp_save() in decl_initializer() at the
start insteed of doing this after gen_vla_alloc().
@@ -5450,6 +5451,9 @@
int a;
/* save current stack pointer */
+ if (vla_flags & VLA_IN_SCOPE)
+ vla_sp_save();
+
if (vla_flags & VLA_NEED_NEW_FRAME) {
vla_sp_save();
vla_flags = VLA_IN_SCOPE;
We have the same code in the tccgen.c already:
/* label case */
if (vla_flags & VLA_IN_SCOPE) {
/* save/restore stack pointer across label
this is a no-op when combined with the load immediately
after the label unless we arrive via goto */
vla_sp_save();
}
- [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
- 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