Skip to contentSkip to conversation

: core3 features are default for core4

PATCH New Vineet Gupta 3 participants 3 messages Sep 10, 2018 – Sep 17, 2018 Synopsys ARC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : core3 features are default for core4

* config/arc/arc.c: object attributes for core4 not reflected correctly
* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes core3)

Signed-off-by Vineet Gupta <vgupta at synopsys.com>
---
 gcc/ChangeLog        | 7 +++++++
 gcc/config/arc/arc.c | 2 +-
 gcc/config/arc/arc.h | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
gcc/ChangeLog +7 -0
index 6dbe8147b3ec..3a022d156445 100644
@@ -1,3 +1,10 @@
+2018-09-10  Vineet Gupta <vgupta at synopsys.com>
+
+	* config/arc/arc.c: object attributes for core4 not reflected
+	correctly
+	* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
+	core3)
+
 2018-09-09  Uros Bizjak  <ubizjak at gmail.com>
 
 	* config/i386/i386.md (float partial SSE register stall splitter): Move
gcc/config/arc/arc.c +1 -1
index c186e02e0f18..0171e8a7c615 100644
@@ -5181,7 +5181,7 @@ static void arc_file_start (void)
 	       TARGET_OPTFPE ? 1 : 0);
   if (TARGET_V2)
     asm_fprintf (asm_out_file, "\t.arc_attribute Tag_ARC_CPU_variation, %d\n",
-		 arc_tune == ARC_TUNE_CORE_3 ? 3 : 2);
+		 arc_tune < ARC_TUNE_CORE_3 ? 2 : (arc_tune == ARC_TUNE_CORE_3 ? 3 : 4) );
 }
 
 /* Implement `TARGET_ASM_FILE_END'.  */
gcc/config/arc/arc.h +1 -1
index de09b6b2f09e..4d38f9ec174f 100644
@@ -1636,6 +1636,6 @@ enum
 #define TARGET_FPX_QUARK    (TARGET_EM && TARGET_SPFP		\
 			     && (arc_fpu_build == FPX_QK))
 /* DBNZ support is available for ARCv2 core3 cpus.  */
-#define TARGET_DBNZ (TARGET_V2 && (arc_tune == ARC_TUNE_CORE_3))
+#define TARGET_DBNZ (TARGET_V2 && (arc_tune >= ARC_TUNE_CORE_3))
 
 #endif /* GCC_ARC_H */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 : core3 features are default for core4

Quoted 15 lines · Vineet Gupta

* config/arc/arc.c: object attributes for core4 not reflected correctly
* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes core3)

Signed-off-by Vineet Gupta <vgupta at synopsys.com>
---
 gcc/ChangeLog        | 7 +++++++
 gcc/config/arc/arc.c | 2 +-
 gcc/config/arc/arc.h | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
gcc/ChangeLog +0 -0
index 6dbe8147b3ec..3a022d156445 100644

gcc/ChangeLog line 6

Quoted 6 lines
gcc/ChangeLog +6 -0
@@ -1,3 +1,10 @@
+2018-09-10  Vineet Gupta <vgupta at synopsys.com>
+
+	* config/arc/arc.c: object attributes for core4 not reflected
+	correctly
+	* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
+	core3)

These entries should be formatted as sentences with capital letter and full stop.

Quoted 22 lines
gcc/ChangeLog +1 -0
+
 2018-09-09  Uros Bizjak  <ubizjak at gmail.com>
 
 	* config/i386/i386.md (float partial SSE register stall splitter): Move
gcc/config/arc/arc.c +1 -1
index c186e02e0f18..0171e8a7c615 100644
@@ -5181,7 +5181,7 @@ static void arc_file_start (void)
 	       TARGET_OPTFPE ? 1 : 0);
   if (TARGET_V2)
     asm_fprintf (asm_out_file, "\t.arc_attribute Tag_ARC_CPU_variation, %d\n",
-		 arc_tune == ARC_TUNE_CORE_3 ? 3 : 2);
+		 arc_tune < ARC_TUNE_CORE_3 ? 2 : (arc_tune == ARC_TUNE_CORE_3 ? 3 : 4) );
 }
 
 /* Implement `TARGET_ASM_FILE_END'.  */
gcc/config/arc/arc.h +0 -0
index de09b6b2f09e..4d38f9ec174f 100644

gcc/config/arc/arc.h enum · line 1639

Quoted 5 lines
gcc/config/arc/arc.h +1 -1
@@ -1636,6 +1636,6 @@ enum
 #define TARGET_FPX_QUARK    (TARGET_EM && TARGET_SPFP		\
 			     && (arc_fpu_build == FPX_QK))
 /* DBNZ support is available for ARCv2 core3 cpus.  */
-#define TARGET_DBNZ (TARGET_V2 && (arc_tune == ARC_TUNE_CORE_3))
+#define TARGET_DBNZ (TARGET_V2 && (arc_tune >= ARC_TUNE_CORE_3))

Could you update the comment too please.

Otherwise, looks fine.

Thanks,
Andrew

Quoted 5 lines
gcc/config/arc/arc.h +0 -0
 #endif /* GCC_ARC_H */
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/1 : core3 features are default for core4

Committed with the suggested mods.

Thank you Andrew for your review,
Claudiu
________________________________________
From: Andrew Burgess [[email protected]]
Sent: Tuesday, September 11, 2018 5:23 PM
To: Vineet Gupta
Cc: Claudiu.Zissulescu at synopsys.com; gcc-patches at gcc.gnu.org; linux-snps-arc at lists.infradead.org
Subject: Re: [PATCH] [ARC]: core3 features are default for core4

Quoted 15 lines · Vineet Gupta

* config/arc/arc.c: object attributes for core4 not reflected correctly
* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes core3)

Signed-off-by Vineet Gupta <vgupta at synopsys.com>
---
 gcc/ChangeLog        | 7 +++++++
 gcc/config/arc/arc.c | 2 +-
 gcc/config/arc/arc.h | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
gcc/ChangeLog +0 -0
index 6dbe8147b3ec..3a022d156445 100644

gcc/ChangeLog line 6

Quoted 6 lines
gcc/ChangeLog +6 -0
@@ -1,3 +1,10 @@
+2018-09-10  Vineet Gupta <vgupta at synopsys.com>
+
+     * config/arc/arc.c: object attributes for core4 not reflected
+     correctly
+     * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
+     core3)

These entries should be formatted as sentences with capital letter and full stop.

Quoted 22 lines
gcc/ChangeLog +1 -0
+
 2018-09-09  Uros Bizjak  <ubizjak at gmail.com>
 
      * config/i386/i386.md (float partial SSE register stall splitter): Move
gcc/config/arc/arc.c +1 -1
index c186e02e0f18..0171e8a7c615 100644
@@ -5181,7 +5181,7 @@ static void arc_file_start (void)
             TARGET_OPTFPE ? 1 : 0);
   if (TARGET_V2)
     asm_fprintf (asm_out_file, "\t.arc_attribute Tag_ARC_CPU_variation, %d\n",
-              arc_tune == ARC_TUNE_CORE_3 ? 3 : 2);
+              arc_tune < ARC_TUNE_CORE_3 ? 2 : (arc_tune == ARC_TUNE_CORE_3 ? 3 : 4) );
 }
 
 /* Implement `TARGET_ASM_FILE_END'.  */
gcc/config/arc/arc.h +0 -0
index de09b6b2f09e..4d38f9ec174f 100644

gcc/config/arc/arc.h enum · line 1639

Quoted 5 lines
gcc/config/arc/arc.h +1 -1
@@ -1636,6 +1636,6 @@ enum
 #define TARGET_FPX_QUARK    (TARGET_EM && TARGET_SPFP                \
                           && (arc_fpu_build == FPX_QK))
 /* DBNZ support is available for ARCv2 core3 cpus.  */
-#define TARGET_DBNZ (TARGET_V2 && (arc_tune == ARC_TUNE_CORE_3))
+#define TARGET_DBNZ (TARGET_V2 && (arc_tune >= ARC_TUNE_CORE_3))

Could you update the comment too please.

Otherwise, looks fine.

Thanks,
Andrew

Quoted 5 lines
gcc/config/arc/arc.h +0 -1
 #endif /* GCC_ARC_H */
--

2.7.4