This is the mail archive of the 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]
Other format: [Raw text]

Re: [Patch] MIPS - Add 3 operand mul as new attribute to machine description.

David Ung <> writes:
>> > 	* config/mips/ ("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  "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
length attribute.

Applied with those changes, thanks.


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