This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cr logical instruction for powerpc target
>>>>> Gabriel Paubert writes:
Gabriel> On the other hand a few lines later, I don't understand why the length
Gabriel> attributes is larger than what I would naïvely expect:
Gabriel> ;; Same as above, but get the GT bit.
Gabriel> (define_insn "move_from_CR_eq_bit"
Gabriel> [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
Gabriel> (unspec:SI [(match_operand 1 "cc_reg_operand" "y")] UNSPEC_MV_CR_EQ))]
Gabriel> "TARGET_E500"
Gabriel> "mfcr %0\;{rlinm|rlwinm} %0,%0,%D1,1"
Gabriel> [(set_attr "type" "mfcr")
Gabriel> (set_attr "length" "12")])
Gabriel> ^^
Gabriel> Why is it 12 when there are only 2 machine instructions
Gabriel> generated?
Gabriel> Do I miss something (very likely, I've not followed
Gabriel> development very closely in the last 2 years) or is
Gabriel> the length attribute wrong for (almost) all the
Gabriel> patterns which include an mfcr/mfcrf instruction?
I think the "12" on that pattern and others is a left-over from
Geoff's emit_sCOND change in early May 2003 removing an extra cror
instruction generated for SCC instructions. The extra bit twiddling now
should be explicit.
I think it can be changed to "8", but maybe Geoff had a reason for
leaving it "12".
David