ARM: correct an off-by-one in an assert
[oota-llvm.git] / test / MC / ARM / arm-store-deprecated.s
1 @ RUN: llvm-mc -triple armv7-linux-eabi -filetype asm -o /dev/null %s 2>&1 \
2 @ RUN:   | FileCheck %s
3
4         .syntax unified
5         .arm
6
7         .global stm
8         .type stm,%function
9 stm:
10         stm sp!, {r0, pc}
11 @ CHECK: warning: use of SP or PC in the list is deprecated
12 @ CHECK: stm sp!, {r0, pc}
13 @ CHECK: ^
14         stm r0!, {r0, sp}
15 @ CHECK: warning: use of SP or PC in the list is deprecated
16 @ CHECK: stm r0!, {r0, sp}
17 @ CHECK: ^
18         stm r1!, {r0, sp, pc}
19 @ CHECK: warning: use of SP or PC in the list is deprecated
20 @ CHECK: stm r1!, {r0, sp, pc}
21 @ CHECK: ^
22         stm r2!, {sp, pc}
23 @ CHECK: warning: use of SP or PC in the list is deprecated
24 @ CHECK: stm r2!, {sp, pc}
25 @ CHECK: ^
26         stm sp!, {pc}
27 @ CHECK: warning: use of SP or PC in the list is deprecated
28 @ CHECK: stm sp!, {pc}
29 @ CHECK: ^
30         stm r0!, {sp}
31 @ CHECK: warning: use of SP or PC in the list is deprecated
32 @ CHECK: stm r0!, {sp}
33 @ CHECK: ^
34
35         .global stmda
36         .type stmda,%function
37 stmda:
38         stmda sp!, {r0, pc}
39 @ CHECK: warning: use of SP or PC in the list is deprecated
40 @ CHECK: stmda sp!, {r0, pc}
41 @ CHECK: ^
42         stmda r0!, {r0, sp}
43 @ CHECK: warning: use of SP or PC in the list is deprecated
44 @ CHECK: stmda r0!, {r0, sp}
45 @ CHECK: ^
46         stmda r1!, {r0, sp, pc}
47 @ CHECK: warning: use of SP or PC in the list is deprecated
48 @ CHECK: stmda r1!, {r0, sp, pc}
49 @ CHECK: ^
50         stmda r2!, {sp, pc}
51 @ CHECK: warning: use of SP or PC in the list is deprecated
52 @ CHECK: stmda r2!, {sp, pc}
53 @ CHECK: ^
54         stmda sp!, {pc}
55 @ CHECK: warning: use of SP or PC in the list is deprecated
56 @ CHECK: stmda sp!, {pc}
57 @ CHECK: ^
58         stmda r0!, {sp}
59 @ CHECK: warning: use of SP or PC in the list is deprecated
60 @ CHECK: stmda r0!, {sp}
61 @ CHECK: ^
62
63         .global stmdb
64         .type stmdb,%function
65 stmdb:
66         stmdb sp!, {r0, pc}
67 @ CHECK: warning: use of SP or PC in the list is deprecated
68 @ CHECK: stmdb sp!, {r0, pc}
69 @ CHECK: ^
70         stmdb r0!, {r0, sp}
71 @ CHECK: warning: use of SP or PC in the list is deprecated
72 @ CHECK: stmdb r0!, {r0, sp}
73 @ CHECK: ^
74         stmdb r1!, {r0, sp, pc}
75 @ CHECK: warning: use of SP or PC in the list is deprecated
76 @ CHECK: stmdb r1!, {r0, sp, pc}
77 @ CHECK: ^
78         stmdb r2!, {sp, pc}
79 @ CHECK: warning: use of SP or PC in the list is deprecated
80 @ CHECK: stmdb r2!, {sp, pc}
81 @ CHECK: ^
82         stmdb sp!, {pc}
83 @ CHECK: warning: use of SP or PC in the list is deprecated
84 @ CHECK: stmdb sp!, {pc}
85 @ CHECK: ^
86         stmdb r0!, {sp}
87 @ CHECK: warning: use of SP or PC in the list is deprecated
88 @ CHECK: stmdb r0!, {sp}
89 @ CHECK: ^
90
91         .global stmib
92         .type stmib,%function
93 stmib:
94         stmib sp!, {r0, pc}
95 @ CHECK: warning: use of SP or PC in the list is deprecated
96 @ CHECK: stmib sp!, {r0, pc}
97 @ CHECK: ^
98         stmib r0!, {r0, sp}
99 @ CHECK: warning: use of SP or PC in the list is deprecated
100 @ CHECK: stmib r0!, {r0, sp}
101 @ CHECK: ^
102         stmib r1!, {r0, sp, pc}
103 @ CHECK: warning: use of SP or PC in the list is deprecated
104 @ CHECK: stmib r1!, {r0, sp, pc}
105 @ CHECK: ^
106         stmib r2!, {sp, pc}
107 @ CHECK: warning: use of SP or PC in the list is deprecated
108 @ CHECK: stmib r2!, {sp, pc}
109 @ CHECK: ^
110         stmib sp!, {pc}
111 @ CHECK: warning: use of SP or PC in the list is deprecated
112 @ CHECK: stmib sp!, {pc}
113 @ CHECK: ^
114         stmib r0!, {sp}
115 @ CHECK: warning: use of SP or PC in the list is deprecated
116 @ CHECK: stmib r0!, {sp}
117 @ CHECK: ^
118
119
120         .global push
121         .type push,%function
122 push:
123         push {r0, pc}
124 @ CHECK: warning: use of SP or PC in the list is deprecated
125 @ CHECK: push {r0, pc}
126 @ CHECK: ^
127         push {r0, sp}
128 @ CHECK: warning: use of SP or PC in the list is deprecated
129 @ CHECK: push {r0, sp}
130 @ CHECK: ^
131         push {r0, sp, pc}
132 @ CHECK: warning: use of SP or PC in the list is deprecated
133 @ CHECK: push {r0, sp, pc}
134 @ CHECK: ^
135         push {sp, pc}
136 @ CHECK: warning: use of SP or PC in the list is deprecated
137 @ CHECK: push {sp, pc}
138 @ CHECK: ^
139         push {pc}
140 @ CHECK: warning: use of SP or PC in the list is deprecated
141 @ CHECK: push {pc}
142 @ CHECK: ^
143         push {sp}
144 @ CHECK: warning: use of SP or PC in the list is deprecated
145 @ CHECK: push {sp}
146 @ CHECK: ^
147
148         .global single
149         .type single,%function
150 single:
151         stmdaeq r0, {r0}
152 @ CHECK-NOT: warning
153