From: Debian BOINC Maintainers Date: Thu, 17 May 2018 08:09:59 +0000 (+0100) Subject: fix-arm64 X-Git-Tag: archive/raspbian/8.00_svn3725-2+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0465c80426782bebc4b542362bee0ad2d98836a8;p=boinc-app-seti.git fix-arm64 Gbp-Pq: Name fix-arm64.patch --- diff --git a/client/vector/analyzeFuncs_vector.cpp b/client/vector/analyzeFuncs_vector.cpp index d80e304..db74892 100644 --- a/client/vector/analyzeFuncs_vector.cpp +++ b/client/vector/analyzeFuncs_vector.cpp @@ -313,9 +313,7 @@ void SetCapabilities(void) { #ifdef USE_NEON if (strstr(app_init_data.host_info.p_features," neon ")) CPUCaps |= BA_NEON; #endif -#if defined(__aarch64__) - CPUCaps |= BA_VFPV4 | BA_VFPV4D16 | BA_VFPV3 | BA_VFPV3D16 | BA_VFP | BA_NEON; -#endif + #endif // ANDROID #endif // __arm__ #ifdef USE_MANUAL_CALLSTACK @@ -353,7 +351,7 @@ GPStb GetPowerSpectrumFuncs[]={ v_avxGetPowerSpectrum, BA_AVX, "v_avxGetPowerSpectrum", # endif #endif -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) vfp_GetPowerSpectrum, BA_VFP, "vfp_GetPowerSpectrum", #ifdef USE_NEON neon_GetPowerSpectrum, BA_NEON, "neon_GetPowerSpectrum", @@ -409,7 +407,7 @@ CDtb ChirpDataFuncs[]={ avx_ChirpData_d, BA_AVX, "avx_ChirpData_d", # endif #endif -#if (defined(__arm__) && defined(ANDROID) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) vfp_ChirpData, BA_VFP, "vfp_ChirpData", #ifdef USE_NEON neon_ChirpData, BA_NEON, "neon_ChirpData", @@ -459,7 +457,7 @@ TPtb TransposeFuncs[]={ v_avxTranspose8x8ntw_b, BA_AVX, "v_avxTranspose8x8ntw_b", # endif #endif -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__arch64__) +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) v_pfTranspose2, BA_VFP, "v_pfTranspose2", v_pfTranspose4, BA_VFP, "v_pfTranspose4", v_pfTranspose8, BA_VFP, "v_pfTranspose8", @@ -489,7 +487,7 @@ FolSub FoldSubs[] = { &AVXfold_a, BA_AVX, &AVXfold_c, BA_AVX, #endif -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) &vfpFoldMain, BA_VFP, #ifdef USE_NEON &neonFoldMain, BA_NEON, @@ -531,7 +529,7 @@ bool TestBoincSignalHandling() { __asm__ ("movl %cr4,%eax"); #elif defined(__ppc__) || defined(__sparc__) __asm__ (".long %0": : "i" (0xfeedface) ); -#elif defined(__arm__) || defined (__aarch64__) +#elif defined(__arm__) __asm__ (".word 0xf7f000f0" ); #endif #elif defined(_MSC_VER) && ( defined(_M_IX86) || defined(_M_X64) ) diff --git a/client/vector/analyzeFuncs_vector.h b/client/vector/analyzeFuncs_vector.h index 49d1dd7..c068d2a 100644 --- a/client/vector/analyzeFuncs_vector.h +++ b/client/vector/analyzeFuncs_vector.h @@ -236,7 +236,7 @@ extern int sse3_ChirpData_ak8( extern int v_vTranspose(int i, int j, float *in, float *out); #if defined(__i386__) || defined(__x86_64__) || defined(USE_SSE) || \ - (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) + (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) extern int v_pfTranspose2(int i, int j, float *in, float *out); extern int v_pfTranspose4(int i, int j, float *in, float *out); extern int v_pfTranspose8(int i, int j, float *in, float *out); @@ -249,7 +249,7 @@ extern int v_vTranspose4x8ntw(int i, int j, float *in, float *out); extern int v_vTranspose4x16ntw(int i, int j, float *in, float *out); extern int v_vpfTranspose8x4ntw(int i, int j, float *in, float *out); #endif -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) extern int v_vfpTranspose2(int i, int j, float *in, float *out); #endif #ifdef USE_FFTWF @@ -361,7 +361,7 @@ extern int v_avxGetPowerSpectrum( ); #endif -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) #ifdef USE_NEON extern int neon_GetPowerSpectrum( sah_complex * cx_FreqData, diff --git a/client/vector/analyzeFuncs_vfp_aux.cpp b/client/vector/analyzeFuncs_vfp_aux.cpp index a0fbb53..88bc9ee 100644 --- a/client/vector/analyzeFuncs_vfp_aux.cpp +++ b/client/vector/analyzeFuncs_vfp_aux.cpp @@ -33,7 +33,7 @@ #include #include -#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__) +#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) #define INVALID_CHIRP 2e+20 @@ -199,7 +199,7 @@ static inline int vfp_subTranspose2(int x, int y, float *in, float *out) { #ifdef USE_MANUAL_CALLSTACK call_stack.enter("vfp_subTranspose2()"); #endif -#ifndef __aarch64__ +#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__) __asm__ __volatile__ ( "fldmias %2, {s4, s5}\n" "fldmias %3, {s6, s7}\n" @@ -211,8 +211,18 @@ static inline int vfp_subTranspose2(int x, int y, float *in, float *out) { : : "r" (out), "r" (out+y), "r" (in), "r" (in+x) : "s3", "s4", "s5", "s6", "s7" ); -#else - v_pfsubTranspose<2>(in,out,x,y); +#elif defined(__aarch64__) + __asm__ __volatile__ ( + "ldp x4, x5, [%2], #16\n" + "ldp x6, x7, [%3], #16\n" + "mov x3,x6\n" + "mov x6,x5\n" + "mov x5,x3\n" + "stp x4, x5, [%0], #16\n" + "stp x6, x7, [%1], #16\n" + : + : "x" (out), "x" (out+y), "x" (in), "x" (in+x) + : "x3", "x4", "x5", "x6", "x7" ); #endif #ifdef USE_MANUAL_CALLSTACK call_stack.exit(); diff --git a/client/vector/fp_arm.h b/client/vector/fp_arm.h index e85ea35..9a7ba95 100644 --- a/client/vector/fp_arm.h +++ b/client/vector/fp_arm.h @@ -36,7 +36,7 @@ // work so modified without permission of the authors of those packages. // -#if (defined(__arm__) || defined(__aarch64__)) +#if defined(__arm__) #include #include #include "s_util.h" @@ -125,11 +125,7 @@ inline static unsigned int restorefp() { inline void pld(void *arg1,const int arg2=0) { __asm__ __volatile__ ( -#ifndef __aarch64__ "pld [%0,%1]\n" -#else - "prfm PLDL1STRM,[%0,%1]\n" -#endif : : "r" (arg1), "Jr" (arg2) );