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_LT.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)
6 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)
6 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)
6 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)
6 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 PPC970
  209. li PREC, 4 * SIZE
  210. #endif
  211. #ifdef POWER4
  212. li PREC, 4 * SIZE /* is 12 best? */
  213. #endif
  214. #ifdef POWER5
  215. li PREC, 4 * SIZE /* is 12 best? */
  216. #endif
  217. #else
  218. #if defined(linux) || defined(__FreeBSD__)
  219. #ifndef __64BIT__
  220. lwz PREA, FRAMESLOT(2) + STACKSIZE(SP)
  221. lwz PREC, FRAMESLOT(3) + STACKSIZE(SP)
  222. #else
  223. ld PREA, FRAMESLOT(3) + STACKSIZE(SP)
  224. ld PREC, FRAMESLOT(4) + STACKSIZE(SP)
  225. #endif
  226. #endif
  227. #if defined(_AIX) || defined(__APPLE__)
  228. #ifdef __64BIT__
  229. ld PREA, FRAMESLOT(3) + STACKSIZE(SP)
  230. ld PREC, FRAMESLOT(4) + STACKSIZE(SP)
  231. #else
  232. #ifdef DOUBLE
  233. lwz PREA, FRAMESLOT(4) + STACKSIZE(SP)
  234. lwz PREC, FRAMESLOT(5) + STACKSIZE(SP)
  235. #else
  236. lwz PREA, FRAMESLOT(3) + STACKSIZE(SP)
  237. lwz PREC, FRAMESLOT(4) + STACKSIZE(SP)
  238. #endif
  239. #endif
  240. #endif
  241. #endif
  242. #ifndef PREFETCHTEST
  243. #ifdef PPC970
  244. #ifdef ALLOC_HUGETLB
  245. li PREA, (16 * 5 * SIZE + 16)
  246. #else
  247. li PREA, (16 * 9 * SIZE + 16)
  248. #endif
  249. #endif
  250. #ifdef POWER4
  251. #ifdef ALLOC_HUGETLB
  252. li PREA, (16 * 1 * SIZE + 16)
  253. #else
  254. li PREA, (16 * 2 * SIZE + 16)
  255. #endif
  256. #endif
  257. #ifdef POWER5
  258. #ifdef ALLOC_HUGETLB
  259. li PREA, (16 * 7 * SIZE | 1)
  260. li PREB, (16 * 7 * SIZE | 3)
  261. #else
  262. li PREA, (16 * 12 * SIZE | 1)
  263. li PREB, (16 * 6 * SIZE | 3)
  264. #endif
  265. #endif
  266. #endif
  267. srawi. J, N, 1
  268. ble LL(30)
  269. .align 4
  270. LL(10):
  271. #ifdef RT
  272. slwi r0, K, 1 + ZBASE_SHIFT
  273. sub B, B, r0
  274. slwi r0, LDC, 1
  275. sub C, C, r0
  276. #endif
  277. mr CO1, C
  278. add CO2, C, LDC
  279. #ifdef LN
  280. add KK, M, OFFSET
  281. #endif
  282. #ifdef LT
  283. mr KK, OFFSET
  284. #endif
  285. srawi. I, M, 1
  286. #if defined(LN) || defined(RT)
  287. mr AORIG, A
  288. #else
  289. mr AO, A
  290. #endif
  291. #ifndef RT
  292. add C, CO2, LDC
  293. #endif
  294. ble LL(20)
  295. .align 4
  296. LL(11):
  297. #if defined(LT) || defined(RN)
  298. LFD f16, 0 * SIZE(AO)
  299. LFD f17, 1 * SIZE(AO)
  300. LFD f18, 2 * SIZE(AO)
  301. LFD f19, 3 * SIZE(AO)
  302. LFD f20, 0 * SIZE(B)
  303. LFD f21, 1 * SIZE(B)
  304. LFD f22, 2 * SIZE(B)
  305. LFD f23, 3 * SIZE(B)
  306. lfs f0, FZERO
  307. fmr f1, f0
  308. fmr f2, f0
  309. fmr f3, f0
  310. fmr f4, f0
  311. fmr f5, f0
  312. fmr f6, f0
  313. fmr f7, f0
  314. fmr f8, f0
  315. fmr f9, f0
  316. fmr f10, f0
  317. fmr f11, f0
  318. fmr f12, f0
  319. fmr f13, f0
  320. fmr f14, f0
  321. fmr f15, f0
  322. dcbt CO1, PREC
  323. dcbt CO2, PREC
  324. srawi. r0, KK, 2
  325. mtspr CTR, r0
  326. mr BO, B
  327. #else
  328. #ifdef LN
  329. slwi r0, K, 1 + ZBASE_SHIFT
  330. sub AORIG, AORIG, r0
  331. #endif
  332. slwi TEMP, KK, 1 + ZBASE_SHIFT
  333. add AO, AORIG, TEMP
  334. add BO, B, TEMP
  335. sub TEMP, K, KK
  336. LFD f16, 0 * SIZE(AO)
  337. LFD f17, 1 * SIZE(AO)
  338. LFD f18, 2 * SIZE(AO)
  339. LFD f19, 3 * SIZE(AO)
  340. LFD f20, 0 * SIZE(BO)
  341. LFD f21, 1 * SIZE(BO)
  342. LFD f22, 2 * SIZE(BO)
  343. LFD f23, 3 * SIZE(BO)
  344. lfs f0, FZERO
  345. fmr f1, f0
  346. fmr f2, f0
  347. fmr f3, f0
  348. fmr f4, f0
  349. fmr f5, f0
  350. fmr f6, f0
  351. fmr f7, f0
  352. fmr f8, f0
  353. fmr f9, f0
  354. fmr f10, f0
  355. fmr f11, f0
  356. fmr f12, f0
  357. fmr f13, f0
  358. fmr f14, f0
  359. fmr f15, f0
  360. dcbt CO1, PREC
  361. dcbt CO2, PREC
  362. srawi. r0, TEMP, 2
  363. mtspr CTR, r0
  364. #endif
  365. ble LL(15)
  366. .align 4
  367. LL(12):
  368. fmadd f0, f16, f20, f0
  369. fmadd f5, f17, f21, f5
  370. fmadd f10, f18, f22, f10
  371. fmadd f15, f19, f23, f15
  372. LFD f28, 4 * SIZE(BO)
  373. LFD f29, 5 * SIZE(BO)
  374. LFD f30, 6 * SIZE(BO)
  375. LFD f31, 7 * SIZE(BO)
  376. fmadd f1, f17, f20, f1
  377. fmadd f2, f18, f20, f2
  378. fmadd f3, f19, f20, f3
  379. fmadd f4, f16, f21, f4
  380. LFD f24, 4 * SIZE(AO)
  381. LFD f25, 5 * SIZE(AO)
  382. LFD f26, 6 * SIZE(AO)
  383. LFD f27, 7 * SIZE(AO)
  384. fmadd f6, f18, f21, f6
  385. fmadd f7, f19, f21, f7
  386. fmadd f8, f16, f22, f8
  387. fmadd f9, f17, f22, f9
  388. fmadd f11, f19, f22, f11
  389. fmadd f12, f16, f23, f12
  390. fmadd f13, f17, f23, f13
  391. fmadd f14, f18, f23, f14
  392. LFD f20, 8 * SIZE(BO)
  393. LFD f21, 9 * SIZE(BO)
  394. LFD f22, 10 * SIZE(BO)
  395. LFD f23, 11 * SIZE(BO)
  396. fmadd f0, f24, f28, f0
  397. fmadd f5, f25, f29, f5
  398. fmadd f10, f26, f30, f10
  399. fmadd f15, f27, f31, f15
  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. fmadd f1, f25, f28, f1
  405. fmadd f2, f26, f28, f2
  406. fmadd f3, f27, f28, f3
  407. fmadd f4, f24, f29, f4
  408. fmadd f6, f26, f29, f6
  409. fmadd f7, f27, f29, f7
  410. fmadd f8, f24, f30, f8
  411. fmadd f9, f25, f30, f9
  412. fmadd f11, f27, f30, f11
  413. fmadd f12, f24, f31, f12
  414. fmadd f13, f25, f31, f13
  415. fmadd f14, f26, f31, f14
  416. LFD f28, 12 * SIZE(BO)
  417. LFD f29, 13 * SIZE(BO)
  418. LFD f30, 14 * SIZE(BO)
  419. LFD f31, 15 * SIZE(BO)
  420. fmadd f0, f16, f20, f0
  421. fmadd f5, f17, f21, f5
  422. fmadd f10, f18, f22, f10
  423. fmadd f15, f19, f23, f15
  424. LFD f24, 12 * SIZE(AO)
  425. LFD f25, 13 * SIZE(AO)
  426. LFD f26, 14 * SIZE(AO)
  427. LFD f27, 15 * SIZE(AO)
  428. fmadd f1, f17, f20, f1
  429. fmadd f2, f18, f20, f2
  430. fmadd f3, f19, f20, f3
  431. fmadd f4, f16, f21, f4
  432. fmadd f6, f18, f21, f6
  433. fmadd f7, f19, f21, f7
  434. fmadd f8, f16, f22, f8
  435. fmadd f9, f17, f22, f9
  436. fmadd f11, f19, f22, f11
  437. fmadd f12, f16, f23, f12
  438. fmadd f13, f17, f23, f13
  439. fmadd f14, f18, f23, f14
  440. LFD f16, 16 * SIZE(AO)
  441. LFD f17, 17 * SIZE(AO)
  442. LFD f18, 18 * SIZE(AO)
  443. LFD f19, 19 * SIZE(AO)
  444. fmadd f0, f24, f28, f0
  445. fmadd f5, f25, f29, f5
  446. fmadd f10, f26, f30, f10
  447. fmadd f15, f27, f31, f15
  448. LFD f20, 16 * SIZE(BO)
  449. LFD f21, 17 * SIZE(BO)
  450. LFD f22, 18 * SIZE(BO)
  451. LFD f23, 19 * SIZE(BO)
  452. fmadd f1, f25, f28, f1
  453. fmadd f2, f26, f28, f2
  454. fmadd f3, f27, f28, f3
  455. fmadd f4, f24, f29, f4
  456. fmadd f6, f26, f29, f6
  457. fmadd f7, f27, f29, f7
  458. fmadd f8, f24, f30, f8
  459. fmadd f9, f25, f30, f9
  460. fmadd f11, f27, f30, f11
  461. fmadd f12, f24, f31, f12
  462. fmadd f13, f25, f31, f13
  463. fmadd f14, f26, f31, f14
  464. addi AO, AO, 16 * SIZE
  465. addi BO, BO, 16 * SIZE
  466. #ifdef PPC970
  467. #ifndef ALLOC_HUGETLB
  468. DCBT(AO, PREA)
  469. #endif
  470. DCBT(BO, PREB)
  471. #endif
  472. #ifdef POWER4
  473. #ifndef ALLOC_HUGETLB
  474. DCBT(AO, PREA)
  475. #endif
  476. DCBT(BO, PREB)
  477. #endif
  478. #ifdef POWER5
  479. DCBT(AO, PREA)
  480. DCBT(BO, PREB)
  481. #endif
  482. bdnz LL(12)
  483. .align 4
  484. LL(15):
  485. #if defined(LT) || defined(RN)
  486. andi. r0, KK, 3
  487. #else
  488. andi. r0, TEMP, 3
  489. #endif
  490. mtspr CTR, r0
  491. ble LL(KERNEL_MainFinish)
  492. .align 4
  493. LL(16):
  494. fmadd f0, f16, f20, f0
  495. fmadd f5, f17, f21, f5
  496. fmadd f10, f18, f22, f10
  497. fmadd f15, f19, f23, f15
  498. fmadd f1, f17, f20, f1
  499. fmadd f2, f18, f20, f2
  500. fmadd f3, f19, f20, f3
  501. fmadd f4, f16, f21, f4
  502. fmadd f6, f18, f21, f6
  503. fmadd f7, f19, f21, f7
  504. fmadd f8, f16, f22, f8
  505. fmadd f9, f17, f22, f9
  506. fmadd f11, f19, f22, f11
  507. fmadd f12, f16, f23, f12
  508. fmadd f13, f17, f23, f13
  509. fmadd f14, f18, f23, f14
  510. LFD f16, 4 * SIZE(AO)
  511. LFD f17, 5 * SIZE(AO)
  512. LFD f18, 6 * SIZE(AO)
  513. LFD f19, 7 * SIZE(AO)
  514. LFD f20, 4 * SIZE(BO)
  515. LFD f21, 5 * SIZE(BO)
  516. LFD f22, 6 * SIZE(BO)
  517. LFD f23, 7 * SIZE(BO)
  518. addi BO, BO, 4 * SIZE
  519. addi AO, AO, 4 * SIZE
  520. bdnz LL(16)
  521. .align 4
  522. LL(KERNEL_MainFinish):
  523. #ifndef CONJ
  524. FSUB f0, f0, f5
  525. FADD f1, f1, f4
  526. FSUB f2, f2, f7
  527. FADD f3, f3, f6
  528. FSUB f8, f8, f13
  529. FADD f9, f9, f12
  530. FSUB f10, f10, f15
  531. FADD f11, f11, f14
  532. #else
  533. FADD f0, f0, f5
  534. FSUB f1, f4, f1
  535. FADD f2, f2, f7
  536. FSUB f3, f6, f3
  537. FADD f8, f8, f13
  538. FSUB f9, f12, f9
  539. FADD f10, f10, f15
  540. FSUB f11, f14, f11
  541. #endif
  542. #if defined(LN) || defined(RT)
  543. subi r0, KK, 2
  544. slwi r0, r0, 1 + ZBASE_SHIFT
  545. add AO, AORIG, r0
  546. add BO, B, r0
  547. #endif
  548. #if defined(LN) || defined(LT)
  549. LFD f16, 0 * SIZE(BO)
  550. LFD f17, 1 * SIZE(BO)
  551. LFD f18, 2 * SIZE(BO)
  552. LFD f19, 3 * SIZE(BO)
  553. LFD f20, 4 * SIZE(BO)
  554. LFD f21, 5 * SIZE(BO)
  555. LFD f22, 6 * SIZE(BO)
  556. LFD f23, 7 * SIZE(BO)
  557. FSUB f0, f16, f0
  558. FSUB f1, f17, f1
  559. FSUB f8, f18, f8
  560. FSUB f9, f19, f9
  561. FSUB f2, f20, f2
  562. FSUB f3, f21, f3
  563. FSUB f10, f22, f10
  564. FSUB f11, f23, f11
  565. #else
  566. LFD f16, 0 * SIZE(AO)
  567. LFD f17, 1 * SIZE(AO)
  568. LFD f18, 2 * SIZE(AO)
  569. LFD f19, 3 * SIZE(AO)
  570. LFD f20, 4 * SIZE(AO)
  571. LFD f21, 5 * SIZE(AO)
  572. LFD f22, 6 * SIZE(AO)
  573. LFD f23, 7 * SIZE(AO)
  574. #ifndef CONJ
  575. FSUB f0, f16, f0
  576. FSUB f1, f17, f1
  577. FSUB f2, f18, f2
  578. FSUB f3, f19, f3
  579. FSUB f8, f20, f8
  580. FSUB f9, f21, f9
  581. FSUB f10, f22, f10
  582. FSUB f11, f23, f11
  583. #else
  584. FSUB f0, f16, f0
  585. FADD f1, f17, f1
  586. FSUB f2, f18, f2
  587. FADD f3, f19, f3
  588. FSUB f8, f20, f8
  589. FADD f9, f21, f9
  590. FSUB f10, f22, f10
  591. FADD f11, f23, f11
  592. #endif
  593. #endif
  594. #ifdef LN
  595. LFD f16, 6 * SIZE(AO)
  596. LFD f17, 7 * SIZE(AO)
  597. LFD f18, 4 * SIZE(AO)
  598. LFD f19, 5 * SIZE(AO)
  599. LFD f20, 0 * SIZE(AO)
  600. LFD f21, 1 * SIZE(AO)
  601. FMUL f6, f17, f3
  602. FMUL f7, f17, f2
  603. FMUL f14, f17, f11
  604. FMUL f15, f17, f10
  605. #ifndef CONJ
  606. FMSUB f2, f16, f2, f6
  607. FMADD f3, f16, f3, f7
  608. FMSUB f10, f16, f10, f14
  609. FMADD f11, f16, f11, f15
  610. FMADD f0, f19, f3, f0
  611. FNMSUB f1, f19, f2, f1
  612. FMADD f8, f19, f11, f8
  613. FNMSUB f9, f19, f10, f9
  614. FNMSUB f0, f18, f2, f0
  615. FNMSUB f1, f18, f3, f1
  616. FNMSUB f8, f18, f10, f8
  617. FNMSUB f9, f18, f11, f9
  618. FMUL f4, f21, f1
  619. FMUL f5, f21, f0
  620. FMUL f12, f21, f9
  621. FMUL f13, f21, f8
  622. FMSUB f0, f20, f0, f4
  623. FMADD f1, f20, f1, f5
  624. FMSUB f8, f20, f8, f12
  625. FMADD f9, f20, f9, f13
  626. #else
  627. FMADD f2, f16, f2, f6
  628. FMSUB f3, f16, f3, f7
  629. FMADD f10, f16, f10, f14
  630. FMSUB f11, f16, f11, f15
  631. FMSUB f0, f19, f3, f0
  632. FNMADD f1, f19, f2, f1
  633. FMSUB f8, f19, f11, f8
  634. FNMADD f9, f19, f10, f9
  635. FNMADD f0, f18, f2, f0
  636. FNMADD f1, f18, f3, f1
  637. FNMADD f8, f18, f10, f8
  638. FNMADD f9, f18, f11, f9
  639. FMUL f4, f21, f1
  640. FMUL f5, f21, f0
  641. FMUL f12, f21, f9
  642. FMUL f13, f21, f8
  643. FMADD f0, f20, f0, f4
  644. FMSUB f1, f20, f1, f5
  645. FMADD f8, f20, f8, f12
  646. FMSUB f9, f20, f9, f13
  647. #endif
  648. #endif
  649. #ifdef LT
  650. LFD f16, 0 * SIZE(AO)
  651. LFD f17, 1 * SIZE(AO)
  652. LFD f18, 2 * SIZE(AO)
  653. LFD f19, 3 * SIZE(AO)
  654. LFD f20, 6 * SIZE(AO)
  655. LFD f21, 7 * SIZE(AO)
  656. FMUL f4, f17, f1
  657. FMUL f5, f17, f0
  658. FMUL f12, f17, f9
  659. FMUL f13, f17, f8
  660. #ifndef CONJ
  661. FMSUB f0, f16, f0, f4
  662. FMADD f1, f16, f1, f5
  663. FMSUB f8, f16, f8, f12
  664. FMADD f9, f16, f9, f13
  665. FMADD f2, f19, f1, f2
  666. FNMSUB f3, f19, f0, f3
  667. FMADD f10, f19, f9, f10
  668. FNMSUB f11, f19, f8, f11
  669. FNMSUB f2, f18, f0, f2
  670. FNMSUB f3, f18, f1, f3
  671. FNMSUB f10, f18, f8, f10
  672. FNMSUB f11, f18, f9, f11
  673. FMUL f4, f21, f3
  674. FMUL f5, f21, f2
  675. FMUL f12, f21, f11
  676. FMUL f13, f21, f10
  677. FMSUB f2, f20, f2, f4
  678. FMADD f3, f20, f3, f5
  679. FMSUB f10, f20, f10, f12
  680. FMADD f11, f20, f11, f13
  681. #else
  682. FMADD f0, f16, f0, f4
  683. FMSUB f1, f16, f1, f5
  684. FMADD f8, f16, f8, f12
  685. FMSUB f9, f16, f9, f13
  686. FMSUB f2, f19, f1, f2
  687. FNMADD f3, f19, f0, f3
  688. FMSUB f10, f19, f9, f10
  689. FNMADD f11, f19, f8, f11
  690. FNMADD f2, f18, f0, f2
  691. FNMADD f3, f18, f1, f3
  692. FNMADD f10, f18, f8, f10
  693. FNMADD f11, f18, f9, f11
  694. FMUL f4, f21, f3
  695. FMUL f5, f21, f2
  696. FMUL f12, f21, f11
  697. FMUL f13, f21, f10
  698. FMADD f2, f20, f2, f4
  699. FMSUB f3, f20, f3, f5
  700. FMADD f10, f20, f10, f12
  701. FMSUB f11, f20, f11, f13
  702. #endif
  703. #endif
  704. #ifdef RN
  705. LFD f16, 0 * SIZE(BO)
  706. LFD f17, 1 * SIZE(BO)
  707. LFD f18, 2 * SIZE(BO)
  708. LFD f19, 3 * SIZE(BO)
  709. LFD f20, 6 * SIZE(BO)
  710. LFD f21, 7 * SIZE(BO)
  711. FMUL f4, f17, f1
  712. FMUL f5, f17, f0
  713. FMUL f6, f17, f3
  714. FMUL f7, f17, f2
  715. #ifndef CONJ
  716. FMSUB f0, f16, f0, f4
  717. FMADD f1, f16, f1, f5
  718. FMSUB f2, f16, f2, f6
  719. FMADD f3, f16, f3, f7
  720. FMADD f8, f19, f1, f8
  721. FNMSUB f9, f19, f0, f9
  722. FMADD f10, f19, f3, f10
  723. FNMSUB f11, f19, f2, f11
  724. FNMSUB f8, f18, f0, f8
  725. FNMSUB f9, f18, f1, f9
  726. FNMSUB f10, f18, f2, f10
  727. FNMSUB f11, f18, f3, f11
  728. FMUL f4, f21, f9
  729. FMUL f5, f21, f8
  730. FMUL f6, f21, f11
  731. FMUL f7, f21, f10
  732. FMSUB f8, f20, f8, f4
  733. FMADD f9, f20, f9, f5
  734. FMSUB f10, f20, f10, f6
  735. FMADD f11, f20, f11, f7
  736. #else
  737. FMADD f0, f16, f0, f4
  738. FMSUB f1, f16, f1, f5
  739. FMADD f2, f16, f2, f6
  740. FMSUB f3, f16, f3, f7
  741. FMSUB f8, f19, f1, f8
  742. FNMADD f9, f19, f0, f9
  743. FMSUB f10, f19, f3, f10
  744. FNMADD f11, f19, f2, f11
  745. FNMADD f8, f18, f0, f8
  746. FNMADD f9, f18, f1, f9
  747. FNMADD f10, f18, f2, f10
  748. FNMADD f11, f18, f3, f11
  749. FMUL f4, f21, f9
  750. FMUL f5, f21, f8
  751. FMUL f6, f21, f11
  752. FMUL f7, f21, f10
  753. FMADD f8, f20, f8, f4
  754. FMSUB f9, f20, f9, f5
  755. FMADD f10, f20, f10, f6
  756. FMSUB f11, f20, f11, f7
  757. #endif
  758. #endif
  759. #ifdef RT
  760. LFD f16, 6 * SIZE(BO)
  761. LFD f17, 7 * SIZE(BO)
  762. LFD f18, 4 * SIZE(BO)
  763. LFD f19, 5 * SIZE(BO)
  764. LFD f20, 0 * SIZE(BO)
  765. LFD f21, 1 * SIZE(BO)
  766. FMUL f12, f17, f9
  767. FMUL f13, f17, f8
  768. FMUL f14, f17, f11
  769. FMUL f15, f17, f10
  770. #ifndef CONJ
  771. FMSUB f8, f16, f8, f12
  772. FMADD f9, f16, f9, f13
  773. FMSUB f10, f16, f10, f14
  774. FMADD f11, f16, f11, f15
  775. FMADD f0, f19, f9, f0
  776. FNMSUB f1, f19, f8, f1
  777. FMADD f2, f19, f11, f2
  778. FNMSUB f3, f19, f10, f3
  779. FNMSUB f0, f18, f8, f0
  780. FNMSUB f1, f18, f9, f1
  781. FNMSUB f2, f18, f10, f2
  782. FNMSUB f3, f18, f11, f3
  783. FMUL f4, f21, f1
  784. FMUL f5, f21, f0
  785. FMUL f6, f21, f3
  786. FMUL f7, f21, f2
  787. FMSUB f0, f20, f0, f4
  788. FMADD f1, f20, f1, f5
  789. FMSUB f2, f20, f2, f6
  790. FMADD f3, f20, f3, f7
  791. #else
  792. FMADD f8, f16, f8, f12
  793. FMSUB f9, f16, f9, f13
  794. FMADD f10, f16, f10, f14
  795. FMSUB f11, f16, f11, f15
  796. FMSUB f0, f19, f9, f0
  797. FNMADD f1, f19, f8, f1
  798. FMSUB f2, f19, f11, f2
  799. FNMADD f3, f19, f10, f3
  800. FNMADD f0, f18, f8, f0
  801. FNMADD f1, f18, f9, f1
  802. FNMADD f2, f18, f10, f2
  803. FNMADD f3, f18, f11, f3
  804. FMUL f4, f21, f1
  805. FMUL f5, f21, f0
  806. FMUL f6, f21, f3
  807. FMUL f7, f21, f2
  808. FMADD f0, f20, f0, f4
  809. FMSUB f1, f20, f1, f5
  810. FMADD f2, f20, f2, f6
  811. FMSUB f3, f20, f3, f7
  812. #endif
  813. #endif
  814. #ifdef LN
  815. subi CO1, CO1, 4 * SIZE
  816. subi CO2, CO2, 4 * SIZE
  817. #endif
  818. #if defined(LN) || defined(LT)
  819. STFD f0, 0 * SIZE(BO)
  820. STFD f1, 1 * SIZE(BO)
  821. STFD f8, 2 * SIZE(BO)
  822. STFD f9, 3 * SIZE(BO)
  823. STFD f2, 4 * SIZE(BO)
  824. STFD f3, 5 * SIZE(BO)
  825. STFD f10, 6 * SIZE(BO)
  826. STFD f11, 7 * SIZE(BO)
  827. #else
  828. STFD f0, 0 * SIZE(AO)
  829. STFD f1, 1 * SIZE(AO)
  830. STFD f2, 2 * SIZE(AO)
  831. STFD f3, 3 * SIZE(AO)
  832. STFD f8, 4 * SIZE(AO)
  833. STFD f9, 5 * SIZE(AO)
  834. STFD f10, 6 * SIZE(AO)
  835. STFD f11, 7 * SIZE(AO)
  836. #endif
  837. STFD f0, 0 * SIZE(CO1)
  838. STFD f1, 1 * SIZE(CO1)
  839. STFD f2, 2 * SIZE(CO1)
  840. STFD f3, 3 * SIZE(CO1)
  841. STFD f8, 0 * SIZE(CO2)
  842. STFD f9, 1 * SIZE(CO2)
  843. STFD f10, 2 * SIZE(CO2)
  844. STFD f11, 3 * SIZE(CO2)
  845. #ifndef LN
  846. addi CO1, CO1, 4 * SIZE
  847. addi CO2, CO2, 4 * SIZE
  848. #endif
  849. #ifdef RT
  850. slwi r0, K, 1 + ZBASE_SHIFT
  851. add AORIG, AORIG, r0
  852. #endif
  853. #if defined(LT) || defined(RN)
  854. sub TEMP, K, KK
  855. slwi TEMP, TEMP, 1 + ZBASE_SHIFT
  856. add AO, AO, TEMP
  857. add BO, BO, TEMP
  858. #endif
  859. #ifdef LT
  860. addi KK, KK, 2
  861. #endif
  862. #ifdef LN
  863. subi KK, KK, 2
  864. #endif
  865. addic. I, I, -1
  866. bgt LL(11)
  867. .align 4
  868. LL(20):
  869. andi. I, M, 1
  870. ble LL(29)
  871. #if defined(LT) || defined(RN)
  872. LFD f16, 0 * SIZE(AO)
  873. LFD f17, 1 * SIZE(AO)
  874. LFD f18, 2 * SIZE(AO)
  875. LFD f19, 3 * SIZE(AO)
  876. LFD f20, 0 * SIZE(B)
  877. LFD f21, 1 * SIZE(B)
  878. LFD f22, 2 * SIZE(B)
  879. LFD f23, 3 * SIZE(B)
  880. LFD f24, 4 * SIZE(B)
  881. LFD f25, 5 * SIZE(B)
  882. LFD f26, 6 * SIZE(B)
  883. LFD f27, 7 * SIZE(B)
  884. lfs f0, FZERO
  885. fmr f1, f0
  886. fmr f2, f0
  887. fmr f3, f0
  888. fmr f4, f0
  889. fmr f5, f0
  890. fmr f6, f0
  891. fmr f7, f0
  892. srawi. r0, KK, 2
  893. mr BO, B
  894. mtspr CTR, r0
  895. #else
  896. #ifdef LN
  897. slwi r0, K, 0 + ZBASE_SHIFT
  898. sub AORIG, AORIG, r0
  899. #endif
  900. slwi r0, KK, 0 + ZBASE_SHIFT
  901. slwi TEMP, KK, 1 + ZBASE_SHIFT
  902. add AO, AORIG, r0
  903. add BO, B, TEMP
  904. sub TEMP, K, KK
  905. LFD f16, 0 * SIZE(AO)
  906. LFD f17, 1 * SIZE(AO)
  907. LFD f18, 2 * SIZE(AO)
  908. LFD f19, 3 * SIZE(AO)
  909. LFD f20, 0 * SIZE(BO)
  910. LFD f21, 1 * SIZE(BO)
  911. LFD f22, 2 * SIZE(BO)
  912. LFD f23, 3 * SIZE(BO)
  913. LFD f24, 4 * SIZE(BO)
  914. LFD f25, 5 * SIZE(BO)
  915. LFD f26, 6 * SIZE(BO)
  916. LFD f27, 7 * SIZE(BO)
  917. lfs f0, FZERO
  918. fmr f1, f0
  919. fmr f2, f0
  920. fmr f3, f0
  921. fmr f4, f0
  922. fmr f5, f0
  923. fmr f6, f0
  924. fmr f7, f0
  925. srawi. r0, TEMP, 2
  926. mtspr CTR, r0
  927. #endif
  928. ble LL(25)
  929. .align 4
  930. LL(22):
  931. fmadd f0, f16, f20, f0
  932. fmadd f1, f16, f21, f1
  933. fmadd f2, f16, f22, f2
  934. fmadd f3, f16, f23, f3
  935. fmadd f4, f17, f20, f4
  936. fmadd f5, f17, f21, f5
  937. fmadd f6, f17, f22, f6
  938. fmadd f7, f17, f23, f7
  939. LFD f20, 8 * SIZE(BO)
  940. LFD f21, 9 * SIZE(BO)
  941. LFD f22, 10 * SIZE(BO)
  942. LFD f23, 11 * SIZE(BO)
  943. fmadd f0, f18, f24, f0
  944. fmadd f1, f18, f25, f1
  945. fmadd f2, f18, f26, f2
  946. fmadd f3, f18, f27, f3
  947. fmadd f4, f19, f24, f4
  948. fmadd f5, f19, f25, f5
  949. fmadd f6, f19, f26, f6
  950. fmadd f7, f19, f27, f7
  951. LFD f24, 12 * SIZE(BO)
  952. LFD f25, 13 * SIZE(BO)
  953. LFD f26, 14 * SIZE(BO)
  954. LFD f27, 15 * SIZE(BO)
  955. LFD f16, 4 * SIZE(AO)
  956. LFD f17, 5 * SIZE(AO)
  957. LFD f18, 6 * SIZE(AO)
  958. LFD f19, 7 * SIZE(AO)
  959. fmadd f0, f16, f20, f0
  960. fmadd f1, f16, f21, f1
  961. fmadd f2, f16, f22, f2
  962. fmadd f3, f16, f23, f3
  963. fmadd f4, f17, f20, f4
  964. fmadd f5, f17, f21, f5
  965. fmadd f6, f17, f22, f6
  966. fmadd f7, f17, f23, f7
  967. LFD f20, 16 * SIZE(BO)
  968. LFD f21, 17 * SIZE(BO)
  969. LFD f22, 18 * SIZE(BO)
  970. LFD f23, 19 * SIZE(BO)
  971. fmadd f0, f18, f24, f0
  972. fmadd f1, f18, f25, f1
  973. fmadd f2, f18, f26, f2
  974. fmadd f3, f18, f27, f3
  975. fmadd f4, f19, f24, f4
  976. fmadd f5, f19, f25, f5
  977. fmadd f6, f19, f26, f6
  978. fmadd f7, f19, f27, f7
  979. LFD f16, 8 * SIZE(AO)
  980. LFD f17, 9 * SIZE(AO)
  981. LFD f18, 10 * SIZE(AO)
  982. LFD f19, 11 * SIZE(AO)
  983. LFD f24, 20 * SIZE(BO)
  984. LFD f25, 21 * SIZE(BO)
  985. LFD f26, 22 * SIZE(BO)
  986. LFD f27, 23 * SIZE(BO)
  987. addi BO, BO, 16 * SIZE
  988. addi AO, AO, 8 * SIZE
  989. bdnz LL(22)
  990. .align 4
  991. LL(25):
  992. #if defined(LT) || defined(RN)
  993. andi. r0, KK, 3
  994. #else
  995. andi. r0, TEMP, 3
  996. #endif
  997. mtspr CTR, r0
  998. ble LL(27)
  999. .align 4
  1000. LL(26):
  1001. fmadd f0, f16, f20, f0
  1002. fmadd f1, f16, f21, f1
  1003. fmadd f2, f16, f22, f2
  1004. fmadd f3, f16, f23, f3
  1005. fmadd f4, f17, f20, f4
  1006. fmadd f5, f17, f21, f5
  1007. fmadd f6, f17, f22, f6
  1008. fmadd f7, f17, f23, f7
  1009. LFD f20, 4 * SIZE(BO)
  1010. LFD f21, 5 * SIZE(BO)
  1011. LFD f22, 6 * SIZE(BO)
  1012. LFD f23, 7 * SIZE(BO)
  1013. LFD f16, 2 * SIZE(AO)
  1014. LFD f17, 3 * SIZE(AO)
  1015. addi AO, AO, 2 * SIZE
  1016. addi BO, BO, 4 * SIZE
  1017. bdnz LL(26)
  1018. .align 4
  1019. LL(27):
  1020. #ifndef CONJ
  1021. FSUB f0, f0, f5
  1022. FADD f1, f1, f4
  1023. FSUB f2, f2, f7
  1024. FADD f3, f3, f6
  1025. #else
  1026. #if defined(LN) || defined(LT)
  1027. FADD f0, f0, f5
  1028. FSUB f1, f1, f4
  1029. FADD f2, f2, f7
  1030. FSUB f3, f3, f6
  1031. #else
  1032. FADD f0, f0, f5
  1033. FSUB f1, f4, f1
  1034. FADD f2, f2, f7
  1035. FSUB f3, f6, f3
  1036. #endif
  1037. #endif
  1038. #if defined(LN) || defined(RT)
  1039. #ifdef LN
  1040. subi r0, KK, 1
  1041. #else
  1042. subi r0, KK, 2
  1043. #endif
  1044. slwi TEMP, r0, 0 + ZBASE_SHIFT
  1045. slwi r0, r0, 1 + ZBASE_SHIFT
  1046. add AO, AORIG, TEMP
  1047. add BO, B, r0
  1048. #endif
  1049. #if defined(LN) || defined(LT)
  1050. LFD f16, 0 * SIZE(BO)
  1051. LFD f17, 1 * SIZE(BO)
  1052. LFD f18, 2 * SIZE(BO)
  1053. LFD f19, 3 * SIZE(BO)
  1054. FSUB f0, f16, f0
  1055. FSUB f1, f17, f1
  1056. FSUB f2, f18, f2
  1057. FSUB f3, f19, f3
  1058. #else
  1059. LFD f16, 0 * SIZE(AO)
  1060. LFD f17, 1 * SIZE(AO)
  1061. LFD f20, 2 * SIZE(AO)
  1062. LFD f21, 3 * SIZE(AO)
  1063. FSUB f0, f16, f0
  1064. FSUB f1, f17, f1
  1065. FSUB f2, f20, f2
  1066. FSUB f3, f21, f3
  1067. #endif
  1068. #ifdef LN
  1069. LFD f20, 0 * SIZE(AO)
  1070. LFD f21, 1 * SIZE(AO)
  1071. FMUL f4, f21, f1
  1072. FMUL f5, f21, f0
  1073. FMUL f12, f21, f3
  1074. FMUL f13, f21, f2
  1075. #ifndef CONJ
  1076. FMSUB f0, f20, f0, f4
  1077. FMADD f1, f20, f1, f5
  1078. FMSUB f2, f20, f2, f12
  1079. FMADD f3, f20, f3, f13
  1080. #else
  1081. FMADD f0, f20, f0, f4
  1082. FMSUB f1, f20, f1, f5
  1083. FMADD f2, f20, f2, f12
  1084. FMSUB f3, f20, f3, f13
  1085. #endif
  1086. #endif
  1087. #ifdef LT
  1088. LFD f16, 0 * SIZE(AO)
  1089. LFD f17, 1 * SIZE(AO)
  1090. FMUL f4, f17, f1
  1091. FMUL f5, f17, f0
  1092. FMUL f12, f17, f3
  1093. FMUL f13, f17, f2
  1094. #ifndef CONJ
  1095. FMSUB f0, f16, f0, f4
  1096. FMADD f1, f16, f1, f5
  1097. FMSUB f2, f16, f2, f12
  1098. FMADD f3, f16, f3, f13
  1099. #else
  1100. FMADD f0, f16, f0, f4
  1101. FMSUB f1, f16, f1, f5
  1102. FMADD f2, f16, f2, f12
  1103. FMSUB f3, f16, f3, f13
  1104. #endif
  1105. #endif
  1106. #ifdef RN
  1107. LFD f16, 0 * SIZE(BO)
  1108. LFD f17, 1 * SIZE(BO)
  1109. LFD f18, 2 * SIZE(BO)
  1110. LFD f19, 3 * SIZE(BO)
  1111. LFD f20, 6 * SIZE(BO)
  1112. LFD f21, 7 * SIZE(BO)
  1113. FMUL f4, f17, f1
  1114. FMUL f5, f17, f0
  1115. #ifndef CONJ
  1116. FMSUB f0, f16, f0, f4
  1117. FMADD f1, f16, f1, f5
  1118. FMADD f2, f19, f1, f2
  1119. FNMSUB f3, f19, f0, f3
  1120. FNMSUB f2, f18, f0, f2
  1121. FNMSUB f3, f18, f1, f3
  1122. FMUL f4, f21, f3
  1123. FMUL f5, f21, f2
  1124. FMSUB f2, f20, f2, f4
  1125. FMADD f3, f20, f3, f5
  1126. #else
  1127. FMADD f0, f16, f0, f4
  1128. FMSUB f1, f16, f1, f5
  1129. FMSUB f2, f19, f1, f2
  1130. FNMADD f3, f19, f0, f3
  1131. FNMADD f2, f18, f0, f2
  1132. FNMADD f3, f18, f1, f3
  1133. FMUL f4, f21, f3
  1134. FMUL f5, f21, f2
  1135. FMADD f2, f20, f2, f4
  1136. FMSUB f3, f20, f3, f5
  1137. #endif
  1138. #endif
  1139. #ifdef RT
  1140. LFD f16, 6 * SIZE(BO)
  1141. LFD f17, 7 * SIZE(BO)
  1142. LFD f18, 4 * SIZE(BO)
  1143. LFD f19, 5 * SIZE(BO)
  1144. LFD f20, 0 * SIZE(BO)
  1145. LFD f21, 1 * SIZE(BO)
  1146. FMUL f12, f17, f3
  1147. FMUL f13, f17, f2
  1148. #ifndef CONJ
  1149. FMSUB f2, f16, f2, f12
  1150. FMADD f3, f16, f3, f13
  1151. FMADD f0, f19, f3, f0
  1152. FNMSUB f1, f19, f2, f1
  1153. FNMSUB f0, f18, f2, f0
  1154. FNMSUB f1, f18, f3, f1
  1155. FMUL f4, f21, f1
  1156. FMUL f5, f21, f0
  1157. FMSUB f0, f20, f0, f4
  1158. FMADD f1, f20, f1, f5
  1159. #else
  1160. FMADD f2, f16, f2, f12
  1161. FMSUB f3, f16, f3, f13
  1162. FMSUB f0, f19, f3, f0
  1163. FNMADD f1, f19, f2, f1
  1164. FNMADD f0, f18, f2, f0
  1165. FNMADD f1, f18, f3, f1
  1166. FMUL f4, f21, f1
  1167. FMUL f5, f21, f0
  1168. FMADD f0, f20, f0, f4
  1169. FMSUB f1, f20, f1, f5
  1170. #endif
  1171. #endif
  1172. #ifdef LN
  1173. subi CO1, CO1, 2 * SIZE
  1174. subi CO2, CO2, 2 * SIZE
  1175. #endif
  1176. #if defined(LN) || defined(LT)
  1177. STFD f0, 0 * SIZE(BO)
  1178. STFD f1, 1 * SIZE(BO)
  1179. STFD f2, 2 * SIZE(BO)
  1180. STFD f3, 3 * SIZE(BO)
  1181. #else
  1182. STFD f0, 0 * SIZE(AO)
  1183. STFD f1, 1 * SIZE(AO)
  1184. STFD f2, 2 * SIZE(AO)
  1185. STFD f3, 3 * SIZE(AO)
  1186. #endif
  1187. STFD f0, 0 * SIZE(CO1)
  1188. STFD f1, 1 * SIZE(CO1)
  1189. STFD f2, 0 * SIZE(CO2)
  1190. STFD f3, 1 * SIZE(CO2)
  1191. #ifndef LN
  1192. addi CO1, CO1, 2 * SIZE
  1193. addi CO2, CO2, 2 * SIZE
  1194. #endif
  1195. #ifdef RT
  1196. slwi r0, K, 0 + ZBASE_SHIFT
  1197. add AORIG, AORIG, r0
  1198. #endif
  1199. #if defined(LT) || defined(RN)
  1200. sub TEMP, K, KK
  1201. slwi r0, TEMP, 0 + ZBASE_SHIFT
  1202. slwi TEMP, TEMP, 1 + ZBASE_SHIFT
  1203. add AO, AO, r0
  1204. add BO, BO, TEMP
  1205. #endif
  1206. #ifdef LT
  1207. addi KK, KK, 1
  1208. #endif
  1209. #ifdef LN
  1210. subi KK, KK, 1
  1211. #endif
  1212. .align 4
  1213. LL(29):
  1214. #ifdef LN
  1215. slwi r0, K, 1 + ZBASE_SHIFT
  1216. add B, B, r0
  1217. #endif
  1218. #if defined(LT) || defined(RN)
  1219. mr B, BO
  1220. #endif
  1221. #ifdef RN
  1222. addi KK, KK, 2
  1223. #endif
  1224. #ifdef RT
  1225. subi KK, KK, 2
  1226. #endif
  1227. addic. J, J, -1
  1228. bgt LL(10)
  1229. .align 4
  1230. LL(30):
  1231. andi. J, N, 1
  1232. ble LL(999)
  1233. #ifdef RT
  1234. slwi r0, K, 0 + ZBASE_SHIFT
  1235. sub B, B, r0
  1236. sub C, C, LDC
  1237. #endif
  1238. mr CO1, C
  1239. #ifdef LN
  1240. add KK, M, OFFSET
  1241. #endif
  1242. #ifdef LT
  1243. mr KK, OFFSET
  1244. #endif
  1245. srawi. I, M, 1
  1246. #if defined(LN) || defined(RT)
  1247. mr AORIG, A
  1248. #else
  1249. mr AO, A
  1250. #endif
  1251. #ifndef RT
  1252. add C, C, LDC
  1253. #endif
  1254. ble LL(40)
  1255. .align 4
  1256. LL(31):
  1257. #if defined(LT) || defined(RN)
  1258. LFD f20, 0 * SIZE(AO)
  1259. LFD f21, 1 * SIZE(AO)
  1260. LFD f22, 2 * SIZE(AO)
  1261. LFD f23, 3 * SIZE(AO)
  1262. LFD f24, 4 * SIZE(AO)
  1263. LFD f25, 5 * SIZE(AO)
  1264. LFD f26, 6 * SIZE(AO)
  1265. LFD f27, 7 * SIZE(AO)
  1266. LFD f16, 0 * SIZE(B)
  1267. LFD f17, 1 * SIZE(B)
  1268. LFD f18, 2 * SIZE(B)
  1269. LFD f19, 3 * SIZE(B)
  1270. lfs f0, FZERO
  1271. fmr f1, f0
  1272. fmr f2, f0
  1273. fmr f3, f0
  1274. fmr f4, f0
  1275. fmr f5, f0
  1276. fmr f6, f0
  1277. fmr f7, f0
  1278. dcbt CO1, PREC
  1279. srawi. r0, KK, 2
  1280. mr BO, B
  1281. mtspr CTR, r0
  1282. #else
  1283. #ifdef LN
  1284. slwi r0, K, 1 + ZBASE_SHIFT
  1285. sub AORIG, AORIG, r0
  1286. #endif
  1287. slwi r0, KK, 1 + ZBASE_SHIFT
  1288. slwi TEMP, KK, 0 + ZBASE_SHIFT
  1289. add AO, AORIG, r0
  1290. add BO, B, TEMP
  1291. sub TEMP, K, KK
  1292. LFD f20, 0 * SIZE(AO)
  1293. LFD f21, 1 * SIZE(AO)
  1294. LFD f22, 2 * SIZE(AO)
  1295. LFD f23, 3 * SIZE(AO)
  1296. LFD f24, 4 * SIZE(AO)
  1297. LFD f25, 5 * SIZE(AO)
  1298. LFD f26, 6 * SIZE(AO)
  1299. LFD f27, 7 * SIZE(AO)
  1300. LFD f16, 0 * SIZE(BO)
  1301. LFD f17, 1 * SIZE(BO)
  1302. LFD f18, 2 * SIZE(BO)
  1303. LFD f19, 3 * SIZE(BO)
  1304. lfs f0, FZERO
  1305. fmr f1, f0
  1306. fmr f2, f0
  1307. fmr f3, f0
  1308. fmr f4, f0
  1309. fmr f5, f0
  1310. fmr f6, f0
  1311. fmr f7, f0
  1312. srawi. r0, TEMP, 2
  1313. mtspr CTR, r0
  1314. #endif
  1315. ble LL(35)
  1316. .align 4
  1317. LL(32):
  1318. fmadd f0, f16, f20, f0
  1319. fmadd f1, f16, f21, f1
  1320. fmadd f2, f16, f22, f2
  1321. fmadd f3, f16, f23, f3
  1322. fmadd f4, f17, f20, f4
  1323. fmadd f5, f17, f21, f5
  1324. fmadd f6, f17, f22, f6
  1325. fmadd f7, f17, f23, f7
  1326. LFD f20, 8 * SIZE(AO)
  1327. LFD f21, 9 * SIZE(AO)
  1328. LFD f22, 10 * SIZE(AO)
  1329. LFD f23, 11 * SIZE(AO)
  1330. fmadd f0, f18, f24, f0
  1331. fmadd f1, f18, f25, f1
  1332. fmadd f2, f18, f26, f2
  1333. fmadd f3, f18, f27, f3
  1334. fmadd f4, f19, f24, f4
  1335. fmadd f5, f19, f25, f5
  1336. fmadd f6, f19, f26, f6
  1337. fmadd f7, f19, f27, f7
  1338. LFD f24, 12 * SIZE(AO)
  1339. LFD f25, 13 * SIZE(AO)
  1340. LFD f26, 14 * SIZE(AO)
  1341. LFD f27, 15 * SIZE(AO)
  1342. LFD f16, 4 * SIZE(BO)
  1343. LFD f17, 5 * SIZE(BO)
  1344. LFD f18, 6 * SIZE(BO)
  1345. LFD f19, 7 * SIZE(BO)
  1346. fmadd f0, f16, f20, f0
  1347. fmadd f1, f16, f21, f1
  1348. fmadd f2, f16, f22, f2
  1349. fmadd f3, f16, f23, f3
  1350. fmadd f4, f17, f20, f4
  1351. fmadd f5, f17, f21, f5
  1352. fmadd f6, f17, f22, f6
  1353. fmadd f7, f17, f23, f7
  1354. LFD f20, 16 * SIZE(AO)
  1355. LFD f21, 17 * SIZE(AO)
  1356. LFD f22, 18 * SIZE(AO)
  1357. LFD f23, 19 * SIZE(AO)
  1358. fmadd f0, f18, f24, f0
  1359. fmadd f1, f18, f25, f1
  1360. fmadd f2, f18, f26, f2
  1361. fmadd f3, f18, f27, f3
  1362. fmadd f4, f19, f24, f4
  1363. fmadd f5, f19, f25, f5
  1364. fmadd f6, f19, f26, f6
  1365. fmadd f7, f19, f27, f7
  1366. LFD f24, 20 * SIZE(AO)
  1367. LFD f25, 21 * SIZE(AO)
  1368. LFD f26, 22 * SIZE(AO)
  1369. LFD f27, 23 * SIZE(AO)
  1370. LFD f16, 8 * SIZE(BO)
  1371. LFD f17, 9 * SIZE(BO)
  1372. LFD f18, 10 * SIZE(BO)
  1373. LFD f19, 11 * SIZE(BO)
  1374. addi AO, AO, 16 * SIZE
  1375. addi BO, BO, 8 * SIZE
  1376. dcbt PREA, AO
  1377. dcbt PREA, BO
  1378. bdnz LL(32)
  1379. .align 4
  1380. LL(35):
  1381. #if defined(LT) || defined(RN)
  1382. andi. r0, KK, 3
  1383. #else
  1384. andi. r0, TEMP, 3
  1385. #endif
  1386. mtspr CTR, r0
  1387. ble LL(37)
  1388. .align 4
  1389. LL(36):
  1390. fmadd f0, f16, f20, f0
  1391. fmadd f1, f16, f21, f1
  1392. fmadd f2, f16, f22, f2
  1393. fmadd f3, f16, f23, f3
  1394. fmadd f4, f17, f20, f4
  1395. fmadd f5, f17, f21, f5
  1396. fmadd f6, f17, f22, f6
  1397. fmadd f7, f17, f23, f7
  1398. LFD f20, 4 * SIZE(AO)
  1399. LFD f21, 5 * SIZE(AO)
  1400. LFD f22, 6 * SIZE(AO)
  1401. LFD f23, 7 * SIZE(AO)
  1402. LFD f16, 2 * SIZE(BO)
  1403. LFD f17, 3 * SIZE(BO)
  1404. addi BO, BO, 2 * SIZE
  1405. addi AO, AO, 4 * SIZE
  1406. bdnz LL(36)
  1407. .align 4
  1408. LL(37):
  1409. #ifndef CONJ
  1410. FSUB f0, f0, f5
  1411. FADD f1, f1, f4
  1412. FSUB f2, f2, f7
  1413. FADD f3, f3, f6
  1414. #else
  1415. FADD f0, f0, f5
  1416. FSUB f1, f4, f1
  1417. FADD f2, f2, f7
  1418. FSUB f3, f6, f3
  1419. #endif
  1420. #if defined(LN) || defined(RT)
  1421. #ifdef LN
  1422. subi r0, KK, 2
  1423. #else
  1424. subi r0, KK, 1
  1425. #endif
  1426. slwi TEMP, r0, 1 + ZBASE_SHIFT
  1427. slwi r0, r0, 0 + ZBASE_SHIFT
  1428. add AO, AORIG, TEMP
  1429. add BO, B, r0
  1430. #endif
  1431. #if defined(LN) || defined(LT)
  1432. LFD f16, 0 * SIZE(BO)
  1433. LFD f17, 1 * SIZE(BO)
  1434. LFD f18, 2 * SIZE(BO)
  1435. LFD f19, 3 * SIZE(BO)
  1436. FSUB f0, f16, f0
  1437. FSUB f1, f17, f1
  1438. FSUB f2, f18, f2
  1439. FSUB f3, f19, f3
  1440. #else
  1441. LFD f16, 0 * SIZE(AO)
  1442. LFD f17, 1 * SIZE(AO)
  1443. LFD f18, 2 * SIZE(AO)
  1444. LFD f19, 3 * SIZE(AO)
  1445. #ifndef CONJ
  1446. FSUB f0, f16, f0
  1447. FSUB f1, f17, f1
  1448. FSUB f2, f18, f2
  1449. FSUB f3, f19, f3
  1450. #else
  1451. FSUB f0, f16, f0
  1452. FADD f1, f17, f1
  1453. FSUB f2, f18, f2
  1454. FADD f3, f19, f3
  1455. #endif
  1456. #endif
  1457. #ifdef LN
  1458. LFD f16, 6 * SIZE(AO)
  1459. LFD f17, 7 * SIZE(AO)
  1460. LFD f18, 4 * SIZE(AO)
  1461. LFD f19, 5 * SIZE(AO)
  1462. LFD f20, 0 * SIZE(AO)
  1463. LFD f21, 1 * SIZE(AO)
  1464. FMUL f6, f17, f3
  1465. FMUL f7, f17, f2
  1466. #ifndef CONJ
  1467. FMSUB f2, f16, f2, f6
  1468. FMADD f3, f16, f3, f7
  1469. FMADD f0, f19, f3, f0
  1470. FNMSUB f1, f19, f2, f1
  1471. FNMSUB f0, f18, f2, f0
  1472. FNMSUB f1, f18, f3, f1
  1473. FMUL f4, f21, f1
  1474. FMUL f5, f21, f0
  1475. FMSUB f0, f20, f0, f4
  1476. FMADD f1, f20, f1, f5
  1477. #else
  1478. FMADD f2, f16, f2, f6
  1479. FMSUB f3, f16, f3, f7
  1480. FMSUB f0, f19, f3, f0
  1481. FNMADD f1, f19, f2, f1
  1482. FNMADD f0, f18, f2, f0
  1483. FNMADD f1, f18, f3, f1
  1484. FMUL f4, f21, f1
  1485. FMUL f5, f21, f0
  1486. FMADD f0, f20, f0, f4
  1487. FMSUB f1, f20, f1, f5
  1488. #endif
  1489. #endif
  1490. #ifdef LT
  1491. LFD f16, 0 * SIZE(AO)
  1492. LFD f17, 1 * SIZE(AO)
  1493. LFD f18, 2 * SIZE(AO)
  1494. LFD f19, 3 * SIZE(AO)
  1495. LFD f20, 6 * SIZE(AO)
  1496. LFD f21, 7 * SIZE(AO)
  1497. FMUL f4, f17, f1
  1498. FMUL f5, f17, f0
  1499. #ifndef CONJ
  1500. FMSUB f0, f16, f0, f4
  1501. FMADD f1, f16, f1, f5
  1502. FMADD f2, f19, f1, f2
  1503. FNMSUB f3, f19, f0, f3
  1504. FNMSUB f2, f18, f0, f2
  1505. FNMSUB f3, f18, f1, f3
  1506. FMUL f4, f21, f3
  1507. FMUL f5, f21, f2
  1508. FMSUB f2, f20, f2, f4
  1509. FMADD f3, f20, f3, f5
  1510. #else
  1511. FMADD f0, f16, f0, f4
  1512. FMSUB f1, f16, f1, f5
  1513. FMSUB f2, f19, f1, f2
  1514. FNMADD f3, f19, f0, f3
  1515. FNMADD f2, f18, f0, f2
  1516. FNMADD f3, f18, f1, f3
  1517. FMUL f4, f21, f3
  1518. FMUL f5, f21, f2
  1519. FMADD f2, f20, f2, f4
  1520. FMSUB f3, f20, f3, f5
  1521. #endif
  1522. #endif
  1523. #ifdef RN
  1524. LFD f16, 0 * SIZE(BO)
  1525. LFD f17, 1 * SIZE(BO)
  1526. FMUL f4, f17, f1
  1527. FMUL f5, f17, f0
  1528. FMUL f6, f17, f3
  1529. FMUL f7, f17, f2
  1530. #ifndef CONJ
  1531. FMSUB f0, f16, f0, f4
  1532. FMADD f1, f16, f1, f5
  1533. FMSUB f2, f16, f2, f6
  1534. FMADD f3, f16, f3, f7
  1535. #else
  1536. FMADD f0, f16, f0, f4
  1537. FMSUB f1, f16, f1, f5
  1538. FMADD f2, f16, f2, f6
  1539. FMSUB f3, f16, f3, f7
  1540. #endif
  1541. #endif
  1542. #ifdef RT
  1543. LFD f20, 0 * SIZE(BO)
  1544. LFD f21, 1 * SIZE(BO)
  1545. FMUL f4, f21, f1
  1546. FMUL f5, f21, f0
  1547. FMUL f6, f21, f3
  1548. FMUL f7, f21, f2
  1549. #ifndef CONJ
  1550. FMSUB f0, f20, f0, f4
  1551. FMADD f1, f20, f1, f5
  1552. FMSUB f2, f20, f2, f6
  1553. FMADD f3, f20, f3, f7
  1554. #else
  1555. FMADD f0, f20, f0, f4
  1556. FMSUB f1, f20, f1, f5
  1557. FMADD f2, f20, f2, f6
  1558. FMSUB f3, f20, f3, f7
  1559. #endif
  1560. #endif
  1561. #ifdef LN
  1562. subi CO1, CO1, 4 * SIZE
  1563. #endif
  1564. #if defined(LN) || defined(LT)
  1565. STFD f0, 0 * SIZE(BO)
  1566. STFD f1, 1 * SIZE(BO)
  1567. STFD f2, 2 * SIZE(BO)
  1568. STFD f3, 3 * SIZE(BO)
  1569. #else
  1570. STFD f0, 0 * SIZE(AO)
  1571. STFD f1, 1 * SIZE(AO)
  1572. STFD f2, 2 * SIZE(AO)
  1573. STFD f3, 3 * SIZE(AO)
  1574. #endif
  1575. STFD f0, 0 * SIZE(CO1)
  1576. STFD f1, 1 * SIZE(CO1)
  1577. STFD f2, 2 * SIZE(CO1)
  1578. STFD f3, 3 * SIZE(CO1)
  1579. #ifndef LN
  1580. addi CO1, CO1, 4 * SIZE
  1581. #endif
  1582. #ifdef RT
  1583. slwi r0, K, 1 + ZBASE_SHIFT
  1584. add AORIG, AORIG, r0
  1585. #endif
  1586. #if defined(LT) || defined(RN)
  1587. sub TEMP, K, KK
  1588. slwi r0, TEMP, 1 + ZBASE_SHIFT
  1589. slwi TEMP, TEMP, 0 + ZBASE_SHIFT
  1590. add AO, AO, r0
  1591. add BO, BO, TEMP
  1592. #endif
  1593. #ifdef LT
  1594. addi KK, KK, 2
  1595. #endif
  1596. #ifdef LN
  1597. subi KK, KK, 2
  1598. #endif
  1599. addic. I, I, -1
  1600. bgt LL(31)
  1601. .align 4
  1602. LL(40):
  1603. andi. I, M, 1
  1604. ble LL(49)
  1605. #if defined(LT) || defined(RN)
  1606. LFD f16, 0 * SIZE(AO)
  1607. LFD f17, 1 * SIZE(AO)
  1608. LFD f18, 2 * SIZE(AO)
  1609. LFD f19, 3 * SIZE(AO)
  1610. LFD f20, 0 * SIZE(B)
  1611. LFD f21, 1 * SIZE(B)
  1612. LFD f22, 2 * SIZE(B)
  1613. LFD f23, 3 * SIZE(B)
  1614. lfs f0, FZERO
  1615. fmr f1, f0
  1616. fmr f2, f0
  1617. fmr f3, f0
  1618. fmr f4, f0
  1619. fmr f5, f0
  1620. fmr f6, f0
  1621. fmr f7, f0
  1622. srawi. r0, KK, 2
  1623. mr BO, B
  1624. mtspr CTR, r0
  1625. #else
  1626. #ifdef LN
  1627. slwi r0, K, 0 + ZBASE_SHIFT
  1628. sub AORIG, AORIG, r0
  1629. #endif
  1630. slwi r0, KK, 0 + ZBASE_SHIFT
  1631. add AO, AORIG, r0
  1632. add BO, B, r0
  1633. sub TEMP, K, KK
  1634. LFD f16, 0 * SIZE(AO)
  1635. LFD f17, 1 * SIZE(AO)
  1636. LFD f18, 2 * SIZE(AO)
  1637. LFD f19, 3 * SIZE(AO)
  1638. LFD f20, 0 * SIZE(BO)
  1639. LFD f21, 1 * SIZE(BO)
  1640. LFD f22, 2 * SIZE(BO)
  1641. LFD f23, 3 * SIZE(BO)
  1642. lfs f0, FZERO
  1643. fmr f1, f0
  1644. fmr f2, f0
  1645. fmr f3, f0
  1646. fmr f4, f0
  1647. fmr f5, f0
  1648. fmr f6, f0
  1649. fmr f7, f0
  1650. srawi. r0, TEMP, 2
  1651. mtspr CTR, r0
  1652. #endif
  1653. ble LL(45)
  1654. .align 4
  1655. LL(42):
  1656. fmadd f0, f16, f20, f0
  1657. fmadd f1, f17, f21, f1
  1658. fmadd f2, f17, f20, f2
  1659. fmadd f3, f16, f21, f3
  1660. LFD f16, 4 * SIZE(AO)
  1661. LFD f17, 5 * SIZE(AO)
  1662. LFD f20, 4 * SIZE(BO)
  1663. LFD f21, 5 * SIZE(BO)
  1664. fmadd f4, f18, f22, f4
  1665. fmadd f5, f19, f23, f5
  1666. fmadd f6, f19, f22, f6
  1667. fmadd f7, f18, f23, f7
  1668. LFD f18, 6 * SIZE(AO)
  1669. LFD f19, 7 * SIZE(AO)
  1670. LFD f22, 6 * SIZE(BO)
  1671. LFD f23, 7 * SIZE(BO)
  1672. fmadd f0, f16, f20, f0
  1673. fmadd f1, f17, f21, f1
  1674. fmadd f2, f17, f20, f2
  1675. fmadd f3, f16, f21, f3
  1676. LFD f16, 8 * SIZE(AO)
  1677. LFD f17, 9 * SIZE(AO)
  1678. LFD f20, 8 * SIZE(BO)
  1679. LFD f21, 9 * SIZE(BO)
  1680. fmadd f4, f18, f22, f4
  1681. fmadd f5, f19, f23, f5
  1682. fmadd f6, f19, f22, f6
  1683. fmadd f7, f18, f23, f7
  1684. LFD f18, 10 * SIZE(AO)
  1685. LFD f19, 11 * SIZE(AO)
  1686. LFD f22, 10 * SIZE(BO)
  1687. LFD f23, 11 * SIZE(BO)
  1688. addi AO, AO, 8 * SIZE
  1689. addi BO, BO, 8 * SIZE
  1690. bdnz LL(42)
  1691. .align 4
  1692. LL(45):
  1693. fadd f0, f0, f4
  1694. fadd f1, f1, f5
  1695. fadd f2, f2, f6
  1696. fadd f3, f3, f7
  1697. #if defined(LT) || defined(RN)
  1698. andi. r0, KK, 3
  1699. #else
  1700. andi. r0, TEMP, 3
  1701. #endif
  1702. mtspr CTR,r0
  1703. ble LL(47)
  1704. .align 4
  1705. LL(46):
  1706. fmadd f0, f16, f20, f0
  1707. fmadd f1, f17, f21, f1
  1708. fmadd f2, f17, f20, f2
  1709. fmadd f3, f16, f21, f3
  1710. LFD f16, 2 * SIZE(AO)
  1711. LFD f17, 3 * SIZE(AO)
  1712. LFD f20, 2 * SIZE(BO)
  1713. LFD f21, 3 * SIZE(BO)
  1714. addi AO, AO, 2 * SIZE
  1715. addi BO, BO, 2 * SIZE
  1716. bdnz LL(46)
  1717. .align 4
  1718. LL(47):
  1719. #ifndef CONJ
  1720. FSUB f0, f0, f1
  1721. FADD f1, f2, f3
  1722. #else
  1723. FADD f0, f0, f1
  1724. FSUB f1, f3, f2
  1725. #endif
  1726. #if defined(LN) || defined(RT)
  1727. subi r0, KK, 1
  1728. slwi r0, r0, 0 + ZBASE_SHIFT
  1729. add AO, AORIG, r0
  1730. add BO, B, r0
  1731. #endif
  1732. #if defined(LN) || defined(LT)
  1733. LFD f16, 0 * SIZE(BO)
  1734. LFD f17, 1 * SIZE(BO)
  1735. FSUB f0, f16, f0
  1736. FSUB f1, f17, f1
  1737. #else
  1738. LFD f16, 0 * SIZE(AO)
  1739. LFD f17, 1 * SIZE(AO)
  1740. #ifndef CONJ
  1741. FSUB f0, f16, f0
  1742. FSUB f1, f17, f1
  1743. #else
  1744. FSUB f0, f16, f0
  1745. FADD f1, f17, f1
  1746. #endif
  1747. #endif
  1748. #ifdef LN
  1749. LFD f20, 0 * SIZE(AO)
  1750. LFD f21, 1 * SIZE(AO)
  1751. FMUL f4, f21, f1
  1752. FMUL f5, f21, f0
  1753. #ifndef CONJ
  1754. FMSUB f0, f20, f0, f4
  1755. FMADD f1, f20, f1, f5
  1756. #else
  1757. FMADD f0, f20, f0, f4
  1758. FMSUB f1, f20, f1, f5
  1759. #endif
  1760. #endif
  1761. #ifdef LT
  1762. LFD f16, 0 * SIZE(AO)
  1763. LFD f17, 1 * SIZE(AO)
  1764. FMUL f4, f17, f1
  1765. FMUL f5, f17, f0
  1766. #ifndef CONJ
  1767. FMSUB f0, f16, f0, f4
  1768. FMADD f1, f16, f1, f5
  1769. #else
  1770. FMADD f0, f16, f0, f4
  1771. FMSUB f1, f16, f1, f5
  1772. #endif
  1773. #endif
  1774. #ifdef RN
  1775. LFD f16, 0 * SIZE(BO)
  1776. LFD f17, 1 * SIZE(BO)
  1777. FMUL f4, f17, f1
  1778. FMUL f5, f17, f0
  1779. #ifndef CONJ
  1780. FMSUB f0, f16, f0, f4
  1781. FMADD f1, f16, f1, f5
  1782. #else
  1783. FMADD f0, f16, f0, f4
  1784. FMSUB f1, f16, f1, f5
  1785. #endif
  1786. #endif
  1787. #ifdef RT
  1788. LFD f20, 0 * SIZE(BO)
  1789. LFD f21, 1 * SIZE(BO)
  1790. FMUL f4, f21, f1
  1791. FMUL f5, f21, f0
  1792. #ifndef CONJ
  1793. FMSUB f0, f20, f0, f4
  1794. FMADD f1, f20, f1, f5
  1795. #else
  1796. FMADD f0, f20, f0, f4
  1797. FMSUB f1, f20, f1, f5
  1798. #endif
  1799. #endif
  1800. #ifdef LN
  1801. subi CO1, CO1, 2 * SIZE
  1802. #endif
  1803. #if defined(LN) || defined(LT)
  1804. STFD f0, 0 * SIZE(BO)
  1805. STFD f1, 1 * SIZE(BO)
  1806. #else
  1807. STFD f0, 0 * SIZE(AO)
  1808. STFD f1, 1 * SIZE(AO)
  1809. #endif
  1810. STFD f0, 0 * SIZE(CO1)
  1811. STFD f1, 1 * SIZE(CO1)
  1812. #ifndef LN
  1813. addi CO1, CO1, 2 * SIZE
  1814. #endif
  1815. #ifdef RT
  1816. slwi r0, K, 0 + ZBASE_SHIFT
  1817. add AORIG, AORIG, r0
  1818. #endif
  1819. #if defined(LT) || defined(RN)
  1820. sub TEMP, K, KK
  1821. slwi TEMP, TEMP, 0 + ZBASE_SHIFT
  1822. add AO, AO, TEMP
  1823. add BO, BO, TEMP
  1824. #endif
  1825. #ifdef LT
  1826. addi KK, KK, 1
  1827. #endif
  1828. #ifdef LN
  1829. subi KK, KK, 1
  1830. #endif
  1831. .align 4
  1832. LL(49):
  1833. #ifdef LN
  1834. slwi r0, K, 0 + ZBASE_SHIFT
  1835. add B, B, r0
  1836. #endif
  1837. #if defined(LT) || defined(RN)
  1838. mr B, BO
  1839. #endif
  1840. #ifdef RN
  1841. addi KK, KK, 1
  1842. #endif
  1843. #ifdef RT
  1844. subi KK, KK, 1
  1845. #endif
  1846. .align 4
  1847. LL(999):
  1848. addi r3, 0, 0
  1849. lfd f14, 0(SP)
  1850. lfd f15, 8(SP)
  1851. lfd f16, 16(SP)
  1852. lfd f17, 24(SP)
  1853. lfd f18, 32(SP)
  1854. lfd f19, 40(SP)
  1855. lfd f20, 48(SP)
  1856. lfd f21, 56(SP)
  1857. lfd f22, 64(SP)
  1858. lfd f23, 72(SP)
  1859. lfd f24, 80(SP)
  1860. lfd f25, 88(SP)
  1861. lfd f26, 96(SP)
  1862. lfd f27, 104(SP)
  1863. lfd f28, 112(SP)
  1864. lfd f29, 120(SP)
  1865. lfd f30, 128(SP)
  1866. lfd f31, 136(SP)
  1867. #ifdef __64BIT__
  1868. ld r31, 144(SP)
  1869. ld r30, 152(SP)
  1870. ld r29, 160(SP)
  1871. ld r28, 168(SP)
  1872. ld r27, 176(SP)
  1873. ld r26, 184(SP)
  1874. ld r25, 192(SP)
  1875. ld r24, 200(SP)
  1876. ld r23, 208(SP)
  1877. ld r22, 216(SP)
  1878. ld r21, 224(SP)
  1879. #else
  1880. lwz r31, 144(SP)
  1881. lwz r30, 148(SP)
  1882. lwz r29, 152(SP)
  1883. lwz r28, 156(SP)
  1884. lwz r27, 160(SP)
  1885. lwz r26, 164(SP)
  1886. lwz r25, 168(SP)
  1887. lwz r24, 172(SP)
  1888. lwz r23, 176(SP)
  1889. lwz r22, 180(SP)
  1890. lwz r21, 184(SP)
  1891. #endif
  1892. addi SP, SP, STACKSIZE
  1893. blr
  1894. EPILOGUE
  1895. #endif