This is the mail archive of the gcc-patches@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]

Re: Patch to fix incorrect uses of sets_cc0_p.


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>


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