public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/10592: [arm] caller-save incorrectly handles a  reloaded SET_DEST operand
Date: Fri, 02 May 2003 14:06:00 -0000	[thread overview]
Message-ID: <20030502140601.20202.qmail@sources.redhat.com> (raw)

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

From: Richard Earnshaw <rearnsha@arm.com>
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
        ryan.pipkin@inet.com, law@redhat.com
Cc: Richard.Earnshaw@arm.com
Subject: Re: optimization/10592: [arm] caller-save incorrectly handles a 
 reloaded SET_DEST operand
Date: Fri, 02 May 2003 15:02:10 +0100

 This is a multipart MIME message.
 
 --==_Exmh_-1003055900
 Content-Type: text/plain; charset=us-ascii
 
 This patch implements the idea I just suggested, it does indeed seem to 
 solve the problem:
 
 With the patch, the relevant bit of the code is now:
 
         str     ip, [fp, #-44]
         bl      strncpy
         ldr     ip, [fp, #-44]
         add     r2, r9, #156
         add     lr, r9, #16
         str     r2, [ip, #540]
 
 
 I'll do a full testsuite run to check for regressions.
 
 <date>  Richard Earnshaw  <rearnsha@arm.com>
 
 	* caller-save.c (mark_referenced_regs): Don't short-circuit a reg
 	or subreg in SET_DEST if it isn't a hard register.
 
 R.
 
 --==_Exmh_-1003055900
 Content-Type: text/plain ; name="caller-save.patch"; charset=us-ascii
 Content-Description: caller-save.patch
 Content-Disposition: attachment; filename="caller-save.patch"
 
 Index: caller-save.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/caller-save.c,v
 retrieving revision 1.54
 diff -p -r1.54 caller-save.c
 *** caller-save.c	16 Dec 2002 18:19:05 -0000	1.54
 --- caller-save.c	2 May 2003 13:57:25 -0000
 *************** mark_referenced_regs (x)
 *** 575,582 ****
       {
         x = SET_DEST (x);
         code = GET_CODE (x);
 !       if (code == REG || code == PC || code == CC0
   	  || (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
   	      /* If we're setting only part of a multi-word register,
   		 we shall mark it as referenced, because the words
   		 that are not being set should be restored.  */
 --- 575,584 ----
       {
         x = SET_DEST (x);
         code = GET_CODE (x);
 !       if ((code == REG && REGNO (x) < FIRST_PSEUDO_REGISTER)
 ! 	  || code == PC || code == CC0
   	  || (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
 + 	      && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
   	      /* If we're setting only part of a multi-word register,
   		 we shall mark it as referenced, because the words
   		 that are not being set should be restored.  */
 
 --==_Exmh_-1003055900--
 
 


             reply	other threads:[~2003-05-02 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02 14:06 Richard Earnshaw [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-02 13:46 Richard Earnshaw
2003-05-02 13:15 rearnsha

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=20030502140601.20202.qmail@sources.redhat.com \
    --to=rearnsha@arm.com \
    --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).