public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH] x86-64: Use R10 for profiling large model
@ 2021-01-08  9:24 Uros Bizjak
  2021-01-08 12:50 ` H.J. Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2021-01-08  9:24 UTC (permalink / raw)
  To: gcc-patches

> Since R10 is preserved when calling mcount, R10 can be used a scratch
> register to call mcount in large model.

Please mention that R10 can be used as a static chain registers and is
preserved when calling mcount for nested functions.

> 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.

OK with comment fixes.

Thanks,
Uros.

+    case CM_LARGE:
+      /* NB: R10 can be used as a scratch register here since
+        R10 is preserved when calling mcount.  */

Also mention that R10 can be used as a static chain register and is
preserved when calling mcount for nested functions.

+      fprintf (file, "1:\tmovabsq\t$%s, %%r10\n\tcall\t*%%r10\n",
+       mcount_name);
+      break;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-08 16:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08  9:24 [PATCH] x86-64: Use R10 for profiling large model Uros Bizjak
2021-01-08 12:50 ` H.J. Lu
2021-01-08 13:27   ` [PATCH] x86-64: Use R10 and R11 for profiling large model with PIC H.J. Lu
2021-01-08 14:31     ` Uros Bizjak
2021-01-08 14:43       ` H.J. Lu
2021-01-08 16:45         ` [PATCH] x86-64: Require lp64 for PR target/98482 tests H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).