[COMMITTED] MIPSr6/math: Use builtin fma and fmaf
Commit Message
From: YunQiang Su <syq@gcc.gnu.org>
MIPSr6 has MADDF.s/MADDF.d instructions, which are fused.
In MIPS ISA, double support can be subsetted. Only FMAF is enabled
for this case.
* sysdeps/mips/fpu/math-use-builtins-fma.h
Signed-off-by: YunQiang Su <syq@gcc.gnu.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
sysdeps/mips/fpu/math-use-builtins-fma.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 sysdeps/mips/fpu/math-use-builtins-fma.h
Comments
On Mon, 24 Jun 2024, Andreas K. Hüttel wrote:
> From: YunQiang Su <syq@gcc.gnu.org>
>
> MIPSr6 has MADDF.s/MADDF.d instructions, which are fused.
>
> In MIPS ISA, double support can be subsetted. Only FMAF is enabled
> for this case.
>
> * sysdeps/mips/fpu/math-use-builtins-fma.h
>
> Signed-off-by: YunQiang Su <syq@gcc.gnu.org>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
It seems odd to me to commit an obsolete change reported to cause actual
compilation errors as well as raising copyright notice concerns where 3
subsequent revisions have been already posted that addressed these issues.
Maciej
Oops. I'm sorry, I must have picked the wrong version by accident. On it...
On June 25, 2024 12:55:41 AM GMT+02:00, "Maciej W. Rozycki" <macro@orcam.me.uk> wrote:
>On Mon, 24 Jun 2024, Andreas K. Hüttel wrote:
>
>> From: YunQiang Su <syq@gcc.gnu.org>
>>
>> MIPSr6 has MADDF.s/MADDF.d instructions, which are fused.
>>
>> In MIPS ISA, double support can be subsetted. Only FMAF is enabled
>> for this case.
>>
>> * sysdeps/mips/fpu/math-use-builtins-fma.h
>>
>> Signed-off-by: YunQiang Su <syq@gcc.gnu.org>
>> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> It seems odd to me to commit an obsolete change reported to cause actual
>compilation errors as well as raising copyright notice concerns where 3
>subsequent revisions have been already posted that addressed these issues.
>
> Maciej
new file mode 100644
@@ -0,0 +1,13 @@
+#if __mips_isa_rev >= 6
+# ifdef __mips_single_float
+# define USE_FMA_BUILTIN 0
+# else
+# define USE_FMA_BUILTIN 1
+# endif
+# define USE_FMAF_BUILTIN 1
+#else
+# define USE_FMA_BUILTIN 0
+# define USE_FMAF_BUILTIN 0
+#endif
+#define USE_FMAL_BUILTIN 0
+#define USE_FMAF128_BUILTIN 0