diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-06-27 09:52:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-06-27 09:52:12 +0000 |
commit | 69bf5f75475e708abde760b2b401c2bfa65eec17 (patch) | |
tree | 2f0175634ce1e2b39c3437005de0bb7e61d3a06a /sysdeps/alpha | |
parent | db24ce47acb0727934bc8a0bedccf1be24791d13 (diff) | |
download | glibc-69bf5f75475e708abde760b2b401c2bfa65eec17.tar glibc-69bf5f75475e708abde760b2b401c2bfa65eec17.tar.gz glibc-69bf5f75475e708abde760b2b401c2bfa65eec17.tar.bz2 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/alpha')
-rw-r--r-- | sysdeps/alpha/Makefile | 7 | ||||
-rw-r--r-- | sysdeps/alpha/dl-machine.h | 22 | ||||
-rw-r--r-- | sysdeps/alpha/elf/start.S | 24 | ||||
-rw-r--r-- | sysdeps/alpha/fpu/fraiseexcpt.c | 10 |
4 files changed, 29 insertions, 34 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)); } } |