diff options
author | tege <tege@gmplib.org> | 2002-02-19 01:47:42 +0100 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-02-19 01:47:42 +0100 |
commit | b39705fa88882d37a9c767348fe0e52c05590132 (patch) | |
tree | 256bb99ef67c1a6a1e6f562a9adeb0c88bc69a68 /mpn/mips3 | |
parent | 949561f8acde8afe79de1dc5858ac5b6853e9c10 (diff) | |
download | gmp-b39705fa88882d37a9c767348fe0e52c05590132.tar.gz |
Directory renamed to mips64.
Diffstat (limited to 'mpn/mips3')
-rw-r--r-- | mpn/mips3/README | 46 | ||||
-rw-r--r-- | mpn/mips3/add_n.asm | 114 | ||||
-rw-r--r-- | mpn/mips3/addmul_1.asm | 92 | ||||
-rw-r--r-- | mpn/mips3/gmp-mparam.h | 64 | ||||
-rw-r--r-- | mpn/mips3/lshift.asm | 90 | ||||
-rw-r--r-- | mpn/mips3/mips.m4 | 71 | ||||
-rw-r--r-- | mpn/mips3/mul_1.asm | 83 | ||||
-rw-r--r-- | mpn/mips3/rshift.asm | 87 | ||||
-rw-r--r-- | mpn/mips3/sqr_diagonal.asm | 68 | ||||
-rw-r--r-- | mpn/mips3/sub_n.asm | 114 | ||||
-rw-r--r-- | mpn/mips3/submul_1.asm | 92 | ||||
-rw-r--r-- | mpn/mips3/umul.asm | 36 |
12 files changed, 0 insertions, 957 deletions
diff --git a/mpn/mips3/README b/mpn/mips3/README deleted file mode 100644 index 1d58ad600..000000000 --- a/mpn/mips3/README +++ /dev/null @@ -1,46 +0,0 @@ -Copyright 1996 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 the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 of the License, or (at your -option) any later version. - -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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - - - - -This directory contains mpn functions optimized for MIPS3. Example of -processors that implement MIPS3 are R4000, R4400, R4600, R4700, and R8000. - -RELEVANT OPTIMIZATION ISSUES - -1. On the R4000 and R4400, branches, both the plain and the "likely" ones, - take 3 cycles to execute. (The fastest possible loop will take 4 cycles, - because of the delay insn.) - - On the R4600, branches takes a single cycle - - On the R8000, branches often take no noticable cycles, as they are - executed in a separate function unit.. - -2. The R4000 and R4400 have a load latency of 4 cycles. - -3. On the R4000 and R4400, multiplies take a data-dependent number of - cycles, contrary to the SGI documentation. There seem to be 3 or 4 - possible latencies. - -STATUS - -Good... diff --git a/mpn/mips3/add_n.asm b/mpn/mips3/add_n.asm deleted file mode 100644 index 251a16eb1..000000000 --- a/mpn/mips3/add_n.asm +++ /dev/null @@ -1,114 +0,0 @@ -dnl MIPS3 mpn_add_n -- Add two limb vectors of the same length > 0 and store -dnl sum in a third limb vector. - -dnl Copyright 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C s1_ptr $5 -C s2_ptr $6 -C size $7 - -ASM_START() -PROLOGUE(mpn_add_n) - ld $10,0($5) - ld $11,0($6) - - daddiu $7,$7,-1 - and $9,$7,4-1 C number of limbs in first loop - beq $9,$0,.L0 C if multiple of 4 limbs, skip first loop - move $2,$0 - - dsubu $7,$7,$9 - -.Loop0: daddiu $9,$9,-1 - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,0($4) - or $2,$2,$8 - - daddiu $5,$5,8 - daddiu $6,$6,8 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 - -.L0: beq $7,$0,.Lend - nop - -.Loop: daddiu $7,$7,-4 - - ld $12,8($5) - daddu $11,$11,$10 - ld $13,8($6) - sltu $8,$11,$10 - daddu $11,$11,$2 - sltu $2,$11,$2 - sd $11,0($4) - or $2,$2,$8 - - ld $10,16($5) - daddu $13,$13,$12 - ld $11,16($6) - sltu $8,$13,$12 - daddu $13,$13,$2 - sltu $2,$13,$2 - sd $13,8($4) - or $2,$2,$8 - - ld $12,24($5) - daddu $11,$11,$10 - ld $13,24($6) - sltu $8,$11,$10 - daddu $11,$11,$2 - sltu $2,$11,$2 - sd $11,16($4) - or $2,$2,$8 - - ld $10,32($5) - daddu $13,$13,$12 - ld $11,32($6) - sltu $8,$13,$12 - daddu $13,$13,$2 - sltu $2,$13,$2 - sd $13,24($4) - or $2,$2,$8 - - daddiu $5,$5,32 - daddiu $6,$6,32 - - bne $7,$0,.Loop - daddiu $4,$4,32 - -.Lend: daddu $11,$11,$2 - sltu $8,$11,$2 - daddu $11,$10,$11 - sltu $2,$11,$10 - sd $11,0($4) - j $31 - or $2,$2,$8 -EPILOGUE(mpn_add_n) diff --git a/mpn/mips3/addmul_1.asm b/mpn/mips3/addmul_1.asm deleted file mode 100644 index 6a3c87cdc..000000000 --- a/mpn/mips3/addmul_1.asm +++ /dev/null @@ -1,92 +0,0 @@ -dnl MIPS3 mpn_addmul_1 -- Multiply a limb vector with a single limb and add -dnl the product to a second limb vector. - -dnl Copyright 1992, 1994, 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C s1_ptr $5 -C size $6 -C s2_limb $7 - -ASM_START() -PROLOGUE(mpn_addmul_1) - -C feed-in phase 0 - ld $8,0($5) - -C feed-in phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 C zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) C load new s1 limb as early as possible - -Loop: ld $10,0($4) - mflo $3 - mfhi $9 - daddiu $5,$5,8 - daddu $3,$3,$2 C add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) C load new s1 limb as early as possible - daddiu $6,$6,-1 C decrement loop counter - sltu $2,$3,$2 C carry from previous addition -> $2 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 1 -$LC1: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dmultu $8,$7 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 0 -$LC0: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - daddu $3,$10,$3 - sltu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - j $31 - daddu $2,$9,$2 C add high product limb and carry from addition -EPILOGUE(mpn_addmul_1) diff --git a/mpn/mips3/gmp-mparam.h b/mpn/mips3/gmp-mparam.h deleted file mode 100644 index 77d99515e..000000000 --- a/mpn/mips3/gmp-mparam.h +++ /dev/null @@ -1,64 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001 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 the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 of the License, or (at your -option) any later version. - -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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library; see the file COPYING.LIB. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA. */ - - -#define BITS_PER_MP_LIMB 64 -#define BYTES_PER_MP_LIMB 8 - - -/* Generated by tuneup.c, 2002-02-12, MIPSpro C 7.2.1 (R10000) */ - -#define KARATSUBA_MUL_THRESHOLD 13 -#define TOOM3_MUL_THRESHOLD 82 - -#define BASECASE_SQR_THRESHOLD 6 -#define KARATSUBA_SQR_THRESHOLD 28 -#define TOOM3_SQR_THRESHOLD 93 - -#define SB_PREINV_THRESHOLD 4 -#define DC_THRESHOLD 48 -#define POWM_THRESHOLD 97 - -#define GCD_ACCEL_THRESHOLD 3 -#define GCDEXT_THRESHOLD 21 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD 3 -#define MOD_1_NORM_THRESHOLD 4 -#define MOD_1_UNNORM_THRESHOLD 3 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_BASECASE_THRESHOLD 10 -#define GET_STR_PRECOMPUTE_THRESHOLD 12 -#define SET_STR_THRESHOLD 3664 - -#define FFT_MUL_TABLE { 464, 992, 2112, 4352, 9216, 28672, 0 } -#define FFT_MODF_MUL_THRESHOLD 480 -#define FFT_MUL_THRESHOLD 3456 - -#define FFT_SQR_TABLE { 432, 864, 1984, 3840, 9216, 28672, 0 } -#define FFT_MODF_SQR_THRESHOLD 448 -#define FFT_SQR_THRESHOLD 2944 diff --git a/mpn/mips3/lshift.asm b/mpn/mips3/lshift.asm deleted file mode 100644 index 1dd1b24b4..000000000 --- a/mpn/mips3/lshift.asm +++ /dev/null @@ -1,90 +0,0 @@ -dnl MIPS3 mpn_lshift -- Left shift. - -dnl Copyright 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C src_ptr $5 -C size $6 -C cnt $7 - -ASM_START() -PROLOGUE(mpn_lshift) - dsll $2,$6,3 - daddu $5,$5,$2 C make r5 point at end of src - ld $10,-8($5) C load first limb - dsubu $13,$0,$7 - daddu $4,$4,$2 C make r4 point at end of res - daddiu $6,$6,-1 - and $9,$6,4-1 C number of limbs in first loop - beq $9,$0,.L0 C if multiple of 4 limbs, skip first loop - dsrl $2,$10,$13 C compute function result - - dsubu $6,$6,$9 - -.Loop0: ld $3,-16($5) - daddiu $4,$4,-8 - daddiu $5,$5,-8 - daddiu $9,$9,-1 - dsll $11,$10,$7 - dsrl $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,0($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: ld $3,-16($5) - daddiu $4,$4,-32 - daddiu $6,$6,-4 - dsll $11,$10,$7 - dsrl $12,$3,$13 - - ld $10,-24($5) - dsll $14,$3,$7 - or $8,$11,$12 - sd $8,24($4) - dsrl $9,$10,$13 - - ld $3,-32($5) - dsll $11,$10,$7 - or $8,$14,$9 - sd $8,16($4) - dsrl $12,$3,$13 - - ld $10,-40($5) - dsll $14,$3,$7 - or $8,$11,$12 - sd $8,8($4) - dsrl $9,$10,$13 - - daddiu $5,$5,-32 - or $8,$14,$9 - bgtz $6,.Loop - sd $8,0($4) - -.Lend: dsll $8,$10,$7 - j $31 - sd $8,-8($4) -EPILOGUE(mpn_lshift) diff --git a/mpn/mips3/mips.m4 b/mpn/mips3/mips.m4 deleted file mode 100644 index ef57de148..000000000 --- a/mpn/mips3/mips.m4 +++ /dev/null @@ -1,71 +0,0 @@ -divert(-1) - -dnl m4 macros for MIPS assembly code. - - -dnl Copyright 2000, 2001, 2002 Free Software Foundation, Inc. -dnl -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 the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. -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 Lesser General Public -dnl License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - - -dnl Usage: ASM_START() -define(`ASM_START', -m4_assert_numargs(0) -` .set noreorder - .set nomacro') - -dnl Usage: X(value) -define(`X', -m4_assert_numargs(1) -`0x$1') - -dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo) -dnl EPILOGUE_cpu(GSYM_PREFIX`'foo) - -define(`PROLOGUE_cpu', -m4_assert_numargs(1) -` .text - .align 4 - .globl $1 - .ent $1 -$1:') - -define(`EPILOGUE_cpu', -m4_assert_numargs(1) -` .end $1') - - -dnl Usage: r0 ... r31 -dnl f0 ... f31 -dnl -dnl Map register names r0 to $0, and f0 to $f0, etc. -dnl -dnl defreg() is used to protect the $ in $0 (otherwise it would represent a -dnl macro argument). Double quoting is used to protect the f0 in $f0 -dnl (otherwise it would be an infinite recursion). - -forloop(i,0,31,`defreg(`r'i,$i)') -forloop(i,0,31,`deflit(`f'i,``$f''i)') - - -dnl Usage: ASM_END() -define(`ASM_END', -m4_assert_numargs(0) -) - -divert diff --git a/mpn/mips3/mul_1.asm b/mpn/mips3/mul_1.asm deleted file mode 100644 index 302a63174..000000000 --- a/mpn/mips3/mul_1.asm +++ /dev/null @@ -1,83 +0,0 @@ -dnl MIPS3 mpn_mul_1 -- Multiply a limb vector with a single limb and store the -dnl product in a second limb vector. - -dnl Copyright 1992, 1994, 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C s1_ptr $5 -C size $6 -C s2_limb $7 - -ASM_START() -PROLOGUE(mpn_mul_1) - -C feed-in phase 0 - ld $8,0($5) - -C feed-in phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 C zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) C load new s1 limb as early as possible - -Loop: nop - mflo $10 - mfhi $9 - daddiu $5,$5,8 - daddu $10,$10,$2 C add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) C load new s1 limb as early as possible - daddiu $6,$6,-1 C decrement loop counter - sltu $2,$10,$2 C carry from previous addition -> $2 - nop - nop - sd $10,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 1 -$LC1: mflo $10 - mfhi $9 - daddu $10,$10,$2 - sltu $2,$10,$2 - dmultu $8,$7 - sd $10,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 0 -$LC0: mflo $10 - mfhi $9 - daddu $10,$10,$2 - sltu $2,$10,$2 - sd $10,0($4) - j $31 - daddu $2,$9,$2 C add high product limb and carry from addition -EPILOGUE(mpn_mul_1) diff --git a/mpn/mips3/rshift.asm b/mpn/mips3/rshift.asm deleted file mode 100644 index 0db0f7d37..000000000 --- a/mpn/mips3/rshift.asm +++ /dev/null @@ -1,87 +0,0 @@ -dnl MIPS3 mpn_rshift -- Right shift. - -dnl Copyright 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C src_ptr $5 -C size $6 -C cnt $7 - -ASM_START() -PROLOGUE(mpn_rshift) - ld $10,0($5) C load first limb - dsubu $13,$0,$7 - daddiu $6,$6,-1 - and $9,$6,4-1 C number of limbs in first loop - beq $9,$0,.L0 C if multiple of 4 limbs, skip first loop - dsll $2,$10,$13 C compute function result - - dsubu $6,$6,$9 - -.Loop0: ld $3,8($5) - daddiu $4,$4,8 - daddiu $5,$5,8 - daddiu $9,$9,-1 - dsrl $11,$10,$7 - dsll $12,$3,$13 - move $10,$3 - or $8,$11,$12 - bne $9,$0,.Loop0 - sd $8,-8($4) - -.L0: beq $6,$0,.Lend - nop - -.Loop: ld $3,8($5) - daddiu $4,$4,32 - daddiu $6,$6,-4 - dsrl $11,$10,$7 - dsll $12,$3,$13 - - ld $10,16($5) - dsrl $14,$3,$7 - or $8,$11,$12 - sd $8,-32($4) - dsll $9,$10,$13 - - ld $3,24($5) - dsrl $11,$10,$7 - or $8,$14,$9 - sd $8,-24($4) - dsll $12,$3,$13 - - ld $10,32($5) - dsrl $14,$3,$7 - or $8,$11,$12 - sd $8,-16($4) - dsll $9,$10,$13 - - daddiu $5,$5,32 - or $8,$14,$9 - bgtz $6,.Loop - sd $8,-8($4) - -.Lend: dsrl $8,$10,$7 - j $31 - sd $8,0($4) -EPILOGUE(mpn_rshift) diff --git a/mpn/mips3/sqr_diagonal.asm b/mpn/mips3/sqr_diagonal.asm deleted file mode 100644 index 6616cc4c0..000000000 --- a/mpn/mips3/sqr_diagonal.asm +++ /dev/null @@ -1,68 +0,0 @@ -dnl MIPS3 mpn_sqr_diagonal. - -dnl Copyright 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - - -dnl INPUT PARAMETERS -dnl rp $4 -dnl up $5 -dnl n $6 - -include(`../config.m4') - -ASM_START() -PROLOGUE(mpn_sqr_diagonal) - ld r8,0(r5) - daddiu r6,r6,-2 - dmultu r8,r8 - bltz r6,$Lend1 - nop - ld r8,8(r5) - beq r6,r0,$Lend2 - nop - -$Loop: mflo r10 - mfhi r9 - daddiu r6,r6,-1 - sd r10,0(r4) - sd r9,8(r4) - dmultu r8,r8 - ld r8,16(r5) - daddiu r5,r5,8 - bne r6,r0,$Loop - daddiu r4,r4,16 - -$Lend2: mflo r10 - mfhi r9 - sd r10,0(r4) - sd r9,8(r4) - dmultu r8,r8 - mflo r10 - mfhi r9 - sd r10,16(r4) - j r31 - sd r9,24(r4) - -$Lend1: mflo r10 - mfhi r9 - sd r10,0(r4) - j r31 - sd r9,8(r4) -EPILOGUE(mpn_sqr_diagonal) diff --git a/mpn/mips3/sub_n.asm b/mpn/mips3/sub_n.asm deleted file mode 100644 index 384f6c1de..000000000 --- a/mpn/mips3/sub_n.asm +++ /dev/null @@ -1,114 +0,0 @@ -dnl MIPS3 mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -dnl store difference in a third limb vector. - -dnl Copyright 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C s1_ptr $5 -C s2_ptr $6 -C size $7 - -ASM_START() -PROLOGUE(mpn_sub_n) - ld $10,0($5) - ld $11,0($6) - - daddiu $7,$7,-1 - and $9,$7,4-1 C number of limbs in first loop - beq $9,$0,.L0 C if multiple of 4 limbs, skip first loop - move $2,$0 - - dsubu $7,$7,$9 - -.Loop0: daddiu $9,$9,-1 - ld $12,8($5) - daddu $11,$11,$2 - ld $13,8($6) - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,0($4) - or $2,$2,$8 - - daddiu $5,$5,8 - daddiu $6,$6,8 - move $10,$12 - move $11,$13 - bne $9,$0,.Loop0 - daddiu $4,$4,8 - -.L0: beq $7,$0,.Lend - nop - -.Loop: daddiu $7,$7,-4 - - ld $12,8($5) - dsubu $11,$10,$11 - ld $13,8($6) - sltu $8,$10,$11 - dsubu $14,$11,$2 - sltu $2,$11,$14 - sd $14,0($4) - or $2,$2,$8 - - ld $10,16($5) - dsubu $13,$12,$13 - ld $11,16($6) - sltu $8,$12,$13 - dsubu $14,$13,$2 - sltu $2,$13,$14 - sd $14,8($4) - or $2,$2,$8 - - ld $12,24($5) - dsubu $11,$10,$11 - ld $13,24($6) - sltu $8,$10,$11 - dsubu $14,$11,$2 - sltu $2,$11,$14 - sd $14,16($4) - or $2,$2,$8 - - ld $10,32($5) - dsubu $13,$12,$13 - ld $11,32($6) - sltu $8,$12,$13 - dsubu $14,$13,$2 - sltu $2,$13,$14 - sd $14,24($4) - or $2,$2,$8 - - daddiu $5,$5,32 - daddiu $6,$6,32 - - bne $7,$0,.Loop - daddiu $4,$4,32 - -.Lend: daddu $11,$11,$2 - sltu $8,$11,$2 - dsubu $11,$10,$11 - sltu $2,$10,$11 - sd $11,0($4) - j $31 - or $2,$2,$8 -EPILOGUE(mpn_sub_n) diff --git a/mpn/mips3/submul_1.asm b/mpn/mips3/submul_1.asm deleted file mode 100644 index 62be4c341..000000000 --- a/mpn/mips3/submul_1.asm +++ /dev/null @@ -1,92 +0,0 @@ -dnl MIPS3 mpn_submul_1 -- Multiply a limb vector with a single limb and -dnl subtract the product from a second limb vector. - -dnl Copyright 1992, 1994, 1995, 2000, 2001 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C res_ptr $4 -C s1_ptr $5 -C size $6 -C s2_limb $7 - -ASM_START() -PROLOGUE(mpn_submul_1) - -C feed-in phase 0 - ld $8,0($5) - -C feed-in phase 1 - daddiu $5,$5,8 - dmultu $8,$7 - - daddiu $6,$6,-1 - beq $6,$0,$LC0 - move $2,$0 C zero cy2 - - daddiu $6,$6,-1 - beq $6,$0,$LC1 - ld $8,0($5) C load new s1 limb as early as possible - -Loop: ld $10,0($4) - mflo $3 - mfhi $9 - daddiu $5,$5,8 - daddu $3,$3,$2 C add old carry limb to low product limb - dmultu $8,$7 - ld $8,0($5) C load new s1 limb as early as possible - daddiu $6,$6,-1 C decrement loop counter - sltu $2,$3,$2 C carry from previous addition -> $2 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - bne $6,$0,Loop - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 1 -$LC1: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dmultu $8,$7 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - daddiu $4,$4,8 - daddu $2,$9,$2 C add high product limb and carry from addition - -C wind-down phase 0 -$LC0: ld $10,0($4) - mflo $3 - mfhi $9 - daddu $3,$3,$2 - sltu $2,$3,$2 - dsubu $3,$10,$3 - sgtu $10,$3,$10 - daddu $2,$2,$10 - sd $3,0($4) - j $31 - daddu $2,$9,$2 C add high product limb and carry from addition -EPILOGUE(mpn_submul_1) diff --git a/mpn/mips3/umul.asm b/mpn/mips3/umul.asm deleted file mode 100644 index ec2b2e57d..000000000 --- a/mpn/mips3/umul.asm +++ /dev/null @@ -1,36 +0,0 @@ -dnl MIPS3 umul_ppmm -- longlong.h support. - -dnl Copyright 2002 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 2.1 of the License, or (at -dnl your option) any later version. - -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 Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to -dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -dnl MA 02111-1307, USA. - -include(`../config.m4') - -C INPUT PARAMETERS -C plp $4 -C u $5 -C v $6 - -ASM_START() -PROLOGUE(mpn_umul_ppmm) - dmultu $5,$6 - mflo $3 - mfhi $2 - j $31 - sd $3,0($4) -EPILOGUE(mpn_umul_ppmm) |