1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/MC/AsmParser/macros-darwin-vararg.s
Jonathan Roelofs 3ac128b6b7 Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI
I looked into adding a warning / error for this to FileCheck, but there doesn't
seem to be a good way to avoid it triggering on the instances of it in RUN lines.

llvm-svn: 244481
2015-08-10 19:01:27 +00:00

91 lines
1.4 KiB
ArmAsm

// RUN: llvm-mc -triple i386-apple-darwin10 %s 2>&1 | FileCheck %s
.macro abc a b:vararg
.globl "\a, \b"
.endm
// CHECK: .globl "zed0, zed1, zed2"
abc zed0, zed1, zed2
.purgem abc
.macro ifcc arg:vararg
.if cc
\arg
.endif
.endm
.macro ifcc2 arg0 arg1:vararg
.if cc
movl \arg0, \arg1
.endif
.endm
.macro ifcc3 arg0, arg1:vararg
.if cc
movl \arg0, \arg1
.endif
.endm
.macro ifcc4 arg0, arg1:vararg
.if cc
movl \arg1, \arg0
.endif
.endm
.text
// CHECK: movl %esp, %ebp
// CHECK: subl $0, %esp
// CHECK: movl %eax, %ebx
// CHECK: movl %ecx, %ebx
// CHECK: movl %ecx, %eax
// CHECK: movl %eax, %ecx
// CHECK: movl %ecx, %eax
// CHECK: movl %eax, %ecx
.set cc,1
ifcc movl %esp, %ebp
subl $0, %esp
ifcc2 %eax, %ebx
ifcc2 %ecx, %ebx
ifcc3 %ecx, %eax
ifcc3 %eax, %ecx
ifcc4 %eax, %ecx ## test
ifcc4 %ecx, %eax ## test
// CHECK-NOT: movl
// CHECK: subl $1, %esp
.set cc,0
ifcc movl, %esp, %ebp
subl $1, %esp
.macro abc arg:vararg=nop
\arg
.endm
.macro abcd arg0=%eax, arg1:vararg=%ebx
movl \arg0, \arg1
.endm
.text
// CHECK: nop
abc
// CHECK: movl %eax, %ebx
abcd ,
.macro .make_macro start, end, name, body:vararg
\start \name
\body
\end
.endmacro
.make_macro .macro,.endmacro,.mybyte,.byte $0, $2, $1
.data
// CHECK: .byte 10
// CHECK: .byte 12
// CHECK: .byte 11
.mybyte 10,11,12