[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / AsmParser / macro-at-pseudo-variable.s
blobe1bb22980420964081b10bc828f5e12d1a981142
1 # RUN: rm -rf %t && split-file %s %t && cd %t
2 # RUN: llvm-mc -triple i386 a.s | FileCheck %s
3 # RUN: llvm-mc -triple i386 b.s | FileCheck %s --check-prefix=CHECK2
5 #--- a.s
6 .macro A
7 add $1\@, %eax
8 add $2\+, %eax
9 .endm
11 .macro B
12 sub $1\@, %eax
13 sub $2\+, %eax
14 .endm
17 # CHECK: addl $10, %eax
18 # CHECK-NEXT: addl $20, %eax
20 # CHECK: addl $11, %eax
21 # CHECK-NEXT: addl $21, %eax
23 # CHECK: subl $12, %eax
24 # CHECK-NEXT: subl $20, %eax
26 # CHECK: subl $13, %eax
27 # CHECK-NEXT: subl $21, %eax
29 # The following uses of \@ are undocumented, but valid:
30 .irpc foo,234
31 add $\foo\@, %eax
32 .endr
33 # CHECK: addl $24, %eax
34 # CHECK-NEXT: addl $34, %eax
35 # CHECK-NEXT: addl $44, %eax
37 .irp reg,%eax,%ebx
38 sub $2\@, \reg
39 .endr
40 # CHECK: subl $24, %eax
41 # CHECK-NEXT: subl $24, %ebx
43 # Test that .irp(c) and .rep(t) do not increase \@.
44 # Only the use of A should increase \@, so we can test that it increases by 1
45 # each time.
47 .irpc foo,123
48 sub $\foo, %eax
49 .endr
52 # CHECK: addl $14, %eax
54 .irp reg,%eax,%ebx
55 sub $4, \reg
56 .endr
59 # CHECK: addl $15, %eax
61 .rept 2
62 sub $5, %eax
63 .endr
66 # CHECK: addl $16, %eax
68 .rep 3
69 sub $6, %eax
70 .endr
73 # CHECK: addl $17, %eax
75 #--- b.s
76 .rept 2
77 .print "r\+ \+"
78 .endr
79 .irpc foo,12
80 .print "\+\+i"
81 .endr
82 # CHECK2: r0 0
83 # CHECK2-NEXT: r1 1
84 # CHECK2-NEXT: 00i
85 # CHECK2-NEXT: 11i
87 .rept 2
88 .rept 2
89 .print "n\+"
90 .endr
91 .endr
92 # CHECK2: n0
93 # CHECK2-NEXT: n0
94 # CHECK2-NEXT: n1
95 # CHECK2-NEXT: n1