This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] MIPS - Add 3 operand mul as new attribute to machine description.
David Ung <email@example.com> writes:
>> > * config/mips/mips.md ("type"): Add new attribute for a 3 operand
>> > multiply.
>> > ("mulsi3_mult3"): Set attribute to imul3.
>> > ("muldi3_mult3"): Similarly.
>> There are a few other three-operand multiplication patterns too.
>> Grep for imul in mips.md. "may_clobber_hilo" should also be
>> true for imul3. The patch looks good otherwise.
> yes. I was abit nervious about making some of the other patterns imul3
> as leaving then as imul would be a safe thing to do. But I guess the
> muls patterns are really imul3 and there's no harm changing it since the
> pipeline desc treats them as the same thing (for now).
Yeah, it was the muls and mulhi patterns that I was thinking of.
I notice that your new patch also changed the r4000 patterns, which
do have a GPR destination, but which use 2-operand multiplications
intenally. I think those patterns should still be treated as imul
(although it's a close call) so I simply left those hunks out.
I also left out the TARGET_FIX4000 bit of the change to the
Applied with those changes, thanks.