[PATCH][AArch64] Fix libc internal asm profiling code
Szabolcs Nagy
szabolcs.nagy@arm.com
Fri Jan 15 15:46:00 GMT 2016
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcount-2.diff
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160115/2b785bb0/attachment.bin>
More information about the Libc-alpha
mailing list