From: Andrew Pinski <pinskia@physics.uc.edu>
To: Andreas Schwab <schwab@suse.de>
Cc: Andrew Pinski <pinskia@physics.uc.edu>,
"Fred Cook" <fcook377@hotmail.com>,
gcc@gcc.gnu.org
Subject: Re: How to implement branches?
Date: Wed, 14 May 2003 14:10:00 -0000 [thread overview]
Message-ID: <DCDA0E2B-8615-11D7-894C-000393A6D2F2@physics.uc.edu> (raw)
In-Reply-To: <je3cjheihy.fsf@sykes.suse.de>
It is close but rs6000 (PowerPC) has a compare instruction, not an
`equal to' instruction.
I think the way to have (set (reg 12) (eq (reg 10) (reg 11)) be `equal
r10, r11, r12' and then have
(set (pc) (if_then_else (eq (reg 12) (const_int 1)) (label_reg (label))
(pc))) be `branch_if_true r12, label'
and (set (pc) (if_then_else (eq (reg 12) (const_int 0)) (label_reg
(label)) (pc))) be `branch_if_false r12, label'
Thanks,
Andrew Pinski
On Wednesday, May 14, 2003, at 09:59 US/Eastern, Andreas Schwab wrote:
> "Fred Cook" <fcook377@hotmail.com> writes:
>
> |> Hi,
> |>
> |> My target architecture implements conditional branches like this:
> |>
> |> equal r10, r11, r12 /* r12 = (r10 == r11) */
> |> branch_if_true r12, label
> |>
> |> Now I am looking for hits to implement this my gcc port. Also
> |> references to ports where branches are clearly implemented and
> |> branches are similar to the branches of my architecture are
> |> welcome.
>
> I think the PowerPC architecture is similar.
>
> Andreas.
>
> --
> Andreas Schwab, SuSE Labs, schwab@suse.de
> SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
> Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>
>
next prev parent reply other threads:[~2003-05-14 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 13:13 Fred Cook
2003-05-14 13:59 ` Andreas Schwab
2003-05-14 14:10 ` Andrew Pinski [this message]
2003-05-14 16:23 ` Falk Hueffner
2003-05-14 21:23 ` Geoff Keating
2003-05-14 16:17 Bonzini
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=DCDA0E2B-8615-11D7-894C-000393A6D2F2@physics.uc.edu \
--to=pinskia@physics.uc.edu \
--cc=fcook377@hotmail.com \
--cc=gcc@gcc.gnu.org \
--cc=schwab@suse.de \
/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).