1 ; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=static -O3 < %s -mips-os16 | FileCheck %s -check-prefix=32 2 3 @x = global float 1.000000e+00, align 4 4 @y = global float 2.000000e+00, align 4 5 @zz = common global float 0.000000e+00, align 4 6 @z = common global float 0.000000e+00, align 4 7 8 define float @fv() #0 { 9 entry: 10 ret float 1.000000e+00 11 } 12 13 ; 32: .set nomips16 14 ; 32: .ent fv 15 ; 32: .set noreorder 16 ; 32: .set nomacro 17 ; 32: .set noat 18 ; 32: jr $ra 19 ; 32: .set at 20 ; 32: .set macro 21 ; 32: .set reorder 22 ; 32: .end fv 23 24 define double @dv() #0 { 25 entry: 26 ret double 2.000000e+00 27 } 28 29 ; 32: .set nomips16 30 ; 32: .ent dv 31 ; 32: .set noreorder 32 ; 32: .set nomacro 33 ; 32: .set noat 34 ; 32: jr $ra 35 ; 32: .set at 36 ; 32: .set macro 37 ; 32: .set reorder 38 ; 32: .end dv 39 40 define void @vf(float %x) #0 { 41 entry: 42 %x.addr = alloca float, align 4 43 store float %x, float* %x.addr, align 4 44 ret void 45 } 46 47 ; 32: .set nomips16 48 ; 32: .ent vf 49 ; 32: .set noreorder 50 ; 32: .set nomacro 51 ; 32: .set noat 52 ; 32: jr $ra 53 ; 32: .set at 54 ; 32: .set macro 55 ; 32: .set reorder 56 ; 32: .end vf 57 58 define void @vd(double %x) #0 { 59 entry: 60 %x.addr = alloca double, align 8 61 store double %x, double* %x.addr, align 8 62 ret void 63 } 64 65 ; 32: .set nomips16 66 ; 32: .ent vd 67 ; 32: .set noreorder 68 ; 32: .set nomacro 69 ; 32: .set noat 70 ; 32: jr $ra 71 ; 32: .set at 72 ; 32: .set macro 73 ; 32: .set reorder 74 ; 32: .end vd 75 76 define void @foo1() #0 { 77 entry: 78 store float 1.000000e+00, float* @zz, align 4 79 %0 = load float, float* @y, align 4 80 %1 = load float, float* @x, align 4 81 %add = fadd float %0, %1 82 store float %add, float* @z, align 4 83 ret void 84 } 85 86 ; 32: .set nomips16 87 ; 32: .ent foo1 88 ; 32: .set noreorder 89 ; 32: .set nomacro 90 ; 32: .set noat 91 ; 32: jr $ra 92 ; 32: .set at 93 ; 32: .set macro 94 ; 32: .set reorder 95 ; 32: .end foo1 96 97 define void @foo2() #0 { 98 entry: 99 %0 = load float, float* @x, align 4 100 call void @vf(float %0) 101 ret void 102 } 103 104 105 ; 32: .set nomips16 106 ; 32: .ent foo2 107 ; 32: .set noreorder 108 ; 32: .set nomacro 109 ; 32: .set noat 110 ; 32: jr $ra 111 ; 32: .set at 112 ; 32: .set macro 113 ; 32: .set reorder 114 ; 32: .end foo2 115 116 define void @foo3() #0 { 117 entry: 118 %call = call float @fv() 119 store float %call, float* @x, align 4 120 ret void 121 } 122 123 ; 32: .set nomips16 124 ; 32: .ent foo3 125 ; 32: .set noreorder 126 ; 32: .set nomacro 127 ; 32: .set noat 128 ; 32: jr $ra 129 ; 32: .set at 130 ; 32: .set macro 131 ; 32: .set reorder 132 ; 32: .end foo3 133 134 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" } 135 136 define void @vv() #0 { 137 entry: 138 ret void 139 } 140 141 ; 32: .set mips16 142 ; 32: .ent vv 143 144 ; 32: save {{.+}} 145 ; 32: restore {{.+}} 146 ; 32: .end vv 147 148 149 150