public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Segher Boessenkool <segher@koffie.nl>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/10177: VRsave mask wrong
Date: Sat, 22 Mar 2003 03:26:00 -0000	[thread overview]
Message-ID: <20030322032601.10632.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/10177; it has been noted by GNATS.

From: Segher Boessenkool <segher@koffie.nl>
To: pinskia@physics.uc.edu, gcc-patches@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org, spatel@apple.com, aldyh@redhat.com,
	kkhoo@apple.com
Subject: Re: target/10177: VRsave mask wrong
Date: Sat, 22 Mar 2003 04:17:46 +0100

 Fixed thusly.  Tested on powerpc-unknown-linux-gnu.
 
 It *might* make regrename less effective for AltiVec
 registers, but I don't think so, especially given that
 most AltiVec code is written very assembler-like anyway.
 
 If okay, please apply.
 
 
 Segher
 
 
 
 2002-03-22  Segher Boessenkool  <segher@koffie.nl>
 
 	PR target/10177
 	* config/rs6000/rs6000.h (HARD_REGNO_RENAME_OK): New.
 	* config/rs6000/rs6000.c (compute_vrsave_mask): Don't mark
 	all call-clobbered registers as used.
 
 
 *** config/rs6000/rs6000.c~~	Sat Mar 22 02:25:14 2003
 --- config/rs6000/rs6000.c	Sat Mar 22 03:07:37 2003
 *************** compute_vrsave_mask ()
 *** 8916,8934 ****
      if (mask == 0)
        return mask;
 
 -   /* Next, add all registers that are call-clobbered.  We do this
 -      because post-reload register optimizers such as regrename_optimize
 -      may choose to use them.  They never change the register class
 -      chosen by reload, so cannot create new uses of altivec registers
 -      if there were none before, so the early exit above is safe.  */
 -   /* ??? Alternately, we could define HARD_REGNO_RENAME_OK to disallow
 -      altivec registers not saved in the mask, which might well make the
 -      adjustments below more effective in eliding the save/restore of
 -      VRSAVE in small functions.  */
 -   for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)
 -     if (call_used_regs[i])
 -       mask |= ALTIVEC_REG_BIT (i);
 -
      /* Next, remove the argument registers from the set.  These must
         be in the VRSAVE mask set by the caller, so we don't need to add
         them in again.  More importantly, the mask we compute here is
 --- 8916,8921 ----
 *** config/rs6000/rs6000.h~~	Sat Mar 22 02:19:26 2003
 --- config/rs6000/rs6000.h	Sat Mar 22 02:37:18 2003
 *************** extern int rs6000_default_long_calls;
 *** 948,953 ****
 --- 948,959 ----
       ? ALTIVEC_VECTOR_MODE (MODE1)		\
       : 1)
 
 + /* Post-reload, we can't use any new AltiVec registers, as we already
 +    emitted the vrsave mask.  */
 +
 + #define HARD_REGNO_RENAME_OK(SRC, DST) \
 +   (! ALTIVEC_REGNO_P (DST) || regs_ever_live[DST])
 +
    /* A C expression returning the cost of moving data from a register of class
       CLASS1 to one of CLASS2.  */
 
 
 


             reply	other threads:[~2003-03-22  3:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-22  3:26 Segher Boessenkool [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-31 20:06 dje
2003-03-31 18:13 Aldy Hernandez
2003-03-27 19:59 dje
2003-03-21  2:16 pinskia

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=20030322032601.10632.qmail@sources.redhat.com \
    --to=segher@koffie.nl \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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).