qsym

A symbolic executor for the QBE intermediate language

git clone https://git.8pit.net/qsym.git

 1function w $callee(w %a) {
 2@start
 3        %a =w add 0, %a
 4        jnz %a, @end1, @end2
 5@end1
 6        %exit =w add 0, 1
 7        ret %a
 8@end2
 9        %exit =w add 0, 2
10        ret %a
11}
12
13function w $main(w %a) {
14@start
15        %b =w call $callee(w %a)
16        hlt
17}