MIPS: Make loongson3a use fused madd.d
authorChenghua Xu <paul.hua.gm@gmail.com>
Thu, 19 Jan 2017 16:26:32 +0000 (16:26 +0000)
committerMatthew Fortune <mpf@gcc.gnu.org>
Thu, 19 Jan 2017 16:26:32 +0000 (16:26 +0000)
gcc/
* config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
TARGET_LOONGSON_3A.
(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.

From-SVN: r244641

gcc/ChangeLog
gcc/config/mips/mips.h

index f933e1ad240e1aa9fdcb86f6d11d3bdfe2b8859a..e53f9e1a67065a8172aaa9b5760edab5afed9ede 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
+
+       * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
+       TARGET_LOONGSON_3A.
+       (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
+
 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
 
        PR target/78176
index 4205589af459aa1696c85486232514d360aad21f..81032c9f94c471f79f16f88891bf384bc46527d0 100644 (file)
@@ -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)'.  */