diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-06 22:09:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-06 22:09:35 +0000 |
commit | d7d06f795f688c4921675075297b8e9e7e16710d (patch) | |
tree | 51eaf83d5f62724fbb9adf7a03ca22f780a19007 /sysdeps/powerpc/powerpc64/sysdep.h | |
parent | 3feb8efa5d918fb774811b838ee8704f559d5ca6 (diff) | |
download | glibc-d7d06f795f688c4921675075297b8e9e7e16710d.tar.gz glibc-d7d06f795f688c4921675075297b8e9e7e16710d.tar.xz glibc-d7d06f795f688c4921675075297b8e9e7e16710d.zip |
Update.
2004-10-06 Alan Modra <amodra@bigpond.net.au> * gmon/Makefile (CFLAGS-mcount.c): Move before inclusion of "Rules". * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-mcount.c): Add -msoft-float. * sysdeps/powerpc/powerpc64/sysdep.h (SAVE_ARG, REST_ARG): New macros. (CALL_MCOUNT): Replace with a gas macro implementation. (EALIGN): Delete PROF version. * sysdeps/powerpc/powerpc64/__longjmp-common.S: Invoke CALL_MCOUNT. * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/memset.S: Likewise. * sysdeps/powerpc/powerpc64/stpcpy.S: Likewise. * sysdeps/powerpc/powerpc64/strchr.S: Likewise. * sysdeps/powerpc/powerpc64/strcmp.S: Likewise. * sysdeps/powerpc/powerpc64/strcpy.S: Likewise. * sysdeps/powerpc/powerpc64/strlen.S: Likewise. * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Add extra entry point past _mcount call. * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Use it. * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/sysdep.h')
-rw-r--r-- | sysdeps/powerpc/powerpc64/sysdep.h | 68 |
1 files changed, 27 insertions, 41 deletions
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h index 4420a6dfac..fead0b578a 100644 --- a/sysdeps/powerpc/powerpc64/sysdep.h +++ b/sysdeps/powerpc/powerpc64/sysdep.h @@ -23,37 +23,36 @@ #ifdef __ASSEMBLER__ +/* Support macros for CALL_MCOUNT. */ + .macro SAVE_ARG NARG + .if \NARG + SAVE_ARG \NARG-1 + std 2+\NARG,-72+8*(\NARG)(1) + .endif + .endm + + .macro REST_ARG NARG + .if \NARG + REST_ARG \NARG-1 + ld 2+\NARG,40+8*(\NARG)(1) + .endif + .endm + /* If compiled for profiling, call `_mcount' at the start of each function. see ppc-mcount.S for more details. */ + .macro CALL_MCOUNT NARG #ifdef PROF -/* The mcount code relies on a the return address being on the stack - to locate our caller and so it can restore it; so store one just - for its benefit. */ -#ifdef SYSV_ELF_PROFILING -#define CALL_MCOUNT \ - .pushsection; \ - .section ".data"; \ - .align ALIGNARG(2); \ -__mcount: \ - .long 0; \ - .previous; \ - .section ".toc","aw"; \ -.LC__mcount:; \ - .tc __mcount[TC],__mcount; \ - .previous; \ - mflr r0; \ - std r0,16(r1); \ - ld r0,.LC__mcount@toc(r2); \ - bl JUMPTARGET(_mcount); -#else /* SYSV_ELF_PROFILING */ -#define CALL_MCOUNT \ - mflr r0; \ - std r0,16(r1); \ - bl JUMPTARGET(_mcount); -#endif /* SYSV_ELF_PROFILING */ -#else /* PROF */ -#define CALL_MCOUNT /* Do nothing. */ -#endif /* PROF */ + mflr r0 + SAVE_ARG \NARG + std r0,16(r1) + stdu r1,-112(r1) + bl JUMPTARGET (_mcount) + ld r0,128(r1) + REST_ARG \NARG + addi r1,r1,112 + mtlr r0 +#endif + .endm #ifdef USE_PPC64_OVERLAPPING_OPD # define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase @@ -106,24 +105,11 @@ BODY_LABEL(name): /* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes past a 2^alignt boundary. */ -#ifdef PROF -#define EALIGN(name, alignt, words) \ - ENTRY_2(name) \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ -BODY_LABEL(name): \ - CALL_MCOUNT \ - b 0f; \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ -0: -#else /* PROF */ #define EALIGN(name, alignt, words) \ ENTRY_2(name) \ .align ALIGNARG(alignt); \ EALIGN_W_##words; \ BODY_LABEL(name): -#endif /* Local labels stripped out by the linker. */ #undef L |