[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / arm64-directive_loh.s
blob654dc9e700672786c7086b0e032249d8e7e984c6
1 # RUN: not llvm-mc -triple arm64-apple-darwin < %s 2> %t | FileCheck %s
2 # RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
3 # RUN: not llvm-mc -triple aarch64-linux-gnu < %s 2>&1 | FileCheck --check-prefix=UNKNOWN %s
4 # RUN: not llvm-mc -triple aarch64-win32-gnu < %s 2>&1 | FileCheck --check-prefix=UNKNOWN %s
6 .globl _fct1
7 _fct1:
8 L1:
9 L2:
10 L3:
11 L4:
12 ret lr;
14 # Known LOHs with:
15 # - Regular syntax.
16 # - Alternative syntax.
18 # CHECK: .loh AdrpAdrp L1, L2
19 # CHECK: .loh AdrpAdrp L1, L2
20 # UNKNOWN: error: unknown directive
21 # UNKNOWN-NEXT: .loh AdrpAdrp L1, L2
22 .loh AdrpAdrp L1, L2
23 .loh 1 L1, L2
25 # CHECK: .loh AdrpLdr L1, L2
26 # CHECK: .loh AdrpLdr L1, L2
27 .loh AdrpLdr L1, L2
28 .loh 2 L1, L2
30 # CHECK: .loh AdrpAddLdr L1, L2, L3
31 # CHECK: .loh AdrpAddLdr L1, L2, L3
32 .loh AdrpAddLdr L1, L2, L3
33 .loh 3 L1, L2, L3
35 # CHECK: .loh AdrpLdrGotLdr L1, L2, L3
36 # CHECK: .loh AdrpLdrGotLdr L1, L2, L3
37 .loh AdrpLdrGotLdr L1, L2, L3
38 .loh 4 L1, L2, L3
40 # CHECK: .loh AdrpAddStr L1, L2, L3
41 # CHECK: .loh AdrpAddStr L1, L2, L3
42 .loh AdrpAddStr L1, L2, L3
43 .loh 5 L1, L2, L3
45 # CHECK: .loh AdrpLdrGotStr L1, L2, L3
46 # CHECK: .loh AdrpLdrGotStr L1, L2, L3
47 .loh AdrpLdrGotStr L1, L2, L3
48 .loh 6 L1, L2, L3
50 # CHECK: .loh AdrpAdd L1, L2
51 # CHECK: .loh AdrpAdd L1, L2
52 .loh AdrpAdd L1, L2
53 .loh 7 L1, L2
55 # CHECK: .loh AdrpLdrGot L1, L2
56 # CHECK: .loh AdrpLdrGot L1, L2
57 .loh AdrpLdrGot L1, L2
58 .loh 8 L1, L2
60 # End Known LOHs.
62 ### Errors Check ####
64 # Unknown textual identifier.
65 # CHECK-ERRORS: error: invalid identifier in directive
66 # CHECK-ERRORS-NEXT: .loh Unknown
67 # CHECK-ERRORS-NEXT: ^
68 .loh Unknown
69 # Unknown numeric identifier.
70 # CHECK-ERRORS: error: invalid numeric identifier in directive
71 # CHECK-ERRORS-NEXT: .loh 153, L1
72 # CHECK-ERRORS-NEXT: ^
73 .loh 153, L1
75 # Too much arguments.
76 # CHECK-ERRORS: error: unexpected token in '.loh' directive
77 # CHECK-ERRORS-NEXT: .loh AdrpAdrp L1, L2, L3
78 # CHECK-ERRORS-NEXT: ^
79 .loh AdrpAdrp L1, L2, L3
81 # Too much arguments with alternative syntax.
82 # CHECK-ERRORS: error: unexpected token in '.loh' directive
83 # CHECK-ERRORS-NEXT: .loh 1 L1, L2, L3
84 # CHECK-ERRORS-NEXT: ^
85 .loh 1 L1, L2, L3
87 # Too few argumets.
88 # CHECK-ERRORS: error: unexpected token in '.loh' directive
89 # CHECK-ERRORS-NEXT: .loh AdrpAdrp L1
90 # CHECK-ERRORS-NEXT: ^
91 .loh AdrpAdrp L1
93 # Too few argumets with alternative syntax.
94 # CHECK-ERRORS: error: unexpected token in '.loh' directive
95 # CHECK-ERRORS-NEXT: .loh 1 L1
96 # CHECK-ERRORS-NEXT: ^
97 .loh 1 L1