This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Semantics of PARALLEL that sets and uses CC0


Steven Bosscher wrote:

> Forgive me if I overlooked it, but I can't find in the manuals what
> the semantics would be of the following define_expand, from avr.md:
> 
> (define_expand "cbranchsi4"
>   [(parallel [(set (cc0)
>                    (compare (match_operand:SI 1 "register_operand" "")
>                             (match_operand:SI 2 "nonmemory_operand" "")))
>               (clobber (match_scratch:QI 4 ""))])
>    (set (pc)
>         (if_then_else
>               (match_operator 0 "ordered_comparison_operator" [(cc0)
>                                                                (const_int 0)])
>               (label_ref (match_operand 3 "" ""))
>               (pc)))]
>  "")
> 
> The expander performs a SET of CC0 in the first pattern inside the
> PARALLEL, and there is a USE of CC0 in the second pattern of the
> PARALLEL.

That's incorrect; the second pattern of the PARALLEL is just a CLOBBER.

The USE of CC0 happens in a completely separate second INSN that is
emitted by this define_expand.  (Note that as opposed to define_insn,
define_expand can emit more than a single insn.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]