arm: add softfp support in kernel/arm/nrm2_vfp*.S

This commit is contained in:
Ashwin Sekhar T K 2017-07-01 19:57:28 +05:30
parent 54915ce343
commit e25f4c01d6
4 changed files with 24 additions and 12 deletions

View File

@ -52,6 +52,11 @@ DDOTKERNEL = ddot_vfp.S
CDOTKERNEL = cdot_vfp.S
ZDOTKERNEL = zdot_vfp.S
SNRM2KERNEL = nrm2_vfp.S
DNRM2KERNEL = nrm2_vfp.S
CNRM2KERNEL = nrm2_vfp.S
ZNRM2KERNEL = nrm2_vfp.S
SGEMMKERNEL = ../generic/gemmkernel_4x2.c
ifneq ($(SGEMM_UNROLL_M), $(SGEMM_UNROLL_N))
SGEMMINCOPY = sgemm_ncopy_4_vfp.S
@ -91,11 +96,6 @@ ZGEMMOTCOPYOBJ = zgemm_otcopy.o
ifeq ($(ARM_ABI),hard)
SNRM2KERNEL = nrm2_vfp.S
DNRM2KERNEL = nrm2_vfp.S
CNRM2KERNEL = nrm2_vfp.S
ZNRM2KERNEL = nrm2_vfp.S
SSWAPKERNEL = swap_vfp.S
DSWAPKERNEL = swap_vfp.S
CSWAPKERNEL = swap_vfp.S

View File

@ -1,5 +1,10 @@
include $(KERNELDIR)/KERNEL.ARMV6
SNRM2KERNEL = nrm2_vfpv3.S
DNRM2KERNEL = nrm2_vfpv3.S
CNRM2KERNEL = nrm2_vfpv3.S
ZNRM2KERNEL = nrm2_vfpv3.S
STRMMKERNEL = ../generic/trmmkernel_4x4.c
DTRMMKERNEL = ../generic/trmmkernel_4x4.c
@ -17,11 +22,6 @@ DGEMMOTCOPYOBJ = dgemm_otcopy.o
ifeq ($(ARM_ABI),hard)
SNRM2KERNEL = nrm2_vfpv3.S
DNRM2KERNEL = nrm2_vfpv3.S
CNRM2KERNEL = nrm2_vfpv3.S
ZNRM2KERNEL = nrm2_vfpv3.S
SGEMVNKERNEL = gemv_n_vfpv3.S
DGEMVNKERNEL = gemv_n_vfpv3.S

View File

@ -573,6 +573,13 @@ nrm2_kernel_L999:
#else
vsqrt.f32 s1, s1
vmul.f32 s0, s0, s1
#endif
#if !defined(__ARM_PCS_VFP)
#if !defined(DOUBLE)
vmov r0, s0
#else
vmov r0, r1, d0
#endif
#endif
bx lr

View File

@ -503,8 +503,13 @@ nrm2_kernel_L999:
#else
vsqrt.f32 s1, s1
vmul.f32 s0, s0, s1
#ifdef ARM_SOFTFP_ABI
vmov r0, s0
#endif
#if !defined(__ARM_PCS_VFP)
#if defined(DOUBLE)
vmov r0, r1, d0
#else
vmov r0, s0
#endif
#endif