Higher Subleq | Error | Output | Subleq | ITR |
void main()
{
goto a2;
a1:
__out 50;
return;
a2:
__out 49;
int k1 = a1, k2=a2;
goto a1-a2>0 ? k2:k1;
}
|
|
12
|
top:top top sqmain
_main:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; bp 0
bp; sp bp
c5 sp
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t1 0
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t2 0
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t3 0
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t4 0
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; t5 0
Z Z l_main_a2
l_main_a1:
c1 (-1)
Z Z end_main
l_main_a2:
c2 (-1)
t1; t2; bp t1; dec t1; t1 t2
?+23; ?+21; ?+24; t2 Z; Z ?+10; Z ?+8
Z ?+11; Z; 0; c3 Z; Z 0; Z
t2; t1; bp t2; c5 t2; t2 t1
?+23; ?+21; ?+24; t1 Z; Z ?+10; Z ?+8
Z ?+11; Z; 0; c4 Z; Z 0; Z
t1; c3 Z; Z t1; Z; c4 t1
t2; t1 Z; Z t2; Z; c6 t2
Z t2 l1
t1; t3; bp t1; c5 t1; t1 t3
t1; t4; ?+11; t3 Z; Z ?+4; Z; 0 t1; t1 t4
t2; t4 Z; Z t2; Z
Z Z l2
l1:
t3; t1; bp t3; dec t3; t3 t1
t3; t5; ?+11; t1 Z; Z ?+4; Z; 0 t3; t3 t5
t2; t5 Z; Z t2; Z
l2:
?+10; t2 Z; Z ?+3; Z Z 0
end_main:
?+8; sp ?+4; t5; 0 t5; inc sp
?+8; sp ?+4; t4; 0 t4; inc sp
?+8; sp ?+4; t3; 0 t3; inc sp
?+8; sp ?+4; t2; 0 t2; inc sp
?+8; sp ?+4; t1; 0 t1; inc sp
sp; bp sp
?+8; sp ?+4; bp; 0 bp; inc sp
?+8; sp ?+4; ?+7; 0 ?+3; Z Z 0
sqmain:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; ?+2 0 _main; . ?; inc sp
Z Z (-1)
. c6:0 c5:2 c2:49 c1:50 c3:l_main_a1 c4:l_main_a2
. t1:0 t2:0 t3:0 t4:0 t5:0
. inc:-1 Z:0 dec:1 ax:0 bp:0 sp:-sp
|
Root (mg_9_6.hsq:12)
Function:2 [main] (mg_9_6.hsq:1)
Keyword [void] (mg_9_6.hsq:1)
Param-type-list (mg_9_6.hsq:1)
Block (mg_9_6.hsq:2)
Keyword-statement [goto] (mg_9_6.hsq:3)
Label [a2] (mg_9_6.hsq:3) a2:7
Label-statement [a1] (mg_9_6.hsq:4)
OperatorIO [__out] (mg_9_6.hsq:5)
Const [50] (mg_9_6.hsq:5)
Keyword-statement [return] (mg_9_6.hsq:6)
Label-statement [a2] (mg_9_6.hsq:7)
OperatorIO [__out] (mg_9_6.hsq:8)
Const [49] (mg_9_6.hsq:8)
Declaration (mg_9_6.hsq:9)
Keyword [int] (mg_9_6.hsq:9)
Declarator [=] (mg_9_6.hsq:9)
Stackvar:1 [k1] (mg_9_6.hsq:9)
Label [a1] (mg_9_6.hsq:9) a1:4
Declarator [=] (mg_9_6.hsq:9)
Stackvar:2 [k2] (mg_9_6.hsq:9)
Label [a2] (mg_9_6.hsq:9) a2:7
Keyword-statement [goto] (mg_9_6.hsq:10)
Conditional [?] (mg_9_6.hsq:10)
Relational [>] (mg_9_6.hsq:10)
Additive [-] (mg_9_6.hsq:10)
Label [a1] (mg_9_6.hsq:10) a1:4
Label [a2] (mg_9_6.hsq:10) a2:7
Const [0] (mg_9_6.hsq:10)
Unary [*] (mg_9_6.hsq:10) k2:9
Additive [+] (mg_9_6.hsq:10) k2:9
Variable [@bp] (mg_9_6.hsq:10) k2:9
Const [2] (mg_9_6.hsq:10) k2:9
Unary [*] (mg_9_6.hsq:10) k1:9
Additive [+] (mg_9_6.hsq:10) k1:9
Variable [@bp] (mg_9_6.hsq:10) k1:9
Const [1] (mg_9_6.hsq:10) k1:9
|