summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-09-20 17:03:43 -0700
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2021-09-28 08:21:42 -0700
commitd06858f7b1f5cd97bd20c814890e3040cdd28ae1 (patch)
tree987b8c742efa7b569a2dccdf3486961ba957ac05 /meta-microblaze/recipes-devtools
parent98e06df8c006b1da293dcd503da28cb9f6e7fed3 (diff)
downloadmeta-xilinx-d06858f7b1f5cd97bd20c814890e3040cdd28ae1.tar.gz
meta-microblaze: Fix GCC issue where additional loops were added
Due to latest changes in GCC-10.2 MB64 perforamance has reduced We have added zero_extended instructions to get rid of left shift and right shift loops Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-microblaze/recipes-devtools')
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0056-patch-microblaze64-Add-Zero_extended-instructions.patch57
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-source_11.%.bbappend1
2 files changed, 58 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-patch-microblaze64-Add-Zero_extended-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-patch-microblaze64-Add-Zero_extended-instructions.patch
new file mode 100644
index 00000000..949e6346
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-patch-microblaze64-Add-Zero_extended-instructions.patch
@@ -0,0 +1,57 @@
1From 4096da3ea3765ec9484af719a16074789b8946ee Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilinx.com>
3Date: Mon, 30 Aug 2021 12:13:45 +0530
4Subject: [PATCH] [patch, microblaze64]: Add Zero_extended instructions
5
6Due to latest changes in GCC-10.2 MB64 perforamance has reduced
7We have added zero_extended instructions to get rid of left shift
8and right shift loops
9
10[CR/TSR]: TSR-974519
11
12Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com>
13---
14 gcc/config/microblaze/microblaze.md | 27 +++++++++++++++++++++++++++
15 1 file changed, 27 insertions(+)
16
17diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
18index 71ac46dfb6c..51c2751e6be 100644
19--- a/gcc/config/microblaze/microblaze.md
20+++ b/gcc/config/microblaze/microblaze.md
21@@ -1191,6 +1191,33 @@
22 (set_attr "mode" "SI,SI,SI")
23 (set_attr "length" "4,4,8")])
24
25+(define_insn "zero_extendhidi2"
26+ [(set (match_operand:DI 0 "register_operand" "=d")
27+ (zero_extend:DI (match_operand:HI 1 "register_operand" "d")))]
28+ "TARGET_MB_64"
29+ "andli\t%0,%1,0xffff"
30+ [(set_attr "type" "no_delay_arith")
31+ (set_attr "mode" "DI")
32+ (set_attr "length" "8")])
33+
34+(define_insn "zero_extendsidi2"
35+ [(set (match_operand:DI 0 "register_operand" "=d")
36+ (zero_extend:DI (match_operand:SI 1 "register_operand" "d")))]
37+ "TARGET_MB_64"
38+ "andli\t%0,%1,0xffffffff"
39+ [(set_attr "type" "no_delay_arith")
40+ (set_attr "mode" "DI")
41+ (set_attr "length" "8")])
42+
43+(define_insn "zero_extendqidi2"
44+ [(set (match_operand:DI 0 "register_operand" "=d")
45+ (zero_extend:DI (match_operand:QI 1 "register_operand" "d")))]
46+ "TARGET_MB_64"
47+ "andli\t%0,%1,0x00ff"
48+ [(set_attr "type" "no_delay_arith")
49+ (set_attr "mode" "DI")
50+ (set_attr "length" "8")])
51+
52 ;;----------------------------------------------------------------
53 ;; Sign extension
54 ;;----------------------------------------------------------------
55--
562.17.1
57
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_11.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_11.%.bbappend
index 16c845cd..a0805425 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-source_11.%.bbappend
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-source_11.%.bbappend
@@ -57,5 +57,6 @@ SRC_URI_append_microblaze = " \
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://0054-Patch-MicroBlaze-Typo-in-the-previous-commits.bsefi-.patch \
59 file://0055-Patch-MicroBlaze.patch \ 59 file://0055-Patch-MicroBlaze.patch \
60 file://0056-patch-microblaze64-Add-Zero_extended-instructions.patch \
60 file://microblaze-mulitlib-hack.patch \ 61 file://microblaze-mulitlib-hack.patch \
61" 62"