Fixed some bugs.
[llvm/zpu.git] / test / MC / AsmParser / macros.s
blob214274d9aa845eeff9d992a6f08cbdc890192588
1 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err | FileCheck %s
2 // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
4 .macro .test0
5 .macrobody0
6 .endmacro
7 .macro .test1
8 .test0
9 .endmacro
11 .test1
12 // CHECK-ERRORS: <instantiation>:1:1: warning: ignoring directive for now
13 // CHECK-ERRORS-NEXT: macrobody0
14 // CHECK-ERRORS-NEXT: ^
15 // CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation
16 // CHECK-ERRORS-NEXT: .test0
17 // CHECK-ERRORS-NEXT: ^
18 // CHECK-ERRORS: 11:1: note: while in macro instantiation
19 // CHECK-ERRORS-NEXT: .test1
20 // CHECK-ERRORS-NEXT: ^
22 .macro test2
23 .byte $0
24 .endmacro
25 test2 10
27 .macro test3
28 .globl "$0 $1 $2 $$3 $n"
29 .endmacro
31 // CHECK: .globl "1 23 $3 2"
32 test3 1,2 3
34 .macro test4
35 .globl "$0 -- $1"
36 .endmacro
38 // CHECK: .globl "ab)(,) -- (cd)"
39 test4 a b)(,),(cd)