aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-03-31 12:18:41 -0700
committerMark Hatle <mark.hatle@kernel.crashing.org>2021-04-06 08:44:04 -0500
commitfb9f47953ffff82a7ceb5fc9d6beebb9116786be (patch)
tree9ce5c0f7cfd04805feee04c31dbb78ddd809eb9c
parent6cc7dc94af09ab83c39d0acaabdadcee995bc5d1 (diff)
downloadmeta-xilinx-fb9f47953ffff82a7ceb5fc9d6beebb9116786be.tar.gz
meta-xilinx-fb9f47953ffff82a7ceb5fc9d6beebb9116786be.tar.bz2
meta-xilinx-fb9f47953ffff82a7ceb5fc9d6beebb9116786be.zip
meta-microblaze gcc-source: Fix barrel shift for versions under v10.0
Issue reported by Daniel Mack via the meta-xilinx mailing list. Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch49
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch
new file mode 100644
index 00000000..2d53e4b2
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch
@@ -0,0 +1,49 @@
+From 54aa2bf8d84820071de2670504d2e87cc8231c1e Mon Sep 17 00:00:00 2001
+From: Mahesh Bodapati <mbodapat@xilinx.com>
+Date: Wed, 31 Mar 2021 17:18:56 +0530
+Subject: [PATCH] [Patch,MicroBlaze] : Typo in the previous commits.bsefi/bsifi
+ should be generated only if mcpu is >= 10.0
+
+---
+ gcc/config/microblaze/microblaze.c | 2 +-
+ gcc/config/microblaze/microblaze.md | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
+index dac0596bc7d..d72eb7d5898 100644
+--- a/gcc/config/microblaze/microblaze.c
++++ b/gcc/config/microblaze/microblaze.c
+@@ -1850,7 +1850,7 @@ microblaze_option_override (void)
+ "%<-mcpu=v8.30.a%>");
+ TARGET_REORDER = 0;
+ }
+- ver = microblaze_version_to_int("v10.0");
++ ver = ver_int - microblaze_version_to_int("v10.0");
+ if (ver < 0)
+ {
+ if (TARGET_AREA_OPTIMIZED_2)
+diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
+index 93de8d831fd..71ac46dfb6c 100644
+--- a/gcc/config/microblaze/microblaze.md
++++ b/gcc/config/microblaze/microblaze.md
+@@ -3598,7 +3598,7 @@ else
+ (zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+ (match_operand:SI 2 "immediate_operand" "I")
+ (match_operand:SI 3 "immediate_operand" "I")))]
+- "TARGET_BARREL_SHIFT && (UINTVAL (operands[2]) > 0)
++ "TARGET_HAS_BITFIELD && (UINTVAL (operands[2]) > 0)
+ && ((UINTVAL (operands[2]) + UINTVAL (operands[3])) <= 32)"
+ "bsefi %0,%1,%2,%3"
+ [(set_attr "type" "bshift")
+@@ -3630,7 +3630,7 @@ else
+ (match_operand:SI 1 "immediate_operand" "I")
+ (match_operand:SI 2 "immediate_operand" "I"))
+ (match_operand:SI 3 "register_operand" "r"))]
+- "TARGET_BARREL_SHIFT && UINTVAL (operands[1]) > 0
++ "TARGET_HAS_BITFIELD && UINTVAL (operands[1]) > 0
+ && UINTVAL (operands[1]) + UINTVAL (operands[2]) <= 32"
+ "bsifi %0, %3, %1, %2"
+ [(set_attr "type" "bshift")
+--
+2.17.1
+
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend
index f1ba2ea6..2fc9bced 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend
@@ -55,5 +55,6 @@ SRC_URI_append_microblaze = " \
file://0051-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch \
file://0052-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch \
file://0053-Patch-microblaze-Reducing-Stack-space-for-arguments.patch \
+ file://0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch \
file://microblaze-mulitlib-hack.patch \
"