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 ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt


Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> Sandra Loosemore <sandra@codesourcery.com> writes:
>> On 12/21/2016 11:54 AM, Yunqiang Su wrote:
>> > By this patch, I add a build-time option ` --with-unfused-madd4=yes/no',
>> > and runtime option -m(no-)unfused-madd4,
>> > to disable generate madd.fmt instructions.
>> 
>> Your patch also needs a documentation change so that the new
>> command-line option is listed in the GCC manual with other MIPS target
>> options.
>
> Any opinions on option names to control this? Is it best to target the specific
> feature that is non-compliant on loongson or apply a general -mfix-loongson
> type option?
>
> I'm not sure I have a strong opinion either way but there do seem to be
> multiple possible variants.

Wasn't sure from this thread whether Loongson simply had a fused
implementation (without intermediate rounding) or whether the
instructions gave numerically incorrect results for some inputs.
It sounds from a later thread like it's generating incorrect results,
is that right?  If so, then FWIW I agree an -mfix option would be more
consistent.  E.g. one of the -mfix-vr4120 errata was an incorrect
integer division result and one of the -mfix-sb1 errata was an incorrect
single-precision float division result.  The latter case could have been
handled by an option to disable DIV.S and DIV.PS, but the -mfix option
gave more control.

If instead the problem is that the instructions are fused then that's
also what the original MIPS 4 parts did, so maybe an option to control
fusedness would make sense.

Thanks,
Richard


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