From: Jakub Jelinek <jakub@redhat.com>
To: Andreas Krebbel <krebbel@linux.vnet.ibm.com>,
Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] S/390: Allow to use r2 to r4 as literal pool base.
Date: Mon, 21 Dec 2015 12:08:00 -0000 [thread overview]
Message-ID: <20151221120816.GI18720@tucnak.redhat.com> (raw)
In-Reply-To: <20151218102138.GA25456@linux.vnet.ibm.com>
On Fri, Dec 18, 2015 at 11:21:38AM +0100, Dominik Vogt wrote:
> Latest patch for r2 to r4, including a test case.
> diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
> index ed684af..cba88bb 100644
> --- a/gcc/config/s390/s390.c
> +++ b/gcc/config/s390/s390.c
> @@ -9584,10 +9584,17 @@ s390_init_frame_layout (void)
> as base register to avoid save/restore overhead. */
> if (!base_used)
> cfun->machine->base_reg = NULL_RTX;
> - else if (crtl->is_leaf && !df_regs_ever_live_p (5))
> - cfun->machine->base_reg = gen_rtx_REG (Pmode, 5);
> else
> - cfun->machine->base_reg = gen_rtx_REG (Pmode, BASE_REGNUM);
> + {
> + int br = 0;
> +
> + if (crtl->is_leaf)
> + /* Prefer r5 (most likely to be free). */
> + for (br = 5; br >= 2 && df_regs_ever_live_p (br); br--)
> + ;
> + cfun->machine->base_reg =
> + gen_rtx_REG (Pmode, (br > 0) ? br : BASE_REGNUM);
Note the formatting is wrong. It should be:
cfun->machine->base_reg
= gen_rtx_REG (Pmode, (br > 0) ? br : BASE_REGNUM);
Jakub
prev parent reply other threads:[~2015-12-21 12:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 16:50 [PATCH] S/390: Allow to use r1 " Dominik Vogt
2015-12-14 15:09 ` Ulrich Weigand
2015-12-16 6:50 ` Dominik Vogt
2015-12-16 12:51 ` Ulrich Weigand
2015-12-16 13:51 ` Dominik Vogt
2015-12-16 14:18 ` Ulrich Weigand
2015-12-18 10:21 ` [PATCH] S/390: Allow to use r2 " Dominik Vogt
2015-12-18 10:37 ` Andreas Krebbel
2015-12-21 12:08 ` Jakub Jelinek [this message]
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=20151221120816.GI18720@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=krebbel@linux.vnet.ibm.com \
/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).