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] Patch to control the use of integer madd/msub instructions

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:
> 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?

> But -- sorry for the soapbox speech -- it would be better to retune
> so that new options aren't needed.  I'm assuming you're testing against
> the same microarchitecture that the original 74k authors were.  If so,
> it seems like -mimadd is just an option for choosing between two bad
> implementations.  One uses MADD and MSUB unconditionally (contrary to
> the experience of the original authors) and the other never uses it
> at all (contrary to your experience).
> That's not enough reason to reject the patch, just saying :-)

I agree that the 74k should only be using the integer madd/msub
instruction where it makes sense but I think having a flag to allow the
user to override it is still a good thing because the compiler won't
always be right.  Actually, one of my reasons for adding this flag is to
make it easier for me to do 74k runs with and without madd/msub and see
where we are using (but shouldn't) and hopefully improve the current

Steve Ellcey

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