1*8fee2ee9SEric Astor; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s 2*8fee2ee9SEric Astor 3*8fee2ee9SEric Astor.data 4*8fee2ee9SEric Astor 5*8fee2ee9SEric Astora BYTE ? 6*8fee2ee9SEric Astor 7*8fee2ee9SEric Astor.code 8*8fee2ee9SEric Astor 9*8fee2ee9SEric Astorrepeat_test PROC 10*8fee2ee9SEric Astor; CHECK-LABEL: repeat_test: 11*8fee2ee9SEric Astor REPEAT 1+2 12*8fee2ee9SEric Astor xor eax, 0 13*8fee2ee9SEric Astor ENDM 14*8fee2ee9SEric Astor; CHECK: xor eax, 0 15*8fee2ee9SEric Astor; CHECK: xor eax, 0 16*8fee2ee9SEric Astor; CHECK: xor eax, 0 17*8fee2ee9SEric Astor; CHECK-NOT: xor eax, 0 18*8fee2ee9SEric Astorrepeat_test ENDP 19*8fee2ee9SEric Astor 20*8fee2ee9SEric Astorwhile_test PROC 21*8fee2ee9SEric Astor; CHECK-LABEL: while_test: 22*8fee2ee9SEric Astor C = 1 23*8fee2ee9SEric Astor WHILE C <= 3 24*8fee2ee9SEric Astor xor eax, C 25*8fee2ee9SEric Astor C = C + 1 26*8fee2ee9SEric Astor ENDM 27*8fee2ee9SEric Astor; CHECK: xor eax, 1 28*8fee2ee9SEric Astor; CHECK: xor eax, 2 29*8fee2ee9SEric Astor; CHECK: xor eax, 3 30*8fee2ee9SEric Astor; CHECK-NOT: xor eax, 31*8fee2ee9SEric Astorwhile_test ENDP 32*8fee2ee9SEric Astor 33*8fee2ee9SEric Astorfor_test PROC 34*8fee2ee9SEric Astor; CHECK-LABEL: for_test: 35*8fee2ee9SEric Astor FOR arg, <'O', 'K', 13, 10> 36*8fee2ee9SEric Astor mov al, arg 37*8fee2ee9SEric Astor ENDM 38*8fee2ee9SEric Astor; CHECK: mov al, 79 39*8fee2ee9SEric Astor; CHECK: mov al, 75 40*8fee2ee9SEric Astor; CHECK: mov al, 13 41*8fee2ee9SEric Astor; CHECK: mov al, 10 42*8fee2ee9SEric Astor; CHECK-NOT: mov al, 43*8fee2ee9SEric Astorfor_test ENDP 44*8fee2ee9SEric Astor 45*8fee2ee9SEric Astorfor_without_substitution_test PROC 46*8fee2ee9SEric Astor; CHECK-LABEL: for_without_substitution_test: 47*8fee2ee9SEric Astor FOR a, <'O', 'K', 13, 10> 48*8fee2ee9SEric Astor mov al, 'a' 49*8fee2ee9SEric Astor ENDM 50*8fee2ee9SEric Astor; CHECK: mov al, 97 51*8fee2ee9SEric Astor; CHECK: mov al, 97 52*8fee2ee9SEric Astor; CHECK: mov al, 97 53*8fee2ee9SEric Astor; CHECK: mov al, 97 54*8fee2ee9SEric Astor; CHECK-NOT: mov al, 55*8fee2ee9SEric Astorfor_without_substitution_test ENDP 56*8fee2ee9SEric Astor 57*8fee2ee9SEric Astorfor_with_default_test PROC 58*8fee2ee9SEric Astor; CHECK-LABEL: for_with_default_test: 59*8fee2ee9SEric Astor FOR arg:=<'K'>, <'O', ,, 13,> 60*8fee2ee9SEric Astor mov al, arg 61*8fee2ee9SEric Astor ENDM 62*8fee2ee9SEric Astor; CHECK: mov al, 79 63*8fee2ee9SEric Astor; CHECK: mov al, 75 64*8fee2ee9SEric Astor; CHECK: mov al, 75 65*8fee2ee9SEric Astor; CHECK: mov al, 13 66*8fee2ee9SEric Astor; CHECK: mov al, 75 67*8fee2ee9SEric Astor; CHECK-NOT: mov al, 68*8fee2ee9SEric Astorfor_with_default_test ENDP 69*8fee2ee9SEric Astor 70*8fee2ee9SEric Astorforc_test PROC 71*8fee2ee9SEric Astor; CHECK-LABEL: forc_test: 72*8fee2ee9SEric Astor FORC arg, <OK> 73*8fee2ee9SEric Astor mov al, "&arg" 74*8fee2ee9SEric Astor ENDM 75*8fee2ee9SEric Astor; CHECK: mov al, 79 76*8fee2ee9SEric Astor; CHECK: mov al, 75 77*8fee2ee9SEric Astor; CHECK-NOT: mov al, 78*8fee2ee9SEric Astorforc_test ENDP 79*8fee2ee9SEric Astor 80*8fee2ee9SEric Astorforc_improper_test PROC 81*8fee2ee9SEric Astor; CHECK-LABEL: forc_improper_test: 82*8fee2ee9SEric Astor FORC arg, A-; OK 83*8fee2ee9SEric Astor mov al, "&arg" 84*8fee2ee9SEric Astor ENDM 85*8fee2ee9SEric Astor; CHECK: mov al, 65 86*8fee2ee9SEric Astor; CHECK: mov al, 45 87*8fee2ee9SEric Astor; CHECK: mov al, 59 88*8fee2ee9SEric Astor; CHECK-NOT: mov al, 89*8fee2ee9SEric Astorforc_improper_test ENDP 90*8fee2ee9SEric Astor 91*8fee2ee9SEric Astornested_substitution_test PROC 92*8fee2ee9SEric Astor; CHECK-LABEL: nested_substitution_test: 93*8fee2ee9SEric Astor FOR s, <A-, OK> 94*8fee2ee9SEric Astor FORC c, <s> 95*8fee2ee9SEric Astor mov al, '&c' 96*8fee2ee9SEric Astor ENDM 97*8fee2ee9SEric Astor ENDM 98*8fee2ee9SEric Astor; CHECK: mov al, 65 99*8fee2ee9SEric Astor; CHECK: mov al, 45 100*8fee2ee9SEric Astor; CHECK: mov al, 79 101*8fee2ee9SEric Astor; CHECK: mov al, 75 102*8fee2ee9SEric Astor; CHECK-NOT: mov al, 103*8fee2ee9SEric Astornested_substitution_test ENDP 104*8fee2ee9SEric Astor 105*8fee2ee9SEric Astorend 106