This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][AArch64] Fix libc internal asm profiling code
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, <nd at arm dot com>, Joseph Myers <joseph at codesourcery dot com>
- Date: Fri, 8 Jul 2016 17:06:37 +0100
- Subject: Re: [PATCH][AArch64] Fix libc internal asm profiling code
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- References: <56991443.4080700@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 15/01/16 15:46, Szabolcs Nagy wrote:
> When glibc is built with --enable-profile, the ENTRY of
> asm functions includes CALL_MCOUNT for profiling.
> (matters for binaries static linked against libc_p.a.)
>
> CALL_MCOUNT did not save/restore argument registers
> around the _mcount call so it clobbered them.
> (it is enough to only save/restore the arguments passed
> to a given asm function, but that would be too many asm
> changes so it is simpler to always save all argument
> registers in this macro.)
>
> float args are not saved: mcount does not clobber the
> float regs and currently no asm function takes float
> arguments anyway.
>
> 2016-01-15 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> * sysdeps/aarch64/Makefile (CFLAGS-mcount.c): Add -mgeneral-regs-only.
> * sysdeps/aarch64/sysdep.h (CALL_MCOUNT): Save argument registers.
ping.
with bz in changelog:
2016-07-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
[BZ #18707]
* sysdeps/aarch64/Makefile (CFLAGS-mcount.c): Add -mgeneral-regs-only.
* sysdeps/aarch64/sysdep.h (CALL_MCOUNT): Save argument registers.