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]
Other format: [Raw text]

Re: [patch, mips] Patch to control the use of integer madd/msub instructions


Steve Ellcey <sellcey@imgtec.com> writes:
> On Sat, 2013-03-23 at 14:50 +0000, Richard Sandiford wrote:
>> This is similar in spirit to -mbranch-likely.  It'd be good for consistency
>> if they were defined in a similar style.  I think that means removing
>> !TARGET_MIPS16 from ISA_HAS_MADD_MSUB and instead having:
>> 
>> #define GENERATE_MADD_MSUB      (TARGET_IMADD && !TARGET_MIPS16)
>> 
>> There would also be:
>> 
>> #define PTF_AVOID_IMADD 0x2
>> 
>> which should be included in the 74k description, and a block similar to
>> the MASK_BRANCHLIKELY one in mips_option_override.  There needs to be
>> documentation in invoke.texi.
>
> I can do it this way if you want, I was using -mllsc as my template for
> how to implement this.  Do you think the -mllsc flag should be
> implemented in the same way as -mbranch-likely?

-mllsc is a little different in that it can be used even when the
ISA doesn't support it (thanks to kernel emulation).  -mimadd isn't
like that though: we only want to use MADD/MSUB if the ISA has it.
So I think it makes sense to leave -mllsc as it is but do -mimadd
in the same way as -mbranch-likely.

Thanks,
Richard


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