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 5 6.globl _fct1 7_fct1: 8 L1: 9 L2: 10 L3: 11 L4: 12 ret lr; 13 14# Known LOHs with: 15# - Regular syntax. 16# - Alternative syntax. 17 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 24 25# CHECK: .loh AdrpLdr L1, L2 26# CHECK: .loh AdrpLdr L1, L2 27.loh AdrpLdr L1, L2 28.loh 2 L1, L2 29 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 34 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 39 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 44 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 49 50# CHECK: .loh AdrpAdd L1, L2 51# CHECK: .loh AdrpAdd L1, L2 52.loh AdrpAdd L1, L2 53.loh 7 L1, L2 54 55# CHECK: .loh AdrpLdrGot L1, L2 56# CHECK: .loh AdrpLdrGot L1, L2 57.loh AdrpLdrGot L1, L2 58.loh 8 L1, L2 59 60# End Known LOHs. 61 62### Errors Check #### 63 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 74 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 80 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 86 87# Too few arguments. 88# CHECK-ERRORS: error: unexpected token in '.loh' directive 89# CHECK-ERRORS-NEXT: .loh AdrpAdrp L1 90# CHECK-ERRORS-NEXT: ^ 91.loh AdrpAdrp L1 92 93# Too few arguments 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 98