https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98482
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:1b885264a48dcd71b7aeb26c0abeb91246724897 commit r11-6548-g1b885264a48dcd71b7aeb26c0abeb91246724897 Author: H.J. Lu <hjl.to...@gmail.com> Date: Thu Jan 7 14:27:49 2021 -0800 x86-64: Use R10 for profiling large model R10 is caller-saved. Although it can be used as a static chain register, it is preserved when calling mcount for nested functions. Use R10 as a scratch register to call mcount in large model. gcc/ PR target/98482 * config/i386/i386.c (x86_function_profiler): Use R10 to call mcount in large model. Sorry for large model with PIC. gcc/testsuite/ PR target/98482 * gcc.target/i386/pr98482-1.c: New test. * gcc.target/i386/pr98482-1.c: Likewise.