[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ARM / arm-load-store-multiple-deprecated.s
blob4f6ff6238fb11dfea16e944906ddb3951a1be6a5
1 @ RUN: llvm-mc -triple armv6t2-linux-eabi -filetype asm -o - %s 2>&1 \
2 @ RUN: | FileCheck %s
3 @ RUN: not llvm-mc -triple armv6t2-linux-eabi --fatal-warnings -filetype asm -o - %s 2>&1 \
4 @ RUN: | FileCheck -check-prefix CHECK-ERROR %s
6 @ RUN: not llvm-mc -triple armv7-linux-eabi -filetype asm -o - %s 2>&1 \
7 @ RUN: | FileCheck %s -check-prefix CHECK -check-prefix CHECK-V7
9 @ RUN: not llvm-mc -triple armv8-linux-eabi -filetype asm -o - %s 2>&1 \
10 @ RUN: | FileCheck %s -check-prefix CHECK -check-prefix CHECK-V7
12 .syntax unified
13 .arm
15 .global stm
16 .type stm,%function
17 stm:
18 stm sp!, {r0, pc}
19 @ CHECK: warning: use of PC in the list is deprecated
20 @ CHECK-ERROR: error: use of PC in the list is deprecated
21 @ CHECK: stm sp!, {r0, pc}
22 @ CHECK: ^
23 stm r1!, {r0, sp, pc}
24 @ CHECK: warning: use of PC in the list is deprecated
25 @ CHECK: stm r1!, {r0, sp, pc}
26 @ CHECK: ^
27 stm r2!, {sp, pc}
28 @ CHECK: warning: use of PC in the list is deprecated
29 @ CHECK: stm r2!, {sp, pc}
30 @ CHECK: ^
31 stm sp!, {pc}
32 @ CHECK: warning: use of PC in the list is deprecated
33 @ CHECK: stm sp!, {pc}
34 @ CHECK: ^
36 .global stmda
37 .type stmda,%function
38 stmda:
39 stmda sp!, {r0, pc}
40 @ CHECK: warning: use of PC in the list is deprecated
41 @ CHECK: stmda sp!, {r0, pc}
42 @ CHECK: ^
43 stmda r1!, {r0, sp, pc}
44 @ CHECK: warning: use of PC in the list is deprecated
45 @ CHECK: stmda r1!, {r0, sp, pc}
46 @ CHECK: ^
47 stmda r2!, {sp, pc}
48 @ CHECK: warning: use of PC in the list is deprecated
49 @ CHECK: stmda r2!, {sp, pc}
50 @ CHECK: ^
51 stmda sp!, {pc}
52 @ CHECK: warning: use of PC in the list is deprecated
53 @ CHECK: stmda sp!, {pc}
54 @ CHECK: ^
56 .global stmdb
57 .type stmdb,%function
58 stmdb:
59 stmdb sp!, {r0, pc}
60 @ CHECK: warning: use of PC in the list is deprecated
61 @ CHECK: stmdb sp!, {r0, pc}
62 @ CHECK: ^
63 stmdb r1!, {r0, sp, pc}
64 @ CHECK: warning: use of PC in the list is deprecated
65 @ CHECK: stmdb r1!, {r0, sp, pc}
66 @ CHECK: ^
67 stmdb r2!, {sp, pc}
68 @ CHECK: warning: use of PC in the list is deprecated
69 @ CHECK: stmdb r2!, {sp, pc}
70 @ CHECK: ^
71 stmdb sp!, {pc}
72 @ CHECK: warning: use of PC in the list is deprecated
73 @ CHECK: stmdb sp!, {pc}
74 @ CHECK: ^
76 .global stmib
77 .type stmib,%function
78 stmib:
79 stmib sp!, {r0, pc}
80 @ CHECK: warning: use of PC in the list is deprecated
81 @ CHECK: stmib sp!, {r0, pc}
82 @ CHECK: ^
83 stmib r1!, {r0, sp, pc}
84 @ CHECK: warning: use of PC in the list is deprecated
85 @ CHECK: stmib r1!, {r0, sp, pc}
86 @ CHECK: ^
87 stmib r2!, {sp, pc}
88 @ CHECK: warning: use of PC in the list is deprecated
89 @ CHECK: stmib r2!, {sp, pc}
90 @ CHECK: ^
91 stmib sp!, {pc}
92 @ CHECK: warning: use of PC in the list is deprecated
93 @ CHECK: stmib sp!, {pc}
94 @ CHECK: ^
97 .global push
98 .type push,%function
99 push:
100 push {r0, pc}
101 @ CHECK: warning: use of PC in the list is deprecated
102 @ CHECK: push {r0, pc}
103 @ CHECK: ^
104 push {r0, sp, pc}
105 @ CHECK: warning: use of PC in the list is deprecated
106 @ CHECK: push {r0, sp, pc}
107 @ CHECK: ^
108 push {sp, pc}
109 @ CHECK: warning: use of PC in the list is deprecated
110 @ CHECK: push {sp, pc}
111 @ CHECK: ^
112 push {pc}
113 @ CHECK: warning: use of PC in the list is deprecated
114 @ CHECK: push {pc}
115 @ CHECK: ^
117 .global ldm
118 .type ldm,%function
119 ldm:
120 ldm r0!, {r1, lr, pc}
121 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
122 ldm r0!, {lr, pc}
123 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
125 .global ldmda
126 .type ldmda,%function
127 ldmda:
128 ldmda r0!, {r1, lr, pc}
129 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
130 ldmda r0!, {lr, pc}
131 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
133 .global ldmdb
134 .type ldmdb,%function
135 ldmdb:
136 ldmdb r0!, {r1, lr, pc}
137 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
138 ldmdb r0!, {lr, pc}
139 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
141 .global ldmib
142 .type ldmib,%function
143 ldmib:
144 ldmib r0!, {r1, lr, pc}
145 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
146 ldmib r0!, {lr, pc}
147 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
149 .global pop
150 .type pop,%function
151 pop:
152 pop {r0, sp}
153 @ CHECK-V7: error: writeback register not allowed in register list
154 pop {sp}
155 @ CHECK-V7: error: writeback register not allowed in register list
156 pop {r0, lr, pc}
157 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
158 pop {lr, pc}
159 @ CHECK: warning: use of LR and PC simultaneously in the list is deprecated
161 .global valid_stm
162 .type valid,%function
163 valid_stm:
164 stm r0!, {r0, sp}
165 @ CHECK: stm r0!, {r0, sp}
166 stm r0!, {sp}
167 @ CHECK: stm r0!, {sp}
168 stmda r0!, {r0, sp}
169 @ CHECK: stmda r0!, {r0, sp}
170 stmda r0!, {sp}
171 @ CHECK: stmda r0!, {sp}
172 stmdb r0!, {r0, sp}
173 @ CHECK: stmdb r0!, {r0, sp}
174 stmdb r0!, {sp}
175 @ CHECK: stmdb r0!, {sp}
176 stmib r0!, {r0, sp}
177 @ CHECK: stmib r0!, {r0, sp}
178 stmib r0!, {sp}
179 @ CHECK: stmib r0!, {sp}
180 stmdaeq r0, {r0}
181 @ CHECK: stmdaeq r0, {r0}
183 .global valid_push
184 .type valid,%function
185 valid_push:
186 push {r0, sp}
187 @ CHECK: push {r0, sp}
188 push {sp}
189 @ CHECK: push {sp}
191 .global valid_ldm
192 .type valid,%function
193 valid_ldm:
194 ldm r0!, {r1, sp}
195 @ CHECK: ldm r0!, {r1, sp}
196 ldm r0!, {sp}
197 @ CHECK: ldm r0!, {sp}
198 ldmda r0!, {r1, sp}
199 @ CHECK: ldmda r0!, {r1, sp}
200 ldmda r0!, {sp}
201 @ CHECK: ldmda r0!, {sp}
202 ldmdb r0!, {r1, sp}
203 @ CHECK: ldmdb r0!, {r1, sp}
204 ldmdb r0!, {sp}
205 @ CHECK: ldmdb r0!, {sp}
206 ldmib r0!, {r1, sp}
207 @ CHECK: ldmib r0!, {r1, sp}
208 ldmib r0!, {sp}
209 @ CHECK: ldmib r0!, {sp}
210 ldmdaeq r0, {r0}
211 @ CHECK: ldmdaeq r0, {r0}
213 .global valid_pop
214 .type valid,%function
215 valid_pop:
216 pop {r0, pc}
217 @ CHECK: pop {r0, pc}