summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/AsmParser/macro-args.s
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/MC/AsmParser/macro-args.s')
-rw-r--r--llvm/test/MC/AsmParser/macro-args.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/MC/AsmParser/macro-args.s b/llvm/test/MC/AsmParser/macro-args.s
index 4b878999e42..13b197a55a8 100644
--- a/llvm/test/MC/AsmParser/macro-args.s
+++ b/llvm/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