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
26 ; stel: __fn_local_v_sf = v_sf
27 ; stel: .end __fn_stub_v_sf
29 declare i32 @printf(i8*, ...) #1
31 ; Function Attrs: nounwind
32 define void @v_df(double %p) #0 {
34 %p.addr = alloca double, align 8
35 store double %p, double* %p.addr, align 8
36 %0 = load double, double* %p.addr, align 8
37 store double %0, double* @xd, align 8
41 ; stel: .section .mips16.fn.v_df,"ax",@progbits
42 ; stel: .ent __fn_stub_v_df
47 ; stel: __fn_local_v_df = v_df
48 ; stel: .end __fn_stub_v_df
50 ; Function Attrs: nounwind
51 define void @v_sf_sf(float %p1, float %p2) #0 {
53 %p1.addr = alloca float, align 4
54 %p2.addr = alloca float, align 4
55 store float %p1, float* %p1.addr, align 4
56 store float %p2, float* %p2.addr, align 4
57 %0 = load float, float* %p1.addr, align 4
58 store float %0, float* @x, align 4
59 %1 = load float, float* %p2.addr, align 4
60 store float %1, float* @y, align 4
64 ; stel: .section .mips16.fn.v_sf_sf,"ax",@progbits
65 ; stel: .ent __fn_stub_v_sf_sf
66 ; stel: la $25, v_sf_sf
70 ; stel: __fn_local_v_sf_sf = v_sf_sf
71 ; stel: .end __fn_stub_v_sf_sf
73 ; Function Attrs: nounwind
74 define void @v_sf_df(float %p1, double %p2) #0 {
76 %p1.addr = alloca float, align 4
77 %p2.addr = alloca double, align 8
78 store float %p1, float* %p1.addr, align 4
79 store double %p2, double* %p2.addr, align 8
80 %0 = load float, float* %p1.addr, align 4
81 store float %0, float* @x, align 4
82 %1 = load double, double* %p2.addr, align 8
83 store double %1, double* @yd, align 8
87 ; stel: .section .mips16.fn.v_sf_df,"ax",@progbits
88 ; stel: .ent __fn_stub_v_sf_df
89 ; stel: la $25, v_sf_df
94 ; stel: __fn_local_v_sf_df = v_sf_df
95 ; stel: .end __fn_stub_v_sf_df
97 ; Function Attrs: nounwind
98 define void @v_df_sf(double %p1, float %p2) #0 {
100 %p1.addr = alloca double, align 8
101 %p2.addr = alloca float, align 4
102 store double %p1, double* %p1.addr, align 8
103 store float %p2, float* %p2.addr, align 4
104 %0 = load double, double* %p1.addr, align 8
105 store double %0, double* @xd, align 8
106 %1 = load float, float* %p2.addr, align 4
107 store float %1, float* @y, align 4
111 ; stel: .section .mips16.fn.v_df_sf,"ax",@progbits
112 ; stel: .ent __fn_stub_v_df_sf
113 ; stel: la $25, v_df_sf
114 ; stel: mfc1 $4, $f12
115 ; stel: mfc1 $5, $f13
116 ; stel: mfc1 $6, $f14
118 ; stel: __fn_local_v_df_sf = v_df_sf
119 ; stel: .end __fn_stub_v_df_sf
121 ; Function Attrs: nounwind
122 define void @v_df_df(double %p1, double %p2) #0 {
124 %p1.addr = alloca double, align 8
125 %p2.addr = alloca double, align 8
126 store double %p1, double* %p1.addr, align 8
127 store double %p2, double* %p2.addr, align 8
128 %0 = load double, double* %p1.addr, align 8
129 store double %0, double* @xd, align 8
130 %1 = load double, double* %p2.addr, align 8
131 store double %1, double* @yd, align 8
135 ; stel: .section .mips16.fn.v_df_df,"ax",@progbits
136 ; stel: .ent __fn_stub_v_df_df
137 ; stel: la $25, v_df_df
138 ; stel: mfc1 $4, $f12
139 ; stel: mfc1 $5, $f13
140 ; stel: mfc1 $6, $f14
141 ; stel: mfc1 $7, $f15
143 ; stel: __fn_local_v_df_df = v_df_df
144 ; stel: .end __fn_stub_v_df_df
146 ; Function Attrs: nounwind
147 define float @sf_v() #0 {
149 %0 = load float, float* @ret_sf, align 4
153 ; Function Attrs: nounwind
154 define float @sf_sf(float %p) #0 {
156 %p.addr = alloca float, align 4
157 store float %p, float* %p.addr, align 4
158 %0 = load float, float* %p.addr, align 4
159 store float %0, float* @x, align 4
160 %1 = load float, float* @ret_sf, align 4
165 ; stel: .section .mips16.fn.sf_sf,"ax",@progbits
166 ; stel: .ent __fn_stub_sf_sf
167 ; stel: la $25, sf_sf
168 ; stel: mfc1 $4, $f12
170 ; stel: __fn_local_sf_sf = sf_sf
171 ; stel: .end __fn_stub_sf_sf
174 ; Function Attrs: nounwind
175 define float @sf_df(double %p) #0 {
177 %p.addr = alloca double, align 8
178 store double %p, double* %p.addr, align 8
179 %0 = load double, double* %p.addr, align 8
180 store double %0, double* @xd, align 8
181 %1 = load float, float* @ret_sf, align 4
185 ; stel: .section .mips16.fn.sf_df,"ax",@progbits
186 ; stel: .ent __fn_stub_sf_df
187 ; stel: la $25, sf_df
188 ; stel: mfc1 $4, $f12
189 ; stel: mfc1 $5, $f13
191 ; stel: __fn_local_sf_df = sf_df
192 ; stel: .end __fn_stub_sf_df
194 ; Function Attrs: nounwind
195 define float @sf_sf_sf(float %p1, float %p2) #0 {
197 %p1.addr = alloca float, align 4
198 %p2.addr = alloca float, align 4
199 store float %p1, float* %p1.addr, align 4
200 store float %p2, float* %p2.addr, align 4
201 %0 = load float, float* %p1.addr, align 4
202 store float %0, float* @x, align 4
203 %1 = load float, float* %p2.addr, align 4
204 store float %1, float* @y, align 4
205 %2 = load float, float* @ret_sf, align 4
209 ; stel: .section .mips16.fn.sf_sf_sf,"ax",@progbits
210 ; stel: .ent __fn_stub_sf_sf_sf
211 ; stel: la $25, sf_sf_sf
212 ; stel: mfc1 $4, $f12
213 ; stel: mfc1 $5, $f14
215 ; stel: __fn_local_sf_sf_sf = sf_sf_sf
216 ; stel: .end __fn_stub_sf_sf_sf
218 ; Function Attrs: nounwind
219 define float @sf_sf_df(float %p1, double %p2) #0 {
221 %p1.addr = alloca float, align 4
222 %p2.addr = alloca double, align 8
223 store float %p1, float* %p1.addr, align 4
224 store double %p2, double* %p2.addr, align 8
225 %0 = load float, float* %p1.addr, align 4
226 store float %0, float* @x, align 4
227 %1 = load double, double* %p2.addr, align 8
228 store double %1, double* @yd, align 8
229 %2 = load float, float* @ret_sf, align 4
233 ; stel: .section .mips16.fn.sf_sf_df,"ax",@progbits
234 ; stel: .ent __fn_stub_sf_sf_df
235 ; stel: la $25, sf_sf_df
236 ; stel: mfc1 $4, $f12
237 ; stel: mfc1 $6, $f14
238 ; stel: mfc1 $7, $f15
240 ; stel: __fn_local_sf_sf_df = sf_sf_df
241 ; stel: .end __fn_stub_sf_sf_df
243 ; Function Attrs: nounwind
244 define float @sf_df_sf(double %p1, float %p2) #0 {
246 %p1.addr = alloca double, align 8
247 %p2.addr = alloca float, align 4
248 store double %p1, double* %p1.addr, align 8
249 store float %p2, float* %p2.addr, align 4
250 %0 = load double, double* %p1.addr, align 8
251 store double %0, double* @xd, align 8
252 %1 = load float, float* %p2.addr, align 4
253 store float %1, float* @y, align 4
254 %2 = load float, float* @ret_sf, align 4
258 ; stel: .section .mips16.fn.sf_df_sf,"ax",@progbits
259 ; stel: .ent __fn_stub_sf_df_sf
260 ; stel: la $25, sf_df_sf
261 ; stel: mfc1 $4, $f12
262 ; stel: mfc1 $5, $f13
263 ; stel: mfc1 $6, $f14
265 ; stel: __fn_local_sf_df_sf = sf_df_sf
266 ; stel: .end __fn_stub_sf_df_sf
268 ; Function Attrs: nounwind
269 define float @sf_df_df(double %p1, double %p2) #0 {
271 %p1.addr = alloca double, align 8
272 %p2.addr = alloca double, align 8
273 store double %p1, double* %p1.addr, align 8
274 store double %p2, double* %p2.addr, align 8
275 %0 = load double, double* %p1.addr, align 8
276 store double %0, double* @xd, align 8
277 %1 = load double, double* %p2.addr, align 8
278 store double %1, double* @yd, align 8
279 %2 = load float, float* @ret_sf, align 4
283 ; stel: .section .mips16.fn.sf_df_df,"ax",@progbits
284 ; stel: .ent __fn_stub_sf_df_df
285 ; stel: la $25, sf_df_df
286 ; stel: mfc1 $4, $f12
287 ; stel: mfc1 $5, $f13
288 ; stel: mfc1 $6, $f14
289 ; stel: mfc1 $7, $f15
291 ; stel: __fn_local_sf_df_df = sf_df_df
292 ; stel: .end __fn_stub_sf_df_df
294 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" }