How to implement branches?
Geoff Keating
geoffk@geoffk.org
Wed May 14 21:23:00 GMT 2003
"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.
MIPS is similar to this.
You'd represent this in RTL as
(set (reg:SI r12) (eq:SI (reg:SI r10) (reg:SI r11)))
(set (pc) (if_then_else (eq (reg:SI 12) (const_int 1)) (label) (pc)))
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list