[v6,1/1] gcc: config: microblaze: fix cpu version check
Checks
Commit Message
The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
instead of strverscmp to check the mcpu version against feature
options. By simply changing the define to use strverscmp,
the new version 10.0 is treated correctly as a higher version
than previous versions.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- No need to create a new microblaze specific version check
routine as strverscmp is the correct solution.
V2->V3:
- Changed mcpu define for microblaze isa testsuite examples.
V3->V4:
- Added ChangeLog
V4->V5:
- Added testsuite ChangeLog
V5->V6:
- Updated testsuite ChangeLog to include all files
---
gcc/ChangeLog | 4 ++++
gcc/config/microblaze/microblaze.cc | 2 +-
gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
.../gcc.target/microblaze/isa/bshift.c | 2 +-
gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
.../gcc.target/microblaze/isa/fcmp1.c | 2 +-
.../gcc.target/microblaze/isa/fcmp2.c | 2 +-
.../gcc.target/microblaze/isa/fcmp3.c | 2 +-
.../gcc.target/microblaze/isa/fcmp4.c | 2 +-
.../gcc.target/microblaze/isa/fcvt.c | 2 +-
.../gcc.target/microblaze/isa/float.c | 2 +-
.../gcc.target/microblaze/isa/fsqrt.c | 2 +-
.../microblaze/isa/mul-bshift-pcmp.c | 2 +-
.../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
.../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
.../gcc.target/microblaze/isa/mulh.c | 2 +-
.../gcc.target/microblaze/isa/nofcmp.c | 2 +-
.../gcc.target/microblaze/isa/nofloat.c | 2 +-
.../gcc.target/microblaze/isa/pcmp.c | 2 +-
.../gcc.target/microblaze/isa/vanilla.c | 2 +-
.../gcc.target/microblaze/microblaze.exp | 2 +-
22 files changed, 46 insertions(+), 20 deletions(-)
Comments
On 10/30/23 10:02, Neal Frager wrote:
> The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
> instead of strverscmp to check the mcpu version against feature
> options. By simply changing the define to use strverscmp,
> the new version 10.0 is treated correctly as a higher version
> than previous versions.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
Added to commit message;
Fix incorrect warning with -mcpu=10.0:
warning: '-mxl-multiply-high' can be used only with
'-mcpu=v6.00.a' or greater
> ---
> V1->V2:
> - No need to create a new microblaze specific version check
> routine as strverscmp is the correct solution.
> V2->V3:
> - Changed mcpu define for microblaze isa testsuite examples.
> V3->V4:
> - Added ChangeLog
> V4->V5:
> - Added testsuite ChangeLog
> V5->V6:
> - Updated testsuite ChangeLog to include all files
> ---
> gcc/ChangeLog | 4 ++++
> gcc/config/microblaze/microblaze.cc | 2 +-
> gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
> .../gcc.target/microblaze/isa/bshift.c | 2 +-
> gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp1.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp2.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp3.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp4.c | 2 +-
> .../gcc.target/microblaze/isa/fcvt.c | 2 +-
> .../gcc.target/microblaze/isa/float.c | 2 +-
> .../gcc.target/microblaze/isa/fsqrt.c | 2 +-
> .../microblaze/isa/mul-bshift-pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
> gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
> .../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/mulh.c | 2 +-
> .../gcc.target/microblaze/isa/nofcmp.c | 2 +-
> .../gcc.target/microblaze/isa/nofloat.c | 2 +-
> .../gcc.target/microblaze/isa/pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/vanilla.c | 2 +-
> .../gcc.target/microblaze/microblaze.exp | 2 +-
> 22 files changed, 46 insertions(+), 20 deletions(-)
Committed.
Hi Michael,
> The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
> instead of strverscmp to check the mcpu version against feature
> options. By simply changing the define to use strverscmp, the new
> version 10.0 is treated correctly as a higher version than previous
> versions.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Added to commit message;
> Fix incorrect warning with -mcpu=10.0:
> warning: '-mxl-multiply-high' can be used only with
> '-mcpu=v6.00.a' or greater
> ---
> V1->V2:
> - No need to create a new microblaze specific version check
> routine as strverscmp is the correct solution.
> V2->V3:
> - Changed mcpu define for microblaze isa testsuite examples.
> V3->V4:
> - Added ChangeLog
> V4->V5:
> - Added testsuite ChangeLog
> V5->V6:
> - Updated testsuite ChangeLog to include all files
> ---
> gcc/ChangeLog | 4 ++++
> gcc/config/microblaze/microblaze.cc | 2 +-
> gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
> .../gcc.target/microblaze/isa/bshift.c | 2 +-
> gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp1.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp2.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp3.c | 2 +-
> .../gcc.target/microblaze/isa/fcmp4.c | 2 +-
> .../gcc.target/microblaze/isa/fcvt.c | 2 +-
> .../gcc.target/microblaze/isa/float.c | 2 +-
> .../gcc.target/microblaze/isa/fsqrt.c | 2 +-
> .../microblaze/isa/mul-bshift-pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
> gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
> .../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/mulh.c | 2 +-
> .../gcc.target/microblaze/isa/nofcmp.c | 2 +-
> .../gcc.target/microblaze/isa/nofloat.c | 2 +-
> .../gcc.target/microblaze/isa/pcmp.c | 2 +-
> .../gcc.target/microblaze/isa/vanilla.c | 2 +-
> .../gcc.target/microblaze/microblaze.exp | 2 +-
> 22 files changed, 46 insertions(+), 20 deletions(-)
> Committed.
Did you commit this patch? I only see the ChangeLog files have been
updated by your commit.
Am I missing something?
Best regards,
Neal Frager
AMD
On 10/31/23 09:41, Frager, Neal wrote:
> Hi Michael,
>
>> The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
>> instead of strverscmp to check the mcpu version against feature
>> options. By simply changing the define to use strverscmp, the new
>> version 10.0 is treated correctly as a higher version than previous
>> versions.
>>
>> Signed-off-by: Neal Frager <neal.frager@amd.com>
>
>> Added to commit message;
>> Fix incorrect warning with -mcpu=10.0:
>> warning: '-mxl-multiply-high' can be used only with
>> '-mcpu=v6.00.a' or greater
>
>> ---
>> V1->V2:
>> - No need to create a new microblaze specific version check
>> routine as strverscmp is the correct solution.
>> V2->V3:
>> - Changed mcpu define for microblaze isa testsuite examples.
>> V3->V4:
>> - Added ChangeLog
>> V4->V5:
>> - Added testsuite ChangeLog
>> V5->V6:
>> - Updated testsuite ChangeLog to include all files
>> ---
>> gcc/ChangeLog | 4 ++++
>> gcc/config/microblaze/microblaze.cc | 2 +-
>> gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
>> .../gcc.target/microblaze/isa/bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp1.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp2.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp3.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp4.c | 2 +-
>> .../gcc.target/microblaze/isa/fcvt.c | 2 +-
>> .../gcc.target/microblaze/isa/float.c | 2 +-
>> .../gcc.target/microblaze/isa/fsqrt.c | 2 +-
>> .../microblaze/isa/mul-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
>> .../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mulh.c | 2 +-
>> .../gcc.target/microblaze/isa/nofcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/nofloat.c | 2 +-
>> .../gcc.target/microblaze/isa/pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/vanilla.c | 2 +-
>> .../gcc.target/microblaze/microblaze.exp | 2 +-
>> 22 files changed, 46 insertions(+), 20 deletions(-)
>
>> Committed.
>
> Did you commit this patch? I only see the ChangeLog files have been
> updated by your commit.
>
> Am I missing something?
Somehow only the ChangeLogs, which required manual editing, were
marked to be added. I'll add the other files.
On 10/31/23 09:41, Frager, Neal wrote:
> Hi Michael,
>
>> The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
>> instead of strverscmp to check the mcpu version against feature
>> options. By simply changing the define to use strverscmp, the new
>> version 10.0 is treated correctly as a higher version than previous
>> versions.
>>
>> Signed-off-by: Neal Frager <neal.frager@amd.com>
>
>> Added to commit message;
>> Fix incorrect warning with -mcpu=10.0:
>> warning: '-mxl-multiply-high' can be used only with
>> '-mcpu=v6.00.a' or greater
>
>> ---
>> V1->V2:
>> - No need to create a new microblaze specific version check
>> routine as strverscmp is the correct solution.
>> V2->V3:
>> - Changed mcpu define for microblaze isa testsuite examples.
>> V3->V4:
>> - Added ChangeLog
>> V4->V5:
>> - Added testsuite ChangeLog
>> V5->V6:
>> - Updated testsuite ChangeLog to include all files
>> ---
>> gcc/ChangeLog | 4 ++++
>> gcc/config/microblaze/microblaze.cc | 2 +-
>> gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
>> .../gcc.target/microblaze/isa/bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp1.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp2.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp3.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp4.c | 2 +-
>> .../gcc.target/microblaze/isa/fcvt.c | 2 +-
>> .../gcc.target/microblaze/isa/float.c | 2 +-
>> .../gcc.target/microblaze/isa/fsqrt.c | 2 +-
>> .../microblaze/isa/mul-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
>> .../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mulh.c | 2 +-
>> .../gcc.target/microblaze/isa/nofcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/nofloat.c | 2 +-
>> .../gcc.target/microblaze/isa/pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/vanilla.c | 2 +-
>> .../gcc.target/microblaze/microblaze.exp | 2 +-
>> 22 files changed, 46 insertions(+), 20 deletions(-)
>
>> Committed.
>
> Did you commit this patch? I only see the ChangeLog files have been
> updated by your commit.
>
> Am I missing something?
>
Updated.
> Hi Michael,
>
>> The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp
>> instead of strverscmp to check the mcpu version against feature
>> options. By simply changing the define to use strverscmp, the new
>> version 10.0 is treated correctly as a higher version than previous
>> versions.
>>
>> Signed-off-by: Neal Frager <neal.frager@amd.com>
>
>> Added to commit message;
>> Fix incorrect warning with -mcpu=10.0:
>> warning: '-mxl-multiply-high' can be used only with
>> '-mcpu=v6.00.a' or greater
>
>> ---
>> V1->V2:
>> - No need to create a new microblaze specific version check
>> routine as strverscmp is the correct solution.
>> V2->V3:
>> - Changed mcpu define for microblaze isa testsuite examples.
>> V3->V4:
>> - Added ChangeLog
>> V4->V5:
>> - Added testsuite ChangeLog
>> V5->V6:
>> - Updated testsuite ChangeLog to include all files
>> ---
>> gcc/ChangeLog | 4 ++++
>> gcc/config/microblaze/microblaze.cc | 2 +-
>> gcc/testsuite/ChangeLog | 22 +++++++++++++++++++
>> .../gcc.target/microblaze/isa/bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/div.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp1.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp2.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp3.c | 2 +-
>> .../gcc.target/microblaze/isa/fcmp4.c | 2 +-
>> .../gcc.target/microblaze/isa/fcvt.c | 2 +-
>> .../gcc.target/microblaze/isa/float.c | 2 +-
>> .../gcc.target/microblaze/isa/fsqrt.c | 2 +-
>> .../microblaze/isa/mul-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mul-bshift.c | 2 +-
>> gcc/testsuite/gcc.target/microblaze/isa/mul.c | 2 +-
>> .../microblaze/isa/mulh-bshift-pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/mulh.c | 2 +-
>> .../gcc.target/microblaze/isa/nofcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/nofloat.c | 2 +-
>> .../gcc.target/microblaze/isa/pcmp.c | 2 +-
>> .../gcc.target/microblaze/isa/vanilla.c | 2 +-
>> .../gcc.target/microblaze/microblaze.exp | 2 +-
>> 22 files changed, 46 insertions(+), 20 deletions(-)
>
>> Committed.
>
> Did you commit this patch? I only see the ChangeLog files have been
> updated by your commit.
>
> Am I missing something?
>
> Updated.
Thanks!
Best regards,
Neal Frager
AMD
@@ -1,3 +1,7 @@
+2023-10-30 Neal Frager <neal.frager@amd.com>
+
+ * config/microblaze/microblaze.cc: Fix mcpu version check.
+
2023-10-29 Martin Uecker <uecker@tugraz.at>
PR tree-optimization/109334
@@ -56,7 +56,7 @@
/* This file should be included last. */
#include "target-def.h"
-#define MICROBLAZE_VERSION_COMPARE(VA,VB) strcasecmp (VA, VB)
+#define MICROBLAZE_VERSION_COMPARE(VA,VB) strverscmp (VA, VB)
/* Classifies an address.
@@ -1,3 +1,25 @@
+2023-10-30 Neal Frager <neal.frager@amd.com>
+
+ * gcc.target/microblaze/isa/bshift.c: Bump to mcpu=v10.0.
+ * gcc.target/microblaze/isa/div.c: Ditto.
+ * gcc.target/microblaze/isa/fcmp1.c: Ditto.
+ * gcc.target/microblaze/isa/fcmp2.c: Ditto.
+ * gcc.target/microblaze/isa/fcmp3.c: Ditto.
+ * gcc.target/microblaze/isa/fcmp4.c: Ditto.
+ * gcc.target/microblaze/isa/fcvt.c: Ditto.
+ * gcc.target/microblaze/isa/float.c: Ditto.
+ * gcc.target/microblaze/isa/fsqrt.c: Ditto.
+ * gcc.target/microblaze/isa/mul-bshift-pcmp.c: Ditto.
+ * gcc.target/microblaze/isa/mul-bshift.c: Ditto.
+ * gcc.target/microblaze/isa/mul.c: Ditto.
+ * gcc.target/microblaze/isa/mulh-bshift-pcmp.c: Ditto.
+ * gcc.target/microblaze/isa/mulh.c: Ditto.
+ * gcc.target/microblaze/isa/nofcmp.c: Ditto.
+ * gcc.target/microblaze/isa/nofloat.c: Ditto.
+ * gcc.target/microblaze/isa/pcmp.c: Ditto.
+ * gcc.target/microblaze/isa/vanilla.c: Ditto.
+ * gcc.target/microblaze/microblaze.exp: Ditto.
+
2023-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/110712
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mxl-barrel-shift" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mxl-barrel-shift" } */
volatile int m1, m2, m3;
volatile unsigned int u1, u2, u3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mno-xl-soft-div" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mno-xl-soft-div" } */
volatile int m1, m2, m3;
volatile long l1, l2;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float" } */
void float_func(float f1, float f2, float f3)
{
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float -mxl-float-convert" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float -mxl-float-convert" } */
int float_func (float f)
{
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float -mxl-float-sqrt" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mhard-float -mxl-float-sqrt" } */
#include <math.h>
float sqrt_func (float f)
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mxl-barrel-shift -mno-xl-soft-mul -mxl-pattern-compare" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mxl-barrel-shift -mno-xl-soft-mul -mxl-pattern-compare" } */
volatile int m1, m2, m3;
volatile unsigned int u1, u2, u3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mxl-barrel-shift -mno-xl-soft-mul" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mxl-barrel-shift -mno-xl-soft-mul" } */
volatile int m1, m2, m3;
volatile unsigned int u1, u2, u3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mno-xl-soft-mul" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mno-xl-soft-mul" } */
volatile int m1, m2, m3;
volatile long l1, l2;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mxl-barrel-shift -mno-xl-soft-mul -mxl-pattern-compare -mxl-multiply-high" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mxl-barrel-shift -mno-xl-soft-mul -mxl-pattern-compare -mxl-multiply-high" } */
volatile int m1, m2, m3;
volatile unsigned int u1, u2, u3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mno-xl-soft-mul -mxl-multiply-high" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mno-xl-soft-mul -mxl-multiply-high" } */
volatile int m1, m2, m3;
volatile unsigned int u1, u2, u3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a " } */
+/* { dg-options "-O3 -mcpu=v10.0" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -msoft-float" } */
+/* { dg-options "-O3 -mcpu=v10.0 -msoft-float" } */
volatile float f1, f2, f3;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mxl-pattern-compare" } */
+/* { dg-options "-O3 -mcpu=v10.0 -mxl-pattern-compare" } */
volatile int m1, m2, m3;
volatile long l1, l2;
@@ -1,4 +1,4 @@
-/* { dg-options "-O3 -mcpu=v6.00.a -mcpu=v6.00.a" } */
+/* { dg-options "-O3 -mcpu=v10.0" } */
volatile int m1, m2, m3;
volatile long l1, l2;
@@ -49,7 +49,7 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/isa/*.\[cSi\]]] \
${default_c_flags} ""
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/others/*.\[cSi\]]] \
- "" "-mcpu=v6.00.a"
+ "" "-mcpu=v10.0"
# All done.