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...@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)'. */