Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-ml / repeat_directives.asm
blobdc47d9aac725b1a2745a3953cce1e862a043d14d
1 ; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s
3 .data
5 a BYTE ?
7 .code
9 repeat_test PROC
10 ; CHECK-LABEL: repeat_test:
11 REPEAT 1+2
12 xor eax, 0
13 ENDM
14 ; CHECK: xor eax, 0
15 ; CHECK: xor eax, 0
16 ; CHECK: xor eax, 0
17 ; CHECK-NOT: xor eax, 0
18 repeat_test ENDP
20 while_test PROC
21 ; CHECK-LABEL: while_test:
22 C = 1
23 WHILE C <= 3
24 xor eax, C
25 C = C + 1
26 ENDM
27 ; CHECK: xor eax, 1
28 ; CHECK: xor eax, 2
29 ; CHECK: xor eax, 3
30 ; CHECK-NOT: xor eax,
31 while_test ENDP
33 for_test PROC
34 ; CHECK-LABEL: for_test:
35 FOR arg, <'O', 'K', 13, 10>
36 mov al, arg
37 ENDM
38 ; CHECK: mov al, 79
39 ; CHECK: mov al, 75
40 ; CHECK: mov al, 13
41 ; CHECK: mov al, 10
42 ; CHECK-NOT: mov al,
43 for_test ENDP
45 for_without_substitution_test PROC
46 ; CHECK-LABEL: for_without_substitution_test:
47 FOR a, <'O', 'K', 13, 10>
48 mov al, 'a'
49 ENDM
50 ; CHECK: mov al, 97
51 ; CHECK: mov al, 97
52 ; CHECK: mov al, 97
53 ; CHECK: mov al, 97
54 ; CHECK-NOT: mov al,
55 for_without_substitution_test ENDP
57 for_with_default_test PROC
58 ; CHECK-LABEL: for_with_default_test:
59 FOR arg:=<'K'>, <'O', ,, 13,>
60 mov al, arg
61 ENDM
62 ; CHECK: mov al, 79
63 ; CHECK: mov al, 75
64 ; CHECK: mov al, 75
65 ; CHECK: mov al, 13
66 ; CHECK: mov al, 75
67 ; CHECK-NOT: mov al,
68 for_with_default_test ENDP
70 forc_test PROC
71 ; CHECK-LABEL: forc_test:
72 FORC arg, <OK>
73 mov al, "&arg"
74 ENDM
75 ; CHECK: mov al, 79
76 ; CHECK: mov al, 75
77 ; CHECK-NOT: mov al,
78 forc_test ENDP
80 forc_improper_test PROC
81 ; CHECK-LABEL: forc_improper_test:
82 FORC arg, A-; OK
83 mov al, "&arg"
84 ENDM
85 ; CHECK: mov al, 65
86 ; CHECK: mov al, 45
87 ; CHECK: mov al, 59
88 ; CHECK-NOT: mov al,
89 forc_improper_test ENDP
91 nested_substitution_test PROC
92 ; CHECK-LABEL: nested_substitution_test:
93 FOR s, <A-, OK>
94 FORC c, <s>
95 mov al, '&c'
96 ENDM
97 ENDM
98 ; CHECK: mov al, 65
99 ; CHECK: mov al, 45
100 ; CHECK: mov al, 79
101 ; CHECK: mov al, 75
102 ; CHECK-NOT: mov al,
103 nested_substitution_test ENDP