forked from aaronbloomfield/pdr
-
Notifications
You must be signed in to change notification settings - Fork 228
/
test_abs_c.s.html
93 lines (87 loc) · 13.3 KB
/
test_abs_c.s.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>test_abs_c.s</title>
</head>
<body style="background-color:white">
<pre><b><span style="color:#000080"> .text</span></b>
<b><span style="color:#000080"> .intel</span></b>_syntax noprefix
<b><span style="color:#000080"> .file</span></b> <span style="color:#FF0000">"test_abs_c.c"</span>
<b><span style="color:#000080"> .globl</span></b> absolute_value
<b><span style="color:#000080"> .align</span></b> <span style="color:#993399">16</span><span style="color:#990000">,</span> <span style="color:#993399">0x90</span>
<b><span style="color:#000080"> .type</span></b> absolute_value<span style="color:#990000">,</span>@function
absolute_value<span style="color:#990000">:</span> # @absolute_value
<b><span style="color:#000080"> .cfi</span></b>_startproc
# BB#<span style="color:#993399">0</span><span style="color:#990000">:</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">-</span> <span style="color:#993399">8</span><span style="color:#990000">],</span> rdi
<b><span style="color:#0000FF">cmp</span></b> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">-</span> <span style="color:#993399">8</span><span style="color:#990000">],</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">jge</span></b> <span style="color:#990000">.</span>LBB<span style="color:#993399">0_2</span>
# BB#<span style="color:#993399">1</span><span style="color:#990000">:</span>
<b><span style="color:#0000FF">xor</span></b> <span style="color:#009900">eax</span><span style="color:#990000">,</span> <span style="color:#009900">eax</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">ecx</span><span style="color:#990000">,</span> <span style="color:#009900">eax</span>
<b><span style="color:#0000FF">sub</span></b> rcx<span style="color:#990000">,</span> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">-</span> <span style="color:#993399">8</span><span style="color:#990000">]</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">-</span> <span style="color:#993399">8</span><span style="color:#990000">],</span> rcx
<b><span style="color:#000080">.LBB0</span></b><span style="color:#993399">_2</span><span style="color:#990000">:</span>
<b><span style="color:#0000FF">mov</span></b> rax<span style="color:#990000">,</span> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">-</span> <span style="color:#993399">8</span><span style="color:#990000">]</span>
<b><span style="color:#0000FF">ret</span></b>
<b><span style="color:#000080">.Lfunc</span></b>_end<span style="color:#993399">0</span><span style="color:#990000">:</span>
<b><span style="color:#000080"> .size</span></b> absolute_value<span style="color:#990000">,</span> <span style="color:#990000">.</span>Lfunc_end<span style="color:#993399">0</span><span style="color:#990000">-</span>absolute_value
<b><span style="color:#000080"> .cfi</span></b>_endproc
<b><span style="color:#000080"> .globl</span></b> main
<b><span style="color:#000080"> .align</span></b> <span style="color:#993399">16</span><span style="color:#990000">,</span> <span style="color:#993399">0x90</span>
<b><span style="color:#000080"> .type</span></b> main<span style="color:#990000">,</span>@function
<b><span style="color:#000080">main:</span></b> # @main
<b><span style="color:#000080"> .cfi</span></b>_startproc
# BB#<span style="color:#993399">0</span><span style="color:#990000">:</span>
<b><span style="color:#0000FF">sub</span></b> rsp<span style="color:#990000">,</span> <span style="color:#993399">40</span>
<b><span style="color:#000080">.Ltmp0</span></b><span style="color:#990000">:</span>
<b><span style="color:#000080"> .cfi</span></b>_def_cfa_offset <span style="color:#993399">48</span>
movabs rdi<span style="color:#990000">,</span> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">dword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">36</span><span style="color:#990000">],</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">24</span><span style="color:#990000">],</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">al</span><span style="color:#990000">,</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">call</span></b> printf
movabs rdi<span style="color:#990000">,</span> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.1</span>
<b><span style="color:#0000FF">lea</span></b> rsi<span style="color:#990000">,</span> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">24</span><span style="color:#990000">]</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">dword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">12</span><span style="color:#990000">],</span> <span style="color:#009900">eax</span> # <span style="color:#993399">4</span><span style="color:#990000">-</span><span style="color:#009900">byte</span> Spill
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">al</span><span style="color:#990000">,</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">call</span></b> __isoc<span style="color:#993399">99</span>_scanf
<b><span style="color:#0000FF">mov</span></b> rdi<span style="color:#990000">,</span> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">24</span><span style="color:#990000">]</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">dword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">8</span><span style="color:#990000">],</span> <span style="color:#009900">eax</span> # <span style="color:#993399">4</span><span style="color:#990000">-</span><span style="color:#009900">byte</span> Spill
<b><span style="color:#0000FF">call</span></b> absolute_value
movabs rdi<span style="color:#990000">,</span> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.2</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">16</span><span style="color:#990000">],</span> rax
<b><span style="color:#0000FF">mov</span></b> rsi<span style="color:#990000">,</span> <span style="color:#009900">qword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">16</span><span style="color:#990000">]</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">al</span><span style="color:#990000">,</span> <span style="color:#993399">0</span>
<b><span style="color:#0000FF">call</span></b> printf
<b><span style="color:#0000FF">xor</span></b> <span style="color:#009900">ecx</span><span style="color:#990000">,</span> <span style="color:#009900">ecx</span>
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">dword</span> <b><span style="color:#0000FF">ptr</span></b> <span style="color:#990000">[</span>rsp <span style="color:#990000">+</span> <span style="color:#993399">4</span><span style="color:#990000">],</span> <span style="color:#009900">eax</span> # <span style="color:#993399">4</span><span style="color:#990000">-</span><span style="color:#009900">byte</span> Spill
<b><span style="color:#0000FF">mov</span></b> <span style="color:#009900">eax</span><span style="color:#990000">,</span> <span style="color:#009900">ecx</span>
<b><span style="color:#0000FF">add</span></b> rsp<span style="color:#990000">,</span> <span style="color:#993399">40</span>
<b><span style="color:#0000FF">ret</span></b>
<b><span style="color:#000080">.Lfunc</span></b>_end<span style="color:#993399">1</span><span style="color:#990000">:</span>
<b><span style="color:#000080"> .size</span></b> main<span style="color:#990000">,</span> <span style="color:#990000">.</span>Lfunc_end<span style="color:#993399">1</span><span style="color:#990000">-</span>main
<b><span style="color:#000080"> .cfi</span></b>_endproc
<b><span style="color:#000080"> .type</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#990000">,</span>@object # @<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b>
<b><span style="color:#000080"> .section</span></b> <span style="color:#990000">.</span>rodata<span style="color:#990000">.</span>str<span style="color:#993399">1.1</span><span style="color:#990000">,</span><span style="color:#FF0000">"aMS"</span><span style="color:#990000">,</span>@progbits<span style="color:#990000">,</span><span style="color:#993399">1</span>
<b><span style="color:#000080">.L</span></b><span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#990000">:</span>
<b><span style="color:#000080"> .asciz</span></b> <span style="color:#FF0000">"Enter a value: </span><span style="color:#CC33CC">\n</span><span style="color:#FF0000">"</span>
<b><span style="color:#000080"> .size</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#990000">,</span> <span style="color:#993399">17</span>
<b><span style="color:#000080"> .type</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.1</span><span style="color:#990000">,</span>@object # @<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.1</span>
<b><span style="color:#000080">.L</span></b><span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.1</span><span style="color:#990000">:</span>
<b><span style="color:#000080"> .asciz</span></b> <span style="color:#FF0000">"%ld"</span>
<b><span style="color:#000080"> .size</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.1</span><span style="color:#990000">,</span> <span style="color:#993399">4</span>
<b><span style="color:#000080"> .type</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.2</span><span style="color:#990000">,</span>@object # @<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.2</span>
<b><span style="color:#000080">.L</span></b><span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.2</span><span style="color:#990000">:</span>
<b><span style="color:#000080"> .asciz</span></b> <span style="color:#FF0000">"The result is: %ld</span><span style="color:#CC33CC">\n</span><span style="color:#FF0000">"</span>
<b><span style="color:#000080"> .size</span></b> <span style="color:#990000">.</span>L<span style="color:#990000">.</span><b><span style="color:#0000FF">str</span></b><span style="color:#993399">.2</span><span style="color:#990000">,</span> <span style="color:#993399">20</span>
<b><span style="color:#000080"> .ident</span></b> <span style="color:#FF0000">"clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)"</span>
<b><span style="color:#000080"> .section</span></b> <span style="color:#FF0000">".note.GNU-stack"</span><span style="color:#990000">,</span><span style="color:#FF0000">""</span><span style="color:#990000">,</span>@progbits
</pre>
</body>
</html>