[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / AsmParser / macro-arg.s
blob19065402309eccd0f06d7f7a896bb8c12e2ba6b5
1 # RUN: llvm-mc -triple=x86_64 %s | FileCheck %s
3 .macro empty, cond
4 .endm
5 empty ne
7 # CHECK: .ascii "3 \003"
8 .macro escape a
9 .ascii "\a \\a"
10 .endm
11 escape 3
13 .macro double first = -1, second = -1
14 .long \first
15 .long \second
16 .endm
18 # CHECK: .long -1
19 # CHECK-NEXT: .long -1
20 double
21 # CHECK-NEXT: .long -1
22 # CHECK-NEXT: .long -1
23 double ,
24 # CHECK-NEXT: .long 1
25 # CHECK-NEXT: .long -1
26 double 1
27 # CHECK: .long 2
28 # CHECK-NEXT: .long 3
29 double 2, 3
30 # CHECK: .long -1
31 # CHECK-NEXT: .long 4
32 double , 4
33 # CHECK: .long 5
34 # CHECK-NEXT: .long 6
35 double 5, second = 6
36 # CHECK: .long 7
37 # CHECK-NEXT: .long -1
38 double first = 7
39 # CHECK: .long -1
40 # CHECK-NEXT: .long 8
41 double second = 8
42 # CHECK: .long 10
43 # CHECK-NEXT: .long 9
44 double second = 9, first = 10
45 # CHECK: .long second+11
46 # CHECK-NEXT: .long -1
47 double second + 11
48 # CHECK: .long -1
49 # CHECK-NEXT: .long second+12
50 double , second + 12
51 # CHECK: .long second
52 # CHECK-NEXT: .long -1
53 double second
55 .macro mixed arg0 = 0, arg1 = 1 arg2 = 2, arg3 = 3
56 .long \arg0
57 .long \arg1
58 .long \arg2
59 .long \arg3
60 .endm
62 # CHECK: .long 1
63 # CHECK-NEXT: .long 2
64 # CHECK-NEXT: .long 3
65 # CHECK-NEXT: .long 3
66 mixed 1, 2 3
68 # CHECK: .long 1
69 # CHECK-NEXT: .long 2
70 # CHECK-NEXT: .long 3
71 # CHECK-NEXT: .long 3
72 mixed 1 2, 3
74 # CHECK: .long 1
75 # CHECK-NEXT: .long 2
76 # CHECK-NEXT: .long 3
77 # CHECK-NEXT: .long 4
78 mixed 1 2, 3 4
80 .macro ascii3 _a _b _c
81 .ascii "\_a|\_b|\_c"
82 .endm
84 ## 3 arguments.
85 # CHECK: .ascii "a|b|c"
86 ascii3 a, b, c
87 # CHECK: .ascii "%1|%2|%3"
88 ascii3 %1 %2 %3
89 # CHECK: .ascii "1|2|3"
90 ascii3 1, 2,3
91 # CHECK: .ascii "1|2|3"
92 ascii3 1,2 3
93 # CHECK: .ascii "1|2|3"
94 ascii3 1 2, 3
95 # CHECK: .ascii "x-y|z|1"
96 ascii3 x - y z 1
98 ## 2 arguments.
99 # CHECK: .ascii "1|(2 3)|"
100 ascii3 1, (2 3)
101 # CHECK: .ascii "1|(2 3)|"
102 ascii3 1 (2 3)