1 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s -check-prefix=CHECK-N64 2 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n32 | FileCheck %s -check-prefix=CHECK-N32 3 4 @f0 = common global float 0.000000e+00, align 4 5 @d0 = common global double 0.000000e+00, align 8 6 @f1 = common global float 0.000000e+00, align 4 7 @d1 = common global double 0.000000e+00, align 8 8 9 define float @funcfl1() nounwind readonly { 10 entry: 11 ; CHECK-N64: funcfl1 12 ; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(f0) 13 ; CHECK-N64: lwc1 $f{{[0-9]+}}, 0($[[R0]]) 14 ; CHECK-N32: funcfl1 15 ; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(f0) 16 ; CHECK-N32: lwc1 $f{{[0-9]+}}, 0($[[R0]]) 17 %0 = load float* @f0, align 4 18 ret float %0 19 } 20 21 define double @funcfl2() nounwind readonly { 22 entry: 23 ; CHECK-N64: funcfl2 24 ; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(d0) 25 ; CHECK-N64: ldc1 $f{{[0-9]+}}, 0($[[R0]]) 26 ; CHECK-N32: funcfl2 27 ; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(d0) 28 ; CHECK-N32: ldc1 $f{{[0-9]+}}, 0($[[R0]]) 29 %0 = load double* @d0, align 8 30 ret double %0 31 } 32 33 define void @funcfs1() nounwind { 34 entry: 35 ; CHECK-N64: funcfs1 36 ; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(f0) 37 ; CHECK-N64: swc1 $f{{[0-9]+}}, 0($[[R0]]) 38 ; CHECK-N32: funcfs1 39 ; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(f0) 40 ; CHECK-N32: swc1 $f{{[0-9]+}}, 0($[[R0]]) 41 %0 = load float* @f1, align 4 42 store float %0, float* @f0, align 4 43 ret void 44 } 45 46 define void @funcfs2() nounwind { 47 entry: 48 ; CHECK-N64: funcfs2 49 ; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(d0) 50 ; CHECK-N64: sdc1 $f{{[0-9]+}}, 0($[[R0]]) 51 ; CHECK-N32: funcfs2 52 ; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(d0) 53 ; CHECK-N32: sdc1 $f{{[0-9]+}}, 0($[[R0]]) 54 %0 = load double* @d1, align 8 55 store double %0, double* @d0, align 8 56 ret void 57 } 58 59