-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg.dot
20 lines (18 loc) · 5.73 KB
/
cfg.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
digraph cfg {
graph [splines=ortho]
node [shape=plaintext fontname="monospace"]
"0"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">mov</td><td align="left">ecx, 48</td></tr><tr PORT="p1"><td align="left" width="100px">mov</td><td align="left">ebx, 48</td></tr><tr PORT="p2"><td align="left" width="100px">sub</td><td align="left">ebx, ecx</td></tr><tr PORT="p3"><td align="left" width="100px">push</td><td align="left">rbx</td></tr><tr PORT="p4"><td align="left" width="100px">push</td><td align="left">.done</td></tr><tr PORT="p5"><td align="left" width="100px">push</td><td align="left">rbp</td></tr><tr PORT="p6"><td align="left" width="100px">mov</td><td align="left">ebp, esp</td></tr><tr PORT="p7"><td align="left" width="100px">push</td><td align="left">rbx</td></tr><tr PORT="p8"><td align="left" width="100px">xor</td><td align="left">eax, eax</td></tr><tr PORT="p9"><td align="left" width="100px">mov</td><td align="left">ebx, [ebp+8]</td></tr><tr PORT="p10"><td align="left" width="100px">cmp</td><td align="left">ebx, 1</td></tr><tr PORT="p11"><td align="left" width="100px">jl</td><td align="left">.return</td></tr></table>>]
"1"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">mov</td><td align="left">eax, 1</td></tr><tr PORT="p1"><td align="left" width="100px">je</td><td align="left">.return</td></tr></table>>]
"2"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">dec</td><td align="left">ebx</td></tr><tr PORT="p1"><td align="left" width="100px">push</td><td align="left">rbx</td></tr><tr PORT="p2"><td align="left" width="100px">call</td><td align="left">.fib</td></tr><tr PORT="p3"><td align="left" width="100px">mov</td><td align="left">[esp], eax</td></tr><tr PORT="p4"><td align="left" width="100px">dec</td><td align="left">ebx</td></tr><tr PORT="p5"><td align="left" width="100px">push</td><td align="left">rbx</td></tr><tr PORT="p6"><td align="left" width="100px">call</td><td align="left">.fib</td></tr><tr PORT="p7"><td align="left" width="100px">add</td><td align="left">eax, [esp+4]</td></tr><tr PORT="p8"><td align="left" width="100px">add</td><td align="left">esp, 8</td></tr></table>>]
"3"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">pop</td><td align="left">rbx</td></tr><tr PORT="p1"><td align="left" width="100px">mov</td><td align="left">esp, ebp</td></tr><tr PORT="p2"><td align="left" width="100px">pop</td><td align="left">rbp</td></tr><tr PORT="p3"><td align="left" width="100px">ret</td><td align="left"></td></tr><tr PORT="p4"><td align="left" width="100px">mov</td><td align="left">[esp], ecx</td></tr><tr PORT="p5"><td align="left" width="100px">push</td><td align="left">rax</td></tr><tr PORT="p6"><td align="left" width="100px">call</td><td align="left">.print_num</td></tr><tr PORT="p7"><td align="left" width="100px">add</td><td align="left">esp, 4</td></tr><tr PORT="p8"><td align="left" width="100px">pop</td><td align="left">rcx</td></tr><tr PORT="p9"><td align="left" width="100px">loop</td><td align="left">.loop</td></tr><tr PORT="p10"><td align="left" width="100px">mov</td><td align="left">eax, 1</td></tr><tr PORT="p11"><td align="left" width="100px">xor</td><td align="left">ebx, ebx</td></tr><tr PORT="p12"><td align="left" width="100px">int</td><td align="left">128</td></tr><tr PORT="p13"><td align="left" width="100px">push</td><td align="left">rbp</td></tr><tr PORT="p14"><td align="left" width="100px">mov</td><td align="left">ebp, esp</td></tr><tr PORT="p15"><td align="left" width="100px">sub</td><td align="left">esp, 11</td></tr><tr PORT="p16"><td align="left" width="100px">lea</td><td align="left">ecx, [ebp-1]</td></tr><tr PORT="p17"><td align="left" width="100px">mov</td><td align="left">[ecx], 10</td></tr><tr PORT="p18"><td align="left" width="100px">mov</td><td align="left">eax, [ebp+8]</td></tr><tr PORT="p19"><td align="left" width="100px">mov</td><td align="left">ebx, 10</td></tr></table>>]
"4"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">dec</td><td align="left">ecx</td></tr><tr PORT="p1"><td align="left" width="100px">xor</td><td align="left">edx, edx</td></tr><tr PORT="p2"><td align="left" width="100px">div</td><td align="left">ebx</td></tr><tr PORT="p3"><td align="left" width="100px">add</td><td align="left">dx, 48</td></tr><tr PORT="p4"><td align="left" width="100px">mov</td><td align="left">[ecx], dx</td></tr><tr PORT="p5"><td align="left" width="100px">cmp</td><td align="left">eax, 0</td></tr><tr PORT="p6"><td align="left" width="100px">jg</td><td align="left">.loop2</td></tr></table>>]
"5"[label=<<table border="1" cellborder="0" cellspacing="0"><tr PORT="p0"><td align="left" width="100px">mov</td><td align="left">eax, 4</td></tr><tr PORT="p1"><td align="left" width="100px">mov</td><td align="left">ebx, 1</td></tr><tr PORT="p2"><td align="left" width="100px">mov</td><td align="left">edx, ebp</td></tr><tr PORT="p3"><td align="left" width="100px">sub</td><td align="left">edx, ecx</td></tr><tr PORT="p4"><td align="left" width="100px">int</td><td align="left">128</td></tr><tr PORT="p5"><td align="left" width="100px">mov</td><td align="left">esp, ebp</td></tr><tr PORT="p6"><td align="left" width="100px">pop</td><td align="left">rbp</td></tr><tr PORT="p7"><td align="left" width="100px">ret</td><td align="left"></td></tr></table>>]
"0":p11:s -> "3":p0:n [color="darkgreen"]
"0":s -> "1":n [color="red"]
"1":p1:s -> "3":p0:n [color="darkgreen"]
"1":s -> "2":n [color="red"]
"2":s -> "3":n [color="blue"]
"3":s -> "4":n [color="blue"]
"4":p6:s -> "4":p0:n [color="darkgreen"dir=back]
"4":s -> "5":n [color="red"]
}