1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=stel
3 @x = external global float
4 @xd = external global double
5 @y = external global float
6 @yd = external global double
7 @ret_sf = external global float
8 @ret_df = external global double
9 @ret_sc = external global { float, float }
10 @ret_dc = external global { double, double }
12 ; Function Attrs: nounwind
13 define void @v_sf(float %p) #0 {
15 %p.addr = alloca float, align 4
16 store float %p, float* %p.addr, align 4
17 %0 = load float, float* %p.addr, align 4
18 store float %0, float* @x, align 4
21 ; stel: .section .mips16.fn.v_sf,"ax",@progbits
22 ; stel: .ent __fn_stub_v_sf
23 ; stel: lui $25, %hi(v_sf)
24 ; stel: addiu $25, $25, %lo(v_sf)
27 ; stel: .set $__fn_local_v_sf, v_sf
28 ; stel: .end __fn_stub_v_sf
30 declare i32 @printf(i8*, ...) #1
32 ; Function Attrs: nounwind
33 define void @v_df(double %p) #0 {
35 %p.addr = alloca double, align 8
36 store double %p, double* %p.addr, align 8
37 %0 = load double, double* %p.addr, align 8
38 store double %0, double* @xd, align 8
42 ; stel: .section .mips16.fn.v_df,"ax",@progbits
43 ; stel: .ent __fn_stub_v_df
44 ; stel: lui $25, %hi(v_df)
45 ; stel: addiu $25, $25, %lo(v_df)
49 ; stel: .set $__fn_local_v_df, v_df
50 ; stel: .end __fn_stub_v_df
52 ; Function Attrs: nounwind
53 define void @v_sf_sf(float %p1, float %p2) #0 {
55 %p1.addr = alloca float, align 4
56 %p2.addr = alloca float, align 4
57 store float %p1, float* %p1.addr, align 4
58 store float %p2, float* %p2.addr, align 4
59 %0 = load float, float* %p1.addr, align 4
60 store float %0, float* @x, align 4
61 %1 = load float, float* %p2.addr, align 4
62 store float %1, float* @y, align 4
66 ; stel: .section .mips16.fn.v_sf_sf,"ax",@progbits
67 ; stel: .ent __fn_stub_v_sf_sf
68 ; stel: lui $25, %hi(v_sf_sf)
69 ; stel: addiu $25, $25, %lo(v_sf_sf)
73 ; stel: .set $__fn_local_v_sf_sf, v_sf_sf
74 ; stel: .end __fn_stub_v_sf_sf
76 ; Function Attrs: nounwind
77 define void @v_sf_df(float %p1, double %p2) #0 {
79 %p1.addr = alloca float, align 4
80 %p2.addr = alloca double, align 8
81 store float %p1, float* %p1.addr, align 4
82 store double %p2, double* %p2.addr, align 8
83 %0 = load float, float* %p1.addr, align 4
84 store float %0, float* @x, align 4
85 %1 = load double, double* %p2.addr, align 8
86 store double %1, double* @yd, align 8
90 ; stel: .section .mips16.fn.v_sf_df,"ax",@progbits
91 ; stel: .ent __fn_stub_v_sf_df
92 ; stel: lui $25, %hi(v_sf_df)
93 ; stel: addiu $25, $25, %lo(v_sf_df)
98 ; stel: .set $__fn_local_v_sf_df, v_sf_df
99 ; stel: .end __fn_stub_v_sf_df
101 ; Function Attrs: nounwind
102 define void @v_df_sf(double %p1, float %p2) #0 {
104 %p1.addr = alloca double, align 8
105 %p2.addr = alloca float, align 4
106 store double %p1, double* %p1.addr, align 8
107 store float %p2, float* %p2.addr, align 4
108 %0 = load double, double* %p1.addr, align 8
109 store double %0, double* @xd, align 8
110 %1 = load float, float* %p2.addr, align 4
111 store float %1, float* @y, align 4
115 ; stel: .section .mips16.fn.v_df_sf,"ax",@progbits
116 ; stel: .ent __fn_stub_v_df_sf
117 ; stel: lui $25, %hi(v_df_sf)
118 ; stel: addiu $25, $25, %lo(v_df_sf)
119 ; stel: mfc1 $4, $f12
120 ; stel: mfc1 $5, $f13
121 ; stel: mfc1 $6, $f14
123 ; stel: .set $__fn_local_v_df_sf, v_df_sf
124 ; stel: .end __fn_stub_v_df_sf
126 ; Function Attrs: nounwind
127 define void @v_df_df(double %p1, double %p2) #0 {
129 %p1.addr = alloca double, align 8
130 %p2.addr = alloca double, align 8
131 store double %p1, double* %p1.addr, align 8
132 store double %p2, double* %p2.addr, align 8
133 %0 = load double, double* %p1.addr, align 8
134 store double %0, double* @xd, align 8
135 %1 = load double, double* %p2.addr, align 8
136 store double %1, double* @yd, align 8
140 ; stel: .section .mips16.fn.v_df_df,"ax",@progbits
141 ; stel: .ent __fn_stub_v_df_df
142 ; stel: lui $25, %hi(v_df_df)
143 ; stel: addiu $25, $25, %lo(v_df_df)
144 ; stel: mfc1 $4, $f12
145 ; stel: mfc1 $5, $f13
146 ; stel: mfc1 $6, $f14
147 ; stel: mfc1 $7, $f15
149 ; stel: .set $__fn_local_v_df_df, v_df_df
150 ; stel: .end __fn_stub_v_df_df
152 ; Function Attrs: nounwind
153 define float @sf_v() #0 {
155 %0 = load float, float* @ret_sf, align 4
159 ; Function Attrs: nounwind
160 define float @sf_sf(float %p) #0 {
162 %p.addr = alloca float, align 4
163 store float %p, float* %p.addr, align 4
164 %0 = load float, float* %p.addr, align 4
165 store float %0, float* @x, align 4
166 %1 = load float, float* @ret_sf, align 4
171 ; stel: .section .mips16.fn.sf_sf,"ax",@progbits
172 ; stel: .ent __fn_stub_sf_sf
173 ; stel: lui $25, %hi(sf_sf)
174 ; stel: addiu $25, $25, %lo(sf_sf)
175 ; stel: mfc1 $4, $f12
177 ; stel: .set $__fn_local_sf_sf, sf_sf
178 ; stel: .end __fn_stub_sf_sf
181 ; Function Attrs: nounwind
182 define float @sf_df(double %p) #0 {
184 %p.addr = alloca double, align 8
185 store double %p, double* %p.addr, align 8
186 %0 = load double, double* %p.addr, align 8
187 store double %0, double* @xd, align 8
188 %1 = load float, float* @ret_sf, align 4
192 ; stel: .section .mips16.fn.sf_df,"ax",@progbits
193 ; stel: .ent __fn_stub_sf_df
194 ; stel: lui $25, %hi(sf_df)
195 ; stel: addiu $25, $25, %lo(sf_df)
196 ; stel: mfc1 $4, $f12
197 ; stel: mfc1 $5, $f13
199 ; stel: .set $__fn_local_sf_df, sf_df
200 ; stel: .end __fn_stub_sf_df
202 ; Function Attrs: nounwind
203 define float @sf_sf_sf(float %p1, float %p2) #0 {
205 %p1.addr = alloca float, align 4
206 %p2.addr = alloca float, align 4
207 store float %p1, float* %p1.addr, align 4
208 store float %p2, float* %p2.addr, align 4
209 %0 = load float, float* %p1.addr, align 4
210 store float %0, float* @x, align 4
211 %1 = load float, float* %p2.addr, align 4
212 store float %1, float* @y, align 4
213 %2 = load float, float* @ret_sf, align 4
217 ; stel: .section .mips16.fn.sf_sf_sf,"ax",@progbits
218 ; stel: .ent __fn_stub_sf_sf_sf
219 ; stel: lui $25, %hi(sf_sf_sf)
220 ; stel: addiu $25, $25, %lo(sf_sf_sf)
221 ; stel: mfc1 $4, $f12
222 ; stel: mfc1 $5, $f14
224 ; stel: .set $__fn_local_sf_sf_sf, sf_sf_sf
225 ; stel: .end __fn_stub_sf_sf_sf
227 ; Function Attrs: nounwind
228 define float @sf_sf_df(float %p1, double %p2) #0 {
230 %p1.addr = alloca float, align 4
231 %p2.addr = alloca double, align 8
232 store float %p1, float* %p1.addr, align 4
233 store double %p2, double* %p2.addr, align 8
234 %0 = load float, float* %p1.addr, align 4
235 store float %0, float* @x, align 4
236 %1 = load double, double* %p2.addr, align 8
237 store double %1, double* @yd, align 8
238 %2 = load float, float* @ret_sf, align 4
242 ; stel: .section .mips16.fn.sf_sf_df,"ax",@progbits
243 ; stel: .ent __fn_stub_sf_sf_df
244 ; stel: lui $25, %hi(sf_sf_df)
245 ; stel: addiu $25, $25, %lo(sf_sf_df)
246 ; stel: mfc1 $4, $f12
247 ; stel: mfc1 $6, $f14
248 ; stel: mfc1 $7, $f15
250 ; stel: .set $__fn_local_sf_sf_df, sf_sf_df
251 ; stel: .end __fn_stub_sf_sf_df
253 ; Function Attrs: nounwind
254 define float @sf_df_sf(double %p1, float %p2) #0 {
256 %p1.addr = alloca double, align 8
257 %p2.addr = alloca float, align 4
258 store double %p1, double* %p1.addr, align 8
259 store float %p2, float* %p2.addr, align 4
260 %0 = load double, double* %p1.addr, align 8
261 store double %0, double* @xd, align 8
262 %1 = load float, float* %p2.addr, align 4
263 store float %1, float* @y, align 4
264 %2 = load float, float* @ret_sf, align 4
268 ; stel: .section .mips16.fn.sf_df_sf,"ax",@progbits
269 ; stel: .ent __fn_stub_sf_df_sf
270 ; stel: lui $25, %hi(sf_df_sf)
271 ; stel: addiu $25, $25, %lo(sf_df_sf)
272 ; stel: mfc1 $4, $f12
273 ; stel: mfc1 $5, $f13
274 ; stel: mfc1 $6, $f14
276 ; stel: .set $__fn_local_sf_df_sf, sf_df_sf
277 ; stel: .end __fn_stub_sf_df_sf
279 ; Function Attrs: nounwind
280 define float @sf_df_df(double %p1, double %p2) #0 {
282 %p1.addr = alloca double, align 8
283 %p2.addr = alloca double, align 8
284 store double %p1, double* %p1.addr, align 8
285 store double %p2, double* %p2.addr, align 8
286 %0 = load double, double* %p1.addr, align 8
287 store double %0, double* @xd, align 8
288 %1 = load double, double* %p2.addr, align 8
289 store double %1, double* @yd, align 8
290 %2 = load float, float* @ret_sf, align 4
294 ; stel: .section .mips16.fn.sf_df_df,"ax",@progbits
295 ; stel: .ent __fn_stub_sf_df_df
296 ; stel: lui $25, %hi(sf_df_df)
297 ; stel: addiu $25, $25, %lo(sf_df_df)
298 ; stel: mfc1 $4, $f12
299 ; stel: mfc1 $5, $f13
300 ; stel: mfc1 $6, $f14
301 ; stel: mfc1 $7, $f15
303 ; stel: .set $__fn_local_sf_df_df, sf_df_df
304 ; stel: .end __fn_stub_sf_df_df
306 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }