public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Marcus Comstedt <marcus@mc.pp.se>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/8867: [sh] wrong code: double use of register
Date: Sat, 10 May 2003 16:36:00 -0000	[thread overview]
Message-ID: <20030510163600.16540.qmail@sources.redhat.com> (raw)

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

From: Marcus Comstedt <marcus@mc.pp.se>
To: Dara Hazeghi <dhazeghi@yahoo.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/8867: [sh] wrong code: double use of register
Date: 10 May 2003 18:29:43 +0200

 Dara Hazeghi <dhazeghi@yahoo.com> writes:
 
 > code generated by 3.3:
 [...]
 > .L5:
 >          mov     #64,r1
 >          add     r14,r1
 >          mov.l   @(0,r1),r2
 >          mov.l   @(12,r1),r1  !
 >          add     r1,r2
 >          mov     #64,r1       *
 >          add     r14,r1       *
 >          mov.l   r2,@(0,r1)
 [...]
 
 This looks ok.  The offset in r1 is recomputed by the instructions I
 marked with * to compensate for the fact that the instruction marked !
 overwrites r1.
 
 
 > Code generated by 3.4:
 [...]
 > .L4:
 >          add     r10,r11
 [...]
 
 Here, gcc has made a completely different (probably much better)
 register allocation, so both x and l7 are allocated to registers.
 Since the stack accesses are gone, there is no way to tell whether the
 actual bug is still there or not, but the generated code looks ok at
 any rate.
 
 
   // Marcus
 
 


             reply	other threads:[~2003-05-10 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-10 16:36 Marcus Comstedt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12 11:28 giovannibajo
2003-05-10 19:46 Dara Hazeghi
2003-05-10  9:16 Dara Hazeghi

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=20030510163600.16540.qmail@sources.redhat.com \
    --to=marcus@mc.pp.se \
    --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).