summaryrefslogtreecommitdiffstats
path: root/test/MC/AsmParser/macro-args.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/AsmParser/macro-args.s')
-rw-r--r--test/MC/AsmParser/macro-args.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/MC/AsmParser/macro-args.s b/test/MC/AsmParser/macro-args.s
index 4b87899..13b197a 100644
--- a/test/MC/AsmParser/macro-args.s
+++ b/test/MC/AsmParser/macro-args.s
@@ -18,3 +18,27 @@ bar
// CHECK: .long 3
// CHECK: .long 0
+
+
+.macro top
+ middle _$0, $1
+.endm
+.macro middle
+ $0:
+ .if $n > 1
+ bottom $1
+ .endif
+.endm
+.macro bottom
+ .set fred, $0
+.endm
+
+.text
+
+top foo
+top bar, 42
+
+// CHECK: _foo:
+// CHECK-NOT: fred
+// CHECK: _bar
+// CHECK-NEXT: fred = 42
OpenPOWER on IntegriCloud