about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-14 03:59:59 +0000
committerRoland McGrath <roland@gnu.org>2003-03-14 03:59:59 +0000
commitd8a5edc2217214f0b9a1b921b6edc2aa5048fb1e (patch)
treed716f13c28a17b6d31e0f81d023858b320cbf7d6
parent6461e57784358cf4fd261e5e61d064a315aae924 (diff)
downloadglibc-d8a5edc2217214f0b9a1b921b6edc2aa5048fb1e.tar.gz
glibc-d8a5edc2217214f0b9a1b921b6edc2aa5048fb1e.tar.xz
glibc-d8a5edc2217214f0b9a1b921b6edc2aa5048fb1e.zip
* elf/dl-load.c (_dl_map_object_from_fd): Bail if no PT_LOAD phdrs
	found.  Reported by Alexandre Oliva <aoliva@redhat.com>.

2003-03-13  Alexandre Oliva  <aoliva@redhat.com>

	* stdio-common/_itoa.c (_itoa_base_table): Make 64-bit
	literals long long.
	* stdlib/fpioconst.c: Likewise.
	* stdlib/strtod.c: Likewise.

	* sysdeps/mips/add_n.S: Use L macro for local labels.
	* sysdeps/mips/addmul_1.S: Likewise.
	* sysdeps/mips/lshift.S: Likewise.
	* sysdeps/mips/memcpy.S: Likewise.
	* sysdeps/mips/memset.S: Likewise.
	* sysdeps/mips/mul_1.S: Likewise.
	* sysdeps/mips/rshift.S: Likewise.
	* sysdeps/mips/sub_n.S: Likewise.
	* sysdeps/mips/submul_1.S: Likewise.
	* sysdeps/mips/mips64/add_n.S: Likewise.
	* sysdeps/mips/mips64/addmul_1.S: Likewise.
	* sysdeps/mips/mips64/lshift.S: Likewise.
	* sysdeps/mips/mips64/mul_1.S: Likewise.
	* sysdeps/mips/mips64/rshift.S: Likewise.
	* sysdeps/mips/mips64/sub_n.S: Likewise.
	* sysdeps/mips/mips64/submul_1.S: Likewise.
	* sysdeps/unix/mips/sysdep.h: Define L() according to ABI
	conventions.  Define END as in sys/asm.h.
	* sysdeps/unix/mips/sysdep.S: Likewise.
	* sysdeps/unix/mips/wait.S: Likewise.
	* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.

	* sysdeps/ieee754/dbl-64/dbl2mpn.c (__mpn_extract_double):
	Cast shifted values that may be too narrow to mp_limb_t.
	* sysdeps/ieee754/dbl-64/mpn2dbl.c (__mpn_construct_double):
	Likewise.
	* sysdeps/ieee754/flt-32/mpn2flt.c (__mpn_construct_float):
	Likewise.
	* sysdeps/ieee754/ldbl-128/ldbl2mpn.c
	(__mpn_extract_long_double): Likewise.
	* sysdeps/ieee754/ldbl-128/mpn2ldbl.c
	(__mpn_construct_long_double): Likewise.
	* sysdeps/ieee754/ldbl-96/ldbl2mpn.c
	(__mpn_extract_long_double): Likewise.
	* sysdeps/ieee754/ldbl-96/mpn2ldbl.c
	(__mpn_construct_long_double): Likewise.

2003-03-13  Roland McGrath  <roland@redhat.com>
-rw-r--r--ChangeLog49
-rw-r--r--elf/dl-load.c9
-rw-r--r--stdio-common/_itoa.c73
-rw-r--r--stdlib/fpioconst.c312
-rw-r--r--stdlib/strtod.c16
-rw-r--r--sysdeps/ieee754/dbl-64/dbl2mpn.c7
-rw-r--r--sysdeps/ieee754/dbl-64/mpn2dbl.c10
-rw-r--r--sysdeps/ieee754/flt-32/mpn2flt.c4
-rw-r--r--sysdeps/ieee754/ldbl-128/ldbl2mpn.c10
-rw-r--r--sysdeps/ieee754/ldbl-128/mpn2ldbl.c13
-rw-r--r--sysdeps/ieee754/ldbl-96/ldbl2mpn.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/mpn2ldbl.c4
-rw-r--r--sysdeps/mips/add_n.S22
-rw-r--r--sysdeps/mips/addmul_1.S14
-rw-r--r--sysdeps/mips/lshift.S24
-rw-r--r--sysdeps/mips/memcpy.S44
-rw-r--r--sysdeps/mips/memset.S30
-rw-r--r--sysdeps/mips/mips64/add_n.S29
-rw-r--r--sysdeps/mips/mips64/addmul_1.S23
-rw-r--r--sysdeps/mips/mips64/lshift.S29
-rw-r--r--sysdeps/mips/mips64/mul_1.S24
-rw-r--r--sysdeps/mips/mips64/rshift.S29
-rw-r--r--sysdeps/mips/mips64/sub_n.S29
-rw-r--r--sysdeps/mips/mips64/submul_1.S24
-rw-r--r--sysdeps/mips/mul_1.S14
-rw-r--r--sysdeps/mips/rshift.S16
-rw-r--r--sysdeps/mips/sub_n.S24
-rw-r--r--sysdeps/mips/submul_1.S14
-rw-r--r--sysdeps/unix/mips/sysdep.S11
-rw-r--r--sysdeps/unix/mips/sysdep.h19
-rw-r--r--sysdeps/unix/mips/wait.S11
-rw-r--r--sysdeps/unix/sysv/linux/mips/clone.S12
32 files changed, 522 insertions, 431 deletions
diff --git a/ChangeLog b/ChangeLog
index 766e332b71..25e5ba5e88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,54 @@
 2003-03-13  Roland McGrath  <roland@redhat.com>
 
+	* elf/dl-load.c (_dl_map_object_from_fd): Bail if no PT_LOAD phdrs
+	found.  Reported by Alexandre Oliva <aoliva@redhat.com>.
+
+2003-03-13  Alexandre Oliva  <aoliva@redhat.com>
+
+	* stdio-common/_itoa.c (_itoa_base_table): Make 64-bit
+	literals long long.
+	* stdlib/fpioconst.c: Likewise.
+	* stdlib/strtod.c: Likewise.
+
+	* sysdeps/mips/add_n.S: Use L macro for local labels.
+	* sysdeps/mips/addmul_1.S: Likewise.
+	* sysdeps/mips/lshift.S: Likewise.
+	* sysdeps/mips/memcpy.S: Likewise.
+	* sysdeps/mips/memset.S: Likewise.
+	* sysdeps/mips/mul_1.S: Likewise.
+	* sysdeps/mips/rshift.S: Likewise.
+	* sysdeps/mips/sub_n.S: Likewise.
+	* sysdeps/mips/submul_1.S: Likewise.
+	* sysdeps/mips/mips64/add_n.S: Likewise.
+	* sysdeps/mips/mips64/addmul_1.S: Likewise.
+	* sysdeps/mips/mips64/lshift.S: Likewise.
+	* sysdeps/mips/mips64/mul_1.S: Likewise.
+	* sysdeps/mips/mips64/rshift.S: Likewise.
+	* sysdeps/mips/mips64/sub_n.S: Likewise.
+	* sysdeps/mips/mips64/submul_1.S: Likewise.
+	* sysdeps/unix/mips/sysdep.h: Define L() according to ABI
+	conventions.  Define END as in sys/asm.h.
+	* sysdeps/unix/mips/sysdep.S: Likewise.
+	* sysdeps/unix/mips/wait.S: Likewise.
+	* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
+
+	* sysdeps/ieee754/dbl-64/dbl2mpn.c (__mpn_extract_double):
+	Cast shifted values that may be too narrow to mp_limb_t.
+	* sysdeps/ieee754/dbl-64/mpn2dbl.c (__mpn_construct_double):
+	Likewise.
+	* sysdeps/ieee754/flt-32/mpn2flt.c (__mpn_construct_float):
+	Likewise.
+	* sysdeps/ieee754/ldbl-128/ldbl2mpn.c
+	(__mpn_extract_long_double): Likewise.
+	* sysdeps/ieee754/ldbl-128/mpn2ldbl.c
+	(__mpn_construct_long_double): Likewise.
+	* sysdeps/ieee754/ldbl-96/ldbl2mpn.c
+	(__mpn_extract_long_double): Likewise.
+	* sysdeps/ieee754/ldbl-96/mpn2ldbl.c
+	(__mpn_construct_long_double): Likewise.
+
+2003-03-13  Roland McGrath  <roland@redhat.com>
+
 	* elf/Makefile ($(objpfx)librtld.mk): Tweak regexp so that one-line
 	entries in the map file match too.
 
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 12134d914c..bc0f942c37 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1028,6 +1028,15 @@ cannot allocate TLS data structures for initial thread");
 	  break;
 	}
 
+    if (__builtin_expect (nloadcmds == 0, 0))
+      {
+	/* This only happens for a bogus object that will be caught with
+	   another error below.  But we don't want to go through the
+	   calculations below using NLOADCMDS - 1.  */
+	errstring = N_("object file has no loadable segments");
+	goto call_lose;
+      }
+
     /* Now process the load commands and map segments into memory.  */
     c = loadcmds;
 
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 2d0535ff17..7bc6c08115 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -1,5 +1,6 @@
 /* Internal function for converting integers to ASCII.
-   Copyright (C) 1994,1995,1996,1999,2000,2002 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1999, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Torbjorn Granlund <tege@matematik.su.se>
    and Ulrich Drepper <drepper@gnu.org>.
@@ -81,41 +82,41 @@ struct base_table_t
 const struct base_table_t _itoa_base_table[] attribute_hidden =
 {
 #if BITS_PER_MP_LIMB == 64
-  /*  2 */ {SEL1(0ul) 1, 1},
-  /*  3 */ {SEL1(0xaaaaaaaaaaaaaaabul) 0, 1},
-  /*  4 */ {SEL1(0ul) 1, 2},
-  /*  5 */ {SEL1(0xcccccccccccccccdul) 0, 2},
-  /*  6 */ {SEL1(0xaaaaaaaaaaaaaaabul) 0, 2},
-  /*  7 */ {SEL1(0x2492492492492493ul) 1, 3},
-  /*  8 */ {SEL1(0ul) 1, 3},
-  /*  9 */ {SEL1(0xe38e38e38e38e38ful) 0, 3},
-  /* 10 */ {SEL1(0xcccccccccccccccdul) 0, 3},
-  /* 11 */ {SEL1(0x2e8ba2e8ba2e8ba3ul) 0, 1},
-  /* 12 */ {SEL1(0xaaaaaaaaaaaaaaabul) 0, 3},
-  /* 13 */ {SEL1(0x4ec4ec4ec4ec4ec5ul) 0, 2},
-  /* 14 */ {SEL1(0x2492492492492493ul) 1, 4},
-  /* 15 */ {SEL1(0x8888888888888889ul) 0, 3},
-  /* 16 */ {SEL1(0ul) 1, 4},
-  /* 17 */ {SEL1(0xf0f0f0f0f0f0f0f1ul) 0, 4},
-  /* 18 */ {SEL1(0xe38e38e38e38e38ful) 0, 4},
-  /* 19 */ {SEL1(0xd79435e50d79435ful) 0, 4},
-  /* 20 */ {SEL1(0xcccccccccccccccdul) 0, 4},
-  /* 21 */ {SEL1(0x8618618618618619ul) 1, 5},
-  /* 22 */ {SEL1(0x2e8ba2e8ba2e8ba3ul) 0, 2},
-  /* 23 */ {SEL1(0x642c8590b21642c9ul) 1, 5},
-  /* 24 */ {SEL1(0xaaaaaaaaaaaaaaabul) 0, 4},
-  /* 25 */ {SEL1(0x47ae147ae147ae15ul) 1, 5},
-  /* 26 */ {SEL1(0x4ec4ec4ec4ec4ec5ul) 0, 3},
-  /* 27 */ {SEL1(0x97b425ed097b425ful) 0, 4},
-  /* 28 */ {SEL1(0x2492492492492493ul) 1, 5},
-  /* 29 */ {SEL1(0x1a7b9611a7b9611bul) 1, 5},
-  /* 30 */ {SEL1(0x8888888888888889ul) 0, 4},
-  /* 31 */ {SEL1(0x0842108421084211ul) 1, 5},
-  /* 32 */ {SEL1(0ul) 1, 5},
-  /* 33 */ {SEL1(0x0f83e0f83e0f83e1ul) 0, 1},
-  /* 34 */ {SEL1(0xf0f0f0f0f0f0f0f1ul) 0, 5},
-  /* 35 */ {SEL1(0xea0ea0ea0ea0ea0ful) 0, 5},
-  /* 36 */ {SEL1(0xe38e38e38e38e38ful) 0, 5}
+  /*  2 */ {SEL1(0ull) 1, 1},
+  /*  3 */ {SEL1(0xaaaaaaaaaaaaaaabull) 0, 1},
+  /*  4 */ {SEL1(0ull) 1, 2},
+  /*  5 */ {SEL1(0xcccccccccccccccdull) 0, 2},
+  /*  6 */ {SEL1(0xaaaaaaaaaaaaaaabull) 0, 2},
+  /*  7 */ {SEL1(0x2492492492492493ull) 1, 3},
+  /*  8 */ {SEL1(0ull) 1, 3},
+  /*  9 */ {SEL1(0xe38e38e38e38e38full) 0, 3},
+  /* 10 */ {SEL1(0xcccccccccccccccdull) 0, 3},
+  /* 11 */ {SEL1(0x2e8ba2e8ba2e8ba3ull) 0, 1},
+  /* 12 */ {SEL1(0xaaaaaaaaaaaaaaabull) 0, 3},
+  /* 13 */ {SEL1(0x4ec4ec4ec4ec4ec5ull) 0, 2},
+  /* 14 */ {SEL1(0x2492492492492493ull) 1, 4},
+  /* 15 */ {SEL1(0x8888888888888889ull) 0, 3},
+  /* 16 */ {SEL1(0ull) 1, 4},
+  /* 17 */ {SEL1(0xf0f0f0f0f0f0f0f1ull) 0, 4},
+  /* 18 */ {SEL1(0xe38e38e38e38e38full) 0, 4},
+  /* 19 */ {SEL1(0xd79435e50d79435full) 0, 4},
+  /* 20 */ {SEL1(0xcccccccccccccccdull) 0, 4},
+  /* 21 */ {SEL1(0x8618618618618619ull) 1, 5},
+  /* 22 */ {SEL1(0x2e8ba2e8ba2e8ba3ull) 0, 2},
+  /* 23 */ {SEL1(0x642c8590b21642c9ull) 1, 5},
+  /* 24 */ {SEL1(0xaaaaaaaaaaaaaaabull) 0, 4},
+  /* 25 */ {SEL1(0x47ae147ae147ae15ull) 1, 5},
+  /* 26 */ {SEL1(0x4ec4ec4ec4ec4ec5ull) 0, 3},
+  /* 27 */ {SEL1(0x97b425ed097b425full) 0, 4},
+  /* 28 */ {SEL1(0x2492492492492493ull) 1, 5},
+  /* 29 */ {SEL1(0x1a7b9611a7b9611bull) 1, 5},
+  /* 30 */ {SEL1(0x8888888888888889ull) 0, 4},
+  /* 31 */ {SEL1(0x0842108421084211ull) 1, 5},
+  /* 32 */ {SEL1(0ull) 1, 5},
+  /* 33 */ {SEL1(0x0f83e0f83e0f83e1ull) 0, 1},
+  /* 34 */ {SEL1(0xf0f0f0f0f0f0f0f1ull) 0, 5},
+  /* 35 */ {SEL1(0xea0ea0ea0ea0ea0full) 0, 5},
+  /* 36 */ {SEL1(0xe38e38e38e38e38full) 0, 5}
 #endif
 #if BITS_PER_MP_LIMB == 32
   /*  2 */ {SEL1(0ul) 1, 1, {0, 31, 0x80000000ul SEL2(0xfffffffful)}},
diff --git a/stdlib/fpioconst.c b/stdlib/fpioconst.c
index f0f25233fc..931386db06 100644
--- a/stdlib/fpioconst.c
+++ b/stdlib/fpioconst.c
@@ -1,5 +1,6 @@
 /* Table of MP integer constants 10^(2^i), used for floating point <-> decimal.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -235,195 +236,198 @@ const mp_limb_t __tens[] =
 {
 #define TENS_P0_IDX	0
 #define TENS_P0_SIZE	2
-  [TENS_P0_IDX] = 0x0000000000000000, 0x000000000000000a,
+  [TENS_P0_IDX] = 0x0000000000000000ull, 0x000000000000000aull,
 
 #define TENS_P1_IDX	(TENS_P0_IDX + TENS_P0_SIZE)
 #define TENS_P1_SIZE	2
-  [TENS_P1_IDX] = 0x0000000000000000, 0x0000000000000064,
+  [TENS_P1_IDX] = 0x0000000000000000ull, 0x0000000000000064ull,
 
 #define TENS_P2_IDX	(TENS_P1_IDX + TENS_P1_SIZE)
 #define TENS_P2_SIZE	2
-  [TENS_P2_IDX] = 0x0000000000000000, 0x0000000000002710,
+  [TENS_P2_IDX] = 0x0000000000000000ull, 0x0000000000002710ull,
 
 #define TENS_P3_IDX	(TENS_P2_IDX + TENS_P2_SIZE)
 #define TENS_P3_SIZE	2
-  [TENS_P3_IDX] = 0x0000000000000000, 0x0000000005f5e100,
+  [TENS_P3_IDX] = 0x0000000000000000ull, 0x0000000005f5e100ull,
 
 #define TENS_P4_IDX	(TENS_P3_IDX + TENS_P3_SIZE)
 #define TENS_P4_SIZE	2
-  [TENS_P4_IDX] = 0x0000000000000000, 0x002386f26fc10000,
+  [TENS_P4_IDX] = 0x0000000000000000ull, 0x002386f26fc10000ull,
 
 #define TENS_P5_IDX	(TENS_P4_IDX + TENS_P4_SIZE)
 #define TENS_P5_SIZE	3
-  [TENS_P5_IDX] = 0x0000000000000000, 0x85acef8100000000, 0x000004ee2d6d415b,
+  [TENS_P5_IDX] = 0x0000000000000000ull, 0x85acef8100000000ull,
+  0x000004ee2d6d415bull,
 
 #define TENS_P6_IDX	(TENS_P5_IDX + TENS_P5_SIZE)
 #define TENS_P6_SIZE	5
-  [TENS_P6_IDX] = 0x0000000000000000, 0x0000000000000000, 0x6e38ed64bf6a1f01,
-  0xe93ff9f4daa797ed, 0x0000000000184f03,
+  [TENS_P6_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x6e38ed64bf6a1f01ull, 0xe93ff9f4daa797edull, 0x0000000000184f03ull,
 
 #define TENS_P7_IDX	(TENS_P6_IDX + TENS_P6_SIZE)
 #define TENS_P7_SIZE	8
-  [TENS_P7_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x03df99092e953e01, 0x2374e42f0f1538fd, 0xc404dc08d3cff5ec,
-  0xa6337f19bccdb0da, 0x0000024ee91f2603,
+  [TENS_P7_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x03df99092e953e01ull, 0x2374e42f0f1538fdull,
+  0xc404dc08d3cff5ecull, 0xa6337f19bccdb0daull, 0x0000024ee91f2603ull,
 
 #define TENS_P8_IDX	(TENS_P7_IDX + TENS_P7_SIZE)
 #define TENS_P8_SIZE	15
-  [TENS_P8_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0xbed3875b982e7c01,
-  0x12152f87d8d99f72, 0xcf4a6e706bde50c6, 0x26b2716ed595d80f,
-  0x1d153624adc666b0, 0x63ff540e3c42d35a, 0x65f9ef17cc5573c0,
-  0x80dcc7f755bc28f2, 0x5fdcefcef46eeddc, 0x00000000000553f7,
+  [TENS_P8_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0xbed3875b982e7c01ull, 0x12152f87d8d99f72ull, 0xcf4a6e706bde50c6ull,
+  0x26b2716ed595d80full, 0x1d153624adc666b0ull, 0x63ff540e3c42d35aull,
+  0x65f9ef17cc5573c0ull, 0x80dcc7f755bc28f2ull, 0x5fdcefcef46eeddcull,
+  0x00000000000553f7ull,
 #ifndef __NO_LONG_DOUBLE_MATH
 # define TENS_P9_IDX	(TENS_P8_IDX + TENS_P8_SIZE)
 # define TENS_P9_SIZE	28
-  [TENS_P9_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x77f27267fc6cf801, 0x5d96976f8f9546dc, 0xc31e1ad9b83a8a97,
-  0x94e6574746c40513, 0x4475b579c88976c1, 0xaa1da1bf28f8733b,
-  0x1e25cfea703ed321, 0xbc51fb2eb21a2f22, 0xbfa3edac96e14f5d,
-  0xe7fc7153329c57ae, 0x85a91924c3fc0695, 0xb2908ee0f95f635e,
-  0x1366732a93abade4, 0x69be5b0e9449775c, 0xb099bc817343afac,
-  0xa269974845a71d46, 0x8a0b1f138cb07303, 0xc1d238d98cab8a97,
-  0x0000001c633415d4,
+  [TENS_P9_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x77f27267fc6cf801ull, 0x5d96976f8f9546dcull,
+  0xc31e1ad9b83a8a97ull, 0x94e6574746c40513ull, 0x4475b579c88976c1ull,
+  0xaa1da1bf28f8733bull, 0x1e25cfea703ed321ull, 0xbc51fb2eb21a2f22ull,
+  0xbfa3edac96e14f5dull, 0xe7fc7153329c57aeull, 0x85a91924c3fc0695ull,
+  0xb2908ee0f95f635eull, 0x1366732a93abade4ull, 0x69be5b0e9449775cull,
+  0xb099bc817343afacull, 0xa269974845a71d46ull, 0x8a0b1f138cb07303ull,
+  0xc1d238d98cab8a97ull, 0x0000001c633415d4ull,
 
 # define TENS_P10_IDX	(TENS_P9_IDX + TENS_P9_SIZE)
 # define TENS_P10_SIZE	55
-  [TENS_P10_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0xf55b2b722919f001,
-  0x1ec29f866e7c215b, 0x15c51a88991c4e87, 0x4c7d1e1a140ac535,
-  0x0ed1440ecc2cd819, 0x7de16cfb896634ee, 0x9fce837d1e43f61f,
-  0x233e55c7231d2b9c, 0xf451218b65dc60d7, 0xc96359861c5cd134,
-  0xa7e89431922bbb9f, 0x62be695a9f9f2a07, 0x045b7a748e1042c4,
-  0x8ad822a51abe1de3, 0xd814b505ba34c411, 0x8fc51a16bf3fdeb3,
-  0xf56deeecb1b896bc, 0xb6f4654b31fb6bfd, 0x6b7595fb101a3616,
-  0x80d98089dc1a47fe, 0x9a20288280bda5a5, 0xfc8f1f9031eb0f66,
-  0xe26a7b7e976a3310, 0x3ce3a0b8df68368a, 0x75a351a28e4262ce,
-  0x445975836cb0b6c9, 0xc356e38a31b5653f, 0x0190fba035faaba6,
-  0x88bc491b9fc4ed52, 0x005b80411640114a, 0x1e8d4649f4f3235e,
-  0x73c5534936a8de06, 0xc1a6970ca7e6bd2a, 0xd2db49ef47187094,
-  0xae6209d4926c3f5b, 0x34f4a3c62d433949, 0xd9d61a05d4305d94,
-  0x0000000000000325,
+  [TENS_P10_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0xf55b2b722919f001ull, 0x1ec29f866e7c215bull, 0x15c51a88991c4e87ull,
+  0x4c7d1e1a140ac535ull, 0x0ed1440ecc2cd819ull, 0x7de16cfb896634eeull,
+  0x9fce837d1e43f61full, 0x233e55c7231d2b9cull, 0xf451218b65dc60d7ull,
+  0xc96359861c5cd134ull, 0xa7e89431922bbb9full, 0x62be695a9f9f2a07ull,
+  0x045b7a748e1042c4ull, 0x8ad822a51abe1de3ull, 0xd814b505ba34c411ull,
+  0x8fc51a16bf3fdeb3ull, 0xf56deeecb1b896bcull, 0xb6f4654b31fb6bfdull,
+  0x6b7595fb101a3616ull, 0x80d98089dc1a47feull, 0x9a20288280bda5a5ull,
+  0xfc8f1f9031eb0f66ull, 0xe26a7b7e976a3310ull, 0x3ce3a0b8df68368aull,
+  0x75a351a28e4262ceull, 0x445975836cb0b6c9ull, 0xc356e38a31b5653full,
+  0x0190fba035faaba6ull, 0x88bc491b9fc4ed52ull, 0x005b80411640114aull,
+  0x1e8d4649f4f3235eull, 0x73c5534936a8de06ull, 0xc1a6970ca7e6bd2aull,
+  0xd2db49ef47187094ull, 0xae6209d4926c3f5bull, 0x34f4a3c62d433949ull,
+  0xd9d61a05d4305d94ull, 0x0000000000000325ull,
 
 # define TENS_P11_IDX	(TENS_P10_IDX + TENS_P10_SIZE)
 # define TENS_P11_SIZE	108
-  [TENS_P11_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0xe30968651333e001, 0x49e28dcfb27d4d3f, 0xee87e354ec2e4721,
-  0x368b8abbb6067584, 0x2ed56d55a5e5a191, 0xea50d142fd827773,
-  0x98342c9e51b78db2, 0x866ed6f1c850dabc, 0x9279498719342c12,
-  0x66912e4ad2f869c2, 0x57a7842d71c7fd8f, 0xfb7fedcc235552eb,
-  0x38209ce1f3861ce0, 0x34c101349713b449, 0xa7a8289c8c6c54de,
-  0xe3cb64f32dbb6643, 0xe3892ee98074ff01, 0xa8f16f9210c17f94,
-  0x967abbb3a8281ed6, 0x9952fbed5a151440, 0xafe609c313b41e44,
-  0xf111821fa2bca416, 0x91bac974fb1264b4, 0x8e48ff35d6c7d6ab,
-  0xc4a656654419bd43, 0x33554c36685e5510, 0x0dbd21feab498697,
-  0x982da4663cfe491d, 0x9e110c7bcbea4ca7, 0x5fc5a04779c56b8a,
-  0x1aa9f44484d80e2e, 0x6a57b1ab730f203c, 0x87a7dc62d752f7a6,
-  0x40660460944545ff, 0xc9ac375d77c1a42f, 0x744695f0e866d7ef,
-  0xa1fc6b9681428c85, 0x7bf03c19d7917c7b, 0x5715f7915b33eb41,
-  0xdb0708fd8f6cae5f, 0x785ce6b7b125ac8e, 0x6f46eadb56c6815b,
-  0x195355d84eeebeee, 0x9d7389c0a244de3c, 0xcf99d01953761abd,
-  0x0d76ce39de9ec24b, 0x2e55ecee70beb181, 0xf56d9d4bd5f86079,
-  0x13ef5a83fb8886fb, 0x3f3389a4408f43c5, 0x58ccf45cfad37943,
-  0x415c7f3ef82df846, 0x8b3d5cf42915e818, 0xf8dbb57a6a445f27,
-  0x8ad803ecca8f0070, 0x038f9245b2e87c34, 0xc7c9dee0bedd8a6c,
-  0x2ad3fa140eac7d56, 0xf775677ce0de0840, 0x92be221ef1bd0ad5,
-  0xce9d04a487fa1fb9, 0x3f6f7024d2c36fa9, 0x907855eeb028af62,
-  0x4efac5dcd83e49d6, 0x77cd8c6be7151aab, 0x0af908b40a753b7d,
-  0xe50f30278c983623, 0x1d08e2d694222771, 0xf2ee5ca6f7e928e6,
-  0x11eb962b1b61b93c, 0xce2bcba19648b21c, 0x7bbebe3034f77154,
-  0x8ce329ace526a319, 0xb5dc53d5de4a74d2, 0x000000000009e8b3,
+  [TENS_P11_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0xe30968651333e001ull, 0x49e28dcfb27d4d3full,
+  0xee87e354ec2e4721ull, 0x368b8abbb6067584ull, 0x2ed56d55a5e5a191ull,
+  0xea50d142fd827773ull, 0x98342c9e51b78db2ull, 0x866ed6f1c850dabcull,
+  0x9279498719342c12ull, 0x66912e4ad2f869c2ull, 0x57a7842d71c7fd8full,
+  0xfb7fedcc235552ebull, 0x38209ce1f3861ce0ull, 0x34c101349713b449ull,
+  0xa7a8289c8c6c54deull, 0xe3cb64f32dbb6643ull, 0xe3892ee98074ff01ull,
+  0xa8f16f9210c17f94ull, 0x967abbb3a8281ed6ull, 0x9952fbed5a151440ull,
+  0xafe609c313b41e44ull, 0xf111821fa2bca416ull, 0x91bac974fb1264b4ull,
+  0x8e48ff35d6c7d6abull, 0xc4a656654419bd43ull, 0x33554c36685e5510ull,
+  0x0dbd21feab498697ull, 0x982da4663cfe491dull, 0x9e110c7bcbea4ca7ull,
+  0x5fc5a04779c56b8aull, 0x1aa9f44484d80e2eull, 0x6a57b1ab730f203cull,
+  0x87a7dc62d752f7a6ull, 0x40660460944545ffull, 0xc9ac375d77c1a42full,
+  0x744695f0e866d7efull, 0xa1fc6b9681428c85ull, 0x7bf03c19d7917c7bull,
+  0x5715f7915b33eb41ull, 0xdb0708fd8f6cae5full, 0x785ce6b7b125ac8eull,
+  0x6f46eadb56c6815bull, 0x195355d84eeebeeeull, 0x9d7389c0a244de3cull,
+  0xcf99d01953761abdull, 0x0d76ce39de9ec24bull, 0x2e55ecee70beb181ull,
+  0xf56d9d4bd5f86079ull, 0x13ef5a83fb8886fbull, 0x3f3389a4408f43c5ull,
+  0x58ccf45cfad37943ull, 0x415c7f3ef82df846ull, 0x8b3d5cf42915e818ull,
+  0xf8dbb57a6a445f27ull, 0x8ad803ecca8f0070ull, 0x038f9245b2e87c34ull,
+  0xc7c9dee0bedd8a6cull, 0x2ad3fa140eac7d56ull, 0xf775677ce0de0840ull,
+  0x92be221ef1bd0ad5ull, 0xce9d04a487fa1fb9ull, 0x3f6f7024d2c36fa9ull,
+  0x907855eeb028af62ull, 0x4efac5dcd83e49d6ull, 0x77cd8c6be7151aabull,
+  0x0af908b40a753b7dull, 0xe50f30278c983623ull, 0x1d08e2d694222771ull,
+  0xf2ee5ca6f7e928e6ull, 0x11eb962b1b61b93cull, 0xce2bcba19648b21cull,
+  0x7bbebe3034f77154ull, 0x8ce329ace526a319ull, 0xb5dc53d5de4a74d2ull,
+  0x000000000009e8b3ull,
 
 # define TENS_P12_IDX	(TENS_P11_IDX + TENS_P11_SIZE)
 # define TENS_P12_SIZE	214
-  [TENS_P12_IDX] = 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
-  0x0000000000000000, 0x0000000000000000, 0xd4724e8d2a67c001,
-  0xf89a1e908efe7ae7, 0x54e05154ef084117, 0x506be82913b1bb51,
-  0xe599574efb29b172, 0x806c0ed3f0da6146, 0x45155e93b86ae5be,
-  0x7e1e7c34c0591cc2, 0x1d1f4cce7c4823da, 0xd6bfdf759b8ba1e8,
-  0xc2dfae78e341be10, 0x0f237f1a016b67b2, 0xaf6a25743dbeabcd,
-  0x142e0e80cab3e6d7, 0x2c23481161959127, 0xcb4bf98287009701,
-  0x88052f8cf8169c84, 0xbc13176168dde6d4, 0x54ab9c41ff0b0905,
-  0x1a1c304e7613b224, 0x441c2d473bfe167b, 0x78f061814f6cea9c,
-  0x30c7ae41eb659fb8, 0xa1ebcad7947e0d0e, 0x2130504dd97d9556,
-  0xf2acd5071a8309cb, 0xfd82373a3f8ec72a, 0x280f4d3295a842bc,
-  0x811a4f04f3618ac0, 0xd3967a1b6dc3a5b4, 0xdcfe388f15b8c898,
-  0x8738b909454eb2a0, 0x2bd9cc1110c4e996, 0x655fec303297cd0c,
-  0xf4090ee8ae0725b1, 0x398c6fed037d19ee, 0xc994a4503b9af26b,
-  0x75a697b2b5341743, 0x3ccb5b92ac50b9c1, 0xa8329761ffe06205,
-  0xeb83cadbdfea5242, 0x3c20ee69e79dadf7, 0x7021b97a1e0a6817,
-  0x176ca776743074fa, 0xeca19beb77fb8af6, 0xaf63b71292baf1de,
-  0xa4eb8f8cde35c88b, 0x40b464a0e137d5e9, 0x42923bbd87d1cde8,
-  0x2e2690f3cd8f62ff, 0x59c89f1b095edc16, 0x5138753d1fa8fd5d,
-  0x80152f18390a2b29, 0xf984d83e2dd8d925, 0xc19e1faf7a872e74,
-  0xecf9b5d0ed4d542d, 0xc53c0adf9462ea75, 0x37a2d4390caea134,
-  0x2181327ec8fa2e8a, 0x2d2408206e7bb827, 0x5893d4b850be10e0,
-  0x1f2b2322ab312bb9, 0xbf627ede440b3f25, 0xb608b89572dac789,
-  0x86deb3f078787e2a, 0xbb9373f46fee7aab, 0xf7d8b57e27ecf57b,
-  0x3d04e8d2fca26a9f, 0x3172826ac9df13cb, 0xa8fcd8e0cd9e8d7c,
-  0x307641d9b2c39497, 0x2608c4cf1cc939c1, 0x3d326a7eb6d1c7bf,
-  0x8e13e25feeaf19e6, 0x2dfe6d97ee63302b, 0xe41d3cc425971d58,
-  0xab8db59a0a80627c, 0xe90afb779eea37c8, 0x9ee3352c90ca19cf,
-  0xfe78d6823613c850, 0x5b060904788f6e50, 0x3fecb534b71bd1a4,
-  0x20c33857b32c450c, 0x0239f4cea6e9cfda, 0xa19adb9548497187,
-  0x95aca6a8b492ed8a, 0xcf1b23504dcd6cd9, 0x1a67778cfbe8b12a,
-  0xc32da38338eb3acc, 0xa03f40a8fb126ab1, 0xe9ce4724ed5bf546,
-  0x73a130d84c4a74fd, 0xa2ebd6c1d9960e2d, 0x6f233b7c94ab6feb,
-  0x8e7b9a7349126080, 0xd298f9994b8c9091, 0xa96ddeff35e836b5,
-  0x6b0dd9bc96119b31, 0x282566fbc6cc3f8d, 0xd6769f3b72b882e7,
-  0x00fc509ba674343d, 0xd6266a3fdcbf7789, 0x4e89541bae9641fd,
-  0x53400d0311953407, 0xe5b533458e0dd75a, 0x108b89bc108f19ad,
-  0xe03b2b6341a4c954, 0x97aced8e437b3d7f, 0x2c5508c2cbd66670,
-  0x5c4f2ef0650ebc69, 0x9985a2df904ff6bf, 0x5ed8d2399faddd9e,
-  0xe3e51cb925585832, 0x56c02d9a0ff4f1d4, 0xc1a08a138c4ef804,
-  0xe6d2767113fd01c8, 0x9d0176cca7c234f4, 0x4d8bfa89d0d73df2,
-  0x2b17e0b2544f10cd, 0xfd86fe49b70a5c7d, 0x214495bbdf373f41,
-  0x00d313d584e857fd, 0xa4ba47440496fcbe, 0xaec29e6ee8cac982,
-  0x7000a51987ec7038, 0xff66e42caeee333b, 0x03b4f63b8afd6b25,
-  0x5ab8d9c7bd7991dc, 0x48741a6c2ed4684e, 0x2fdc6349af06940d,
-  0xe974996fb03d7ecd, 0x52ec8721ac7867f9, 0x8edd2d00bcdd9d4a,
-  0x41c759f83557de06, 0xa75409f23956d4b9, 0xb6100fab123cd8a1,
-  0x2e8d623b3e7b21e2, 0xbca35f7792959da2, 0x35fcb457200c03a5,
-  0xf74eb9281bb6c6e4, 0x87cc1d213d5d0b54, 0x18ae42404964046f,
-  0x8bd2b496d868b275, 0xc234d8f51c5563f4, 0xf9151ffff868e970,
-  0x271133eeae7be4a2, 0x25254932bb0fd922, 0x104bcd64a60a9fc0,
-  0x0000006230290145
+  [TENS_P12_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+  0xd4724e8d2a67c001ull, 0xf89a1e908efe7ae7ull, 0x54e05154ef084117ull,
+  0x506be82913b1bb51ull, 0xe599574efb29b172ull, 0x806c0ed3f0da6146ull,
+  0x45155e93b86ae5beull, 0x7e1e7c34c0591cc2ull, 0x1d1f4cce7c4823daull,
+  0xd6bfdf759b8ba1e8ull, 0xc2dfae78e341be10ull, 0x0f237f1a016b67b2ull,
+  0xaf6a25743dbeabcdull, 0x142e0e80cab3e6d7ull, 0x2c23481161959127ull,
+  0xcb4bf98287009701ull, 0x88052f8cf8169c84ull, 0xbc13176168dde6d4ull,
+  0x54ab9c41ff0b0905ull, 0x1a1c304e7613b224ull, 0x441c2d473bfe167bull,
+  0x78f061814f6cea9cull, 0x30c7ae41eb659fb8ull, 0xa1ebcad7947e0d0eull,
+  0x2130504dd97d9556ull, 0xf2acd5071a8309cbull, 0xfd82373a3f8ec72aull,
+  0x280f4d3295a842bcull, 0x811a4f04f3618ac0ull, 0xd3967a1b6dc3a5b4ull,
+  0xdcfe388f15b8c898ull, 0x8738b909454eb2a0ull, 0x2bd9cc1110c4e996ull,
+  0x655fec303297cd0cull, 0xf4090ee8ae0725b1ull, 0x398c6fed037d19eeull,
+  0xc994a4503b9af26bull, 0x75a697b2b5341743ull, 0x3ccb5b92ac50b9c1ull,
+  0xa8329761ffe06205ull, 0xeb83cadbdfea5242ull, 0x3c20ee69e79dadf7ull,
+  0x7021b97a1e0a6817ull, 0x176ca776743074faull, 0xeca19beb77fb8af6ull,
+  0xaf63b71292baf1deull, 0xa4eb8f8cde35c88bull, 0x40b464a0e137d5e9ull,
+  0x42923bbd87d1cde8ull, 0x2e2690f3cd8f62ffull, 0x59c89f1b095edc16ull,
+  0x5138753d1fa8fd5dull, 0x80152f18390a2b29ull, 0xf984d83e2dd8d925ull,
+  0xc19e1faf7a872e74ull, 0xecf9b5d0ed4d542dull, 0xc53c0adf9462ea75ull,
+  0x37a2d4390caea134ull, 0x2181327ec8fa2e8aull, 0x2d2408206e7bb827ull,
+  0x5893d4b850be10e0ull, 0x1f2b2322ab312bb9ull, 0xbf627ede440b3f25ull,
+  0xb608b89572dac789ull, 0x86deb3f078787e2aull, 0xbb9373f46fee7aabull,
+  0xf7d8b57e27ecf57bull, 0x3d04e8d2fca26a9full, 0x3172826ac9df13cbull,
+  0xa8fcd8e0cd9e8d7cull, 0x307641d9b2c39497ull, 0x2608c4cf1cc939c1ull,
+  0x3d326a7eb6d1c7bfull, 0x8e13e25feeaf19e6ull, 0x2dfe6d97ee63302bull,
+  0xe41d3cc425971d58ull, 0xab8db59a0a80627cull, 0xe90afb779eea37c8ull,
+  0x9ee3352c90ca19cfull, 0xfe78d6823613c850ull, 0x5b060904788f6e50ull,
+  0x3fecb534b71bd1a4ull, 0x20c33857b32c450cull, 0x0239f4cea6e9cfdaull,
+  0xa19adb9548497187ull, 0x95aca6a8b492ed8aull, 0xcf1b23504dcd6cd9ull,
+  0x1a67778cfbe8b12aull, 0xc32da38338eb3accull, 0xa03f40a8fb126ab1ull,
+  0xe9ce4724ed5bf546ull, 0x73a130d84c4a74fdull, 0xa2ebd6c1d9960e2dull,
+  0x6f233b7c94ab6febull, 0x8e7b9a7349126080ull, 0xd298f9994b8c9091ull,
+  0xa96ddeff35e836b5ull, 0x6b0dd9bc96119b31ull, 0x282566fbc6cc3f8dull,
+  0xd6769f3b72b882e7ull, 0x00fc509ba674343dull, 0xd6266a3fdcbf7789ull,
+  0x4e89541bae9641fdull, 0x53400d0311953407ull, 0xe5b533458e0dd75aull,
+  0x108b89bc108f19adull, 0xe03b2b6341a4c954ull, 0x97aced8e437b3d7full,
+  0x2c5508c2cbd66670ull, 0x5c4f2ef0650ebc69ull, 0x9985a2df904ff6bfull,
+  0x5ed8d2399faddd9eull, 0xe3e51cb925585832ull, 0x56c02d9a0ff4f1d4ull,
+  0xc1a08a138c4ef804ull, 0xe6d2767113fd01c8ull, 0x9d0176cca7c234f4ull,
+  0x4d8bfa89d0d73df2ull, 0x2b17e0b2544f10cdull, 0xfd86fe49b70a5c7dull,
+  0x214495bbdf373f41ull, 0x00d313d584e857fdull, 0xa4ba47440496fcbeull,
+  0xaec29e6ee8cac982ull, 0x7000a51987ec7038ull, 0xff66e42caeee333bull,
+  0x03b4f63b8afd6b25ull, 0x5ab8d9c7bd7991dcull, 0x48741a6c2ed4684eull,
+  0x2fdc6349af06940dull, 0xe974996fb03d7ecdull, 0x52ec8721ac7867f9ull,
+  0x8edd2d00bcdd9d4aull, 0x41c759f83557de06ull, 0xa75409f23956d4b9ull,
+  0xb6100fab123cd8a1ull, 0x2e8d623b3e7b21e2ull, 0xbca35f7792959da2ull,
+  0x35fcb457200c03a5ull, 0xf74eb9281bb6c6e4ull, 0x87cc1d213d5d0b54ull,
+  0x18ae42404964046full, 0x8bd2b496d868b275ull, 0xc234d8f51c5563f4ull,
+  0xf9151ffff868e970ull, 0x271133eeae7be4a2ull, 0x25254932bb0fd922ull,
+  0x104bcd64a60a9fc0ull, 0x0000006230290145ull
 #endif
 };
 
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 94b1c5d7f2..ef74b3d9f5 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -157,7 +157,7 @@ extern FLOAT MPN2FLOAT (mp_srcptr mpn, int exponent, int negative);
 #  define MAX_FAC_PER_LIMB	1000000000UL
 #elif	BITS_PER_MP_LIMB == 64
 #  define MAX_DIG_PER_LIMB	19
-#  define MAX_FAC_PER_LIMB	10000000000000000000UL
+#  define MAX_FAC_PER_LIMB	10000000000000000000ULL
 #else
 #  error "mp_limb_t size " BITS_PER_MP_LIMB "not accounted for"
 #endif
@@ -166,14 +166,14 @@ extern FLOAT MPN2FLOAT (mp_srcptr mpn, int exponent, int negative);
 /* Local data structure.  */
 static const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1] =
 {    0,                   10,                   100,
-     1000,                10000,                100000,
-     1000000,             10000000,             100000000,
-     1000000000
+     1000,                10000,                100000L,
+     1000000L,            10000000L,            100000000L,
+     1000000000L
 #if BITS_PER_MP_LIMB > 32
-	       ,	   10000000000U,          100000000000U,
-     1000000000000U,       10000000000000U,       100000000000000U,
-     1000000000000000U,    10000000000000000U,    100000000000000000U,
-     1000000000000000000U, 10000000000000000000U
+	        ,	  10000000000ULL,       100000000000ULL,
+     1000000000000ULL,    10000000000000ULL,    100000000000000ULL,
+     1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL,
+     1000000000000000000ULL, 10000000000000000000ULL
 #endif
 #if BITS_PER_MP_LIMB > 64
   #error "Need to expand tens_in_limb table to" MAX_DIG_PER_LIMB
diff --git a/sysdeps/ieee754/dbl-64/dbl2mpn.c b/sysdeps/ieee754/dbl-64/dbl2mpn.c
index 4f712a4dff..d04c0e183e 100644
--- a/sysdeps/ieee754/dbl-64/dbl2mpn.c
+++ b/sysdeps/ieee754/dbl-64/dbl2mpn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1994,1995,1996,1997,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@ __mpn_extract_double (mp_ptr res_ptr, mp_size_t size,
 #elif BITS_PER_MP_LIMB == 64
   /* Hopefully the compiler will combine the two bitfield extracts
      and this composition into just the original quadword extract.  */
-  res_ptr[0] = ((unsigned long int) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
+  res_ptr[0] = ((mp_limb_t) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
   #define N 1
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
@@ -101,7 +101,8 @@ __mpn_extract_double (mp_ptr res_ptr, mp_size_t size,
     }
   else
     /* Add the implicit leading one bit for a normalized number.  */
-    res_ptr[N - 1] |= 1L << (DBL_MANT_DIG - 1 - ((N - 1) * BITS_PER_MP_LIMB));
+    res_ptr[N - 1] |= (mp_limb_t) 1 << (DBL_MANT_DIG - 1
+					- ((N - 1) * BITS_PER_MP_LIMB));
 
   return N;
 }
diff --git a/sysdeps/ieee754/dbl-64/mpn2dbl.c b/sysdeps/ieee754/dbl-64/mpn2dbl.c
index 4c83a484ec..2af3092cee 100644
--- a/sysdeps/ieee754/dbl-64/mpn2dbl.c
+++ b/sysdeps/ieee754/dbl-64/mpn2dbl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -34,10 +34,12 @@ __mpn_construct_double (mp_srcptr frac_ptr, int expt, int negative)
   u.ieee.exponent = expt + IEEE754_DOUBLE_BIAS;
 #if BITS_PER_MP_LIMB == 32
   u.ieee.mantissa1 = frac_ptr[0];
-  u.ieee.mantissa0 = frac_ptr[1] & ((1 << (DBL_MANT_DIG - 32)) - 1);
+  u.ieee.mantissa0 = frac_ptr[1] & (((mp_limb_t) 1
+				     << (DBL_MANT_DIG - 32)) - 1);
 #elif BITS_PER_MP_LIMB == 64
-  u.ieee.mantissa1 = frac_ptr[0] & ((1L << 32) - 1);
-  u.ieee.mantissa0 = (frac_ptr[0] >> 32) & ((1 << (DBL_MANT_DIG - 32)) - 1);
+  u.ieee.mantissa1 = frac_ptr[0] & (((mp_limb_t) 1 << 32) - 1);
+  u.ieee.mantissa0 = (frac_ptr[0] >> 32) & (((mp_limb_t) 1
+					     << (DBL_MANT_DIG - 32)) - 1);
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
 #endif
diff --git a/sysdeps/ieee754/flt-32/mpn2flt.c b/sysdeps/ieee754/flt-32/mpn2flt.c
index 4e534666dc..9532770c04 100644
--- a/sysdeps/ieee754/flt-32/mpn2flt.c
+++ b/sysdeps/ieee754/flt-32/mpn2flt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ __mpn_construct_float (mp_srcptr frac_ptr, int expt, int sign)
   u.ieee.negative = sign;
   u.ieee.exponent = expt + IEEE754_FLOAT_BIAS;
 #if BITS_PER_MP_LIMB > FLT_MANT_DIG
-  u.ieee.mantissa = frac_ptr[0] & ((1 << FLT_MANT_DIG) - 1);
+  u.ieee.mantissa = frac_ptr[0] & (((mp_limb_t) 1 << FLT_MANT_DIG) - 1);
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
 #endif
diff --git a/sysdeps/ieee754/ldbl-128/ldbl2mpn.c b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
index cdd09db69f..a49fac6742 100644
--- a/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2002,2003
+	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -49,8 +50,8 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 #elif BITS_PER_MP_LIMB == 64
   /* Hopefully the compiler will combine the two bitfield extracts
      and this composition into just the original quadword extract.  */
-  res_ptr[0] = ((unsigned long int) u.ieee.mantissa2 << 32) | u.ieee.mantissa3;
-  res_ptr[1] = ((unsigned long int) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
+  res_ptr[0] = ((mp_limb_t) u.ieee.mantissa2 << 32) | u.ieee.mantissa3;
+  res_ptr[1] = ((mp_limb_t) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
   #define N 2
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
@@ -133,7 +134,8 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
     }
   else
     /* Add the implicit leading one bit for a normalized number.  */
-    res_ptr[N - 1] |= 1L << (LDBL_MANT_DIG - 1 - ((N - 1) * BITS_PER_MP_LIMB));
+    res_ptr[N - 1] |= (mp_limb_t) 1 << (LDBL_MANT_DIG - 1
+					- ((N - 1) * BITS_PER_MP_LIMB));
 
   return N;
 }
diff --git a/sysdeps/ieee754/ldbl-128/mpn2ldbl.c b/sysdeps/ieee754/ldbl-128/mpn2ldbl.c
index 31403d3ca2..37e2817dbc 100644
--- a/sysdeps/ieee754/ldbl-128/mpn2ldbl.c
+++ b/sysdeps/ieee754/ldbl-128/mpn2ldbl.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2002,2003
+	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,12 +38,14 @@ __mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int sign)
   u.ieee.mantissa3 = frac_ptr[0];
   u.ieee.mantissa2 = frac_ptr[1];
   u.ieee.mantissa1 = frac_ptr[2];
-  u.ieee.mantissa0 = frac_ptr[3] & ((1 << (LDBL_MANT_DIG - 96)) - 1);
+  u.ieee.mantissa0 = frac_ptr[3] & (((mp_limb_t) 1
+				     << (LDBL_MANT_DIG - 96)) - 1);
 #elif BITS_PER_MP_LIMB == 64
-  u.ieee.mantissa3 = frac_ptr[0] & ((1L << 32) - 1);
+  u.ieee.mantissa3 = frac_ptr[0] & (((mp_limb_t) 1 << 32) - 1);
   u.ieee.mantissa2 = frac_ptr[0] >> 32;
-  u.ieee.mantissa1 = frac_ptr[1] & ((1L << 32) - 1);
-  u.ieee.mantissa0 = (frac_ptr[1] >> 32) & ((1 << (LDBL_MANT_DIG - 96)) - 1);
+  u.ieee.mantissa1 = frac_ptr[1] & (((mp_limb_t) 1 << 32) - 1);
+  u.ieee.mantissa0 = (frac_ptr[1] >> 32) & (((mp_limb_t) 1
+					     << (LDBL_MANT_DIG - 96)) - 1);
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
 #endif
diff --git a/sysdeps/ieee754/ldbl-96/ldbl2mpn.c b/sysdeps/ieee754/ldbl-96/ldbl2mpn.c
index ad2ad82f6f..3c3a2325cb 100644
--- a/sysdeps/ieee754/ldbl-96/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-96/ldbl2mpn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 #elif BITS_PER_MP_LIMB == 64
   /* Hopefully the compiler will combine the two bitfield extracts
      and this composition into just the original quadword extract.  */
-  res_ptr[0] = ((unsigned long int) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
+  res_ptr[0] = ((mp_limb_t) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
   #define N 1
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
diff --git a/sysdeps/ieee754/ldbl-96/mpn2ldbl.c b/sysdeps/ieee754/ldbl-96/mpn2ldbl.c
index 7150a31a0b..cad4447d39 100644
--- a/sysdeps/ieee754/ldbl-96/mpn2ldbl.c
+++ b/sysdeps/ieee754/ldbl-96/mpn2ldbl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ __mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int sign)
   u.ieee.mantissa1 = frac_ptr[0];
   u.ieee.mantissa0 = frac_ptr[1];
 #elif BITS_PER_MP_LIMB == 64
-  u.ieee.mantissa1 = frac_ptr[0] & ((1L << 32) - 1);
+  u.ieee.mantissa1 = frac_ptr[0] & (((mp_limb_t) 1 << 32) - 1);
   u.ieee.mantissa0 = frac_ptr[0] >> 32;
 #else
   #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index da7b2d456d..c82871f701 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -1,7 +1,7 @@
 /* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
 store sum in a third limb vector.
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -43,12 +43,12 @@ ENTRY (__mpn_add_n)
 
 	addiu	$7,$7,-1
 	and	$9,$7,4-1	/* number of limbs in first loop */
-	beq	$9,$0,.L0	/* if multiple of 4 limbs, skip first loop */
+	beq	$9,$0,L(L0)	/* if multiple of 4 limbs, skip first loop */
 	move	$2,$0
 
 	subu	$7,$7,$9
 
-.Loop0:	addiu	$9,$9,-1
+L(Loop0):	addiu	$9,$9,-1
 	lw	$12,4($5)
 	addu	$11,$11,$2
 	lw	$13,4($6)
@@ -62,13 +62,13 @@ ENTRY (__mpn_add_n)
 	addiu	$6,$6,4
 	move	$10,$12
 	move	$11,$13
-	bne	$9,$0,.Loop0
-	 addiu	$4,$4,4
+	bne	$9,$0,L(Loop0)
+	addiu	$4,$4,4
 
-.L0:	beq	$7,$0,.Lend
-	 nop
+L(L0):	beq	$7,$0,L(end)
+	nop
 
-.Loop:	addiu	$7,$7,-4
+L(Loop):	addiu	$7,$7,-4
 
 	lw	$12,4($5)
 	addu	$11,$11,$2
@@ -109,10 +109,10 @@ ENTRY (__mpn_add_n)
 	addiu	$5,$5,16
 	addiu	$6,$6,16
 
-	bne	$7,$0,.Loop
-	 addiu	$4,$4,16
+	bne	$7,$0,L(Loop)
+	addiu	$4,$4,16
 
-.Lend:	addu	$11,$11,$2
+L(end):	addu	$11,$11,$2
 	sltu	$8,$11,$2
 	addu	$11,$10,$11
 	sltu	$2,$11,$10
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
index 32df1d780b..3e1fc09d10 100644
--- a/sysdeps/mips/addmul_1.S
+++ b/sysdeps/mips/addmul_1.S
@@ -1,7 +1,7 @@
 /* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
 add the product to a second limb vector.
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -46,14 +46,14 @@ ENTRY (__mpn_addmul_1)
 	multu	$8,$7
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC0
+	beq	$6,$0,L(LC0)
 	move	$2,$0		/* zero cy2 */
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	lw	$8,0($5)	/* load new s1 limb as early as possible */
 
-Loop:	lw	$10,0($4)
+L(Loop):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addiu	$5,$5,4
@@ -67,11 +67,11 @@ Loop:	lw	$10,0($4)
 	addu	$2,$2,$10
 	sw	$3,0($4)
 	addiu	$4,$4,4
-	bne	$6,$0,Loop	/* should be "bnel" */
+	bne	$6,$0,L(Loop)	/* should be "bnel" */
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 1 */
-$LC1:	lw	$10,0($4)
+L(LC1):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addu	$3,$3,$2
@@ -85,7 +85,7 @@ $LC1:	lw	$10,0($4)
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 0 */
-$LC0:	lw	$10,0($4)
+L(LC0):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addu	$3,$3,$2
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
index b1a858dd9a..0217bfc586 100644
--- a/sysdeps/mips/lshift.S
+++ b/sysdeps/mips/lshift.S
@@ -1,6 +1,6 @@
 /* MIPS2 __mpn_lshift --
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -44,12 +44,12 @@ ENTRY (__mpn_lshift)
 	addu	$4,$4,$2	/* make r4 point at end of res */
 	addiu	$6,$6,-1
 	and	$9,$6,4-1	/* number of limbs in first loop */
-	beq	$9,$0,.L0	/* if multiple of 4 limbs, skip first loop */
-	 srl	$2,$10,$13	/* compute function result */
+	beq	$9,$0,L(L0)	/* if multiple of 4 limbs, skip first loop */
+	srl	$2,$10,$13	/* compute function result */
 
 	subu	$6,$6,$9
 
-.Loop0:	lw	$3,-8($5)
+L(Loop0):	lw	$3,-8($5)
 	addiu	$4,$4,-4
 	addiu	$5,$5,-4
 	addiu	$9,$9,-1
@@ -57,13 +57,13 @@ ENTRY (__mpn_lshift)
 	srl	$12,$3,$13
 	move	$10,$3
 	or	$8,$11,$12
-	bne	$9,$0,.Loop0
-	 sw	$8,0($4)
+	bne	$9,$0,L(Loop0)
+	sw	$8,0($4)
 
-.L0:	beq	$6,$0,.Lend
-	 nop
+L(L0):	beq	$6,$0,L(Lend)
+	nop
 
-.Loop:	lw	$3,-8($5)
+L(Loop):	lw	$3,-8($5)
 	addiu	$4,$4,-16
 	addiu	$6,$6,-4
 	sll	$11,$10,$7
@@ -89,10 +89,10 @@ ENTRY (__mpn_lshift)
 
 	addiu	$5,$5,-16
 	or	$8,$14,$9
-	bgtz	$6,.Loop
-	 sw	$8,0($4)
+	bgtz	$6,L(Loop)
+	sw	$8,0($4)
 
-.Lend:	sll	$8,$10,$7
+L(Lend):	sll	$8,$10,$7
 	j	$31
 	sw	$8,-4($4)
 	END (__mpn_lshift)
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 394265eed7..3d49ac976b 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
 
@@ -44,27 +44,27 @@ ENTRY (memcpy)
 	.set	noreorder
 
 	slti	t0, a2, 8		# Less than 8?
-	bne	t0, zero, $last8
+	bne	t0, zero, L(last8)
 	move	v0, a0			# Setup exit value before too late
 
 	xor	t0, a1, a0		# Find a0/a1 displacement
 	andi	t0, 0x3
-	bne	t0, zero, $shift	# Go handle the unaligned case
+	bne	t0, zero, L(shift)	# Go handle the unaligned case
 	subu	t1, zero, a1
 	andi	t1, 0x3			# a0/a1 are aligned, but are we
-	beq	t1, zero, $chk8w	#  starting in the middle of a word?
+	beq	t1, zero, L(chk8w)	#  starting in the middle of a word?
 	subu	a2, t1
 	LWHI	t0, 0(a1)		# Yes we are... take care of that
 	addu	a1, t1
 	SWHI	t0, 0(a0)
 	addu	a0, t1
 
-$chk8w:	andi	t0, a2, 0x1f		# 32 or more bytes left?
-	beq	t0, a2, $chk1w
+L(chk8w):	andi	t0, a2, 0x1f		# 32 or more bytes left?
+	beq	t0, a2, L(chk1w)
 	subu	a3, a2, t0		# Yes
 	addu	a3, a1			# a3 = end address of loop
 	move	a2, t0			# a2 = what will be left after loop
-$lop8w:	lw	t0,  0(a1)		# Loop taking 8 words at a time
+L(lop8w):	lw	t0,  0(a1)		# Loop taking 8 words at a time
 	lw	t1,  4(a1)
 	lw	t2,  8(a1)
 	lw	t3, 12(a1)
@@ -81,49 +81,49 @@ $lop8w:	lw	t0,  0(a1)		# Loop taking 8 words at a time
 	sw	t4, -16(a0)
 	sw	t5, -12(a0)
 	sw	t6,  -8(a0)
-	bne	a1, a3, $lop8w
+	bne	a1, a3, L(lop8w)
 	sw	t7,  -4(a0)
 
-$chk1w:	andi	t0, a2, 0x3		# 4 or more bytes left?
-	beq	t0, a2, $last8
+L(chk1w):	andi	t0, a2, 0x3		# 4 or more bytes left?
+	beq	t0, a2, L(last8)
 	subu	a3, a2, t0		# Yes, handle them one word at a time
 	addu	a3, a1			# a3 again end address
 	move	a2, t0
-$lop1w:	lw	t0, 0(a1)
+L(lop1w):	lw	t0, 0(a1)
 	addiu	a0, 4
 	addiu	a1, 4
-	bne	a1, a3, $lop1w
+	bne	a1, a3, L(lop1w)
 	sw	t0, -4(a0)
 
-$last8:	blez	a2, $lst8e		# Handle last 8 bytes, one at a time
+L(last8):	blez	a2, L(lst8e)		# Handle last 8 bytes, one at a time
 	addu	a3, a2, a1
-$lst8l:	lb	t0, 0(a1)
+L(lst8l):	lb	t0, 0(a1)
 	addiu	a0, 1
 	addiu	a1, 1
-	bne	a1, a3, $lst8l
+	bne	a1, a3, L(lst8l)
 	sb	t0, -1(a0)
-$lst8e:	jr	ra			# Bye, bye
+L(lst8e):	jr	ra			# Bye, bye
 	nop
 
-$shift:	subu	a3, zero, a0		# Src and Dest unaligned 
+L(shift):	subu	a3, zero, a0		# Src and Dest unaligned 
 	andi	a3, 0x3			#  (unoptimized case...)
-	beq	a3, zero, $shft1
+	beq	a3, zero, L(shft1)
 	subu	a2, a3			# a2 = bytes left
 	LWHI	t0, 0(a1)		# Take care of first odd part
 	LWLO	t0, 3(a1)
 	addu	a1, a3
 	SWHI	t0, 0(a0)
 	addu	a0, a3
-$shft1:	andi	t0, a2, 0x3
+L(shft1):	andi	t0, a2, 0x3
 	subu	a3, a2, t0
 	addu	a3, a1
-$shfth:	LWHI	t1, 0(a1)		# Limp through, word by word
+L(shfth):	LWHI	t1, 0(a1)		# Limp through, word by word
 	LWLO	t1, 3(a1)
 	addiu	a0, 4
 	addiu	a1, 4
-	bne	a1, a3, $shfth
+	bne	a1, a3, L(shfth)
 	sw	t1, -4(a0)
-	b	$last8			# Handle anything which may be left
+	b	L(last8)			# Handle anything which may be left
 	move	a2, t0
 
 	.set	reorder
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index 7e3f129af9..7825dea880 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
 
@@ -38,45 +38,45 @@ ENTRY (memset)
 	.set	noreorder
 
 	slti	t1, a2, 8		# Less than 8?
-	bne	t1, zero, $last8
+	bne	t1, zero, L(last8)
 	move	v0, a0			# Setup exit value before too late
 
-	beq	a1, zero, $ueven	# If zero pattern, no need to extend
+	beq	a1, zero, L(ueven)	# If zero pattern, no need to extend
 	andi	a1, 0xff		# Avoid problems with bogus arguments
 	sll	t0, a1, 8
 	or	a1, t0
 	sll	t0, a1, 16
 	or	a1, t0			# a1 is now pattern in full word
 
-$ueven:	subu	t0, zero, a0		# Unaligned address?
+L(ueven):	subu	t0, zero, a0		# Unaligned address?
 	andi	t0, 0x3
-	beq	t0, zero, $chkw
+	beq	t0, zero, L(chkw)
 	subu	a2, t0
 	SWHI	a1, 0(a0)		# Yes, handle first unaligned part
 	addu	a0, t0			# Now both a0 and a2 are updated
 
-$chkw:	andi	t0, a2, 0x7		# Enough left for one loop iteration?
-	beq	t0, a2, $chkl
+L(chkw):	andi	t0, a2, 0x7		# Enough left for one loop iteration?
+	beq	t0, a2, L(chkl)
 	subu	a3, a2, t0
 	addu	a3, a0			# a3 is last loop address +1
 	move	a2, t0			# a2 is now # of bytes left after loop
-$loopw:	addiu	a0, 8			# Handle 2 words pr. iteration
+L(loopw):	addiu	a0, 8			# Handle 2 words pr. iteration
 	sw	a1, -8(a0)
-	bne	a0, a3, $loopw
+	bne	a0, a3, L(loopw)
 	sw	a1, -4(a0)
 
-$chkl:	andi	t0, a2, 0x4		# Check if there is at least a full
-	beq	t0, zero, $last8	#  word remaining after the loop
+L(chkl):	andi	t0, a2, 0x4		# Check if there is at least a full
+	beq	t0, zero, L(last8)	#  word remaining after the loop
 	subu	a2, t0
 	sw	a1, 0(a0)		# Yes...
 	addiu	a0, 4
 
-$last8:	blez	a2, $exit		# Handle last 8 bytes (if cnt>0)
+L(last8):	blez	a2, L(exit)		# Handle last 8 bytes (if cnt>0)
 	addu	a3, a2, a0		# a3 is last address +1
-$lst8l:	addiu	a0, 1
-	bne	a0, a3, $lst8l
+L(lst8l):	addiu	a0, 1
+	bne	a0, a3, L(lst8l)
 	sb	a1, -1(a0)
-$exit:	j	ra			# Bye, bye
+L(exit):	j	ra			# Bye, bye
 	nop
 
 	.set	reorder
diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S
index 771d51981a..072f4f0b73 100644
--- a/sysdeps/mips/mips64/add_n.S
+++ b/sysdeps/mips/mips64/add_n.S
@@ -1,7 +1,7 @@
 /* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
  * store sum in a third limb vector.
  *
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -22,6 +22,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /*
  * INPUT PARAMETERS
@@ -38,10 +39,10 @@
 	.globl	__mpn_add_n
 	.ent	__mpn_add_n
 __mpn_add_n:
-	.set	noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set	noreorder
 	.set	nomacro
 
 	ld	$10,0($5)
@@ -49,12 +50,12 @@ __mpn_add_n:
 
 	daddiu	$7,$7,-1
 	and	$9,$7,4-1	# number of limbs in first loop
-	beq	$9,$0,.L0	# if multiple of 4 limbs, skip first loop
-	 move	$2,$0
+	beq	$9,$0,L(L0)	# if multiple of 4 limbs, skip first loop
+	move	$2,$0
 
 	dsubu	$7,$7,$9
 
-.Loop0:	daddiu	$9,$9,-1
+L(Loop0):	daddiu	$9,$9,-1
 	ld	$12,8($5)
 	daddu	$11,$11,$2
 	ld	$13,8($6)
@@ -68,13 +69,13 @@ __mpn_add_n:
 	daddiu	$6,$6,8
 	move	$10,$12
 	move	$11,$13
-	bne	$9,$0,.Loop0
-	 daddiu	$4,$4,8
+	bne	$9,$0,L(Loop0)
+	daddiu	$4,$4,8
 
-.L0:	beq	$7,$0,.Lend
-	 nop
+L(L0):	beq	$7,$0,L(Lend)
+	nop
 
-.Loop:	daddiu	$7,$7,-4
+L(Loop):	daddiu	$7,$7,-4
 
 	ld	$12,8($5)
 	daddu	$11,$11,$2
@@ -115,10 +116,10 @@ __mpn_add_n:
 	daddiu	$5,$5,32
 	daddiu	$6,$6,32
 
-	bne	$7,$0,.Loop
-	 daddiu	$4,$4,32
+	bne	$7,$0,L(Loop)
+	daddiu	$4,$4,32
 
-.Lend:	daddu	$11,$11,$2
+L(Lend):	daddu	$11,$11,$2
 	sltu	$8,$11,$2
 	daddu	$11,$10,$11
 	sltu	$2,$11,$10
diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S
index f6cf428315..f5ecd83702 100644
--- a/sysdeps/mips/mips64/addmul_1.S
+++ b/sysdeps/mips/mips64/addmul_1.S
@@ -1,7 +1,7 @@
 /* MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
  * add the product to a second limb vector.
  *
- * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -22,6 +22,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -38,10 +39,10 @@
 	.globl	__mpn_addmul_1
 	.ent	__mpn_addmul_1
 __mpn_addmul_1:
-	.set    noreorder
 #ifdef PIC
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set    noreorder
 	.set    nomacro
 
  # warm up phase 0
@@ -52,14 +53,14 @@ __mpn_addmul_1:
 	dmultu	$8,$7
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC0
-	 move	$2,$0		# zero cy2
+	beq	$6,$0,L(LC0)
+	move	$2,$0		# zero cy2
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	ld	$8,0($5)	# load new s1 limb as early as possible
 
-Loop:	ld	$10,0($4)
+L(Loop):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddiu	$5,$5,8
@@ -73,11 +74,11 @@ Loop:	ld	$10,0($4)
 	daddu	$2,$2,$10
 	sd	$3,0($4)
 	daddiu	$4,$4,8
-	bne	$6,$0,Loop
-	 daddu	$2,$9,$2	# add high product limb and carry from addition
+	bne	$6,$0,L(Loop)
+	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 1
-$LC1:	ld	$10,0($4)
+L(LC1):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddu	$3,$3,$2
@@ -91,7 +92,7 @@ $LC1:	ld	$10,0($4)
 	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 0
-$LC0:	ld	$10,0($4)
+L(LC0):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddu	$3,$3,$2
diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S
index d06ba0d309..20f9e3da19 100644
--- a/sysdeps/mips/mips64/lshift.S
+++ b/sysdeps/mips/mips64/lshift.S
@@ -1,6 +1,6 @@
 /* MIPS3 __mpn_lshift --
  *
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -21,6 +21,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -37,10 +38,10 @@
 	.globl	__mpn_lshift
 	.ent	__mpn_lshift
 __mpn_lshift:
-	.set	noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set	noreorder
 	.set	nomacro
 
 	dsll	$2,$6,3
@@ -50,12 +51,12 @@ __mpn_lshift:
 	daddu	$4,$4,$2	# make r4 point at end of res
 	daddiu	$6,$6,-1
 	and	$9,$6,4-1	# number of limbs in first loop
-	beq	$9,$0,.L0	# if multiple of 4 limbs, skip first loop
-	 dsrl	$2,$10,$13	# compute function result
+	beq	$9,$0,L(L0)	# if multiple of 4 limbs, skip first loop
+	dsrl	$2,$10,$13	# compute function result
 
 	dsubu	$6,$6,$9
 
-.Loop0:	ld	$3,-16($5)
+L(Loop0):	ld	$3,-16($5)
 	daddiu	$4,$4,-8
 	daddiu	$5,$5,-8
 	daddiu	$9,$9,-1
@@ -63,13 +64,13 @@ __mpn_lshift:
 	dsrl	$12,$3,$13
 	move	$10,$3
 	or	$8,$11,$12
-	bne	$9,$0,.Loop0
-	 sd	$8,0($4)
+	bne	$9,$0,L(Loop0)
+	sd	$8,0($4)
 
-.L0:	beq	$6,$0,.Lend
-	 nop
+L(L0):	beq	$6,$0,L(Lend)
+	nop
 
-.Loop:	ld	$3,-16($5)
+L(Loop):	ld	$3,-16($5)
 	daddiu	$4,$4,-32
 	daddiu	$6,$6,-4
 	dsll	$11,$10,$7
@@ -95,10 +96,10 @@ __mpn_lshift:
 
 	daddiu	$5,$5,-32
 	or	$8,$14,$9
-	bgtz	$6,.Loop
-	 sd	$8,0($4)
+	bgtz	$6,L(Loop)
+	sd	$8,0($4)
 
-.Lend:	dsll	$8,$10,$7
+L(Lend):	dsll	$8,$10,$7
 	j	$31
 	sd	$8,-8($4)
 	.end	__mpn_lshift
diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S
index bf32953f43..c711783001 100644
--- a/sysdeps/mips/mips64/mul_1.S
+++ b/sysdeps/mips/mips64/mul_1.S
@@ -1,7 +1,8 @@
 /* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
  * store the product in a second limb vector.
  *
- * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003
+ * Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -22,6 +23,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -38,10 +40,10 @@
 	.globl	__mpn_mul_1
 	.ent	__mpn_mul_1
 __mpn_mul_1:
-	.set    noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set    noreorder
 	.set    nomacro
 
  # warm up phase 0
@@ -52,14 +54,14 @@ __mpn_mul_1:
 	dmultu	$8,$7
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC0
-	 move	$2,$0		# zero cy2
+	beq	$6,$0,L(LC0)
+	move	$2,$0		# zero cy2
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	ld	$8,0($5)	# load new s1 limb as early as possible
 
-Loop:	mflo	$10
+L(Loop):	mflo	$10
 	mfhi	$9
 	daddiu	$5,$5,8
 	daddu	$10,$10,$2	# add old carry limb to low product limb
@@ -69,11 +71,11 @@ Loop:	mflo	$10
 	sltu	$2,$10,$2	# carry from previous addition -> $2
 	sd	$10,0($4)
 	daddiu	$4,$4,8
-	bne	$6,$0,Loop
-	 daddu	$2,$9,$2	# add high product limb and carry from addition
+	bne	$6,$0,L(Loop)
+	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 1
-$LC1:	mflo	$10
+L(LC1):	mflo	$10
 	mfhi	$9
 	daddu	$10,$10,$2
 	sltu	$2,$10,$2
@@ -83,7 +85,7 @@ $LC1:	mflo	$10
 	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 0
-$LC0:	mflo	$10
+L(LC0):	mflo	$10
 	mfhi	$9
 	daddu	$10,$10,$2
 	sltu	$2,$10,$2
diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S
index f39c1b3314..e6a8a06d3d 100644
--- a/sysdeps/mips/mips64/rshift.S
+++ b/sysdeps/mips/mips64/rshift.S
@@ -1,6 +1,6 @@
 /* MIPS3 __mpn_rshift --
  *
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -21,6 +21,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -37,22 +38,22 @@
 	.globl	__mpn_rshift
 	.ent	__mpn_rshift
 __mpn_rshift:
-	.set	noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set	noreorder
 	.set	nomacro
 
 	ld	$10,0($5)	# load first limb
 	dsubu	$13,$0,$7
 	daddiu	$6,$6,-1
 	and	$9,$6,4-1	# number of limbs in first loop
-	beq	$9,$0,.L0	# if multiple of 4 limbs, skip first loop
-	 dsll	$2,$10,$13	# compute function result
+	beq	$9,$0,L(L0)	# if multiple of 4 limbs, skip first loop
+	dsll	$2,$10,$13	# compute function result
 
 	dsubu	$6,$6,$9
 
-.Loop0:	ld	$3,8($5)
+L(Loop0):	ld	$3,8($5)
 	daddiu	$4,$4,8
 	daddiu	$5,$5,8
 	daddiu	$9,$9,-1
@@ -60,13 +61,13 @@ __mpn_rshift:
 	dsll	$12,$3,$13
 	move	$10,$3
 	or	$8,$11,$12
-	bne	$9,$0,.Loop0
-	 sd	$8,-8($4)
+	bne	$9,$0,L(Loop0)
+	sd	$8,-8($4)
 
-.L0:	beq	$6,$0,.Lend
-	 nop
+L(L0):	beq	$6,$0,L(Lend)
+	nop
 
-.Loop:	ld	$3,8($5)
+L(Loop):	ld	$3,8($5)
 	daddiu	$4,$4,32
 	daddiu	$6,$6,-4
 	dsrl	$11,$10,$7
@@ -92,10 +93,10 @@ __mpn_rshift:
 
 	daddiu	$5,$5,32
 	or	$8,$14,$9
-	bgtz	$6,.Loop
-	 sd	$8,-8($4)
+	bgtz	$6,L(Loop)
+	sd	$8,-8($4)
 
-.Lend:	dsrl	$8,$10,$7
+L(Lend):	dsrl	$8,$10,$7
 	j	$31
 	sd	$8,0($4)
 	.end	__mpn_rshift
diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S
index d566658bfd..aa8b0dcf9a 100644
--- a/sysdeps/mips/mips64/sub_n.S
+++ b/sysdeps/mips/mips64/sub_n.S
@@ -1,7 +1,7 @@
 /* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
  * store difference in a third limb vector.
  *
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -22,6 +22,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -38,10 +39,10 @@
 	.globl	__mpn_sub_n
 	.ent	__mpn_sub_n
 __mpn_sub_n:
-	.set	noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set	noreorder
 	.set	nomacro
 
 	ld	$10,0($5)
@@ -49,12 +50,12 @@ __mpn_sub_n:
 
 	daddiu	$7,$7,-1
 	and	$9,$7,4-1	# number of limbs in first loop
-	beq	$9,$0,.L0	# if multiple of 4 limbs, skip first loop
-	 move	$2,$0
+	beq	$9,$0,L(L0)	# if multiple of 4 limbs, skip first loop
+	move	$2,$0
 
 	dsubu	$7,$7,$9
 
-.Loop0:	daddiu	$9,$9,-1
+L(Loop0):	daddiu	$9,$9,-1
 	ld	$12,8($5)
 	daddu	$11,$11,$2
 	ld	$13,8($6)
@@ -68,13 +69,13 @@ __mpn_sub_n:
 	daddiu	$6,$6,8
 	move	$10,$12
 	move	$11,$13
-	bne	$9,$0,.Loop0
-	 daddiu	$4,$4,8
+	bne	$9,$0,L(Loop0)
+	daddiu	$4,$4,8
 
-.L0:	beq	$7,$0,.Lend
-	 nop
+L(L0):	beq	$7,$0,L(Lend)
+	nop
 
-.Loop:	daddiu	$7,$7,-4
+L(Loop):	daddiu	$7,$7,-4
 
 	ld	$12,8($5)
 	daddu	$11,$11,$2
@@ -115,10 +116,10 @@ __mpn_sub_n:
 	daddiu	$5,$5,32
 	daddiu	$6,$6,32
 
-	bne	$7,$0,.Loop
-	 daddiu	$4,$4,32
+	bne	$7,$0,L(Loop)
+	daddiu	$4,$4,32
 
-.Lend:	daddu	$11,$11,$2
+L(Lend):	daddu	$11,$11,$2
 	sltu	$8,$11,$2
 	dsubu	$11,$10,$11
 	sltu	$2,$10,$11
diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S
index 510923f366..4971b992a1 100644
--- a/sysdeps/mips/mips64/submul_1.S
+++ b/sysdeps/mips/mips64/submul_1.S
@@ -1,7 +1,8 @@
 /* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
  * subtract the product from a second limb vector.
  *
- * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003
+ * Free Software Foundation, Inc.
  *
  * This file is part of the GNU MP Library.
  *
@@ -22,6 +23,7 @@
  */
 
 #include <sysdep.h>
+#include <sys/asm.h>
 
 /* INPUT PARAMETERS
  * res_ptr	$4
@@ -38,10 +40,10 @@
 	.globl	__mpn_submul_1
 	.ent	__mpn_submul_1
 __mpn_submul_1:
-	.set    noreorder
 #ifdef __PIC__
-	.cpload t9
+	SETUP_GP /* ??? unused */
 #endif
+	.set    noreorder
 	.set    nomacro
 
  # warm up phase 0
@@ -52,14 +54,14 @@ __mpn_submul_1:
 	dmultu	$8,$7
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC0
-	 move	$2,$0		# zero cy2
+	beq	$6,$0,L(LC0)
+	move	$2,$0		# zero cy2
 
 	daddiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	ld	$8,0($5)	# load new s1 limb as early as possible
 
-Loop:	ld	$10,0($4)
+L(Loop):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddiu	$5,$5,8
@@ -73,11 +75,11 @@ Loop:	ld	$10,0($4)
 	daddu	$2,$2,$10
 	sd	$3,0($4)
 	daddiu	$4,$4,8
-	bne	$6,$0,Loop
-	 daddu	$2,$9,$2	# add high product limb and carry from addition
+	bne	$6,$0,L(Loop)
+	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 1
-$LC1:	ld	$10,0($4)
+L(LC1):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddu	$3,$3,$2
@@ -91,7 +93,7 @@ $LC1:	ld	$10,0($4)
 	daddu	$2,$9,$2	# add high product limb and carry from addition
 
  # cool down phase 0
-$LC0:	ld	$10,0($4)
+L(LC0):	ld	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	daddu	$3,$3,$2
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index 255623edeb..72f538670c 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -1,7 +1,7 @@
 /* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
 store the product in a second limb vector.
 
-Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -46,14 +46,14 @@ ENTRY (__mpn_mul_1)
 	multu	$8,$7
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC0
+	beq	$6,$0,L(LC0)
 	move	$2,$0		/* zero cy2 */
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	lw	$8,0($5)	/* load new s1 limb as early as possible */
 
-Loop:	mflo	$10
+L(Loop):	mflo	$10
 	mfhi	$9
 	addiu	$5,$5,4
 	addu	$10,$10,$2	/* add old carry limb to low product limb */
@@ -63,11 +63,11 @@ Loop:	mflo	$10
 	sltu	$2,$10,$2	/* carry from previous addition -> $2 */
 	sw	$10,0($4)
 	addiu	$4,$4,4
-	bne	$6,$0,Loop	/* should be "bnel" */
+	bne	$6,$0,L(Loop)	/* should be "bnel" */
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 1 */
-$LC1:	mflo	$10
+L(LC1):	mflo	$10
 	mfhi	$9
 	addu	$10,$10,$2
 	sltu	$2,$10,$2
@@ -77,7 +77,7 @@ $LC1:	mflo	$10
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 0 */
-$LC0:	mflo	$10
+L(LC0):	mflo	$10
 	mfhi	$9
 	addu	$10,$10,$2
 	sltu	$2,$10,$2
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
index 46df86b5dc..cb688fe2ac 100644
--- a/sysdeps/mips/rshift.S
+++ b/sysdeps/mips/rshift.S
@@ -1,6 +1,6 @@
 /* MIPS2 __mpn_rshift --
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -41,12 +41,12 @@ ENTRY (__mpn_rshift)
 	subu	$13,$0,$7
 	addiu	$6,$6,-1
 	and	$9,$6,4-1	/* number of limbs in first loop */
-	beq	$9,$0,.L0	/* if multiple of 4 limbs, skip first loop*/
+	beq	$9,$0,L(L0)	/* if multiple of 4 limbs, skip first loop*/
 	 sll	$2,$10,$13	/* compute function result */
 
 	subu	$6,$6,$9
 
-.Loop0:	lw	$3,4($5)
+L(Loop0):	lw	$3,4($5)
 	addiu	$4,$4,4
 	addiu	$5,$5,4
 	addiu	$9,$9,-1
@@ -54,13 +54,13 @@ ENTRY (__mpn_rshift)
 	sll	$12,$3,$13
 	move	$10,$3
 	or	$8,$11,$12
-	bne	$9,$0,.Loop0
+	bne	$9,$0,L(Loop0)
 	 sw	$8,-4($4)
 
-.L0:	beq	$6,$0,.Lend
+L(L0):	beq	$6,$0,L(Lend)
 	 nop
 
-.Loop:	lw	$3,4($5)
+L(Loop):	lw	$3,4($5)
 	addiu	$4,$4,16
 	addiu	$6,$6,-4
 	srl	$11,$10,$7
@@ -86,10 +86,10 @@ ENTRY (__mpn_rshift)
 
 	addiu	$5,$5,16
 	or	$8,$14,$9
-	bgtz	$6,.Loop
+	bgtz	$6,L(Loop)
 	 sw	$8,-4($4)
 
-.Lend:	srl	$8,$10,$7
+L(Lend):	srl	$8,$10,$7
 	j	$31
 	sw	$8,0($4)
 	END (__mpn_rshift)
diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S
index 633f3e3143..53fa019343 100644
--- a/sysdeps/mips/sub_n.S
+++ b/sysdeps/mips/sub_n.S
@@ -1,7 +1,7 @@
 /* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
 store difference in a third limb vector.
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -43,12 +43,12 @@ ENTRY (__mpn_sub_n)
 
 	addiu	$7,$7,-1
 	and	$9,$7,4-1	/* number of limbs in first loop */
-	beq	$9,$0,.L0	/* if multiple of 4 limbs, skip first loop */
-	 move	$2,$0
+	beq	$9,$0,L(L0)	/* if multiple of 4 limbs, skip first loop */
+	move	$2,$0
 
 	subu	$7,$7,$9
 
-.Loop0:	addiu	$9,$9,-1
+L(Loop0):	addiu	$9,$9,-1
 	lw	$12,4($5)
 	addu	$11,$11,$2
 	lw	$13,4($6)
@@ -62,13 +62,13 @@ ENTRY (__mpn_sub_n)
 	addiu	$6,$6,4
 	move	$10,$12
 	move	$11,$13
-	bne	$9,$0,.Loop0
-	 addiu	$4,$4,4
+	bne	$9,$0,L(Loop0)
+	addiu	$4,$4,4
 
-.L0:	beq	$7,$0,.Lend
-	 nop
+L(L0):	beq	$7,$0,L(Lend)
+	nop
 
-.Loop:	addiu	$7,$7,-4
+L(Loop):	addiu	$7,$7,-4
 
 	lw	$12,4($5)
 	addu	$11,$11,$2
@@ -109,10 +109,10 @@ ENTRY (__mpn_sub_n)
 	addiu	$5,$5,16
 	addiu	$6,$6,16
 
-	bne	$7,$0,.Loop
-	 addiu	$4,$4,16
+	bne	$7,$0,L(Loop)
+	addiu	$4,$4,16
 
-.Lend:	addu	$11,$11,$2
+L(Lend):	addu	$11,$11,$2
 	sltu	$8,$11,$2
 	subu	$11,$10,$11
 	sltu	$2,$10,$11
diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S
index 7de9ca74f8..4c8a612650 100644
--- a/sysdeps/mips/submul_1.S
+++ b/sysdeps/mips/submul_1.S
@@ -1,7 +1,7 @@
 /* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
 subtract the product from a second limb vector.
 
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -46,14 +46,14 @@ ENTRY (__mpn_submul_1)
 	multu	$8,$7
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC0
+	beq	$6,$0,L(LC0)
 	move	$2,$0		/* zero cy2 */
 
 	addiu	$6,$6,-1
-	beq	$6,$0,$LC1
+	beq	$6,$0,L(LC1)
 	lw	$8,0($5)	/* load new s1 limb as early as possible */
 
-Loop:	lw	$10,0($4)
+L(Loop):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addiu	$5,$5,4
@@ -67,11 +67,11 @@ Loop:	lw	$10,0($4)
 	addu	$2,$2,$10
 	sw	$3,0($4)
 	addiu	$4,$4,4
-	bne	$6,$0,Loop	/* should be "bnel" */
+	bne	$6,$0,L(Loop)	/* should be "bnel" */
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 1 */
-$LC1:	lw	$10,0($4)
+L(LC1):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addu	$3,$3,$2
@@ -85,7 +85,7 @@ $LC1:	lw	$10,0($4)
 	addu	$2,$9,$2	/* add high product limb and carry from addition */
 
 	/* cool down phase 0 */
-$LC0:	lw	$10,0($4)
+L(LC0):	lw	$10,0($4)
 	mflo	$3
 	mfhi	$9
 	addu	$3,$3,$2
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index c710b0c274..a1adf677f9 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,93,94,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2002, 2003 
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -46,10 +47,10 @@ ENTRY(__syscall_error)
 	/* We translate the system's EWOULDBLOCK error into EAGAIN.
 	   The GNU C library always defines EWOULDBLOCK==EAGAIN.
 	   EWOULDBLOCK_sys is the original number.  */
-	bne	v0, EWOULDBLOCK_sys, skip
+	bne	v0, EWOULDBLOCK_sys, L(skip)
 	nop
 	li	v0, EAGAIN
-skip:
+L(skip):
 #endif
 	/* Find our per-thread errno address  */
 	jal	__errno_location
@@ -84,9 +85,9 @@ ENTRY(__syscall_error)
 	/* We translate the system's EWOULDBLOCK error into EAGAIN.
 	   The GNU C library always defines EWOULDBLOCK==EAGAIN.
 	   EWOULDBLOCK_sys is the original number.  */
-	bne v0, EWOULDBLOCK_sys, skip
+	bne v0, EWOULDBLOCK_sys, L(skip)
 	li v0, EAGAIN
-skip:
+L(skip):
 #endif
 	/* Store it in errno... */
 	sw v0, errno
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index fd5191601a..8ba84e2083 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -33,7 +34,7 @@
    can make things confusing if you're debugging---it looks like it's jumping
    backwards into the previous fn.  */
 #ifdef __PIC__
- #define PSEUDO(name, syscall_name, args) \
+#define PSEUDO(name, syscall_name, args) \
   .align 2;								      \
   99: la t9,__syscall_error;						      \
   jr t9;								      \
@@ -44,7 +45,7 @@
   syscall;								      \
   .set reorder;								      \
   bne a3, zero, 99b;							      \
-syse1:
+L(syse1):
 #else
 #define PSEUDO(name, syscall_name, args) \
   .set noreorder;							      \
@@ -57,7 +58,7 @@ syse1:
   syscall;								      \
   .set reorder;								      \
   bne a3, zero, 99b;							      \
-syse1:
+L(syse1):
 #endif
 
 #undef PSEUDO_END
@@ -66,11 +67,19 @@ syse1:
 #define ret	j ra ; nop
 
 #undef END
-#define END(sym)        .end sym
+#define	END(function)                                   \
+		.end	function;		        \
+		.size	function,.-function
 
 #define r0	v0
 #define r1	v1
 /* The mips move insn is d,s.  */
 #define MOVE(x,y)	move y , x
 
+#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
+# define L(label) $L ## label
+#else
+# define L(label) .L ## label
+#endif
+
 #endif
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 4f4f84a4af..de0f6ebfae 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1997, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -28,18 +29,18 @@ ENTRY(__wait)
 
 	li v0, SYS_wait
 	syscall
-	beqz a3, noerror
+	beqz a3, L(noerror)
 	nop
 	j __syscall_error
 	nop
 
-noerror:
+L(noerror):
 	/* If the arg is not NULL, store v1 there.  */
-	beqz a0, noarg
+	beqz a0, L(noarg)
 	nop
 	sw v1, 0(a0)
 	nop
-noarg:
+L(noarg):
 	ret
 	.end __wait
 
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 00b13170e5..2b02a2ba9b 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -49,8 +49,8 @@ NESTED(__clone,4*SZREG,sp)
 
 	/* Sanity check arguments.  */
 	li		v0,EINVAL
-	beqz		a0,error	/* No NULL function pointers.  */
-	beqz		a1,error	/* No NULL stack pointers.  */
+	beqz		a0,L(error)	/* No NULL function pointers.  */
+	beqz		a1,L(error)	/* No NULL stack pointers.  */
 
 	subu		a1,32		/* Reserve argument save space.  */
 	sw		a0,0(a1)	/* Save function pointer.  */
@@ -62,15 +62,15 @@ NESTED(__clone,4*SZREG,sp)
 	li		v0,__NR_clone
 	syscall
 
-	bnez		a3,error
-	beqz		v0,.Lthread_start
+	bnez		a3,L(error)
+	beqz		v0,L(thread_start)
 
 	/* Successful return from the parent */
 	addiu		sp,32
 	ret
 
 	/* Something bad happened -- no child created */
-error:
+L(error):
 	addiu		sp,32
 #ifdef __PIC__
 	la		t9,__syscall_error
@@ -84,7 +84,7 @@ error:
    its own function so that we can terminate the stack trace with our
    debug info.  */
 
-.Lthread_start:
+L(thread_start):
 	/* cp is already loaded.  */
 	.cprestore	16
 	/* The stackframe has been created on entry of clone().  */