Skip to content

Commit 0fc8fc7

Browse files
committed
[MC,test] Improve nesting macro test
9d94a4e added support for nested .macro . Mov the test to macro-nesting.s and add another test to test \+ and \@.
1 parent 747f7f3 commit 0fc8fc7

File tree

2 files changed

+45
-19
lines changed

2 files changed

+45
-19
lines changed

llvm/test/MC/AsmParser/macro-def-in-instantiation.s

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,3 @@
99
make_macro .macro,mybyte,a,.byte,\a,.endm
1010
# CHECK: .byte 42
1111
mybyte 42
12-
13-
# PR18599
14-
.macro macro_a
15-
.macro macro_b
16-
.byte 10
17-
.macro macro_c
18-
.endm
19-
20-
macro_c
21-
.purgem macro_c
22-
.endm
23-
24-
macro_b
25-
.endm
26-
27-
# CHECK: .byte 10
28-
# CHECK: .byte 10
29-
macro_a
30-
macro_b
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# RUN: llvm-mc -triple=x86_64 %s | FileCheck %s
2+
3+
# CHECK: .globl inside_at_0
4+
# CHECK-NEXT: .globl inside_plus_0
5+
# CHECK-NEXT: inside_at_0:
6+
# CHECK-NEXT: inside_plus_0:
7+
# CHECK-NEXT: .globl after_at_0
8+
# CHECK-NEXT: .globl after_plus_0
9+
# CHECK-NEXT: after_at_0:
10+
# CHECK-NEXT: after_plus_0:
11+
12+
.macro outer1
13+
.macro inner1
14+
.globl inside_at_\@
15+
.globl inside_plus_\+
16+
inside_at_\@:
17+
inside_plus_\+:
18+
.endm
19+
inner1
20+
.globl after_at_\@
21+
.globl after_plus_\+
22+
after_at_\@:
23+
after_plus_\+:
24+
.endm
25+
26+
outer1
27+
28+
# PR18599
29+
.macro macro_a
30+
.macro macro_b
31+
.byte 10
32+
.macro macro_c
33+
.endm
34+
35+
macro_c
36+
.purgem macro_c
37+
.endm
38+
39+
macro_b
40+
.endm
41+
42+
# CHECK: .byte 10
43+
# CHECK: .byte 10
44+
macro_a
45+
macro_b

0 commit comments

Comments
 (0)