You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ztrsm_kernel_LN.S 40 kB

rebase? (#1) * With the Intel compiler on Linux, prefer ifort for the final link step icc has known problems with mixed-language builds that ifort can handle just fine. Fixes #1956 * Rename operands to put lda on the input/output constraint list * Fix wrong constraints in inline assembly for #2009 * Fix inline assembly constraints rework indices to allow marking argument lda4 as input and output. For #2009 * Fix inline assembly constraints rework indices to allow marking argument lda as input and output. * Fix inline assembly constraints * Fix inline assembly constraints * Fix inline assembly constraints in Bulldozer TRSM kernels rework indices to allow marking i,as and bs as both input and output (marked operand n1 as well for simplicity). For #2009 * Correct range_n limiting same bug as seen in #1388, somehow missed in corresponding PR #1389 * Allow multithreading TRMV again revert workaround introduced for issue #1332 as the actual cause appears to be my incorrect fix from #1262 (see #1388) * Fix error introduced during cleanup * Reduce list of kernels in the dynamic arch build to make compilation complete reliably within the 1h limit again * init * move fix to right place * Fix missing -c option in AVX512 test * Fix AVX512 test always returning false due to missing compiler option * Make x86_32 imply NO_AVX2, NO_AVX512 in addition to NO_AVX fixes #2033 * Keep xcode8.3 for osx BINARY=32 build as xcode10 deprecated i386 * Make sure that AVX512 is disabled in 32bit builds for #2033 * Improve handling of NO_STATIC and NO_SHARED to avoid surprises from defining either as zero. Fixes #2035 by addressing some concerns from #1422 * init * address warning introed with #1814 et al * Restore locking optimizations for OpenMP case restore another accidentally dropped part of #1468 that was missed in #2004 to address performance regression reported in #1461 * HiSilicon tsv110 CPUs optimization branch add HiSilicon tsv110 CPUs optimization branch * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * Fix module definition conflicts between LAPACK and ReLAPACK for #2043 * Do not compile in AVX512 check if AVX support is disabled xgetbv is function depends on NO_AVX being undefined - we could change that too, but that combo is unlikely to work anyway * ctest.c : add __POWERPC__ for PowerMac * Fix crash in sgemm SSE/nano kernel on x86_64 Fix bug #2047. Signed-off-by: Celelibi <celelibi@gmail.com> * param.h : enable defines for PPC970 on DarwinOS fixes: gemm.c: In function 'sgemm_': ../common_param.h:981:18: error: 'SGEMM_DEFAULT_P' undeclared (first use in this function) #define SGEMM_P SGEMM_DEFAULT_P ^ * common_power.h: force DCBT_ARG 0 on PPC970 Darwin without this, we see ../kernel/power/gemv_n.S:427:Parameter syntax error and many more similar entries that relates to this assembly command dcbt 8, r24, r18 this change makes the DCBT_ARG = 0 and openblas builds through to completion on PowerMac 970 Tests pass * Make TARGET=GENERIC compatible with DYNAMIC_ARCH=1 for issue #2048 * make DYNAMIC_ARCH=1 package work on TSV110. * make DYNAMIC_ARCH=1 package work on TSV110 * Add Intel Denverton for #2048 * Add Intel Denverton * Change 64-bit detection as explained in #2056 * Trivial typo fix as suggested in #2022 * Disable the AVX512 DGEMM kernel (again) Due to as yet unresolved errors seen in #1955 and #2029 * Use POSIX getenv on Cygwin The Windows-native GetEnvironmentVariable cannot be relied on, as Cygwin does not always copy environment variables set through Cygwin to the Windows environment block, particularly after fork(). * Fix for #2063: The DllMain used in Cygwin did not run the thread memory pool cleanup upon THREAD_DETACH which is needed when compiled with USE_TLS=1. * Also call CloseHandle on each thread, as well as on the event so as to not leak thread handles. * AIX asm syntax changes needed for shared object creation * power9 makefile. dgemm based on power8 kernel with following changes : 32x unrolled 16x4 kernel and 8x4 kernel using (lxv stxv butterfly rank1 update). improvement from 17 to 22-23gflops. dtrmm cases were added into dgemm itself * Expose CBLAS interfaces for I?MIN and I?MAX * Build CBLAS interfaces for I?MIN and I?MAX * Add declarations for ?sum and cblas_?sum * Add interface for ?sum (derived from ?asum) * Add ?sum * Add implementations of ssum/dsum and csum/zsum as trivial copies of asum/zsasum with the fabs calls replaced by fmov to preserve code structure * Add ARM implementations of ?sum (trivial copies of the respective ?asum with the fabs calls removed) * Add ARM64 implementations of ?sum as trivial copies of the respective ?asum kernels with the fabs calls removed * Add ia64 implementation of ?sum as trivial copy of asum with the fabs calls removed * Add MIPS implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add MIPS64 implementation of ?sum as trivial copy of ?asum with the fabs replaced by mov to preserve code structure * Add POWER implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmr to preserve code structure * Add SPARC implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmov to preserve code structure * Add x86 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add x86_64 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add ZARCH implementation of ?sum as trivial copies of the respective ?asum kernels with the ABS and vflpsb calls removed * Detect 32bit environment on 64bit ARM hardware for #2056, using same approach as #2058 * Add cmake defaults for ?sum kernels * Add ?sum * Add ?sum definitions for generic kernel * Add declarations for ?sum * Add -lm and disable EXPRECISION support on *BSD fixes #2075 * Add in runtime CPU detection for POWER. * snprintf define consolidated to common.h * Support INTERFACE64=1 * Add support for INTERFACE64 and fix XERBLA calls 1. Replaced all instances of "int" with "blasint" 2. Added string length as "hidden" third parameter in calls to fortran XERBLA * Correct length of name string in xerbla call * Avoid out-of-bounds accesses in LAPACK EIG tests see https://github.com/Reference-LAPACK/lapack/issues/333 * Correct INFO=4 condition * Disable reallocation of work array in xSYTRF as it appears to cause memory management problems (seen in the LAPACK tests) * Disable repeated recursion on Ab_BR in ReLAPACK xGBTRF due to crashes in LAPACK tests * sgemm/strmm * Update Changelog with changes from 0.3.6 * Increment version to 0.3.7.dev * Increment version to 0.3.7.dev * Misc. typo fixes Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib` * Correct argument of CPU_ISSET for glibc <2.5 fixes #2104 * conflict resolve * Revert reference/ fixes * Revert Changelog.txt typos * Disable the SkyLakeX DGEMMITCOPY kernel as well as a stopgap measure for https://github.com/numpy/numpy/issues/13401 as mentioned in #1955 * Disable DGEMMINCOPY as well for now #1955 * init * Fix errors in cpu enumeration with glibc 2.6 for #2114 * Change two http links to https Closes #2109 * remove redundant code #2113 * Set up CI with Azure Pipelines [skip ci] * TST: add native POWER8 to CI * add native POWER8 testing to Travis CI matrix with ppc64le os entry * Update link to IBM MASS library, update cpu support status * first try migrating one of the arm builds from travis * fix tabbing in azure commands * Update azure-pipelines.yml take out offending lines (although stolen from https://github.com/conda-forge/opencv-feedstock azure-pipelines fiie) * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * DOC: Add Azure CI status badge * Add ARMV6 build to azure CI setup (#2122) using aytekinar's Alpine image and docker script from the Travis setup [skip ci] * TST: Azure manylinux1 & clean-up * remove some of the steps & comments from the original Azure yml template * modify the trigger section to use develop since OpenBLAS primarily uses this branch; use the same batching behavior as downstream projects NumPy/ SciPy * remove Travis emulated ARMv6 gcc build because this now happens in Azure * use documented Ubuntu vmImage name for Azure and add in a manylinux1 test run to the matrix [skip appveyor] * Add NO_AFFINITY to available options on Linux, and set it to ON to match the gmake default. Fixes second part of #2114 * Replace ISMIN and ISAMIN kernels on all x86_64 platforms (#2125) * Mark iamax_sse.S as unsuitable for MIN due to issue #2116 * Use iamax.S rather than iamax_sse.S for ISMIN/ISAMIN on all x86_64 as workaround for #2116 * Move ARMv8 gcc build from Travis to Azure * Move ARMv8 gcc build from Travis to Azure * Update .travis.yml * Test drone CI * install make * remove sudo * Install gcc * Install perl * Install gfortran and add a clang job * gfortran->gcc-gfortran * Switch to ubuntu and parallel jobs * apt update * Fix typo * update yes * no need of gcc in clang build * Add a cmake build as well * Add cmake builds and print options * build without lapack on cmake * parallel build * See if ubuntu 19.04 fixes the ICE * Remove qemu armv8 builds * arm32 build * Fix typo * TST: add SkylakeX AVX512 CI test * adapt the C-level reproducer code for some recent SkylakeX AVX512 kernel issues, provided by Isuru Fernando and modified by Martin Kroeker, for usage in the utest suite * add an Intel SDE SkylakeX emulation utest run to the Azure CI matrix; a custom Docker build was required because Ubuntu image provided by Azure does not support AVX512VL instructions * Add option USE_LOCKING for single-threaded build with locking support for calling from concurrent threads * Add option USE_LOCKING for single-threaded build with locking support * Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds * Add option USE_LOCKING but keep default settings intact * Remove unrelated change * Do not try ancient PGI hacks with recent versions of that compiler should fix #2139 * Build and run utests in any case, they do their own checks for fortran availability * Add softfp support in min/max kernels fix for #1912 * Revert "Add softfp support in min/max kernels" * Separate implementations of AMAX and IAMAX on arm As noted in #1912 and comment on #1942, the combined implementation happens to "do the right thing" on hardfp, but cannot return both value and index on softfp where they would have to share the return register * Ensure correct output for DAMAX with softfp * Use generic kernels for complex (I)AMAX to support softfp * improved zgemm power9 based on power8 * upload thread safety test folder * hook up c++ thread safety test (main Makefile) * add c++ thread test option to Makefile.rule * Document NO_AVX512 for #2151 * sgemm pipeline improved, zgemm rewritten without inner packs, ABI lxvx v20 fixed with vs52 * Fix detection of AVX512 capable compilers in getarch 21eda8b5 introduced a check in getarch.c to test if the compiler is capable of AVX512. This check currently fails, since the used __AVX2__ macro is only defined if getarch itself was compiled with AVX2/AVX512 support. Make sure this is the case by building getarch with -march=native on x86_64. It is only supposed to run on the build host anyway. * c_check: Unlink correct file * power9 zgemm ztrmm optimized * conflict resolve * Add gfortran workaround for ABI violations in LAPACKE for #2154 (see gcc bug 90329) * Add gfortran workaround for ABI violations for #2154 (see gcc bug 90329) * Add gfortran workaround for potential ABI violation for #2154 * Update fc.cmake * Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds from #2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway. * Avoid unintentional activation of TLS code via USE_TLS=0 fixes #2149 * Do not force gcc options on non-gcc compilers fixes compile failure with pgi 18.10 as reported on OpenBLAS-users * Update Makefile.x86_64 * Zero ecx with a mov instruction PGI assembler does not like the initialization in the constraints. * Fix mov syntax * new sgemm 8x16 * Update dtrmm_kernel_16x4_power8.S * PGI compiler does not like -march=native * Fix build on FreeBSD/powerpc64. Signed-off-by: Piotr Kubaj <pkubaj@anongoth.pl> * Fix build for PPC970 on FreeBSD pt. 1 FreeBSD needs DCBT_ARG=0 as well. * Fix build for PPC970 on FreeBSD pt.2 FreeBSD needs those macros too. * cgemm/ctrmm power9 * Utest needs CBLAS but not necessarily FORTRAN * Add mingw builds to Appveyor config * Add getarch flags to disable AVX on x86 (and other small fixes to match Makefile behaviour) * Make disabling DYNAMIC_ARCH on unsupported systems work needs to be unset in the cache for the change to have any effect * Mingw32 needs leading underscore on object names (also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)
7 years ago
rebase? (#1) * With the Intel compiler on Linux, prefer ifort for the final link step icc has known problems with mixed-language builds that ifort can handle just fine. Fixes #1956 * Rename operands to put lda on the input/output constraint list * Fix wrong constraints in inline assembly for #2009 * Fix inline assembly constraints rework indices to allow marking argument lda4 as input and output. For #2009 * Fix inline assembly constraints rework indices to allow marking argument lda as input and output. * Fix inline assembly constraints * Fix inline assembly constraints * Fix inline assembly constraints in Bulldozer TRSM kernels rework indices to allow marking i,as and bs as both input and output (marked operand n1 as well for simplicity). For #2009 * Correct range_n limiting same bug as seen in #1388, somehow missed in corresponding PR #1389 * Allow multithreading TRMV again revert workaround introduced for issue #1332 as the actual cause appears to be my incorrect fix from #1262 (see #1388) * Fix error introduced during cleanup * Reduce list of kernels in the dynamic arch build to make compilation complete reliably within the 1h limit again * init * move fix to right place * Fix missing -c option in AVX512 test * Fix AVX512 test always returning false due to missing compiler option * Make x86_32 imply NO_AVX2, NO_AVX512 in addition to NO_AVX fixes #2033 * Keep xcode8.3 for osx BINARY=32 build as xcode10 deprecated i386 * Make sure that AVX512 is disabled in 32bit builds for #2033 * Improve handling of NO_STATIC and NO_SHARED to avoid surprises from defining either as zero. Fixes #2035 by addressing some concerns from #1422 * init * address warning introed with #1814 et al * Restore locking optimizations for OpenMP case restore another accidentally dropped part of #1468 that was missed in #2004 to address performance regression reported in #1461 * HiSilicon tsv110 CPUs optimization branch add HiSilicon tsv110 CPUs optimization branch * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * Fix module definition conflicts between LAPACK and ReLAPACK for #2043 * Do not compile in AVX512 check if AVX support is disabled xgetbv is function depends on NO_AVX being undefined - we could change that too, but that combo is unlikely to work anyway * ctest.c : add __POWERPC__ for PowerMac * Fix crash in sgemm SSE/nano kernel on x86_64 Fix bug #2047. Signed-off-by: Celelibi <celelibi@gmail.com> * param.h : enable defines for PPC970 on DarwinOS fixes: gemm.c: In function 'sgemm_': ../common_param.h:981:18: error: 'SGEMM_DEFAULT_P' undeclared (first use in this function) #define SGEMM_P SGEMM_DEFAULT_P ^ * common_power.h: force DCBT_ARG 0 on PPC970 Darwin without this, we see ../kernel/power/gemv_n.S:427:Parameter syntax error and many more similar entries that relates to this assembly command dcbt 8, r24, r18 this change makes the DCBT_ARG = 0 and openblas builds through to completion on PowerMac 970 Tests pass * Make TARGET=GENERIC compatible with DYNAMIC_ARCH=1 for issue #2048 * make DYNAMIC_ARCH=1 package work on TSV110. * make DYNAMIC_ARCH=1 package work on TSV110 * Add Intel Denverton for #2048 * Add Intel Denverton * Change 64-bit detection as explained in #2056 * Trivial typo fix as suggested in #2022 * Disable the AVX512 DGEMM kernel (again) Due to as yet unresolved errors seen in #1955 and #2029 * Use POSIX getenv on Cygwin The Windows-native GetEnvironmentVariable cannot be relied on, as Cygwin does not always copy environment variables set through Cygwin to the Windows environment block, particularly after fork(). * Fix for #2063: The DllMain used in Cygwin did not run the thread memory pool cleanup upon THREAD_DETACH which is needed when compiled with USE_TLS=1. * Also call CloseHandle on each thread, as well as on the event so as to not leak thread handles. * AIX asm syntax changes needed for shared object creation * power9 makefile. dgemm based on power8 kernel with following changes : 32x unrolled 16x4 kernel and 8x4 kernel using (lxv stxv butterfly rank1 update). improvement from 17 to 22-23gflops. dtrmm cases were added into dgemm itself * Expose CBLAS interfaces for I?MIN and I?MAX * Build CBLAS interfaces for I?MIN and I?MAX * Add declarations for ?sum and cblas_?sum * Add interface for ?sum (derived from ?asum) * Add ?sum * Add implementations of ssum/dsum and csum/zsum as trivial copies of asum/zsasum with the fabs calls replaced by fmov to preserve code structure * Add ARM implementations of ?sum (trivial copies of the respective ?asum with the fabs calls removed) * Add ARM64 implementations of ?sum as trivial copies of the respective ?asum kernels with the fabs calls removed * Add ia64 implementation of ?sum as trivial copy of asum with the fabs calls removed * Add MIPS implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add MIPS64 implementation of ?sum as trivial copy of ?asum with the fabs replaced by mov to preserve code structure * Add POWER implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmr to preserve code structure * Add SPARC implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmov to preserve code structure * Add x86 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add x86_64 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add ZARCH implementation of ?sum as trivial copies of the respective ?asum kernels with the ABS and vflpsb calls removed * Detect 32bit environment on 64bit ARM hardware for #2056, using same approach as #2058 * Add cmake defaults for ?sum kernels * Add ?sum * Add ?sum definitions for generic kernel * Add declarations for ?sum * Add -lm and disable EXPRECISION support on *BSD fixes #2075 * Add in runtime CPU detection for POWER. * snprintf define consolidated to common.h * Support INTERFACE64=1 * Add support for INTERFACE64 and fix XERBLA calls 1. Replaced all instances of "int" with "blasint" 2. Added string length as "hidden" third parameter in calls to fortran XERBLA * Correct length of name string in xerbla call * Avoid out-of-bounds accesses in LAPACK EIG tests see https://github.com/Reference-LAPACK/lapack/issues/333 * Correct INFO=4 condition * Disable reallocation of work array in xSYTRF as it appears to cause memory management problems (seen in the LAPACK tests) * Disable repeated recursion on Ab_BR in ReLAPACK xGBTRF due to crashes in LAPACK tests * sgemm/strmm * Update Changelog with changes from 0.3.6 * Increment version to 0.3.7.dev * Increment version to 0.3.7.dev * Misc. typo fixes Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib` * Correct argument of CPU_ISSET for glibc <2.5 fixes #2104 * conflict resolve * Revert reference/ fixes * Revert Changelog.txt typos * Disable the SkyLakeX DGEMMITCOPY kernel as well as a stopgap measure for https://github.com/numpy/numpy/issues/13401 as mentioned in #1955 * Disable DGEMMINCOPY as well for now #1955 * init * Fix errors in cpu enumeration with glibc 2.6 for #2114 * Change two http links to https Closes #2109 * remove redundant code #2113 * Set up CI with Azure Pipelines [skip ci] * TST: add native POWER8 to CI * add native POWER8 testing to Travis CI matrix with ppc64le os entry * Update link to IBM MASS library, update cpu support status * first try migrating one of the arm builds from travis * fix tabbing in azure commands * Update azure-pipelines.yml take out offending lines (although stolen from https://github.com/conda-forge/opencv-feedstock azure-pipelines fiie) * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * DOC: Add Azure CI status badge * Add ARMV6 build to azure CI setup (#2122) using aytekinar's Alpine image and docker script from the Travis setup [skip ci] * TST: Azure manylinux1 & clean-up * remove some of the steps & comments from the original Azure yml template * modify the trigger section to use develop since OpenBLAS primarily uses this branch; use the same batching behavior as downstream projects NumPy/ SciPy * remove Travis emulated ARMv6 gcc build because this now happens in Azure * use documented Ubuntu vmImage name for Azure and add in a manylinux1 test run to the matrix [skip appveyor] * Add NO_AFFINITY to available options on Linux, and set it to ON to match the gmake default. Fixes second part of #2114 * Replace ISMIN and ISAMIN kernels on all x86_64 platforms (#2125) * Mark iamax_sse.S as unsuitable for MIN due to issue #2116 * Use iamax.S rather than iamax_sse.S for ISMIN/ISAMIN on all x86_64 as workaround for #2116 * Move ARMv8 gcc build from Travis to Azure * Move ARMv8 gcc build from Travis to Azure * Update .travis.yml * Test drone CI * install make * remove sudo * Install gcc * Install perl * Install gfortran and add a clang job * gfortran->gcc-gfortran * Switch to ubuntu and parallel jobs * apt update * Fix typo * update yes * no need of gcc in clang build * Add a cmake build as well * Add cmake builds and print options * build without lapack on cmake * parallel build * See if ubuntu 19.04 fixes the ICE * Remove qemu armv8 builds * arm32 build * Fix typo * TST: add SkylakeX AVX512 CI test * adapt the C-level reproducer code for some recent SkylakeX AVX512 kernel issues, provided by Isuru Fernando and modified by Martin Kroeker, for usage in the utest suite * add an Intel SDE SkylakeX emulation utest run to the Azure CI matrix; a custom Docker build was required because Ubuntu image provided by Azure does not support AVX512VL instructions * Add option USE_LOCKING for single-threaded build with locking support for calling from concurrent threads * Add option USE_LOCKING for single-threaded build with locking support * Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds * Add option USE_LOCKING but keep default settings intact * Remove unrelated change * Do not try ancient PGI hacks with recent versions of that compiler should fix #2139 * Build and run utests in any case, they do their own checks for fortran availability * Add softfp support in min/max kernels fix for #1912 * Revert "Add softfp support in min/max kernels" * Separate implementations of AMAX and IAMAX on arm As noted in #1912 and comment on #1942, the combined implementation happens to "do the right thing" on hardfp, but cannot return both value and index on softfp where they would have to share the return register * Ensure correct output for DAMAX with softfp * Use generic kernels for complex (I)AMAX to support softfp * improved zgemm power9 based on power8 * upload thread safety test folder * hook up c++ thread safety test (main Makefile) * add c++ thread test option to Makefile.rule * Document NO_AVX512 for #2151 * sgemm pipeline improved, zgemm rewritten without inner packs, ABI lxvx v20 fixed with vs52 * Fix detection of AVX512 capable compilers in getarch 21eda8b5 introduced a check in getarch.c to test if the compiler is capable of AVX512. This check currently fails, since the used __AVX2__ macro is only defined if getarch itself was compiled with AVX2/AVX512 support. Make sure this is the case by building getarch with -march=native on x86_64. It is only supposed to run on the build host anyway. * c_check: Unlink correct file * power9 zgemm ztrmm optimized * conflict resolve * Add gfortran workaround for ABI violations in LAPACKE for #2154 (see gcc bug 90329) * Add gfortran workaround for ABI violations for #2154 (see gcc bug 90329) * Add gfortran workaround for potential ABI violation for #2154 * Update fc.cmake * Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds from #2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway. * Avoid unintentional activation of TLS code via USE_TLS=0 fixes #2149 * Do not force gcc options on non-gcc compilers fixes compile failure with pgi 18.10 as reported on OpenBLAS-users * Update Makefile.x86_64 * Zero ecx with a mov instruction PGI assembler does not like the initialization in the constraints. * Fix mov syntax * new sgemm 8x16 * Update dtrmm_kernel_16x4_power8.S * PGI compiler does not like -march=native * Fix build on FreeBSD/powerpc64. Signed-off-by: Piotr Kubaj <pkubaj@anongoth.pl> * Fix build for PPC970 on FreeBSD pt. 1 FreeBSD needs DCBT_ARG=0 as well. * Fix build for PPC970 on FreeBSD pt.2 FreeBSD needs those macros too. * cgemm/ctrmm power9 * Utest needs CBLAS but not necessarily FORTRAN * Add mingw builds to Appveyor config * Add getarch flags to disable AVX on x86 (and other small fixes to match Makefile behaviour) * Make disabling DYNAMIC_ARCH on unsupported systems work needs to be unset in the cache for the change to have any effect * Mingw32 needs leading underscore on object names (also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)
7 years ago
rebase? (#1) * With the Intel compiler on Linux, prefer ifort for the final link step icc has known problems with mixed-language builds that ifort can handle just fine. Fixes #1956 * Rename operands to put lda on the input/output constraint list * Fix wrong constraints in inline assembly for #2009 * Fix inline assembly constraints rework indices to allow marking argument lda4 as input and output. For #2009 * Fix inline assembly constraints rework indices to allow marking argument lda as input and output. * Fix inline assembly constraints * Fix inline assembly constraints * Fix inline assembly constraints in Bulldozer TRSM kernels rework indices to allow marking i,as and bs as both input and output (marked operand n1 as well for simplicity). For #2009 * Correct range_n limiting same bug as seen in #1388, somehow missed in corresponding PR #1389 * Allow multithreading TRMV again revert workaround introduced for issue #1332 as the actual cause appears to be my incorrect fix from #1262 (see #1388) * Fix error introduced during cleanup * Reduce list of kernels in the dynamic arch build to make compilation complete reliably within the 1h limit again * init * move fix to right place * Fix missing -c option in AVX512 test * Fix AVX512 test always returning false due to missing compiler option * Make x86_32 imply NO_AVX2, NO_AVX512 in addition to NO_AVX fixes #2033 * Keep xcode8.3 for osx BINARY=32 build as xcode10 deprecated i386 * Make sure that AVX512 is disabled in 32bit builds for #2033 * Improve handling of NO_STATIC and NO_SHARED to avoid surprises from defining either as zero. Fixes #2035 by addressing some concerns from #1422 * init * address warning introed with #1814 et al * Restore locking optimizations for OpenMP case restore another accidentally dropped part of #1468 that was missed in #2004 to address performance regression reported in #1461 * HiSilicon tsv110 CPUs optimization branch add HiSilicon tsv110 CPUs optimization branch * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * Fix module definition conflicts between LAPACK and ReLAPACK for #2043 * Do not compile in AVX512 check if AVX support is disabled xgetbv is function depends on NO_AVX being undefined - we could change that too, but that combo is unlikely to work anyway * ctest.c : add __POWERPC__ for PowerMac * Fix crash in sgemm SSE/nano kernel on x86_64 Fix bug #2047. Signed-off-by: Celelibi <celelibi@gmail.com> * param.h : enable defines for PPC970 on DarwinOS fixes: gemm.c: In function 'sgemm_': ../common_param.h:981:18: error: 'SGEMM_DEFAULT_P' undeclared (first use in this function) #define SGEMM_P SGEMM_DEFAULT_P ^ * common_power.h: force DCBT_ARG 0 on PPC970 Darwin without this, we see ../kernel/power/gemv_n.S:427:Parameter syntax error and many more similar entries that relates to this assembly command dcbt 8, r24, r18 this change makes the DCBT_ARG = 0 and openblas builds through to completion on PowerMac 970 Tests pass * Make TARGET=GENERIC compatible with DYNAMIC_ARCH=1 for issue #2048 * make DYNAMIC_ARCH=1 package work on TSV110. * make DYNAMIC_ARCH=1 package work on TSV110 * Add Intel Denverton for #2048 * Add Intel Denverton * Change 64-bit detection as explained in #2056 * Trivial typo fix as suggested in #2022 * Disable the AVX512 DGEMM kernel (again) Due to as yet unresolved errors seen in #1955 and #2029 * Use POSIX getenv on Cygwin The Windows-native GetEnvironmentVariable cannot be relied on, as Cygwin does not always copy environment variables set through Cygwin to the Windows environment block, particularly after fork(). * Fix for #2063: The DllMain used in Cygwin did not run the thread memory pool cleanup upon THREAD_DETACH which is needed when compiled with USE_TLS=1. * Also call CloseHandle on each thread, as well as on the event so as to not leak thread handles. * AIX asm syntax changes needed for shared object creation * power9 makefile. dgemm based on power8 kernel with following changes : 32x unrolled 16x4 kernel and 8x4 kernel using (lxv stxv butterfly rank1 update). improvement from 17 to 22-23gflops. dtrmm cases were added into dgemm itself * Expose CBLAS interfaces for I?MIN and I?MAX * Build CBLAS interfaces for I?MIN and I?MAX * Add declarations for ?sum and cblas_?sum * Add interface for ?sum (derived from ?asum) * Add ?sum * Add implementations of ssum/dsum and csum/zsum as trivial copies of asum/zsasum with the fabs calls replaced by fmov to preserve code structure * Add ARM implementations of ?sum (trivial copies of the respective ?asum with the fabs calls removed) * Add ARM64 implementations of ?sum as trivial copies of the respective ?asum kernels with the fabs calls removed * Add ia64 implementation of ?sum as trivial copy of asum with the fabs calls removed * Add MIPS implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add MIPS64 implementation of ?sum as trivial copy of ?asum with the fabs replaced by mov to preserve code structure * Add POWER implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmr to preserve code structure * Add SPARC implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmov to preserve code structure * Add x86 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add x86_64 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add ZARCH implementation of ?sum as trivial copies of the respective ?asum kernels with the ABS and vflpsb calls removed * Detect 32bit environment on 64bit ARM hardware for #2056, using same approach as #2058 * Add cmake defaults for ?sum kernels * Add ?sum * Add ?sum definitions for generic kernel * Add declarations for ?sum * Add -lm and disable EXPRECISION support on *BSD fixes #2075 * Add in runtime CPU detection for POWER. * snprintf define consolidated to common.h * Support INTERFACE64=1 * Add support for INTERFACE64 and fix XERBLA calls 1. Replaced all instances of "int" with "blasint" 2. Added string length as "hidden" third parameter in calls to fortran XERBLA * Correct length of name string in xerbla call * Avoid out-of-bounds accesses in LAPACK EIG tests see https://github.com/Reference-LAPACK/lapack/issues/333 * Correct INFO=4 condition * Disable reallocation of work array in xSYTRF as it appears to cause memory management problems (seen in the LAPACK tests) * Disable repeated recursion on Ab_BR in ReLAPACK xGBTRF due to crashes in LAPACK tests * sgemm/strmm * Update Changelog with changes from 0.3.6 * Increment version to 0.3.7.dev * Increment version to 0.3.7.dev * Misc. typo fixes Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib` * Correct argument of CPU_ISSET for glibc <2.5 fixes #2104 * conflict resolve * Revert reference/ fixes * Revert Changelog.txt typos * Disable the SkyLakeX DGEMMITCOPY kernel as well as a stopgap measure for https://github.com/numpy/numpy/issues/13401 as mentioned in #1955 * Disable DGEMMINCOPY as well for now #1955 * init * Fix errors in cpu enumeration with glibc 2.6 for #2114 * Change two http links to https Closes #2109 * remove redundant code #2113 * Set up CI with Azure Pipelines [skip ci] * TST: add native POWER8 to CI * add native POWER8 testing to Travis CI matrix with ppc64le os entry * Update link to IBM MASS library, update cpu support status * first try migrating one of the arm builds from travis * fix tabbing in azure commands * Update azure-pipelines.yml take out offending lines (although stolen from https://github.com/conda-forge/opencv-feedstock azure-pipelines fiie) * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * DOC: Add Azure CI status badge * Add ARMV6 build to azure CI setup (#2122) using aytekinar's Alpine image and docker script from the Travis setup [skip ci] * TST: Azure manylinux1 & clean-up * remove some of the steps & comments from the original Azure yml template * modify the trigger section to use develop since OpenBLAS primarily uses this branch; use the same batching behavior as downstream projects NumPy/ SciPy * remove Travis emulated ARMv6 gcc build because this now happens in Azure * use documented Ubuntu vmImage name for Azure and add in a manylinux1 test run to the matrix [skip appveyor] * Add NO_AFFINITY to available options on Linux, and set it to ON to match the gmake default. Fixes second part of #2114 * Replace ISMIN and ISAMIN kernels on all x86_64 platforms (#2125) * Mark iamax_sse.S as unsuitable for MIN due to issue #2116 * Use iamax.S rather than iamax_sse.S for ISMIN/ISAMIN on all x86_64 as workaround for #2116 * Move ARMv8 gcc build from Travis to Azure * Move ARMv8 gcc build from Travis to Azure * Update .travis.yml * Test drone CI * install make * remove sudo * Install gcc * Install perl * Install gfortran and add a clang job * gfortran->gcc-gfortran * Switch to ubuntu and parallel jobs * apt update * Fix typo * update yes * no need of gcc in clang build * Add a cmake build as well * Add cmake builds and print options * build without lapack on cmake * parallel build * See if ubuntu 19.04 fixes the ICE * Remove qemu armv8 builds * arm32 build * Fix typo * TST: add SkylakeX AVX512 CI test * adapt the C-level reproducer code for some recent SkylakeX AVX512 kernel issues, provided by Isuru Fernando and modified by Martin Kroeker, for usage in the utest suite * add an Intel SDE SkylakeX emulation utest run to the Azure CI matrix; a custom Docker build was required because Ubuntu image provided by Azure does not support AVX512VL instructions * Add option USE_LOCKING for single-threaded build with locking support for calling from concurrent threads * Add option USE_LOCKING for single-threaded build with locking support * Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds * Add option USE_LOCKING but keep default settings intact * Remove unrelated change * Do not try ancient PGI hacks with recent versions of that compiler should fix #2139 * Build and run utests in any case, they do their own checks for fortran availability * Add softfp support in min/max kernels fix for #1912 * Revert "Add softfp support in min/max kernels" * Separate implementations of AMAX and IAMAX on arm As noted in #1912 and comment on #1942, the combined implementation happens to "do the right thing" on hardfp, but cannot return both value and index on softfp where they would have to share the return register * Ensure correct output for DAMAX with softfp * Use generic kernels for complex (I)AMAX to support softfp * improved zgemm power9 based on power8 * upload thread safety test folder * hook up c++ thread safety test (main Makefile) * add c++ thread test option to Makefile.rule * Document NO_AVX512 for #2151 * sgemm pipeline improved, zgemm rewritten without inner packs, ABI lxvx v20 fixed with vs52 * Fix detection of AVX512 capable compilers in getarch 21eda8b5 introduced a check in getarch.c to test if the compiler is capable of AVX512. This check currently fails, since the used __AVX2__ macro is only defined if getarch itself was compiled with AVX2/AVX512 support. Make sure this is the case by building getarch with -march=native on x86_64. It is only supposed to run on the build host anyway. * c_check: Unlink correct file * power9 zgemm ztrmm optimized * conflict resolve * Add gfortran workaround for ABI violations in LAPACKE for #2154 (see gcc bug 90329) * Add gfortran workaround for ABI violations for #2154 (see gcc bug 90329) * Add gfortran workaround for potential ABI violation for #2154 * Update fc.cmake * Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds from #2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway. * Avoid unintentional activation of TLS code via USE_TLS=0 fixes #2149 * Do not force gcc options on non-gcc compilers fixes compile failure with pgi 18.10 as reported on OpenBLAS-users * Update Makefile.x86_64 * Zero ecx with a mov instruction PGI assembler does not like the initialization in the constraints. * Fix mov syntax * new sgemm 8x16 * Update dtrmm_kernel_16x4_power8.S * PGI compiler does not like -march=native * Fix build on FreeBSD/powerpc64. Signed-off-by: Piotr Kubaj <pkubaj@anongoth.pl> * Fix build for PPC970 on FreeBSD pt. 1 FreeBSD needs DCBT_ARG=0 as well. * Fix build for PPC970 on FreeBSD pt.2 FreeBSD needs those macros too. * cgemm/ctrmm power9 * Utest needs CBLAS but not necessarily FORTRAN * Add mingw builds to Appveyor config * Add getarch flags to disable AVX on x86 (and other small fixes to match Makefile behaviour) * Make disabling DYNAMIC_ARCH on unsupported systems work needs to be unset in the cache for the change to have any effect * Mingw32 needs leading underscore on object names (also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)
7 years ago
rebase? (#1) * With the Intel compiler on Linux, prefer ifort for the final link step icc has known problems with mixed-language builds that ifort can handle just fine. Fixes #1956 * Rename operands to put lda on the input/output constraint list * Fix wrong constraints in inline assembly for #2009 * Fix inline assembly constraints rework indices to allow marking argument lda4 as input and output. For #2009 * Fix inline assembly constraints rework indices to allow marking argument lda as input and output. * Fix inline assembly constraints * Fix inline assembly constraints * Fix inline assembly constraints in Bulldozer TRSM kernels rework indices to allow marking i,as and bs as both input and output (marked operand n1 as well for simplicity). For #2009 * Correct range_n limiting same bug as seen in #1388, somehow missed in corresponding PR #1389 * Allow multithreading TRMV again revert workaround introduced for issue #1332 as the actual cause appears to be my incorrect fix from #1262 (see #1388) * Fix error introduced during cleanup * Reduce list of kernels in the dynamic arch build to make compilation complete reliably within the 1h limit again * init * move fix to right place * Fix missing -c option in AVX512 test * Fix AVX512 test always returning false due to missing compiler option * Make x86_32 imply NO_AVX2, NO_AVX512 in addition to NO_AVX fixes #2033 * Keep xcode8.3 for osx BINARY=32 build as xcode10 deprecated i386 * Make sure that AVX512 is disabled in 32bit builds for #2033 * Improve handling of NO_STATIC and NO_SHARED to avoid surprises from defining either as zero. Fixes #2035 by addressing some concerns from #1422 * init * address warning introed with #1814 et al * Restore locking optimizations for OpenMP case restore another accidentally dropped part of #1468 that was missed in #2004 to address performance regression reported in #1461 * HiSilicon tsv110 CPUs optimization branch add HiSilicon tsv110 CPUs optimization branch * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * add TARGET support for HiSilicon tsv110 CPUs * Fix module definition conflicts between LAPACK and ReLAPACK for #2043 * Do not compile in AVX512 check if AVX support is disabled xgetbv is function depends on NO_AVX being undefined - we could change that too, but that combo is unlikely to work anyway * ctest.c : add __POWERPC__ for PowerMac * Fix crash in sgemm SSE/nano kernel on x86_64 Fix bug #2047. Signed-off-by: Celelibi <celelibi@gmail.com> * param.h : enable defines for PPC970 on DarwinOS fixes: gemm.c: In function 'sgemm_': ../common_param.h:981:18: error: 'SGEMM_DEFAULT_P' undeclared (first use in this function) #define SGEMM_P SGEMM_DEFAULT_P ^ * common_power.h: force DCBT_ARG 0 on PPC970 Darwin without this, we see ../kernel/power/gemv_n.S:427:Parameter syntax error and many more similar entries that relates to this assembly command dcbt 8, r24, r18 this change makes the DCBT_ARG = 0 and openblas builds through to completion on PowerMac 970 Tests pass * Make TARGET=GENERIC compatible with DYNAMIC_ARCH=1 for issue #2048 * make DYNAMIC_ARCH=1 package work on TSV110. * make DYNAMIC_ARCH=1 package work on TSV110 * Add Intel Denverton for #2048 * Add Intel Denverton * Change 64-bit detection as explained in #2056 * Trivial typo fix as suggested in #2022 * Disable the AVX512 DGEMM kernel (again) Due to as yet unresolved errors seen in #1955 and #2029 * Use POSIX getenv on Cygwin The Windows-native GetEnvironmentVariable cannot be relied on, as Cygwin does not always copy environment variables set through Cygwin to the Windows environment block, particularly after fork(). * Fix for #2063: The DllMain used in Cygwin did not run the thread memory pool cleanup upon THREAD_DETACH which is needed when compiled with USE_TLS=1. * Also call CloseHandle on each thread, as well as on the event so as to not leak thread handles. * AIX asm syntax changes needed for shared object creation * power9 makefile. dgemm based on power8 kernel with following changes : 32x unrolled 16x4 kernel and 8x4 kernel using (lxv stxv butterfly rank1 update). improvement from 17 to 22-23gflops. dtrmm cases were added into dgemm itself * Expose CBLAS interfaces for I?MIN and I?MAX * Build CBLAS interfaces for I?MIN and I?MAX * Add declarations for ?sum and cblas_?sum * Add interface for ?sum (derived from ?asum) * Add ?sum * Add implementations of ssum/dsum and csum/zsum as trivial copies of asum/zsasum with the fabs calls replaced by fmov to preserve code structure * Add ARM implementations of ?sum (trivial copies of the respective ?asum with the fabs calls removed) * Add ARM64 implementations of ?sum as trivial copies of the respective ?asum kernels with the fabs calls removed * Add ia64 implementation of ?sum as trivial copy of asum with the fabs calls removed * Add MIPS implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add MIPS64 implementation of ?sum as trivial copy of ?asum with the fabs replaced by mov to preserve code structure * Add POWER implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmr to preserve code structure * Add SPARC implementation of ?sum as trivial copy of ?asum with the fabs replaced by fmov to preserve code structure * Add x86 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add x86_64 implementation of ?sum as trivial copy of ?asum with the fabs calls removed * Add ZARCH implementation of ?sum as trivial copies of the respective ?asum kernels with the ABS and vflpsb calls removed * Detect 32bit environment on 64bit ARM hardware for #2056, using same approach as #2058 * Add cmake defaults for ?sum kernels * Add ?sum * Add ?sum definitions for generic kernel * Add declarations for ?sum * Add -lm and disable EXPRECISION support on *BSD fixes #2075 * Add in runtime CPU detection for POWER. * snprintf define consolidated to common.h * Support INTERFACE64=1 * Add support for INTERFACE64 and fix XERBLA calls 1. Replaced all instances of "int" with "blasint" 2. Added string length as "hidden" third parameter in calls to fortran XERBLA * Correct length of name string in xerbla call * Avoid out-of-bounds accesses in LAPACK EIG tests see https://github.com/Reference-LAPACK/lapack/issues/333 * Correct INFO=4 condition * Disable reallocation of work array in xSYTRF as it appears to cause memory management problems (seen in the LAPACK tests) * Disable repeated recursion on Ab_BR in ReLAPACK xGBTRF due to crashes in LAPACK tests * sgemm/strmm * Update Changelog with changes from 0.3.6 * Increment version to 0.3.7.dev * Increment version to 0.3.7.dev * Misc. typo fixes Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib` * Correct argument of CPU_ISSET for glibc <2.5 fixes #2104 * conflict resolve * Revert reference/ fixes * Revert Changelog.txt typos * Disable the SkyLakeX DGEMMITCOPY kernel as well as a stopgap measure for https://github.com/numpy/numpy/issues/13401 as mentioned in #1955 * Disable DGEMMINCOPY as well for now #1955 * init * Fix errors in cpu enumeration with glibc 2.6 for #2114 * Change two http links to https Closes #2109 * remove redundant code #2113 * Set up CI with Azure Pipelines [skip ci] * TST: add native POWER8 to CI * add native POWER8 testing to Travis CI matrix with ppc64le os entry * Update link to IBM MASS library, update cpu support status * first try migrating one of the arm builds from travis * fix tabbing in azure commands * Update azure-pipelines.yml take out offending lines (although stolen from https://github.com/conda-forge/opencv-feedstock azure-pipelines fiie) * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * DOC: Add Azure CI status badge * Add ARMV6 build to azure CI setup (#2122) using aytekinar's Alpine image and docker script from the Travis setup [skip ci] * TST: Azure manylinux1 & clean-up * remove some of the steps & comments from the original Azure yml template * modify the trigger section to use develop since OpenBLAS primarily uses this branch; use the same batching behavior as downstream projects NumPy/ SciPy * remove Travis emulated ARMv6 gcc build because this now happens in Azure * use documented Ubuntu vmImage name for Azure and add in a manylinux1 test run to the matrix [skip appveyor] * Add NO_AFFINITY to available options on Linux, and set it to ON to match the gmake default. Fixes second part of #2114 * Replace ISMIN and ISAMIN kernels on all x86_64 platforms (#2125) * Mark iamax_sse.S as unsuitable for MIN due to issue #2116 * Use iamax.S rather than iamax_sse.S for ISMIN/ISAMIN on all x86_64 as workaround for #2116 * Move ARMv8 gcc build from Travis to Azure * Move ARMv8 gcc build from Travis to Azure * Update .travis.yml * Test drone CI * install make * remove sudo * Install gcc * Install perl * Install gfortran and add a clang job * gfortran->gcc-gfortran * Switch to ubuntu and parallel jobs * apt update * Fix typo * update yes * no need of gcc in clang build * Add a cmake build as well * Add cmake builds and print options * build without lapack on cmake * parallel build * See if ubuntu 19.04 fixes the ICE * Remove qemu armv8 builds * arm32 build * Fix typo * TST: add SkylakeX AVX512 CI test * adapt the C-level reproducer code for some recent SkylakeX AVX512 kernel issues, provided by Isuru Fernando and modified by Martin Kroeker, for usage in the utest suite * add an Intel SDE SkylakeX emulation utest run to the Azure CI matrix; a custom Docker build was required because Ubuntu image provided by Azure does not support AVX512VL instructions * Add option USE_LOCKING for single-threaded build with locking support for calling from concurrent threads * Add option USE_LOCKING for single-threaded build with locking support * Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds * Add option USE_LOCKING but keep default settings intact * Remove unrelated change * Do not try ancient PGI hacks with recent versions of that compiler should fix #2139 * Build and run utests in any case, they do their own checks for fortran availability * Add softfp support in min/max kernels fix for #1912 * Revert "Add softfp support in min/max kernels" * Separate implementations of AMAX and IAMAX on arm As noted in #1912 and comment on #1942, the combined implementation happens to "do the right thing" on hardfp, but cannot return both value and index on softfp where they would have to share the return register * Ensure correct output for DAMAX with softfp * Use generic kernels for complex (I)AMAX to support softfp * improved zgemm power9 based on power8 * upload thread safety test folder * hook up c++ thread safety test (main Makefile) * add c++ thread test option to Makefile.rule * Document NO_AVX512 for #2151 * sgemm pipeline improved, zgemm rewritten without inner packs, ABI lxvx v20 fixed with vs52 * Fix detection of AVX512 capable compilers in getarch 21eda8b5 introduced a check in getarch.c to test if the compiler is capable of AVX512. This check currently fails, since the used __AVX2__ macro is only defined if getarch itself was compiled with AVX2/AVX512 support. Make sure this is the case by building getarch with -march=native on x86_64. It is only supposed to run on the build host anyway. * c_check: Unlink correct file * power9 zgemm ztrmm optimized * conflict resolve * Add gfortran workaround for ABI violations in LAPACKE for #2154 (see gcc bug 90329) * Add gfortran workaround for ABI violations for #2154 (see gcc bug 90329) * Add gfortran workaround for potential ABI violation for #2154 * Update fc.cmake * Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds from #2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway. * Avoid unintentional activation of TLS code via USE_TLS=0 fixes #2149 * Do not force gcc options on non-gcc compilers fixes compile failure with pgi 18.10 as reported on OpenBLAS-users * Update Makefile.x86_64 * Zero ecx with a mov instruction PGI assembler does not like the initialization in the constraints. * Fix mov syntax * new sgemm 8x16 * Update dtrmm_kernel_16x4_power8.S * PGI compiler does not like -march=native * Fix build on FreeBSD/powerpc64. Signed-off-by: Piotr Kubaj <pkubaj@anongoth.pl> * Fix build for PPC970 on FreeBSD pt. 1 FreeBSD needs DCBT_ARG=0 as well. * Fix build for PPC970 on FreeBSD pt.2 FreeBSD needs those macros too. * cgemm/ctrmm power9 * Utest needs CBLAS but not necessarily FORTRAN * Add mingw builds to Appveyor config * Add getarch flags to disable AVX on x86 (and other small fixes to match Makefile behaviour) * Make disabling DYNAMIC_ARCH on unsupported systems work needs to be unset in the cache for the change to have any effect * Mingw32 needs leading underscore on object names (also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)
7 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288
  1. /*********************************************************************/
  2. /* Copyright 2009, 2010 The University of Texas at Austin. */
  3. /* All rights reserved. */
  4. /* */
  5. /* Redistribution and use in source and binary forms, with or */
  6. /* without modification, are permitted provided that the following */
  7. /* conditions are met: */
  8. /* */
  9. /* 1. Redistributions of source code must retain the above */
  10. /* copyright notice, this list of conditions and the following */
  11. /* disclaimer. */
  12. /* */
  13. /* 2. Redistributions in binary form must reproduce the above */
  14. /* copyright notice, this list of conditions and the following */
  15. /* disclaimer in the documentation and/or other materials */
  16. /* provided with the distribution. */
  17. /* */
  18. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  19. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  20. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  21. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  22. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  23. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  24. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  25. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  26. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  27. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  28. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  29. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  30. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  31. /* POSSIBILITY OF SUCH DAMAGE. */
  32. /* */
  33. /* The views and conclusions contained in the software and */
  34. /* documentation are those of the authors and should not be */
  35. /* interpreted as representing official policies, either expressed */
  36. /* or implied, of The University of Texas at Austin. */
  37. /*********************************************************************/
  38. #define ASSEMBLER
  39. #include "common.h"
  40. #ifndef __64BIT__
  41. #define LOAD lwz
  42. #else
  43. #define LOAD ld
  44. #endif
  45. #ifdef __64BIT__
  46. #define STACKSIZE 320
  47. #define ALPHA_R 296(SP)
  48. #define ALPHA_I 304(SP)
  49. #define FZERO 312(SP)
  50. #else
  51. #define STACKSIZE 256
  52. #define ALPHA_R 224(SP)
  53. #define ALPHA_I 232(SP)
  54. #define FZERO 240(SP)
  55. #endif
  56. #define M r3
  57. #define N r4
  58. #define K r5
  59. #if defined(linux) || defined(__FreeBSD__)
  60. #ifndef __64BIT__
  61. #define A r6
  62. #define B r7
  63. #define C r8
  64. #define LDC r9
  65. #define OFFSET r10
  66. #else
  67. #define A r8
  68. #define B r9
  69. #define C r10
  70. #define LDC r6
  71. #define OFFSET r7
  72. #endif
  73. #endif
  74. #if defined(_AIX) || defined(__APPLE__)
  75. #if !defined(__64BIT__) && defined(DOUBLE)
  76. #define A r10
  77. #define B r6
  78. #define C r7
  79. #define LDC r8
  80. #define OFFSET r9
  81. #else
  82. #define A r8
  83. #define B r9
  84. #define C r10
  85. #define LDC r6
  86. #define OFFSET r7
  87. #endif
  88. #endif
  89. #define AORIG r21
  90. #define TEMP r22
  91. #define KK r23
  92. #define I r24
  93. #define J r25
  94. #define AO r26
  95. #define BO r27
  96. #define CO1 r28
  97. #define CO2 r29
  98. #define PREA r30
  99. #define PREC r31
  100. #define PREB PREA
  101. #ifndef NEEDPARAM
  102. PROLOGUE
  103. PROFCODE
  104. addi SP, SP, -STACKSIZE
  105. li r0, 0
  106. stfd f14, 0(SP)
  107. stfd f15, 8(SP)
  108. stfd f16, 16(SP)
  109. stfd f17, 24(SP)
  110. stfd f18, 32(SP)
  111. stfd f19, 40(SP)
  112. stfd f20, 48(SP)
  113. stfd f21, 56(SP)
  114. stfd f22, 64(SP)
  115. stfd f23, 72(SP)
  116. stfd f24, 80(SP)
  117. stfd f25, 88(SP)
  118. stfd f26, 96(SP)
  119. stfd f27, 104(SP)
  120. stfd f28, 112(SP)
  121. stfd f29, 120(SP)
  122. stfd f30, 128(SP)
  123. stfd f31, 136(SP)
  124. #ifdef __64BIT__
  125. std r31, 144(SP)
  126. std r30, 152(SP)
  127. std r29, 160(SP)
  128. std r28, 168(SP)
  129. std r27, 176(SP)
  130. std r26, 184(SP)
  131. std r25, 192(SP)
  132. std r24, 200(SP)
  133. std r23, 208(SP)
  134. std r22, 216(SP)
  135. std r21, 224(SP)
  136. #else
  137. stw r31, 144(SP)
  138. stw r30, 148(SP)
  139. stw r29, 152(SP)
  140. stw r28, 156(SP)
  141. stw r27, 160(SP)
  142. stw r26, 164(SP)
  143. stw r25, 168(SP)
  144. stw r24, 172(SP)
  145. stw r23, 176(SP)
  146. stw r22, 180(SP)
  147. stw r21, 184(SP)
  148. #endif
  149. stw r0, FZERO
  150. #if defined(linux) || defined(__FreeBSD__)
  151. #ifdef __64BIT__
  152. ld LDC, FRAMESLOT(0) + STACKSIZE(SP)
  153. #endif
  154. #endif
  155. #if defined(_AIX) || defined(__APPLE__)
  156. #ifdef __64BIT__
  157. ld LDC, FRAMESLOT(0) + STACKSIZE(SP)
  158. #else
  159. #ifdef DOUBLE
  160. lwz B, FRAMESLOT(0) + STACKSIZE(SP)
  161. lwz C, FRAMESLOT(1) + STACKSIZE(SP)
  162. lwz LDC, FRAMESLOT(2) + STACKSIZE(SP)
  163. #else
  164. lwz LDC, FRAMESLOT(0) + STACKSIZE(SP)
  165. #endif
  166. #endif
  167. #endif
  168. #if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
  169. ld OFFSET, FRAMESLOT(1) + STACKSIZE(SP)
  170. #endif
  171. #if defined(_AIX) || defined(__APPLE__)
  172. #ifdef __64BIT__
  173. ld OFFSET, FRAMESLOT(1) + STACKSIZE(SP)
  174. #else
  175. #ifdef DOUBLE
  176. lwz OFFSET, FRAMESLOT(3) + STACKSIZE(SP)
  177. #else
  178. lwz OFFSET, FRAMESLOT(1) + STACKSIZE(SP)
  179. #endif
  180. #endif
  181. #endif
  182. slwi LDC, LDC, ZBASE_SHIFT
  183. #ifdef LN
  184. mullw r0, M, K
  185. slwi r0, r0, ZBASE_SHIFT
  186. add A, A, r0
  187. slwi r0, M, ZBASE_SHIFT
  188. add C, C, r0
  189. #endif
  190. #ifdef RN
  191. neg KK, OFFSET
  192. #endif
  193. #ifdef RT
  194. mullw r0, N, K
  195. slwi r0, r0, ZBASE_SHIFT
  196. add B, B, r0
  197. mullw r0, N, LDC
  198. add C, C, r0
  199. sub KK, N, OFFSET
  200. #endif
  201. cmpwi cr0, M, 0
  202. ble LL(999)
  203. cmpwi cr0, N, 0
  204. ble LL(999)
  205. cmpwi cr0, K, 0
  206. ble LL(999)
  207. #ifndef PREFETCHTEST
  208. #ifdef LN
  209. li PREC, -4 * SIZE
  210. #else
  211. li PREC, 4 * SIZE
  212. #endif
  213. #else
  214. #if defined(linux) || defined(__FreeBSD__)
  215. #ifndef __64BIT__
  216. lwz PREA, FRAMESLOT(2) + STACKSIZE(SP)
  217. lwz PREC, FRAMESLOT(3) + STACKSIZE(SP)
  218. #else
  219. ld PREA, FRAMESLOT(3) + STACKSIZE(SP)
  220. ld PREC, FRAMESLOT(4) + STACKSIZE(SP)
  221. #endif
  222. #endif
  223. #if defined(_AIX) || defined(__APPLE__)
  224. #ifdef __64BIT__
  225. ld PREA, FRAMESLOT(3) + STACKSIZE(SP)
  226. ld PREC, FRAMESLOT(4) + STACKSIZE(SP)
  227. #else
  228. #ifdef DOUBLE
  229. lwz PREA, FRAMESLOT(4) + STACKSIZE(SP)
  230. lwz PREC, FRAMESLOT(5) + STACKSIZE(SP)
  231. #else
  232. lwz PREA, FRAMESLOT(3) + STACKSIZE(SP)
  233. lwz PREC, FRAMESLOT(4) + STACKSIZE(SP)
  234. #endif
  235. #endif
  236. #endif
  237. #endif
  238. #ifndef PREFETCHTEST
  239. #ifdef PPC970
  240. #ifdef ALLOC_HUGETLB
  241. li PREA, (16 * 5 * SIZE + 16)
  242. #else
  243. li PREA, (16 * 9 * SIZE + 16)
  244. #endif
  245. #endif
  246. #ifdef POWER4
  247. #ifdef ALLOC_HUGETLB
  248. li PREA, (16 * 1 * SIZE + 16)
  249. #else
  250. li PREA, (16 * 2 * SIZE + 16)
  251. #endif
  252. #endif
  253. #ifdef POWER5
  254. #ifdef ALLOC_HUGETLB
  255. li PREA, (16 * 7 * SIZE | 1)
  256. li PREB, (16 * 7 * SIZE | 3)
  257. #else
  258. li PREA, (16 * 12 * SIZE | 1)
  259. li PREB, (16 * 6 * SIZE | 3)
  260. #endif
  261. #endif
  262. #endif
  263. srawi. J, N, 1
  264. ble LL(30)
  265. .align 4
  266. LL(10):
  267. #ifdef RT
  268. slwi r0, K, 1 + ZBASE_SHIFT
  269. sub B, B, r0
  270. slwi r0, LDC, 1
  271. sub C, C, r0
  272. #endif
  273. mr CO1, C
  274. add CO2, C, LDC
  275. #ifdef LN
  276. add KK, M, OFFSET
  277. #endif
  278. #ifdef LT
  279. mr KK, OFFSET
  280. #endif
  281. #if defined(LN) || defined(RT)
  282. mr AORIG, A
  283. #else
  284. mr AO, A
  285. #endif
  286. #ifndef RT
  287. add C, CO2, LDC
  288. #endif
  289. LL(20):
  290. andi. I, M, 1
  291. ble LL(09)
  292. #if defined(LT) || defined(RN)
  293. LFD f16, 0 * SIZE(AO)
  294. LFD f17, 1 * SIZE(AO)
  295. LFD f18, 2 * SIZE(AO)
  296. LFD f19, 3 * SIZE(AO)
  297. LFD f20, 0 * SIZE(B)
  298. LFD f21, 1 * SIZE(B)
  299. LFD f22, 2 * SIZE(B)
  300. LFD f23, 3 * SIZE(B)
  301. LFD f24, 4 * SIZE(B)
  302. LFD f25, 5 * SIZE(B)
  303. LFD f26, 6 * SIZE(B)
  304. LFD f27, 7 * SIZE(B)
  305. lfs f0, FZERO
  306. fmr f1, f0
  307. fmr f2, f0
  308. fmr f3, f0
  309. fmr f4, f0
  310. fmr f5, f0
  311. fmr f6, f0
  312. fmr f7, f0
  313. srawi. r0, KK, 2
  314. mr BO, B
  315. mtspr CTR, r0
  316. #else
  317. #ifdef LN
  318. slwi r0, K, 0 + ZBASE_SHIFT
  319. sub AORIG, AORIG, r0
  320. #endif
  321. slwi r0, KK, 0 + ZBASE_SHIFT
  322. slwi TEMP, KK, 1 + ZBASE_SHIFT
  323. add AO, AORIG, r0
  324. add BO, B, TEMP
  325. sub TEMP, K, KK
  326. LFD f16, 0 * SIZE(AO)
  327. LFD f17, 1 * SIZE(AO)
  328. LFD f18, 2 * SIZE(AO)
  329. LFD f19, 3 * SIZE(AO)
  330. LFD f20, 0 * SIZE(BO)
  331. LFD f21, 1 * SIZE(BO)
  332. LFD f22, 2 * SIZE(BO)
  333. LFD f23, 3 * SIZE(BO)
  334. LFD f24, 4 * SIZE(BO)
  335. LFD f25, 5 * SIZE(BO)
  336. LFD f26, 6 * SIZE(BO)
  337. LFD f27, 7 * SIZE(BO)
  338. lfs f0, FZERO
  339. fmr f1, f0
  340. fmr f2, f0
  341. fmr f3, f0
  342. fmr f4, f0
  343. fmr f5, f0
  344. fmr f6, f0
  345. fmr f7, f0
  346. srawi. r0, TEMP, 2
  347. mtspr CTR, r0
  348. #endif
  349. ble LL(25)
  350. .align 4
  351. LL(22):
  352. fmadd f0, f16, f20, f0
  353. fmadd f1, f16, f21, f1
  354. fmadd f2, f16, f22, f2
  355. fmadd f3, f16, f23, f3
  356. fmadd f4, f17, f20, f4
  357. fmadd f5, f17, f21, f5
  358. fmadd f6, f17, f22, f6
  359. fmadd f7, f17, f23, f7
  360. LFD f20, 8 * SIZE(BO)
  361. LFD f21, 9 * SIZE(BO)
  362. LFD f22, 10 * SIZE(BO)
  363. LFD f23, 11 * SIZE(BO)
  364. fmadd f0, f18, f24, f0
  365. fmadd f1, f18, f25, f1
  366. fmadd f2, f18, f26, f2
  367. fmadd f3, f18, f27, f3
  368. fmadd f4, f19, f24, f4
  369. fmadd f5, f19, f25, f5
  370. fmadd f6, f19, f26, f6
  371. fmadd f7, f19, f27, f7
  372. LFD f24, 12 * SIZE(BO)
  373. LFD f25, 13 * SIZE(BO)
  374. LFD f26, 14 * SIZE(BO)
  375. LFD f27, 15 * SIZE(BO)
  376. LFD f16, 4 * SIZE(AO)
  377. LFD f17, 5 * SIZE(AO)
  378. LFD f18, 6 * SIZE(AO)
  379. LFD f19, 7 * SIZE(AO)
  380. fmadd f0, f16, f20, f0
  381. fmadd f1, f16, f21, f1
  382. fmadd f2, f16, f22, f2
  383. fmadd f3, f16, f23, f3
  384. fmadd f4, f17, f20, f4
  385. fmadd f5, f17, f21, f5
  386. fmadd f6, f17, f22, f6
  387. fmadd f7, f17, f23, f7
  388. LFD f20, 16 * SIZE(BO)
  389. LFD f21, 17 * SIZE(BO)
  390. LFD f22, 18 * SIZE(BO)
  391. LFD f23, 19 * SIZE(BO)
  392. fmadd f0, f18, f24, f0
  393. fmadd f1, f18, f25, f1
  394. fmadd f2, f18, f26, f2
  395. fmadd f3, f18, f27, f3
  396. fmadd f4, f19, f24, f4
  397. fmadd f5, f19, f25, f5
  398. fmadd f6, f19, f26, f6
  399. fmadd f7, f19, f27, f7
  400. LFD f16, 8 * SIZE(AO)
  401. LFD f17, 9 * SIZE(AO)
  402. LFD f18, 10 * SIZE(AO)
  403. LFD f19, 11 * SIZE(AO)
  404. LFD f24, 20 * SIZE(BO)
  405. LFD f25, 21 * SIZE(BO)
  406. LFD f26, 22 * SIZE(BO)
  407. LFD f27, 23 * SIZE(BO)
  408. addi BO, BO, 16 * SIZE
  409. addi AO, AO, 8 * SIZE
  410. bdnz LL(22)
  411. .align 4
  412. LL(25):
  413. #if defined(LT) || defined(RN)
  414. andi. r0, KK, 3
  415. #else
  416. andi. r0, TEMP, 3
  417. #endif
  418. mtspr CTR, r0
  419. ble LL(27)
  420. .align 4
  421. LL(26):
  422. fmadd f0, f16, f20, f0
  423. fmadd f1, f16, f21, f1
  424. fmadd f2, f16, f22, f2
  425. fmadd f3, f16, f23, f3
  426. fmadd f4, f17, f20, f4
  427. fmadd f5, f17, f21, f5
  428. fmadd f6, f17, f22, f6
  429. fmadd f7, f17, f23, f7
  430. LFD f20, 4 * SIZE(BO)
  431. LFD f21, 5 * SIZE(BO)
  432. LFD f22, 6 * SIZE(BO)
  433. LFD f23, 7 * SIZE(BO)
  434. LFD f16, 2 * SIZE(AO)
  435. LFD f17, 3 * SIZE(AO)
  436. addi AO, AO, 2 * SIZE
  437. addi BO, BO, 4 * SIZE
  438. bdnz LL(26)
  439. .align 4
  440. LL(27):
  441. #ifndef CONJ
  442. FSUB f0, f0, f5
  443. FADD f1, f1, f4
  444. FSUB f2, f2, f7
  445. FADD f3, f3, f6
  446. #else
  447. FADD f0, f0, f5
  448. FSUB f1, f4, f1
  449. FADD f2, f2, f7
  450. FSUB f3, f6, f3
  451. #endif
  452. #if defined(LN) || defined(RT)
  453. #ifdef LN
  454. subi r0, KK, 1
  455. #else
  456. subi r0, KK, 2
  457. #endif
  458. slwi TEMP, r0, 0 + ZBASE_SHIFT
  459. slwi r0, r0, 1 + ZBASE_SHIFT
  460. add AO, AORIG, TEMP
  461. add BO, B, r0
  462. #endif
  463. #if defined(LN) || defined(LT)
  464. LFD f16, 0 * SIZE(BO)
  465. LFD f17, 1 * SIZE(BO)
  466. LFD f18, 2 * SIZE(BO)
  467. LFD f19, 3 * SIZE(BO)
  468. FSUB f0, f16, f0
  469. FSUB f1, f17, f1
  470. FSUB f2, f18, f2
  471. FSUB f3, f19, f3
  472. #else
  473. LFD f16, 0 * SIZE(AO)
  474. LFD f17, 1 * SIZE(AO)
  475. LFD f20, 2 * SIZE(AO)
  476. LFD f21, 3 * SIZE(AO)
  477. #ifndef CONJ
  478. FSUB f0, f16, f0
  479. FSUB f1, f17, f1
  480. FSUB f2, f20, f2
  481. FSUB f3, f21, f3
  482. #else
  483. FSUB f0, f16, f0
  484. FADD f1, f17, f1
  485. FSUB f2, f20, f2
  486. FADD f3, f21, f3
  487. #endif
  488. #endif
  489. #ifdef LN
  490. LFD f20, 0 * SIZE(AO)
  491. LFD f21, 1 * SIZE(AO)
  492. FMUL f4, f21, f1
  493. FMUL f5, f21, f0
  494. FMUL f12, f21, f3
  495. FMUL f13, f21, f2
  496. #ifndef CONJ
  497. FMSUB f0, f20, f0, f4
  498. FMADD f1, f20, f1, f5
  499. FMSUB f2, f20, f2, f12
  500. FMADD f3, f20, f3, f13
  501. #else
  502. FMADD f0, f20, f0, f4
  503. FMSUB f1, f20, f1, f5
  504. FMADD f2, f20, f2, f12
  505. FMSUB f3, f20, f3, f13
  506. #endif
  507. #endif
  508. #ifdef LT
  509. LFD f16, 0 * SIZE(AO)
  510. LFD f17, 1 * SIZE(AO)
  511. FMUL f4, f17, f1
  512. FMUL f5, f17, f0
  513. FMUL f12, f17, f3
  514. FMUL f13, f17, f2
  515. #ifndef CONJ
  516. FMSUB f0, f16, f0, f4
  517. FMADD f1, f16, f1, f5
  518. FMSUB f2, f16, f2, f12
  519. FMADD f3, f16, f3, f13
  520. #else
  521. FMADD f0, f16, f0, f4
  522. FMSUB f1, f16, f1, f5
  523. FMADD f2, f16, f2, f12
  524. FMSUB f3, f16, f3, f13
  525. #endif
  526. #endif
  527. #ifdef RN
  528. LFD f16, 0 * SIZE(BO)
  529. LFD f17, 1 * SIZE(BO)
  530. LFD f18, 2 * SIZE(BO)
  531. LFD f19, 3 * SIZE(BO)
  532. LFD f20, 6 * SIZE(BO)
  533. LFD f21, 7 * SIZE(BO)
  534. FMUL f4, f17, f1
  535. FMUL f5, f17, f0
  536. #ifndef CONJ
  537. FMSUB f0, f16, f0, f4
  538. FMADD f1, f16, f1, f5
  539. FMADD f2, f19, f1, f2
  540. FNMSUB f3, f19, f0, f3
  541. FNMSUB f2, f18, f0, f2
  542. FNMSUB f3, f18, f1, f3
  543. FMUL f4, f21, f3
  544. FMUL f5, f21, f2
  545. FMSUB f2, f20, f2, f4
  546. FMADD f3, f20, f3, f5
  547. #else
  548. FMADD f0, f16, f0, f4
  549. FMSUB f1, f16, f1, f5
  550. FMSUB f2, f19, f1, f2
  551. FNMADD f3, f19, f0, f3
  552. FNMADD f2, f18, f0, f2
  553. FNMADD f3, f18, f1, f3
  554. FMUL f4, f21, f3
  555. FMUL f5, f21, f2
  556. FMADD f2, f20, f2, f4
  557. FMSUB f3, f20, f3, f5
  558. #endif
  559. #endif
  560. #ifdef RT
  561. LFD f16, 6 * SIZE(BO)
  562. LFD f17, 7 * SIZE(BO)
  563. LFD f18, 4 * SIZE(BO)
  564. LFD f19, 5 * SIZE(BO)
  565. LFD f20, 0 * SIZE(BO)
  566. LFD f21, 1 * SIZE(BO)
  567. FMUL f12, f17, f9
  568. FMUL f13, f17, f8
  569. #ifndef CONJ
  570. FMSUB f2, f16, f2, f12
  571. FMADD f3, f16, f3, f13
  572. FMADD f0, f19, f3, f0
  573. FNMSUB f1, f19, f2, f1
  574. FNMSUB f0, f18, f2, f0
  575. FNMSUB f1, f18, f3, f1
  576. FMUL f4, f21, f1
  577. FMUL f5, f21, f0
  578. FMSUB f0, f20, f0, f4
  579. FMADD f1, f20, f1, f5
  580. #else
  581. FMADD f2, f16, f2, f12
  582. FMSUB f3, f16, f3, f13
  583. FMSUB f0, f19, f3, f0
  584. FNMADD f1, f19, f2, f1
  585. FNMADD f0, f18, f2, f0
  586. FNMADD f1, f18, f3, f1
  587. FMUL f4, f21, f1
  588. FMUL f5, f21, f0
  589. FMADD f0, f20, f0, f4
  590. FMSUB f1, f20, f1, f5
  591. #endif
  592. #endif
  593. #ifdef LN
  594. subi CO1, CO1, 2 * SIZE
  595. subi CO2, CO2, 2 * SIZE
  596. #endif
  597. #if defined(LN) || defined(LT)
  598. STFD f0, 0 * SIZE(BO)
  599. STFD f1, 1 * SIZE(BO)
  600. STFD f2, 2 * SIZE(BO)
  601. STFD f3, 3 * SIZE(BO)
  602. #else
  603. STFD f0, 0 * SIZE(AO)
  604. STFD f1, 1 * SIZE(AO)
  605. STFD f2, 2 * SIZE(AO)
  606. STFD f3, 3 * SIZE(AO)
  607. #endif
  608. STFD f0, 0 * SIZE(CO1)
  609. STFD f1, 1 * SIZE(CO1)
  610. STFD f2, 0 * SIZE(CO2)
  611. STFD f3, 1 * SIZE(CO2)
  612. #ifndef LN
  613. addi CO1, CO1, 2 * SIZE
  614. addi CO2, CO2, 2 * SIZE
  615. #endif
  616. #ifdef RT
  617. slwi r0, K, 0 + ZBASE_SHIFT
  618. add AORIG, AORIG, r0
  619. #endif
  620. #if defined(LT) || defined(RN)
  621. sub TEMP, K, KK
  622. slwi r0, TEMP, 0 + ZBASE_SHIFT
  623. slwi TEMP, TEMP, 1 + ZBASE_SHIFT
  624. add AO, AO, r0
  625. add BO, BO, TEMP
  626. #endif
  627. #ifdef LT
  628. addi KK, KK, 1
  629. #endif
  630. #ifdef LN
  631. subi KK, KK, 1
  632. #endif
  633. .align 4
  634. LL(09):
  635. srawi. I, M, 1
  636. ble LL(29)
  637. .align 4
  638. LL(11):
  639. #if defined(LT) || defined(RN)
  640. LFD f16, 0 * SIZE(AO)
  641. LFD f17, 1 * SIZE(AO)
  642. LFD f18, 2 * SIZE(AO)
  643. LFD f19, 3 * SIZE(AO)
  644. LFD f20, 0 * SIZE(B)
  645. LFD f21, 1 * SIZE(B)
  646. LFD f22, 2 * SIZE(B)
  647. LFD f23, 3 * SIZE(B)
  648. lfs f0, FZERO
  649. fmr f1, f0
  650. fmr f2, f0
  651. fmr f3, f0
  652. fmr f4, f0
  653. fmr f5, f0
  654. fmr f6, f0
  655. fmr f7, f0
  656. fmr f8, f0
  657. fmr f9, f0
  658. fmr f10, f0
  659. fmr f11, f0
  660. fmr f12, f0
  661. fmr f13, f0
  662. fmr f14, f0
  663. fmr f15, f0
  664. dcbt CO1, PREC
  665. dcbt CO2, PREC
  666. srawi. r0, KK, 2
  667. mtspr CTR, r0
  668. mr BO, B
  669. #else
  670. #ifdef LN
  671. slwi r0, K, 1 + ZBASE_SHIFT
  672. sub AORIG, AORIG, r0
  673. #endif
  674. slwi TEMP, KK, 1 + ZBASE_SHIFT
  675. add AO, AORIG, TEMP
  676. add BO, B, TEMP
  677. sub TEMP, K, KK
  678. LFD f16, 0 * SIZE(AO)
  679. LFD f17, 1 * SIZE(AO)
  680. LFD f18, 2 * SIZE(AO)
  681. LFD f19, 3 * SIZE(AO)
  682. LFD f20, 0 * SIZE(BO)
  683. LFD f21, 1 * SIZE(BO)
  684. LFD f22, 2 * SIZE(BO)
  685. LFD f23, 3 * SIZE(BO)
  686. lfs f0, FZERO
  687. fmr f1, f0
  688. fmr f2, f0
  689. fmr f3, f0
  690. fmr f4, f0
  691. fmr f5, f0
  692. fmr f6, f0
  693. fmr f7, f0
  694. fmr f8, f0
  695. fmr f9, f0
  696. fmr f10, f0
  697. fmr f11, f0
  698. fmr f12, f0
  699. fmr f13, f0
  700. fmr f14, f0
  701. fmr f15, f0
  702. dcbt CO1, PREC
  703. dcbt CO2, PREC
  704. srawi. r0, TEMP, 2
  705. mtspr CTR, r0
  706. #endif
  707. ble LL(15)
  708. .align 4
  709. LL(12):
  710. fmadd f0, f16, f20, f0
  711. fmadd f5, f17, f21, f5
  712. fmadd f10, f18, f22, f10
  713. fmadd f15, f19, f23, f15
  714. LFD f28, 4 * SIZE(BO)
  715. LFD f29, 5 * SIZE(BO)
  716. LFD f30, 6 * SIZE(BO)
  717. LFD f31, 7 * SIZE(BO)
  718. fmadd f1, f17, f20, f1
  719. fmadd f2, f18, f20, f2
  720. fmadd f3, f19, f20, f3
  721. fmadd f4, f16, f21, f4
  722. LFD f24, 4 * SIZE(AO)
  723. LFD f25, 5 * SIZE(AO)
  724. LFD f26, 6 * SIZE(AO)
  725. LFD f27, 7 * SIZE(AO)
  726. fmadd f6, f18, f21, f6
  727. fmadd f7, f19, f21, f7
  728. fmadd f8, f16, f22, f8
  729. fmadd f9, f17, f22, f9
  730. fmadd f11, f19, f22, f11
  731. fmadd f12, f16, f23, f12
  732. fmadd f13, f17, f23, f13
  733. fmadd f14, f18, f23, f14
  734. LFD f20, 8 * SIZE(BO)
  735. LFD f21, 9 * SIZE(BO)
  736. LFD f22, 10 * SIZE(BO)
  737. LFD f23, 11 * SIZE(BO)
  738. fmadd f0, f24, f28, f0
  739. fmadd f5, f25, f29, f5
  740. fmadd f10, f26, f30, f10
  741. fmadd f15, f27, f31, f15
  742. LFD f16, 8 * SIZE(AO)
  743. LFD f17, 9 * SIZE(AO)
  744. LFD f18, 10 * SIZE(AO)
  745. LFD f19, 11 * SIZE(AO)
  746. fmadd f1, f25, f28, f1
  747. fmadd f2, f26, f28, f2
  748. fmadd f3, f27, f28, f3
  749. fmadd f4, f24, f29, f4
  750. fmadd f6, f26, f29, f6
  751. fmadd f7, f27, f29, f7
  752. fmadd f8, f24, f30, f8
  753. fmadd f9, f25, f30, f9
  754. fmadd f11, f27, f30, f11
  755. fmadd f12, f24, f31, f12
  756. fmadd f13, f25, f31, f13
  757. fmadd f14, f26, f31, f14
  758. LFD f28, 12 * SIZE(BO)
  759. LFD f29, 13 * SIZE(BO)
  760. LFD f30, 14 * SIZE(BO)
  761. LFD f31, 15 * SIZE(BO)
  762. fmadd f0, f16, f20, f0
  763. fmadd f5, f17, f21, f5
  764. fmadd f10, f18, f22, f10
  765. fmadd f15, f19, f23, f15
  766. LFD f24, 12 * SIZE(AO)
  767. LFD f25, 13 * SIZE(AO)
  768. LFD f26, 14 * SIZE(AO)
  769. LFD f27, 15 * SIZE(AO)
  770. fmadd f1, f17, f20, f1
  771. fmadd f2, f18, f20, f2
  772. fmadd f3, f19, f20, f3
  773. fmadd f4, f16, f21, f4
  774. fmadd f6, f18, f21, f6
  775. fmadd f7, f19, f21, f7
  776. fmadd f8, f16, f22, f8
  777. fmadd f9, f17, f22, f9
  778. fmadd f11, f19, f22, f11
  779. fmadd f12, f16, f23, f12
  780. fmadd f13, f17, f23, f13
  781. fmadd f14, f18, f23, f14
  782. LFD f16, 16 * SIZE(AO)
  783. LFD f17, 17 * SIZE(AO)
  784. LFD f18, 18 * SIZE(AO)
  785. LFD f19, 19 * SIZE(AO)
  786. fmadd f0, f24, f28, f0
  787. fmadd f5, f25, f29, f5
  788. fmadd f10, f26, f30, f10
  789. fmadd f15, f27, f31, f15
  790. LFD f20, 16 * SIZE(BO)
  791. LFD f21, 17 * SIZE(BO)
  792. LFD f22, 18 * SIZE(BO)
  793. LFD f23, 19 * SIZE(BO)
  794. fmadd f1, f25, f28, f1
  795. fmadd f2, f26, f28, f2
  796. fmadd f3, f27, f28, f3
  797. fmadd f4, f24, f29, f4
  798. fmadd f6, f26, f29, f6
  799. fmadd f7, f27, f29, f7
  800. fmadd f8, f24, f30, f8
  801. fmadd f9, f25, f30, f9
  802. fmadd f11, f27, f30, f11
  803. fmadd f12, f24, f31, f12
  804. fmadd f13, f25, f31, f13
  805. fmadd f14, f26, f31, f14
  806. addi AO, AO, 16 * SIZE
  807. addi BO, BO, 16 * SIZE
  808. #ifdef PPC970
  809. #ifndef ALLOC_HUGETLB
  810. DCBT(AO, PREA)
  811. #endif
  812. DCBT(BO, PREB)
  813. #endif
  814. #ifdef POWER4
  815. #ifndef ALLOC_HUGETLB
  816. DCBT(AO, PREA)
  817. #endif
  818. DCBT(BO, PREB)
  819. #endif
  820. #ifdef POWER5
  821. DCBT(AO, PREA)
  822. DCBT(BO, PREB)
  823. #endif
  824. bdnz LL(12)
  825. .align 4
  826. LL(15):
  827. #if defined(LT) || defined(RN)
  828. andi. r0, KK, 3
  829. #else
  830. andi. r0, TEMP, 3
  831. #endif
  832. mtspr CTR, r0
  833. ble LL(KERNEL_MainFinish)
  834. .align 4
  835. LL(16):
  836. fmadd f0, f16, f20, f0
  837. fmadd f5, f17, f21, f5
  838. fmadd f10, f18, f22, f10
  839. fmadd f15, f19, f23, f15
  840. fmadd f1, f17, f20, f1
  841. fmadd f2, f18, f20, f2
  842. fmadd f3, f19, f20, f3
  843. fmadd f4, f16, f21, f4
  844. fmadd f6, f18, f21, f6
  845. fmadd f7, f19, f21, f7
  846. fmadd f8, f16, f22, f8
  847. fmadd f9, f17, f22, f9
  848. fmadd f11, f19, f22, f11
  849. fmadd f12, f16, f23, f12
  850. fmadd f13, f17, f23, f13
  851. fmadd f14, f18, f23, f14
  852. LFD f16, 4 * SIZE(AO)
  853. LFD f17, 5 * SIZE(AO)
  854. LFD f18, 6 * SIZE(AO)
  855. LFD f19, 7 * SIZE(AO)
  856. LFD f20, 4 * SIZE(BO)
  857. LFD f21, 5 * SIZE(BO)
  858. LFD f22, 6 * SIZE(BO)
  859. LFD f23, 7 * SIZE(BO)
  860. addi BO, BO, 4 * SIZE
  861. addi AO, AO, 4 * SIZE
  862. bdnz LL(16)
  863. .align 4
  864. LL(KERNEL_MainFinish):
  865. #ifndef CONJ
  866. FSUB f0, f0, f5
  867. FADD f1, f1, f4
  868. FSUB f2, f2, f7
  869. FADD f3, f3, f6
  870. FSUB f8, f8, f13
  871. FADD f9, f9, f12
  872. FSUB f10, f10, f15
  873. FADD f11, f11, f14
  874. #else
  875. FADD f0, f0, f5
  876. FSUB f1, f4, f1
  877. FADD f2, f2, f7
  878. FSUB f3, f6, f3
  879. FADD f8, f8, f13
  880. FSUB f9, f12, f9
  881. FADD f10, f10, f15
  882. FSUB f11, f14, f11
  883. #endif
  884. #if defined(LN) || defined(RT)
  885. subi r0, KK, 2
  886. slwi r0, r0, 1 + ZBASE_SHIFT
  887. add AO, AORIG, r0
  888. add BO, B, r0
  889. #endif
  890. #if defined(LN) || defined(LT)
  891. LFD f16, 0 * SIZE(BO)
  892. LFD f17, 1 * SIZE(BO)
  893. LFD f18, 2 * SIZE(BO)
  894. LFD f19, 3 * SIZE(BO)
  895. LFD f20, 4 * SIZE(BO)
  896. LFD f21, 5 * SIZE(BO)
  897. LFD f22, 6 * SIZE(BO)
  898. LFD f23, 7 * SIZE(BO)
  899. FSUB f0, f16, f0
  900. FSUB f1, f17, f1
  901. FSUB f8, f18, f8
  902. FSUB f9, f19, f9
  903. FSUB f2, f20, f2
  904. FSUB f3, f21, f3
  905. FSUB f10, f22, f10
  906. FSUB f11, f23, f11
  907. #else
  908. LFD f16, 0 * SIZE(AO)
  909. LFD f17, 1 * SIZE(AO)
  910. LFD f18, 2 * SIZE(AO)
  911. LFD f19, 3 * SIZE(AO)
  912. LFD f20, 4 * SIZE(AO)
  913. LFD f21, 5 * SIZE(AO)
  914. LFD f22, 6 * SIZE(AO)
  915. LFD f23, 7 * SIZE(AO)
  916. #ifndef CONJ
  917. FSUB f0, f16, f0
  918. FSUB f1, f17, f1
  919. FSUB f2, f18, f2
  920. FSUB f3, f19, f3
  921. FSUB f8, f20, f8
  922. FSUB f9, f21, f9
  923. FSUB f10, f22, f10
  924. FSUB f11, f23, f11
  925. #else
  926. FSUB f0, f16, f0
  927. FADD f1, f17, f1
  928. FSUB f2, f18, f2
  929. FADD f3, f19, f3
  930. FSUB f8, f20, f8
  931. FADD f9, f21, f9
  932. FSUB f10, f22, f10
  933. FADD f11, f23, f11
  934. #endif
  935. #endif
  936. #ifdef LN
  937. LFD f16, 6 * SIZE(AO)
  938. LFD f17, 7 * SIZE(AO)
  939. LFD f18, 4 * SIZE(AO)
  940. LFD f19, 5 * SIZE(AO)
  941. LFD f20, 0 * SIZE(AO)
  942. LFD f21, 1 * SIZE(AO)
  943. FMUL f6, f17, f3
  944. FMUL f7, f17, f2
  945. FMUL f14, f17, f11
  946. FMUL f15, f17, f10
  947. #ifndef CONJ
  948. FMSUB f2, f16, f2, f6
  949. FMADD f3, f16, f3, f7
  950. FMSUB f10, f16, f10, f14
  951. FMADD f11, f16, f11, f15
  952. FMADD f0, f19, f3, f0
  953. FNMSUB f1, f19, f2, f1
  954. FMADD f8, f19, f11, f8
  955. FNMSUB f9, f19, f10, f9
  956. FNMSUB f0, f18, f2, f0
  957. FNMSUB f1, f18, f3, f1
  958. FNMSUB f8, f18, f10, f8
  959. FNMSUB f9, f18, f11, f9
  960. FMUL f4, f21, f1
  961. FMUL f5, f21, f0
  962. FMUL f12, f21, f9
  963. FMUL f13, f21, f8
  964. FMSUB f0, f20, f0, f4
  965. FMADD f1, f20, f1, f5
  966. FMSUB f8, f20, f8, f12
  967. FMADD f9, f20, f9, f13
  968. #else
  969. FMADD f2, f16, f2, f6
  970. FMSUB f3, f16, f3, f7
  971. FMADD f10, f16, f10, f14
  972. FMSUB f11, f16, f11, f15
  973. FMSUB f0, f19, f3, f0
  974. FNMADD f1, f19, f2, f1
  975. FMSUB f8, f19, f11, f8
  976. FNMADD f9, f19, f10, f9
  977. FNMADD f0, f18, f2, f0
  978. FNMADD f1, f18, f3, f1
  979. FNMADD f8, f18, f10, f8
  980. FNMADD f9, f18, f11, f9
  981. FMUL f4, f21, f1
  982. FMUL f5, f21, f0
  983. FMUL f12, f21, f9
  984. FMUL f13, f21, f8
  985. FMADD f0, f20, f0, f4
  986. FMSUB f1, f20, f1, f5
  987. FMADD f8, f20, f8, f12
  988. FMSUB f9, f20, f9, f13
  989. #endif
  990. #endif
  991. #ifdef LT
  992. LFD f16, 0 * SIZE(AO)
  993. LFD f17, 1 * SIZE(AO)
  994. LFD f18, 2 * SIZE(AO)
  995. LFD f19, 3 * SIZE(AO)
  996. LFD f20, 6 * SIZE(AO)
  997. LFD f21, 7 * SIZE(AO)
  998. FMUL f4, f17, f1
  999. FMUL f5, f17, f0
  1000. FMUL f12, f17, f9
  1001. FMUL f13, f17, f8
  1002. #ifndef CONJ
  1003. FMSUB f0, f16, f0, f4
  1004. FMADD f1, f16, f1, f5
  1005. FMSUB f8, f16, f8, f12
  1006. FMADD f9, f16, f9, f13
  1007. FMADD f2, f19, f1, f2
  1008. FNMSUB f3, f19, f0, f3
  1009. FMADD f10, f19, f9, f10
  1010. FNMSUB f11, f19, f8, f11
  1011. FNMSUB f2, f18, f0, f2
  1012. FNMSUB f3, f18, f1, f3
  1013. FNMSUB f10, f18, f8, f10
  1014. FNMSUB f11, f18, f9, f11
  1015. FMUL f4, f21, f3
  1016. FMUL f5, f21, f2
  1017. FMUL f12, f21, f11
  1018. FMUL f13, f21, f10
  1019. FMSUB f2, f20, f2, f4
  1020. FMADD f3, f20, f3, f5
  1021. FMSUB f10, f20, f10, f12
  1022. FMADD f11, f20, f11, f13
  1023. #else
  1024. FMADD f0, f16, f0, f4
  1025. FMSUB f1, f16, f1, f5
  1026. FMADD f8, f16, f8, f12
  1027. FMSUB f9, f16, f9, f13
  1028. FMSUB f2, f19, f1, f2
  1029. FNMADD f3, f19, f0, f3
  1030. FMSUB f10, f19, f9, f10
  1031. FNMADD f11, f19, f8, f11
  1032. FNMADD f2, f18, f0, f2
  1033. FNMADD f3, f18, f1, f3
  1034. FNMADD f10, f18, f8, f10
  1035. FNMADD f11, f18, f9, f11
  1036. FMUL f4, f21, f3
  1037. FMUL f5, f21, f2
  1038. FMUL f12, f21, f11
  1039. FMUL f13, f21, f10
  1040. FMADD f2, f20, f2, f4
  1041. FMSUB f3, f20, f3, f5
  1042. FMADD f10, f20, f10, f12
  1043. FMSUB f11, f20, f11, f13
  1044. #endif
  1045. #endif
  1046. #ifdef RN
  1047. LFD f16, 0 * SIZE(BO)
  1048. LFD f17, 1 * SIZE(BO)
  1049. LFD f18, 2 * SIZE(BO)
  1050. LFD f19, 3 * SIZE(BO)
  1051. LFD f20, 6 * SIZE(BO)
  1052. LFD f21, 7 * SIZE(BO)
  1053. FMUL f4, f17, f1
  1054. FMUL f5, f17, f0
  1055. FMUL f6, f17, f3
  1056. FMUL f7, f17, f2
  1057. #ifndef CONJ
  1058. FMSUB f0, f16, f0, f4
  1059. FMADD f1, f16, f1, f5
  1060. FMSUB f2, f16, f2, f6
  1061. FMADD f3, f16, f3, f7
  1062. FMADD f8, f19, f1, f8
  1063. FNMSUB f9, f19, f0, f9
  1064. FMADD f10, f19, f3, f10
  1065. FNMSUB f11, f19, f2, f11
  1066. FNMSUB f8, f18, f0, f8
  1067. FNMSUB f9, f18, f1, f9
  1068. FNMSUB f10, f18, f2, f10
  1069. FNMSUB f11, f18, f3, f11
  1070. FMUL f4, f21, f9
  1071. FMUL f5, f21, f8
  1072. FMUL f6, f21, f11
  1073. FMUL f7, f21, f10
  1074. FMSUB f8, f20, f8, f4
  1075. FMADD f9, f20, f9, f5
  1076. FMSUB f10, f20, f10, f6
  1077. FMADD f11, f20, f11, f7
  1078. #else
  1079. FMADD f0, f16, f0, f4
  1080. FMSUB f1, f16, f1, f5
  1081. FMADD f2, f16, f2, f6
  1082. FMSUB f3, f16, f3, f7
  1083. FMSUB f8, f19, f1, f8
  1084. FNMADD f9, f19, f0, f9
  1085. FMSUB f10, f19, f3, f10
  1086. FNMADD f11, f19, f2, f11
  1087. FNMADD f8, f18, f0, f8
  1088. FNMADD f9, f18, f1, f9
  1089. FNMADD f10, f18, f2, f10
  1090. FNMADD f11, f18, f3, f11
  1091. FMUL f4, f21, f9
  1092. FMUL f5, f21, f8
  1093. FMUL f6, f21, f11
  1094. FMUL f7, f21, f10
  1095. FMADD f8, f20, f8, f4
  1096. FMSUB f9, f20, f9, f5
  1097. FMADD f10, f20, f10, f6
  1098. FMSUB f11, f20, f11, f7
  1099. #endif
  1100. #endif
  1101. #ifdef RT
  1102. LFD f16, 6 * SIZE(BO)
  1103. LFD f17, 7 * SIZE(BO)
  1104. LFD f18, 4 * SIZE(BO)
  1105. LFD f19, 5 * SIZE(BO)
  1106. LFD f20, 0 * SIZE(BO)
  1107. LFD f21, 1 * SIZE(BO)
  1108. FMUL f12, f17, f9
  1109. FMUL f13, f17, f8
  1110. FMUL f14, f17, f11
  1111. FMUL f15, f17, f10
  1112. #ifndef CONJ
  1113. FMSUB f8, f16, f8, f12
  1114. FMADD f9, f16, f9, f13
  1115. FMSUB f10, f16, f10, f14
  1116. FMADD f11, f16, f11, f15
  1117. FMADD f0, f19, f9, f0
  1118. FNMSUB f1, f19, f8, f1
  1119. FMADD f2, f19, f11, f2
  1120. FNMSUB f3, f19, f10, f3
  1121. FNMSUB f0, f18, f8, f0
  1122. FNMSUB f1, f18, f9, f1
  1123. FNMSUB f2, f18, f10, f2
  1124. FNMSUB f3, f18, f11, f3
  1125. FMUL f4, f21, f1
  1126. FMUL f5, f21, f0
  1127. FMUL f6, f21, f3
  1128. FMUL f7, f21, f2
  1129. FMSUB f0, f20, f0, f4
  1130. FMADD f1, f20, f1, f5
  1131. FMSUB f2, f20, f2, f6
  1132. FMADD f3, f20, f3, f7
  1133. #else
  1134. FMADD f8, f16, f8, f12
  1135. FMSUB f9, f16, f9, f13
  1136. FMADD f10, f16, f10, f14
  1137. FMSUB f11, f16, f11, f15
  1138. FMSUB f0, f19, f9, f0
  1139. FNMADD f1, f19, f8, f1
  1140. FMSUB f2, f19, f11, f2
  1141. FNMADD f3, f19, f10, f3
  1142. FNMADD f0, f18, f8, f0
  1143. FNMADD f1, f18, f9, f1
  1144. FNMADD f2, f18, f10, f2
  1145. FNMADD f3, f18, f11, f3
  1146. FMUL f4, f21, f1
  1147. FMUL f5, f21, f0
  1148. FMUL f6, f21, f3
  1149. FMUL f7, f21, f2
  1150. FMADD f0, f20, f0, f4
  1151. FMSUB f1, f20, f1, f5
  1152. FMADD f2, f20, f2, f6
  1153. FMSUB f3, f20, f3, f7
  1154. #endif
  1155. #endif
  1156. #ifdef LN
  1157. subi CO1, CO1, 4 * SIZE
  1158. subi CO2, CO2, 4 * SIZE
  1159. #endif
  1160. #if defined(LN) || defined(LT)
  1161. STFD f0, 0 * SIZE(BO)
  1162. STFD f1, 1 * SIZE(BO)
  1163. STFD f8, 2 * SIZE(BO)
  1164. STFD f9, 3 * SIZE(BO)
  1165. STFD f2, 4 * SIZE(BO)
  1166. STFD f3, 5 * SIZE(BO)
  1167. STFD f10, 6 * SIZE(BO)
  1168. STFD f11, 7 * SIZE(BO)
  1169. #else
  1170. STFD f0, 0 * SIZE(AO)
  1171. STFD f1, 1 * SIZE(AO)
  1172. STFD f2, 2 * SIZE(AO)
  1173. STFD f3, 3 * SIZE(AO)
  1174. STFD f8, 4 * SIZE(AO)
  1175. STFD f9, 5 * SIZE(AO)
  1176. STFD f10, 6 * SIZE(AO)
  1177. STFD f11, 7 * SIZE(AO)
  1178. #endif
  1179. STFD f0, 0 * SIZE(CO1)
  1180. STFD f1, 1 * SIZE(CO1)
  1181. STFD f2, 2 * SIZE(CO1)
  1182. STFD f3, 3 * SIZE(CO1)
  1183. STFD f8, 0 * SIZE(CO2)
  1184. STFD f9, 1 * SIZE(CO2)
  1185. STFD f10, 2 * SIZE(CO2)
  1186. STFD f11, 3 * SIZE(CO2)
  1187. #ifndef LN
  1188. addi CO1, CO1, 4 * SIZE
  1189. addi CO2, CO2, 4 * SIZE
  1190. #endif
  1191. #ifdef RT
  1192. slwi r0, K, 1 + ZBASE_SHIFT
  1193. add AORIG, AORIG, r0
  1194. #endif
  1195. #if defined(LT) || defined(RN)
  1196. sub TEMP, K, KK
  1197. slwi TEMP, TEMP, 1 + ZBASE_SHIFT
  1198. add AO, AO, TEMP
  1199. add BO, BO, TEMP
  1200. #endif
  1201. #ifdef LT
  1202. addi KK, KK, 2
  1203. #endif
  1204. #ifdef LN
  1205. subi KK, KK, 2
  1206. #endif
  1207. addic. I, I, -1
  1208. bgt LL(11)
  1209. .align 4
  1210. LL(29):
  1211. #ifdef LN
  1212. slwi r0, K, 1 + ZBASE_SHIFT
  1213. add B, B, r0
  1214. #endif
  1215. #if defined(LT) || defined(RN)
  1216. mr B, BO
  1217. #endif
  1218. #ifdef RN
  1219. addi KK, KK, 2
  1220. #endif
  1221. #ifdef RT
  1222. subi KK, KK, 2
  1223. #endif
  1224. addic. J, J, -1
  1225. bgt LL(10)
  1226. .align 4
  1227. LL(30):
  1228. andi. J, N, 1
  1229. ble LL(999)
  1230. #ifdef RT
  1231. slwi r0, K, 0 + ZBASE_SHIFT
  1232. sub B, B, r0
  1233. sub C, C, LDC
  1234. #endif
  1235. mr CO1, C
  1236. #ifdef LN
  1237. add KK, M, OFFSET
  1238. #endif
  1239. #ifdef LT
  1240. mr KK, OFFSET
  1241. #endif
  1242. #if defined(LN) || defined(RT)
  1243. mr AORIG, A
  1244. #else
  1245. mr AO, A
  1246. #endif
  1247. #ifndef RT
  1248. add C, C, LDC
  1249. #endif
  1250. andi. I, M, 1
  1251. ble LL(40)
  1252. #if defined(LT) || defined(RN)
  1253. LFD f16, 0 * SIZE(AO)
  1254. LFD f17, 1 * SIZE(AO)
  1255. LFD f18, 2 * SIZE(AO)
  1256. LFD f19, 3 * SIZE(AO)
  1257. LFD f20, 0 * SIZE(B)
  1258. LFD f21, 1 * SIZE(B)
  1259. LFD f22, 2 * SIZE(B)
  1260. LFD f23, 3 * SIZE(B)
  1261. lfs f0, FZERO
  1262. fmr f1, f0
  1263. fmr f2, f0
  1264. fmr f3, f0
  1265. fmr f4, f0
  1266. fmr f5, f0
  1267. fmr f6, f0
  1268. fmr f7, f0
  1269. srawi. r0, KK, 2
  1270. mr BO, B
  1271. mtspr CTR, r0
  1272. #else
  1273. #ifdef LN
  1274. slwi r0, K, 0 + ZBASE_SHIFT
  1275. sub AORIG, AORIG, r0
  1276. #endif
  1277. slwi r0, KK, 0 + ZBASE_SHIFT
  1278. add AO, AORIG, r0
  1279. add BO, B, r0
  1280. sub TEMP, K, KK
  1281. LFD f16, 0 * SIZE(AO)
  1282. LFD f17, 1 * SIZE(AO)
  1283. LFD f18, 2 * SIZE(AO)
  1284. LFD f19, 3 * SIZE(AO)
  1285. LFD f20, 0 * SIZE(BO)
  1286. LFD f21, 1 * SIZE(BO)
  1287. LFD f22, 2 * SIZE(BO)
  1288. LFD f23, 3 * SIZE(BO)
  1289. lfs f0, FZERO
  1290. fmr f1, f0
  1291. fmr f2, f0
  1292. fmr f3, f0
  1293. fmr f4, f0
  1294. fmr f5, f0
  1295. fmr f6, f0
  1296. fmr f7, f0
  1297. srawi. r0, TEMP, 2
  1298. mtspr CTR, r0
  1299. #endif
  1300. ble LL(45)
  1301. .align 4
  1302. LL(42):
  1303. fmadd f0, f16, f20, f0
  1304. fmadd f1, f17, f21, f1
  1305. fmadd f2, f17, f20, f2
  1306. fmadd f3, f16, f21, f3
  1307. LFD f16, 4 * SIZE(AO)
  1308. LFD f17, 5 * SIZE(AO)
  1309. LFD f20, 4 * SIZE(BO)
  1310. LFD f21, 5 * SIZE(BO)
  1311. fmadd f4, f18, f22, f4
  1312. fmadd f5, f19, f23, f5
  1313. fmadd f6, f19, f22, f6
  1314. fmadd f7, f18, f23, f7
  1315. LFD f18, 6 * SIZE(AO)
  1316. LFD f19, 7 * SIZE(AO)
  1317. LFD f22, 6 * SIZE(BO)
  1318. LFD f23, 7 * SIZE(BO)
  1319. fmadd f0, f16, f20, f0
  1320. fmadd f1, f17, f21, f1
  1321. fmadd f2, f17, f20, f2
  1322. fmadd f3, f16, f21, f3
  1323. LFD f16, 8 * SIZE(AO)
  1324. LFD f17, 9 * SIZE(AO)
  1325. LFD f20, 8 * SIZE(BO)
  1326. LFD f21, 9 * SIZE(BO)
  1327. fmadd f4, f18, f22, f4
  1328. fmadd f5, f19, f23, f5
  1329. fmadd f6, f19, f22, f6
  1330. fmadd f7, f18, f23, f7
  1331. LFD f18, 10 * SIZE(AO)
  1332. LFD f19, 11 * SIZE(AO)
  1333. LFD f22, 10 * SIZE(BO)
  1334. LFD f23, 11 * SIZE(BO)
  1335. addi AO, AO, 8 * SIZE
  1336. addi BO, BO, 8 * SIZE
  1337. bdnz LL(42)
  1338. .align 4
  1339. LL(45):
  1340. fadd f0, f0, f4
  1341. fadd f1, f1, f5
  1342. fadd f2, f2, f6
  1343. fadd f3, f3, f7
  1344. #if defined(LT) || defined(RN)
  1345. andi. r0, KK, 3
  1346. #else
  1347. andi. r0, TEMP, 3
  1348. #endif
  1349. mtspr CTR,r0
  1350. ble LL(47)
  1351. .align 4
  1352. LL(46):
  1353. fmadd f0, f16, f20, f0
  1354. fmadd f1, f17, f21, f1
  1355. fmadd f2, f17, f20, f2
  1356. fmadd f3, f16, f21, f3
  1357. LFD f16, 2 * SIZE(AO)
  1358. LFD f17, 3 * SIZE(AO)
  1359. LFD f20, 2 * SIZE(BO)
  1360. LFD f21, 3 * SIZE(BO)
  1361. addi AO, AO, 2 * SIZE
  1362. addi BO, BO, 2 * SIZE
  1363. bdnz LL(46)
  1364. .align 4
  1365. LL(47):
  1366. #ifndef CONJ
  1367. FSUB f0, f0, f1
  1368. FADD f1, f2, f3
  1369. #else
  1370. FADD f0, f0, f1
  1371. FSUB f1, f3, f2
  1372. #endif
  1373. #if defined(LN) || defined(RT)
  1374. subi r0, KK, 1
  1375. slwi r0, r0, 0 + ZBASE_SHIFT
  1376. add AO, AORIG, r0
  1377. add BO, B, r0
  1378. #endif
  1379. #if defined(LN) || defined(LT)
  1380. LFD f16, 0 * SIZE(BO)
  1381. LFD f17, 1 * SIZE(BO)
  1382. FSUB f0, f16, f0
  1383. FSUB f1, f17, f1
  1384. #else
  1385. LFD f16, 0 * SIZE(AO)
  1386. LFD f17, 1 * SIZE(AO)
  1387. #ifndef CONJ
  1388. FSUB f0, f16, f0
  1389. FSUB f1, f17, f1
  1390. #else
  1391. FSUB f0, f16, f0
  1392. FADD f1, f17, f1
  1393. #endif
  1394. #endif
  1395. #ifdef LN
  1396. LFD f20, 0 * SIZE(AO)
  1397. LFD f21, 1 * SIZE(AO)
  1398. FMUL f4, f21, f1
  1399. FMUL f5, f21, f0
  1400. #ifndef CONJ
  1401. FMSUB f0, f20, f0, f4
  1402. FMADD f1, f20, f1, f5
  1403. #else
  1404. FMADD f0, f20, f0, f4
  1405. FMSUB f1, f20, f1, f5
  1406. #endif
  1407. #endif
  1408. #ifdef LT
  1409. LFD f16, 0 * SIZE(AO)
  1410. LFD f17, 1 * SIZE(AO)
  1411. FMUL f4, f17, f1
  1412. FMUL f5, f17, f0
  1413. #ifndef CONJ
  1414. FMSUB f0, f16, f0, f4
  1415. FMADD f1, f16, f1, f5
  1416. #else
  1417. FMADD f0, f16, f0, f4
  1418. FMSUB f1, f16, f1, f5
  1419. #endif
  1420. #endif
  1421. #ifdef RN
  1422. LFD f16, 0 * SIZE(BO)
  1423. LFD f17, 1 * SIZE(BO)
  1424. FMUL f4, f17, f1
  1425. FMUL f5, f17, f0
  1426. #ifndef CONJ
  1427. FMSUB f0, f16, f0, f4
  1428. FMADD f1, f16, f1, f5
  1429. #else
  1430. FMADD f0, f16, f0, f4
  1431. FMSUB f1, f16, f1, f5
  1432. #endif
  1433. #endif
  1434. #ifdef RT
  1435. LFD f20, 0 * SIZE(BO)
  1436. LFD f21, 1 * SIZE(BO)
  1437. FMUL f4, f21, f1
  1438. FMUL f5, f21, f0
  1439. #ifndef CONJ
  1440. FMSUB f0, f20, f0, f4
  1441. FMADD f1, f20, f1, f5
  1442. #else
  1443. FMADD f0, f20, f0, f4
  1444. FMSUB f1, f20, f1, f5
  1445. #endif
  1446. #endif
  1447. #ifdef LN
  1448. subi CO1, CO1, 2 * SIZE
  1449. #endif
  1450. #if defined(LN) || defined(LT)
  1451. STFD f0, 0 * SIZE(BO)
  1452. STFD f1, 1 * SIZE(BO)
  1453. #else
  1454. STFD f0, 0 * SIZE(AO)
  1455. STFD f1, 1 * SIZE(AO)
  1456. #endif
  1457. STFD f0, 0 * SIZE(CO1)
  1458. STFD f1, 1 * SIZE(CO1)
  1459. #ifndef LN
  1460. addi CO1, CO1, 2 * SIZE
  1461. #endif
  1462. #ifdef RT
  1463. slwi r0, K, 0 + ZBASE_SHIFT
  1464. add AORIG, AORIG, r0
  1465. #endif
  1466. #if defined(LT) || defined(RN)
  1467. sub TEMP, K, KK
  1468. slwi TEMP, TEMP, 0 + ZBASE_SHIFT
  1469. add AO, AO, TEMP
  1470. add BO, BO, TEMP
  1471. #endif
  1472. #ifdef LT
  1473. addi KK, KK, 1
  1474. #endif
  1475. #ifdef LN
  1476. subi KK, KK, 1
  1477. #endif
  1478. .align 4
  1479. LL(40):
  1480. srawi. I, M, 1
  1481. ble LL(49)
  1482. .align 4
  1483. LL(31):
  1484. #if defined(LT) || defined(RN)
  1485. LFD f20, 0 * SIZE(AO)
  1486. LFD f21, 1 * SIZE(AO)
  1487. LFD f22, 2 * SIZE(AO)
  1488. LFD f23, 3 * SIZE(AO)
  1489. LFD f24, 4 * SIZE(AO)
  1490. LFD f25, 5 * SIZE(AO)
  1491. LFD f26, 6 * SIZE(AO)
  1492. LFD f27, 7 * SIZE(AO)
  1493. LFD f16, 0 * SIZE(B)
  1494. LFD f17, 1 * SIZE(B)
  1495. LFD f18, 2 * SIZE(B)
  1496. LFD f19, 3 * SIZE(B)
  1497. lfs f0, FZERO
  1498. fmr f1, f0
  1499. fmr f2, f0
  1500. fmr f3, f0
  1501. fmr f4, f0
  1502. fmr f5, f0
  1503. fmr f6, f0
  1504. fmr f7, f0
  1505. dcbt CO1, PREC
  1506. srawi. r0, KK, 2
  1507. mr BO, B
  1508. mtspr CTR, r0
  1509. #else
  1510. #ifdef LN
  1511. slwi r0, K, 1 + ZBASE_SHIFT
  1512. sub AORIG, AORIG, r0
  1513. #endif
  1514. slwi r0, KK, 1 + ZBASE_SHIFT
  1515. slwi TEMP, KK, 0 + ZBASE_SHIFT
  1516. add AO, AORIG, r0
  1517. add BO, B, TEMP
  1518. sub TEMP, K, KK
  1519. LFD f20, 0 * SIZE(AO)
  1520. LFD f21, 1 * SIZE(AO)
  1521. LFD f22, 2 * SIZE(AO)
  1522. LFD f23, 3 * SIZE(AO)
  1523. LFD f24, 4 * SIZE(AO)
  1524. LFD f25, 5 * SIZE(AO)
  1525. LFD f26, 6 * SIZE(AO)
  1526. LFD f27, 7 * SIZE(AO)
  1527. LFD f16, 0 * SIZE(BO)
  1528. LFD f17, 1 * SIZE(BO)
  1529. LFD f18, 2 * SIZE(BO)
  1530. LFD f19, 3 * SIZE(BO)
  1531. lfs f0, FZERO
  1532. fmr f1, f0
  1533. fmr f2, f0
  1534. fmr f3, f0
  1535. fmr f4, f0
  1536. fmr f5, f0
  1537. fmr f6, f0
  1538. fmr f7, f0
  1539. srawi. r0, TEMP, 2
  1540. mtspr CTR, r0
  1541. #endif
  1542. ble LL(35)
  1543. .align 4
  1544. LL(32):
  1545. fmadd f0, f16, f20, f0
  1546. fmadd f1, f16, f21, f1
  1547. fmadd f2, f16, f22, f2
  1548. fmadd f3, f16, f23, f3
  1549. fmadd f4, f17, f20, f4
  1550. fmadd f5, f17, f21, f5
  1551. fmadd f6, f17, f22, f6
  1552. fmadd f7, f17, f23, f7
  1553. LFD f20, 8 * SIZE(AO)
  1554. LFD f21, 9 * SIZE(AO)
  1555. LFD f22, 10 * SIZE(AO)
  1556. LFD f23, 11 * SIZE(AO)
  1557. fmadd f0, f18, f24, f0
  1558. fmadd f1, f18, f25, f1
  1559. fmadd f2, f18, f26, f2
  1560. fmadd f3, f18, f27, f3
  1561. fmadd f4, f19, f24, f4
  1562. fmadd f5, f19, f25, f5
  1563. fmadd f6, f19, f26, f6
  1564. fmadd f7, f19, f27, f7
  1565. LFD f24, 12 * SIZE(AO)
  1566. LFD f25, 13 * SIZE(AO)
  1567. LFD f26, 14 * SIZE(AO)
  1568. LFD f27, 15 * SIZE(AO)
  1569. LFD f16, 4 * SIZE(BO)
  1570. LFD f17, 5 * SIZE(BO)
  1571. LFD f18, 6 * SIZE(BO)
  1572. LFD f19, 7 * SIZE(BO)
  1573. fmadd f0, f16, f20, f0
  1574. fmadd f1, f16, f21, f1
  1575. fmadd f2, f16, f22, f2
  1576. fmadd f3, f16, f23, f3
  1577. fmadd f4, f17, f20, f4
  1578. fmadd f5, f17, f21, f5
  1579. fmadd f6, f17, f22, f6
  1580. fmadd f7, f17, f23, f7
  1581. LFD f20, 16 * SIZE(AO)
  1582. LFD f21, 17 * SIZE(AO)
  1583. LFD f22, 18 * SIZE(AO)
  1584. LFD f23, 19 * SIZE(AO)
  1585. fmadd f0, f18, f24, f0
  1586. fmadd f1, f18, f25, f1
  1587. fmadd f2, f18, f26, f2
  1588. fmadd f3, f18, f27, f3
  1589. fmadd f4, f19, f24, f4
  1590. fmadd f5, f19, f25, f5
  1591. fmadd f6, f19, f26, f6
  1592. fmadd f7, f19, f27, f7
  1593. LFD f24, 20 * SIZE(AO)
  1594. LFD f25, 21 * SIZE(AO)
  1595. LFD f26, 22 * SIZE(AO)
  1596. LFD f27, 23 * SIZE(AO)
  1597. LFD f16, 8 * SIZE(BO)
  1598. LFD f17, 9 * SIZE(BO)
  1599. LFD f18, 10 * SIZE(BO)
  1600. LFD f19, 11 * SIZE(BO)
  1601. addi AO, AO, 16 * SIZE
  1602. addi BO, BO, 8 * SIZE
  1603. dcbt PREA, AO
  1604. dcbt PREA, BO
  1605. bdnz LL(32)
  1606. .align 4
  1607. LL(35):
  1608. #if defined(LT) || defined(RN)
  1609. andi. r0, KK, 3
  1610. #else
  1611. andi. r0, TEMP, 3
  1612. #endif
  1613. mtspr CTR, r0
  1614. ble LL(37)
  1615. .align 4
  1616. LL(36):
  1617. fmadd f0, f16, f20, f0
  1618. fmadd f1, f16, f21, f1
  1619. fmadd f2, f16, f22, f2
  1620. fmadd f3, f16, f23, f3
  1621. fmadd f4, f17, f20, f4
  1622. fmadd f5, f17, f21, f5
  1623. fmadd f6, f17, f22, f6
  1624. fmadd f7, f17, f23, f7
  1625. LFD f20, 4 * SIZE(AO)
  1626. LFD f21, 5 * SIZE(AO)
  1627. LFD f22, 6 * SIZE(AO)
  1628. LFD f23, 7 * SIZE(AO)
  1629. LFD f16, 2 * SIZE(BO)
  1630. LFD f17, 3 * SIZE(BO)
  1631. addi BO, BO, 2 * SIZE
  1632. addi AO, AO, 4 * SIZE
  1633. bdnz LL(36)
  1634. .align 4
  1635. LL(37):
  1636. #ifndef CONJ
  1637. FSUB f0, f0, f5
  1638. FADD f1, f1, f4
  1639. FSUB f2, f2, f7
  1640. FADD f3, f3, f6
  1641. #else
  1642. FADD f0, f0, f5
  1643. FSUB f1, f4, f1
  1644. FADD f2, f2, f7
  1645. FSUB f3, f6, f3
  1646. #endif
  1647. #if defined(LN) || defined(RT)
  1648. #ifdef LN
  1649. subi r0, KK, 2
  1650. #else
  1651. subi r0, KK, 1
  1652. #endif
  1653. slwi TEMP, r0, 1 + ZBASE_SHIFT
  1654. slwi r0, r0, 0 + ZBASE_SHIFT
  1655. add AO, AORIG, TEMP
  1656. add BO, B, r0
  1657. #endif
  1658. #if defined(LN) || defined(LT)
  1659. LFD f16, 0 * SIZE(BO)
  1660. LFD f17, 1 * SIZE(BO)
  1661. LFD f18, 2 * SIZE(BO)
  1662. LFD f19, 3 * SIZE(BO)
  1663. FSUB f0, f16, f0
  1664. FSUB f1, f17, f1
  1665. FSUB f2, f18, f2
  1666. FSUB f3, f19, f3
  1667. #else
  1668. LFD f16, 0 * SIZE(AO)
  1669. LFD f17, 1 * SIZE(AO)
  1670. LFD f18, 2 * SIZE(AO)
  1671. LFD f19, 3 * SIZE(AO)
  1672. #ifndef CONJ
  1673. FSUB f0, f16, f0
  1674. FSUB f1, f17, f1
  1675. FSUB f2, f18, f2
  1676. FSUB f3, f19, f3
  1677. #else
  1678. FSUB f0, f16, f0
  1679. FADD f1, f17, f1
  1680. FSUB f2, f18, f2
  1681. FADD f3, f19, f3
  1682. #endif
  1683. #endif
  1684. #ifdef LN
  1685. LFD f16, 6 * SIZE(AO)
  1686. LFD f17, 7 * SIZE(AO)
  1687. LFD f18, 4 * SIZE(AO)
  1688. LFD f19, 5 * SIZE(AO)
  1689. LFD f20, 0 * SIZE(AO)
  1690. LFD f21, 1 * SIZE(AO)
  1691. FMUL f6, f17, f3
  1692. FMUL f7, f17, f2
  1693. #ifndef CONJ
  1694. FMSUB f2, f16, f2, f6
  1695. FMADD f3, f16, f3, f7
  1696. FMADD f0, f19, f3, f0
  1697. FNMSUB f1, f19, f2, f1
  1698. FNMSUB f0, f18, f2, f0
  1699. FNMSUB f1, f18, f3, f1
  1700. FMUL f4, f21, f1
  1701. FMUL f5, f21, f0
  1702. FMSUB f0, f20, f0, f4
  1703. FMADD f1, f20, f1, f5
  1704. #else
  1705. FMADD f2, f16, f2, f6
  1706. FMSUB f3, f16, f3, f7
  1707. FMSUB f0, f19, f3, f0
  1708. FNMADD f1, f19, f2, f1
  1709. FNMADD f0, f18, f2, f0
  1710. FNMADD f1, f18, f3, f1
  1711. FMUL f4, f21, f1
  1712. FMUL f5, f21, f0
  1713. FMADD f0, f20, f0, f4
  1714. FMSUB f1, f20, f1, f5
  1715. #endif
  1716. #endif
  1717. #ifdef LT
  1718. LFD f16, 0 * SIZE(AO)
  1719. LFD f17, 1 * SIZE(AO)
  1720. LFD f18, 2 * SIZE(AO)
  1721. LFD f19, 3 * SIZE(AO)
  1722. LFD f20, 6 * SIZE(AO)
  1723. LFD f21, 7 * SIZE(AO)
  1724. FMUL f4, f17, f1
  1725. FMUL f5, f17, f0
  1726. #ifndef CONJ
  1727. FMSUB f0, f16, f0, f4
  1728. FMADD f1, f16, f1, f5
  1729. FMADD f2, f19, f1, f2
  1730. FNMSUB f3, f19, f0, f3
  1731. FNMSUB f2, f18, f0, f2
  1732. FNMSUB f3, f18, f1, f3
  1733. FMUL f4, f21, f3
  1734. FMUL f5, f21, f2
  1735. FMSUB f2, f20, f2, f4
  1736. FMADD f3, f20, f3, f5
  1737. #else
  1738. FMADD f0, f16, f0, f4
  1739. FMSUB f1, f16, f1, f5
  1740. FMSUB f2, f19, f1, f2
  1741. FNMADD f3, f19, f0, f3
  1742. FNMADD f2, f18, f0, f2
  1743. FNMADD f3, f18, f1, f3
  1744. FMUL f4, f21, f3
  1745. FMUL f5, f21, f2
  1746. FMADD f2, f20, f2, f4
  1747. FMSUB f3, f20, f3, f5
  1748. #endif
  1749. #endif
  1750. #ifdef RN
  1751. LFD f16, 0 * SIZE(BO)
  1752. LFD f17, 1 * SIZE(BO)
  1753. FMUL f4, f17, f1
  1754. FMUL f5, f17, f0
  1755. FMUL f6, f17, f3
  1756. FMUL f7, f17, f2
  1757. #ifndef CONJ
  1758. FMSUB f0, f16, f0, f4
  1759. FMADD f1, f16, f1, f5
  1760. FMSUB f2, f16, f2, f6
  1761. FMADD f3, f16, f3, f7
  1762. #else
  1763. FMADD f0, f16, f0, f4
  1764. FMSUB f1, f16, f1, f5
  1765. FMADD f2, f16, f2, f6
  1766. FMSUB f3, f16, f3, f7
  1767. #endif
  1768. #endif
  1769. #ifdef RT
  1770. LFD f20, 0 * SIZE(BO)
  1771. LFD f21, 1 * SIZE(BO)
  1772. FMUL f4, f21, f1
  1773. FMUL f5, f21, f0
  1774. FMUL f6, f21, f3
  1775. FMUL f7, f21, f2
  1776. #ifndef CONJ
  1777. FMSUB f0, f20, f0, f4
  1778. FMADD f1, f20, f1, f5
  1779. FMSUB f2, f20, f2, f6
  1780. FMADD f3, f20, f3, f7
  1781. #else
  1782. FMADD f0, f20, f0, f4
  1783. FMSUB f1, f20, f1, f5
  1784. FMADD f2, f20, f2, f6
  1785. FMSUB f3, f20, f3, f7
  1786. #endif
  1787. #endif
  1788. #ifdef LN
  1789. subi CO1, CO1, 4 * SIZE
  1790. #endif
  1791. #if defined(LN) || defined(LT)
  1792. STFD f0, 0 * SIZE(BO)
  1793. STFD f1, 1 * SIZE(BO)
  1794. STFD f2, 2 * SIZE(BO)
  1795. STFD f3, 3 * SIZE(BO)
  1796. #else
  1797. STFD f0, 0 * SIZE(AO)
  1798. STFD f1, 1 * SIZE(AO)
  1799. STFD f2, 2 * SIZE(AO)
  1800. STFD f3, 3 * SIZE(AO)
  1801. #endif
  1802. STFD f0, 0 * SIZE(CO1)
  1803. STFD f1, 1 * SIZE(CO1)
  1804. STFD f2, 2 * SIZE(CO1)
  1805. STFD f3, 3 * SIZE(CO1)
  1806. #ifndef LN
  1807. addi CO1, CO1, 4 * SIZE
  1808. #endif
  1809. #ifdef RT
  1810. slwi r0, K, 1 + ZBASE_SHIFT
  1811. add AORIG, AORIG, r0
  1812. #endif
  1813. #if defined(LT) || defined(RN)
  1814. sub TEMP, K, KK
  1815. slwi r0, TEMP, 1 + ZBASE_SHIFT
  1816. slwi TEMP, TEMP, 0 + ZBASE_SHIFT
  1817. add AO, AO, r0
  1818. add BO, BO, TEMP
  1819. #endif
  1820. #ifdef LT
  1821. addi KK, KK, 2
  1822. #endif
  1823. #ifdef LN
  1824. subi KK, KK, 2
  1825. #endif
  1826. addic. I, I, -1
  1827. bgt LL(31)
  1828. .align 4
  1829. LL(49):
  1830. #ifdef LN
  1831. slwi r0, K, 0 + ZBASE_SHIFT
  1832. add B, B, r0
  1833. #endif
  1834. #if defined(LT) || defined(RN)
  1835. mr B, BO
  1836. #endif
  1837. #ifdef RN
  1838. addi KK, KK, 1
  1839. #endif
  1840. #ifdef RT
  1841. subi KK, KK, 1
  1842. #endif
  1843. .align 4
  1844. LL(999):
  1845. addi r3, 0, 0
  1846. lfd f14, 0(SP)
  1847. lfd f15, 8(SP)
  1848. lfd f16, 16(SP)
  1849. lfd f17, 24(SP)
  1850. lfd f18, 32(SP)
  1851. lfd f19, 40(SP)
  1852. lfd f20, 48(SP)
  1853. lfd f21, 56(SP)
  1854. lfd f22, 64(SP)
  1855. lfd f23, 72(SP)
  1856. lfd f24, 80(SP)
  1857. lfd f25, 88(SP)
  1858. lfd f26, 96(SP)
  1859. lfd f27, 104(SP)
  1860. lfd f28, 112(SP)
  1861. lfd f29, 120(SP)
  1862. lfd f30, 128(SP)
  1863. lfd f31, 136(SP)
  1864. #ifdef __64BIT__
  1865. ld r31, 144(SP)
  1866. ld r30, 152(SP)
  1867. ld r29, 160(SP)
  1868. ld r28, 168(SP)
  1869. ld r27, 176(SP)
  1870. ld r26, 184(SP)
  1871. ld r25, 192(SP)
  1872. ld r24, 200(SP)
  1873. ld r23, 208(SP)
  1874. ld r22, 216(SP)
  1875. ld r21, 224(SP)
  1876. #else
  1877. lwz r31, 144(SP)
  1878. lwz r30, 148(SP)
  1879. lwz r29, 152(SP)
  1880. lwz r28, 156(SP)
  1881. lwz r27, 160(SP)
  1882. lwz r26, 164(SP)
  1883. lwz r25, 168(SP)
  1884. lwz r24, 172(SP)
  1885. lwz r23, 176(SP)
  1886. lwz r22, 180(SP)
  1887. lwz r21, 184(SP)
  1888. #endif
  1889. addi SP, SP, STACKSIZE
  1890. blr
  1891. EPILOGUE
  1892. #endif