summaryrefslogtreecommitdiff
path: root/gmp/mpn/cray
diff options
context:
space:
mode:
Diffstat (limited to 'gmp/mpn/cray')
-rw-r--r--gmp/mpn/cray/README31
-rw-r--r--gmp/mpn/cray/add_n.c25
-rw-r--r--gmp/mpn/cray/cfp/addmul_1.c25
-rw-r--r--gmp/mpn/cray/cfp/mul_1.c25
-rw-r--r--gmp/mpn/cray/cfp/mulwwc90.s45
-rw-r--r--gmp/mpn/cray/cfp/mulwwj90.s45
-rw-r--r--gmp/mpn/cray/cfp/submul_1.c25
-rw-r--r--gmp/mpn/cray/gmp-mparam.h38
-rw-r--r--gmp/mpn/cray/hamdist.c25
-rw-r--r--gmp/mpn/cray/ieee/addmul_1.c27
-rw-r--r--gmp/mpn/cray/ieee/gmp-mparam.h39
-rw-r--r--gmp/mpn/cray/ieee/invert_limb.c31
-rw-r--r--gmp/mpn/cray/ieee/mul_1.c25
-rw-r--r--gmp/mpn/cray/ieee/mul_basecase.c25
-rw-r--r--gmp/mpn/cray/ieee/sqr_basecase.c25
-rw-r--r--gmp/mpn/cray/ieee/submul_1.c27
-rw-r--r--gmp/mpn/cray/lshift.c27
-rw-r--r--gmp/mpn/cray/mulww.f55
-rw-r--r--gmp/mpn/cray/popcount.c25
-rw-r--r--gmp/mpn/cray/rshift.c27
-rw-r--r--gmp/mpn/cray/sub_n.c25
21 files changed, 206 insertions, 436 deletions
diff --git a/gmp/mpn/cray/README b/gmp/mpn/cray/README
index 3a347d2805..ab3b032706 100644
--- a/gmp/mpn/cray/README
+++ b/gmp/mpn/cray/README
@@ -1,30 +1,19 @@
-Copyright 2000-2002 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/.
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
@@ -45,7 +34,7 @@ systems with cfp floating point, the main obstacle is the forming of
128-bit products. For IEEE systems, adding, and in particular
computing carry is the main issue. There are no vectorizing
unsigned-less-than instructions, and the sequence that implement that
-operation is very long.
+opetration is very long.
Shifting is the only operation that is simple to make fast. All Cray
systems have a bitblt instructions (Vi Vj,Vj<Ak and Vi Vj,Vj>Ak) that
@@ -118,4 +107,4 @@ down to 2.5 cycles/limb and mpn_addmul_1 times to 4 cycles/limb. By
storing even fewer bits per limb, perhaps 56, it would be possible to
write a mul_mul_basecase that would run at effectively 1 cycle/limb.
(Use VM here to better handle the romb-shaped multiply area, perhaps
-rounding operand sizes up to the next power of 2.)
+rouding operand sizes up to the next power of 2.)
diff --git a/gmp/mpn/cray/add_n.c b/gmp/mpn/cray/add_n.c
index 65b53bf87a..e4f8a0da9b 100644
--- a/gmp/mpn/cray/add_n.c
+++ b/gmp/mpn/cray/add_n.c
@@ -6,28 +6,17 @@ Copyright 1996, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This code runs at 4 cycles/limb. It may be possible to bring it down
to 3 cycles/limb. */
diff --git a/gmp/mpn/cray/cfp/addmul_1.c b/gmp/mpn/cray/cfp/addmul_1.c
index e1d52e4a5f..c981b3d3a8 100644
--- a/gmp/mpn/cray/cfp/addmul_1.c
+++ b/gmp/mpn/cray/cfp/addmul_1.c
@@ -5,28 +5,17 @@ Copyright 1996, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
diff --git a/gmp/mpn/cray/cfp/mul_1.c b/gmp/mpn/cray/cfp/mul_1.c
index 611a9d2532..5038e93fef 100644
--- a/gmp/mpn/cray/cfp/mul_1.c
+++ b/gmp/mpn/cray/cfp/mul_1.c
@@ -5,28 +5,17 @@ Copyright 1996, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
diff --git a/gmp/mpn/cray/cfp/mulwwc90.s b/gmp/mpn/cray/cfp/mulwwc90.s
index 71d2285fd7..3234913c10 100644
--- a/gmp/mpn/cray/cfp/mulwwc90.s
+++ b/gmp/mpn/cray/cfp/mulwwc90.s
@@ -1,33 +1,22 @@
-* Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
+* Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
-* Copyright 1996, 2000 Free Software Foundation, Inc.
-* This file is generated from mulww.f in this same directory.
+* Copyright 1996, 2000 Free Software Foundation, Inc.
+* This file is generated from mulww.f in this same directory.
-* 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/.
+* 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 3 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. If not, see http://www.gnu.org/licenses/.
IDENT GMPN_MULWW
**********************************************
diff --git a/gmp/mpn/cray/cfp/mulwwj90.s b/gmp/mpn/cray/cfp/mulwwj90.s
index 1c2c7cddbe..94d391c2f9 100644
--- a/gmp/mpn/cray/cfp/mulwwj90.s
+++ b/gmp/mpn/cray/cfp/mulwwj90.s
@@ -1,33 +1,22 @@
-* Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
+* Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
-* Copyright 1996, 2000 Free Software Foundation, Inc.
-* This file is generated from mulww.f in this same directory.
+* Copyright 1996, 2000 Free Software Foundation, Inc.
+* This file is generated from mulww.f in this same directory.
-* 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/.
+* 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 3 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. If not, see http://www.gnu.org/licenses/.
IDENT GMPN_MULWW
**********************************************
diff --git a/gmp/mpn/cray/cfp/submul_1.c b/gmp/mpn/cray/cfp/submul_1.c
index b44c97df45..0507d0ef2e 100644
--- a/gmp/mpn/cray/cfp/submul_1.c
+++ b/gmp/mpn/cray/cfp/submul_1.c
@@ -5,28 +5,17 @@ Copyright 1996, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
diff --git a/gmp/mpn/cray/gmp-mparam.h b/gmp/mpn/cray/gmp-mparam.h
index ea8c25b32e..72dcb627da 100644
--- a/gmp/mpn/cray/gmp-mparam.h
+++ b/gmp/mpn/cray/gmp-mparam.h
@@ -1,35 +1,25 @@
/* Cray T90 CFP gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright 1991, 1993, 1994, 1996, 2000-2004 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002, 2003, 2004 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
-#define GMP_LIMB_BITS 64
-#define GMP_LIMB_BYTES 8
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
#if 0
#define UMUL_TIME 519
@@ -40,11 +30,11 @@ see https://www.gnu.org/licenses/. */
/* Generated by tuneup.c, 2004-02-07, system compiler */
-#define MUL_TOOM22_THRESHOLD 71
-#define MUL_TOOM33_THRESHOLD 131
+#define MUL_KARATSUBA_THRESHOLD 71
+#define MUL_TOOM3_THRESHOLD 131
#define SQR_BASECASE_THRESHOLD 32
-#define SQR_TOOM2_THRESHOLD 199
+#define SQR_KARATSUBA_THRESHOLD 199
#define SQR_TOOM3_THRESHOLD 363
#define DIV_SB_PREINV_THRESHOLD 0 /* (preinv always) */
diff --git a/gmp/mpn/cray/hamdist.c b/gmp/mpn/cray/hamdist.c
index 8eb9ba018c..d80b4d6324 100644
--- a/gmp/mpn/cray/hamdist.c
+++ b/gmp/mpn/cray/hamdist.c
@@ -5,28 +5,17 @@ Copyright 2000 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <intrinsics.h>
#include "gmp.h"
diff --git a/gmp/mpn/cray/ieee/addmul_1.c b/gmp/mpn/cray/ieee/addmul_1.c
index 6318b7c9c2..158a79cba8 100644
--- a/gmp/mpn/cray/ieee/addmul_1.c
+++ b/gmp/mpn/cray/ieee/addmul_1.c
@@ -1,33 +1,22 @@
/* Cray PVP/IEEE mpn_addmul_1 -- multiply a limb vector with a limb and add the
result to a second limb vector.
-Copyright 2000-2002 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This code runs at just under 9 cycles/limb on a T90. That is not perfect,
mainly due to vector register shortage in the main loop. Assembly code
diff --git a/gmp/mpn/cray/ieee/gmp-mparam.h b/gmp/mpn/cray/ieee/gmp-mparam.h
index 1fdc286574..03d655c814 100644
--- a/gmp/mpn/cray/ieee/gmp-mparam.h
+++ b/gmp/mpn/cray/ieee/gmp-mparam.h
@@ -1,44 +1,33 @@
/* Cray T90 IEEE gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright 1991, 1993, 1994, 1996, 2000-2002, 2004 Free Software Foundation,
-Inc.
+Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002, 2004 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
-#define GMP_LIMB_BITS 64
-#define GMP_LIMB_BYTES 8
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
/* Generated by tuneup.c, 2004-02-07, system compiler */
-#define MUL_TOOM22_THRESHOLD 130
-#define MUL_TOOM33_THRESHOLD 260
+#define MUL_KARATSUBA_THRESHOLD 130
+#define MUL_TOOM3_THRESHOLD 260
#define SQR_BASECASE_THRESHOLD 9 /* karatsuba */
-#define SQR_TOOM2_THRESHOLD 0 /* never sqr_basecase */
+#define SQR_KARATSUBA_THRESHOLD 0 /* never sqr_basecase */
#define SQR_TOOM3_THRESHOLD 34
#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */
diff --git a/gmp/mpn/cray/ieee/invert_limb.c b/gmp/mpn/cray/ieee/invert_limb.c
index f951a6e138..e3484a9153 100644
--- a/gmp/mpn/cray/ieee/invert_limb.c
+++ b/gmp/mpn/cray/ieee/invert_limb.c
@@ -5,28 +5,17 @@ Copyright 1991, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -84,14 +73,14 @@ mpn_invert_limb (mp_limb_t d)
mp_limb_t xh, xl;
mp_limb_t zh, zl;
-#if GMP_LIMB_BITS == 32
+#if BITS_PER_MP_LIMB == 32
z = approx_tab[(d >> 23) - 0x100] << 6; /* z < 2^16 */
z2l = z * z; /* z2l < 2^32 */
umul_ppmm (th, tl, z2l, d);
z = (z << 17) - (th << 1);
#endif
-#if GMP_LIMB_BITS == 64
+#if BITS_PER_MP_LIMB == 64
z = approx_tab[(d >> 55) - 0x100] << 6; /* z < 2^16 */
z2l = z * z; /* z2l < 2^32 */
@@ -108,7 +97,7 @@ mpn_invert_limb (mp_limb_t d)
umul_ppmm (xh, xl, z2l, d);
tl += xh;
th += tl < xh;
- th = (th << 2) | (tl >> GMP_LIMB_BITS - 2);
+ th = (th << 2) | (tl >> BITS_PER_MP_LIMB - 2);
tl = tl << 2;
sub_ddmmss (zh, zl, z << 2, 0, th, tl);
diff --git a/gmp/mpn/cray/ieee/mul_1.c b/gmp/mpn/cray/ieee/mul_1.c
index dad09fa8cf..4dc2fd9dec 100644
--- a/gmp/mpn/cray/ieee/mul_1.c
+++ b/gmp/mpn/cray/ieee/mul_1.c
@@ -6,28 +6,17 @@ Copyright 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This code runs at 5 cycles/limb on a T90. That would probably
be hard to improve upon, even with assembly code. */
diff --git a/gmp/mpn/cray/ieee/mul_basecase.c b/gmp/mpn/cray/ieee/mul_basecase.c
index 6dc845dd99..ea32db312e 100644
--- a/gmp/mpn/cray/ieee/mul_basecase.c
+++ b/gmp/mpn/cray/ieee/mul_basecase.c
@@ -5,28 +5,17 @@ Copyright 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* The most critical loop of this code runs at about 5 cycles/limb on a T90.
That is not perfect, mainly due to vector register shortage. */
diff --git a/gmp/mpn/cray/ieee/sqr_basecase.c b/gmp/mpn/cray/ieee/sqr_basecase.c
index 840d3dd260..92a9a0e14f 100644
--- a/gmp/mpn/cray/ieee/sqr_basecase.c
+++ b/gmp/mpn/cray/ieee/sqr_basecase.c
@@ -5,28 +5,17 @@ Copyright 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This is just mpn_mul_basecase with trivial modifications. */
diff --git a/gmp/mpn/cray/ieee/submul_1.c b/gmp/mpn/cray/ieee/submul_1.c
index 27a1939019..4d7a6b47cd 100644
--- a/gmp/mpn/cray/ieee/submul_1.c
+++ b/gmp/mpn/cray/ieee/submul_1.c
@@ -1,33 +1,22 @@
/* Cray PVP/IEEE mpn_submul_1 -- multiply a limb vector with a limb and
subtract the result from a second limb vector.
-Copyright 2000-2002 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This code runs at just under 9 cycles/limb on a T90. That is not perfect,
mainly due to vector register shortage in the main loop. Assembly code
diff --git a/gmp/mpn/cray/lshift.c b/gmp/mpn/cray/lshift.c
index 074f38041a..64302e9d39 100644
--- a/gmp/mpn/cray/lshift.c
+++ b/gmp/mpn/cray/lshift.c
@@ -5,28 +5,17 @@ Copyright (C) 2000 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <intrinsics.h>
#include "gmp.h"
@@ -40,7 +29,7 @@ mpn_lshift (mp_ptr wp, mp_srcptr up, mp_size_t n, unsigned int cnt)
mp_limb_t retval;
sh_1 = cnt;
- sh_2 = GMP_LIMB_BITS - sh_1;
+ sh_2 = BITS_PER_MP_LIMB - sh_1;
retval = up[n - 1] >> sh_2;
#pragma _CRI ivdep
diff --git a/gmp/mpn/cray/mulww.f b/gmp/mpn/cray/mulww.f
index 9bddf05bc9..e0bf96e441 100644
--- a/gmp/mpn/cray/mulww.f
+++ b/gmp/mpn/cray/mulww.f
@@ -1,36 +1,25 @@
-c Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
-
-c Copyright 1996, 2000 Free Software Foundation, Inc.
-
-c This file is part of the GNU MP Library.
-c
-c The GNU MP Library is free software; you can redistribute it and/or modify
-c it under the terms of either:
-c
-c * the GNU Lesser General Public License as published by the Free
-c Software Foundation; either version 3 of the License, or (at your
-c option) any later version.
-c
-c or
-c
-c * the GNU General Public License as published by the Free Software
-c Foundation; either version 2 of the License, or (at your option) any
-c later version.
-c
-c or both in parallel, as here.
-c
-c The GNU MP Library is distributed in the hope that it will be useful, but
-c WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-c or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-c for more details.
-c
-c You should have received copies of the GNU General Public License and the
-c GNU Lesser General Public License along with the GNU MP Library. If not,
-c see https://www.gnu.org/licenses/.
-
-c p1[] = hi(a[]*s); the upper limbs of each product
-c p0[] = low(a[]*s); the corresponding lower limbs
-c n is number of limbs in the vectors
+c Helper for mpn_mul_1, mpn_addmul_1, and mpn_submul_1 for Cray PVP.
+
+c Copyright 1996, 2000 Free Software Foundation, Inc.
+
+c This file is part of the GNU MP Library.
+
+c The GNU MP Library is free software; you can redistribute it and/or
+c modify it under the terms of the GNU Lesser General Public License as
+c published by the Free Software Foundation; either version 3 of the
+c License, or (at your option) any later version.
+
+c The GNU MP Library is distributed in the hope that it will be useful,
+c but WITHOUT ANY WARRANTY; without even the implied warranty of
+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+c Lesser General Public License for more details.
+
+c You should have received a copy of the GNU Lesser General Public License
+c along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
+
+c p1[] = hi(a[]*s); the upper limbs of each product
+c p0[] = low(a[]*s); the corresponding lower limbs
+c n is number of limbs in the vectors
subroutine gmpn_mulww(p1,p0,a,n,s)
integer*8 p1(0:*),p0(0:*),a(0:*),s
diff --git a/gmp/mpn/cray/popcount.c b/gmp/mpn/cray/popcount.c
index 48ddab875e..3abdce85cc 100644
--- a/gmp/mpn/cray/popcount.c
+++ b/gmp/mpn/cray/popcount.c
@@ -5,28 +5,17 @@ Copyright 2000 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <intrinsics.h>
#include "gmp.h"
diff --git a/gmp/mpn/cray/rshift.c b/gmp/mpn/cray/rshift.c
index 424bede9db..6280d2ca7e 100644
--- a/gmp/mpn/cray/rshift.c
+++ b/gmp/mpn/cray/rshift.c
@@ -5,28 +5,17 @@ Copyright (C) 2000 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <intrinsics.h>
#include "gmp.h"
@@ -40,7 +29,7 @@ mpn_rshift (mp_ptr wp, mp_srcptr up, mp_size_t n, unsigned int cnt)
mp_limb_t retval;
sh_1 = cnt;
- sh_2 = GMP_LIMB_BITS - sh_1;
+ sh_2 = BITS_PER_MP_LIMB - sh_1;
retval = up[0] << sh_2;
#pragma _CRI ivdep
diff --git a/gmp/mpn/cray/sub_n.c b/gmp/mpn/cray/sub_n.c
index 0cc9ad1e04..90a5f1b1e8 100644
--- a/gmp/mpn/cray/sub_n.c
+++ b/gmp/mpn/cray/sub_n.c
@@ -6,28 +6,17 @@ Copyright 1996, 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 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.
+it under the terms of 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.
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.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 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/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
/* This code runs at 4 cycles/limb. It may be possible to bring it down
to 3 cycles/limb. */