1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=stel 2 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 } 11 12 ; Function Attrs: nounwind 13 define void @v_sf(float %p) #0 { 14 entry: 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 19 ret void 20 } 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) 25 ; stel: mfc1 $4, $f12 26 ; stel: jr $25 27 ; stel: __fn_local_v_sf = v_sf 28 ; stel: .end __fn_stub_v_sf 29 30 declare i32 @printf(i8*, ...) #1 31 32 ; Function Attrs: nounwind 33 define void @v_df(double %p) #0 { 34 entry: 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 39 ret void 40 } 41 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) 46 ; stel: mfc1 $4, $f12 47 ; stel: mfc1 $5, $f13 48 ; stel: jr $25 49 ; stel: __fn_local_v_df = v_df 50 ; stel: .end __fn_stub_v_df 51 52 ; Function Attrs: nounwind 53 define void @v_sf_sf(float %p1, float %p2) #0 { 54 entry: 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 63 ret void 64 } 65 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) 70 ; stel: mfc1 $4, $f12 71 ; stel: mfc1 $5, $f14 72 ; stel: jr $25 73 ; stel: __fn_local_v_sf_sf = v_sf_sf 74 ; stel: .end __fn_stub_v_sf_sf 75 76 ; Function Attrs: nounwind 77 define void @v_sf_df(float %p1, double %p2) #0 { 78 entry: 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 87 ret void 88 } 89 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) 94 ; stel: mfc1 $4, $f12 95 ; stel: mfc1 $6, $f14 96 ; stel: mfc1 $7, $f15 97 ; stel: jr $25 98 ; stel: __fn_local_v_sf_df = v_sf_df 99 ; stel: .end __fn_stub_v_sf_df 100 101 ; Function Attrs: nounwind 102 define void @v_df_sf(double %p1, float %p2) #0 { 103 entry: 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 112 ret void 113 } 114 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 122 ; stel: jr $25 123 ; stel: __fn_local_v_df_sf = v_df_sf 124 ; stel: .end __fn_stub_v_df_sf 125 126 ; Function Attrs: nounwind 127 define void @v_df_df(double %p1, double %p2) #0 { 128 entry: 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 137 ret void 138 } 139 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 148 ; stel: jr $25 149 ; stel: __fn_local_v_df_df = v_df_df 150 ; stel: .end __fn_stub_v_df_df 151 152 ; Function Attrs: nounwind 153 define float @sf_v() #0 { 154 entry: 155 %0 = load float, float* @ret_sf, align 4 156 ret float %0 157 } 158 159 ; Function Attrs: nounwind 160 define float @sf_sf(float %p) #0 { 161 entry: 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 167 ret float %1 168 } 169 170 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 176 ; stel: jr $25 177 ; stel: __fn_local_sf_sf = sf_sf 178 ; stel: .end __fn_stub_sf_sf 179 180 181 ; Function Attrs: nounwind 182 define float @sf_df(double %p) #0 { 183 entry: 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 189 ret float %1 190 } 191 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 198 ; stel: jr $25 199 ; stel: __fn_local_sf_df = sf_df 200 ; stel: .end __fn_stub_sf_df 201 202 ; Function Attrs: nounwind 203 define float @sf_sf_sf(float %p1, float %p2) #0 { 204 entry: 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 214 ret float %2 215 } 216 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 223 ; stel: jr $25 224 ; stel: __fn_local_sf_sf_sf = sf_sf_sf 225 ; stel: .end __fn_stub_sf_sf_sf 226 227 ; Function Attrs: nounwind 228 define float @sf_sf_df(float %p1, double %p2) #0 { 229 entry: 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 239 ret float %2 240 } 241 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 249 ; stel: jr $25 250 ; stel: __fn_local_sf_sf_df = sf_sf_df 251 ; stel: .end __fn_stub_sf_sf_df 252 253 ; Function Attrs: nounwind 254 define float @sf_df_sf(double %p1, float %p2) #0 { 255 entry: 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 265 ret float %2 266 } 267 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 275 ; stel: jr $25 276 ; stel: __fn_local_sf_df_sf = sf_df_sf 277 ; stel: .end __fn_stub_sf_df_sf 278 279 ; Function Attrs: nounwind 280 define float @sf_df_df(double %p1, double %p2) #0 { 281 entry: 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 291 ret float %2 292 } 293 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 302 ; stel: jr $25 303 ; stel: __fn_local_sf_df_df = sf_df_df 304 ; stel: .end __fn_stub_sf_df_df 305 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" } 307