[PATCH][AArch64] Fix libc internal asm profiling code

Szabolcs Nagy szabolcs.nagy@arm.com
Fri Jul 8 16:07:00 GMT 2016


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.



More information about the Libc-alpha mailing list