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