From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] x86-64: Use R10 for profiling large model
Date: Fri, 8 Jan 2021 10:24:34 +0100 [thread overview]
Message-ID: <CAFULd4bxHVn65TggdMjwHBb8pMM-9Q8_1=OCR_xjtLqsYJjwbw@mail.gmail.com> (raw)
> 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;
next reply other threads:[~2021-01-08 9:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 9:24 Uros Bizjak [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2021-01-07 23:49 [PATCH] x86-64: Use R10 for profiling large model H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFULd4bxHVn65TggdMjwHBb8pMM-9Q8_1=OCR_xjtLqsYJjwbw@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).