linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jerry Van Baren <vanbaren_gerald@si.com>
To: linuxppc-dev@lists.linuxppc.org
Subject: Re: another difference in gcc (2v) ?
Date: Wed, 11 Apr 2001 11:21:11 -0400	[thread overview]
Message-ID: <4.3.2.20010411111546.00c3c100@falcon.si.com> (raw)
In-Reply-To: <200104111415.f3BEFkQ28728@ashley.ivey.uwo.ca>


I don't see any problem with the scheduled version.  The cmpwi mnemonic
doesn't use the "." because it always updates the condition register
(yes, they are inconsistent mnemonics).  The subf and srawi don't
affect the CR (no "." in them), so the CR is still valid when the
branch is evaluated.

gvb


At 10:15 AM 4/11/01 -0400, Kevin B. Hendricks wrote:


>Hi,
>
>Lost in the huge diff was one other change, this time in the actual code
>itself.
>
>Can anyone tell me if this code resequence is legal?  The diff (-) lines
>show the nonworking disassembled code (generated by -O2) while the
>diff's (+) lines show the working code (generated by -O2
>-fno-schedule-insns -fno-schedule-insns2.
>
>Notice that when correct, the "cmpwi r3,0" code comes right before the
>branch ("beq") while in the non-working code it has been resequenced to
>come before lots of other instructions that may be setting a condition
>register value (subf and srawi).
>
>Is this a correct resequence?  I seem to remember something about a "."
>being added to some assmebler instructions to indicate that it impacts a
>condition register yet I see no indication of it in this sequence.
>
>-     1c4:      80 61 00 38     lwz     r3,56(r1)
>-     1c8:      80 01 00 44     lwz     r0,68(r1)
>-     1cc:      2c 03 00 00     cmpwi   r3,0
>-     1d0:      7c 03 00 50     subf    r0,r3,r0
>-     1d4:      7c 00 16 70     srawi   r0,r0,2
>+     1c4:      80 01 00 44     lwz     r0,68(r1)
>+     1c8:      80 61 00 38     lwz     r3,56(r1)
>+     1cc:      7c 03 00 50     subf    r0,r3,r0
>+     1d0:      7c 00 16 70     srawi   r0,r0,2
>+     1d4:      2c 03 00 00     cmpwi   r3,0
>       1d8:      41 82 00 14     beq     1ec
><configmgr::configapi::implGetHiera\
>rchicalName(configmgr::configapi::NodeAccess &)+0x1e8>
>
>
>Thanks,
>
>Kevin
>
>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2001-04-11 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-11 14:15 another difference in gcc (2v) ? Kevin B. Hendricks
2001-04-11 14:56 ` David Edelsohn
2001-04-11 16:23   ` Florin Boariu
2001-04-11 15:21 ` Jerry Van Baren [this message]
2001-04-11 15:22 ` Gabriel Paubert
2001-04-11 15:55 ` Giuliano Pochini
  -- strict thread matches above, loose matches on Subject: below --
2001-04-12  2:46 nolan

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=4.3.2.20010411111546.00c3c100@falcon.si.com \
    --to=vanbaren_gerald@si.com \
    --cc=linuxppc-dev@lists.linuxppc.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 NNTP newsgroup(s).