The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
623 B
38 lines
623 B
8 years ago
|
#include "symbol-underscore.h"
|
||
|
|
||
8 years ago
|
#ifdef _MSC_VER /* MSVC on Windows */
|
||
|
|
||
|
PUBLIC SYMBOL_NAME(square_unsigned)
|
||
|
_TEXT SEGMENT
|
||
|
|
||
|
SYMBOL_NAME(square_unsigned) PROC
|
||
|
mov eax, ecx
|
||
6 years ago
|
imul eax, eax
|
||
|
ret
|
||
8 years ago
|
SYMBOL_NAME(square_unsigned) ENDP
|
||
|
|
||
|
_TEXT ENDS
|
||
|
END
|
||
|
|
||
|
#else
|
||
|
|
||
8 years ago
|
.text
|
||
|
.globl SYMBOL_NAME(square_unsigned)
|
||
7 years ago
|
# ifdef __linux__
|
||
|
.type square_unsigned, %function
|
||
|
#endif
|
||
8 years ago
|
|
||
8 years ago
|
# if defined(_WIN32) || defined(__CYGWIN__) /* msabi */
|
||
8 years ago
|
SYMBOL_NAME(square_unsigned):
|
||
6 years ago
|
imull %ecx, %ecx
|
||
|
movl %ecx, %eax
|
||
|
retq
|
||
8 years ago
|
# else /* sysvabi */
|
||
8 years ago
|
SYMBOL_NAME(square_unsigned):
|
||
6 years ago
|
imull %edi, %edi
|
||
|
movl %edi, %eax
|
||
|
retq
|
||
8 years ago
|
# endif
|
||
|
|
||
|
#endif
|