This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Semantics of PARALLEL that sets and uses CC0
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: stevenb dot gcc at gmail dot com (Steven Bosscher)
- Cc: gcc at gcc dot gnu dot org (GCC Mailing List), eric dot weddington at atmel dot com, bonzini at gnu dot org (Paolo Bonzini)
- Date: Mon, 9 Aug 2010 19:39:31 +0200 (CEST)
- Subject: 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