diff options
author | tege <tege@gmplib.org> | 1999-03-12 18:15:03 +0100 |
---|---|---|
committer | tege <tege@gmplib.org> | 1999-03-12 18:15:03 +0100 |
commit | bd780025aa1a5e85ea188e2ed4b7848085d7590b (patch) | |
tree | 2a3e8d3672a79d0896e0ad7af87c88dac872104e /mpn | |
parent | 4eeb4dfb1862d0d5b229fa65187e86abb22357b2 (diff) | |
download | gmp-bd780025aa1a5e85ea188e2ed4b7848085d7590b.tar.gz |
*** empty log message ***
Diffstat (limited to 'mpn')
-rw-r--r-- | mpn/powerpc32/gmp-mparam.h | 32 | ||||
-rw-r--r-- | mpn/powerpc32/umul.S | 22 |
2 files changed, 54 insertions, 0 deletions
diff --git a/mpn/powerpc32/gmp-mparam.h b/mpn/powerpc32/gmp-mparam.h new file mode 100644 index 000000000..52dec35d3 --- /dev/null +++ b/mpn/powerpc32/gmp-mparam.h @@ -0,0 +1,32 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994 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 Library General Public License as published by +the Free Software Foundation; either version 2 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 Library General Public +License for more details. + +You should have received a copy of the GNU Library 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 32 +#define BYTES_PER_MP_LIMB 4 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 + +/* These values are for the 604. Presumably, these should be considerably + lowered for the 603 and 750 that has much slower multiply instructions. */ +#define KARATSUBA_MUL_THRESHOLD 20 +#define KARATSUBA_SQR_THRESHOLD 46 diff --git a/mpn/powerpc32/umul.S b/mpn/powerpc32/umul.S new file mode 100644 index 000000000..dbf526701 --- /dev/null +++ b/mpn/powerpc32/umul.S @@ -0,0 +1,22 @@ +#ifdef AIX_SYNTAX + .toc + .csect .text[PR] + .align 2 + .globl __umul_ppmm + .globl .__umul_ppmm + .csect __umul_ppmm[DS] +__umul_ppmm: + .long .__umul_ppmm, TOC[tc0], 0 + .csect .text[PR] +.__umul_ppmm: +#else + .text + .align 4 + .globl __umul_ppmm +__umul_ppmm: +#endif + mullw 0,4,5 + mulhwu 9,4,5 + stw 0,0(3) + mr 3,9 + blr |