From: Geng Qi Date: Mon, 24 May 2021 12:22:54 +0000 (+0800) Subject: C-SKY: Bug fix for bad setting of TARGET_DSP and TARGET_DIV. X-Git-Tag: upstream/12.2.0~7671 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62fa9cb24a8cfb197717c809c20e69161f464720;p=platform%2Fupstream%2Fgcc.git C-SKY: Bug fix for bad setting of TARGET_DSP and TARGET_DIV. 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. --- diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index b2160b9..1a6cfd7 100644 --- a/gcc/config/csky/csky.c +++ b/gcc/config/csky/csky.c @@ -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. */