1 # RUN: not llvm-mc -triple arm64-apple-darwin < %s 2> %t | FileCheck %s 2 # RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s 3 4 .globl _fct1 5 _fct1: 6 L1: 7 L2: 8 L3: 9 L4: 10 ret lr; 11 12 # Known LOHs with: 13 # - Regular syntax. 14 # - Alternative syntax. 15 16 # CHECK: .loh AdrpAdrp L1, L2 17 # CHECK: .loh AdrpAdrp L1, L2 18 .loh AdrpAdrp L1, L2 19 .loh 1 L1, L2 20 21 # CHECK: .loh AdrpLdr L1, L2 22 # CHECK: .loh AdrpLdr L1, L2 23 .loh AdrpLdr L1, L2 24 .loh 2 L1, L2 25 26 # CHECK: .loh AdrpAddLdr L1, L2, L3 27 # CHECK: .loh AdrpAddLdr L1, L2, L3 28 .loh AdrpAddLdr L1, L2, L3 29 .loh 3 L1, L2, L3 30 31 # CHECK: .loh AdrpLdrGotLdr L1, L2, L3 32 # CHECK: .loh AdrpLdrGotLdr L1, L2, L3 33 .loh AdrpLdrGotLdr L1, L2, L3 34 .loh 4 L1, L2, L3 35 36 # CHECK: .loh AdrpAddStr L1, L2, L3 37 # CHECK: .loh AdrpAddStr L1, L2, L3 38 .loh AdrpAddStr L1, L2, L3 39 .loh 5 L1, L2, L3 40 41 # CHECK: .loh AdrpLdrGotStr L1, L2, L3 42 # CHECK: .loh AdrpLdrGotStr L1, L2, L3 43 .loh AdrpLdrGotStr L1, L2, L3 44 .loh 6 L1, L2, L3 45 46 # CHECK: .loh AdrpAdd L1, L2 47 # CHECK: .loh AdrpAdd L1, L2 48 .loh AdrpAdd L1, L2 49 .loh 7 L1, L2 50 51 # CHECK: .loh AdrpLdrGot L1, L2 52 # CHECK: .loh AdrpLdrGot L1, L2 53 .loh AdrpLdrGot L1, L2 54 .loh 8 L1, L2 55 56 # End Known LOHs. 57 58 ### Errors Check #### 59 60 # Unknown textual identifier. 61 # CHECK-ERRORS: error: invalid identifier in directive 62 # CHECK-ERRORS-NEXT: .loh Unknown 63 # CHECK-ERRORS-NEXT: ^ 64 .loh Unknown 65 # Unknown numeric identifier. 66 # CHECK-ERRORS: error: invalid numeric identifier in directive 67 # CHECK-ERRORS-NEXT: .loh 153, L1 68 # CHECK-ERRORS-NEXT: ^ 69 .loh 153, L1 70 71 # Too much arguments. 72 # CHECK-ERRORS: error: unexpected token in '.loh' directive 73 # CHECK-ERRORS-NEXT: .loh AdrpAdrp L1, L2, L3 74 # CHECK-ERRORS-NEXT: ^ 75 .loh AdrpAdrp L1, L2, L3 76 77 # Too much arguments with alternative syntax. 78 # CHECK-ERRORS: error: unexpected token in '.loh' directive 79 # CHECK-ERRORS-NEXT: .loh 1 L1, L2, L3 80 # CHECK-ERRORS-NEXT: ^ 81 .loh 1 L1, L2, L3 82 83 # Too few argumets. 84 # CHECK-ERRORS: error: unexpected token in '.loh' directive 85 # CHECK-ERRORS-NEXT: .loh AdrpAdrp L1 86 # CHECK-ERRORS-NEXT: ^ 87 .loh AdrpAdrp L1 88 89 # Too few argumets with alternative syntax. 90 # CHECK-ERRORS: error: unexpected token in '.loh' directive 91 # CHECK-ERRORS-NEXT: .loh 1 L1 92 # CHECK-ERRORS-NEXT: ^ 93 .loh 1 L1 94