diff options
| author | Michael Matz <matz@suse.de> | 2016-12-13 17:23:02 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:49:56 +0100 |
| commit | b5b12b89a0342308747f956d04ecd7015b2d6d8b (patch) | |
| tree | e712e900e54c020414e857330354a165c2a5b491 | |
| parent | f5ae4daa5f80d5230a93b600a0f40fe8c32b77d5 (diff) | |
| download | tinycc-b5b12b89a0342308747f956d04ecd7015b2d6d8b.tar.gz tinycc-b5b12b89a0342308747f956d04ecd7015b2d6d8b.tar.bz2 | |
arm64: Fix a case of dead code suppression
82_nocode_wanted.c:kb_wait_2_1 was miscompiled on arm64.
| -rw-r--r-- | tccgen.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -5819,14 +5819,16 @@ static void block(int *bsym, int *csym, int is_expr) vla_sp_restore(); saved_nocode_wanted = nocode_wanted; block(&a, &b, 0); - nocode_wanted = saved_nocode_wanted; skip(TOK_WHILE); skip('('); gsym(b); - gexpr(); - c = gvtst(0, 0); - if (!nocode_wanted) + gexpr(); + if (!nocode_wanted) { + c = gvtst(0, 0); gsym_addr(c, d); + } else + vtop--; + nocode_wanted = saved_nocode_wanted; skip(')'); gsym(a); skip(';'); |
