2016-04-11 23:24:23 +08:00
|
|
|
; RUN: llc < %s -march=mips64el -mcpu=mips4 -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N64
|
|
|
|
; RUN: llc < %s -march=mips64el -mcpu=mips4 -target-abi n32 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N32
|
|
|
|
; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N64
|
|
|
|
; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi n32 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N32
|
2016-07-11 15:41:56 +08:00
|
|
|
; RUN: llc < %s -march=mipsel -mcpu=mips64r6 -mattr=+micromips -target-abi n32 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N32
|
|
|
|
; RUN: llc < %s -march=mipsel -mcpu=mips64r6 -mattr=+micromips -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=CHECK-N64
|
2011-10-11 09:52:31 +08:00
|
|
|
|
|
|
|
@f0 = common global float 0.000000e+00, align 4
|
|
|
|
@d0 = common global double 0.000000e+00, align 8
|
|
|
|
@f1 = common global float 0.000000e+00, align 4
|
|
|
|
@d1 = common global double 0.000000e+00, align 8
|
|
|
|
|
|
|
|
define float @funcfl1() nounwind readonly {
|
|
|
|
entry:
|
|
|
|
; CHECK-N64: funcfl1
|
|
|
|
; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(f0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N64: lwc1 $f{{[0-9]+}}, 0($[[R0]])
|
2011-10-11 09:52:31 +08:00
|
|
|
; CHECK-N32: funcfl1
|
2012-04-05 06:16:36 +08:00
|
|
|
; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(f0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N32: lwc1 $f{{[0-9]+}}, 0($[[R0]])
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load float, float* @f0, align 4
|
2011-10-11 09:52:31 +08:00
|
|
|
ret float %0
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @funcfl2() nounwind readonly {
|
|
|
|
entry:
|
|
|
|
; CHECK-N64: funcfl2
|
|
|
|
; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(d0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N64: ldc1 $f{{[0-9]+}}, 0($[[R0]])
|
2011-10-11 09:52:31 +08:00
|
|
|
; CHECK-N32: funcfl2
|
2012-04-05 06:16:36 +08:00
|
|
|
; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(d0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N32: ldc1 $f{{[0-9]+}}, 0($[[R0]])
|
|
|
|
%0 = load double, double* @d0, align 8
|
2011-10-11 09:52:31 +08:00
|
|
|
ret double %0
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @funcfs1() nounwind {
|
|
|
|
entry:
|
|
|
|
; CHECK-N64: funcfs1
|
|
|
|
; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(f0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N64: swc1 $f{{[0-9]+}}, 0($[[R0]])
|
2011-10-11 09:52:31 +08:00
|
|
|
; CHECK-N32: funcfs1
|
2012-04-05 06:16:36 +08:00
|
|
|
; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(f0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N32: swc1 $f{{[0-9]+}}, 0($[[R0]])
|
|
|
|
%0 = load float, float* @f1, align 4
|
|
|
|
store float %0, float* @f0, align 4
|
2011-10-11 09:52:31 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @funcfs2() nounwind {
|
|
|
|
entry:
|
|
|
|
; CHECK-N64: funcfs2
|
|
|
|
; CHECK-N64: ld $[[R0:[0-9]+]], %got_disp(d0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N64: sdc1 $f{{[0-9]+}}, 0($[[R0]])
|
2011-10-11 09:52:31 +08:00
|
|
|
; CHECK-N32: funcfs2
|
2012-04-05 06:16:36 +08:00
|
|
|
; CHECK-N32: lw $[[R0:[0-9]+]], %got_disp(d0)
|
2016-07-11 15:41:56 +08:00
|
|
|
; CHECK-N32: sdc1 $f{{[0-9]+}}, 0($[[R0]])
|
|
|
|
%0 = load double, double* @d1, align 8
|
|
|
|
store double %0, double* @d0, align 8
|
2011-10-11 09:52:31 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|