Debian Codegraph @

test cases/common/118 llvm ir and assembly/square-x86_64.S

raw
1 #include "symbol-underscore.h"
2
3 #ifdef _MSC_VER /* MSVC on Windows */
4
5 PUBLIC SYMBOL_NAME(square_unsigned)
6 _TEXT SEGMENT
7
8 SYMBOL_NAME(square_unsigned) PROC
9 mov eax, ecx
10 imul eax, eax
11 ret
12 SYMBOL_NAME(square_unsigned) ENDP
13
14 _TEXT ENDS
15 END
16
17 #else
18
19 .text
20 .globl SYMBOL_NAME(square_unsigned)
21 # ifdef __linux__
22 .type square_unsigned, %function
23 #endif
24
25 # if defined(_WIN32) || defined(__CYGWIN__) /* msabi */
26 SYMBOL_NAME(square_unsigned):
27 imull %ecx, %ecx
28 movl %ecx, %eax
29 retq
30 # else /* sysvabi */
31 SYMBOL_NAME(square_unsigned):
32 imull %edi, %edi
33 movl %edi, %eax
34 retq
35 # endif
36
37 #endif