mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-27 06:10:06 +08:00
arm64: Fix a case of dead code suppression
82_nocode_wanted.c:kb_wait_2_1 was miscompiled on arm64.
This commit is contained in:
parent
f5ae4daa5f
commit
b5b12b89a0
10
tccgen.c
10
tccgen.c
@ -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(';');
|
||||
|
Loading…
Reference in New Issue
Block a user