Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=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:		la $25,v_sf
     24 ; stel:		mfc1 $4,$f12
     25 ; stel:		jr $25
     26 ; stel:		__fn_local_v_sf = v_sf
     27 ; stel:	.end	__fn_stub_v_sf
     28 
     29 declare i32 @printf(i8*, ...) #1
     30 
     31 ; Function Attrs: nounwind
     32 define void @v_df(double %p) #0 {
     33 entry:
     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
     38   ret void
     39 }
     40 
     41 ; stel: .section	.mips16.fn.v_df,"ax",@progbits
     42 ; stel:	.ent	__fn_stub_v_df
     43 ; stel:		la $25,v_df
     44 ; stel:		mfc1 $4,$f12
     45 ; stel:		mfc1 $5,$f13
     46 ; stel:		jr $25
     47 ; stel:		__fn_local_v_df = v_df
     48 ; stel:	.end	__fn_stub_v_df
     49 
     50 ; Function Attrs: nounwind
     51 define void @v_sf_sf(float %p1, float %p2) #0 {
     52 entry:
     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
     61   ret void
     62 }
     63 
     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
     67 ; stel:		mfc1 $4,$f12
     68 ; stel:		mfc1 $5,$f14
     69 ; stel:		jr $25
     70 ; stel:		__fn_local_v_sf_sf = v_sf_sf
     71 ; stel:	.end	__fn_stub_v_sf_sf
     72 
     73 ; Function Attrs: nounwind
     74 define void @v_sf_df(float %p1, double %p2) #0 {
     75 entry:
     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
     84   ret void
     85 }
     86 
     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
     90 ; stel:		mfc1 $4,$f12
     91 ; stel:		mfc1 $6,$f14
     92 ; stel:		mfc1 $7,$f15
     93 ; stel:		jr $25
     94 ; stel:		__fn_local_v_sf_df = v_sf_df
     95 ; stel:	.end	__fn_stub_v_sf_df
     96 
     97 ; Function Attrs: nounwind
     98 define void @v_df_sf(double %p1, float %p2) #0 {
     99 entry:
    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
    108   ret void
    109 }
    110 
    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
    117 ; stel:		jr $25
    118 ; stel:		__fn_local_v_df_sf = v_df_sf
    119 ; stel:	.end	__fn_stub_v_df_sf
    120 
    121 ; Function Attrs: nounwind
    122 define void @v_df_df(double %p1, double %p2) #0 {
    123 entry:
    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
    132   ret void
    133 }
    134 
    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
    142 ; stel:		jr $25
    143 ; stel:		__fn_local_v_df_df = v_df_df
    144 ; stel:	.end	__fn_stub_v_df_df
    145 
    146 ; Function Attrs: nounwind
    147 define float @sf_v() #0 {
    148 entry:
    149   %0 = load float, float* @ret_sf, align 4
    150   ret float %0
    151 }
    152 
    153 ; Function Attrs: nounwind
    154 define float @sf_sf(float %p) #0 {
    155 entry:
    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
    161   ret float %1
    162 }
    163 
    164 
    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
    169 ; stel:		jr $25
    170 ; stel:		__fn_local_sf_sf = sf_sf
    171 ; stel:	.end	__fn_stub_sf_sf
    172 
    173 
    174 ; Function Attrs: nounwind
    175 define float @sf_df(double %p) #0 {
    176 entry:
    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
    182   ret float %1
    183 }
    184 
    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
    190 ; stel:		jr $25
    191 ; stel:		__fn_local_sf_df = sf_df
    192 ; stel:	.end	__fn_stub_sf_df
    193 
    194 ; Function Attrs: nounwind
    195 define float @sf_sf_sf(float %p1, float %p2) #0 {
    196 entry:
    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
    206   ret float %2
    207 }
    208 
    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
    214 ; stel:		jr $25
    215 ; stel:		__fn_local_sf_sf_sf = sf_sf_sf
    216 ; stel:	.end	__fn_stub_sf_sf_sf
    217 
    218 ; Function Attrs: nounwind
    219 define float @sf_sf_df(float %p1, double %p2) #0 {
    220 entry:
    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
    230   ret float %2
    231 }
    232 
    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
    239 ; stel:		jr $25
    240 ; stel:		__fn_local_sf_sf_df = sf_sf_df
    241 ; stel:	.end	__fn_stub_sf_sf_df
    242 
    243 ; Function Attrs: nounwind
    244 define float @sf_df_sf(double %p1, float %p2) #0 {
    245 entry:
    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
    255   ret float %2
    256 }
    257 
    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
    264 ; stel:		jr $25
    265 ; stel:		__fn_local_sf_df_sf = sf_df_sf
    266 ; stel:	.end	__fn_stub_sf_df_sf
    267 
    268 ; Function Attrs: nounwind
    269 define float @sf_df_df(double %p1, double %p2) #0 {
    270 entry:
    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
    280   ret float %2
    281 }
    282 
    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
    290 ; stel:		jr $25
    291 ; stel:		__fn_local_sf_df_df = sf_df_df
    292 ; stel:	.end	__fn_stub_sf_df_df
    293 
    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" }
    295