diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-31 12:18:41 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@kernel.crashing.org> | 2021-04-06 08:44:04 -0500 |
| commit | fb9f47953ffff82a7ceb5fc9d6beebb9116786be (patch) | |
| tree | 9ce5c0f7cfd04805feee04c31dbb78ddd809eb9c | |
| parent | 6cc7dc94af09ab83c39d0acaabdadcee995bc5d1 (diff) | |
| download | meta-xilinx-fb9f47953ffff82a7ceb5fc9d6beebb9116786be.tar.gz | |
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-.patch | 49 | ||||
| -rw-r--r-- | meta-microblaze/recipes-devtools/gcc/gcc-source_10.%.bbappend | 1 |
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 @@ | |||
| 1 | From 54aa2bf8d84820071de2670504d2e87cc8231c1e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
| 3 | Date: Wed, 31 Mar 2021 17:18:56 +0530 | ||
| 4 | Subject: [PATCH] [Patch,MicroBlaze] : Typo in the previous commits.bsefi/bsifi | ||
| 5 | should be generated only if mcpu is >= 10.0 | ||
| 6 | |||
| 7 | --- | ||
| 8 | gcc/config/microblaze/microblaze.c | 2 +- | ||
| 9 | gcc/config/microblaze/microblaze.md | 4 ++-- | ||
| 10 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c | ||
| 13 | index dac0596bc7d..d72eb7d5898 100644 | ||
| 14 | --- a/gcc/config/microblaze/microblaze.c | ||
| 15 | +++ b/gcc/config/microblaze/microblaze.c | ||
| 16 | @@ -1850,7 +1850,7 @@ microblaze_option_override (void) | ||
| 17 | "%<-mcpu=v8.30.a%>"); | ||
| 18 | TARGET_REORDER = 0; | ||
| 19 | } | ||
| 20 | - ver = microblaze_version_to_int("v10.0"); | ||
| 21 | + ver = ver_int - microblaze_version_to_int("v10.0"); | ||
| 22 | if (ver < 0) | ||
| 23 | { | ||
| 24 | if (TARGET_AREA_OPTIMIZED_2) | ||
| 25 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
| 26 | index 93de8d831fd..71ac46dfb6c 100644 | ||
| 27 | --- a/gcc/config/microblaze/microblaze.md | ||
| 28 | +++ b/gcc/config/microblaze/microblaze.md | ||
| 29 | @@ -3598,7 +3598,7 @@ else | ||
| 30 | (zero_extract:SI (match_operand:SI 1 "register_operand" "r") | ||
| 31 | (match_operand:SI 2 "immediate_operand" "I") | ||
| 32 | (match_operand:SI 3 "immediate_operand" "I")))] | ||
| 33 | - "TARGET_BARREL_SHIFT && (UINTVAL (operands[2]) > 0) | ||
| 34 | + "TARGET_HAS_BITFIELD && (UINTVAL (operands[2]) > 0) | ||
| 35 | && ((UINTVAL (operands[2]) + UINTVAL (operands[3])) <= 32)" | ||
| 36 | "bsefi %0,%1,%2,%3" | ||
| 37 | [(set_attr "type" "bshift") | ||
| 38 | @@ -3630,7 +3630,7 @@ else | ||
| 39 | (match_operand:SI 1 "immediate_operand" "I") | ||
| 40 | (match_operand:SI 2 "immediate_operand" "I")) | ||
| 41 | (match_operand:SI 3 "register_operand" "r"))] | ||
| 42 | - "TARGET_BARREL_SHIFT && UINTVAL (operands[1]) > 0 | ||
| 43 | + "TARGET_HAS_BITFIELD && UINTVAL (operands[1]) > 0 | ||
| 44 | && UINTVAL (operands[1]) + UINTVAL (operands[2]) <= 32" | ||
| 45 | "bsifi %0, %3, %1, %2" | ||
| 46 | [(set_attr "type" "bshift") | ||
| 47 | -- | ||
| 48 | 2.17.1 | ||
| 49 | |||
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 = " \ | |||
| 55 | file://0051-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch \ | 55 | file://0051-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch \ |
| 56 | file://0052-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch \ | 56 | file://0052-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch \ |
| 57 | file://0053-Patch-microblaze-Reducing-Stack-space-for-arguments.patch \ | 57 | file://0053-Patch-microblaze-Reducing-Stack-space-for-arguments.patch \ |
| 58 | file://0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch \ | ||
| 58 | file://microblaze-mulitlib-hack.patch \ | 59 | file://microblaze-mulitlib-hack.patch \ |
| 59 | " | 60 | " |
