1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple x86_64-linux-gnu %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker.macro ifcc arg:vararg 3*9880d681SAndroid Build Coastguard Worker.if cc 4*9880d681SAndroid Build Coastguard Worker \arg 5*9880d681SAndroid Build Coastguard Worker.endif 6*9880d681SAndroid Build Coastguard Worker.endm 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker.macro ifcc2 arg0 arg1:vararg 9*9880d681SAndroid Build Coastguard Worker.if cc 10*9880d681SAndroid Build Coastguard Worker movl \arg0, \arg1 11*9880d681SAndroid Build Coastguard Worker.endif 12*9880d681SAndroid Build Coastguard Worker.endm 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker.macro ifcc3 arg0, arg1:vararg 15*9880d681SAndroid Build Coastguard Worker.if cc 16*9880d681SAndroid Build Coastguard Worker movl \arg0, \arg1 17*9880d681SAndroid Build Coastguard Worker.endif 18*9880d681SAndroid Build Coastguard Worker.endm 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker.macro ifcc4 arg0, arg1:vararg 21*9880d681SAndroid Build Coastguard Worker.if cc 22*9880d681SAndroid Build Coastguard Worker movl \arg1, \arg0 23*9880d681SAndroid Build Coastguard Worker.endif 24*9880d681SAndroid Build Coastguard Worker.endm 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker.text 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker// CHECK: movl %esp, %ebp 29*9880d681SAndroid Build Coastguard Worker// CHECK: subl $0, %esp 30*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, %ebx 31*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, %ebx 32*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, %eax 33*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, %ecx 34*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, %eax 35*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, %ecx 36*9880d681SAndroid Build Coastguard Worker.set cc,1 37*9880d681SAndroid Build Coastguard Worker ifcc movl %esp, %ebp 38*9880d681SAndroid Build Coastguard Worker subl $0, %esp 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker ifcc2 %eax %ebx 41*9880d681SAndroid Build Coastguard Worker ifcc2 %ecx, %ebx 42*9880d681SAndroid Build Coastguard Worker ifcc3 %ecx %eax 43*9880d681SAndroid Build Coastguard Worker ifcc3 %eax, %ecx 44*9880d681SAndroid Build Coastguard Worker ifcc4 %eax %ecx ## test 45*9880d681SAndroid Build Coastguard Worker ifcc4 %ecx, %eax ## test 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker// CHECK-NOT: movl 48*9880d681SAndroid Build Coastguard Worker// CHECK: subl $1, %esp 49*9880d681SAndroid Build Coastguard Worker.set cc,0 50*9880d681SAndroid Build Coastguard Worker ifcc movl %esp, %ebp 51*9880d681SAndroid Build Coastguard Worker subl $1, %esp 52