This is the mail archive of the
mailing list for the GCC project.
Re: [patch, mips] Patch to control the use of integer madd/msub instructions
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Mar 2013 16:45:53 +0000
- Subject: Re: [patch, mips] Patch to control the use of integer madd/msub instructions
- References: <200323ec-7686-44f6-a5de-edc726909141 at BAMAIL02 dot ba dot imgtec dot org> <87hak241ce dot fsf at talisman dot default> <1364227928 dot 18314 dot 120 dot camel at ubuntu-sellcey>
Steve Ellcey <email@example.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.