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_RT.S 40 kB

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