forked from markfloryan/pdr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_abs_c.s.html
93 lines (87 loc) · 2.73 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 PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>test_abs_c.s</title>
</head>
<body bgcolor="white">
<pre><tt> .text
.intel_syntax noprefix
.file <font color="#FF0000">"test_abs_c.c"</font>
.globl absolute_value
.align 16, 0x90
.type absolute_value,@function
absolute_value: <i><font color="#9A1900"># @absolute_value</font></i>
.cfi_startproc
<i><font color="#9A1900"># BB#0:</font></i>
mov qword ptr [rsp - 8], rdi
cmp qword ptr [rsp - 8], 0
jge .LBB0_2
<i><font color="#9A1900"># BB#1:</font></i>
xor eax, eax
mov ecx, eax
sub rcx, qword ptr [rsp - 8]
mov qword ptr [rsp - 8], rcx
.LBB0_2:
mov rax, qword ptr [rsp - 8]
ret
.Lfunc_end0:
.size absolute_value, .Lfunc_end0-absolute_value
.cfi_endproc
.globl main
.align 16, 0x90
.type main,@function
main: <i><font color="#9A1900"># @main</font></i>
.cfi_startproc
<i><font color="#9A1900"># BB#0:</font></i>
sub rsp, 40
.Ltmp0:
.cfi_def_cfa_offset 48
movabs rdi, .L.str
mov dword ptr [rsp + 36], 0
mov qword ptr [rsp + 24], 0
mov al, 0
call printf
movabs rdi, .L.str.1
lea rsi, [rsp + 24]
mov dword ptr [rsp + 12], eax <i><font color="#9A1900"># 4-byte Spill</font></i>
mov al, 0
call __isoc99_scanf
mov rdi, qword ptr [rsp + 24]
mov dword ptr [rsp + 8], eax <i><font color="#9A1900"># 4-byte Spill</font></i>
call absolute_value
movabs rdi, .L.str.2
mov qword ptr [rsp + 16], rax
mov rsi, qword ptr [rsp + 16]
mov al, 0
call printf
xor ecx, ecx
mov dword ptr [rsp + 4], eax <i><font color="#9A1900"># 4-byte Spill</font></i>
mov eax, ecx
add rsp, 40
ret
.Lfunc_end1:
.size main, .Lfunc_end1-main
.cfi_endproc
.type .L.str,@object <i><font color="#9A1900"># @.str</font></i>
.section .rodata.str1.1,<font color="#FF0000">"aMS"</font>,@progbits,1
.L.str:
.asciz <font color="#FF0000">"Enter a value: </font><font color="#CC33CC">\n</font><font color="#FF0000">"</font>
.size .L.str, 17
.type .L.str.1,@object <i><font color="#9A1900"># @.str.1</font></i>
.L.str.1:
.asciz <font color="#FF0000">"%ld"</font>
.size .L.str.1, 4
.type .L.str.2,@object <i><font color="#9A1900"># @.str.2</font></i>
.L.str.2:
.asciz <font color="#FF0000">"The result is: %ld</font><font color="#CC33CC">\n</font><font color="#FF0000">"</font>
.size .L.str.2, 20
.ident <font color="#FF0000">"clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)"</font>
.section <font color="#FF0000">".note.GNU-stack"</font>,<font color="#FF0000">""</font>,@progbits
</tt></pre>
</body>
</html>