diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 8642d27..09dd79c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -9588,6 +9592,10 @@ mips_hard_regno_mode_ok_p (unsigned int regno, enum machine_mode mode)
   if (GP_REG_P (regno))
     return ((regno - GP_REG_FIRST) & 1) == 0 || size <= UNITS_PER_WORD;
 
+  /* Add for loongson3a and 3b not to use odd number register when in O32 abi*/
+  if (FP_REG_P (regno) &&  ((regno - FP_REG_FIRST) % 2 == 1) && (size == 4) && (mips_abi == ABI_32))
+        return false;
+
   if (FP_REG_P (regno)
       && (((regno - FP_REG_FIRST) % MAX_FPRS_PER_FMT) == 0
          || (MIN_FPRS_PER_FMT == 1 && size <= UNITS_PER_FPREG)))

本页面最后修改于2016年7月21日 (星期四) 20:43。

© 2017 by 龙芯开源社区 • Powered by MediaWiki