diff options
Diffstat (limited to 'gmp/mpn/s390_32/esame')
-rw-r--r-- | gmp/mpn/s390_32/esame/addmul_1.asm | 72 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/aors_n.asm | 137 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/aorslsh1_n.asm | 173 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/bdiv_dbm1c.asm | 65 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/gmp-mparam.h | 207 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/mul_1.asm | 66 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/mul_basecase.asm | 130 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/sqr_basecase.asm | 203 | ||||
-rw-r--r-- | gmp/mpn/s390_32/esame/submul_1.asm | 70 |
9 files changed, 0 insertions, 1123 deletions
diff --git a/gmp/mpn/s390_32/esame/addmul_1.asm b/gmp/mpn/s390_32/esame/addmul_1.asm deleted file mode 100644 index 4375b74ae0..0000000000 --- a/gmp/mpn/s390_32/esame/addmul_1.asm +++ /dev/null @@ -1,72 +0,0 @@ -dnl S/390-32 mpn_addmul_1 for systems with MLR instruction - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 18.5 -C z990 10 -C z9 ? -C z10 ? -C z196 ? - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`n', `%r4') -define(`v0', `%r5') - -define(`z', `%r9') - -ASM_START() -PROLOGUE(mpn_addmul_1) - stm %r9, %r12, 36(%r15) - lhi %r12, 0 C zero index register - ahi %r12, 0 C clear carry fla - lhi %r11, 0 C clear carry limb - lhi z, 0 C clear carry limb - -L(top): l %r1, 0(%r12,up) - l %r10, 0(%r12,rp) - mlr %r0, v0 - alcr %r1, %r10 - alcr %r0, z - alr %r1, %r11 - lr %r11, %r0 - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct n, L(top) - - lhi %r2, 0 - alcr %r2, %r11 - - lm %r9, %r12, 36(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/aors_n.asm b/gmp/mpn/s390_32/esame/aors_n.asm deleted file mode 100644 index 98b0dbc7b0..0000000000 --- a/gmp/mpn/s390_32/esame/aors_n.asm +++ /dev/null @@ -1,137 +0,0 @@ -dnl S/390-32 mpn_add_n and mpn_sub_n. - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 ? -C z990 2.75-3 (fast for even n, slow for odd n) -C z9 ? -C z10 ? -C z196 ? - -C TODO -C * Optimise for small n -C * Use r0 and save/restore one less register -C * Using logops_n's v1 inner loop operand order make the loop about 20% -C faster, at the expense of highly alignment-dependent performance. - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`vp', `%r4') -define(`n', `%r5') - -ifdef(`OPERATION_add_n', ` - define(ADSB, al) - define(ADSBCR, alcr) - define(ADSBC, alc) - define(RETVAL,`dnl - lhi %r2, 0 - alcr %r2, %r2') - define(func, mpn_add_n) - define(func_nc, mpn_add_nc)') -ifdef(`OPERATION_sub_n', ` - define(ADSB, sl) - define(ADSBCR, slbr) - define(ADSBC, slb) - define(RETVAL,`dnl - slbr %r2, %r2 - lcr %r2, %r2') - define(func, mpn_sub_n) - define(func_nc, mpn_sub_nc)') - -MULFUNC_PROLOGUE(mpn_add_n mpn_sub_n) - -ASM_START() -PROLOGUE(func) - stm %r6, %r8, 24(%r15) - - ahi n, 3 - lhi %r7, 3 - lr %r1, n - srl %r1, 2 - nr %r7, n C n mod 4 - je L(b1) - chi %r7, 2 - jl L(b2) - jne L(b0) - -L(b3): lm %r5, %r7, 0(up) - la up, 12(up) - ADSB %r5, 0(vp) - ADSBC %r6, 4(vp) - ADSBC %r7, 8(vp) - la vp, 12(vp) - stm %r5, %r7, 0(rp) - la rp, 12(rp) - brct %r1, L(top) - j L(end) - -L(b0): lm %r5, %r8, 0(up) C This redundant insns is no mistake, - la up, 16(up) C it is needed to make main loop run - ADSB %r5, 0(vp) C fast for n = 0 (mod 4). - ADSBC %r6, 4(vp) - j L(m0) - -L(b1): l %r5, 0(up) - la up, 4(up) - ADSB %r5, 0(vp) - la vp, 4(vp) - st %r5, 0(rp) - la rp, 4(rp) - brct %r1, L(top) - j L(end) - -L(b2): lm %r5, %r6, 0(up) - la up, 8(up) - ADSB %r5, 0(vp) - ADSBC %r6, 4(vp) - la vp, 8(vp) - stm %r5, %r6, 0(rp) - la rp, 8(rp) - brct %r1, L(top) - j L(end) - -L(top): lm %r5, %r8, 0(up) - la up, 16(up) - ADSBC %r5, 0(vp) - ADSBC %r6, 4(vp) -L(m0): ADSBC %r7, 8(vp) - ADSBC %r8, 12(vp) - la vp, 16(vp) - stm %r5, %r8, 0(rp) - la rp, 16(rp) - brct %r1, L(top) - -L(end): RETVAL - lm %r6, %r8, 24(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/aorslsh1_n.asm b/gmp/mpn/s390_32/esame/aorslsh1_n.asm deleted file mode 100644 index f2b222b121..0000000000 --- a/gmp/mpn/s390_32/esame/aorslsh1_n.asm +++ /dev/null @@ -1,173 +0,0 @@ -dnl S/390-32 mpn_addlsh1_n - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 9.25 -C z990 5 -C z9 ? -C z10 ? -C z196 ? - -C TODO -C * Optimise for small n -C * Compute RETVAL for sublsh1_n less stupidly - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`vp', `%r4') -define(`n', `%r5') - -ifdef(`OPERATION_addlsh1_n',` - define(ADDSUBC, alr) - define(ADDSUBE, alcr) - define(INITCY, `lhi %r13, -1') - define(RETVAL, `alr %r1, %r13 - lhi %r2, 2 - alr %r2, %r1') - define(func, mpn_addlsh1_n) -') -ifdef(`OPERATION_sublsh1_n',` - define(ADDSUBC, slr) - define(ADDSUBE, slbr) - define(INITCY, `lhi %r13, 0') - define(RETVAL, `slr %r1, %r13 - lhi %r2, 1 - alr %r2, %r1') - define(func, mpn_sublsh1_n) -') - -MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_sublsh1_n) - -ASM_START() -PROLOGUE(func) - stm %r6, %r13, 24(%r15) - - la %r0, 3(n) - lhi %r7, 3 - srl %r0, 2 - nr %r7, n C n mod 4 - je L(b0) - chi %r7, 2 - jl L(b1) - je L(b2) - -L(b3): lm %r5, %r7, 0(up) - la up, 12(up) - lm %r9, %r11, 0(vp) - la vp, 12(vp) - - alr %r9, %r9 - alcr %r10, %r10 - alcr %r11, %r11 - slbr %r1, %r1 - - ADDSUBC %r5, %r9 - ADDSUBE %r6, %r10 - ADDSUBE %r7, %r11 - slbr %r13, %r13 - - stm %r5, %r7, 0(rp) - la rp, 12(rp) - brct %r0, L(top) - j L(end) - -L(b0): lhi %r1, -1 - INITCY - j L(top) - -L(b1): l %r5, 0(up) - la up, 4(up) - l %r9, 0(vp) - la vp, 4(vp) - - alr %r9, %r9 - slbr %r1, %r1 - ADDSUBC %r5, %r9 - slbr %r13, %r13 - - st %r5, 0(rp) - la rp, 4(rp) - brct %r0, L(top) - j L(end) - -L(b2): lm %r5, %r6, 0(up) - la up, 8(up) - lm %r9, %r10, 0(vp) - la vp, 8(vp) - - alr %r9, %r9 - alcr %r10, %r10 - slbr %r1, %r1 - - ADDSUBC %r5, %r9 - ADDSUBE %r6, %r10 - slbr %r13, %r13 - - stm %r5, %r6, 0(rp) - la rp, 8(rp) - brct %r0, L(top) - j L(end) - -L(top): lm %r9, %r12, 0(vp) - la vp, 16(vp) - - ahi %r1, 1 C restore carry - - alcr %r9, %r9 - alcr %r10, %r10 - alcr %r11, %r11 - alcr %r12, %r12 - - slbr %r1, %r1 C save carry - - lm %r5, %r8, 0(up) - la up, 16(up) - - ahi %r13, 1 C restore carry - - ADDSUBE %r5, %r9 - ADDSUBE %r6, %r10 - ADDSUBE %r7, %r11 - ADDSUBE %r8, %r12 - - slbr %r13, %r13 - - stm %r5, %r8, 0(rp) - la rp, 16(rp) - brct %r0, L(top) - -L(end): - RETVAL - lm %r6, %r13, 24(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/bdiv_dbm1c.asm b/gmp/mpn/s390_32/esame/bdiv_dbm1c.asm deleted file mode 100644 index 568a2a44e8..0000000000 --- a/gmp/mpn/s390_32/esame/bdiv_dbm1c.asm +++ /dev/null @@ -1,65 +0,0 @@ -dnl S/390-32 mpn_bdiv_dbm1c for systems with MLR instruction. - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 14 -C z990 10 -C z9 ? -C z10 ? -C z196 ? - -C INPUT PARAMETERS -define(`qp', `%r2') -define(`up', `%r3') -define(`n', `%r4') -define(`bd', `%r5') -define(`cy', `%r6') - -ASM_START() - TEXT - ALIGN(16) -PROLOGUE(mpn_bdiv_dbm1c) - stm %r6, %r7, 24(%r15) - lhi %r7, 0 C zero index register - -L(top): l %r1, 0(%r7,up) - mlr %r0, bd - slr %r6, %r1 - st %r6, 0(%r7,qp) - slbr %r6, %r0 - la %r7, 4(%r7) - brct n, L(top) - - lr %r2, %r6 - lm %r6, %r7, 24(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/gmp-mparam.h b/gmp/mpn/s390_32/esame/gmp-mparam.h deleted file mode 100644 index a805fa1492..0000000000 --- a/gmp/mpn/s390_32/esame/gmp-mparam.h +++ /dev/null @@ -1,207 +0,0 @@ -/* S/390-32 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000-2008-2011, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define GMP_LIMB_BYTES 4 - -/* 4400 MHz IBM z10 running in 32-bit mode */ -/* FFT tuning limit = 15000000 */ -/* Generated by tuneup.c, 2014-03-12, gcc 4.7 */ - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1_1P_METHOD 1 -#define MOD_1_NORM_THRESHOLD 4 -#define MOD_1_UNNORM_THRESHOLD 8 -#define MOD_1N_TO_MOD_1_1_THRESHOLD 16 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 8 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD 38 -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 30 -#define USE_PREINV_DIVREM_1 1 -#define DIV_QR_1N_PI1_METHOD 1 -#define DIV_QR_1_NORM_THRESHOLD 3 -#define DIV_QR_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 56 - -#define MUL_TOOM22_THRESHOLD 8 -#define MUL_TOOM33_THRESHOLD 59 -#define MUL_TOOM44_THRESHOLD 88 -#define MUL_TOOM6H_THRESHOLD 125 -#define MUL_TOOM8H_THRESHOLD 169 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 57 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 55 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 57 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 56 -#define MUL_TOOM43_TO_TOOM54_THRESHOLD 82 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_TOOM2_THRESHOLD 14 -#define SQR_TOOM3_THRESHOLD 90 -#define SQR_TOOM4_THRESHOLD 144 -#define SQR_TOOM6_THRESHOLD 196 -#define SQR_TOOM8_THRESHOLD 309 - -#define MULMID_TOOM42_THRESHOLD 24 - -#define MULMOD_BNM1_THRESHOLD 12 -#define SQRMOD_BNM1_THRESHOLD 10 - -#define MUL_FFT_MODF_THRESHOLD 252 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 252, 5}, { 9, 6}, { 5, 5}, { 13, 6}, \ - { 7, 5}, { 15, 6}, { 13, 7}, { 7, 6}, \ - { 15, 7}, { 9, 6}, { 19, 7}, { 11, 6}, \ - { 23, 7}, { 13, 8}, { 7, 7}, { 15, 6}, \ - { 31, 7}, { 19, 8}, { 11, 7}, { 23, 9}, \ - { 7, 8}, { 15, 7}, { 31, 8}, { 19, 7}, \ - { 39, 8}, { 27, 9}, { 15, 8}, { 39, 9}, \ - { 23,10}, { 15, 9}, { 31, 8}, { 63, 9}, \ - { 39, 8}, { 79, 9}, { 47,10}, { 31, 9}, \ - { 79,10}, { 47,11}, { 31,10}, { 63, 9}, \ - { 127, 8}, { 255,10}, { 79, 8}, { 319, 9}, \ - { 175, 8}, { 351, 7}, { 703, 6}, { 1407,10}, \ - { 95, 9}, { 191, 8}, { 383, 9}, { 207, 8}, \ - { 415, 7}, { 831, 9}, { 223,11}, { 63,10}, \ - { 127, 9}, { 255,10}, { 143, 9}, { 287, 8}, \ - { 575, 9}, { 319,10}, { 175, 9}, { 351, 8}, \ - { 703, 7}, { 1407,11}, { 95,10}, { 191, 9}, \ - { 383,10}, { 207, 9}, { 415, 8}, { 831,12}, \ - { 63,11}, { 127,10}, { 255, 9}, { 575,11}, \ - { 159,10}, { 351, 9}, { 703, 8}, { 1407,11}, \ - { 191,10}, { 415, 9}, { 831,11}, { 223,10}, \ - { 447, 9}, { 895, 8}, { 1791,10}, { 479, 9}, \ - { 959,12}, { 127,11}, { 287,10}, { 575,11}, \ - { 351,10}, { 703, 9}, { 1407,12}, { 191,11}, \ - { 415,10}, { 831,11}, { 447,10}, { 895, 9}, \ - { 1791,11}, { 479,10}, { 959,13}, { 127,12}, \ - { 255,11}, { 575,12}, { 319,11}, { 703,10}, \ - { 1407,12}, { 383,11}, { 831,12}, { 447,11}, \ - { 895,10}, { 1791,11}, { 959,10}, { 1919, 9}, \ - { 3839,13}, { 255,12}, { 575,11}, { 1215,10}, \ - { 2431,12}, { 703,11}, { 1407,13}, { 383,12}, \ - { 895,11}, { 1791,12}, { 959,11}, { 1919,10}, \ - { 3839,14}, { 255,13}, { 511,12}, { 1215,11}, \ - { 2431,13}, { 639,12}, { 1471,13}, { 895,12}, \ - { 1919,11}, { 3839,10}, { 7679,14}, { 511,13}, \ - { 1023,12}, { 2047,13}, { 1151,12}, { 2431,13}, \ - { 1407,14}, { 767,13}, { 8192,14}, { 16384,15}, \ - { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 149 -#define MUL_FFT_THRESHOLD 2240 - -#define SQR_FFT_MODF_THRESHOLD 244 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 244, 5}, { 11, 6}, { 6, 5}, { 13, 6}, \ - { 7, 5}, { 15, 6}, { 8, 5}, { 17, 6}, \ - { 11, 5}, { 23, 6}, { 13, 7}, { 7, 6}, \ - { 16, 7}, { 9, 6}, { 19, 7}, { 11, 6}, \ - { 23, 7}, { 13, 8}, { 7, 7}, { 19, 8}, \ - { 11, 7}, { 23, 9}, { 7, 8}, { 15, 7}, \ - { 31, 8}, { 19, 7}, { 39, 8}, { 23, 9}, \ - { 15, 8}, { 39, 9}, { 23,10}, { 15, 9}, \ - { 31, 8}, { 63, 9}, { 39, 8}, { 79, 9}, \ - { 47,10}, { 31, 9}, { 63, 8}, { 127, 9}, \ - { 71, 8}, { 143, 7}, { 287,10}, { 47,11}, \ - { 31,10}, { 63, 9}, { 127, 8}, { 255, 9}, \ - { 143, 8}, { 287,10}, { 79, 9}, { 159, 8}, \ - { 319, 9}, { 175, 8}, { 351, 7}, { 703, 6}, \ - { 1407,10}, { 95, 9}, { 191, 8}, { 383,11}, \ - { 63,10}, { 127, 9}, { 255,10}, { 143, 9}, \ - { 287, 8}, { 575,10}, { 159, 9}, { 319,10}, \ - { 175, 9}, { 351, 8}, { 703, 7}, { 1407,11}, \ - { 95,10}, { 191, 9}, { 383,10}, { 207,12}, \ - { 63,11}, { 127,10}, { 255, 9}, { 511,10}, \ - { 287, 9}, { 575,11}, { 159,10}, { 351, 9}, \ - { 703, 8}, { 1407,11}, { 191,10}, { 415,11}, \ - { 223,10}, { 447, 9}, { 895, 8}, { 1791,10}, \ - { 479, 9}, { 959,12}, { 127,11}, { 255,10}, \ - { 511,11}, { 287,10}, { 575,11}, { 319,10}, \ - { 639,11}, { 351,10}, { 703, 9}, { 1407,12}, \ - { 191,11}, { 415,10}, { 831,11}, { 447,10}, \ - { 895, 9}, { 1791,11}, { 479,13}, { 127,12}, \ - { 255,11}, { 575,12}, { 319,11}, { 703,10}, \ - { 1407,12}, { 383,11}, { 831,12}, { 447,11}, \ - { 895,10}, { 1791,11}, { 959,10}, { 1919,13}, \ - { 255,12}, { 511,11}, { 1023,12}, { 575,11}, \ - { 1215,10}, { 2431,12}, { 703,11}, { 1407,13}, \ - { 383,12}, { 895,11}, { 1791,12}, { 959,11}, \ - { 1919,14}, { 255,13}, { 511,12}, { 1215,11}, \ - { 2431,13}, { 639,12}, { 1471,11}, { 2943,10}, \ - { 5887,13}, { 895,12}, { 1919,11}, { 3839,10}, \ - { 7679,14}, { 511,13}, { 1023,12}, { 2047,13}, \ - { 1151,12}, { 2431,13}, { 1407,12}, { 2943,11}, \ - { 5887,14}, { 767,13}, { 8192,14}, { 16384,15}, \ - { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 161 -#define SQR_FFT_THRESHOLD 1728 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 33 -#define MULLO_MUL_N_THRESHOLD 4392 - -#define DC_DIV_QR_THRESHOLD 43 -#define DC_DIVAPPR_Q_THRESHOLD 150 -#define DC_BDIV_QR_THRESHOLD 38 -#define DC_BDIV_Q_THRESHOLD 107 - -#define INV_MULMOD_BNM1_THRESHOLD 14 -#define INV_NEWTON_THRESHOLD 165 -#define INV_APPR_THRESHOLD 149 - -#define BINV_NEWTON_THRESHOLD 147 -#define REDC_1_TO_REDC_N_THRESHOLD 43 - -#define MU_DIV_QR_THRESHOLD 777 -#define MU_DIVAPPR_Q_THRESHOLD 942 -#define MUPI_DIV_QR_THRESHOLD 69 -#define MU_BDIV_QR_THRESHOLD 654 -#define MU_BDIV_Q_THRESHOLD 777 - -#define POWM_SEC_TABLE 3,32,126,692,1486 - -#define MATRIX22_STRASSEN_THRESHOLD 17 -#define HGCD_THRESHOLD 103 -#define HGCD_APPR_THRESHOLD 144 -#define HGCD_REDUCE_THRESHOLD 1437 -#define GCD_DC_THRESHOLD 275 -#define GCDEXT_DC_THRESHOLD 206 -#define JACOBI_BASE_METHOD 4 - -#define GET_STR_DC_THRESHOLD 9 -#define GET_STR_PRECOMPUTE_THRESHOLD 20 -#define SET_STR_DC_THRESHOLD 532 -#define SET_STR_PRECOMPUTE_THRESHOLD 999 - -#define FAC_DSC_THRESHOLD 156 -#define FAC_ODD_THRESHOLD 24 diff --git a/gmp/mpn/s390_32/esame/mul_1.asm b/gmp/mpn/s390_32/esame/mul_1.asm deleted file mode 100644 index 04be963651..0000000000 --- a/gmp/mpn/s390_32/esame/mul_1.asm +++ /dev/null @@ -1,66 +0,0 @@ -dnl S/390-32 mpn_mul_1 for systems with MLR instruction - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 14 -C z990 9 -C z9 ? -C z10 ? -C z196 ? - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`n', `%r4') -define(`v0', `%r5') - -ASM_START() -PROLOGUE(mpn_mul_1) - stm %r11, %r12, 44(%r15) - lhi %r12, 0 C zero index register - ahi %r12, 0 C clear carry flag - lhi %r11, 0 C clear carry limb - -L(top): l %r1, 0(%r12,up) - mlr %r0, v0 - alcr %r1, %r11 - lr %r11, %r0 C copy high part to carry limb - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct n, L(top) - - lhi %r2, 0 - alcr %r2, %r11 - - lm %r11, %r12, 44(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/mul_basecase.asm b/gmp/mpn/s390_32/esame/mul_basecase.asm deleted file mode 100644 index 2c8138d8d2..0000000000 --- a/gmp/mpn/s390_32/esame/mul_basecase.asm +++ /dev/null @@ -1,130 +0,0 @@ -dnl S/390-32/esame mpn_mul_basecase. - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 ? -C z990 ? -C z9 ? -C z10 ? -C z196 ? - -C TODO -C * Perhaps add special case for un <= 2. -C * Replace loops by faster code. The mul_1 and addmul_1 loops could be sped -C up by about 10%. - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`un', `%r4') -define(`vp', `%r5') -define(`vn', `%r6') - -define(`zero', `%r8') - -ASM_START() -PROLOGUE(mpn_mul_basecase) - chi un, 2 - jhe L(ge2) - -C un = vn = 1 - l %r1, 0(vp) - ml %r0, 0(up) - st %r1, 0(rp) - st %r0, 4(rp) - br %r14 - -L(ge2): C jne L(gen) - - -L(gen): -C mul_1 ======================================================================= - - stm %r6, %r12, 24(%r15) - lhi zero, 0 - ahi un, -1 - - l %r7, 0(vp) - l %r11, 0(up) - lhi %r12, 4 C init index register - mlr %r10, %r7 - lr %r9, un - st %r11, 0(rp) - cr %r15, %r15 C clear carry flag - -L(tm): l %r1, 0(%r12,up) - mlr %r0, %r7 - alcr %r1, %r10 - lr %r10, %r0 C copy high part to carry limb - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct %r9, L(tm) - - alcr %r0, zero - st %r0, 0(%r12,rp) - -C addmul_1 loop =============================================================== - - ahi vn, -1 - je L(outer_end) -L(outer_loop): - - la rp, 4(rp) C rp += 1 - la vp, 4(vp) C up += 1 - l %r7, 0(vp) - l %r11, 0(up) - lhi %r12, 4 C init index register - mlr %r10, %r7 - lr %r9, un - al %r11, 0(rp) - st %r11, 0(rp) - -L(tam): l %r1, 0(%r12,up) - l %r11, 0(%r12,rp) - mlr %r0, %r7 - alcr %r1, %r11 - alcr %r0, zero - alr %r1, %r10 - lr %r10, %r0 - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct %r9, L(tam) - - alcr %r0, zero - st %r0, 0(%r12,rp) - - brct vn, L(outer_loop) -L(outer_end): - - lm %r6, %r12, 24(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/sqr_basecase.asm b/gmp/mpn/s390_32/esame/sqr_basecase.asm deleted file mode 100644 index dcc13112bf..0000000000 --- a/gmp/mpn/s390_32/esame/sqr_basecase.asm +++ /dev/null @@ -1,203 +0,0 @@ -dnl S/390-32 mpn_sqr_basecase. - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 ? -C z990 23 -C z9 ? -C z10 ? -C z196 ? - -C TODO -C * Clean up. -C * Stop iterating addmul_1 loop at latest for n = 2, implement longer tail. -C This will ask for basecase handling of n = 3. -C * Update counters and pointers more straightforwardly, possibly lowering -C register usage. -C * Should we use this allocation-free style for more sqr_basecase asm -C implementations? The only disadvantage is that it requires R != U. -C * Replace loops by faster code. The mul_1 and addmul_1 loops could be sped -C up by about 10%. The sqr_diag_addlsh1 loop could probably be sped up even -C more. - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`n', `%r4') - -define(`zero', `%r8') -define(`rp_saved', `%r9') -define(`up_saved', `%r13') -define(`n_saved', `%r14') - -ASM_START() -PROLOGUE(mpn_sqr_basecase) - ahi n, -2 - jhe L(ge2) - -C n = 1 - l %r5, 0(up) - mlr %r4, %r5 - st %r5, 0(rp) - st %r4, 4(rp) - br %r14 - -L(ge2): jne L(gen) - -C n = 2 - stm %r6, %r8, 24(%r15) - lhi zero, 0 - - l %r5, 0(up) - mlr %r4, %r5 C u0 * u0 - l %r1, 4(up) - mlr %r0, %r1 C u1 * u1 - st %r5, 0(rp) - - l %r7, 0(up) - ml %r6, 4(up) C u0 * u1 - alr %r7, %r7 - alcr %r6, %r6 - alcr %r0, zero - - alr %r4, %r7 - alcr %r1, %r6 - alcr %r0, zero - st %r4, 4(rp) - st %r1, 8(rp) - st %r0, 12(rp) - - lm %r6, %r8, 24(%r15) - br %r14 - -L(gen): -C mul_1 ======================================================================= - - stm %r6, %r14, 24(%r15) - lhi zero, 0 - lr up_saved, up - lr rp_saved, rp - lr n_saved, n - - l %r6, 0(up) - l %r11, 4(up) - lhi %r12, 8 C init index register - mlr %r10, %r6 - lr %r5, n - st %r11, 4(rp) - cr %r15, %r15 C clear carry flag - -L(tm): l %r1, 0(%r12,up) - mlr %r0, %r6 - alcr %r1, %r10 - lr %r10, %r0 C copy high part to carry limb - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct %r5, L(tm) - - alcr %r0, zero - st %r0, 0(%r12,rp) - -C addmul_1 loop =============================================================== - - ahi n, -1 - je L(outer_end) -L(outer_loop): - - la rp, 8(rp) C rp += 2 - la up, 4(up) C up += 1 - l %r6, 0(up) - l %r11, 4(up) - lhi %r12, 8 C init index register - mlr %r10, %r6 - lr %r5, n - al %r11, 4(rp) - st %r11, 4(rp) - -L(tam): l %r1, 0(%r12,up) - l %r7, 0(%r12,rp) - mlr %r0, %r6 - alcr %r1, %r7 - alcr %r0, zero - alr %r1, %r10 - lr %r10, %r0 - st %r1, 0(%r12,rp) - la %r12, 4(%r12) - brct %r5, L(tam) - - alcr %r0, zero - st %r0, 0(%r12,rp) - - brct n, L(outer_loop) -L(outer_end): - - l %r6, 4(up) - l %r1, 8(up) - lr %r7, %r0 C Same as: l %r7, 12(,rp) - mlr %r0, %r6 - alr %r1, %r7 - alcr %r0, zero - st %r1, 12(rp) - st %r0, 16(rp) - -C sqr_dia_addlsh1 ============================================================ - -define(`up', `up_saved') -define(`rp', `rp_saved') - la n, 1(n_saved) - - l %r1, 0(up) - mlr %r0, %r1 - st %r1, 0(rp) -C clr %r15, %r15 C clear carry (already clear per above) - -L(top): l %r11, 4(up) - la up, 4(up) - l %r6, 4(rp) - l %r7, 8(rp) - mlr %r10, %r11 - alcr %r6, %r6 - alcr %r7, %r7 - alcr %r10, zero C propagate carry to high product limb - alr %r6, %r0 - alcr %r7, %r11 - stm %r6, %r7, 4(rp) - la rp, 8(rp) - lr %r0, %r10 C copy carry limb - brct n, L(top) - - alcr %r0, zero - st %r0, 4(rp) - - lm %r6, %r14, 24(%r15) - br %r14 -EPILOGUE() diff --git a/gmp/mpn/s390_32/esame/submul_1.asm b/gmp/mpn/s390_32/esame/submul_1.asm deleted file mode 100644 index a71e57e230..0000000000 --- a/gmp/mpn/s390_32/esame/submul_1.asm +++ /dev/null @@ -1,70 +0,0 @@ -dnl S/390-32 mpn_submul_1 for systems with MLR instruction. - -dnl Copyright 2011 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of either: -dnl -dnl * the GNU Lesser General Public License as published by the Free -dnl Software Foundation; either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl or -dnl -dnl * the GNU General Public License as published by the Free Software -dnl Foundation; either version 2 of the License, or (at your option) any -dnl later version. -dnl -dnl or both in parallel, as here. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received copies of the GNU General Public License and the -dnl GNU Lesser General Public License along with the GNU MP Library. If not, -dnl see https://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C z900 20 -C z990 11 -C z9 ? -C z10 ? -C z196 ? - -C INPUT PARAMETERS -define(`rp', `%r2') -define(`up', `%r3') -define(`n', `%r4') -define(`v0', `%r5') - -ASM_START() -PROLOGUE(mpn_submul_1) - stm %r9, %r12, 36(%r15) - lhi %r12, 0 - slr %r11, %r11 - -L(top): l %r1, 0(%r12, up) - l %r10, 0(%r12, rp) - mlr %r0, v0 - slbr %r10, %r1 - slbr %r9, %r9 - slr %r0, %r9 C conditional incr - slr %r10, %r11 - lr %r11, %r0 - st %r10, 0(%r12, rp) - la %r12, 4(%r12) - brct %r4, L(top) - - lr %r2, %r11 - slbr %r9, %r9 - slr %r2, %r9 - - lm %r9, %r12, 36(%r15) - br %r14 -EPILOGUE() |