[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / label-arithmetic-diags-darwin.s
blobe32db7c125bb4831df36fba4bf9add1a9c852953
1 // RUN: not llvm-mc -triple aarch64-darwin -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s
2 // RUN: not llvm-mc -triple aarch64-ios -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s
4 Lstart:
5 .space 8
6 Lend:
7 add w0, w1, #(Lend - external)
8 cmp w0, #(Lend - external)
9 // CHECK: error: unknown AArch64 fixup kind!
10 // CHECK-NEXT: add w0, w1, #(Lend - external)
11 // CHECK-NEXT: ^
12 // CHECK: error: unknown AArch64 fixup kind!
13 // CHECK-NEXT: cmp w0, #(Lend - external)
14 // CHECK-NEXT: ^
16 add w0, w1, #(Lend - var@TLVPPAGEOFF)
17 cmp w0, #(Lend - var@TLVPPAGEOFF)
18 // CHECK: error: unsupported subtraction of qualified symbol
19 // CHECK-NEXT: add w0, w1, #(Lend - var@TLVPPAGEOFF)
20 // CHECK-NEXT: ^
21 // CHECK: error: unsupported subtraction of qualified symbol
22 // CHECK-NEXT: cmp w0, #(Lend - var@TLVPPAGEOFF)
23 // CHECK-NEXT: ^
25 add w0, w1, #(Lstart - Lend)
26 cmp w0, #(Lstart - Lend)
27 // CHECK: error: fixup value out of range
28 // CHECK-NEXT: add w0, w1, #(Lstart - Lend)
29 // CHECK-NEXT: ^
30 // CHECK: error: fixup value out of range
31 // CHECK-NEXT: cmp w0, #(Lstart - Lend)
32 // CHECK-NEXT: ^
34 .space 5000
35 Lfar:
36 add w0, w1, #(Lfar - Lend)
37 cmp w0, #(Lfar - Lend)
38 // CHECK: error: fixup value out of range
39 // CHECK-NEXT: add w0, w1, #(Lfar - Lend)
40 // CHECK-NEXT: ^
41 // CHECK: error: fixup value out of range
42 // CHECK-NEXT: cmp w0, #(Lfar - Lend)
43 // CHECK-NEXT: ^
45 Lprivate1:
46 .space 8
47 notprivate:
48 .space 8
49 Lprivate2:
50 add w0, w1, #(Lprivate2 - Lprivate1)
51 cmp w0, #(Lprivate2 - Lprivate1)
52 // CHECK: error: unknown AArch64 fixup kind!
53 // CHECK-NEXT: add w0, w1, #(Lprivate2 - Lprivate1)
54 // CHECK-NEXT: ^
55 // CHECK: error: unknown AArch64 fixup kind!
56 // CHECK-NEXT: cmp w0, #(Lprivate2 - Lprivate1)
57 // CHECK-NEXT: ^
59 .section __TEXT, sec_y, regular, pure_instructions
60 Lend_across_sec:
61 add w0, w1, #(Lend_across_sec - Lprivate2)
62 cmp w0, #(Lend_across_sec - Lprivate2)
63 // CHECK: error: unknown AArch64 fixup kind!
64 // CHECK-NEXT: add w0, w1, #(Lend_across_sec - Lprivate2)
65 // CHECK-NEXT: ^
66 // CHECK: error: unknown AArch64 fixup kind!
67 // CHECK-NEXT: cmp w0, #(Lend_across_sec - Lprivate2)
68 // CHECK-NEXT: ^