C-SKY: Bug fix for bad setting of TARGET_DSP and TARGET_DIV.
authorGeng Qi <gengqi@linux.alibaba.com>
Mon, 24 May 2021 12:22:54 +0000 (20:22 +0800)
committerXianmiao Qu <xianmiao_qu@c-sky.com>
Tue, 25 May 2021 06:07:20 +0000 (14:07 +0800)
gcc/ChangeLog:

* config/csky/csky.c (csky_option_override):
Init csky_arch_isa_features[] in advance, so TARGET_DSP
and TARGET_DIV can be set well.

gcc/config/csky/csky.c

index b2160b9..1a6cfd7 100644 (file)
@@ -2680,6 +2680,18 @@ csky_option_override (void)
       TARGET_FDIVDU = 0;
     }
 
+  /* Initialize boolean versions of the architectural flags, for use
+     in the .md file.  */
+
+#undef CSKY_ISA
+#define CSKY_ISA(IDENT, DESC)                                            \
+  {                                                                      \
+    csky_arch_isa_features[CSKY_ISA_FEATURE_GET (IDENT)] =                \
+      bitmap_bit_p (csky_active_target.isa, CSKY_ISA_FEATURE_GET (IDENT)); \
+  }
+#include "csky_isa.def"
+#undef CSKY_ISA
+
   /* Extended LRW instructions are enabled by default on CK801, disabled
      otherwise.  */
   if (TARGET_ELRW == -1)
@@ -2752,18 +2764,6 @@ csky_option_override (void)
       TARGET_MULTIPLE_STLD = 0;
     }
 
-  /* Initialize boolean versions of the architectural flags, for use
-     in the .md file.  */
-
-#undef CSKY_ISA
-#define CSKY_ISA(IDENT, DESC)                                            \
-  {                                                                      \
-    csky_arch_isa_features[CSKY_ISA_FEATURE_GET (IDENT)] =                \
-      bitmap_bit_p (csky_active_target.isa, CSKY_ISA_FEATURE_GET (IDENT)); \
-  }
-#include "csky_isa.def"
-#undef CSKY_ISA
-
   /* TODO  */
 
   /* Resynchronize the saved target options.  */