arm64-directive_loh.s
2.44 KB
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
94
95
96
97
# RUN: not llvm-mc -triple arm64-apple-darwin < %s 2> %t | FileCheck %s
# RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
# RUN: not llvm-mc -triple aarch64-linux-gnu < %s 2>&1 | FileCheck --check-prefix=UNKNOWN %s
# RUN: not llvm-mc -triple aarch64-win32-gnu < %s 2>&1 | FileCheck --check-prefix=UNKNOWN %s
.globl _fct1
_fct1:
L1:
L2:
L3:
L4:
ret lr;
# Known LOHs with:
# - Regular syntax.
# - Alternative syntax.
# CHECK: .loh AdrpAdrp L1, L2
# CHECK: .loh AdrpAdrp L1, L2
# UNKNOWN: error: unknown directive
# UNKNOWN-NEXT: .loh AdrpAdrp L1, L2
.loh AdrpAdrp L1, L2
.loh 1 L1, L2
# CHECK: .loh AdrpLdr L1, L2
# CHECK: .loh AdrpLdr L1, L2
.loh AdrpLdr L1, L2
.loh 2 L1, L2
# CHECK: .loh AdrpAddLdr L1, L2, L3
# CHECK: .loh AdrpAddLdr L1, L2, L3
.loh AdrpAddLdr L1, L2, L3
.loh 3 L1, L2, L3
# CHECK: .loh AdrpLdrGotLdr L1, L2, L3
# CHECK: .loh AdrpLdrGotLdr L1, L2, L3
.loh AdrpLdrGotLdr L1, L2, L3
.loh 4 L1, L2, L3
# CHECK: .loh AdrpAddStr L1, L2, L3
# CHECK: .loh AdrpAddStr L1, L2, L3
.loh AdrpAddStr L1, L2, L3
.loh 5 L1, L2, L3
# CHECK: .loh AdrpLdrGotStr L1, L2, L3
# CHECK: .loh AdrpLdrGotStr L1, L2, L3
.loh AdrpLdrGotStr L1, L2, L3
.loh 6 L1, L2, L3
# CHECK: .loh AdrpAdd L1, L2
# CHECK: .loh AdrpAdd L1, L2
.loh AdrpAdd L1, L2
.loh 7 L1, L2
# CHECK: .loh AdrpLdrGot L1, L2
# CHECK: .loh AdrpLdrGot L1, L2
.loh AdrpLdrGot L1, L2
.loh 8 L1, L2
# End Known LOHs.
### Errors Check ####
# Unknown textual identifier.
# CHECK-ERRORS: error: invalid identifier in directive
# CHECK-ERRORS-NEXT: .loh Unknown
# CHECK-ERRORS-NEXT: ^
.loh Unknown
# Unknown numeric identifier.
# CHECK-ERRORS: error: invalid numeric identifier in directive
# CHECK-ERRORS-NEXT: .loh 153, L1
# CHECK-ERRORS-NEXT: ^
.loh 153, L1
# Too much arguments.
# CHECK-ERRORS: error: unexpected token in '.loh' directive
# CHECK-ERRORS-NEXT: .loh AdrpAdrp L1, L2, L3
# CHECK-ERRORS-NEXT: ^
.loh AdrpAdrp L1, L2, L3
# Too much arguments with alternative syntax.
# CHECK-ERRORS: error: unexpected token in '.loh' directive
# CHECK-ERRORS-NEXT: .loh 1 L1, L2, L3
# CHECK-ERRORS-NEXT: ^
.loh 1 L1, L2, L3
# Too few arguments.
# CHECK-ERRORS: error: unexpected token in '.loh' directive
# CHECK-ERRORS-NEXT: .loh AdrpAdrp L1
# CHECK-ERRORS-NEXT: ^
.loh AdrpAdrp L1
# Too few arguments with alternative syntax.
# CHECK-ERRORS: error: unexpected token in '.loh' directive
# CHECK-ERRORS-NEXT: .loh 1 L1
# CHECK-ERRORS-NEXT: ^
.loh 1 L1