blob: d50434115d97a297cf71a02b291e003f760a29c7 (
plain)
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
|
#include "symbol-underscore.h"
#if defined(_MSC_VER) && !defined(__clang__) /* MSVC on Windows */
PUBLIC SYMBOL_NAME(square_unsigned)
_TEXT SEGMENT
SYMBOL_NAME(square_unsigned) PROC
mov eax, ecx
imul eax, eax
ret
SYMBOL_NAME(square_unsigned) ENDP
_TEXT ENDS
END
#else
.text
.globl SYMBOL_NAME(square_unsigned)
/* Only supported with GAS */
# if defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__sun)
.type square_unsigned,@function
# endif
# if defined(_WIN32) || defined(__CYGWIN__) /* msabi */
SYMBOL_NAME(square_unsigned):
imull %ecx, %ecx
movl %ecx, %eax
retq
# else /* sysvabi */
SYMBOL_NAME(square_unsigned):
imull %edi, %edi
movl %edi, %eax
retq
# endif
#endif
|