This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,gcc/MIPS] Make loongson3a use fused madd.d
- From: Paul Hua <paul dot hua dot gm at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Matthew Fortune <matthew dot fortune at imgtec dot com>, catherine_moore at mentor dot com
- Date: Thu, 3 Nov 2016 10:27:21 +0800
- Subject: [PATCH,gcc/MIPS] Make loongson3a use fused madd.d
- Authentication-results: sourceware.org; auth=none
Hi,
Loongson3a has 4 operand fused madd instrcution. This patch set
loongson3a use fused madd.d.
ChangeLog :
*** gcc/ChangeLog ***
2016-11-03 Chenghua Xu <paul.hua.gm@gmail.com>
config/mips/
* mips.h: Set loongson3a use fused madd.d.
Tested on loongson3a.
PS: I will soon submit some patches, how can i get a copyright assignment.
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 81862a9..5076a2b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1056,11 +1056,11 @@ struct mips_cpu_info {
/* ISA has 4 operand fused madd instructions of the form
'd = [+-] (a * b [+-] c)'. */
-#define ISA_HAS_FUSED_MADD4 TARGET_MIPS8000
+#define ISA_HAS_FUSED_MADD4 (TARGET_MIPS8000 || TARGET_LOONGSON_3A)
/* ISA has 4 operand unfused madd instructions of the form
'd = [+-] (a * b [+-] c)'. */
-#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 && !TARGET_MIPS8000)
+#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 && !TARGET_MIPS8000 && !TARGET_LOONGSON_3A)
/* ISA has 3 operand r6 fused madd instructions of the form
'c = c [+-] (a * b)'. */