Simplify away redundant test, and document what's going on.
[llvm/stm8.git] / test / MC / ARM / simple-fp-encoding.s
blobbb4e53f1db301fd557a06a3942193837ceceaf2a
1 @ RUN: llvm-mc -mcpu=cortex-a8 -triple armv7-apple-darwin -show-encoding < %s | FileCheck %s
2 @ XFAIL: *
4 @ CHECK: vadd.f64 d16, d17, d16 @ encoding: [0xa0,0x0b,0x71,0xee]
5 vadd.f64 d16, d17, d16
7 @ CHECK: vadd.f32 s0, s1, s0 @ encoding: [0x80,0x0a,0x30,0xee]
8 vadd.f32 s0, s1, s0
10 @ CHECK: vsub.f64 d16, d17, d16 @ encoding: [0xe0,0x0b,0x71,0xee]
11 vsub.f64 d16, d17, d16
13 @ CHECK: vsub.f32 s0, s1, s0 @ encoding: [0xc0,0x0a,0x30,0xee]
14 vsub.f32 s0, s1, s0
16 @ CHECK: vdiv.f64 d16, d17, d16 @ encoding: [0xa0,0x0b,0xc1,0xee]
17 vdiv.f64 d16, d17, d16
19 @ CHECK: vdiv.f32 s0, s1, s0 @ encoding: [0x80,0x0a,0x80,0xee]
20 vdiv.f32 s0, s1, s0
22 @ CHECK: vmul.f64 d16, d17, d16 @ encoding: [0xa0,0x0b,0x61,0xee]
23 vmul.f64 d16, d17, d16
25 @ CHECK: vmul.f32 s0, s1, s0 @ encoding: [0x80,0x0a,0x20,0xee]
26 vmul.f32 s0, s1, s0
28 @ CHECK: vnmul.f64 d16, d17, d16 @ encoding: [0xe0,0x0b,0x61,0xee]
29 vnmul.f64 d16, d17, d16
31 @ CHECK: vnmul.f32 s0, s1, s0 @ encoding: [0xc0,0x0a,0x20,0xee]
32 vnmul.f32 s0, s1, s0
34 @ CHECK: vcmpe.f64 d17, d16 @ encoding: [0xe0,0x1b,0xf4,0xee]
35 vcmpe.f64 d17, d16
37 @ CHECK: vcmpe.f32 s1, s0 @ encoding: [0xc0,0x0a,0xf4,0xee]
38 vcmpe.f32 s1, s0
40 @ FIXME: vcmpe.f64 d16, #0 @ encoding: [0xc0,0x0b,0xf5,0xee]
41 @ vcmpe.f64 d16, #0
43 @ FIXME: vcmpe.f32 s0, #0 @ encoding: [0xc0,0x0a,0xb5,0xee]
44 @ vcmpe.f32 s0, #0
46 @ CHECK: vabs.f64 d16, d16 @ encoding: [0xe0,0x0b,0xf0,0xee]
47 vabs.f64 d16, d16
49 @ CHECK: vabs.f32 s0, s0 @ encoding: [0xc0,0x0a,0xb0,0xee]
50 vabs.f32 s0, s0
52 @ CHECK: vcvt.f32.f64 s0, d16 @ encoding: [0xe0,0x0b,0xb7,0xee]
53 vcvt.f32.f64 s0, d16
55 @ CHECK: vcvt.f64.f32 d16, s0 @ encoding: [0xc0,0x0a,0xf7,0xee]
56 vcvt.f64.f32 d16, s0
58 @ CHECK: vneg.f64 d16, d16 @ encoding: [0x60,0x0b,0xf1,0xee]
59 vneg.f64 d16, d16
61 @ CHECK: vneg.f32 s0, s0 @ encoding: [0x40,0x0a,0xb1,0xee]
62 vneg.f32 s0, s0
64 @ CHECK: vsqrt.f64 d16, d16 @ encoding: [0xe0,0x0b,0xf1,0xee]
65 vsqrt.f64 d16, d16
67 @ CHECK: vsqrt.f32 s0, s0 @ encoding: [0xc0,0x0a,0xb1,0xee]
68 vsqrt.f32 s0, s0
70 @ CHECK: vcvt.f64.s32 d16, s0 @ encoding: [0xc0,0x0b,0xf8,0xee]
71 vcvt.f64.s32 d16, s0
73 @ CHECK: vcvt.f32.s32 s0, s0 @ encoding: [0xc0,0x0a,0xb8,0xee]
74 vcvt.f32.s32 s0, s0
76 @ CHECK: vcvt.f64.u32 d16, s0 @ encoding: [0x40,0x0b,0xf8,0xee]
77 vcvt.f64.u32 d16, s0
79 @ CHECK: vcvt.f32.u32 s0, s0 @ encoding: [0x40,0x0a,0xb8,0xee]
80 vcvt.f32.u32 s0, s0
82 @ CHECK: vcvt.s32.f64 s0, d16 @ encoding: [0xe0,0x0b,0xbd,0xee]
83 vcvt.s32.f64 s0, d16
85 @ CHECK: vcvt.s32.f32 s0, s0 @ encoding: [0xc0,0x0a,0xbd,0xee]
86 vcvt.s32.f32 s0, s0
88 @ CHECK: vcvt.u32.f64 s0, d16 @ encoding: [0xe0,0x0b,0xbc,0xee]
89 vcvt.u32.f64 s0, d16
91 @ CHECK: vcvt.u32.f32 s0, s0 @ encoding: [0xc0,0x0a,0xbc,0xee]
92 vcvt.u32.f32 s0, s0
94 @ CHECK: vmla.f64 d16, d18, d17 @ encoding: [0xa1,0x0b,0x42,0xee]
95 vmla.f64 d16, d18, d17
97 @ CHECK: vmla.f32 s1, s2, s0 @ encoding: [0x00,0x0a,0x41,0xee]
98 vmla.f32 s1, s2, s0
100 @ CHECK: vmls.f64 d16, d18, d17 @ encoding: [0xe1,0x0b,0x42,0xee]
101 vmls.f64 d16, d18, d17
103 @ CHECK: vmls.f32 s1, s2, s0 @ encoding: [0x40,0x0a,0x41,0xee]
104 vmls.f32 s1, s2, s0
106 @ CHECK: vnmla.f64 d16, d18, d17 @ encoding: [0xe1,0x0b,0x52,0xee]
107 vnmla.f64 d16, d18, d17
109 @ CHECK: vnmla.f32 s1, s2, s0 @ encoding: [0x40,0x0a,0x51,0xee]
110 vnmla.f32 s1, s2, s0
112 @ CHECK: vnmls.f64 d16, d18, d17 @ encoding: [0xa1,0x0b,0x52,0xee]
113 vnmls.f64 d16, d18, d17
115 @ CHECK: vnmls.f32 s1, s2, s0 @ encoding: [0x00,0x0a,0x51,0xee]
116 vnmls.f32 s1, s2, s0
118 @ FIXME: vmrs apsr_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0xee]
119 @ vmrs apsr_nzcv, fpscr
121 @ CHECK: vnegne.f64 d16, d16 @ encoding: [0x60,0x0b,0xf1,0x1e]
122 vnegne.f64 d16, d16
124 @ CHECK: vmovne s0, r0 @ encoding: [0x10,0x0a,0x00,0x1e]
125 @ CHECK: vmoveq s0, r1 @ encoding: [0x10,0x1a,0x00,0x0e]
126 vmovne s0, r0
127 vmoveq s0, r1
129 @ CHECK: vmrs r0, fpscr @ encoding: [0x10,0x0a,0xf1,0xee]
130 vmrs r0, fpscr
131 @ CHECK: vmrs r0, fpexc @ encoding: [0x10,0x0a,0xf8,0xee]
132 vmrs r0, fpexc
133 @ CHECK: vmrs r0, fpsid @ encoding: [0x10,0x0a,0xf0,0xee]
134 vmrs r0, fpsid
136 @ CHECK: vmsr fpscr, r0 @ encoding: [0x10,0x0a,0xe1,0xee]
137 vmsr fpscr, r0
138 @ CHECK: vmsr fpexc, r0 @ encoding: [0x10,0x0a,0xe8,0xee]
139 vmsr fpexc, r0
140 @ CHECK: vmsr fpsid, r0 @ encoding: [0x10,0x0a,0xe0,0xee]
141 vmsr fpsid, r0
143 @ FIXME: vmov.f64 d16, #3.000000e+00 @ encoding: [0x08,0x0b,0xf0,0xee]
144 @ vmov.f64 d16, #3.000000e+00
146 @ FIXME: vmov.f32 s0, #3.000000e+00 @ encoding: [0x08,0x0a,0xb0,0xee]
147 @ vmov.f32 s0, #3.000000e+00
149 @ CHECK: vmov s0, r0 @ encoding: [0x10,0x0a,0x00,0xee]
150 @ CHECK: vmov s1, r1 @ encoding: [0x90,0x1a,0x00,0xee]
151 @ CHECK: vmov s2, r2 @ encoding: [0x10,0x2a,0x01,0xee]
152 @ CHECK: vmov s3, r3 @ encoding: [0x90,0x3a,0x01,0xee]
153 vmov s0, r0
154 vmov s1, r1
155 vmov s2, r2
156 vmov s3, r3
158 @ CHECK: vmov r0, s0 @ encoding: [0x10,0x0a,0x10,0xee]
159 @ CHECK: vmov r1, s1 @ encoding: [0x90,0x1a,0x10,0xee]
160 @ CHECK: vmov r2, s2 @ encoding: [0x10,0x2a,0x11,0xee]
161 @ CHECK: vmov r3, s3 @ encoding: [0x90,0x3a,0x11,0xee]
162 vmov r0, s0
163 vmov r1, s1
164 vmov r2, s2
165 vmov r3, s3
167 @ CHECK: vmov r0, r1, d16 @ encoding: [0x30,0x0b,0x51,0xec]
168 vmov r0, r1, d16
170 @ CHECK: vldr.64 d17, [r0] @ encoding: [0x00,0x1b,0xd0,0xed]
171 vldr.64 d17, [r0]
173 @ CHECK: vldr.64 d1, [r2, #32] @ encoding: [0x08,0x1b,0x92,0xed]
174 @ CHECK: vldr.64 d1, [r2, #-32] @ encoding: [0x08,0x1b,0x12,0xed]
175 vldr.64 d1, [r2, #32]
176 vldr.64 d1, [r2, #-32]
178 @ CHECK: vldr.64 d2, [r3] @ encoding: [0x00,0x2b,0x93,0xed]
179 vldr.64 d2, [r3]
181 @ CHECK: vldr.64 d3, [pc] @ encoding: [0x00,0x3b,0x9f,0xed]
182 @ CHECK: vldr.64 d3, [pc] @ encoding: [0x00,0x3b,0x9f,0xed]
183 @ CHECK: vldr.64 d3, [pc] @ encoding: [0x00,0x3b,0x9f,0xed]
184 vldr.64 d3, [pc]
185 vldr.64 d3, [pc,#0]
186 vldr.64 d3, [pc,#-0]
188 @ CHECK: vldr.32 s13, [r0] @ encoding: [0x00,0x6a,0xd0,0xed]
189 vldr.32 s13, [r0]
191 @ CHECK: vldr.32 s1, [r2, #32] @ encoding: [0x08,0x0a,0xd2,0xed]
192 @ CHECK: vldr.32 s1, [r2, #-32] @ encoding: [0x08,0x0a,0x52,0xed]
193 vldr.32 s1, [r2, #32]
194 vldr.32 s1, [r2, #-32]
196 @ CHECK: vldr.32 s2, [r3] @ encoding: [0x00,0x1a,0x93,0xed]
197 vldr.32 s2, [r3]
199 @ CHECK: vldr.32 s5, [pc] @ encoding: [0x00,0x2a,0xdf,0xed]
200 @ CHECK: vldr.32 s5, [pc] @ encoding: [0x00,0x2a,0xdf,0xed]
201 @ CHECK: vldr.32 s5, [pc] @ encoding: [0x00,0x2a,0xdf,0xed]
202 vldr.32 s5, [pc]
203 vldr.32 s5, [pc,#0]
204 vldr.32 s5, [pc,#-0]
206 @ CHECK: vstr.64 d4, [r1] @ encoding: [0x00,0x4b,0x81,0xed]
207 @ CHECK: vstr.64 d4, [r1, #24] @ encoding: [0x06,0x4b,0x81,0xed]
208 @ CHECK: vstr.64 d4, [r1, #-24] @ encoding: [0x06,0x4b,0x01,0xed]
209 vstr.64 d4, [r1]
210 vstr.64 d4, [r1, #24]
211 vstr.64 d4, [r1, #-24]
213 @ CHECK: vstr.32 s4, [r1] @ encoding: [0x00,0x2a,0x81,0xed]
214 @ CHECK: vstr.32 s4, [r1, #24] @ encoding: [0x06,0x2a,0x81,0xed]
215 @ CHECK: vstr.32 s4, [r1, #-24] @ encoding: [0x06,0x2a,0x01,0xed]
216 vstr.32 s4, [r1]
217 vstr.32 s4, [r1, #24]
218 vstr.32 s4, [r1, #-24]
220 @ CHECK: vldmia r1, {d2, d3, d4, d5, d6, d7} @ encoding: [0x0c,0x2b,0x91,0xec]
221 @ CHECK: vldmia r1, {s2, s3, s4, s5, s6, s7} @ encoding: [0x06,0x1a,0x91,0xec]
222 vldmia r1, {d2,d3-d6,d7}
223 vldmia r1, {s2,s3-s6,s7}
225 @ CHECK: vstmia r1, {d2, d3, d4, d5, d6, d7} @ encoding: [0x0c,0x2b,0x81,0xec]
226 @ CHECK: vstmia r1, {s2, s3, s4, s5, s6, s7} @ encoding: [0x06,0x1a,0x81,0xec]
227 vstmia r1, {d2,d3-d6,d7}
228 vstmia r1, {s2,s3-s6,s7}
230 @ CHECK: vcvtr.s32.f64 s0, d0 @ encoding: [0x40,0x0b,0xbd,0xee]
231 @ CHECK: vcvtr.s32.f32 s0, s1 @ encoding: [0x60,0x0a,0xbd,0xee]
232 @ CHECK: vcvtr.u32.f64 s0, d0 @ encoding: [0x40,0x0b,0xbc,0xee]
233 @ CHECK: vcvtr.u32.f32 s0, s1 @ encoding: [0x60,0x0a,0xbc,0xee]
234 vcvtr.s32.f64 s0, d0
235 vcvtr.s32.f32 s0, s1
236 vcvtr.u32.f64 s0, d0
237 vcvtr.u32.f32 s0, s1