summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-06-27 09:52:12 +0000
committerUlrich Drepper <drepper@redhat.com>1998-06-27 09:52:12 +0000
commit69bf5f75475e708abde760b2b401c2bfa65eec17 (patch)
tree2f0175634ce1e2b39c3437005de0bb7e61d3a06a /sysdeps
parentdb24ce47acb0727934bc8a0bedccf1be24791d13 (diff)
downloadglibc-69bf5f75475e708abde760b2b401c2bfa65eec17.tar.gz
glibc-69bf5f75475e708abde760b2b401c2bfa65eec17.tar.xz
glibc-69bf5f75475e708abde760b2b401c2bfa65eec17.zip
Update.
1998-06-27  7:07  Richard Henderson  <rth@cygnus.com>

	* math/atest-exp.c (exp_mpn, main): Cast to mp_limb_t appropriately.
	* math/atest-exp2.c (exp_mpn, main): Likewise.
	* math/atest-sincos.c (main): Likewise.

	* resolv/inet_addr.c (inet_aton): Check for 32-bit overflow.  Move
	base handling away from strtoul.  Always reset errno.

	* sysdeps/alpha/Makefile (elf): Kill -mno-fp-regs.

	* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Only set
	_dl_profile_map if _dl_name_match_p.
	(RTLD_START): Fix .prologue.  Set __libc_stack_end.
	* sysdeps/alpha/elf/start.S: Pass sp as arg 7.  Kill __data_start.

	* sysdeps/alpha/fpu/fraiseexcpt.c (feraiseexcept): Mark tmp
	as early-clobber.

	* sysdeps/libm-ieee754/e_exp10.c: Include "math_private.h".
	* sysdeps/libm-ieee754/e_exp10f.c: Likewise.
	* sysdeps/libm-ieee754/e_exp10l.c: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/Makefile7
-rw-r--r--sysdeps/alpha/dl-machine.h22
-rw-r--r--sysdeps/alpha/elf/start.S24
-rw-r--r--sysdeps/alpha/fpu/fraiseexcpt.c10
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h2
-rw-r--r--sysdeps/libm-ieee754/e_exp10.c1
-rw-r--r--sysdeps/libm-ieee754/e_exp10f.c1
-rw-r--r--sysdeps/libm-ieee754/e_exp10l.c1
8 files changed, 33 insertions, 35 deletions
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 6cf4a173a6..250a31779c 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -31,12 +31,7 @@ endif
 
 ifeq ($(subdir),elf)
 # The ld.so startup code cannot use literals until it self-relocates.
- ifeq ($(elf),yes)
-  CFLAGS-rtld.c = -mbuild-constants
- endif
-# The rest of ld.so shouldn't use FP regs for block moves so
-# that the lazy link trampoline doesn't have to save them.
-sysdep-CFLAGS += -mno-fp-regs
+CFLAGS-rtld.c = -mbuild-constants
 endif
 
 divrem := divl divq reml remq
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 455fd7b695..8f639a94b9 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -106,8 +106,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
       else
 	{
 	  *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
-	  /* Say that we really want profiling and the timers are started.  */
-	  _dl_profile_map = l;
+
+	  if (_dl_name_match_p (_dl_profile, l))
+	    {
+	      /* This is the object we are looking for.  Say that we really
+		 want profiling and the timers are started.  */
+	      _dl_profile_map = l;
+	    }
 	}
 
       /* Identify this shared object */
@@ -131,7 +136,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 " #tramp_name ":
 	lda	$sp, -168($sp)
 	.frame	$sp, 168, $26
-	/* Preserve all registers that C normally doesn't.  */
+	/* Preserve all integer registers that C normally doesn't.  */
 	stq	$26, 0($sp)
 	stq	$0, 8($sp)
 	stq	$1, 16($sp)
@@ -157,7 +162,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	/* Set up our $gp */
 	br	$gp, .+4
 	ldgp	$gp, 0($gp)
-	.prologue 1
+	.prologue 0
 	/* Set up the arguments for fixup: */
 	/* $16 = link_map out of plt0 */
 	/* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
@@ -216,11 +221,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 
 #define RTLD_START asm ("\
 .text
+	.set at
 	.globl _start
 	.ent _start
 _start:
 	br	$gp, 0f
 0:	ldgp	$gp, 0($gp)
+	.prologue 0
 	/* Pass pointer to argument block to _dl_start.  */
 	mov	$sp, $16
 	bsr	$26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng
@@ -229,8 +236,12 @@ _start:
 	.globl _dl_start_user
 	.ent _dl_start_user
 _dl_start_user:
+	.frame $30,0,$31,0
+	.prologue 0
 	/* Save the user entry point address in s0.  */
 	mov	$0, $9
+	/* Store the highest stack address.  */
+	stq	$30, __libc_stack_end
 	/* See if we were run as a command with the executable file
 	   name as an extra leading argument.  If so, adjust the stack
 	   pointer to skip _dl_skip_args words.  */
@@ -253,15 +264,14 @@ _dl_start_user:
 	ldgp	$gp, 0($26)
 	br	1b
 2:	/* Clear the startup flag.  */
-	.set at
 	stl	$31, _dl_starting_up
-	.set noat
 	/* Pass our finalizer function to the user in $0. */
 	lda	$0, _dl_fini
 	/* Jump to the user's entry point.  */
 	mov	$9, $27
 	jmp	($9)
 	.end _dl_start_user
+	.set noat
 .previous");
 
 /* Nonzero iff TYPE describes relocation of a PLT entry, so
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 1330d1fda2..ecb8174152 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -29,13 +29,14 @@ _start:
 	mov	zero, fp
 	br	gp, 1f
 1:	ldgp	gp, 0(gp)
+	subq	sp, 16, sp
 	.prologue 1
 
   /* Load address of the user's main function.  */
 	lda	a0, main
 
-	ldl	a1, 0(sp)	/* get argc */
-	lda	a2, 8(sp)	/* get argv */
+	ldl	a1, 16(sp)	/* get argc */
+	lda	a2, 24(sp)	/* get argv */
 
   /* Load address of our own entry points to .fini and .init.  */
 	lda	a3, _init
@@ -44,10 +45,12 @@ _start:
   /* Store address of the shared library termination function.  */
 	mov	v0, a5
 
+  /* Provide the highest stack address to the user code.  */
+	stq	sp, 0(sp)
+
   /* Call the user's main function, and exit with its value.
-     But let the libc call main.    */
+     But let the libc call main.  */
 	jsr	ra, __libc_start_main
-	ldgp	gp, 0(ra)
 
   /* Die very horribly if exit returns.  Call_pal hlt is callable from
      kernel mode only; this will result in an illegal instruction trap.  */
@@ -56,16 +59,3 @@ _start:
 
 /* For ECOFF backwards compatibility. */
 weak_alias(_start, __start)
-
-/* Define a symbol for the first piece of initialized data.  */
-	.data
-	.globl __data_start
-__data_start:
-	.long 0
-
-#ifdef __ELF__
-	.size __data_start, 4
-	.type __data_start, @object
-#endif
-
-weak_alias(__data_start, data_start)
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index c2a96e3f87..9b61ddb843 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -39,28 +39,28 @@ feraiseexcept (int excepts)
     {
       /* One example of a invalid operation is 0 * Infinity.  */
       __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
-			   : "=f"(tmp) : "f"(HUGE_VAL));
+			   : "=&f"(tmp) : "f"(HUGE_VAL));
     }
 
   /* Next: division by zero.  */
   if (FE_DIVBYZERO & excepts)
     {
       __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
-			   : "=f"(tmp), "=f"(dummy));
+			   : "=&f"(tmp), "=f"(dummy));
     }
 
   /* Next: overflow.  */
   if (FE_OVERFLOW & excepts)
     {
       __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
-			   : "=f"(tmp) : "f"(DBL_MAX));
+			   : "=&f"(tmp) : "f"(DBL_MAX));
     }
 
   /* Next: underflow.  */
   if (FE_UNDERFLOW & excepts)
     {
       __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
-			   : "=f"(tmp) : "f"(DBL_MIN),
+			   : "=&f"(tmp) : "f"(DBL_MIN),
 					 "f"((double) (1UL << 60)));
     }
 
@@ -68,6 +68,6 @@ feraiseexcept (int excepts)
   if (FE_INEXACT & excepts)
     {
       __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
-			   : "=f"(tmp) : "f"(1.0), "f"(M_PI));
+			   : "=&f"(tmp) : "f"(1.0), "f"(M_PI));
     }
 }
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
index 836e5a3050..465592c764 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/i386/fpu/bits/mathinline.h
@@ -582,7 +582,7 @@ __MATH_INLINE int
 __finite (double __x)
 {
   return (__extension__
-	  (((((union { double __d; int __i[2]; }) {__d: __x}).i[1]
+	  (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
 	     | 0x800fffff) + 1) >> 31));
 }
 
diff --git a/sysdeps/libm-ieee754/e_exp10.c b/sysdeps/libm-ieee754/e_exp10.c
index 3b367641cd..55d676ec09 100644
--- a/sysdeps/libm-ieee754/e_exp10.c
+++ b/sysdeps/libm-ieee754/e_exp10.c
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "math_private.h"
 
 
 double
diff --git a/sysdeps/libm-ieee754/e_exp10f.c b/sysdeps/libm-ieee754/e_exp10f.c
index 200eecd833..d6cc9dc03d 100644
--- a/sysdeps/libm-ieee754/e_exp10f.c
+++ b/sysdeps/libm-ieee754/e_exp10f.c
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "math_private.h"
 
 
 float
diff --git a/sysdeps/libm-ieee754/e_exp10l.c b/sysdeps/libm-ieee754/e_exp10l.c
index e2820d24f7..cf8658b747 100644
--- a/sysdeps/libm-ieee754/e_exp10l.c
+++ b/sysdeps/libm-ieee754/e_exp10l.c
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "math_private.h"
 
 
 long double