public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Michael P. Hayes" <michaelh@ongaonga.chch.cri.nz>
To: egcs@cygnus.com
Subject: Reloading index register
Date: Fri, 17 Oct 1997 19:23:00 -0000	[thread overview]
Message-ID: <199710180228.PAA27273@ongaonga.chch.cri.nz> (raw)

Can anybody who understands the reload pass enlighten me why it
generates,

(set (reg index2) (reg dud))
(set (reg index2) (mem (plus (reg base2) (reg index2))))
(set (reg r0) (minus (mem (plus (reg base1) (reg index1)))
                     (reg index2)))

instead of the better code,

(set (reg index2) (reg dud))
(set (reg r0) (minus (mem (plus (reg base1) (reg index1)))
                     (mem (plus (reg base2) (reg index2)))))

for the code fragment,

(set (reg r0) (minus (mem (plus (reg base1) (reg index1)))
                     (mem (plus (reg base2) (reg dud)))))

where the global register allocator couldn't assign reg dud to an
index register and so reload spills index register index2 to obtain a
reload register.







             reply	other threads:[~1997-10-17 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-17 19:23 Michael P. Hayes [this message]
1997-10-17 21:50 ` Jeffrey A Law

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=199710180228.PAA27273@ongaonga.chch.cri.nz \
    --to=michaelh@ongaonga.chch.cri.nz \
    --cc=egcs@cygnus.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).