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 3 4Lstart: 5 .space 8 6Lend: 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: ^ 15 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: ^ 24 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: ^ 33 34 .space 5000 35Lfar: 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: ^ 44 45Lprivate1: 46 .space 8 47notprivate: 48 .space 8 49Lprivate2: 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: ^ 58 59 .section __TEXT, sec_y, regular, pure_instructions 60Lend_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: ^ 69