summaryrefslogtreecommitdiff
path: root/debian/patches/mips-loongson3a-use-fused-madd.d.diff
blob: c731e521203ed37673e6ff99c7101d76f866769c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 04877b8f39eff7bc35ff4d3bcdd8196ec1449c43 Mon Sep 17 00:00:00 2001
From: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 19 Jan 2017 16:26:32 +0000
Subject: [PATCH] MIPS: Make loongson3a use fused madd.d

gcc/
	* config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
	TARGET_LOONGSON_3A.
	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244641 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          | 6 ++++++
 gcc/config/mips/mips.h | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/gcc/config/mips/mips.h b/src/gcc/config/mips/mips.h
index 4205589af45..81032c9f94c 100644
--- a/src/gcc/config/mips/mips.h
+++ b/src/gcc/config/mips/mips.h
@@ -1066,11 +1066,13 @@ 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)'.  */
-- 
2.11.0