From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15454 invoked by alias); 14 May 2003 14:10:56 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15434 invoked from network); 14 May 2003 14:10:56 -0000 Received: from unknown (HELO dellpi.pinski.fam) (216.196.136.17) by sources.redhat.com with SMTP; 14 May 2003 14:10:56 -0000 Received: from physics.uc.edu (IDENT:pinskia@localhost.pinski.fam [127.0.0.1]) by dellpi.pinski.fam (8.12.2/8.12.1) with ESMTP id h4EEApMJ027629; Wed, 14 May 2003 10:10:53 -0400 (EDT) Date: Wed, 14 May 2003 14:10:00 -0000 Subject: Re: How to implement branches? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: Andrew Pinski , "Fred Cook" , gcc@gcc.gnu.org To: Andreas Schwab From: Andrew Pinski In-Reply-To: Message-Id: Content-Transfer-Encoding: quoted-printable X-SW-Source: 2003-05/txt/msg01407.txt.bz2 It is close but rs6000 (PowerPC) has a compare instruction, not an=20 `equal to' instruction. I think the way to have (set (reg 12) (eq (reg 10) (reg 11)) be `equal=20 r10, r11, r12' and then have (set (pc) (if_then_else (eq (reg 12) (const_int 1)) (label_reg (label))=20 (pc))) be `branch_if_true r12, label' and (set (pc) (if_then_else (eq (reg 12) (const_int 0)) (label_reg=20 (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" writes: > > |> Hi, > |> > |> My target architecture implements conditional branches like this: > |> > |> equal r10, r11, r12 /* r12 =3D (r10 =3D=3D 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. > > --=20 > Andreas Schwab, SuSE Labs, schwab@suse.de > SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N=FCrnberg > Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." > >