mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
993a1116f7
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244481 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
869 B
ArmAsm
52 lines
869 B
ArmAsm
// RUN: llvm-mc -triple x86_64-linux-gnu %s | FileCheck %s
|
|
.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
|