Steve Ellcey <[email protected]> writes:
> On Mon, 2013-03-25 at 16:45 +0000, Richard Sandiford wrote:
>
>> -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
>
> OK, Here is a patch that implements -mimadd in the same manner as
> -mbranch-likely.
It still needs the invoke.texi documentation. :-) Looks good otherwise,
just a very small nit:
> -/* Masks that affect tuning.
> -
> - PTF_AVOID_BRANCHLIKELY
> - Set if it is usually not profitable to use branch-likely instructions
> - for this target, typically because the branches are always predicted
> - taken and so incur a large overhead when not taken. */
> -#define PTF_AVOID_BRANCHLIKELY 0x1
> +/* Masks that affect tuning. */
> +
> +/* Set PTF_AVOID_BRANCHLIKELY if is usually not profitable to use
> + branch-likely instructions for this target, typically because
> + the branches are always predicted taken and so incur a large
> + overhead when not taken. */
> +#define PTF_AVOID_BRANCHLIKELY 0x1
> +/* Set PTF_AVOID_IMADD if it is usually not profitable to use the
> + integer madd or msub instructions because of the overhead of
> + getting the result out of the HI/LO registers. */
> +#define PTF_AVOID_IMADD 0x2
It wasn't obvious with just one PTK_*, but the idea was to lay this out
in the same way as the mips-protos.h enums. I.e.:
/* Masks that affect tuning.
PTF_AVOID_BRANCHLIKELY
Set if it is usually not profitable to use branch-likely instructions
for this target, typically because the branches are always predicted
taken and so incur a large overhead when not taken.
PTF_AVOID_IMADD
Set if it is usually not profitable to use the integer MADD or MSUB
instructions because of the overhead of getting the result out of
the HI/LO registers. */
#define PTF_AVOID_BRANCHLIKELY 0x1
#define PTF_AVOID_IMADD 0x2
That's trivial enough not to need a retest, but please post the
invoke.texi patch.
Thanks,
Richard