[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AsmParser / macros-gas.s
blobb88058ec7feb08764857a09f7155f793a9d29335
1 // RUN: not llvm-mc -triple i386-linux-gnu %s 2> %t.err | FileCheck %s
2 // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
4 .macro .test0
5 .macrobody0
6 .endm
7 .macro .test1
8 .test0
9 .endm
11 .test1
12 // CHECK-ERRORS: <instantiation>:1:1: error: unknown directive
13 // CHECK-ERRORS-NEXT: macrobody0
14 // CHECK-ERRORS-NEXT: ^
15 // CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation
16 // CHECK-ERRORS-NEXT: .test0
17 // CHECK-ERRORS-NEXT: ^
18 // CHECK-ERRORS: 11:1: note: while in macro instantiation
19 // CHECK-ERRORS-NEXT: .test1
20 // CHECK-ERRORS-NEXT: ^
22 .macro test2 _a
23 .byte \_a
24 .endm
25 // CHECK: .byte 10
26 test2 10
28 .macro test3 _a _b _c
29 .ascii "\_a \_b \_c \\_c"
30 .endm
32 // CHECK: .ascii "1 2 3 \003"
33 test3 1, 2, 3
35 // CHECK: .ascii "1 2 3 \003"
36 test3 1, 2 3
38 .macro test3_prime _a _b _c
39 .ascii "\_a \_b \_c"
40 .endm
42 // CHECK: .ascii "1 (2 3) "
43 test3_prime 1, (2 3)
45 // CHECK: .ascii "1 (2 3) "
46 test3_prime 1 (2 3)
48 // CHECK: .ascii "1 2 "
49 test3_prime 1 2
51 .macro test5 _a
52 .globl \_a
53 .endm
55 // CHECK: .globl zed1
56 test5 zed1
58 .macro test6 $a
59 .globl \$a
60 .endm
62 // CHECK: .globl zed2
63 test6 zed2
65 .macro test7 .a
66 .globl \.a
67 .endm
69 // CHECK: .globl zed3
70 test7 zed3
72 .macro test8 _a, _b, _c
73 .ascii "\_a,\_b,\_c"
74 .endm
76 .macro test9 _a _b _c
77 .ascii "\_a \_b \_c"
78 .endm
80 // CHECK: .ascii "a,b,c"
81 test8 a, b, c
82 // CHECK: .ascii "%1,%2,%3"
83 test8 %1 %2 %3 #a comment
84 // CHECK: .ascii "x-y,z,1"
85 test8 x - y z 1
86 // CHECK: .ascii "1 2 3"
87 test9 1, 2,3
89 // CHECK: .ascii "1,2,3"
90 test8 1,2 3
92 // CHECK: .ascii "1,2,3"
93 test8 1 2, 3
95 .macro test10
96 .ascii "$20"
97 .endm
99 test10
100 // CHECK: .ascii "$20"
102 test10 42
103 // CHECK-ERRORS: 102:10: error: Wrong number of arguments
104 // CHECK-ERRORS-NEXT: test10 42
105 // CHECK-ERRORS-NEXT: ^