Higher Subleq | Error | Output | Subleq | ITR |
int f(int a, int b, int c)
{
__out a+b-c;
}
int a=40, b=30;
void main()
{
f(a+b,a-b,b);
}
|
|
2
|
top:top top sqmain
_f:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; bp 0
bp; sp bp
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
t1; t2; bp t1; c1 t1; t1 t2
t1; t3; ?+11; t2 Z; Z ?+4; Z; 0 t1; t1 t3
t2; t1; bp t2; c2 t2; t2 t1
t2; t4; ?+11; t1 Z; Z ?+4; Z; 0 t2; t2 t4
t1; t2; t3 t1; t4 t1; t1 t2
t1; t4; bp t1; c3 t1; t1 t4
t1; t3; ?+11; t4 Z; Z ?+4; Z; 0 t1; t1 t3
t4; t2 Z; Z t4; Z; t3 t4
t4 (-1)
?+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
. _a:40 _b:30
_main:
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; bp 0
bp; sp bp
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
?+9; sp ?+5; _b Z; Z 0; Z
t1; _a Z; Z t1; Z; _b t1
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+9; sp ?+5; t1 Z; Z 0; Z
t1; t2; _a t1; _b t1; t1 t2
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+9; sp ?+5; t2 Z; Z 0; Z
dec sp; ?+11; sp ?+7; ?+6; sp ?+2; 0
?+6; sp ?+2; ?+2 0 _f; . ?;
c3 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)
. c1:-2 c2:-3 c3:-4
. t1:0 t2:0 t3:0 t4:0
. inc:-1 Z:0 dec:1 ax:0 bp:0 sp:-sp
|
Root (mg_20.hsq:11)
Function:0 [f] (mg_20.hsq:1)
Keyword [int] (mg_20.hsq:1)
Param-type-list (mg_20.hsq:1)
Stackvar:-2 [a] (mg_20.hsq:1)
Stackvar:-3 [b] (mg_20.hsq:1)
Stackvar:-4 [c] (mg_20.hsq:1)
Block (mg_20.hsq:2)
OperatorIO [__out] (mg_20.hsq:3)
Additive [-] (mg_20.hsq:3)
Additive [+] (mg_20.hsq:3)
Unary [*] (mg_20.hsq:3) a:1
Additive [+] (mg_20.hsq:3) a:1
Variable [@bp] (mg_20.hsq:3) a:1
Const [-2] (mg_20.hsq:3) a:1
Unary [*] (mg_20.hsq:3) b:1
Additive [+] (mg_20.hsq:3) b:1
Variable [@bp] (mg_20.hsq:3) b:1
Const [-3] (mg_20.hsq:3) b:1
Unary [*] (mg_20.hsq:3) c:1
Additive [+] (mg_20.hsq:3) c:1
Variable [@bp] (mg_20.hsq:3) c:1
Const [-4] (mg_20.hsq:3) c:1
Declaration (mg_20.hsq:6)
Keyword [int] (mg_20.hsq:6)
Declarator [=] (mg_20.hsq:6)
Id [a] (mg_20.hsq:6)
Const [40] (mg_20.hsq:6)
Declarator [=] (mg_20.hsq:6)
Id [b] (mg_20.hsq:6)
Const [30] (mg_20.hsq:6)
Function:0 [main] (mg_20.hsq:7)
Keyword [void] (mg_20.hsq:7)
Param-type-list (mg_20.hsq:7)
Block (mg_20.hsq:8)
Postfix [(] (mg_20.hsq:9)
Label [f] (mg_20.hsq:9) f:1
Expression-list (mg_20.hsq:9)
Additive [+] (mg_20.hsq:9)
Variable [a] (mg_20.hsq:9) =:6
Variable [b] (mg_20.hsq:9) =:6
Additive [-] (mg_20.hsq:9)
Variable [a] (mg_20.hsq:9) =:6
Variable [b] (mg_20.hsq:9) =:6
Variable [b] (mg_20.hsq:9) =:6
|