Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc  < %s -march=mipsel | FileCheck %s 
      2 ; RUN: llc  < %s -mtriple=mipsel-none-nacl-gnu \
      3 ; RUN:  | FileCheck %s -check-prefix=CHECK-NACL
      4 
      5 
      6 @gi0 = external global i32
      7 @gi1 = external global i32
      8 @gi2 = external global i32
      9 @gi3 = external global i32
     10 @gi4 = external global i32
     11 @gi5 = external global i32
     12 @gi6 = external global i32
     13 @gi7 = external global i32
     14 @gi8 = external global i32
     15 @gi9 = external global i32
     16 @gi10 = external global i32
     17 @gi11 = external global i32
     18 @gi12 = external global i32
     19 @gi13 = external global i32
     20 @gi14 = external global i32
     21 @gi15 = external global i32
     22 @gi16 = external global i32
     23 @gfa0 = external global float
     24 @gfa1 = external global float
     25 @gfa2 = external global float
     26 @gfa3 = external global float
     27 @gfa4 = external global float
     28 @gfa5 = external global float
     29 @gfa6 = external global float
     30 @gfa7 = external global float
     31 @gfa8 = external global float
     32 @gfa9 = external global float
     33 @gfa10 = external global float
     34 @gfa11 = external global float
     35 @gfa12 = external global float
     36 @gfa13 = external global float
     37 @gfa14 = external global float
     38 @gfa15 = external global float
     39 @gfa16 = external global float
     40 @gfa17 = external global float
     41 @gfa18 = external global float
     42 @gfa19 = external global float
     43 @gfa20 = external global float
     44 @gf0 = external global float
     45 @gf1 = external global float
     46 @gf2 = external global float
     47 @gf3 = external global float
     48 @gf4 = external global float
     49 @gf5 = external global float
     50 @gf6 = external global float
     51 @gf7 = external global float
     52 @gf8 = external global float
     53 @gf9 = external global float
     54 @gf10 = external global float
     55 @gf11 = external global float
     56 @gf12 = external global float
     57 @gf13 = external global float
     58 @gf14 = external global float
     59 @gf15 = external global float
     60 @gf16 = external global float
     61 @gf17 = external global float
     62 @gf18 = external global float
     63 @gf19 = external global float
     64 @gf20 = external global float
     65 @g0 = external global i32
     66 @g1 = external global i32
     67 @g2 = external global i32
     68 @g3 = external global i32
     69 @g4 = external global i32
     70 @g5 = external global i32
     71 @g6 = external global i32
     72 @g7 = external global i32
     73 @g8 = external global i32
     74 @g9 = external global i32
     75 @g10 = external global i32
     76 @g11 = external global i32
     77 @g12 = external global i32
     78 @g13 = external global i32
     79 @g14 = external global i32
     80 @g15 = external global i32
     81 @g16 = external global i32
     82 
     83 define void @caller0() nounwind {
     84 entry:
     85 ; CHECK: caller0
     86 ; CHECK: lw  $3
     87 ; CHECK: lw  $24
     88 ; CHECK: lw  $15
     89 ; CHECK: lw  $14
     90 ; CHECK: lw  $13
     91 ; CHECK: lw  $12
     92 ; CHECK: lw  $11
     93 ; CHECK: lw  $10
     94 ; CHECK: lw  $9
     95 ; CHECK: lw  $8
     96 ; CHECK: lw  $7
     97 ; CHECK: lw  $6
     98 ; CHECK: lw  $5
     99 ; CHECK: lw  $4
    100 
    101 ; t6, t7 and t8 are reserved in NaCl and cannot be used for fastcc.
    102 ; CHECK-NACL-NOT: lw  $14
    103 ; CHECK-NACL-NOT: lw  $15
    104 ; CHECK-NACL-NOT: lw  $24
    105 
    106   %0 = load i32* @gi0, align 4
    107   %1 = load i32* @gi1, align 4
    108   %2 = load i32* @gi2, align 4
    109   %3 = load i32* @gi3, align 4
    110   %4 = load i32* @gi4, align 4
    111   %5 = load i32* @gi5, align 4
    112   %6 = load i32* @gi6, align 4
    113   %7 = load i32* @gi7, align 4
    114   %8 = load i32* @gi8, align 4
    115   %9 = load i32* @gi9, align 4
    116   %10 = load i32* @gi10, align 4
    117   %11 = load i32* @gi11, align 4
    118   %12 = load i32* @gi12, align 4
    119   %13 = load i32* @gi13, align 4
    120   %14 = load i32* @gi14, align 4
    121   %15 = load i32* @gi15, align 4
    122   %16 = load i32* @gi16, align 4
    123   tail call fastcc void @callee0(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16)
    124   ret void
    125 }
    126 
    127 define internal fastcc void @callee0(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7, i32 %a8, i32 %a9, i32 %a10, i32 %a11, i32 %a12, i32 %a13, i32 %a14, i32 %a15, i32 %a16) nounwind noinline {
    128 entry:
    129 ; CHECK: callee0
    130 ; CHECK: sw  $4
    131 ; CHECK: sw  $5
    132 ; CHECK: sw  $6
    133 ; CHECK: sw  $7
    134 ; CHECK: sw  $8
    135 ; CHECK: sw  $9
    136 ; CHECK: sw  $10
    137 ; CHECK: sw  $11
    138 ; CHECK: sw  $12
    139 ; CHECK: sw  $13
    140 ; CHECK: sw  $14
    141 ; CHECK: sw  $15
    142 ; CHECK: sw  $24
    143 ; CHECK: sw  $3
    144 
    145 ; t6, t7 and t8 are reserved in NaCl and cannot be used for fastcc.
    146 ; CHECK-NACL-NOT: sw  $14
    147 ; CHECK-NACL-NOT: sw  $15
    148 ; CHECK-NACL-NOT: sw  $24
    149 
    150   store i32 %a0, i32* @g0, align 4
    151   store i32 %a1, i32* @g1, align 4
    152   store i32 %a2, i32* @g2, align 4
    153   store i32 %a3, i32* @g3, align 4
    154   store i32 %a4, i32* @g4, align 4
    155   store i32 %a5, i32* @g5, align 4
    156   store i32 %a6, i32* @g6, align 4
    157   store i32 %a7, i32* @g7, align 4
    158   store i32 %a8, i32* @g8, align 4
    159   store i32 %a9, i32* @g9, align 4
    160   store i32 %a10, i32* @g10, align 4
    161   store i32 %a11, i32* @g11, align 4
    162   store i32 %a12, i32* @g12, align 4
    163   store i32 %a13, i32* @g13, align 4
    164   store i32 %a14, i32* @g14, align 4
    165   store i32 %a15, i32* @g15, align 4
    166   store i32 %a16, i32* @g16, align 4
    167   ret void
    168 }
    169 
    170 define void @caller1(float %a0, float %a1, float %a2, float %a3, float %a4, float %a5, float %a6, float %a7, float %a8, float %a9, float %a10, float %a11, float %a12, float %a13, float %a14, float %a15, float %a16, float %a17, float %a18, float %a19, float %a20) nounwind {
    171 entry:
    172 ; CHECK: caller1
    173 ; CHECK: lwc1  $f19
    174 ; CHECK: lwc1  $f18
    175 ; CHECK: lwc1  $f17
    176 ; CHECK: lwc1  $f16
    177 ; CHECK: lwc1  $f15
    178 ; CHECK: lwc1  $f14
    179 ; CHECK: lwc1  $f13
    180 ; CHECK: lwc1  $f12
    181 ; CHECK: lwc1  $f11
    182 ; CHECK: lwc1  $f10
    183 ; CHECK: lwc1  $f9
    184 ; CHECK: lwc1  $f8
    185 ; CHECK: lwc1  $f7
    186 ; CHECK: lwc1  $f6
    187 ; CHECK: lwc1  $f5
    188 ; CHECK: lwc1  $f4
    189 ; CHECK: lwc1  $f3
    190 ; CHECK: lwc1  $f2
    191 ; CHECK: lwc1  $f1
    192 ; CHECK: lwc1  $f0
    193 
    194   %0 = load float* @gfa0, align 4
    195   %1 = load float* @gfa1, align 4
    196   %2 = load float* @gfa2, align 4
    197   %3 = load float* @gfa3, align 4
    198   %4 = load float* @gfa4, align 4
    199   %5 = load float* @gfa5, align 4
    200   %6 = load float* @gfa6, align 4
    201   %7 = load float* @gfa7, align 4
    202   %8 = load float* @gfa8, align 4
    203   %9 = load float* @gfa9, align 4
    204   %10 = load float* @gfa10, align 4
    205   %11 = load float* @gfa11, align 4
    206   %12 = load float* @gfa12, align 4
    207   %13 = load float* @gfa13, align 4
    208   %14 = load float* @gfa14, align 4
    209   %15 = load float* @gfa15, align 4
    210   %16 = load float* @gfa16, align 4
    211   %17 = load float* @gfa17, align 4
    212   %18 = load float* @gfa18, align 4
    213   %19 = load float* @gfa19, align 4
    214   %20 = load float* @gfa20, align 4
    215   tail call fastcc void @callee1(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8, float %9, float %10, float %11, float %12, float %13, float %14, float %15, float %16, float %17, float %18, float %19, float %20)
    216   ret void
    217 }
    218 
    219 define internal fastcc void @callee1(float %a0, float %a1, float %a2, float %a3, float %a4, float %a5, float %a6, float %a7, float %a8, float %a9, float %a10, float %a11, float %a12, float %a13, float %a14, float %a15, float %a16, float %a17, float %a18, float %a19, float %a20) nounwind noinline {
    220 entry:
    221 ; CHECK: callee1
    222 ; CHECK: swc1  $f0
    223 ; CHECK: swc1  $f1
    224 ; CHECK: swc1  $f2
    225 ; CHECK: swc1  $f3
    226 ; CHECK: swc1  $f4
    227 ; CHECK: swc1  $f5
    228 ; CHECK: swc1  $f6
    229 ; CHECK: swc1  $f7
    230 ; CHECK: swc1  $f8
    231 ; CHECK: swc1  $f9
    232 ; CHECK: swc1  $f10
    233 ; CHECK: swc1  $f11
    234 ; CHECK: swc1  $f12
    235 ; CHECK: swc1  $f13
    236 ; CHECK: swc1  $f14
    237 ; CHECK: swc1  $f15
    238 ; CHECK: swc1  $f16
    239 ; CHECK: swc1  $f17
    240 ; CHECK: swc1  $f18
    241 ; CHECK: swc1  $f19
    242 
    243   store float %a0, float* @gf0, align 4
    244   store float %a1, float* @gf1, align 4
    245   store float %a2, float* @gf2, align 4
    246   store float %a3, float* @gf3, align 4
    247   store float %a4, float* @gf4, align 4
    248   store float %a5, float* @gf5, align 4
    249   store float %a6, float* @gf6, align 4
    250   store float %a7, float* @gf7, align 4
    251   store float %a8, float* @gf8, align 4
    252   store float %a9, float* @gf9, align 4
    253   store float %a10, float* @gf10, align 4
    254   store float %a11, float* @gf11, align 4
    255   store float %a12, float* @gf12, align 4
    256   store float %a13, float* @gf13, align 4
    257   store float %a14, float* @gf14, align 4
    258   store float %a15, float* @gf15, align 4
    259   store float %a16, float* @gf16, align 4
    260   store float %a17, float* @gf17, align 4
    261   store float %a18, float* @gf18, align 4
    262   store float %a19, float* @gf19, align 4
    263   store float %a20, float* @gf20, align 4
    264   ret void
    265 }
    266 
    267