This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to fix incorrect uses of sets_cc0_p.
- To: John Wehle <john at feith dot com>
- Subject: Re: Patch to fix incorrect uses of sets_cc0_p.
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 07 Aug 2001 16:27:57 -0700
- CC: gcc-patches at gcc dot gnu dot org
- References: <200108072239.SAA29316@jwlab.FEITH.COM>
John Wehle <john@feith.com> writes:
> >> It passes make and check on mips-elf and powerpc-eabisim.
> >
> >Those aren't CC0 targets, so your changes are not be usefully
> >tested.
>
> Both the mips and rs6k machine descriptions have patterns which
> mention cc0. For example, mips.md has:
>
> (define_expand "cmpsi"
> [(set (cc0)
> (compare:CC (match_operand:SI 0 "register_operand" "")
> (match_operand:SI 1 "arith_operand" "")))]
> ""
> "
> {
> if (operands[0]) /* avoid unused code message */
> {
> branch_cmp[0] = operands[0];
> branch_cmp[1] = operands[1];
> branch_type = CMP_SI;
> DONE;
> }
> }")
>
> In what sense is it not a CC0 target?
In the sense that the reference cc0 will never really be generated?
The code always hits a DONE, so doesn't output any rtl for cmpsi.
--
- Geoffrey Keating <geoffk@geoffk.org>