aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/118 llvm ir and assembly/square-aarch64.S
blob: 02f1a1299cf272351232d3cec3e3f13d1e533296 (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
#include "symbol-underscore.h"

#ifdef _MSC_VER

    AREA _TEXT, ARM64, CODE, READONLY

    EXPORT SYMBOL_NAME(square_unsigned)
SYMBOL_NAME(square_unsigned) PROC
    mul x1, x0, x0
    mov x0, x1
    ret
SYMBOL_NAME(square_unsigned) ENDP

    END

#else

.text
.globl SYMBOL_NAME(square_unsigned)
# ifdef __linux__
.type square_unsigned, %function
#endif

SYMBOL_NAME(square_unsigned):
    mul x1, x0, x0
    mov x0, x1
    ret

#endif