summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/gcc/gcc-10
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc/gcc-10')
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch22
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-Testsuite-explicitly-add-fivopts-for-tests-tha.patch30
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0004-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch29
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Testsuite-explicitly-add-fivopts-for-tests-that-depe.patch118
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Update-MicroBlaze-strings-test.patch11
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch18
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch17
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch19
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-atomic-boolean-return-value.patch14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch23
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Added-ashrsi3_with_size_opt.patch15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Fixed-missing-save-of-r18-in-fast_i.patch41
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Use-bralid-for-profiler-calls.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Use-bralid-for-profiler-calls.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Disable-fivopts-by-default.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Disable-fivopts-by-default.patch)11
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Removed-moddi3-routinue.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Removed-moddi3-routinue.patch)17
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Add-INIT_PRIORITY-support.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-INIT_PRIORITY-support.patch)17
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-optimized-lshrsi3.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Add-optimized-lshrsi3.patch)20
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Reducing-Stack-space-for-arguments.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Reducing-Stack-space-for-arguments.patch)65
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Add-cbranchsi4_reg.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-microblaze-Add-cbranchsi4_reg.patch)55
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Modified-trap-instruction.patch29
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0022-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch)35
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0022-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0024-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch)25
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch)34
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0024-Patch-microblaze-8-stage-pipeline-for-microblaze.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-8-stage-pipeline-for-microblaze.patch)46
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-rtl-Optimization-Better-register-pressure-esti.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Patch-rtl-Optimization-Better-register-pressure-esti.patch)18
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0028-Patch-microblaze-Correct-the-const-high-double-immed.patch)34
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch)19
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0028-patch-microblaze-Fix-the-calculation-of-high-word-in.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0030-patch-microblaze-Fix-the-calculation-of-high-word-in.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Patch-microblaze-Add-new-bit-field-instructions.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Patch-microblaze-Add-new-bit-field-instructions.patch)47
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0030-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch)46
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Fixing-the-issue-with-the-builtin_alloc.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Fixing-the-issue-with-the-builtin_alloc.patch)13
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-Microblaze-update-in-constraints-for-bitfield-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-update-in-constraints-for-bitfield-.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Fixing-the-bug-in-the-bit-field-instruction.patch48
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Intial-commit-of-64-bit-Microblaze.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Intial-commit-of-64-bit-Microblaze.patch)108
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Patch-microblaze-Macros-used-in-Xilinx-internal-patc.patch32
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Intial-commit-for-64bit-MB-sources.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Intial-commit-for-64bit-MB-sources.patch)120
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0036-Patch-Microblaze-reverting-the-cost-check-before-pro.patch49
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0036-re-arrangement-of-the-compare-branches.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0042-re-arrangement-of-the-compare-branches.patch)26
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-previous-commit-broke-the-handling-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Patch-Microblaze-previous-commit-broke-the-handling-.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Support-of-multilibs-with-m64.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0044-Patch-Microblaze-Support-of-multilibs-with-m64.patch)12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Fix-various-issues.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0045-Fixed-issues-like.patch)20
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Added-load-store-pattern-movdi-and-also-adding-missi.patch83
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Fixed-below-issues.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0046-Fixed-below-issues.patch)31
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Fix-various.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Added-double-arith-instructions.patch)17
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0042-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0049-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch)16
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0044-extending-the-Dwarf-support-to-64bit-Microblaze.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0050-extending-the-Dwarf-support-to-64bit-Microblaze.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0045-fixing-the-typo-errors-in-umodsi3-file.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0051-fixing-the-typo-errors-in-umodsi3-file.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0046-fixing-the-32bit-LTO-related-issue9-1014024.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0052-fixing-the-32bit-LTO-related-issue9-1014024.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0049-fixing-the-long-long-long-mingw-toolchain-issue.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0055-fixing-the-long-long-long-mingw-toolchain-issue.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0050-Fix-the-MB-64-bug-of-handling-QI-objects.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Fix-the-MB-64-bug-of-handling-QI-objects.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0051-Patch-Microblaze-Check-the-possibiity-of-peephole2-o.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch)14
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0052-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch)26
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Author-Nagaraju-nmekala-xilinx.com.patch)25
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch)8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0055-Added-new-MB-64-single-register-arithmetic-instructi.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Added-new-MB-64-single-register-arithmetic-instructi.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0055-microblaze_linker_script_xilinx_ld.patch16
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0063-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch)10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0056-fix-the-lto-wrapper-issue-on-windows.patch36
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Fix-the-MB-64-bug-of-handling-QI-objects.patch47
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch (renamed from meta-microblaze/recipes-devtools/gcc/gcc-10/0064-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch)21
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch87
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch51
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0058-microblaze-Avoid-UINTPTR_TYPE-macro-redefinition.patch29
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch466
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch51
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Author-Nagaraju-nmekala-xilinx.com.patch479
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch41
74 files changed, 723 insertions, 2295 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch
index 28247daa..af5a65cb 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch
@@ -1,35 +1,29 @@
1From 23e6126392ab228c1d6483c02ffc32b15f00777e Mon Sep 17 00:00:00 2001 1From d2ebb14b318166dd91fe35bf3531d758dcbc995a Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 13:13:57 +0530 3Date: Wed, 11 Jan 2017 13:13:57 +0530
4Subject: [PATCH 01/63] LOCAL]: Testsuite - builtins tests require fpic 4Subject: [PATCH 01/58] [LOCAL]: Testsuite - builtins tests require fpic
5 Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
6 5
7Conflicts: 6Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
8
9 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
10--- 7---
11 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 8 ++++++++ 8 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 5 +++++
12 1 file changed, 8 insertions(+) 9 1 file changed, 5 insertions(+)
13 10
14diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 11diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
15index acb9eac..363ce07 100644 12index 594c9297958..4103d43748d 100644
16--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 13--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
17+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 14+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
18@@ -48,6 +48,14 @@ if { [istarget *-*-eabi*] 15@@ -48,6 +48,11 @@ if { [istarget *-*-eabi*]
19 lappend additional_flags "-Wl,--allow-multiple-definition" 16 lappend additional_flags "-Wl,--allow-multiple-definition"
20 } 17 }
21 18
22+<<<<<<< HEAD
23+=======
24+if [istarget "microblaze*-*-linux*"] { 19+if [istarget "microblaze*-*-linux*"] {
25+ lappend additional_flags "-Wl,-zmuldefs" 20+ lappend additional_flags "-Wl,-zmuldefs"
26+ lappend additional_flags "-fPIC" 21+ lappend additional_flags "-fPIC"
27+} 22+}
28+ 23+
29+>>>>>>> 6ef6e5b... [LOCAL]: Testsuite - builtins tests require fpic
30 foreach src [lsort [find $srcdir/$subdir *.c]] { 24 foreach src [lsort [find $srcdir/$subdir *.c]] {
31 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { 25 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
32 c-torture-execute [list $src \ 26 c-torture-execute [list $src \
33-- 27--
342.7.4 282.17.1
35 29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch
index 8e4a2a32..976896da 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch
@@ -1,10 +1,11 @@
1From e9c8884f473eae307945ceabaa1ff03278236c23 Mon Sep 17 00:00:00 2001 1From 54394232ffbaa9474f8a78c6882f08a48842242e Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 14:31:10 +0530 3Date: Wed, 11 Jan 2017 14:31:10 +0530
4Subject: [PATCH 02/63] [LOCAL]: Quick fail g++.dg/opt/memcpy1.C This 4Subject: [PATCH 02/58] [LOCAL]: Quick fail g++.dg/opt/memcpy1.C
5 particular testcase fails with a timeout. Instead, fail it at compile-time 5
6 for microblaze. This speeds up the testsuite without removing it from the 6This particular testcase fails with a timeout. Instead, fail it
7 FAIL reports. 7at compile-time for microblaze. This speeds up the testsuite without
8removing it from the FAIL reports.
8 9
9Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> 10Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
10--- 11---
@@ -12,7 +13,7 @@ Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 1 file changed, 4 insertions(+) 13 1 file changed, 4 insertions(+)
13 14
14diff --git a/gcc/testsuite/g++.dg/opt/memcpy1.C b/gcc/testsuite/g++.dg/opt/memcpy1.C 15diff --git a/gcc/testsuite/g++.dg/opt/memcpy1.C b/gcc/testsuite/g++.dg/opt/memcpy1.C
15index 3862756..db9f990 100644 16index 3862756083d..db9f990f781 100644
16--- a/gcc/testsuite/g++.dg/opt/memcpy1.C 17--- a/gcc/testsuite/g++.dg/opt/memcpy1.C
17+++ b/gcc/testsuite/g++.dg/opt/memcpy1.C 18+++ b/gcc/testsuite/g++.dg/opt/memcpy1.C
18@@ -4,6 +4,10 @@ 19@@ -4,6 +4,10 @@
@@ -27,5 +28,5 @@ index 3862756..db9f990 100644
27 typedef uint8_t uint8; 28 typedef uint8_t uint8;
28 __extension__ typedef __SIZE_TYPE__ size_t; 29 __extension__ typedef __SIZE_TYPE__ size_t;
29-- 30--
302.7.4 312.17.1
31 32
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-Testsuite-explicitly-add-fivopts-for-tests-tha.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-Testsuite-explicitly-add-fivopts-for-tests-tha.patch
index ef994457..8e6d22db 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-Testsuite-explicitly-add-fivopts-for-tests-tha.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-Testsuite-explicitly-add-fivopts-for-tests-tha.patch
@@ -1,14 +1,12 @@
1From fb4b4d4ecba04859d52a653d7c453df92014dc38 Mon Sep 17 00:00:00 2001 1From f0a446bcb453630d8116b30f542aee79407228ea Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 15:28:38 +0530 3Date: Wed, 11 Jan 2017 15:28:38 +0530
4Subject: [PATCH 03/63] [LOCAL]: Testsuite - explicitly add -fivopts for tests 4Subject: [PATCH 03/58] [LOCAL]: Testsuite - explicitly add -fivopts for tests
5 that depend on it (test gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c doesnt 5 that depend on it
6 exist in 4.6 branch)
7 6
8Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> 7(test gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c doesnt exist in 4.6 branch)
9 8
10Conflicts: 9Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
12--- 10---
13 gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C | 2 +- 11 gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C | 2 +-
14 gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C | 2 +- 12 gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C | 2 +-
@@ -21,7 +19,7 @@ Conflicts:
21 8 files changed, 8 insertions(+), 8 deletions(-) 19 8 files changed, 8 insertions(+), 8 deletions(-)
22 20
23diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C 21diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
24index 438db88..ede883e 100644 22index 438db882043..ede883eb284 100644
25--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C 23--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
26+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C 24+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
27@@ -1,5 +1,5 @@ 25@@ -1,5 +1,5 @@
@@ -32,7 +30,7 @@ index 438db88..ede883e 100644
32 void test (int *b, int *e, int stride) 30 void test (int *b, int *e, int stride)
33 { 31 {
34diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C 32diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
35index 07ff1b7..a09710c 100644 33index cbb6c850baa..34248021c23 100644
36--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C 34--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
37+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C 35+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
38@@ -1,5 +1,5 @@ 36@@ -1,5 +1,5 @@
@@ -43,7 +41,7 @@ index 07ff1b7..a09710c 100644
43 class MinimalVec3 41 class MinimalVec3
44 { 42 {
45diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c 43diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
46index bda2516..22c8a5d 100644 44index bda25167353..22c8a5dcffe 100644
47--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c 45--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
48+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c 46+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
49@@ -1,7 +1,7 @@ 47@@ -1,7 +1,7 @@
@@ -56,7 +54,7 @@ index bda2516..22c8a5d 100644
56 54
57 /* Size of this structure should be sufficiently weird so that no memory 55 /* Size of this structure should be sufficiently weird so that no memory
58diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c 56diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
59index f0770ab..65d74c8 100644 57index f0770abdbbc..65d74c8e620 100644
60--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c 58--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
61+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c 59+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
62@@ -1,7 +1,7 @@ 60@@ -1,7 +1,7 @@
@@ -69,7 +67,7 @@ index f0770ab..65d74c8 100644
69 67
70 /* Size of this structure should be sufficiently weird so that no memory 68 /* Size of this structure should be sufficiently weird so that no memory
71diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c 69diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
72index 5f42857..9bc86ee 100644 70index 5f42857fe13..9bc86ee0d23 100644
73--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c 71--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
74+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c 72+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
75@@ -1,7 +1,7 @@ 73@@ -1,7 +1,7 @@
@@ -82,7 +80,7 @@ index 5f42857..9bc86ee 100644
82 void foo(long); 80 void foo(long);
83 81
84diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c 82diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
85index 50d86a0..1e3eacd 100644 83index 50d86a00485..1e3eacd33d1 100644
86--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c 84--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
87+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c 85+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
88@@ -1,5 +1,5 @@ 86@@ -1,5 +1,5 @@
@@ -93,7 +91,7 @@ index 50d86a0..1e3eacd 100644
93 91
94 void 92 void
95diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c 93diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
96index 2c6cfc6..648e6e6 100644 94index 2c6cfc6f831..648e6e67e80 100644
97--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c 95--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
98+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c 96+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
99@@ -1,5 +1,5 @@ 97@@ -1,5 +1,5 @@
@@ -104,7 +102,7 @@ index 2c6cfc6..648e6e6 100644
104 void vnum_test8(int *data) 102 void vnum_test8(int *data)
105 { 103 {
106diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c 104diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
107index e911bfc..5d3e7e0 100644 105index e911bfcd521..5d3e7e0801a 100644
108--- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c 106--- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
109+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c 107+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
110@@ -1,5 +1,5 @@ 108@@ -1,5 +1,5 @@
@@ -115,5 +113,5 @@ index e911bfc..5d3e7e0 100644
115 /* Slightly changed testcase from PR middle-end/40815. */ 113 /* Slightly changed testcase from PR middle-end/40815. */
116 void bar(char*, char*, int); 114 void bar(char*, char*, int);
117-- 115--
1182.7.4 1162.17.1
119 117
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0004-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0004-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch
index a575b518..4974462c 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0004-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0004-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch
@@ -1,35 +1,30 @@
1From 38022a87b01cf2e36b605d4f6d0faab22a0d2f44 Mon Sep 17 00:00:00 2001 1From f8809fdebc3ef3927695c84224d3446fa13447d6 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 15:46:28 +0530 3Date: Wed, 11 Jan 2017 15:46:28 +0530
4Subject: [PATCH 04/63] [LOCAL]: For dejagnu static testing on qemu, suppress 4Subject: [PATCH 04/58] [LOCAL]: For dejagnu static testing on qemu, suppress
5 warnings about multiple definitions from the test function and libc in line 5 warnings
6 with method used by powerpc. Dynamic linking and using a qemu binary which 6
7 understands sysroot resolves all test failures with builtins 7about multiple definitions from the test function and libc in line
8with method used by powerpc. Dynamic linking and using a qemu binary
9which understands sysroot resolves all test failures with builtins
8 10
9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
10--- 12---
11 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- 13 gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 1 -
12 1 file changed, 4 deletions(-) 14 1 file changed, 1 deletion(-)
13 15
14diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 16diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
15index 363ce07..56b1a9a 100644 17index 4103d43748d..d7c9b281d01 100644
16--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 18--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
17+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp 19+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
18@@ -48,14 +48,10 @@ if { [istarget *-*-eabi*] 20@@ -50,7 +50,6 @@ if { [istarget *-*-eabi*]
19 lappend additional_flags "-Wl,--allow-multiple-definition"
20 }
21 21
22-<<<<<<< HEAD
23-=======
24 if [istarget "microblaze*-*-linux*"] { 22 if [istarget "microblaze*-*-linux*"] {
25 lappend additional_flags "-Wl,-zmuldefs" 23 lappend additional_flags "-Wl,-zmuldefs"
26- lappend additional_flags "-fPIC" 24- lappend additional_flags "-fPIC"
27 } 25 }
28 26
29->>>>>>> 6ef6e5b... [LOCAL]: Testsuite - builtins tests require fpic
30 foreach src [lsort [find $srcdir/$subdir *.c]] { 27 foreach src [lsort [find $srcdir/$subdir *.c]] {
31 if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
32 c-torture-execute [list $src \
33-- 28--
342.7.4 292.17.1
35 30
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch
index 18fd6dec..c21492e8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch
@@ -1,8 +1,8 @@
1From a7dfb5f158f16f88b30aabe903c4fb088889eeef Mon Sep 17 00:00:00 2001 1From 802078fa3e76ea7fdb29f3baf1d4d9baae42bc0b Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 15:50:35 +0530 3Date: Wed, 11 Jan 2017 15:50:35 +0530
4Subject: [PATCH 05/63] [Patch, testsuite]: Add MicroBlaze to target-supports 4Subject: [PATCH 05/58] [Patch, testsuite]: Add MicroBlaze to target-supports
5 for atomic buil. .tin tests 5 for atomic builtin tests
6 6
7MicroBlaze added to supported targets for atomic builtin tests. 7MicroBlaze added to supported targets for atomic builtin tests.
8 8
@@ -19,10 +19,10 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
19 1 file changed, 1 insertion(+) 19 1 file changed, 1 insertion(+)
20 20
21diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 21diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
22index cda0f3d..0a69659e 100644 22index 13761491e63..d2f65dac32c 100644
23--- a/gcc/testsuite/lib/target-supports.exp 23--- a/gcc/testsuite/lib/target-supports.exp
24+++ b/gcc/testsuite/lib/target-supports.exp 24+++ b/gcc/testsuite/lib/target-supports.exp
25@@ -6829,6 +6829,7 @@ proc check_effective_target_sync_int_long { } { 25@@ -7581,6 +7581,7 @@ proc check_effective_target_sync_int_long { } {
26 && [check_effective_target_arm_acq_rel]) 26 && [check_effective_target_arm_acq_rel])
27 || [istarget bfin*-*linux*] 27 || [istarget bfin*-*linux*]
28 || [istarget hppa*-*linux*] 28 || [istarget hppa*-*linux*]
@@ -31,5 +31,5 @@ index cda0f3d..0a69659e 100644
31 || [istarget powerpc*-*-*] 31 || [istarget powerpc*-*-*]
32 || [istarget crisv32-*-*] || [istarget cris-*-*] 32 || [istarget crisv32-*-*] || [istarget cris-*-*]
33-- 33--
342.7.4 342.17.1
35 35
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Testsuite-explicitly-add-fivopts-for-tests-that-depe.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Testsuite-explicitly-add-fivopts-for-tests-that-depe.patch
deleted file mode 100644
index b428d121..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Testsuite-explicitly-add-fivopts-for-tests-that-depe.patch
+++ /dev/null
@@ -1,118 +0,0 @@
1From 7f0a129701ce9809d79ea4618f3293062bd24bbf Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Sat, 26 Aug 2017 19:21:18 -0700
4Subject: [PATCH] Testsuite - explicitly add -fivopts for tests that depend on
5 it
6
7Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
8Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com>
9Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
10Upstream-Status: Pending
11---
12 gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C | 2 +-
13 gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C | 2 +-
14 gcc/testsuite/gcc.dg/tree-ssa/loop-2.c | 2 +-
15 gcc/testsuite/gcc.dg/tree-ssa/loop-4.c | 2 +-
16 gcc/testsuite/gcc.dg/tree-ssa/loop-5.c | 2 +-
17 gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c | 2 +-
18 gcc/testsuite/gcc.dg/tree-ssa/pr19590.c | 2 +-
19 gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c | 2 +-
20 8 files changed, 8 insertions(+), 8 deletions(-)
21
22diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
23index 438db88204..ede883eb28 100644
24--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
25+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
26@@ -1,5 +1,5 @@
27 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
28-/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
29+/* { dg-options "-O2 -fivopts -fdump-tree-ivopts-details" } */
30
31 void test (int *b, int *e, int stride)
32 {
33diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
34index eb72581390..02f3ea4a7d 100644
35--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
36+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-3.C
37@@ -1,5 +1,5 @@
38 // { dg-do compile }
39-// { dg-options "-O2 -fdump-tree-ivopts-details" }
40+// { dg-options "-O2 -fivopts -fdump-tree-ivopts-details" }
41
42 class MinimalVec3
43 {
44diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
45index bda2516735..22c8a5dcff 100644
46--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
47+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
48@@ -1,7 +1,7 @@
49 /* A test for strength reduction and induction variable elimination. */
50
51 /* { dg-do compile } */
52-/* { dg-options "-O1 -fdump-tree-optimized" } */
53+/* { dg-options "-O1 -fivopts -fdump-tree-optimized" } */
54 /* { dg-require-effective-target size32plus } */
55
56 /* Size of this structure should be sufficiently weird so that no memory
57diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
58index f0770abdbb..65d74c8e62 100644
59--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
60+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
61@@ -1,7 +1,7 @@
62 /* A test for strength reduction and induction variable elimination. */
63
64 /* { dg-do compile } */
65-/* { dg-options "-O1 -fdump-tree-optimized" } */
66+/* { dg-options "-O1 -fivopts -fdump-tree-optimized" } */
67 /* { dg-require-effective-target size32plus } */
68
69 /* Size of this structure should be sufficiently weird so that no memory
70diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
71index 5f42857fe1..9bc86ee0d2 100644
72--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
73+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
74@@ -1,7 +1,7 @@
75 /* A test for induction variable merging. */
76
77 /* { dg-do compile } */
78-/* { dg-options "-O1 -fdump-tree-optimized" } */
79+/* { dg-options "-O1 -fivopts -fdump-tree-optimized" } */
80
81 void foo(long);
82
83diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
84index 3c8ee06016..db192a657f 100644
85--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
86+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c
87@@ -1,5 +1,5 @@
88 /* { dg-do compile } */
89-/* { dg-options "-O2 -Wunsafe-loop-optimizations" } */
90+/* { dg-options "-O2 -fivopts -Wunsafe-loop-optimizations" } */
91 extern void g(void);
92
93 void
94diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
95index 2c6cfc6f83..648e6e67e8 100644
96--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
97+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19590.c
98@@ -1,5 +1,5 @@
99 /* { dg-do compile } */
100-/* { dg-options "-O2 -fdump-tree-ivopts" } */
101+/* { dg-options "-O2 -fivopts -fdump-tree-ivopts" } */
102
103 void vnum_test8(int *data)
104 {
105diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
106index e911bfcd52..5d3e7e0801 100644
107--- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
108+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
109@@ -1,5 +1,5 @@
110 /* { dg-do compile } */
111-/* { dg-options "-Os -fdump-tree-optimized" } */
112+/* { dg-options "-Os -fivopts -fdump-tree-optimized" } */
113
114 /* Slightly changed testcase from PR middle-end/40815. */
115 void bar(char*, char*, int);
116--
1172.14.2
118
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Update-MicroBlaze-strings-test.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Update-MicroBlaze-strings-test.patch
index e4a86dc4..9c8cce92 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Update-MicroBlaze-strings-test.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Update-MicroBlaze-strings-test.patch
@@ -1,8 +1,9 @@
1From e23b1a424cfd852f7a33f29c0b80d867ca533c3b Mon Sep 17 00:00:00 2001 1From 8c24cb4f95f46793ac7500a5d6181d93f2b0d2c5 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 11 Jan 2017 16:20:01 +0530 3Date: Wed, 11 Jan 2017 16:20:01 +0530
4Subject: [PATCH 06/63] [Patch, testsuite]: Update MicroBlaze strings test for 4Subject: [PATCH 06/58] [Patch, testsuite]: Update MicroBlaze strings test
5 new scan-assembly output resulting in use of $LC label 5
6for new scan-assembly output resulting in use of $LC label
6 7
7ChangeLog/testsuite 8ChangeLog/testsuite
8 9
@@ -17,7 +18,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
17 1 file changed, 4 insertions(+), 2 deletions(-) 18 1 file changed, 4 insertions(+), 2 deletions(-)
18 19
19diff --git a/gcc/testsuite/gcc.target/microblaze/others/strings1.c b/gcc/testsuite/gcc.target/microblaze/others/strings1.c 20diff --git a/gcc/testsuite/gcc.target/microblaze/others/strings1.c b/gcc/testsuite/gcc.target/microblaze/others/strings1.c
20index 7a63faf..0403b7b 100644 21index 7a63faf79f2..0403b7bdca9 100644
21--- a/gcc/testsuite/gcc.target/microblaze/others/strings1.c 22--- a/gcc/testsuite/gcc.target/microblaze/others/strings1.c
22+++ b/gcc/testsuite/gcc.target/microblaze/others/strings1.c 23+++ b/gcc/testsuite/gcc.target/microblaze/others/strings1.c
23@@ -1,13 +1,15 @@ 24@@ -1,13 +1,15 @@
@@ -39,5 +40,5 @@ index 7a63faf..0403b7b 100644
39 somefunc (string2); 40 somefunc (string2);
40 } 41 }
41-- 42--
422.7.4 432.17.1
43 44
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch
index 8c43de05..4d1e2017 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch
@@ -1,9 +1,11 @@
1From c210044f15df2433438b6b74e5c2bcf79458c2e4 Mon Sep 17 00:00:00 2001 1From 38ece4b2dc5d34c1b88b6ea8dd8e62a0986f8f6c Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:14:15 +0530 3Date: Thu, 12 Jan 2017 16:14:15 +0530
4Subject: [PATCH 07/63] [Patch, testsuite]: Allow MicroBlaze .weakext pattern 4Subject: [PATCH 07/58] [Patch, testsuite]: Allow MicroBlaze .weakext pattern
5 in regex match Extend regex pattern to include optional ext at the end of 5 in regex match
6 .weak to match the MicroBlaze weak label .weakext 6
7Extend regex pattern to include optional ext at the end of
8.weak to match the MicroBlaze weak label .weakext
7 9
8ChangeLog/testsuite 10ChangeLog/testsuite
9 11
@@ -25,7 +27,7 @@ Conflicts:
25 3 files changed, 4 insertions(+), 4 deletions(-) 27 3 files changed, 4 insertions(+), 4 deletions(-)
26 28
27diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C 29diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C
28index 0cc7d3e..f284cd9 100644 30index 0cc7d3e79d0..f284cd9255c 100644
29--- a/gcc/testsuite/g++.dg/abi/rtti3.C 31--- a/gcc/testsuite/g++.dg/abi/rtti3.C
30+++ b/gcc/testsuite/g++.dg/abi/rtti3.C 32+++ b/gcc/testsuite/g++.dg/abi/rtti3.C
31@@ -3,8 +3,8 @@ 33@@ -3,8 +3,8 @@
@@ -40,7 +42,7 @@ index 0cc7d3e..f284cd9 100644
40 // { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } } 42 // { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } }
41 43
42diff --git a/gcc/testsuite/g++.dg/abi/thunk3.C b/gcc/testsuite/g++.dg/abi/thunk3.C 44diff --git a/gcc/testsuite/g++.dg/abi/thunk3.C b/gcc/testsuite/g++.dg/abi/thunk3.C
43index f2347f7..dcec8a7 100644 45index f2347f79ecd..dcec8a771a1 100644
44--- a/gcc/testsuite/g++.dg/abi/thunk3.C 46--- a/gcc/testsuite/g++.dg/abi/thunk3.C
45+++ b/gcc/testsuite/g++.dg/abi/thunk3.C 47+++ b/gcc/testsuite/g++.dg/abi/thunk3.C
46@@ -1,5 +1,5 @@ 48@@ -1,5 +1,5 @@
@@ -51,7 +53,7 @@ index f2347f7..dcec8a7 100644
51 53
52 struct Base 54 struct Base
53diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C 55diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C
54index 6e8f124..d1d34fe 100644 56index 6e8f124bc5e..d1d34fe1e4a 100644
55--- a/gcc/testsuite/g++.dg/abi/thunk4.C 57--- a/gcc/testsuite/g++.dg/abi/thunk4.C
56+++ b/gcc/testsuite/g++.dg/abi/thunk4.C 58+++ b/gcc/testsuite/g++.dg/abi/thunk4.C
57@@ -1,6 +1,6 @@ 59@@ -1,6 +1,6 @@
@@ -63,5 +65,5 @@ index 6e8f124..d1d34fe 100644
63 65
64 struct Base 66 struct Base
65-- 67--
662.7.4 682.17.1
67 69
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch
index d02be316..f96d7d57 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch
@@ -1,10 +1,11 @@
1From 283d8576d2599b3c38814e7c70e3f36ed51df9da Mon Sep 17 00:00:00 2001 1From bc5f423bcfa24aa8c15548379bfc6b3f49e57c15 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:34:27 +0530 3Date: Thu, 12 Jan 2017 16:34:27 +0530
4Subject: [PATCH 08/63] [Patch, testsuite]: Add MicroBlaze to 4Subject: [PATCH 08/58] [Patch, testsuite]: Add MicroBlaze to
5 check_profiling_available Testsuite, add microblaze*-*-* target in 5 check_profiling_available
6 check_profiling_available inline with other archs setting 6
7 profiling_available_saved to 0 7Testsuite, add microblaze*-*-* target in check_profiling_available
8inline with other archs setting profiling_available_saved to 0
8 9
9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 10Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
10--- 11---
@@ -12,10 +13,10 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
12 1 file changed, 1 insertion(+) 13 1 file changed, 1 insertion(+)
13 14
14diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 15diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
15index 0a69659e..d47819c 100644 16index d2f65dac32c..d949fbd8464 100644
16--- a/gcc/testsuite/lib/target-supports.exp 17--- a/gcc/testsuite/lib/target-supports.exp
17+++ b/gcc/testsuite/lib/target-supports.exp 18+++ b/gcc/testsuite/lib/target-supports.exp
18@@ -678,6 +678,7 @@ proc check_profiling_available { test_what } { 19@@ -707,6 +707,7 @@ proc check_profiling_available { test_what } {
19 || [istarget m68k-*-elf] 20 || [istarget m68k-*-elf]
20 || [istarget m68k-*-uclinux*] 21 || [istarget m68k-*-uclinux*]
21 || [istarget mips*-*-elf*] 22 || [istarget mips*-*-elf*]
@@ -24,5 +25,5 @@ index 0a69659e..d47819c 100644
24 || [istarget mn10300-*-elf*] 25 || [istarget mn10300-*-elf*]
25 || [istarget moxie-*-elf*] 26 || [istarget moxie-*-elf*]
26-- 27--
272.7.4 282.17.1
28 29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch
index ae24c080..45d93cee 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch
@@ -1,11 +1,12 @@
1From 1905061b279e6fe5fd9861fc490fd4075edac4a8 Mon Sep 17 00:00:00 2001 1From eeeb8ecda7cb71c033c850ce36162c92c7d0b781 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:41:43 +0530 3Date: Thu, 12 Jan 2017 16:41:43 +0530
4Subject: [PATCH 09/63] [Patch, microblaze]: Fix atomic side effects. In 4Subject: [PATCH 09/58] [Patch, microblaze]: Fix atomic side effects.
5 atomic_compare_and_swapsi, add side effects to prevent incorrect assumptions 5
6 during optimization. Previously, the outputs were considered unused; this 6In atomic_compare_and_swapsi, add side effects to prevent incorrect
7 generated assembly code with undefined side effects after invocation of the 7assumptions during optimization. Previously, the outputs were
8 atomic. 8considered unused; this generated assembly code with
9undefined side effects after invocation of the atomic.
9 10
10Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> 11Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 12Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
@@ -18,7 +19,7 @@ Conflicts:
18 2 files changed, 16 insertions(+), 8 deletions(-) 19 2 files changed, 16 insertions(+), 8 deletions(-)
19 20
20diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 21diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
21index 183afff..7a40c53 100644 22index 7049acd1dcd..eba2776ae56 100644
22--- a/gcc/config/microblaze/microblaze.md 23--- a/gcc/config/microblaze/microblaze.md
23+++ b/gcc/config/microblaze/microblaze.md 24+++ b/gcc/config/microblaze/microblaze.md
24@@ -43,6 +43,9 @@ 25@@ -43,6 +43,9 @@
@@ -32,7 +33,7 @@ index 183afff..7a40c53 100644
32 33
33 (define_c_enum "unspec" [ 34 (define_c_enum "unspec" [
34diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md 35diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md
35index 6f16ca6..bebab5c 100644 36index 76f530b9d3b..24cd67e1fdb 100644
36--- a/gcc/config/microblaze/sync.md 37--- a/gcc/config/microblaze/sync.md
37+++ b/gcc/config/microblaze/sync.md 38+++ b/gcc/config/microblaze/sync.md
38@@ -18,14 +18,19 @@ 39@@ -18,14 +18,19 @@
@@ -64,5 +65,5 @@ index 6f16ca6..bebab5c 100644
64 "" 65 ""
65 { 66 {
66-- 67--
672.7.4 682.17.1
68 69
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-atomic-boolean-return-value.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-atomic-boolean-return-value.patch
index 07a43177..48f77215 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-atomic-boolean-return-value.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-atomic-boolean-return-value.patch
@@ -1,9 +1,11 @@
1From 65bc1969bd652df4bf9d01d30547a947da293550 Mon Sep 17 00:00:00 2001 1From 834448fc3493be56cc6a4f6b504569142f7f6070 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:45:45 +0530 3Date: Thu, 12 Jan 2017 16:45:45 +0530
4Subject: [PATCH 10/63] [Patch, microblaze]: Fix atomic boolean return value. 4Subject: [PATCH 10/58] [Patch, microblaze]: Fix atomic boolean return value.
5 In atomic_compare_and_swapsi, fix boolean return value. Previously, it 5
6 contained zero if successful and non-zero if unsuccessful. 6In atomic_compare_and_swapsi, fix boolean return value.
7Previously, it contained zero if successful and non-zero
8if unsuccessful.
7 9
8Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> 10Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 11Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
@@ -12,7 +14,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
12 1 file changed, 4 insertions(+), 3 deletions(-) 14 1 file changed, 4 insertions(+), 3 deletions(-)
13 15
14diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md 16diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md
15index bebab5c..72eac09 100644 17index 24cd67e1fdb..76c3616c992 100644
16--- a/gcc/config/microblaze/sync.md 18--- a/gcc/config/microblaze/sync.md
17+++ b/gcc/config/microblaze/sync.md 19+++ b/gcc/config/microblaze/sync.md
18@@ -34,15 +34,16 @@ 20@@ -34,15 +34,16 @@
@@ -36,5 +38,5 @@ index bebab5c..72eac09 100644
36 } 38 }
37 ) 39 )
38-- 40--
392.7.4 412.17.1
40 42
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
index b9ba239f..e60e6f2f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
@@ -1,13 +1,14 @@
1From 4e4409f10b450ec9254e69445ffeb8d116906d16 Mon Sep 17 00:00:00 2001 1From 19457459592123c41c3ce9e084e165525e4d7bb0 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:50:17 +0530 3Date: Thu, 12 Jan 2017 16:50:17 +0530
4Subject: [PATCH 11/63] [Patch, microblaze]: Fix the Microblaze crash with 4Subject: [PATCH 11/58] [Patch, microblaze]: Fix the Microblaze crash with
5 msmall-divides flag Compiler is crashing when we use msmall-divides and 5 msmall-divides flag
6 mxl-barrel-shift flag. This is because when use above flags 6
7 microblaze_expand_divide function will be called for division operation. In 7Compiler is crashing when we use msmall-divides and mxl-barrel-shift flag.
8 microblaze_expand_divide function we are using sub_reg but MicroBlaze doesn't 8This is because when use above flags microblaze_expand_divide function will be
9 have subreg register due to this compiler was crashing. Changed the logic to 9called for division operation. In microblaze_expand_divide function we are
10 avoid sub_reg call 10using sub_reg but MicroBlaze doesn't have subreg register due to this compiler
11was crashing. Changed the logic to avoid sub_reg call
11 12
12Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> 13Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
13--- 14---
@@ -15,10 +16,10 @@ Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
15 1 file changed, 1 insertion(+), 2 deletions(-) 16 1 file changed, 1 insertion(+), 2 deletions(-)
16 17
17diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 18diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
18index 55c1bec..ae45038 100644 19index a0f81b71391..0186171c04c 100644
19--- a/gcc/config/microblaze/microblaze.c 20--- a/gcc/config/microblaze/microblaze.c
20+++ b/gcc/config/microblaze/microblaze.c 21+++ b/gcc/config/microblaze/microblaze.c
21@@ -3715,8 +3715,7 @@ microblaze_expand_divide (rtx operands[]) 22@@ -3709,8 +3709,7 @@ microblaze_expand_divide (rtx operands[])
22 mem_rtx = gen_rtx_MEM (QImode, 23 mem_rtx = gen_rtx_MEM (QImode,
23 gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); 24 gen_rtx_PLUS (Pmode, regt1, div_table_rtx));
24 25
@@ -29,5 +30,5 @@ index 55c1bec..ae45038 100644
29 JUMP_LABEL (jump) = div_end_label; 30 JUMP_LABEL (jump) = div_end_label;
30 LABEL_NUSES (div_end_label) = 1; 31 LABEL_NUSES (div_end_label) = 1;
31-- 32--
322.7.4 332.17.1
33 34
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Added-ashrsi3_with_size_opt.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Added-ashrsi3_with_size_opt.patch
index fc47bae6..b9e39928 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Added-ashrsi3_with_size_opt.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Added-ashrsi3_with_size_opt.patch
@@ -1,10 +1,11 @@
1From 6dbeb53f0185dd587ece39d624d193768633a7ab Mon Sep 17 00:00:00 2001 1From 9da28a01ffb778fc5cb5df27332cef21f890a63f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 16:52:56 +0530 3Date: Thu, 12 Jan 2017 16:52:56 +0530
4Subject: [PATCH 12/63] [Patch, microblaze]: Added ashrsi3_with_size_opt Added 4Subject: [PATCH 12/58] [Patch, microblaze]: Added ashrsi3_with_size_opt
5 ashrsi3_with_size_opt pattern to optimize the sra instructions when the -Os 5
6 optimization is used. lshrsi3_with_size_opt is being removed as it has 6Added ashrsi3_with_size_opt pattern to optimize the sra instructions
7 conflicts with unsigned int variables 7when the -Os optimization is used. lshrsi3_with_size_opt is
8being removed as it has conflicts with unsigned int variables
8 9
9Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
10--- 11---
@@ -12,7 +13,7 @@ Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
12 1 file changed, 21 insertions(+) 13 1 file changed, 21 insertions(+)
13 14
14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 15diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
15index 7a40c53..3d2636e 100644 16index eba2776ae56..187ad522dcc 100644
16--- a/gcc/config/microblaze/microblaze.md 17--- a/gcc/config/microblaze/microblaze.md
17+++ b/gcc/config/microblaze/microblaze.md 18+++ b/gcc/config/microblaze/microblaze.md
18@@ -1508,6 +1508,27 @@ 19@@ -1508,6 +1508,27 @@
@@ -44,5 +45,5 @@ index 7a40c53..3d2636e 100644
44 [(set (match_operand:SI 0 "register_operand" "=&d") 45 [(set (match_operand:SI 0 "register_operand" "=&d")
45 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") 46 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
46-- 47--
472.7.4 482.17.1
48 49
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Fixed-missing-save-of-r18-in-fast_i.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Fixed-missing-save-of-r18-in-fast_i.patch
deleted file mode 100644
index 3b4b4c70..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Fixed-missing-save-of-r18-in-fast_i.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 53ab5a3fec283aeb9d2efeb632d423b774192e65 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 17:50:03 +0530
4Subject: [PATCH 13/63] [Patch, microblaze]: Fixed missing save of r18 in
5 fast_interrupt. Register 18 is used as a clobber register, and must be stored
6 when entering a fast_interrupt. Before this fix, register 18 was only saved
7 if it was used directly in the interrupt function.
8
9However, if the fast_interrupt function called a function that used
10r18, the register would not be saved, and thus be mangled
11upon returning from the interrupt.
12
13Changelog
14
152014-02-27 Klaus Petersen <klauspetersen@gmail.com>
16
17 * gcc/config/microblaze/microblaze.c: Check for fast_interrupt in
18 microblaze_must_save_register.
19
20Signed-off-by: Klaus Petersen <klauspetersen@gmail.com>
21Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
22---
23 gcc/config/microblaze/microblaze.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
27index ae45038..c834b49 100644
28--- a/gcc/config/microblaze/microblaze.c
29+++ b/gcc/config/microblaze/microblaze.c
30@@ -2043,7 +2043,7 @@ microblaze_must_save_register (int regno)
31 {
32 if (df_regs_ever_live_p (regno)
33 || regno == MB_ABI_MSR_SAVE_REG
34- || (interrupt_handler
35+ || ((interrupt_handler || fast_interrupt)
36 && (regno == MB_ABI_ASM_TEMP_REGNUM
37 || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM)))
38 return 1;
39--
402.7.4
41
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Use-bralid-for-profiler-calls.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Use-bralid-for-profiler-calls.patch
index 889a1e69..36af2652 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Use-bralid-for-profiler-calls.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Use-bralid-for-profiler-calls.patch
@@ -1,15 +1,15 @@
1From cbf1854e3569122ee1143e6716ff68275c26aced Mon Sep 17 00:00:00 2001 1From 07a5c8b22a1cef99b2d4570ea080c503260161e4 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 10:57:19 +0530 3Date: Tue, 17 Jan 2017 10:57:19 +0530
4Subject: [PATCH 14/63] [Patch, microblaze]: Use bralid for profiler calls 4Subject: [PATCH 13/58] [Patch, microblaze]: Use bralid for profiler calls
5 Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
6 5
6Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
7--- 7---
8 gcc/config/microblaze/microblaze.h | 2 +- 8 gcc/config/microblaze/microblaze.h | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-) 9 1 file changed, 1 insertion(+), 1 deletion(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 11diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
12index fa0806e..0a435b8 100644 12index dc112f5301f..8aa3f155790 100644
13--- a/gcc/config/microblaze/microblaze.h 13--- a/gcc/config/microblaze/microblaze.h
14+++ b/gcc/config/microblaze/microblaze.h 14+++ b/gcc/config/microblaze/microblaze.h
15@@ -486,7 +486,7 @@ typedef struct microblaze_args 15@@ -486,7 +486,7 @@ typedef struct microblaze_args
@@ -22,5 +22,5 @@ index fa0806e..0a435b8 100644
22 } 22 }
23 23
24-- 24--
252.7.4 252.17.1
26 26
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Disable-fivopts-by-default.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Disable-fivopts-by-default.patch
index 0ada80eb..51563ecb 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Disable-fivopts-by-default.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0014-Patch-microblaze-Disable-fivopts-by-default.patch
@@ -1,8 +1,9 @@
1From 604cae83ce9d2942568178966f69614acbbcbefd Mon Sep 17 00:00:00 2001 1From 616f16089f0b01ab02008d7291df0972a99782e0 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 11:10:21 +0530 3Date: Tue, 17 Jan 2017 11:10:21 +0530
4Subject: [PATCH 15/63] [Patch, microblaze]: Disable fivopts by default Turn 4Subject: [PATCH 14/58] [Patch, microblaze]: Disable fivopts by default
5 off ivopts by default. Interferes with cse. 5
6Turn off ivopts by default. Interferes with cse.
6 7
7Changelog 8Changelog
8 9
@@ -18,7 +19,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
18 1 file changed, 9 insertions(+) 19 1 file changed, 9 insertions(+)
19 20
20diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c 21diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c
21index c30bdef..9b6ef21 100644 22index 4391f939626..0b9d5a1b453 100644
22--- a/gcc/common/config/microblaze/microblaze-common.c 23--- a/gcc/common/config/microblaze/microblaze-common.c
23+++ b/gcc/common/config/microblaze/microblaze-common.c 24+++ b/gcc/common/config/microblaze/microblaze-common.c
24@@ -24,6 +24,15 @@ 25@@ -24,6 +24,15 @@
@@ -38,5 +39,5 @@ index c30bdef..9b6ef21 100644
38 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT 39 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
39 40
40-- 41--
412.7.4 422.17.1
42 43
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Removed-moddi3-routinue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Removed-moddi3-routinue.patch
index 87bc1668..e7fb9393 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Removed-moddi3-routinue.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0015-Patch-microblaze-Removed-moddi3-routinue.patch
@@ -1,28 +1,29 @@
1From 14ddb3217fbb84c48903124ec6a3614b4707630d Mon Sep 17 00:00:00 2001 1From c2a6652176751bc95e2f990179e90cfe58026feb Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 12 Jan 2017 17:36:16 +0530 3Date: Thu, 12 Jan 2017 17:36:16 +0530
4Subject: [PATCH 16/63] [Patch, microblaze]: Removed moddi3 routinue Using the 4Subject: [PATCH 15/58] [Patch, microblaze]: Removed moddi3 routinue
5 default moddi3 function as the existing implementation has many bugs 5
6Using the default moddi3 function as the existing implementation has many bugs
6 7
7Signed-off-by:Nagaraju <nmekala@xilix.com> 8Signed-off-by:Nagaraju <nmekala@xilix.com>
8 9
9Conflicts: 10Conflicts:
10 libgcc/config/microblaze/moddi3.S 11 libgcc/config/microblaze/moddi3.S
11--- 12---
12 libgcc/config/microblaze/moddi3.S | 121 ---------------------------------- 13 libgcc/config/microblaze/moddi3.S | 121 --------------------------
13 libgcc/config/microblaze/t-microblaze | 3 +- 14 libgcc/config/microblaze/t-microblaze | 3 +-
14 2 files changed, 1 insertion(+), 123 deletions(-) 15 2 files changed, 1 insertion(+), 123 deletions(-)
15 delete mode 100644 libgcc/config/microblaze/moddi3.S 16 delete mode 100644 libgcc/config/microblaze/moddi3.S
16 17
17diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S 18diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S
18deleted file mode 100644 19deleted file mode 100644
19index abfe4fc..0000000 20index d0e24fdb89d..00000000000
20--- a/libgcc/config/microblaze/moddi3.S 21--- a/libgcc/config/microblaze/moddi3.S
21+++ /dev/null 22+++ /dev/null
22@@ -1,121 +0,0 @@ 23@@ -1,121 +0,0 @@
23-################################### 24-###################################
24-# 25-#
25-# Copyright (C) 2009-2019 Free Software Foundation, Inc. 26-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
26-# 27-#
27-# Contributed by Michael Eager <eager@eagercon.com>. 28-# Contributed by Michael Eager <eager@eagercon.com>.
28-# 29-#
@@ -142,7 +143,7 @@ index abfe4fc..0000000
142- .end __moddi3 143- .end __moddi3
143- 144-
144diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze 145diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze
145index 96959f0..8d954a4 100644 146index 96959f0292b..8d954a49575 100644
146--- a/libgcc/config/microblaze/t-microblaze 147--- a/libgcc/config/microblaze/t-microblaze
147+++ b/libgcc/config/microblaze/t-microblaze 148+++ b/libgcc/config/microblaze/t-microblaze
148@@ -1,8 +1,7 @@ 149@@ -1,8 +1,7 @@
@@ -156,5 +157,5 @@ index 96959f0..8d954a4 100644
156 $(srcdir)/config/microblaze/muldi3_hard.S \ 157 $(srcdir)/config/microblaze/muldi3_hard.S \
157 $(srcdir)/config/microblaze/mulsi3.S \ 158 $(srcdir)/config/microblaze/mulsi3.S \
158-- 159--
1592.7.4 1602.17.1
160 161
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-INIT_PRIORITY-support.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Add-INIT_PRIORITY-support.patch
index ca1c2d1c..13c3ccd9 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-INIT_PRIORITY-support.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0016-Patch-microblaze-Add-INIT_PRIORITY-support.patch
@@ -1,8 +1,9 @@
1From 032e50c1b267306338cff4d136db88f08350de72 Mon Sep 17 00:00:00 2001 1From 9a4253a92a5e1811693ea1707b5fc272908ec556 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 14:41:58 +0530 3Date: Tue, 17 Jan 2017 14:41:58 +0530
4Subject: [PATCH 17/63] [Patch, microblaze]: Add INIT_PRIORITY support Added 4Subject: [PATCH 16/58] [Patch, microblaze]: Add INIT_PRIORITY support
5 TARGET_ASM_CONSTRUCTOR and TARGET_ASM_DESTRUCTOR macros. 5
6Added TARGET_ASM_CONSTRUCTOR and TARGET_ASM_DESTRUCTOR macros.
6 7
7These macros allows users to control the order of initialization 8These macros allows users to control the order of initialization
8of objects defined at namespace scope with the init_priority 9of objects defined at namespace scope with the init_priority
@@ -22,14 +23,14 @@ Changelog
22Signed-off-by:nagaraju <nmekala@xilix.com> 23Signed-off-by:nagaraju <nmekala@xilix.com>
23Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 24Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
24--- 25---
25 gcc/config/microblaze/microblaze.c | 53 ++++++++++++++++++++++++++++++++++++++ 26 gcc/config/microblaze/microblaze.c | 53 ++++++++++++++++++++++++++++++
26 1 file changed, 53 insertions(+) 27 1 file changed, 53 insertions(+)
27 28
28diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 29diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
29index c834b49..c54b96b 100644 30index 0186171c04c..9eae5515c60 100644
30--- a/gcc/config/microblaze/microblaze.c 31--- a/gcc/config/microblaze/microblaze.c
31+++ b/gcc/config/microblaze/microblaze.c 32+++ b/gcc/config/microblaze/microblaze.c
32@@ -2642,6 +2642,53 @@ print_operand_address (FILE * file, rtx addr) 33@@ -2634,6 +2634,53 @@ print_operand_address (FILE * file, rtx addr)
33 } 34 }
34 } 35 }
35 36
@@ -83,7 +84,7 @@ index c834b49..c54b96b 100644
83 /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol 84 /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
84 is used, so that we don't emit an .extern for it in 85 is used, so that we don't emit an .extern for it in
85 microblaze_asm_file_end. */ 86 microblaze_asm_file_end. */
86@@ -3981,6 +4028,12 @@ microblaze_starting_frame_offset (void) 87@@ -3975,6 +4022,12 @@ microblaze_starting_frame_offset (void)
87 #undef TARGET_ATTRIBUTE_TABLE 88 #undef TARGET_ATTRIBUTE_TABLE
88 #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table 89 #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table
89 90
@@ -97,5 +98,5 @@ index c834b49..c54b96b 100644
97 #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p 98 #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p
98 99
99-- 100--
1002.7.4 1012.17.1
101 102
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Add-optimized-lshrsi3.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-optimized-lshrsi3.patch
index de35f286..cfc06f74 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Add-optimized-lshrsi3.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0017-Patch-microblaze-Add-optimized-lshrsi3.patch
@@ -1,9 +1,11 @@
1From 6db9d068e32a424ac04c27e963d1e58cb3ef8bdf Mon Sep 17 00:00:00 2001 1From 27c27a8876152bac78059a1b2d5a6f0ac9b8cee2 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 15:23:57 +0530 3Date: Tue, 17 Jan 2017 15:23:57 +0530
4Subject: [PATCH 18/63] [Patch, microblaze]: Add optimized lshrsi3 When barrel 4Subject: [PATCH 17/58] [Patch, microblaze]: Add optimized lshrsi3
5 shifter is not present, the immediate value is greater than #5 and 5
6 optimization is -OS, the compiler will generate shift operation using loop. 6When barrel shifter is not present, the immediate value
7is greater than #5 and optimization is -OS, the
8compiler will generate shift operation using loop.
7 9
8Changelog 10Changelog
9 11
@@ -20,13 +22,13 @@ ChangeLog/testsuite
20Signed-off-by:Nagaraju <nmekala@xilix.com> 22Signed-off-by:Nagaraju <nmekala@xilix.com>
21Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 23Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
22--- 24---
23 gcc/config/microblaze/microblaze.md | 21 +++++++++++++++++++++ 25 gcc/config/microblaze/microblaze.md | 21 +++++++++++++++++++
24 .../gcc.target/microblaze/others/lshrsi_Os_1.c | 13 +++++++++++++ 26 .../microblaze/others/lshrsi_Os_1.c | 13 ++++++++++++
25 2 files changed, 34 insertions(+) 27 2 files changed, 34 insertions(+)
26 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c 28 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c
27 29
28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 30diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
29index 3d2636e..aa2eda3 100644 31index 187ad522dcc..8f9baec826b 100644
30--- a/gcc/config/microblaze/microblaze.md 32--- a/gcc/config/microblaze/microblaze.md
31+++ b/gcc/config/microblaze/microblaze.md 33+++ b/gcc/config/microblaze/microblaze.md
32@@ -1618,6 +1618,27 @@ 34@@ -1618,6 +1618,27 @@
@@ -59,7 +61,7 @@ index 3d2636e..aa2eda3 100644
59 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d") 61 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
60diff --git a/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c b/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c 62diff --git a/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c b/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c
61new file mode 100644 63new file mode 100644
62index 0000000..32a3be7 64index 00000000000..32a3be7c76a
63--- /dev/null 65--- /dev/null
64+++ b/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c 66+++ b/gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c
65@@ -0,0 +1,13 @@ 67@@ -0,0 +1,13 @@
@@ -77,5 +79,5 @@ index 0000000..32a3be7
77+/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */ 79+/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */
78+/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */ 80+/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */
79-- 81--
802.7.4 822.17.1
81 83
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Reducing-Stack-space-for-arguments.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
index b60a4e95..1f8decc7 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0018-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
@@ -1,10 +1,11 @@
1From 372bbc75146166df9b82ca5e8f236971b7cef16e Mon Sep 17 00:00:00 2001 1From 59273a71f1f180456d87eb4a1a5f95fcc6d17003 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 16:42:44 +0530 3Date: Tue, 17 Jan 2017 16:42:44 +0530
4Subject: [PATCH 20/63] [Patch, microblaze]: Reducing Stack space for arguments 4Subject: [PATCH 18/58] [Patch, microblaze]: Reducing Stack space for arguments
5 Currently in Microblaze target stack space for arguments in register is being 5
6 allocated even if there are no arguments in the function. This patch will 6Currently in Microblaze target stack space for arguments in register is being
7 optimize the extra 24 bytes that are being allocated. 7allocated even if there are no arguments in the function.
8This patch will optimize the extra 24 bytes that are being allocated.
8 9
9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
10 :Ajit Agarwal <ajitkum@xilinx.com> 11 :Ajit Agarwal <ajitkum@xilinx.com>
@@ -17,12 +18,12 @@ ChangeLog:
17 *microblaze.c (REG_PARM_STACK_SPACE): Modify 18 *microblaze.c (REG_PARM_STACK_SPACE): Modify
18--- 19---
19 gcc/config/microblaze/microblaze-protos.h | 1 + 20 gcc/config/microblaze/microblaze-protos.h | 1 +
20 gcc/config/microblaze/microblaze.c | 134 +++++++++++++++++++++++++++++- 21 gcc/config/microblaze/microblaze.c | 132 +++++++++++++++++++++-
21 gcc/config/microblaze/microblaze.h | 4 +- 22 gcc/config/microblaze/microblaze.h | 4 +-
22 3 files changed, 136 insertions(+), 3 deletions(-) 23 3 files changed, 134 insertions(+), 3 deletions(-)
23 24
24diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 25diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
25index 1f5ca80..6647cbc 100644 26index 982b2abd2d4..96f7bb67f6c 100644
26--- a/gcc/config/microblaze/microblaze-protos.h 27--- a/gcc/config/microblaze/microblaze-protos.h
27+++ b/gcc/config/microblaze/microblaze-protos.h 28+++ b/gcc/config/microblaze/microblaze-protos.h
28@@ -59,6 +59,7 @@ extern int symbol_mentioned_p (rtx); 29@@ -59,6 +59,7 @@ extern int symbol_mentioned_p (rtx);
@@ -34,17 +35,16 @@ index 1f5ca80..6647cbc 100644
34 35
35 /* Declare functions in microblaze-c.c. */ 36 /* Declare functions in microblaze-c.c. */
36diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 37diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
37index c54b96b..0ce9d13 100644 38index 9eae5515c60..a4bdf66f045 100644
38--- a/gcc/config/microblaze/microblaze.c 39--- a/gcc/config/microblaze/microblaze.c
39+++ b/gcc/config/microblaze/microblaze.c 40+++ b/gcc/config/microblaze/microblaze.c
40@@ -2065,6 +2065,138 @@ microblaze_must_save_register (int regno) 41@@ -2057,6 +2057,136 @@ microblaze_must_save_register (int regno)
41 return 0; 42 return 0;
42 } 43 }
43 44
44+static bool 45+static bool
45+microblaze_parm_needs_stack (cumulative_args_t args_so_far, tree type) 46+microblaze_parm_needs_stack (cumulative_args_t args_so_far, tree type)
46+{ 47+{
47+ enum machine_mode mode;
48+ int unsignedp; 48+ int unsignedp;
49+ rtx entry_parm; 49+ rtx entry_parm;
50+ 50+
@@ -65,37 +65,36 @@ index c54b96b..0ce9d13 100644
65+ || microblaze_parm_needs_stack (args_so_far, TREE_TYPE (type))); 65+ || microblaze_parm_needs_stack (args_so_far, TREE_TYPE (type)));
66+ 66+
67+ /* Handle transparent aggregates. */ 67+ /* Handle transparent aggregates. */
68+ if ((TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == RECORD_TYPE) 68+ if ((TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == RECORD_TYPE)
69+ && TYPE_TRANSPARENT_AGGR (type)) 69+ && TYPE_TRANSPARENT_AGGR (type))
70+ type = TREE_TYPE (first_field (type)); 70+ type = TREE_TYPE (first_field (type));
71+ 71+
72+ /* See if this arg was passed by invisible reference. */ 72+ /* See if this arg was passed by invisible reference. */
73+ if (pass_by_reference (get_cumulative_args (args_so_far), 73+ function_arg_info arg (type, /*named=*/true);
74+ TYPE_MODE (type), type, true)) 74+ apply_pass_by_reference_rules (get_cumulative_args (args_so_far), arg);
75+ type = build_pointer_type (type);
76+ 75+
77+ /* Find mode as it is passed by the ABI. */ 76+ /* Find mode as it is passed by the ABI. */
78+ unsignedp = TYPE_UNSIGNED (type); 77+ unsignedp = TYPE_UNSIGNED (type);
79+ mode = promote_mode (type, TYPE_MODE (type), &unsignedp); 78+ arg.mode = promote_mode (arg.type, arg.mode, &unsignedp);
80+ 79+
81+/* If there is no incoming register, we need a stack. */ 80+ /* If there is no incoming register, we need a stack. */
82+ entry_parm = microblaze_function_arg (args_so_far, mode, type, true); 81+ entry_parm = microblaze_function_arg (args_so_far, arg);
83+ if (entry_parm == NULL) 82+ if (entry_parm == NULL)
84+ return true; 83+ return true;
85+ 84+
86+ /* Likewise if we need to pass both in registers and on the stack. */ 85+ /* Likewise if we need to pass both in registers and on the stack. */
87+ if (GET_CODE (entry_parm) == PARALLEL 86+ if (GET_CODE (entry_parm) == PARALLEL
88+ && XEXP (XVECEXP (entry_parm, 0, 0), 0) == NULL_RTX) 87+ && XEXP (XVECEXP (entry_parm, 0, 0), 0) == NULL_RTX)
89+ return true; 88+ return true;
90+ 89+
91+ /* Also true if we're partially in registers and partially not. */ 90+ /* Also true if we're partially in registers and partially not. */
92+ if (function_arg_partial_bytes (args_so_far, mode, type, true) != 0) 91+ if (function_arg_partial_bytes (args_so_far, arg) != 0)
93+ return true; 92+ return true;
94+ 93+
95+ /* Update info on where next arg arrives in registers. */ 94+ /* Update info on where next arg arrives in registers. */
96+ microblaze_function_arg_advance (args_so_far, mode, type, true); 95+ microblaze_function_arg_advance (args_so_far, arg);
97+ return false; 96+ return false;
98+ } 97+}
99+ 98+
100+static bool 99+static bool
101+microblaze_function_parms_need_stack (tree fun, bool incoming) 100+microblaze_function_parms_need_stack (tree fun, bool incoming)
@@ -176,7 +175,7 @@ index c54b96b..0ce9d13 100644
176 /* Return the bytes needed to compute the frame pointer from the current 175 /* Return the bytes needed to compute the frame pointer from the current
177 stack pointer. 176 stack pointer.
178 177
179@@ -3411,7 +3543,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 178@@ -3403,7 +3533,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
180 emit_insn (gen_indirect_jump (temp2)); 179 emit_insn (gen_indirect_jump (temp2));
181 180
182 /* Run just enough of rest_of_compilation. This sequence was 181 /* Run just enough of rest_of_compilation. This sequence was
@@ -184,9 +183,9 @@ index c54b96b..0ce9d13 100644
184+ "borrowed" from microblaze.c. */ 183+ "borrowed" from microblaze.c. */
185 insn = get_insns (); 184 insn = get_insns ();
186 shorten_branches (insn); 185 shorten_branches (insn);
187 final_start_function (insn, file, 1); 186 assemble_start_function (thunk_fndecl, fnname);
188diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 187diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
189index 0a435b8..346e47b 100644 188index 8aa3f155790..1e155e4041c 100644
190--- a/gcc/config/microblaze/microblaze.h 189--- a/gcc/config/microblaze/microblaze.h
191+++ b/gcc/config/microblaze/microblaze.h 190+++ b/gcc/config/microblaze/microblaze.h
192@@ -434,9 +434,9 @@ extern struct microblaze_frame_info current_frame_info; 191@@ -434,9 +434,9 @@ extern struct microblaze_frame_info current_frame_info;
@@ -202,5 +201,5 @@ index 0a435b8..346e47b 100644
202 #define STACK_BOUNDARY 32 201 #define STACK_BOUNDARY 32
203 202
204-- 203--
2052.7.4 2042.17.1
206 205
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-microblaze-Add-cbranchsi4_reg.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Add-cbranchsi4_reg.patch
index c79f9552..b78a9814 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-microblaze-Add-cbranchsi4_reg.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Add-cbranchsi4_reg.patch
@@ -1,10 +1,11 @@
1From 1c226901aec38e2e824177418dcd82b6cd49ffca Mon Sep 17 00:00:00 2001 1From f43cb8572131074c7ce43a1d39c7ba6c85611e18 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:04:37 +0530 3Date: Tue, 17 Jan 2017 17:04:37 +0530
4Subject: [PATCH 21/63] [Patch, microblaze]: Add cbranchsi4_reg This patch 4Subject: [PATCH 19/58] [Patch, microblaze]: Add cbranchsi4_reg
5 optimizes the generation of pcmpne/pcmpeq instruction if the compare 5
6 instruction has no immediate values.For the immediate values the xor 6This patch optimizes the generation of pcmpne/pcmpeq instruction if the
7 instruction is generated 7compare instruction has no immediate values.For the immediate values the
8xor instruction is generated
8 9
9Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by: Nagaraju Mekala <nmekala@xilix.com>
10Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> 11Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com>
@@ -20,18 +21,17 @@ Conflicts:
20 21
21 gcc/config/microblaze/microblaze-protos.h 22 gcc/config/microblaze/microblaze-protos.h
22--- 23---
23 gcc/config/microblaze/microblaze-protos.h | 2 +- 24 gcc/config/microblaze/microblaze-protos.h | 2 +-
24 gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c | 2 +- 25 gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c | 2 +-
25 gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c | 2 +- 26 gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c | 2 +-
26 gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c | 2 +- 27 gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c | 2 +-
27 gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c | 2 +- 28 gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c | 2 +-
28 gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c | 14 +++++++------- 29 gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c | 14 +++++++-------
29 gcc/testsuite/gcc.target/microblaze/isa/vanilla.c | 12 ++++++------ 30 gcc/testsuite/gcc.target/microblaze/isa/vanilla.c | 12 ++++++------
30 gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c | 2 +- 31 7 files changed, 18 insertions(+), 18 deletions(-)
31 8 files changed, 19 insertions(+), 19 deletions(-)
32 32
33diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 33diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
34index 6647cbc..bdc9b69 100644 34index 96f7bb67f6c..76ffc682df2 100644
35--- a/gcc/config/microblaze/microblaze-protos.h 35--- a/gcc/config/microblaze/microblaze-protos.h
36+++ b/gcc/config/microblaze/microblaze-protos.h 36+++ b/gcc/config/microblaze/microblaze-protos.h
37@@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *); 37@@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *);
@@ -44,7 +44,7 @@ index 6647cbc..bdc9b69 100644
44 extern void microblaze_expand_conditional_branch_sf (rtx *); 44 extern void microblaze_expand_conditional_branch_sf (rtx *);
45 extern int microblaze_can_use_return_insn (void); 45 extern int microblaze_can_use_return_insn (void);
46diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c 46diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c
47index 4041a24..ccc6a46 100644 47index 4041a241391..ccc6a461cd9 100644
48--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c 48--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c
49+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c 49+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp1.c
50@@ -6,5 +6,5 @@ void float_func () 50@@ -6,5 +6,5 @@ void float_func ()
@@ -55,7 +55,7 @@ index 4041a24..ccc6a46 100644
55+ f2 = f3; 55+ f2 = f3;
56 } 56 }
57diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c 57diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c
58index 3902b83..1dd5fe6 100644 58index 3902b839db9..1dd5fe6c539 100644
59--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c 59--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c
60+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c 60+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp2.c
61@@ -6,5 +6,5 @@ void float_func () 61@@ -6,5 +6,5 @@ void float_func ()
@@ -66,7 +66,7 @@ index 3902b83..1dd5fe6 100644
66+ f2 = f3; 66+ f2 = f3;
67 } 67 }
68diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c 68diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c
69index 8555974..d6f80fb 100644 69index 8555974dda5..d6f80fb0ec3 100644
70--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c 70--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c
71+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c 71+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp3.c
72@@ -6,5 +6,5 @@ void float_func () 72@@ -6,5 +6,5 @@ void float_func ()
@@ -77,7 +77,7 @@ index 8555974..d6f80fb 100644
77+ f1 = f2 + f3; 77+ f1 = f2 + f3;
78 } 78 }
79diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c 79diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c
80index 79cc5f9..d117724 100644 80index 79cc5f9dd8e..d1177249552 100644
81--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c 81--- a/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c
82+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c 82+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c
83@@ -5,5 +5,5 @@ void float_func(float f1, float f2, float f3) 83@@ -5,5 +5,5 @@ void float_func(float f1, float f2, float f3)
@@ -88,7 +88,7 @@ index 79cc5f9..d117724 100644
88+ f2 = f3; 88+ f2 = f3;
89 } 89 }
90diff --git a/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c b/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c 90diff --git a/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c b/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c
91index ebfb170..7582297 100644 91index ebfb170ecee..75822977ef8 100644
92--- a/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c 92--- a/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c
93+++ b/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c 93+++ b/gcc/testsuite/gcc.target/microblaze/isa/nofcmp.c
94@@ -5,17 +5,17 @@ volatile float f1, f2, f3; 94@@ -5,17 +5,17 @@ volatile float f1, f2, f3;
@@ -117,7 +117,7 @@ index ebfb170..7582297 100644
117 117
118 } 118 }
119diff --git a/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c b/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c 119diff --git a/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c b/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c
120index 1d6ba80..532c035 100644 120index 1d6ba807b12..532c035adfd 100644
121--- a/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c 121--- a/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c
122+++ b/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c 122+++ b/gcc/testsuite/gcc.target/microblaze/isa/vanilla.c
123@@ -74,16 +74,16 @@ void float_cmp_func () 123@@ -74,16 +74,16 @@ void float_cmp_func ()
@@ -143,17 +143,6 @@ index 1d6ba80..532c035 100644
143+ f1 = f3; 143+ f1 = f3;
144 144
145 } 145 }
146diff --git a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
147index fdcde1f..580b4db 100644
148--- a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
149+++ b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
150@@ -5,4 +5,4 @@ void trap ()
151 __builtin_trap ();
152 }
153
154-/* { dg-final { scan-assembler "brki\tr0,-1" } } */
155\ No newline at end of file
156+/* { dg-final { scan-assembler "bri\t0" } } */
157-- 146--
1582.7.4 1472.17.1
159 148
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Modified-trap-instruction.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Modified-trap-instruction.patch
deleted file mode 100644
index dc9b61cf..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0019-Patch-microblaze-Modified-trap-instruction.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 614bacc058b94c7b12cd40fde1b19b4709870f3b Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 15:42:15 +0530
4Subject: [PATCH 19/63] [Patch, microblaze]: Modified trap instruction The
5 instruction was wrongly written to brki r0,-1 it should be bri r0. Modified
6 with the correct instruction
7
8Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
9 :Ajit Agarwal <ajitkum@xilinx.com>
10---
11 gcc/config/microblaze/microblaze.md | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
15index aa2eda3..3c80760 100644
16--- a/gcc/config/microblaze/microblaze.md
17+++ b/gcc/config/microblaze/microblaze.md
18@@ -2348,7 +2348,7 @@
19 (define_insn "trap"
20 [(trap_if (const_int 1) (const_int 0))]
21 ""
22- "brki\tr0,-1"
23+ "bri\t0"
24 [(set_attr "type" "trap")]
25 )
26
27--
282.7.4
29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0022-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch
index c3822d06..cc1c3d7e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0022-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0020-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch
@@ -1,19 +1,22 @@
1From 791d65feae4f3cab47833579bc6f523e54194cbd Mon Sep 17 00:00:00 2001 1From 1bbf48097cf2da98e03139b499a5a74bc68e6abc Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:11:04 +0530 3Date: Tue, 17 Jan 2017 17:11:04 +0530
4Subject: [PATCH 22/63] [Patch,microblaze]: Inline Expansion of fsqrt builtin. 4Subject: [PATCH 20/58] [Patch,microblaze]: Inline Expansion of fsqrt builtin.
5 The changes are made in the patch for the inline expansion of the fsqrt 5
6 builtin with fqrt instruction. The sqrt math function takes double as 6The changes are made in the patch for the inline expansion of
7 argument and return double as argument. The pattern is selected while 7the fsqrt builtin with fqrt instruction. The sqrt math function
8 expanding the unary op through expand_unop which passes DFmode and the DFmode 8takes double as argument and return double as argument. The
9 pattern was not there returning zero. Thus the sqrt math function is not 9pattern is selected while expanding the unary op through
10 inlined and expanded. The pattern with DFmode argument is added. Also the 10expand_unop which passes DFmode and the DFmode pattern was
11 source and destination argument is not same the DF through two different 11not there returning zero. Thus the sqrt math function is not
12 consecutive registers with lower 32 bit is the argument passed to sqrt and 12inlined and expanded. The pattern with DFmode argument is added.
13 the higher 32 bit is zero. If the source and destinations are different the 13Also the source and destination argument is not same the DF
14 DFmode 64 bits registers is not set properly giving the problem in runtime. 14through two different consecutive registers with lower 32 bit
15 Such changes are taken care in the implementation of the pattern for DFmode 15is the argument passed to sqrt and the higher 32 bit is zero.
16 for inline expansion of the sqrt. 16If the source and destinations are different the DFmode 64 bits
17registers is not set properly giving the problem in runtime. Such
18changes are taken care in the implementation of the pattern for
19DFmode for inline expansion of the sqrt.
17 20
18ChangeLog: 21ChangeLog:
192015-06-16 Ajit Agarwal <ajitkum@xilinx.com> 222015-06-16 Ajit Agarwal <ajitkum@xilinx.com>
@@ -29,7 +32,7 @@ Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
29 1 file changed, 14 insertions(+) 32 1 file changed, 14 insertions(+)
30 33
31diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 34diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
32index 3c80760..1fb5582 100644 35index 8f9baec826b..986d9c3aa25 100644
33--- a/gcc/config/microblaze/microblaze.md 36--- a/gcc/config/microblaze/microblaze.md
34+++ b/gcc/config/microblaze/microblaze.md 37+++ b/gcc/config/microblaze/microblaze.md
35@@ -451,6 +451,20 @@ 38@@ -451,6 +451,20 @@
@@ -54,5 +57,5 @@ index 3c80760..1fb5582 100644
54 [(set (match_operand:SI 0 "register_operand" "=d") 57 [(set (match_operand:SI 0 "register_operand" "=d")
55 (fix:SI (match_operand:SF 1 "register_operand" "d")))] 58 (fix:SI (match_operand:SF 1 "register_operand" "d")))]
56-- 59--
572.7.4 602.17.1
58 61
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch
index a314170f..b4d03172 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0021-Patch-OPT-Update-heuristics-for-loop-invariant-for-a.patch
@@ -1,8 +1,8 @@
1From 2c4a1d46e4f1b2342f899d6741d09dbf7cc87aa2 Mon Sep 17 00:00:00 2001 1From fe7962c6cc54a5d5f80db90ccc06b8603ddeb74f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:33:31 +0530 3Date: Tue, 17 Jan 2017 17:33:31 +0530
4Subject: [PATCH 23/63] [Patch] OPT: Update heuristics for loop-invariant for 4Subject: [PATCH 21/58] [Patch] OPT: Update heuristics for loop-invariant for
5 address arithme. .tic. 5 address arithmetic
6 6
7The changes are made in the patch to update the heuristics 7The changes are made in the patch to update the heuristics
8for loop invariant for address arithmetic. The heuristics is 8for loop invariant for address arithmetic. The heuristics is
@@ -26,7 +26,7 @@ Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
26 1 file changed, 2 insertions(+), 4 deletions(-) 26 1 file changed, 2 insertions(+), 4 deletions(-)
27 27
28diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c 28diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
29index b880ead..fd7a019 100644 29index 37ae6549e56..f6385d6cf43 100644
30--- a/gcc/loop-invariant.c 30--- a/gcc/loop-invariant.c
31+++ b/gcc/loop-invariant.c 31+++ b/gcc/loop-invariant.c
32@@ -1465,10 +1465,8 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed, 32@@ -1465,10 +1465,8 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
@@ -43,5 +43,5 @@ index b880ead..fd7a019 100644
43 else if (ret < 0) 43 else if (ret < 0)
44 return -1; 44 return -1;
45-- 45--
462.7.4 462.17.1
47 47
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0024-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0022-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch
index a786ba09..2e5afed8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0024-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0022-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch
@@ -1,14 +1,17 @@
1From c2b64f2f7a06231d8da0a53c6761939583ac56da Mon Sep 17 00:00:00 2001 1From b066cb189302814fcd91b38f2f9da830a2c5b8fe Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 18:07:24 +0530 3Date: Tue, 17 Jan 2017 18:07:24 +0530
4Subject: [PATCH 24/63] [PATCH] microblaze.md: Improve 'adddi3' and 'subdi3' 4Subject: [PATCH 22/58] [PATCH] microblaze.md: Improve 'adddi3' and 'subdi3'
5 insn definitions Change adddi3 to handle DI immediates as the second operand, 5 insn definitions
6 this requires modification to the output template however reduces the need to 6
7 specify seperate templates for 16-bit positive/negative immediate operands. 7Change adddi3 to handle DI immediates as the second operand, this
8 The use of 32-bit immediates for the addi and addic instructions is handled 8requires modification to the output template however reduces the need to
9 by the assembler, which will emit the imm instructions when required. This 9specify seperate templates for 16-bit positive/negative immediate
10 conveniently handles the optimizable cases where the immediate constant value 10operands. The use of 32-bit immediates for the addi and addic
11 does not need the higher half words of the operands upper/lower words. 11instructions is handled by the assembler, which will emit the imm
12instructions when required. This conveniently handles the optimizable
13cases where the immediate constant value does not need the higher half
14words of the operands upper/lower words.
12 15
13Change the constraints of the subdi3 instruction definition such that it 16Change the constraints of the subdi3 instruction definition such that it
14does not match the second operand as an immediate value. This is because 17does not match the second operand as an immediate value. This is because
@@ -23,7 +26,7 @@ Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
23 1 file changed, 6 insertions(+), 7 deletions(-) 26 1 file changed, 6 insertions(+), 7 deletions(-)
24 27
25diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
26index 1fb5582..216219b 100644 29index 986d9c3aa25..efd2c34e0b7 100644
27--- a/gcc/config/microblaze/microblaze.md 30--- a/gcc/config/microblaze/microblaze.md
28+++ b/gcc/config/microblaze/microblaze.md 31+++ b/gcc/config/microblaze/microblaze.md
29@@ -502,17 +502,16 @@ 32@@ -502,17 +502,16 @@
@@ -59,5 +62,5 @@ index 1fb5582..216219b 100644
59 "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1" 62 "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1"
60 [(set_attr "type" "darith") 63 [(set_attr "type" "darith")
61-- 64--
622.7.4 652.17.1
63 66
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
index 98310b36..fa16749e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0023-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
@@ -1,11 +1,13 @@
1From c7e5c253b1e7800bc5ec8cc69850118ed938e22f Mon Sep 17 00:00:00 2001 1From 98018d020d9fbae38ea19627dec64d03d7f21fac Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 18:18:41 +0530 3Date: Tue, 17 Jan 2017 18:18:41 +0530
4Subject: [PATCH 25/63] [Patch, microblaze]: Update ashlsi3 & movsf patterns 4Subject: [PATCH 23/58] [Patch, microblaze]: Update ashlsi3 & movsf patterns
5 This patch removes the use of HOST_WIDE_INT_PRINT_HEX macro in print_operand 5
6 of ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay and movsf_internal 6This patch removes the use of HOST_WIDE_INT_PRINT_HEX macro in
7 patterns beacuse HOST_WIDE_INT_PRINT_HEX is generating 64-bit value which our 7print_operand of ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay
8 instruction doesn't support so using gen_int_mode function 8and movsf_internal patterns beacuse HOST_WIDE_INT_PRINT_HEX
9is generating 64-bit value which our instruction doesn't support
10so using gen_int_mode function
9 11
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 12Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 :Ajit Agarwal <ajitkum@xilinx.com> 13 :Ajit Agarwal <ajitkum@xilinx.com>
@@ -22,25 +24,11 @@ ChangeLog:
22 updated the 'F' case to use "unsinged int" instead 24 updated the 'F' case to use "unsinged int" instead
23 of HOST_WIDE_INT_PRINT_HEX 25 of HOST_WIDE_INT_PRINT_HEX
24--- 26---
25 gcc/config/microblaze/microblaze.c | 2 +-
26 gcc/config/microblaze/microblaze.md | 10 ++++++++-- 27 gcc/config/microblaze/microblaze.md | 10 ++++++++--
27 2 files changed, 9 insertions(+), 3 deletions(-) 28 1 file changed, 8 insertions(+), 2 deletions(-)
28 29
29diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
30index 0ce9d13..7669668 100644
31--- a/gcc/config/microblaze/microblaze.c
32+++ b/gcc/config/microblaze/microblaze.c
33@@ -2608,7 +2608,7 @@ print_operand (FILE * file, rtx op, int letter)
34 unsigned long value_long;
35 REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op),
36 value_long);
37- fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long);
38+ fprintf (file, "0x%08x", (unsigned int) value_long);
39 }
40 else
41 {
42diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 30diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
43index 216219b..4bc209c 100644 31index efd2c34e0b7..be8bbda2bfb 100644
44--- a/gcc/config/microblaze/microblaze.md 32--- a/gcc/config/microblaze/microblaze.md
45+++ b/gcc/config/microblaze/microblaze.md 33+++ b/gcc/config/microblaze/microblaze.md
46@@ -1368,7 +1368,10 @@ 34@@ -1368,7 +1368,10 @@
@@ -68,5 +56,5 @@ index 216219b..4bc209c 100644
68 [(set_attr "type" "no_delay_arith") 56 [(set_attr "type" "no_delay_arith")
69 (set_attr "mode" "SI") 57 (set_attr "mode" "SI")
70-- 58--
712.7.4 592.17.1
72 60
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-8-stage-pipeline-for-microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0024-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
index ba80ce45..8e0eda3c 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0024-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
@@ -1,9 +1,10 @@
1From c3b633b0ee8d228a7d70a02b574822aba9a0fd93 Mon Sep 17 00:00:00 2001 1From 3f98e90620e0ae6d76a1ba18e97389feb095c3e4 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 19:50:34 +0530 3Date: Tue, 17 Jan 2017 19:50:34 +0530
4Subject: [PATCH 26/63] [Patch, microblaze]: 8-stage pipeline for microblaze 4Subject: [PATCH 24/58] [Patch, microblaze]: 8-stage pipeline for microblaze
5 This patch adds the support for the 8-stage pipeline. The new 8-stage 5
6 pipeline reduces the latencies of float & integer division drastically 6This patch adds the support for the 8-stage pipeline. The new 8-stage
7pipeline reduces the latencies of float & integer division drastically
7 8
8Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
9 10
@@ -21,17 +22,36 @@ ChangeLog:
21 *microblaze.opt (mxl-frequency): New 22 *microblaze.opt (mxl-frequency): New
22 New flag added for 8-stage pipeline 23 New flag added for 8-stage pipeline
23--- 24---
24 gcc/config/microblaze/microblaze.c | 13 ++++++ 25 gcc/config/microblaze/microblaze.c | 18 ++++++-
25 gcc/config/microblaze/microblaze.h | 3 +- 26 gcc/config/microblaze/microblaze.h | 3 +-
26 gcc/config/microblaze/microblaze.md | 79 +++++++++++++++++++++++++++++++++++- 27 gcc/config/microblaze/microblaze.md | 79 +++++++++++++++++++++++++++-
27 gcc/config/microblaze/microblaze.opt | 4 ++ 28 gcc/config/microblaze/microblaze.opt | 4 ++
28 4 files changed, 96 insertions(+), 3 deletions(-) 29 4 files changed, 100 insertions(+), 4 deletions(-)
29 30
30diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 31diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
31index 7669668..ae7d5dd 100644 32index a4bdf66f045..a3996119bd7 100644
32--- a/gcc/config/microblaze/microblaze.c 33--- a/gcc/config/microblaze/microblaze.c
33+++ b/gcc/config/microblaze/microblaze.c 34+++ b/gcc/config/microblaze/microblaze.c
34@@ -1848,6 +1848,19 @@ microblaze_option_override (void) 35@@ -164,6 +164,9 @@ int microblaze_no_unsafe_delay;
36 /* Set to one if the targeted core has the CLZ insn. */
37 int microblaze_has_clz = 0;
38
39+/* Set to one if the targeted core has barrel-shift and cpu > 10.0 */
40+int microblaze_has_bitfield = 0;
41+
42 /* Which CPU pipeline do we use. We haven't really standardized on a CPU
43 version having only a particular type of pipeline. There can still be
44 options on the CPU to scale pipeline features up or down. :(
45@@ -1739,7 +1742,7 @@ microblaze_option_override (void)
46 register int i, start;
47 register int regno;
48 register machine_mode mode;
49- int ver;
50+ int ver,ver_int;
51
52 microblaze_section_threshold = (global_options_set.x_g_switch_value
53 ? g_switch_value
54@@ -1840,6 +1843,19 @@ microblaze_option_override (void)
35 "%<-mcpu=v8.30.a%>"); 55 "%<-mcpu=v8.30.a%>");
36 TARGET_REORDER = 0; 56 TARGET_REORDER = 0;
37 } 57 }
@@ -52,7 +72,7 @@ index 7669668..ae7d5dd 100644
52 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) 72 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL)
53 error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); 73 error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>");
54diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 74diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
55index 346e47b..bf7f3b4 100644 75index 1e155e4041c..8b0db2c1718 100644
56--- a/gcc/config/microblaze/microblaze.h 76--- a/gcc/config/microblaze/microblaze.h
57+++ b/gcc/config/microblaze/microblaze.h 77+++ b/gcc/config/microblaze/microblaze.h
58@@ -27,7 +27,8 @@ 78@@ -27,7 +27,8 @@
@@ -66,7 +86,7 @@ index 346e47b..bf7f3b4 100644
66 86
67 #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001 87 #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001
68diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 88diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
69index 4bc209c..b7c16ac 100644 89index be8bbda2bfb..c407a81c51e 100644
70--- a/gcc/config/microblaze/microblaze.md 90--- a/gcc/config/microblaze/microblaze.md
71+++ b/gcc/config/microblaze/microblaze.md 91+++ b/gcc/config/microblaze/microblaze.md
72@@ -35,6 +35,7 @@ 92@@ -35,6 +35,7 @@
@@ -177,7 +197,7 @@ index 4bc209c..b7c16ac 100644
177 (set_attr "length" "4")]) 197 (set_attr "length" "4")])
178 198
179diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt 199diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt
180index 2e46941..d23f376 100644 200index 725c2fab52a..a29c6f8df90 100644
181--- a/gcc/config/microblaze/microblaze.opt 201--- a/gcc/config/microblaze/microblaze.opt
182+++ b/gcc/config/microblaze/microblaze.opt 202+++ b/gcc/config/microblaze/microblaze.opt
183@@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE). 203@@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE).
@@ -189,5 +209,5 @@ index 2e46941..d23f376 100644
189+Target Mask(AREA_OPTIMIZED_2) 209+Target Mask(AREA_OPTIMIZED_2)
190+Use 8 stage pipeline (frequency optimization) 210+Use 8 stage pipeline (frequency optimization)
191-- 211--
1922.7.4 2122.17.1
193 213
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Patch-rtl-Optimization-Better-register-pressure-esti.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-rtl-Optimization-Better-register-pressure-esti.patch
index 330b5494..f1b793f3 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Patch-rtl-Optimization-Better-register-pressure-esti.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0025-Patch-rtl-Optimization-Better-register-pressure-esti.patch
@@ -1,8 +1,8 @@
1From 650cbdea7bc810e2bd0ebc5eb5647ed513498670 Mon Sep 17 00:00:00 2001 1From eca67041b3d6e20663313732df0038d75fd2da8d Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 11:08:40 +0530 3Date: Wed, 18 Jan 2017 11:08:40 +0530
4Subject: [PATCH 27/63] [Patch,rtl Optimization]: Better register pressure 4Subject: [PATCH 25/58] [Patch,rtl Optimization]: Better register pressure
5 estimate for loop . .invariant code motion 5 estimate for loop invariant code motion
6 6
7Calculate the loop liveness used for regs for calculating the register pressure 7Calculate the loop liveness used for regs for calculating the register pressure
8in the cost estimation. Loop liveness is based on the following properties. 8in the cost estimation. Loop liveness is based on the following properties.
@@ -36,15 +36,15 @@ ChangeLog:
36 36
37Signed-off-by:Ajit Agarwal ajitkum@xilinx.com. 37Signed-off-by:Ajit Agarwal ajitkum@xilinx.com.
38--- 38---
39 gcc/cfgloopanal.c | 4 +++- 39 gcc/cfgloopanal.c | 4 ++-
40 gcc/loop-invariant.c | 63 +++++++++++++++++++++++++++++++++++++++------------- 40 gcc/loop-invariant.c | 63 +++++++++++++++++++++++++++++++++-----------
41 2 files changed, 50 insertions(+), 17 deletions(-) 41 2 files changed, 50 insertions(+), 17 deletions(-)
42 42
43diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c 43diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
44index 6dbe96f..ec5cba2 100644 44index 0b33e8272a7..7be8606e4f0 100644
45--- a/gcc/cfgloopanal.c 45--- a/gcc/cfgloopanal.c
46+++ b/gcc/cfgloopanal.c 46+++ b/gcc/cfgloopanal.c
47@@ -411,7 +411,9 @@ estimate_reg_pressure_cost (unsigned n_new, unsigned n_old, bool speed, 47@@ -418,7 +418,9 @@ estimate_reg_pressure_cost (unsigned n_new, unsigned n_old, bool speed,
48 if (regs_needed + target_res_regs <= available_regs) 48 if (regs_needed + target_res_regs <= available_regs)
49 return 0; 49 return 0;
50 50
@@ -56,7 +56,7 @@ index 6dbe96f..ec5cba2 100644
56 them. */ 56 them. */
57 cost = target_reg_cost [speed] * n_new; 57 cost = target_reg_cost [speed] * n_new;
58diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c 58diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
59index fd7a019..ad54297 100644 59index f6385d6cf43..8596b5c984d 100644
60--- a/gcc/loop-invariant.c 60--- a/gcc/loop-invariant.c
61+++ b/gcc/loop-invariant.c 61+++ b/gcc/loop-invariant.c
62@@ -1519,7 +1519,7 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed, 62@@ -1519,7 +1519,7 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
@@ -138,5 +138,5 @@ index fd7a019..ad54297 100644
138 138
139 if (! flag_ira_loop_pressure) 139 if (! flag_ira_loop_pressure)
140-- 140--
1412.7.4 1412.17.1
142 142
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0028-Patch-microblaze-Correct-the-const-high-double-immed.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch
index b5ee2c8c..cbc1b7b8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0028-Patch-microblaze-Correct-the-const-high-double-immed.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch
@@ -1,11 +1,13 @@
1From 8f8c6cd35a2cf79449c0155fa865a665d730e541 Mon Sep 17 00:00:00 2001 1From 711652dd187e5b8d7aa12ecc9f569f10b1521bd1 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 11:25:48 +0530 3Date: Wed, 18 Jan 2017 11:25:48 +0530
4Subject: [PATCH 28/63] [Patch, microblaze]: Correct the const high double 4Subject: [PATCH 26/58] [Patch, microblaze]: Correct the const high double
5 immediate value With this patch the loading of the DI mode immediate values 5 immediate value
6 will be using REAL_VALUE_FROM_CONST_DOUBLE and REAL_VALUE_TO_TARGET_DOUBLE 6
7 functions, as CONST_DOUBLE_HIGH was returning the sign extension value even 7With this patch the loading of the DI mode immediate values will be
8 of the unsigned long long constants also 8using REAL_VALUE_FROM_CONST_DOUBLE and REAL_VALUE_TO_TARGET_DOUBLE
9functions, as CONST_DOUBLE_HIGH was returning the sign extension value
10even of the unsigned long long constants also
9 11
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 12Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 Ajit Agarwal <ajitkum@xilinx.com> 13 Ajit Agarwal <ajitkum@xilinx.com>
@@ -18,16 +20,16 @@ ChangeLog:
18 REAL_VALUE_TO_TARGET_DOUBLE 20 REAL_VALUE_TO_TARGET_DOUBLE
19 *long.c (new): Added new testcase 21 *long.c (new): Added new testcase
20--- 22---
21 gcc/config/microblaze/microblaze.c | 8 ++++++-- 23 gcc/config/microblaze/microblaze.c | 6 ++++--
22 gcc/testsuite/gcc.target/microblaze/long.c | 10 ++++++++++ 24 gcc/testsuite/gcc.target/microblaze/long.c | 10 ++++++++++
23 2 files changed, 16 insertions(+), 2 deletions(-) 25 2 files changed, 14 insertions(+), 2 deletions(-)
24 create mode 100644 gcc/testsuite/gcc.target/microblaze/long.c 26 create mode 100644 gcc/testsuite/gcc.target/microblaze/long.c
25 27
26diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 28diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
27index ae7d5dd..002d7a5 100644 29index a3996119bd7..73d0e010cda 100644
28--- a/gcc/config/microblaze/microblaze.c 30--- a/gcc/config/microblaze/microblaze.c
29+++ b/gcc/config/microblaze/microblaze.c 31+++ b/gcc/config/microblaze/microblaze.c
30@@ -2594,14 +2594,18 @@ print_operand (FILE * file, rtx op, int letter) 32@@ -2587,14 +2587,16 @@ print_operand (FILE * file, rtx op, int letter)
31 else if (letter == 'h' || letter == 'j') 33 else if (letter == 'h' || letter == 'j')
32 { 34 {
33 long val[2]; 35 long val[2];
@@ -40,17 +42,15 @@ index ae7d5dd..002d7a5 100644
40 { 42 {
41- val[0] = CONST_DOUBLE_HIGH (op); 43- val[0] = CONST_DOUBLE_HIGH (op);
42- val[1] = CONST_DOUBLE_LOW (op); 44- val[1] = CONST_DOUBLE_LOW (op);
43+ REAL_VALUE_TYPE rv; 45+ REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l);
44+ REAL_VALUE_FROM_CONST_DOUBLE (rv, op); 46+ val[1] = l[WORDS_BIG_ENDIAN == 0];
45+ REAL_VALUE_TO_TARGET_DOUBLE (rv, l); 47+ val[0] = l[WORDS_BIG_ENDIAN != 0];
46+ val[1] = l[WORDS_BIG_ENDIAN == 0];
47+ val[0] = l[WORDS_BIG_ENDIAN != 0];
48 } 48 }
49 } 49 }
50 else if (code == CONST_INT) 50 else if (code == CONST_INT)
51diff --git a/gcc/testsuite/gcc.target/microblaze/long.c b/gcc/testsuite/gcc.target/microblaze/long.c 51diff --git a/gcc/testsuite/gcc.target/microblaze/long.c b/gcc/testsuite/gcc.target/microblaze/long.c
52new file mode 100644 52new file mode 100644
53index 0000000..4d45186 53index 00000000000..4d4518619d1
54--- /dev/null 54--- /dev/null
55+++ b/gcc/testsuite/gcc.target/microblaze/long.c 55+++ b/gcc/testsuite/gcc.target/microblaze/long.c
56@@ -0,0 +1,10 @@ 56@@ -0,0 +1,10 @@
@@ -65,5 +65,5 @@ index 0000000..4d45186
65+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */ 65+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */
66+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */ 66+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */
67-- 67--
682.7.4 682.17.1
69 69
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
index cbfc98de..3869db15 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0027-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
@@ -1,11 +1,12 @@
1From 30402c3bcfeb8a93656957b22558997b65d69cb8 Mon Sep 17 00:00:00 2001 1From ea79d97f430d554921d94d30cb8db851cce6664b Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 11:49:58 +0530 3Date: Wed, 18 Jan 2017 11:49:58 +0530
4Subject: [PATCH 29/63] [Fix, microblaze]: Fix internal compiler error with 4Subject: [PATCH 27/58] [Fix, microblaze]: Fix internal compiler error with
5 msmall-divides This patch will fix the internal error 5 msmall-divides
6 microblaze_expand_divide function which comes because of rtx PLUS where the 6
7 mem_rtx is of type SI and the operand is of type QImode. This patch modifies 7This patch will fix the internal error microblaze_expand_divide function which comes because
8 the mem_rtx as QImode and Plus as QImode to fix the error. 8of rtx PLUS where the mem_rtx is of type SI and the operand is of type QImode.
9This patch modifies the mem_rtx as QImode and Plus as QImode to fix the error.
9 10
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 11Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 Ajit Agarwal <ajitkum@xilinx.com> 12 Ajit Agarwal <ajitkum@xilinx.com>
@@ -19,10 +20,10 @@ ChangeLog:
19 1 file changed, 1 insertion(+), 1 deletion(-) 20 1 file changed, 1 insertion(+), 1 deletion(-)
20 21
21diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 22diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
22index 002d7a5..c662952 100644 23index 73d0e010cda..f7c29ef28f5 100644
23--- a/gcc/config/microblaze/microblaze.c 24--- a/gcc/config/microblaze/microblaze.c
24+++ b/gcc/config/microblaze/microblaze.c 25+++ b/gcc/config/microblaze/microblaze.c
25@@ -3909,7 +3909,7 @@ microblaze_expand_divide (rtx operands[]) 26@@ -3902,7 +3902,7 @@ microblaze_expand_divide (rtx operands[])
26 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); 27 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4)));
27 emit_insn (gen_addsi3 (regt1, regt1, operands[2])); 28 emit_insn (gen_addsi3 (regt1, regt1, operands[2]));
28 mem_rtx = gen_rtx_MEM (QImode, 29 mem_rtx = gen_rtx_MEM (QImode,
@@ -32,5 +33,5 @@ index 002d7a5..c662952 100644
32 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); 33 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx));
33 jump = emit_jump_insn_after (gen_jump (div_end_label), insn); 34 jump = emit_jump_insn_after (gen_jump (div_end_label), insn);
34-- 35--
352.7.4 362.17.1
36 37
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0030-patch-microblaze-Fix-the-calculation-of-high-word-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0028-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
index fce06359..3f9dd69b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0030-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0028-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
@@ -1,8 +1,8 @@
1From 5ac80cf926c4dc96cbfd189f02c9250865b52dd3 Mon Sep 17 00:00:00 2001 1From fa067a4b7b65aae3671bb02d77c580c9e35fc384 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 12:03:39 +0530 3Date: Wed, 18 Jan 2017 12:03:39 +0530
4Subject: [PATCH 30/63] [patch,microblaze]: Fix the calculation of high word in 4Subject: [PATCH 28/58] [patch,microblaze]: Fix the calculation of high word in
5 a long long 6. .4-bit 5 a long long 64-bit
6 6
7This patch will change the calculation of high word in a long long 64-bit. 7This patch will change the calculation of high word in a long long 64-bit.
8Earlier to this patch the high word of long long word (0xF0000000ULL) is 8Earlier to this patch the high word of long long word (0xF0000000ULL) is
@@ -27,10 +27,10 @@ ChangeLog:
27 1 file changed, 3 deletions(-) 27 1 file changed, 3 deletions(-)
28 28
29diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 29diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
30index c662952..8013a2c 100644 30index f7c29ef28f5..0a73a6c32b4 100644
31--- a/gcc/config/microblaze/microblaze.c 31--- a/gcc/config/microblaze/microblaze.c
32+++ b/gcc/config/microblaze/microblaze.c 32+++ b/gcc/config/microblaze/microblaze.c
33@@ -2612,9 +2612,6 @@ print_operand (FILE * file, rtx op, int letter) 33@@ -2603,9 +2603,6 @@ print_operand (FILE * file, rtx op, int letter)
34 { 34 {
35 val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32; 35 val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32;
36 val[1] = INTVAL (op) & 0x00000000ffffffffLL; 36 val[1] = INTVAL (op) & 0x00000000ffffffffLL;
@@ -41,5 +41,5 @@ index c662952..8013a2c 100644
41 fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]); 41 fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]);
42 } 42 }
43-- 43--
442.7.4 442.17.1
45 45
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Patch-microblaze-Add-new-bit-field-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Patch-microblaze-Add-new-bit-field-instructions.patch
index cbf64d97..dfdb479c 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Patch-microblaze-Add-new-bit-field-instructions.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0029-Patch-microblaze-Add-new-bit-field-instructions.patch
@@ -1,13 +1,15 @@
1From 45deb5bd3ae8c3db360ef181c9873e37d2288848 Mon Sep 17 00:00:00 2001 1From 341bf8ad4e55693d00d4d8c916f4c347e7186dd4 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 12:14:51 +0530 3Date: Wed, 18 Jan 2017 12:14:51 +0530
4Subject: [PATCH 31/63] [Patch, microblaze]: Add new bit-field instructions 4Subject: [PATCH 29/58] [Patch, microblaze]: Add new bit-field instructions
5 This patches adds new bsefi and bsifi instructions. BSEFI- The instruction 5
6 shall extract a bit field from a register and place it right-adjusted in the 6This patches adds new bsefi and bsifi instructions.
7 destination register. The other bits in the destination register shall be set 7BSEFI- The instruction shall extract a bit field from a
8 to zero BSIFI- The instruction shall insert a right-adjusted bit field from a 8register and place it right-adjusted in the destination register.
9 register at another position in the destination register. The rest of the 9The other bits in the destination register shall be set to zero
10 bits in the destination register shall be unchanged 10BSIFI- The instruction shall insert a right-adjusted bit field
11from a register at another position in the destination register.
12The rest of the bits in the destination register shall be unchanged
11 13
12Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 14Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
13 15
@@ -16,11 +18,32 @@ ChangeLog:
16 18
17 *microblaze.md (Update): Added new patterns 19 *microblaze.md (Update): Added new patterns
18--- 20---
19 gcc/config/microblaze/microblaze.md | 73 +++++++++++++++++++++++++++++++++++++ 21 gcc/config/microblaze/microblaze.h | 2 +
20 1 file changed, 73 insertions(+) 22 gcc/config/microblaze/microblaze.md | 73 +++++++++++++++++++++++++++++
23 2 files changed, 75 insertions(+)
21 24
25diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
26index 8b0db2c1718..b5b7b22cec9 100644
27--- a/gcc/config/microblaze/microblaze.h
28+++ b/gcc/config/microblaze/microblaze.h
29@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[];
30
31 extern int microblaze_no_unsafe_delay;
32 extern int microblaze_has_clz;
33+extern int microblaze_has_bitfield;
34 extern enum pipeline_type microblaze_pipe;
35
36 #define OBJECT_FORMAT_ELF
37@@ -62,6 +63,7 @@ extern enum pipeline_type microblaze_pipe;
38
39 /* Do we have CLZ? */
40 #define TARGET_HAS_CLZ (TARGET_PATTERN_COMPARE && microblaze_has_clz)
41+#define TARGET_HAS_BITFIELD (TARGET_BARREL_SHIFT && microblaze_has_bitfield)
42
43 /* The default is to support PIC. */
44 #define TARGET_SUPPORTS_PIC 1
22diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 45diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
23index b7c16ac..67b298a 100644 46index c407a81c51e..fa6aabdb9d4 100644
24--- a/gcc/config/microblaze/microblaze.md 47--- a/gcc/config/microblaze/microblaze.md
25+++ b/gcc/config/microblaze/microblaze.md 48+++ b/gcc/config/microblaze/microblaze.md
26@@ -982,6 +982,8 @@ 49@@ -982,6 +982,8 @@
@@ -116,5 +139,5 @@ index b7c16ac..67b298a 100644
116+ 139+
117 (include "sync.md") 140 (include "sync.md")
118-- 141--
1192.7.4 1422.17.1
120 143
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0030-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch
index 86df58b3..bb773239 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0030-Patch-microblaze-Fix-bug-in-MB-version-calculation.patch
@@ -1,21 +1,23 @@
1From bc95cc12b2c4d96ea709eefc4b99181b8c40b19c Mon Sep 17 00:00:00 2001 1From df38540af411564f428079335c8d1e695dc1d723 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 12:42:10 +0530 3Date: Wed, 18 Jan 2017 12:42:10 +0530
4Subject: [PATCH 32/63] [Patch, microblaze]: Fix bug in MB version calculation 4Subject: [PATCH 30/58] [Patch, microblaze]: Fix bug in MB version calculation
5 This patch fixes the bug in microblaze_version_to_int function. Earlier the 5
6 conversion of vXX.YY.Z to int has a bug which is fixed now. 6This patch fixes the bug in microblaze_version_to_int function.
7Earlier the conversion of vXX.YY.Z to int has a bug which is
8fixed now.
7 9
8Signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com> 10Signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com>
9 Nagaraju Mekala <nmekala@xilix.com> 11 Nagaraju Mekala <nmekala@xilix.com>
10--- 12---
11 gcc/config/microblaze/microblaze.c | 147 ++++++++++++++++++------------------- 13 gcc/config/microblaze/microblaze.c | 145 ++++++++++++++---------------
12 1 file changed, 70 insertions(+), 77 deletions(-) 14 1 file changed, 69 insertions(+), 76 deletions(-)
13 15
14diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 16diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
15index 8013a2c..3f68ef0 100644 17index 0a73a6c32b4..4b5699671e8 100644
16--- a/gcc/config/microblaze/microblaze.c 18--- a/gcc/config/microblaze/microblaze.c
17+++ b/gcc/config/microblaze/microblaze.c 19+++ b/gcc/config/microblaze/microblaze.c
18@@ -239,6 +239,63 @@ section *sdata2_section; 20@@ -242,6 +242,63 @@ section *sdata2_section;
19 #define TARGET_HAVE_TLS true 21 #define TARGET_HAVE_TLS true
20 #endif 22 #endif
21 23
@@ -79,7 +81,7 @@ index 8013a2c..3f68ef0 100644
79 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ 81 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */
80 static bool 82 static bool
81 microblaze_const_double_ok (rtx op, machine_mode mode) 83 microblaze_const_double_ok (rtx op, machine_mode mode)
82@@ -1338,8 +1395,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 84@@ -1341,8 +1398,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED,
83 { 85 {
84 if (TARGET_BARREL_SHIFT) 86 if (TARGET_BARREL_SHIFT)
85 { 87 {
@@ -89,7 +91,7 @@ index 8013a2c..3f68ef0 100644
89 *total = COSTS_N_INSNS (1); 91 *total = COSTS_N_INSNS (1);
90 else 92 else
91 *total = COSTS_N_INSNS (2); 93 *total = COSTS_N_INSNS (2);
92@@ -1400,8 +1456,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 94@@ -1403,8 +1459,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED,
93 } 95 }
94 else if (!TARGET_SOFT_MUL) 96 else if (!TARGET_SOFT_MUL)
95 { 97 {
@@ -99,7 +101,7 @@ index 8013a2c..3f68ef0 100644
99 *total = COSTS_N_INSNS (1); 101 *total = COSTS_N_INSNS (1);
100 else 102 else
101 *total = COSTS_N_INSNS (3); 103 *total = COSTS_N_INSNS (3);
102@@ -1682,72 +1737,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v, machine_mode mode, 104@@ -1677,65 +1732,6 @@ function_arg_partial_bytes (cumulative_args_t cum_v,
103 return 0; 105 return 0;
104 } 106 }
105 107
@@ -165,15 +167,7 @@ index 8013a2c..3f68ef0 100644
165 static void 167 static void
166 microblaze_option_override (void) 168 microblaze_option_override (void)
167 { 169 {
168 register int i, start; 170@@ -1763,13 +1759,13 @@ microblaze_option_override (void)
169 register int regno;
170 register machine_mode mode;
171- int ver;
172+ int ver,ver_int;
173
174 microblaze_section_threshold = (global_options_set.x_g_switch_value
175 ? g_switch_value
176@@ -1768,13 +1764,13 @@ microblaze_option_override (void)
177 /* Check the MicroBlaze CPU version for any special action to be done. */ 171 /* Check the MicroBlaze CPU version for any special action to be done. */
178 if (microblaze_select_cpu == NULL) 172 if (microblaze_select_cpu == NULL)
179 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU; 173 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU;
@@ -190,7 +184,7 @@ index 8013a2c..3f68ef0 100644
190 if (ver < 0) 184 if (ver < 0)
191 { 185 {
192 /* No hardware exceptions in earlier versions. So no worries. */ 186 /* No hardware exceptions in earlier versions. So no worries. */
193@@ -1785,8 +1781,7 @@ microblaze_option_override (void) 187@@ -1780,8 +1776,7 @@ microblaze_option_override (void)
194 microblaze_pipe = MICROBLAZE_PIPE_3; 188 microblaze_pipe = MICROBLAZE_PIPE_3;
195 } 189 }
196 else if (ver == 0 190 else if (ver == 0
@@ -200,7 +194,7 @@ index 8013a2c..3f68ef0 100644
200 { 194 {
201 #if 0 195 #if 0
202 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY); 196 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY);
203@@ -1803,11 +1798,9 @@ microblaze_option_override (void) 197@@ -1798,11 +1793,9 @@ microblaze_option_override (void)
204 #endif 198 #endif
205 microblaze_no_unsafe_delay = 0; 199 microblaze_no_unsafe_delay = 0;
206 microblaze_pipe = MICROBLAZE_PIPE_5; 200 microblaze_pipe = MICROBLAZE_PIPE_5;
@@ -215,7 +209,7 @@ index 8013a2c..3f68ef0 100644
215 { 209 {
216 /* Pattern compares are to be turned on by default only when 210 /* Pattern compares are to be turned on by default only when
217 compiling for MB v5.00.'z'. */ 211 compiling for MB v5.00.'z'. */
218@@ -1815,7 +1808,7 @@ microblaze_option_override (void) 212@@ -1810,7 +1803,7 @@ microblaze_option_override (void)
219 } 213 }
220 } 214 }
221 215
@@ -224,7 +218,7 @@ index 8013a2c..3f68ef0 100644
224 if (ver < 0) 218 if (ver < 0)
225 { 219 {
226 if (TARGET_MULTIPLY_HIGH) 220 if (TARGET_MULTIPLY_HIGH)
227@@ -1824,7 +1817,7 @@ microblaze_option_override (void) 221@@ -1819,7 +1812,7 @@ microblaze_option_override (void)
228 "%<-mcpu=v6.00.a%> or greater"); 222 "%<-mcpu=v6.00.a%> or greater");
229 } 223 }
230 224
@@ -233,7 +227,7 @@ index 8013a2c..3f68ef0 100644
233 microblaze_has_clz = 1; 227 microblaze_has_clz = 1;
234 if (ver < 0) 228 if (ver < 0)
235 { 229 {
236@@ -1833,7 +1826,7 @@ microblaze_option_override (void) 230@@ -1828,7 +1821,7 @@ microblaze_option_override (void)
237 } 231 }
238 232
239 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ 233 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */
@@ -243,5 +237,5 @@ index 8013a2c..3f68ef0 100644
243 { 237 {
244 if (TARGET_REORDER == 1) 238 if (TARGET_REORDER == 1)
245-- 239--
2462.7.4 2402.17.1
247 241
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Fixing-the-issue-with-the-builtin_alloc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Fixing-the-issue-with-the-builtin_alloc.patch
index 91ac0d02..0c80cf81 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Fixing-the-issue-with-the-builtin_alloc.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0031-Fixing-the-issue-with-the-builtin_alloc.patch
@@ -1,9 +1,10 @@
1From e672184af6a43b773131181270c7a8c5c5273bd8 Mon Sep 17 00:00:00 2001 1From 87da245d89fffe6a025037b4a53f66dafa7e1f84 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 23 Feb 2017 17:09:04 +0530 3Date: Thu, 23 Feb 2017 17:09:04 +0530
4Subject: [PATCH 35/63] Fixing the issue with the builtin_alloc. register r18 4Subject: [PATCH 31/58] Fixing the issue with the builtin_alloc.
5 was not properly handling the stack pattern which was resolved by using free 5
6 available register 6register r18 was not properly handling the stack pattern
7which was resolved by using free available register
7 8
8signed-off-by:nagaraju mekala <nmekala@xilinx.com> 9signed-off-by:nagaraju mekala <nmekala@xilinx.com>
9--- 10---
@@ -11,7 +12,7 @@ signed-off-by:nagaraju mekala <nmekala@xilinx.com>
11 1 file changed, 4 insertions(+), 4 deletions(-) 12 1 file changed, 4 insertions(+), 4 deletions(-)
12 13
13diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
14index 67b298a..7bae957 100644 15index fa6aabdb9d4..9de46d0ce24 100644
15--- a/gcc/config/microblaze/microblaze.md 16--- a/gcc/config/microblaze/microblaze.md
16+++ b/gcc/config/microblaze/microblaze.md 17+++ b/gcc/config/microblaze/microblaze.md
17@@ -2078,10 +2078,10 @@ 18@@ -2078,10 +2078,10 @@
@@ -40,5 +41,5 @@ index 67b298a..7bae957 100644
40 } 41 }
41 ) 42 )
42-- 43--
432.7.4 442.17.1
44 45
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-update-in-constraints-for-bitfield-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-Microblaze-update-in-constraints-for-bitfield-.patch
index ba0f8e80..458af563 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-update-in-constraints-for-bitfield-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0032-Patch-Microblaze-update-in-constraints-for-bitfield-.patch
@@ -1,15 +1,15 @@
1From f436198b817f33d56aaddb88ff629378498de489 Mon Sep 17 00:00:00 2001 1From 3e8779308d1901b273b2b360bea719aa72d24ab9 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 19 Feb 2018 18:06:16 +0530 3Date: Mon, 19 Feb 2018 18:06:16 +0530
4Subject: [PATCH 37/63] [Patch,Microblaze]: update in constraints for bitfield 4Subject: [PATCH 32/58] [Patch,Microblaze]: update in constraints for bitfield
5 insert and extract instructions. 5 insert and extract instructions.
6 6
7--- 7---
8 gcc/config/microblaze/microblaze.md | 43 ++++++------------------------------- 8 gcc/config/microblaze/microblaze.md | 43 +++++------------------------
9 1 file changed, 7 insertions(+), 36 deletions(-) 9 1 file changed, 7 insertions(+), 36 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index 7bae957..6101387 100644 12index 9de46d0ce24..fe94807182b 100644
13--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
15@@ -2492,33 +2492,17 @@ 15@@ -2492,33 +2492,17 @@
@@ -76,5 +76,5 @@ index 7bae957..6101387 100644
76 (define_insn "insv_32" 76 (define_insn "insv_32"
77 [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") 77 [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")
78-- 78--
792.7.4 792.17.1
80 80
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Fixing-the-bug-in-the-bit-field-instruction.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Fixing-the-bug-in-the-bit-field-instruction.patch
deleted file mode 100644
index 68f70ae8..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Fixing-the-bug-in-the-bit-field-instruction.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 51da0572e0650378e422030b26d1258c8fc76df6 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 13:57:48 +0530
4Subject: [PATCH 33/63] Fixing the bug in the bit-field instruction. Bit field
5 instruction should be generated only if mcpu >10.0
6
7---
8 gcc/config/microblaze/microblaze.c | 3 +++
9 gcc/config/microblaze/microblaze.h | 2 ++
10 2 files changed, 5 insertions(+)
11
12diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
13index 3f68ef0..a37f08eea 100644
14--- a/gcc/config/microblaze/microblaze.c
15+++ b/gcc/config/microblaze/microblaze.c
16@@ -164,6 +164,9 @@ int microblaze_no_unsafe_delay;
17 /* Set to one if the targeted core has the CLZ insn. */
18 int microblaze_has_clz = 0;
19
20+/* Set to one if the targeted core has barrel-shift and cpu > 10.0 */
21+int microblaze_has_bitfield = 0;
22+
23 /* Which CPU pipeline do we use. We haven't really standardized on a CPU
24 version having only a particular type of pipeline. There can still be
25 options on the CPU to scale pipeline features up or down. :(
26diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
27index bf7f3b4..1d05e6e 100644
28--- a/gcc/config/microblaze/microblaze.h
29+++ b/gcc/config/microblaze/microblaze.h
30@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[];
31
32 extern int microblaze_no_unsafe_delay;
33 extern int microblaze_has_clz;
34+extern int microblaze_has_bitfield;
35 extern enum pipeline_type microblaze_pipe;
36
37 #define OBJECT_FORMAT_ELF
38@@ -62,6 +63,7 @@ extern enum pipeline_type microblaze_pipe;
39
40 /* Do we have CLZ? */
41 #define TARGET_HAS_CLZ (TARGET_PATTERN_COMPARE && microblaze_has_clz)
42+#define TARGET_HAS_BITFIELD (TARGET_BARREL_SHIFT && microblaze_has_bitfield)
43
44 /* The default is to support PIC. */
45 #define TARGET_SUPPORTS_PIC 1
46--
472.7.4
48
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch
index 2b90880f..32433470 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0033-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch
@@ -1,7 +1,7 @@
1From 89aa1907ab0abad38e394f46f7e5f577bdb26498 Mon Sep 17 00:00:00 2001 1From eb90da1d616dfb7481b3f7c74a2be40e921a24f2 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 4 Jun 2018 10:10:18 +0530 3Date: Mon, 4 Jun 2018 10:10:18 +0530
4Subject: [PATCH 38/63] [Patch,Microblaze] : Removed fsqrt generation for 4Subject: [PATCH 33/58] [Patch,Microblaze] : Removed fsqrt generation for
5 double values. 5 double values.
6 6
7--- 7---
@@ -9,7 +9,7 @@ Subject: [PATCH 38/63] [Patch,Microblaze] : Removed fsqrt generation for
9 1 file changed, 14 deletions(-) 9 1 file changed, 14 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index 6101387..eb01221 100644 12index fe94807182b..a527da70f8a 100644
13--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
15@@ -526,20 +526,6 @@ 15@@ -526,20 +526,6 @@
@@ -34,5 +34,5 @@ index 6101387..eb01221 100644
34 [(set (match_operand:SI 0 "register_operand" "=d") 34 [(set (match_operand:SI 0 "register_operand" "=d")
35 (fix:SI (match_operand:SF 1 "register_operand" "d")))] 35 (fix:SI (match_operand:SF 1 "register_operand" "d")))]
36-- 36--
372.7.4 372.17.1
38 38
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Intial-commit-of-64-bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Intial-commit-of-64-bit-Microblaze.patch
index f524cba2..acf14b23 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Intial-commit-of-64-bit-Microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Intial-commit-of-64-bit-Microblaze.patch
@@ -1,21 +1,37 @@
1From 68359cc8e82f63d01a77c39c68e782e6757cd71e Mon Sep 17 00:00:00 2001 1From 9600049313b095d6d7d8ea46a7ab783fabae71a2 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 3 Apr 2018 16:48:39 +0530 3Date: Tue, 3 Apr 2018 16:48:39 +0530
4Subject: [PATCH 39/63] Intial commit of 64-bit Microblaze 4Subject: [PATCH 34/58] Intial commit of 64-bit Microblaze
5 5
6Conflicts: 6Added load store pattern movdi and also adding missing files
7 gcc/config/microblaze/microblaze.opt
8--- 7---
8 gcc/config/microblaze/constraints.md | 5 +
9 gcc/config/microblaze/microblaze-protos.h | 1 + 9 gcc/config/microblaze/microblaze-protos.h | 1 +
10 gcc/config/microblaze/microblaze.c | 109 +++++++-- 10 gcc/config/microblaze/microblaze.c | 109 ++++--
11 gcc/config/microblaze/microblaze.h | 4 +- 11 gcc/config/microblaze/microblaze.h | 4 +-
12 gcc/config/microblaze/microblaze.md | 370 +++++++++++++++++++++++++++++- 12 gcc/config/microblaze/microblaze.md | 394 +++++++++++++++++++++-
13 gcc/config/microblaze/microblaze.opt | 7 +- 13 gcc/config/microblaze/microblaze.opt | 7 +-
14 gcc/config/microblaze/t-microblaze | 7 +- 14 gcc/config/microblaze/t-microblaze | 7 +-
15 6 files changed, 460 insertions(+), 38 deletions(-) 15 7 files changed, 490 insertions(+), 37 deletions(-)
16 16
17diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
18index b9fc6e3fae2..f636b035280 100644
19--- a/gcc/config/microblaze/constraints.md
20+++ b/gcc/config/microblaze/constraints.md
21@@ -52,6 +52,11 @@
22 (and (match_code "const_int")
23 (match_test "ival > 0 && ival < 0x10000")))
24
25+(define_constraint "K"
26+ "A constant in the range 0xffffff8000000000L to 0x0000007fffffffffL (inclusive)."
27+ (and (match_code "const_int")
28+ (match_test "ival > (long)0xffffff8000000000L && ival < (long)0x0000007fffffffffL")))
29+
30 ;; Define floating point constraints
31
32 (define_constraint "G"
17diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 33diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
18index bdc9b69..7d6c189 100644 34index 76ffc682df2..b8a3321dbdf 100644
19--- a/gcc/config/microblaze/microblaze-protos.h 35--- a/gcc/config/microblaze/microblaze-protos.h
20+++ b/gcc/config/microblaze/microblaze-protos.h 36+++ b/gcc/config/microblaze/microblaze-protos.h
21@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *); 37@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *);
@@ -27,10 +43,10 @@ index bdc9b69..7d6c189 100644
27 extern void print_operand (FILE *, rtx, int); 43 extern void print_operand (FILE *, rtx, int);
28 extern void print_operand_address (FILE *, rtx); 44 extern void print_operand_address (FILE *, rtx);
29diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 45diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
30index 71640e5..f740f5c 100644 46index 4b5699671e8..8a3ccae558a 100644
31--- a/gcc/config/microblaze/microblaze.c 47--- a/gcc/config/microblaze/microblaze.c
32+++ b/gcc/config/microblaze/microblaze.c 48+++ b/gcc/config/microblaze/microblaze.c
33@@ -3570,11 +3570,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 49@@ -3562,11 +3562,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[])
34 op0 = operands[0]; 50 op0 = operands[0];
35 op1 = operands[1]; 51 op1 = operands[1];
36 52
@@ -45,7 +61,7 @@ index 71640e5..f740f5c 100644
45 emit_move_insn (op0, temp); 61 emit_move_insn (op0, temp);
46 return true; 62 return true;
47 } 63 }
48@@ -3639,12 +3639,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 64@@ -3631,12 +3631,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[])
49 && (flag_pic == 2 || microblaze_tls_symbol_p (p0) 65 && (flag_pic == 2 || microblaze_tls_symbol_p (p0)
50 || !SMALL_INT (p1))))) 66 || !SMALL_INT (p1)))))
51 { 67 {
@@ -60,7 +76,7 @@ index 71640e5..f740f5c 100644
60 return true; 76 return true;
61 } 77 }
62 } 78 }
63@@ -3775,7 +3775,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 79@@ -3767,7 +3767,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
64 rtx cmp_op0 = operands[1]; 80 rtx cmp_op0 = operands[1];
65 rtx cmp_op1 = operands[2]; 81 rtx cmp_op1 = operands[2];
66 rtx label1 = operands[3]; 82 rtx label1 = operands[3];
@@ -69,7 +85,7 @@ index 71640e5..f740f5c 100644
69 rtx condition; 85 rtx condition;
70 86
71 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); 87 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG));
72@@ -3784,23 +3784,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 88@@ -3776,23 +3776,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
73 if (cmp_op1 == const0_rtx) 89 if (cmp_op1 == const0_rtx)
74 { 90 {
75 comp_reg = cmp_op0; 91 comp_reg = cmp_op0;
@@ -112,7 +128,7 @@ index 71640e5..f740f5c 100644
112 } 128 }
113 } 129 }
114 130
115@@ -3811,7 +3824,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 131@@ -3803,7 +3816,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
116 rtx cmp_op0 = operands[1]; 132 rtx cmp_op0 = operands[1];
117 rtx cmp_op1 = operands[2]; 133 rtx cmp_op1 = operands[2];
118 rtx label1 = operands[3]; 134 rtx label1 = operands[3];
@@ -121,7 +137,7 @@ index 71640e5..f740f5c 100644
121 rtx condition; 137 rtx condition;
122 138
123 gcc_assert ((GET_CODE (cmp_op0) == REG) 139 gcc_assert ((GET_CODE (cmp_op0) == REG)
124@@ -3822,30 +3835,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 140@@ -3814,30 +3827,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
125 { 141 {
126 comp_reg = cmp_op0; 142 comp_reg = cmp_op0;
127 condition = gen_rtx_fmt_ee (signed_condition (code), 143 condition = gen_rtx_fmt_ee (signed_condition (code),
@@ -197,7 +213,7 @@ index 71640e5..f740f5c 100644
197 } 213 }
198 } 214 }
199 215
200@@ -3862,6 +3908,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 216@@ -3854,6 +3900,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[])
201 emit_jump_insn (gen_condjump (condition, operands[3])); 217 emit_jump_insn (gen_condjump (condition, operands[3]));
202 } 218 }
203 219
@@ -218,7 +234,7 @@ index 71640e5..f740f5c 100644
218 234
219 static bool 235 static bool
220diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 236diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
221index 1d05e6e..2ca44f5 100644 237index b5b7b22cec9..4931895e650 100644
222--- a/gcc/config/microblaze/microblaze.h 238--- a/gcc/config/microblaze/microblaze.h
223+++ b/gcc/config/microblaze/microblaze.h 239+++ b/gcc/config/microblaze/microblaze.h
224@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe; 240@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe;
@@ -247,7 +263,7 @@ index 1d05e6e..2ca44f5 100644
247 #define FLOAT_TYPE_SIZE 32 263 #define FLOAT_TYPE_SIZE 32
248 #define DOUBLE_TYPE_SIZE 64 264 #define DOUBLE_TYPE_SIZE 64
249diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 265diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
250index eb01221..dbb592e 100644 266index a527da70f8a..bcf2b9244f8 100644
251--- a/gcc/config/microblaze/microblaze.md 267--- a/gcc/config/microblaze/microblaze.md
252+++ b/gcc/config/microblaze/microblaze.md 268+++ b/gcc/config/microblaze/microblaze.md
253@@ -497,7 +497,6 @@ 269@@ -497,7 +497,6 @@
@@ -440,15 +456,39 @@ index eb01221..dbb592e 100644
440 ;; Those for integer source operand are ordered 456 ;; Those for integer source operand are ordered
441 ;; widest source type first. 457 ;; widest source type first.
442 458
443@@ -1011,7 +1122,6 @@ 459@@ -1011,6 +1122,31 @@
444 ) 460 )
445 461
446 462
447- 463+(define_insn "*movdi_internal_64"
464+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
465+ (match_operand:DI 1 "general_operand" " d,K,J,R,o,d,d"))]
466+ "TARGET_MB_64 && (INTVAL(operands[1]) < 0x7fffffffff) && (INTVAL(operands[1]) > 0xffffff8000000000)"
467+ {
468+ switch (which_alternative)
469+ {
470+ case 0:
471+ return "addlk\t%0,%1";
472+ case 1:
473+ return "addlik\t%0,r0,%1";
474+ case 2:
475+ return "addlk\t%0,r0,r0";
476+ case 3:
477+ case 4:
478+ return "lli\t%0,%1";
479+ case 5:
480+ case 6:
481+ return "sli\t%1,%0";
482+ }
483+ return "unreachable";
484+ }
485+ [(set_attr "type" "no_delay_move,no_delay_arith,no_delay_arith,no_delay_load,no_delay_load,no_delay_store,no_delay_store")
486+ (set_attr "mode" "DI")
487+ (set_attr "length" "8,8,8,8,12,8,12")])
488
448 (define_insn "*movdi_internal" 489 (define_insn "*movdi_internal"
449 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o") 490 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
450 (match_operand:DI 1 "general_operand" " d,i,J,R,o,d,d"))] 491@@ -1423,6 +1559,36 @@
451@@ -1423,6 +1533,36 @@
452 (set_attr "length" "4,4")] 492 (set_attr "length" "4,4")]
453 ) 493 )
454 494
@@ -485,7 +525,7 @@ index eb01221..dbb592e 100644
485 ;; The following patterns apply when there is no barrel shifter present 525 ;; The following patterns apply when there is no barrel shifter present
486 526
487 (define_insn "*ashlsi3_with_mul_delay" 527 (define_insn "*ashlsi3_with_mul_delay"
488@@ -1548,6 +1688,36 @@ 528@@ -1548,6 +1714,36 @@
489 ;;---------------------------------------------------------------- 529 ;;----------------------------------------------------------------
490 ;; 32-bit right shifts 530 ;; 32-bit right shifts
491 ;;---------------------------------------------------------------- 531 ;;----------------------------------------------------------------
@@ -522,7 +562,7 @@ index eb01221..dbb592e 100644
522 (define_expand "ashrsi3" 562 (define_expand "ashrsi3"
523 [(set (match_operand:SI 0 "register_operand" "=&d") 563 [(set (match_operand:SI 0 "register_operand" "=&d")
524 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") 564 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
525@@ -1657,6 +1827,36 @@ 565@@ -1657,6 +1853,36 @@
526 ;;---------------------------------------------------------------- 566 ;;----------------------------------------------------------------
527 ;; 32-bit right shifts (logical) 567 ;; 32-bit right shifts (logical)
528 ;;---------------------------------------------------------------- 568 ;;----------------------------------------------------------------
@@ -559,7 +599,7 @@ index eb01221..dbb592e 100644
559 599
560 (define_expand "lshrsi3" 600 (define_expand "lshrsi3"
561 [(set (match_operand:SI 0 "register_operand" "=&d") 601 [(set (match_operand:SI 0 "register_operand" "=&d")
562@@ -1803,6 +2003,8 @@ 602@@ -1803,6 +2029,8 @@
563 (set_attr "length" "4")] 603 (set_attr "length" "4")]
564 ) 604 )
565 605
@@ -568,7 +608,7 @@ index eb01221..dbb592e 100644
568 ;;---------------------------------------------------------------- 608 ;;----------------------------------------------------------------
569 ;; Setting a register from an floating point comparison. 609 ;; Setting a register from an floating point comparison.
570 ;;---------------------------------------------------------------- 610 ;;----------------------------------------------------------------
571@@ -1818,6 +2020,18 @@ 611@@ -1818,6 +2046,18 @@
572 (set_attr "length" "4")] 612 (set_attr "length" "4")]
573 ) 613 )
574 614
@@ -587,7 +627,7 @@ index eb01221..dbb592e 100644
587 ;;---------------------------------------------------------------- 627 ;;----------------------------------------------------------------
588 ;; Conditional branches 628 ;; Conditional branches
589 ;;---------------------------------------------------------------- 629 ;;----------------------------------------------------------------
590@@ -1930,6 +2144,115 @@ 630@@ -1930,6 +2170,115 @@
591 (set_attr "length" "12")] 631 (set_attr "length" "12")]
592 ) 632 )
593 633
@@ -703,7 +743,7 @@ index eb01221..dbb592e 100644
703 ;;---------------------------------------------------------------- 743 ;;----------------------------------------------------------------
704 ;; Unconditional branches 744 ;; Unconditional branches
705 ;;---------------------------------------------------------------- 745 ;;----------------------------------------------------------------
706@@ -2478,17 +2801,33 @@ 746@@ -2478,17 +2827,33 @@
707 DONE; 747 DONE;
708 }") 748 }")
709 749
@@ -742,7 +782,7 @@ index eb01221..dbb592e 100644
742 [(set (match_operand:SI 0 "register_operand" "=r") 782 [(set (match_operand:SI 0 "register_operand" "=r")
743 (zero_extract:SI (match_operand:SI 1 "register_operand" "r") 783 (zero_extract:SI (match_operand:SI 1 "register_operand" "r")
744 (match_operand:SI 2 "immediate_operand" "I") 784 (match_operand:SI 2 "immediate_operand" "I")
745@@ -2505,8 +2844,21 @@ 785@@ -2505,8 +2870,21 @@
746 (match_operand:SI 2 "immediate_operand" "I")) 786 (match_operand:SI 2 "immediate_operand" "I"))
747 (match_operand:SI 3 "register_operand" "r"))] 787 (match_operand:SI 3 "register_operand" "r"))]
748 "TARGET_HAS_BITFIELD" 788 "TARGET_HAS_BITFIELD"
@@ -767,7 +807,7 @@ index eb01221..dbb592e 100644
767 (define_insn "insv_32" 807 (define_insn "insv_32"
768 [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") 808 [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")
769diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt 809diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt
770index d23f376..f316e27 100644 810index a29c6f8df90..bbe48b06da6 100644
771--- a/gcc/config/microblaze/microblaze.opt 811--- a/gcc/config/microblaze/microblaze.opt
772+++ b/gcc/config/microblaze/microblaze.opt 812+++ b/gcc/config/microblaze/microblaze.opt
773@@ -136,4 +136,9 @@ Target 813@@ -136,4 +136,9 @@ Target
@@ -782,7 +822,7 @@ index d23f376..f316e27 100644
782+MicroBlaze 64-bit mode. 822+MicroBlaze 64-bit mode.
783+ 823+
784diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 824diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
785index 41fa9a9..e9a1921 100644 825index 41fa9a92081..7671f63c5b5 100644
786--- a/gcc/config/microblaze/t-microblaze 826--- a/gcc/config/microblaze/t-microblaze
787+++ b/gcc/config/microblaze/t-microblaze 827+++ b/gcc/config/microblaze/t-microblaze
788@@ -1,8 +1,11 @@ 828@@ -1,8 +1,11 @@
@@ -794,11 +834,11 @@ index 41fa9a9..e9a1921 100644
794 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian 834 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian
795+MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/m64 835+MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/m64
796 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian 836 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian
797+MULTILIB_EXCEPTIONS += mxl-multiply-high/m64 837+#MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
798+MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 838+#MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
799 839
800 # Extra files 840 # Extra files
801 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ 841 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
802-- 842--
8032.7.4 8432.17.1
804 844
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Patch-microblaze-Macros-used-in-Xilinx-internal-patc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Patch-microblaze-Macros-used-in-Xilinx-internal-patc.patch
deleted file mode 100644
index 04326205..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0034-Patch-microblaze-Macros-used-in-Xilinx-internal-patc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 132b913b721f66c5db17f62dd5559bbca11bb875 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 20:57:10 +0530
4Subject: [PATCH 34/63] [Patch, microblaze]: Macros used in Xilinx internal
5 patches has been removed in gcc 6.2 version so modified the code accordingly.
6
7---
8 gcc/config/microblaze/microblaze.c | 8 +++-----
9 1 file changed, 3 insertions(+), 5 deletions(-)
10
11diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
12index a37f08eea..71640e5 100644
13--- a/gcc/config/microblaze/microblaze.c
14+++ b/gcc/config/microblaze/microblaze.c
15@@ -2597,11 +2597,9 @@ print_operand (FILE * file, rtx op, int letter)
16 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), val);
17 else
18 {
19- REAL_VALUE_TYPE rv;
20- REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
21- REAL_VALUE_TO_TARGET_DOUBLE (rv, l);
22- val[1] = l[WORDS_BIG_ENDIAN == 0];
23- val[0] = l[WORDS_BIG_ENDIAN != 0];
24+ REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l);
25+ val[1] = l[WORDS_BIG_ENDIAN == 0];
26+ val[0] = l[WORDS_BIG_ENDIAN != 0];
27 }
28 }
29 else if (code == CONST_INT)
30--
312.7.4
32
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Intial-commit-for-64bit-MB-sources.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Intial-commit-for-64bit-MB-sources.patch
index b022eb77..e7872d54 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Intial-commit-for-64bit-MB-sources.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0035-Intial-commit-for-64bit-MB-sources.patch
@@ -1,25 +1,25 @@
1From 7c68b1c9771f09f7cc53410248e8432c562d24bf Mon Sep 17 00:00:00 2001 1From 8660e76d664ee4b42a83a4c15344b072d3c879df Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 27 Jul 2018 15:23:41 +0530 3Date: Fri, 27 Jul 2018 15:23:41 +0530
4Subject: [PATCH 41/63] Intial commit for 64bit-MB sources. Need to cleanup the 4Subject: [PATCH 35/58] Intial commit for 64bit-MB sources.
5 code later.
6 5
6Need to cleanup the code later.
7--- 7---
8 gcc/config/microblaze/constraints.md | 2 +- 8 gcc/config/microblaze/constraints.md | 2 +-
9 gcc/config/microblaze/microblaze-c.c | 6 + 9 gcc/config/microblaze/microblaze-c.c | 6 +
10 gcc/config/microblaze/microblaze.c | 218 ++++++++---- 10 gcc/config/microblaze/microblaze.c | 218 ++++++---
11 gcc/config/microblaze/microblaze.h | 63 ++-- 11 gcc/config/microblaze/microblaze.h | 63 ++-
12 gcc/config/microblaze/microblaze.md | 606 ++++++++++++++++++++++++-------- 12 gcc/config/microblaze/microblaze.md | 606 ++++++++++++++++++------
13 gcc/config/microblaze/t-microblaze | 7 +- 13 gcc/config/microblaze/t-microblaze | 7 +-
14 libgcc/config/microblaze/crti.S | 4 +- 14 libgcc/config/microblaze/crti.S | 4 +-
15 libgcc/config/microblaze/crtn.S | 4 +- 15 libgcc/config/microblaze/crtn.S | 4 +-
16 libgcc/config/microblaze/divdi3.S | 98 ++++++ 16 libgcc/config/microblaze/divdi3.S | 98 ++++
17 libgcc/config/microblaze/divdi3_table.c | 62 ++++ 17 libgcc/config/microblaze/divdi3_table.c | 62 +++
18 libgcc/config/microblaze/moddi3.S | 97 +++++ 18 libgcc/config/microblaze/moddi3.S | 97 ++++
19 libgcc/config/microblaze/muldi3.S | 73 ++++ 19 libgcc/config/microblaze/muldi3.S | 73 +++
20 libgcc/config/microblaze/t-microblaze | 11 +- 20 libgcc/config/microblaze/t-microblaze | 11 +-
21 libgcc/config/microblaze/udivdi3.S | 107 ++++++ 21 libgcc/config/microblaze/udivdi3.S | 107 +++++
22 libgcc/config/microblaze/umoddi3.S | 110 ++++++ 22 libgcc/config/microblaze/umoddi3.S | 110 +++++
23 15 files changed, 1232 insertions(+), 236 deletions(-) 23 15 files changed, 1232 insertions(+), 236 deletions(-)
24 create mode 100644 libgcc/config/microblaze/divdi3.S 24 create mode 100644 libgcc/config/microblaze/divdi3.S
25 create mode 100644 libgcc/config/microblaze/divdi3_table.c 25 create mode 100644 libgcc/config/microblaze/divdi3_table.c
@@ -29,7 +29,7 @@ Subject: [PATCH 41/63] Intial commit for 64bit-MB sources. Need to cleanup the
29 create mode 100644 libgcc/config/microblaze/umoddi3.S 29 create mode 100644 libgcc/config/microblaze/umoddi3.S
30 30
31diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 31diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
32index 69bcb24..2fce91e 100644 32index f636b035280..c2b0a21c53b 100644
33--- a/gcc/config/microblaze/constraints.md 33--- a/gcc/config/microblaze/constraints.md
34+++ b/gcc/config/microblaze/constraints.md 34+++ b/gcc/config/microblaze/constraints.md
35@@ -55,7 +55,7 @@ 35@@ -55,7 +55,7 @@
@@ -42,7 +42,7 @@ index 69bcb24..2fce91e 100644
42 ;; Define floating point constraints 42 ;; Define floating point constraints
43 43
44diff --git a/gcc/config/microblaze/microblaze-c.c b/gcc/config/microblaze/microblaze-c.c 44diff --git a/gcc/config/microblaze/microblaze-c.c b/gcc/config/microblaze/microblaze-c.c
45index cd21319..d2b0c76 100644 45index d8c88e510e5..dbcd21fc6ee 100644
46--- a/gcc/config/microblaze/microblaze-c.c 46--- a/gcc/config/microblaze/microblaze-c.c
47+++ b/gcc/config/microblaze/microblaze-c.c 47+++ b/gcc/config/microblaze/microblaze-c.c
48@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile) 48@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile)
@@ -57,7 +57,7 @@ index cd21319..d2b0c76 100644
57+ } 57+ }
58 } 58 }
59diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 59diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
60index f740f5c..d5ff7af 100644 60index 8a3ccae558a..3ecda553fe6 100644
61--- a/gcc/config/microblaze/microblaze.c 61--- a/gcc/config/microblaze/microblaze.c
62+++ b/gcc/config/microblaze/microblaze.c 62+++ b/gcc/config/microblaze/microblaze.c
63@@ -383,10 +383,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) 63@@ -383,10 +383,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED)
@@ -118,7 +118,7 @@ index f740f5c..d5ff7af 100644
118 118
119 /* Mop up any left-over bytes. */ 119 /* Mop up any left-over bytes. */
120 if (leftover) 120 if (leftover)
121@@ -1634,14 +1642,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v, 121@@ -1633,14 +1641,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v,
122 break; 122 break;
123 123
124 case E_DFmode: 124 case E_DFmode:
@@ -141,7 +141,7 @@ index f740f5c..d5ff7af 100644
141 break; 141 break;
142 142
143 case E_QImode: 143 case E_QImode:
144@@ -2295,7 +2309,7 @@ compute_frame_size (HOST_WIDE_INT size) 144@@ -2285,7 +2299,7 @@ compute_frame_size (HOST_WIDE_INT size)
145 145
146 if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM) 146 if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM)
147 /* Don't account for link register. It is accounted specially below. */ 147 /* Don't account for link register. It is accounted specially below. */
@@ -150,7 +150,7 @@ index f740f5c..d5ff7af 100644
150 150
151 mask |= (1L << (regno - GP_REG_FIRST)); 151 mask |= (1L << (regno - GP_REG_FIRST));
152 } 152 }
153@@ -2564,7 +2578,7 @@ print_operand (FILE * file, rtx op, int letter) 153@@ -2554,7 +2568,7 @@ print_operand (FILE * file, rtx op, int letter)
154 154
155 if ((letter == 'M' && !WORDS_BIG_ENDIAN) 155 if ((letter == 'M' && !WORDS_BIG_ENDIAN)
156 || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D') 156 || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D')
@@ -159,7 +159,7 @@ index f740f5c..d5ff7af 100644
159 159
160 fprintf (file, "%s", reg_names[regnum]); 160 fprintf (file, "%s", reg_names[regnum]);
161 } 161 }
162@@ -2590,6 +2604,7 @@ print_operand (FILE * file, rtx op, int letter) 162@@ -2580,6 +2594,7 @@ print_operand (FILE * file, rtx op, int letter)
163 else if (letter == 'h' || letter == 'j') 163 else if (letter == 'h' || letter == 'j')
164 { 164 {
165 long val[2]; 165 long val[2];
@@ -167,7 +167,7 @@ index f740f5c..d5ff7af 100644
167 long l[2]; 167 long l[2];
168 if (code == CONST_DOUBLE) 168 if (code == CONST_DOUBLE)
169 { 169 {
170@@ -2602,12 +2617,12 @@ print_operand (FILE * file, rtx op, int letter) 170@@ -2592,12 +2607,12 @@ print_operand (FILE * file, rtx op, int letter)
171 val[0] = l[WORDS_BIG_ENDIAN != 0]; 171 val[0] = l[WORDS_BIG_ENDIAN != 0];
172 } 172 }
173 } 173 }
@@ -184,7 +184,7 @@ index f740f5c..d5ff7af 100644
184 } 184 }
185 else if (code == CONST_DOUBLE) 185 else if (code == CONST_DOUBLE)
186 { 186 {
187@@ -2801,7 +2816,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority) 187@@ -2791,7 +2806,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority)
188 188
189 switch_to_section (get_section (section, 0, NULL)); 189 switch_to_section (get_section (section, 0, NULL));
190 assemble_align (POINTER_SIZE); 190 assemble_align (POINTER_SIZE);
@@ -196,7 +196,7 @@ index f740f5c..d5ff7af 100644
196 output_addr_const (asm_out_file, symbol); 196 output_addr_const (asm_out_file, symbol);
197 fputs ("\n", asm_out_file); 197 fputs ("\n", asm_out_file);
198 } 198 }
199@@ -2824,7 +2842,10 @@ microblaze_asm_destructor (rtx symbol, int priority) 199@@ -2814,7 +2832,10 @@ microblaze_asm_destructor (rtx symbol, int priority)
200 200
201 switch_to_section (get_section (section, 0, NULL)); 201 switch_to_section (get_section (section, 0, NULL));
202 assemble_align (POINTER_SIZE); 202 assemble_align (POINTER_SIZE);
@@ -208,7 +208,7 @@ index f740f5c..d5ff7af 100644
208 output_addr_const (asm_out_file, symbol); 208 output_addr_const (asm_out_file, symbol);
209 fputs ("\n", asm_out_file); 209 fputs ("\n", asm_out_file);
210 } 210 }
211@@ -2890,7 +2911,7 @@ save_restore_insns (int prologue) 211@@ -2880,7 +2901,7 @@ save_restore_insns (int prologue)
212 /* For interrupt_handlers, need to save/restore the MSR. */ 212 /* For interrupt_handlers, need to save/restore the MSR. */
213 if (microblaze_is_interrupt_variant ()) 213 if (microblaze_is_interrupt_variant ())
214 { 214 {
@@ -217,7 +217,7 @@ index f740f5c..d5ff7af 100644
217 gen_rtx_PLUS (Pmode, base_reg_rtx, 217 gen_rtx_PLUS (Pmode, base_reg_rtx,
218 GEN_INT (current_frame_info. 218 GEN_INT (current_frame_info.
219 gp_offset - 219 gp_offset -
220@@ -2898,8 +2919,8 @@ save_restore_insns (int prologue) 220@@ -2888,8 +2909,8 @@ save_restore_insns (int prologue)
221 221
222 /* Do not optimize in flow analysis. */ 222 /* Do not optimize in flow analysis. */
223 MEM_VOLATILE_P (isr_mem_rtx) = 1; 223 MEM_VOLATILE_P (isr_mem_rtx) = 1;
@@ -228,7 +228,7 @@ index f740f5c..d5ff7af 100644
228 } 228 }
229 229
230 if (microblaze_is_interrupt_variant () && !prologue) 230 if (microblaze_is_interrupt_variant () && !prologue)
231@@ -2907,8 +2928,8 @@ save_restore_insns (int prologue) 231@@ -2897,8 +2918,8 @@ save_restore_insns (int prologue)
232 emit_move_insn (isr_reg_rtx, isr_mem_rtx); 232 emit_move_insn (isr_reg_rtx, isr_mem_rtx);
233 emit_move_insn (isr_msr_rtx, isr_reg_rtx); 233 emit_move_insn (isr_msr_rtx, isr_reg_rtx);
234 /* Do not optimize in flow analysis. */ 234 /* Do not optimize in flow analysis. */
@@ -239,7 +239,7 @@ index f740f5c..d5ff7af 100644
239 } 239 }
240 240
241 for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++) 241 for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++)
242@@ -2919,9 +2940,9 @@ save_restore_insns (int prologue) 242@@ -2909,9 +2930,9 @@ save_restore_insns (int prologue)
243 /* Don't handle here. Already handled as the first register. */ 243 /* Don't handle here. Already handled as the first register. */
244 continue; 244 continue;
245 245
@@ -251,7 +251,7 @@ index f740f5c..d5ff7af 100644
251 if (microblaze_is_interrupt_variant () || save_volatiles) 251 if (microblaze_is_interrupt_variant () || save_volatiles)
252 /* Do not optimize in flow analysis. */ 252 /* Do not optimize in flow analysis. */
253 MEM_VOLATILE_P (mem_rtx) = 1; 253 MEM_VOLATILE_P (mem_rtx) = 1;
254@@ -2936,7 +2957,7 @@ save_restore_insns (int prologue) 254@@ -2926,7 +2947,7 @@ save_restore_insns (int prologue)
255 insn = emit_move_insn (reg_rtx, mem_rtx); 255 insn = emit_move_insn (reg_rtx, mem_rtx);
256 } 256 }
257 257
@@ -260,7 +260,7 @@ index f740f5c..d5ff7af 100644
260 } 260 }
261 } 261 }
262 262
263@@ -2946,8 +2967,8 @@ save_restore_insns (int prologue) 263@@ -2936,8 +2957,8 @@ save_restore_insns (int prologue)
264 emit_move_insn (isr_mem_rtx, isr_reg_rtx); 264 emit_move_insn (isr_mem_rtx, isr_reg_rtx);
265 265
266 /* Do not optimize in flow analysis. */ 266 /* Do not optimize in flow analysis. */
@@ -271,7 +271,7 @@ index f740f5c..d5ff7af 100644
271 } 271 }
272 272
273 /* Done saving and restoring */ 273 /* Done saving and restoring */
274@@ -3037,7 +3058,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) 274@@ -3027,7 +3048,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
275 275
276 switch_to_section (s); 276 switch_to_section (s);
277 assemble_align (POINTER_SIZE); 277 assemble_align (POINTER_SIZE);
@@ -283,7 +283,7 @@ index f740f5c..d5ff7af 100644
283 output_addr_const (asm_out_file, symbol); 283 output_addr_const (asm_out_file, symbol);
284 fputs ("\n", asm_out_file); 284 fputs ("\n", asm_out_file);
285 } 285 }
286@@ -3182,10 +3206,10 @@ microblaze_expand_prologue (void) 286@@ -3171,10 +3195,10 @@ microblaze_expand_prologue (void)
287 { 287 {
288 if (offset != 0) 288 if (offset != 0)
289 ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); 289 ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset));
@@ -297,7 +297,7 @@ index f740f5c..d5ff7af 100644
297 } 297 }
298 } 298 }
299 299
300@@ -3194,15 +3218,23 @@ microblaze_expand_prologue (void) 300@@ -3183,15 +3207,23 @@ microblaze_expand_prologue (void)
301 rtx fsiz_rtx = GEN_INT (fsiz); 301 rtx fsiz_rtx = GEN_INT (fsiz);
302 302
303 rtx_insn *insn = NULL; 303 rtx_insn *insn = NULL;
@@ -323,7 +323,7 @@ index f740f5c..d5ff7af 100644
323 gen_rtx_PLUS (Pmode, stack_pointer_rtx, 323 gen_rtx_PLUS (Pmode, stack_pointer_rtx,
324 const0_rtx)); 324 const0_rtx));
325 325
326@@ -3210,7 +3242,7 @@ microblaze_expand_prologue (void) 326@@ -3199,7 +3231,7 @@ microblaze_expand_prologue (void)
327 /* Do not optimize in flow analysis. */ 327 /* Do not optimize in flow analysis. */
328 MEM_VOLATILE_P (mem_rtx) = 1; 328 MEM_VOLATILE_P (mem_rtx) = 1;
329 329
@@ -332,7 +332,7 @@ index f740f5c..d5ff7af 100644
332 insn = emit_move_insn (mem_rtx, reg_rtx); 332 insn = emit_move_insn (mem_rtx, reg_rtx);
333 RTX_FRAME_RELATED_P (insn) = 1; 333 RTX_FRAME_RELATED_P (insn) = 1;
334 } 334 }
335@@ -3320,12 +3352,12 @@ microblaze_expand_epilogue (void) 335@@ -3309,12 +3341,12 @@ microblaze_expand_epilogue (void)
336 if (!crtl->is_leaf || interrupt_handler) 336 if (!crtl->is_leaf || interrupt_handler)
337 { 337 {
338 mem_rtx = 338 mem_rtx =
@@ -347,7 +347,7 @@ index f740f5c..d5ff7af 100644
347 emit_move_insn (reg_rtx, mem_rtx); 347 emit_move_insn (reg_rtx, mem_rtx);
348 } 348 }
349 349
350@@ -3341,15 +3373,25 @@ microblaze_expand_epilogue (void) 350@@ -3330,15 +3362,25 @@ microblaze_expand_epilogue (void)
351 /* _restore_ registers for epilogue. */ 351 /* _restore_ registers for epilogue. */
352 save_restore_insns (0); 352 save_restore_insns (0);
353 emit_insn (gen_blockage ()); 353 emit_insn (gen_blockage ());
@@ -377,7 +377,7 @@ index f740f5c..d5ff7af 100644
377 emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + 377 emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
378 MB_ABI_SUB_RETURN_ADDR_REGNUM))); 378 MB_ABI_SUB_RETURN_ADDR_REGNUM)));
379 } 379 }
380@@ -3515,9 +3557,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 380@@ -3505,9 +3547,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
381 else 381 else
382 this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM); 382 this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM);
383 383
@@ -394,7 +394,7 @@ index f740f5c..d5ff7af 100644
394 394
395 /* Apply the offset from the vtable, if required. */ 395 /* Apply the offset from the vtable, if required. */
396 if (vcall_offset) 396 if (vcall_offset)
397@@ -3530,7 +3577,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 397@@ -3520,7 +3567,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
398 rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx); 398 rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx);
399 emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc)); 399 emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc));
400 400
@@ -406,7 +406,7 @@ index f740f5c..d5ff7af 100644
406 } 406 }
407 407
408 /* Generate a tail call to the target function. */ 408 /* Generate a tail call to the target function. */
409@@ -3704,7 +3754,7 @@ microblaze_eh_return (rtx op0) 409@@ -3696,7 +3746,7 @@ microblaze_eh_return (rtx op0)
410 /* Queue an .ident string in the queue of top-level asm statements. 410 /* Queue an .ident string in the queue of top-level asm statements.
411 If the string size is below the threshold, put it into .sdata2. 411 If the string size is below the threshold, put it into .sdata2.
412 If the front-end is done, we must be being called from toplev.c. 412 If the front-end is done, we must be being called from toplev.c.
@@ -415,7 +415,7 @@ index f740f5c..d5ff7af 100644
415 void 415 void
416 microblaze_asm_output_ident (const char *string) 416 microblaze_asm_output_ident (const char *string)
417 { 417 {
418@@ -3759,9 +3809,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) 418@@ -3751,9 +3801,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
419 emit_block_move (m_tramp, assemble_trampoline_template (), 419 emit_block_move (m_tramp, assemble_trampoline_template (),
420 GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL); 420 GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL);
421 421
@@ -427,7 +427,7 @@ index f740f5c..d5ff7af 100644
427 emit_move_insn (mem, fnaddr); 427 emit_move_insn (mem, fnaddr);
428 } 428 }
429 429
430@@ -3785,7 +3835,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 430@@ -3777,7 +3827,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
431 { 431 {
432 comp_reg = cmp_op0; 432 comp_reg = cmp_op0;
433 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 433 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -436,7 +436,7 @@ index f740f5c..d5ff7af 100644
436 emit_jump_insn (gen_condjump (condition, label1)); 436 emit_jump_insn (gen_condjump (condition, label1));
437 else 437 else
438 emit_jump_insn (gen_long_condjump (condition, label1)); 438 emit_jump_insn (gen_long_condjump (condition, label1));
439@@ -3904,7 +3954,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 439@@ -3896,7 +3946,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[])
440 rtx comp_reg = gen_reg_rtx (SImode); 440 rtx comp_reg = gen_reg_rtx (SImode);
441 441
442 emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); 442 emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1));
@@ -445,7 +445,7 @@ index f740f5c..d5ff7af 100644
445 emit_jump_insn (gen_condjump (condition, operands[3])); 445 emit_jump_insn (gen_condjump (condition, operands[3]));
446 } 446 }
447 447
448@@ -3914,10 +3964,10 @@ microblaze_expand_conditional_branch_df (rtx operands[]) 448@@ -3906,10 +3956,10 @@ microblaze_expand_conditional_branch_df (rtx operands[])
449 rtx condition; 449 rtx condition;
450 rtx cmp_op0 = XEXP (operands[0], 0); 450 rtx cmp_op0 = XEXP (operands[0], 0);
451 rtx cmp_op1 = XEXP (operands[0], 1); 451 rtx cmp_op1 = XEXP (operands[0], 1);
@@ -458,7 +458,7 @@ index f740f5c..d5ff7af 100644
458 emit_jump_insn (gen_long_condjump (condition, operands[3])); 458 emit_jump_insn (gen_long_condjump (condition, operands[3]));
459 } 459 }
460 460
461@@ -3938,8 +3988,8 @@ microblaze_expand_divide (rtx operands[]) 461@@ -3930,8 +3980,8 @@ microblaze_expand_divide (rtx operands[])
462 { 462 {
463 /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */ 463 /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */
464 464
@@ -469,7 +469,7 @@ index f740f5c..d5ff7af 100644
469 rtx regqi = gen_reg_rtx (QImode); 469 rtx regqi = gen_reg_rtx (QImode);
470 rtx_code_label *div_label = gen_label_rtx (); 470 rtx_code_label *div_label = gen_label_rtx ();
471 rtx_code_label *div_end_label = gen_label_rtx (); 471 rtx_code_label *div_end_label = gen_label_rtx ();
472@@ -3947,17 +3997,31 @@ microblaze_expand_divide (rtx operands[]) 472@@ -3939,17 +3989,31 @@ microblaze_expand_divide (rtx operands[])
473 rtx mem_rtx; 473 rtx mem_rtx;
474 rtx ret; 474 rtx ret;
475 rtx_insn *jump, *cjump, *insn; 475 rtx_insn *jump, *cjump, *insn;
@@ -508,7 +508,7 @@ index f740f5c..d5ff7af 100644
508 mem_rtx = gen_rtx_MEM (QImode, 508 mem_rtx = gen_rtx_MEM (QImode,
509 gen_rtx_PLUS (QImode, regt1, div_table_rtx)); 509 gen_rtx_PLUS (QImode, regt1, div_table_rtx));
510 510
511@@ -4104,7 +4168,7 @@ insert_wic_for_ilb_runout (rtx_insn *first) 511@@ -4096,7 +4160,7 @@ insert_wic_for_ilb_runout (rtx_insn *first)
512 { 512 {
513 insn = 513 insn =
514 emit_insn_before (gen_iprefetch 514 emit_insn_before (gen_iprefetch
@@ -517,7 +517,7 @@ index f740f5c..d5ff7af 100644
517 before_4); 517 before_4);
518 recog_memoized (insn); 518 recog_memoized (insn);
519 INSN_LOCATION (insn) = INSN_LOCATION (before_4); 519 INSN_LOCATION (insn) = INSN_LOCATION (before_4);
520@@ -4114,7 +4178,27 @@ insert_wic_for_ilb_runout (rtx_insn *first) 520@@ -4106,7 +4170,27 @@ insert_wic_for_ilb_runout (rtx_insn *first)
521 } 521 }
522 } 522 }
523 } 523 }
@@ -546,7 +546,7 @@ index f740f5c..d5ff7af 100644
546 /* Insert instruction prefetch instruction at the fall 546 /* Insert instruction prefetch instruction at the fall
547 through path of the function call. */ 547 through path of the function call. */
548 548
549@@ -4267,6 +4351,17 @@ microblaze_starting_frame_offset (void) 549@@ -4259,6 +4343,17 @@ microblaze_starting_frame_offset (void)
550 #undef TARGET_LRA_P 550 #undef TARGET_LRA_P
551 #define TARGET_LRA_P hook_bool_void_false 551 #define TARGET_LRA_P hook_bool_void_false
552 552
@@ -564,7 +564,7 @@ index f740f5c..d5ff7af 100644
564 #undef TARGET_FRAME_POINTER_REQUIRED 564 #undef TARGET_FRAME_POINTER_REQUIRED
565 #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required 565 #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required
566 566
567@@ -4276,6 +4371,9 @@ microblaze_starting_frame_offset (void) 567@@ -4268,6 +4363,9 @@ microblaze_starting_frame_offset (void)
568 #undef TARGET_TRAMPOLINE_INIT 568 #undef TARGET_TRAMPOLINE_INIT
569 #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init 569 #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init
570 570
@@ -575,7 +575,7 @@ index f740f5c..d5ff7af 100644
575 #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote 575 #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
576 576
577diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 577diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
578index 2ca44f5..a23fd4e 100644 578index 4931895e650..1f6e2059545 100644
579--- a/gcc/config/microblaze/microblaze.h 579--- a/gcc/config/microblaze/microblaze.h
580+++ b/gcc/config/microblaze/microblaze.h 580+++ b/gcc/config/microblaze/microblaze.h
581@@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe; 581@@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe;
@@ -744,7 +744,7 @@ index 2ca44f5..a23fd4e 100644
744 /* Default to -G 8 */ 744 /* Default to -G 8 */
745 #ifndef MICROBLAZE_DEFAULT_GVALUE 745 #ifndef MICROBLAZE_DEFAULT_GVALUE
746diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 746diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
747index eb52957..77627a7 100644 747index bcf2b9244f8..bef750c026a 100644
748--- a/gcc/config/microblaze/microblaze.md 748--- a/gcc/config/microblaze/microblaze.md
749+++ b/gcc/config/microblaze/microblaze.md 749+++ b/gcc/config/microblaze/microblaze.md
750@@ -26,6 +26,7 @@ 750@@ -26,6 +26,7 @@
@@ -1797,7 +1797,7 @@ index eb52957..77627a7 100644
1797 operands[2], operands[3])); 1797 operands[2], operands[3]));
1798 DONE; 1798 DONE;
1799diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 1799diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
1800index 7671f63..9fc80b1 100644 1800index 7671f63c5b5..9fc80b142ce 100644
1801--- a/gcc/config/microblaze/t-microblaze 1801--- a/gcc/config/microblaze/t-microblaze
1802+++ b/gcc/config/microblaze/t-microblaze 1802+++ b/gcc/config/microblaze/t-microblaze
1803@@ -2,10 +2,11 @@ MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high mlittle-en 1803@@ -2,10 +2,11 @@ MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high mlittle-en
@@ -1816,7 +1816,7 @@ index 7671f63..9fc80b1 100644
1816 # Extra files 1816 # Extra files
1817 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ 1817 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
1818diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S 1818diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S
1819index ee380ee..1811327 100644 1819index d0146083db6..005825f1ec5 100644
1820--- a/libgcc/config/microblaze/crti.S 1820--- a/libgcc/config/microblaze/crti.S
1821+++ b/libgcc/config/microblaze/crti.S 1821+++ b/libgcc/config/microblaze/crti.S
1822@@ -40,7 +40,7 @@ 1822@@ -40,7 +40,7 @@
@@ -1836,7 +1836,7 @@ index ee380ee..1811327 100644
1836+ addik r1, r1, -16 1836+ addik r1, r1, -16
1837 sw r15, r0, r1 1837 sw r15, r0, r1
1838diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S 1838diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S
1839index 00d398a..60a4648 100644 1839index 2fff5ac04c7..5705eff9a4a 100644
1840--- a/libgcc/config/microblaze/crtn.S 1840--- a/libgcc/config/microblaze/crtn.S
1841+++ b/libgcc/config/microblaze/crtn.S 1841+++ b/libgcc/config/microblaze/crtn.S
1842@@ -33,9 +33,9 @@ 1842@@ -33,9 +33,9 @@
@@ -1853,7 +1853,7 @@ index 00d398a..60a4648 100644
1853+ addik r1, r1, 16 1853+ addik r1, r1, 16
1854diff --git a/libgcc/config/microblaze/divdi3.S b/libgcc/config/microblaze/divdi3.S 1854diff --git a/libgcc/config/microblaze/divdi3.S b/libgcc/config/microblaze/divdi3.S
1855new file mode 100644 1855new file mode 100644
1856index 0000000..d37bf51 1856index 00000000000..d37bf5165c6
1857--- /dev/null 1857--- /dev/null
1858+++ b/libgcc/config/microblaze/divdi3.S 1858+++ b/libgcc/config/microblaze/divdi3.S
1859@@ -0,0 +1,98 @@ 1859@@ -0,0 +1,98 @@
@@ -1957,7 +1957,7 @@ index 0000000..d37bf51
1957+#endif 1957+#endif
1958diff --git a/libgcc/config/microblaze/divdi3_table.c b/libgcc/config/microblaze/divdi3_table.c 1958diff --git a/libgcc/config/microblaze/divdi3_table.c b/libgcc/config/microblaze/divdi3_table.c
1959new file mode 100644 1959new file mode 100644
1960index 0000000..8096259 1960index 00000000000..80962597ea5
1961--- /dev/null 1961--- /dev/null
1962+++ b/libgcc/config/microblaze/divdi3_table.c 1962+++ b/libgcc/config/microblaze/divdi3_table.c
1963@@ -0,0 +1,62 @@ 1963@@ -0,0 +1,62 @@
@@ -2025,7 +2025,7 @@ index 0000000..8096259
2025+ 2025+
2026diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S 2026diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S
2027new file mode 100644 2027new file mode 100644
2028index 0000000..5d3f7c0 2028index 00000000000..5d3f7c03fc8
2029--- /dev/null 2029--- /dev/null
2030+++ b/libgcc/config/microblaze/moddi3.S 2030+++ b/libgcc/config/microblaze/moddi3.S
2031@@ -0,0 +1,97 @@ 2031@@ -0,0 +1,97 @@
@@ -2128,7 +2128,7 @@ index 0000000..5d3f7c0
2128+#endif 2128+#endif
2129diff --git a/libgcc/config/microblaze/muldi3.S b/libgcc/config/microblaze/muldi3.S 2129diff --git a/libgcc/config/microblaze/muldi3.S b/libgcc/config/microblaze/muldi3.S
2130new file mode 100644 2130new file mode 100644
2131index 0000000..5677841 2131index 00000000000..567784197d3
2132--- /dev/null 2132--- /dev/null
2133+++ b/libgcc/config/microblaze/muldi3.S 2133+++ b/libgcc/config/microblaze/muldi3.S
2134@@ -0,0 +1,73 @@ 2134@@ -0,0 +1,73 @@
@@ -2206,7 +2206,7 @@ index 0000000..5677841
2206+ .size __muldi3, . - __muldi3 2206+ .size __muldi3, . - __muldi3
2207+#endif 2207+#endif
2208diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze 2208diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze
2209index 8d954a4..35021b2 100644 2209index 8d954a49575..35021b24b7d 100644
2210--- a/libgcc/config/microblaze/t-microblaze 2210--- a/libgcc/config/microblaze/t-microblaze
2211+++ b/libgcc/config/microblaze/t-microblaze 2211+++ b/libgcc/config/microblaze/t-microblaze
2212@@ -1,11 +1,16 @@ 2212@@ -1,11 +1,16 @@
@@ -2231,7 +2231,7 @@ index 8d954a4..35021b2 100644
2231+ $(srcdir)/config/microblaze/divsi3_table.c \ 2231+ $(srcdir)/config/microblaze/divsi3_table.c \
2232diff --git a/libgcc/config/microblaze/udivdi3.S b/libgcc/config/microblaze/udivdi3.S 2232diff --git a/libgcc/config/microblaze/udivdi3.S b/libgcc/config/microblaze/udivdi3.S
2233new file mode 100644 2233new file mode 100644
2234index 0000000..c210fbc 2234index 00000000000..c210fbc7128
2235--- /dev/null 2235--- /dev/null
2236+++ b/libgcc/config/microblaze/udivdi3.S 2236+++ b/libgcc/config/microblaze/udivdi3.S
2237@@ -0,0 +1,107 @@ 2237@@ -0,0 +1,107 @@
@@ -2344,7 +2344,7 @@ index 0000000..c210fbc
2344+#endif 2344+#endif
2345diff --git a/libgcc/config/microblaze/umoddi3.S b/libgcc/config/microblaze/umoddi3.S 2345diff --git a/libgcc/config/microblaze/umoddi3.S b/libgcc/config/microblaze/umoddi3.S
2346new file mode 100644 2346new file mode 100644
2347index 0000000..7f5cd23 2347index 00000000000..7f5cd23f9a1
2348--- /dev/null 2348--- /dev/null
2349+++ b/libgcc/config/microblaze/umoddi3.S 2349+++ b/libgcc/config/microblaze/umoddi3.S
2350@@ -0,0 +1,110 @@ 2350@@ -0,0 +1,110 @@
@@ -2459,5 +2459,5 @@ index 0000000..7f5cd23
2459+ .size __umoddi3, . - __umoddi3 2459+ .size __umoddi3, . - __umoddi3
2460+#endif 2460+#endif
2461-- 2461--
24622.7.4 24622.17.1
2463 2463
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0036-Patch-Microblaze-reverting-the-cost-check-before-pro.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0036-Patch-Microblaze-reverting-the-cost-check-before-pro.patch
deleted file mode 100644
index 7079789f..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0036-Patch-Microblaze-reverting-the-cost-check-before-pro.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From ac30efb4a5f5b6d289fdd27b268c2095d60dcb42 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Thu, 2 Mar 2017 19:02:31 +0530
4Subject: [PATCH 36/63] [Patch,Microblaze]:reverting the cost check before
5 propagating constants.
6
7---
8 gcc/cprop.c | 4 ++++
9 1 file changed, 4 insertions(+)
10
11diff --git a/gcc/cprop.c b/gcc/cprop.c
12index 65c0130..42bcc81 100644
13--- a/gcc/cprop.c
14+++ b/gcc/cprop.c
15@@ -733,6 +733,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
16 int success = 0;
17 rtx set = single_set (insn);
18
19+#if 0
20 bool check_rtx_costs = true;
21 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
22 int old_cost = set ? set_rtx_cost (set, speed) : 0;
23@@ -744,6 +745,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
24 && (GET_CODE (XEXP (note, 0)) == CONST
25 || CONSTANT_P (XEXP (note, 0)))))
26 check_rtx_costs = false;
27+#endif
28
29 /* Usually we substitute easy stuff, so we won't copy everything.
30 We however need to take care to not duplicate non-trivial CONST
31@@ -752,6 +754,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
32
33 validate_replace_src_group (from, to, insn);
34
35+#if 0
36 /* If TO is a constant, check the cost of the set after propagation
37 to the cost of the set before the propagation. If the cost is
38 higher, then do not replace FROM with TO. */
39@@ -764,6 +767,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
40 return false;
41 }
42
43+#endif
44
45 if (num_changes_pending () && apply_change_group ())
46 success = 1;
47--
482.7.4
49
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0042-re-arrangement-of-the-compare-branches.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0036-re-arrangement-of-the-compare-branches.patch
index 3afb7629..63290129 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0042-re-arrangement-of-the-compare-branches.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0036-re-arrangement-of-the-compare-branches.patch
@@ -1,18 +1,18 @@
1From 31062878a2c1773a1fc94242ad29e6d03e4828b1 Mon Sep 17 00:00:00 2001 1From e259b63769bf3cc437a665059add98d9480d942c Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 3 Aug 2018 15:41:39 +0530 3Date: Fri, 3 Aug 2018 15:41:39 +0530
4Subject: [PATCH 42/63] re-arrangement of the compare branches 4Subject: [PATCH 36/58] re-arrangement of the compare branches
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.c | 28 ++----- 7 gcc/config/microblaze/microblaze.c | 28 ++----
8 gcc/config/microblaze/microblaze.md | 141 +++++++++++++++++------------------- 8 gcc/config/microblaze/microblaze.md | 141 +++++++++++++---------------
9 2 files changed, 73 insertions(+), 96 deletions(-) 9 2 files changed, 73 insertions(+), 96 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 11diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
12index d5ff7af..dd46d93 100644 12index 3ecda553fe6..cba5d86225c 100644
13--- a/gcc/config/microblaze/microblaze.c 13--- a/gcc/config/microblaze/microblaze.c
14+++ b/gcc/config/microblaze/microblaze.c 14+++ b/gcc/config/microblaze/microblaze.c
15@@ -3835,11 +3835,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 15@@ -3827,11 +3827,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
16 { 16 {
17 comp_reg = cmp_op0; 17 comp_reg = cmp_op0;
18 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 18 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -25,7 +25,7 @@ index d5ff7af..dd46d93 100644
25 } 25 }
26 26
27 else if (code == EQ || code == NE) 27 else if (code == EQ || code == NE)
28@@ -3850,10 +3846,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 28@@ -3842,10 +3838,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
29 else 29 else
30 emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1)); 30 emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1));
31 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); 31 condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx);
@@ -37,7 +37,7 @@ index d5ff7af..dd46d93 100644
37 } 37 }
38 else 38 else
39 { 39 {
40@@ -3886,10 +3879,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 40@@ -3878,10 +3871,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
41 comp_reg = cmp_op0; 41 comp_reg = cmp_op0;
42 condition = gen_rtx_fmt_ee (signed_condition (code), 42 condition = gen_rtx_fmt_ee (signed_condition (code),
43 mode, comp_reg, const0_rtx); 43 mode, comp_reg, const0_rtx);
@@ -49,7 +49,7 @@ index d5ff7af..dd46d93 100644
49 } 49 }
50 else if (code == EQ) 50 else if (code == EQ)
51 { 51 {
52@@ -3904,10 +3894,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 52@@ -3896,10 +3886,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
53 cmp_op1)); 53 cmp_op1));
54 } 54 }
55 condition = gen_rtx_EQ (mode, comp_reg, const0_rtx); 55 condition = gen_rtx_EQ (mode, comp_reg, const0_rtx);
@@ -61,7 +61,7 @@ index d5ff7af..dd46d93 100644
61 61
62 } 62 }
63 else if (code == NE) 63 else if (code == NE)
64@@ -3923,10 +3910,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 64@@ -3915,10 +3902,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[])
65 cmp_op1)); 65 cmp_op1));
66 } 66 }
67 condition = gen_rtx_NE (mode, comp_reg, const0_rtx); 67 condition = gen_rtx_NE (mode, comp_reg, const0_rtx);
@@ -73,7 +73,7 @@ index d5ff7af..dd46d93 100644
73 } 73 }
74 else 74 else
75 { 75 {
76@@ -3968,7 +3952,7 @@ microblaze_expand_conditional_branch_df (rtx operands[]) 76@@ -3960,7 +3944,7 @@ microblaze_expand_conditional_branch_df (rtx operands[])
77 77
78 emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); 78 emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1));
79 condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx); 79 condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx);
@@ -83,7 +83,7 @@ index d5ff7af..dd46d93 100644
83 83
84 /* Implement TARGET_FRAME_POINTER_REQUIRED. */ 84 /* Implement TARGET_FRAME_POINTER_REQUIRED. */
85diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 85diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
86index 77627a7..edb7aab 100644 86index bef750c026a..29ebbfc0c03 100644
87--- a/gcc/config/microblaze/microblaze.md 87--- a/gcc/config/microblaze/microblaze.md
88+++ b/gcc/config/microblaze/microblaze.md 88+++ b/gcc/config/microblaze/microblaze.md
89@@ -2270,7 +2270,27 @@ else 89@@ -2270,7 +2270,27 @@ else
@@ -264,5 +264,5 @@ index 77627a7..edb7aab 100644
264 ;; Unconditional branches 264 ;; Unconditional branches
265 ;;---------------------------------------------------------------- 265 ;;----------------------------------------------------------------
266-- 266--
2672.7.4 2672.17.1
268 268
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Patch-Microblaze-previous-commit-broke-the-handling-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-previous-commit-broke-the-handling-.patch
index f4074899..9be04781 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Patch-Microblaze-previous-commit-broke-the-handling-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0037-Patch-Microblaze-previous-commit-broke-the-handling-.patch
@@ -1,7 +1,7 @@
1From 7ab47599c2bec80d622883b3e220827dce89c598 Mon Sep 17 00:00:00 2001 1From 589c4453ab01570d47e6e37e4e546d65398cf58e Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 8 Aug 2018 17:37:26 +0530 3Date: Wed, 8 Aug 2018 17:37:26 +0530
4Subject: [PATCH 43/63] [Patch,Microblaze] : previous commit broke the 4Subject: [PATCH 37/58] [Patch,Microblaze] : previous commit broke the
5 handling of SI Branch compare for Microblaze 32-bit.. 5 handling of SI Branch compare for Microblaze 32-bit..
6 6
7--- 7---
@@ -9,7 +9,7 @@ Subject: [PATCH 43/63] [Patch,Microblaze] : previous commit broke the
9 1 file changed, 2 insertions(+), 2 deletions(-) 9 1 file changed, 2 insertions(+), 2 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index edb7aab..fb22edb 100644 12index 29ebbfc0c03..1a8853056d7 100644
13--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
15@@ -2226,8 +2226,8 @@ else 15@@ -2226,8 +2226,8 @@ else
@@ -24,5 +24,5 @@ index edb7aab..fb22edb 100644
24 (pc)))] 24 (pc)))]
25 "" 25 ""
26-- 26--
272.7.4 272.17.1
28 28
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0044-Patch-Microblaze-Support-of-multilibs-with-m64.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Support-of-multilibs-with-m64.patch
index ad287e57..464b5a6d 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0044-Patch-Microblaze-Support-of-multilibs-with-m64.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0038-Patch-Microblaze-Support-of-multilibs-with-m64.patch
@@ -1,7 +1,7 @@
1From 23622921a153258de469ff10db4926b83ff0c432 Mon Sep 17 00:00:00 2001 1From cfc6628cdf81a7ab268d2699c9bbc465865681c5 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 11 Sep 2018 13:43:48 +0530 3Date: Tue, 11 Sep 2018 13:43:48 +0530
4Subject: [PATCH 44/63] [Patch, Microblaze] : Support of multilibs with m64 ... 4Subject: [PATCH 38/58] [Patch, Microblaze] : Support of multilibs with m64 ...
5 5
6--- 6---
7 gcc/config/microblaze/microblaze-c.c | 1 + 7 gcc/config/microblaze/microblaze-c.c | 1 +
@@ -10,7 +10,7 @@ Subject: [PATCH 44/63] [Patch, Microblaze] : Support of multilibs with m64 ...
10 3 files changed, 10 insertions(+), 17 deletions(-) 10 3 files changed, 10 insertions(+), 17 deletions(-)
11 11
12diff --git a/gcc/config/microblaze/microblaze-c.c b/gcc/config/microblaze/microblaze-c.c 12diff --git a/gcc/config/microblaze/microblaze-c.c b/gcc/config/microblaze/microblaze-c.c
13index d2b0c76..6670091 100644 13index dbcd21fc6ee..db543edcbe5 100644
14--- a/gcc/config/microblaze/microblaze-c.c 14--- a/gcc/config/microblaze/microblaze-c.c
15+++ b/gcc/config/microblaze/microblaze-c.c 15+++ b/gcc/config/microblaze/microblaze-c.c
16@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile) 16@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile)
@@ -22,7 +22,7 @@ index d2b0c76..6670091 100644
22 builtin_define ("__microblaze64__"); 22 builtin_define ("__microblaze64__");
23 builtin_define ("__MICROBLAZE64__"); 23 builtin_define ("__MICROBLAZE64__");
24diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 24diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
25index 9fc80b1..35ab9654 100644 25index 9fc80b142ce..35ab9654052 100644
26--- a/gcc/config/microblaze/t-microblaze 26--- a/gcc/config/microblaze/t-microblaze
27+++ b/gcc/config/microblaze/t-microblaze 27+++ b/gcc/config/microblaze/t-microblaze
28@@ -1,12 +1,9 @@ 28@@ -1,12 +1,9 @@
@@ -45,7 +45,7 @@ index 9fc80b1..35ab9654 100644
45 # Extra files 45 # Extra files
46 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ 46 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
47diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze 47diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze
48index 35021b2..8d954a4 100644 48index 35021b24b7d..8d954a49575 100644
49--- a/libgcc/config/microblaze/t-microblaze 49--- a/libgcc/config/microblaze/t-microblaze
50+++ b/libgcc/config/microblaze/t-microblaze 50+++ b/libgcc/config/microblaze/t-microblaze
51@@ -1,16 +1,11 @@ 51@@ -1,16 +1,11 @@
@@ -69,5 +69,5 @@ index 35021b2..8d954a4 100644
69- $(srcdir)/config/microblaze/divsi3_table.c \ 69- $(srcdir)/config/microblaze/divsi3_table.c \
70+ $(srcdir)/config/microblaze/divsi3_table.c 70+ $(srcdir)/config/microblaze/divsi3_table.c
71-- 71--
722.7.4 722.17.1
73 73
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0045-Fixed-issues-like.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Fix-various-issues.patch
index 3f5f7827..c9d4b8c7 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0045-Fixed-issues-like.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0039-Fix-various-issues.patch
@@ -1,19 +1,21 @@
1From 6e6fcbe5fafcbebaf63ff071ad947966af0c1559 Mon Sep 17 00:00:00 2001 1From 0405777c25bb8110ebfd8ea69c7df062a4c03d6b Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 11 Sep 2018 14:58:00 +0530 3Date: Tue, 11 Sep 2018 14:58:00 +0530
4Subject: [PATCH 45/63] Fixed issues like: 1 Interrupt alignment issue 2 Sign 4Subject: [PATCH 39/58] Fix various issues
5 extension issue
6 5
6Fixed issues like:
71 Interrupt alignment issue
82 Sign extension issue
7--- 9---
8 gcc/config/microblaze/microblaze.c | 16 ++++++++++------ 10 gcc/config/microblaze/microblaze.c | 16 ++++++++++------
9 gcc/config/microblaze/microblaze.md | 2 +- 11 gcc/config/microblaze/microblaze.md | 2 +-
10 2 files changed, 11 insertions(+), 7 deletions(-) 12 2 files changed, 11 insertions(+), 7 deletions(-)
11 13
12diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 14diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
13index dd46d93..bfa667b 100644 15index cba5d86225c..b94902b8fbb 100644
14--- a/gcc/config/microblaze/microblaze.c 16--- a/gcc/config/microblaze/microblaze.c
15+++ b/gcc/config/microblaze/microblaze.c 17+++ b/gcc/config/microblaze/microblaze.c
16@@ -2317,9 +2317,14 @@ compute_frame_size (HOST_WIDE_INT size) 18@@ -2307,9 +2307,14 @@ compute_frame_size (HOST_WIDE_INT size)
17 19
18 total_size += gp_reg_size; 20 total_size += gp_reg_size;
19 21
@@ -30,7 +32,7 @@ index dd46d93..bfa667b 100644
30 32
31 /* No space to be allocated for link register in leaf functions with no other 33 /* No space to be allocated for link register in leaf functions with no other
32 stack requirements. */ 34 stack requirements. */
33@@ -2604,7 +2609,6 @@ print_operand (FILE * file, rtx op, int letter) 35@@ -2594,7 +2599,6 @@ print_operand (FILE * file, rtx op, int letter)
34 else if (letter == 'h' || letter == 'j') 36 else if (letter == 'h' || letter == 'j')
35 { 37 {
36 long val[2]; 38 long val[2];
@@ -38,7 +40,7 @@ index dd46d93..bfa667b 100644
38 long l[2]; 40 long l[2];
39 if (code == CONST_DOUBLE) 41 if (code == CONST_DOUBLE)
40 { 42 {
41@@ -2619,10 +2623,10 @@ print_operand (FILE * file, rtx op, int letter) 43@@ -2609,10 +2613,10 @@ print_operand (FILE * file, rtx op, int letter)
42 } 44 }
43 else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF) 45 else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF)
44 { 46 {
@@ -53,7 +55,7 @@ index dd46d93..bfa667b 100644
53 else if (code == CONST_DOUBLE) 55 else if (code == CONST_DOUBLE)
54 { 56 {
55diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 57diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
56index fb22edb..4a8fbab 100644 58index 1a8853056d7..7cc26e7d786 100644
57--- a/gcc/config/microblaze/microblaze.md 59--- a/gcc/config/microblaze/microblaze.md
58+++ b/gcc/config/microblaze/microblaze.md 60+++ b/gcc/config/microblaze/microblaze.md
59@@ -1096,7 +1096,7 @@ 61@@ -1096,7 +1096,7 @@
@@ -66,5 +68,5 @@ index fb22edb..4a8fbab 100644
66 } 68 }
67 } 69 }
68-- 70--
692.7.4 712.17.1
70 72
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Added-load-store-pattern-movdi-and-also-adding-missi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Added-load-store-pattern-movdi-and-also-adding-missi.patch
deleted file mode 100644
index a973f4cd..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Added-load-store-pattern-movdi-and-also-adding-missi.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From 95615e1bfae642dc4f5f1b03e1ffaea4f16aa99c Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Wed, 4 Apr 2018 16:41:41 +0530
4Subject: [PATCH 40/63] Added load store pattern movdi and also adding missing
5 files
6
7---
8 gcc/config/microblaze/constraints.md | 5 +++++
9 gcc/config/microblaze/microblaze.md | 26 ++++++++++++++++++++++++++
10 gcc/config/microblaze/t-microblaze | 4 ++--
11 3 files changed, 33 insertions(+), 2 deletions(-)
12
13diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
14index 5e1d79a..69bcb24 100644
15--- a/gcc/config/microblaze/constraints.md
16+++ b/gcc/config/microblaze/constraints.md
17@@ -52,6 +52,11 @@
18 (and (match_code "const_int")
19 (match_test "ival > 0 && ival < 0x10000")))
20
21+(define_constraint "K"
22+ "A constant in the range 0xffffff8000000000L to 0x0000007fffffffffL (inclusive)."
23+ (and (match_code "const_int")
24+ (match_test "ival > (long)0xffffff8000000000L && ival < (long)0x0000007fffffffffL")))
25+
26 ;; Define floating point constraints
27
28 (define_constraint "G"
29diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
30index dbb592e..eb52957 100644
31--- a/gcc/config/microblaze/microblaze.md
32+++ b/gcc/config/microblaze/microblaze.md
33@@ -1122,6 +1122,32 @@
34 )
35
36
37+(define_insn "*movdi_internal_64"
38+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
39+ (match_operand:DI 1 "general_operand" " d,K,J,R,o,d,d"))]
40+ "TARGET_MB_64 && (INTVAL(operands[1]) < 0x7fffffffff) && (INTVAL(operands[1]) > 0xffffff8000000000)"
41+ {
42+ switch (which_alternative)
43+ {
44+ case 0:
45+ return "addlk\t%0,%1";
46+ case 1:
47+ return "addlik\t%0,r0,%1";
48+ case 2:
49+ return "addlk\t%0,r0,r0";
50+ case 3:
51+ case 4:
52+ return "lli\t%0,%1";
53+ case 5:
54+ case 6:
55+ return "sli\t%1,%0";
56+ }
57+ return "unreachable";
58+ }
59+ [(set_attr "type" "no_delay_move,no_delay_arith,no_delay_arith,no_delay_load,no_delay_load,no_delay_store,no_delay_store")
60+ (set_attr "mode" "DI")
61+ (set_attr "length" "8,8,8,8,12,8,12")])
62+
63 (define_insn "*movdi_internal"
64 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
65 (match_operand:DI 1 "general_operand" " d,i,J,R,o,d,d"))]
66diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
67index e9a1921..7671f63 100644
68--- a/gcc/config/microblaze/t-microblaze
69+++ b/gcc/config/microblaze/t-microblaze
70@@ -4,8 +4,8 @@ MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high
71 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian
72 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/m64
73 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian
74-MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
75-MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
76+#MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
77+#MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
78
79 # Extra files
80 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
81--
822.7.4
83
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0046-Fixed-below-issues.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Fixed-below-issues.patch
index fc2fe3b5..d5fbf703 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0046-Fixed-below-issues.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0040-Fixed-below-issues.patch
@@ -1,27 +1,24 @@
1From 7c911a5ae8cf4a7496c059374f170f1919c00f6d Mon Sep 17 00:00:00 2001 1From c4d60b379c8d0a5621a0dc2a3a12fb40fe45e83e Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 26 Nov 2019 17:26:15 +0530 3Date: Tue, 26 Nov 2019 17:26:15 +0530
4Subject: [PATCH 46/63] Fixed below issues: 4Subject: [PATCH 40/58] Fixed below issues:
5 5
6- Floating point print issues in 64bit mode 6- Floating point print issues in 64bit mode
7- Dejagnu Jump related issues 7- Dejagnu Jump related issues
8- Added dbl instruction 8- Added dbl instruction
9
10Conflicts:
11 gcc/config/microblaze/microblaze.md
12--- 9---
13 gcc/config/microblaze/microblaze.c | 12 +++++- 10 gcc/config/microblaze/microblaze.c | 12 +++-
14 gcc/config/microblaze/microblaze.h | 7 +++ 11 gcc/config/microblaze/microblaze.h | 7 +++
15 gcc/config/microblaze/microblaze.md | 86 +++++++++++++++++++++++++++++++------ 12 gcc/config/microblaze/microblaze.md | 86 ++++++++++++++++++++++++-----
16 libgcc/config/microblaze/crti.S | 24 ++++++++++- 13 libgcc/config/microblaze/crti.S | 24 +++++++-
17 libgcc/config/microblaze/crtn.S | 13 ++++++ 14 libgcc/config/microblaze/crtn.S | 13 +++++
18 5 files changed, 125 insertions(+), 17 deletions(-) 15 5 files changed, 125 insertions(+), 17 deletions(-)
19 16
20diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 17diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
21index bfa667b..220e03d 100644 18index b94902b8fbb..12b1da852dd 100644
22--- a/gcc/config/microblaze/microblaze.c 19--- a/gcc/config/microblaze/microblaze.c
23+++ b/gcc/config/microblaze/microblaze.c 20+++ b/gcc/config/microblaze/microblaze.c
24@@ -2613,7 +2613,12 @@ print_operand (FILE * file, rtx op, int letter) 21@@ -2603,7 +2603,12 @@ print_operand (FILE * file, rtx op, int letter)
25 if (code == CONST_DOUBLE) 22 if (code == CONST_DOUBLE)
26 { 23 {
27 if (GET_MODE (op) == DFmode) 24 if (GET_MODE (op) == DFmode)
@@ -35,7 +32,7 @@ index bfa667b..220e03d 100644
35 else 32 else
36 { 33 {
37 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); 34 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l);
38@@ -4014,7 +4019,10 @@ microblaze_expand_divide (rtx operands[]) 35@@ -4006,7 +4011,10 @@ microblaze_expand_divide (rtx operands[])
39 gen_rtx_PLUS (QImode, regt1, div_table_rtx)); 36 gen_rtx_PLUS (QImode, regt1, div_table_rtx));
40 37
41 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); 38 insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx));
@@ -48,7 +45,7 @@ index bfa667b..220e03d 100644
48 LABEL_NUSES (div_end_label) = 1; 45 LABEL_NUSES (div_end_label) = 1;
49 emit_barrier (); 46 emit_barrier ();
50diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 47diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
51index a23fd4e..7497cfb 100644 48index 1f6e2059545..a36e06316aa 100644
52--- a/gcc/config/microblaze/microblaze.h 49--- a/gcc/config/microblaze/microblaze.h
53+++ b/gcc/config/microblaze/microblaze.h 50+++ b/gcc/config/microblaze/microblaze.h
54@@ -888,10 +888,17 @@ do { \ 51@@ -888,10 +888,17 @@ do { \
@@ -70,7 +67,7 @@ index a23fd4e..7497cfb 100644
70 /* We need to group -lm as well, since some Newlib math functions 67 /* We need to group -lm as well, since some Newlib math functions
71 reference __errno! */ 68 reference __errno! */
72diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 69diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
73index 4a8fbab..65ec32c 100644 70index 7cc26e7d786..013c77651c3 100644
74--- a/gcc/config/microblaze/microblaze.md 71--- a/gcc/config/microblaze/microblaze.md
75+++ b/gcc/config/microblaze/microblaze.md 72+++ b/gcc/config/microblaze/microblaze.md
76@@ -527,6 +527,15 @@ 73@@ -527,6 +527,15 @@
@@ -231,7 +228,7 @@ index 4a8fbab..65ec32c 100644
231 "" 228 ""
232 "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8" 229 "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8"
233diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S 230diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S
234index 1811327..a661319 100644 231index 005825f1ec5..b7436c7131f 100644
235--- a/libgcc/config/microblaze/crti.S 232--- a/libgcc/config/microblaze/crti.S
236+++ b/libgcc/config/microblaze/crti.S 233+++ b/libgcc/config/microblaze/crti.S
237@@ -33,11 +33,32 @@ 234@@ -33,11 +33,32 @@
@@ -274,7 +271,7 @@ index 1811327..a661319 100644
274 sw r15, r0, r1 271 sw r15, r0, r1
275+#endif 272+#endif
276diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S 273diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S
277index 60a4648..d72507b 100644 274index 5705eff9a4a..f1148ffebe4 100644
278--- a/libgcc/config/microblaze/crtn.S 275--- a/libgcc/config/microblaze/crtn.S
279+++ b/libgcc/config/microblaze/crtn.S 276+++ b/libgcc/config/microblaze/crtn.S
280@@ -29,7 +29,19 @@ 277@@ -29,7 +29,19 @@
@@ -303,5 +300,5 @@ index 60a4648..d72507b 100644
303 addik r1, r1, 16 300 addik r1, r1, 16
304+#endif 301+#endif
305-- 302--
3062.7.4 3032.17.1
307 304
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Added-double-arith-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Fix-various.patch
index 1b7ac28b..75ee48fa 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Added-double-arith-instructions.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0041-Fix-various.patch
@@ -1,16 +1,17 @@
1From 0f310964ff1c19cbc3404ec7ceba286d6de315c0 Mon Sep 17 00:00:00 2001 1From 90edf612331af9b7e99105112c2067a3f085daef Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 9 Oct 2018 10:07:08 +0530 3Date: Tue, 9 Oct 2018 10:07:08 +0530
4Subject: [PATCH 47/63] -Added double arith instructions -Fixed prologue stack 4Subject: [PATCH 41/58] Fix various
5 pointer decrement issue
6 5
6-Added double arith instructions
7-Fixed prologue stack pointer decrement issue
7--- 8---
8 gcc/config/microblaze/microblaze.md | 78 ++++++++++++++++++++++++++++++++----- 9 gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++----
9 gcc/config/microblaze/t-microblaze | 7 ++++ 10 gcc/config/microblaze/t-microblaze | 7 +++
10 2 files changed, 76 insertions(+), 9 deletions(-) 11 2 files changed, 76 insertions(+), 9 deletions(-)
11 12
12diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 13diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
13index 65ec32c..c199b27 100644 14index 013c77651c3..645f48f2847 100644
14--- a/gcc/config/microblaze/microblaze.md 15--- a/gcc/config/microblaze/microblaze.md
15+++ b/gcc/config/microblaze/microblaze.md 16+++ b/gcc/config/microblaze/microblaze.md
16@@ -527,6 +527,66 @@ 17@@ -527,6 +527,66 @@
@@ -113,7 +114,7 @@ index 65ec32c..c199b27 100644
113 (set_attr "mode" "DI") 114 (set_attr "mode" "DI")
114 (set_attr "length" "4,4,4")]) 115 (set_attr "length" "4,4,4")])
115diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 116diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
116index 35ab9654..dfef45c 100644 117index 35ab9654052..dfef45c268e 100644
117--- a/gcc/config/microblaze/t-microblaze 118--- a/gcc/config/microblaze/t-microblaze
118+++ b/gcc/config/microblaze/t-microblaze 119+++ b/gcc/config/microblaze/t-microblaze
119@@ -1,6 +1,13 @@ 120@@ -1,6 +1,13 @@
@@ -131,5 +132,5 @@ index 35ab9654..dfef45c 100644
131 MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high 132 MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high
132 MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high 133 MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high
133-- 134--
1342.7.4 1352.17.1
135 136
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0042-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
index c00b0a2b..2e66625b 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0042-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch
@@ -1,7 +1,7 @@
1From b63cd2a410b9350fa67ed3ca348dcca349da4e44 Mon Sep 17 00:00:00 2001 1From c7f6fb9d81ce322f71cbef7cc1f5cb2fb8956a27 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 12 Oct 2018 16:07:36 +0530 3Date: Fri, 12 Oct 2018 16:07:36 +0530
4Subject: [PATCH 48/63] Fixed the issue in the delay slot with swap 4Subject: [PATCH 42/58] Fixed the issue in the delay slot with swap
5 instructions 5 instructions
6 6
7--- 7---
@@ -9,7 +9,7 @@ Subject: [PATCH 48/63] Fixed the issue in the delay slot with swap
9 1 file changed, 6 insertions(+) 9 1 file changed, 6 insertions(+)
10 10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index c199b27..d6370d8 100644 12index 645f48f2847..6a1e45a5b66 100644
13--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
15@@ -443,6 +443,9 @@ 15@@ -443,6 +443,9 @@
@@ -33,5 +33,5 @@ index c199b27..d6370d8 100644
33 33
34 ;;---------------------------------------------------------------- 34 ;;----------------------------------------------------------------
35-- 35--
362.7.4 362.17.1
37 37
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0049-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
index 7e92df2e..3d532c6a 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0049-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0043-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch
@@ -1,7 +1,7 @@
1From f39f36cb0f0466343ef4ead50261b58595af708c Mon Sep 17 00:00:00 2001 1From 16a9a232ae430e691c13157dd5988f9c5c7dfb71 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Sat, 13 Oct 2018 21:12:43 +0530 3Date: Sat, 13 Oct 2018 21:12:43 +0530
4Subject: [PATCH 49/63] Fixed the load store issue with the 32bit arith 4Subject: [PATCH 43/58] Fixed the load store issue with the 32bit arith
5 libraries 5 libraries
6 6
7--- 7---
@@ -13,7 +13,7 @@ Subject: [PATCH 49/63] Fixed the load store issue with the 32bit arith
13 5 files changed, 98 insertions(+), 4 deletions(-) 13 5 files changed, 98 insertions(+), 4 deletions(-)
14 14
15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S 15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S
16index 24b94b9..2765e42 100644 16index bb047094e2f..104243e35fe 100644
17--- a/libgcc/config/microblaze/divsi3.S 17--- a/libgcc/config/microblaze/divsi3.S
18+++ b/libgcc/config/microblaze/divsi3.S 18+++ b/libgcc/config/microblaze/divsi3.S
19@@ -41,6 +41,17 @@ 19@@ -41,6 +41,17 @@
@@ -70,7 +70,7 @@ index 24b94b9..2765e42 100644
70 .size __divsi3, . - __divsi3 70 .size __divsi3, . - __divsi3
71 71
72diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 72diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
73index 87372f5..7e61453 100644 73index 9692ff310ff..9500d64bdc0 100644
74--- a/libgcc/config/microblaze/modsi3.S 74--- a/libgcc/config/microblaze/modsi3.S
75+++ b/libgcc/config/microblaze/modsi3.S 75+++ b/libgcc/config/microblaze/modsi3.S
76@@ -41,6 +41,17 @@ 76@@ -41,6 +41,17 @@
@@ -128,7 +128,7 @@ index 87372f5..7e61453 100644
128 .size __modsi3, . - __modsi3 128 .size __modsi3, . - __modsi3
129 129
130diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S 130diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S
131index 8c3f788..e28c69a 100644 131index cb3b6b8321f..2044399db4a 100644
132--- a/libgcc/config/microblaze/mulsi3.S 132--- a/libgcc/config/microblaze/mulsi3.S
133+++ b/libgcc/config/microblaze/mulsi3.S 133+++ b/libgcc/config/microblaze/mulsi3.S
134@@ -41,6 +41,9 @@ 134@@ -41,6 +41,9 @@
@@ -142,7 +142,7 @@ index 8c3f788..e28c69a 100644
142 .frame r1,0,r15 142 .frame r1,0,r15
143 add r3,r0,r0 143 add r3,r0,r0
144diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S 144diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S
145index 5d726ad..b1e44b6 100644 145index ee2bdd0950d..d2332bcfe62 100644
146--- a/libgcc/config/microblaze/udivsi3.S 146--- a/libgcc/config/microblaze/udivsi3.S
147+++ b/libgcc/config/microblaze/udivsi3.S 147+++ b/libgcc/config/microblaze/udivsi3.S
148@@ -41,6 +41,16 @@ 148@@ -41,6 +41,16 @@
@@ -197,7 +197,7 @@ index 5d726ad..b1e44b6 100644
197 .end __udivsi3 197 .end __udivsi3
198 .size __udivsi3, . - __udivsi3 198 .size __udivsi3, . - __udivsi3
199diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 199diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
200index b29d7e1..8804b99 100644 200index 12c082f6417..30bd8c20b58 100644
201--- a/libgcc/config/microblaze/umodsi3.S 201--- a/libgcc/config/microblaze/umodsi3.S
202+++ b/libgcc/config/microblaze/umodsi3.S 202+++ b/libgcc/config/microblaze/umodsi3.S
203@@ -41,6 +41,16 @@ 203@@ -41,6 +41,16 @@
@@ -252,5 +252,5 @@ index b29d7e1..8804b99 100644
252 .end __umodsi3 252 .end __umodsi3
253 .size __umodsi3, . - __umodsi3 253 .size __umodsi3, . - __umodsi3
254-- 254--
2552.7.4 2552.17.1
256 256
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0050-extending-the-Dwarf-support-to-64bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0044-extending-the-Dwarf-support-to-64bit-Microblaze.patch
index ba717327..d34c103d 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0050-extending-the-Dwarf-support-to-64bit-Microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0044-extending-the-Dwarf-support-to-64bit-Microblaze.patch
@@ -1,14 +1,14 @@
1From 51886f40b6bccea22277f8dcc971706d7c24bdd0 Mon Sep 17 00:00:00 2001 1From b3766742c4e1d401d4f7cdc55a90262681689a20 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Mon, 15 Oct 2018 12:00:10 +0530 3Date: Mon, 15 Oct 2018 12:00:10 +0530
4Subject: [PATCH 50/63] extending the Dwarf support to 64bit Microblaze 4Subject: [PATCH 44/58] extending the Dwarf support to 64bit Microblaze
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.h | 2 +- 7 gcc/config/microblaze/microblaze.h | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-) 8 1 file changed, 1 insertion(+), 1 deletion(-)
9 9
10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
11index 7497cfb..bd5e216 100644 11index a36e06316aa..8504a841406 100644
12--- a/gcc/config/microblaze/microblaze.h 12--- a/gcc/config/microblaze/microblaze.h
13+++ b/gcc/config/microblaze/microblaze.h 13+++ b/gcc/config/microblaze/microblaze.h
14@@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe; 14@@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe;
@@ -21,5 +21,5 @@ index 7497cfb..bd5e216 100644
21 /* Target machine storage layout */ 21 /* Target machine storage layout */
22 22
23-- 23--
242.7.4 242.17.1
25 25
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0051-fixing-the-typo-errors-in-umodsi3-file.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0045-fixing-the-typo-errors-in-umodsi3-file.patch
index a0758b31..a69c71dd 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0051-fixing-the-typo-errors-in-umodsi3-file.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0045-fixing-the-typo-errors-in-umodsi3-file.patch
@@ -1,14 +1,14 @@
1From a8978d71c8b5adfa59430443611bd785a4d54ef9 Mon Sep 17 00:00:00 2001 1From bdc9429b5f2300e39ecdf1db63f4d35f8e18a932 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Tue, 16 Oct 2018 07:55:46 +0530 3Date: Tue, 16 Oct 2018 07:55:46 +0530
4Subject: [PATCH 51/63] fixing the typo errors in umodsi3 file 4Subject: [PATCH 45/58] fixing the typo errors in umodsi3 file
5 5
6--- 6---
7 libgcc/config/microblaze/umodsi3.S | 6 +++--- 7 libgcc/config/microblaze/umodsi3.S | 6 +++---
8 1 file changed, 3 insertions(+), 3 deletions(-) 8 1 file changed, 3 insertions(+), 3 deletions(-)
9 9
10diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 10diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
11index 8804b99..1b3070e 100644 11index 30bd8c20b58..2dd72aef68e 100644
12--- a/libgcc/config/microblaze/umodsi3.S 12--- a/libgcc/config/microblaze/umodsi3.S
13+++ b/libgcc/config/microblaze/umodsi3.S 13+++ b/libgcc/config/microblaze/umodsi3.S
14@@ -47,9 +47,9 @@ __umodsi3: 14@@ -47,9 +47,9 @@ __umodsi3:
@@ -25,5 +25,5 @@ index 8804b99..1b3070e 100644
25 __umodsi3: 25 __umodsi3:
26 .frame r1,0,r15 26 .frame r1,0,r15
27-- 27--
282.7.4 282.17.1
29 29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0052-fixing-the-32bit-LTO-related-issue9-1014024.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0046-fixing-the-32bit-LTO-related-issue9-1014024.patch
index d0b534bc..a5f7afb6 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0052-fixing-the-32bit-LTO-related-issue9-1014024.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0046-fixing-the-32bit-LTO-related-issue9-1014024.patch
@@ -1,14 +1,14 @@
1From 328bd339c292b63d2068a132a245bdc037815d6b Mon Sep 17 00:00:00 2001 1From 2226c8b836bdc9d0e2a281d971288e4bcb50d503 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Wed, 17 Oct 2018 16:56:14 +0530 3Date: Wed, 17 Oct 2018 16:56:14 +0530
4Subject: [PATCH 52/63] fixing the 32bit LTO related issue9(1014024) 4Subject: [PATCH 46/58] fixing the 32bit LTO related issue9(1014024)
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- 7 gcc/config/microblaze/microblaze.h | 24 ++++++++++++++----------
8 1 file changed, 14 insertions(+), 10 deletions(-) 8 1 file changed, 14 insertions(+), 10 deletions(-)
9 9
10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 10diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
11index bd5e216..ab541f7 100644 11index 8504a841406..0c493b6f6e4 100644
12--- a/gcc/config/microblaze/microblaze.h 12--- a/gcc/config/microblaze/microblaze.h
13+++ b/gcc/config/microblaze/microblaze.h 13+++ b/gcc/config/microblaze/microblaze.h
14@@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe; 14@@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe;
@@ -64,5 +64,5 @@ index bd5e216..ab541f7 100644
64 #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1) 64 #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1)
65 65
66-- 66--
672.7.4 672.17.1
68 68
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
index f8ac364c..42296396 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0047-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch
@@ -1,7 +1,7 @@
1From 3f65f0432d42f4d469fbb10828f1683cd30a5d84 Mon Sep 17 00:00:00 2001 1From 8ed304d49f66bc36b39dac8e804a7cdeda642739 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 19 Oct 2018 14:26:25 +0530 3Date: Fri, 19 Oct 2018 14:26:25 +0530
4Subject: [PATCH 53/63] Fixed the missing stack adjustment in prologue of 4Subject: [PATCH 47/58] Fixed the missing stack adjustment in prologue of
5 modsi3 function 5 modsi3 function
6 6
7--- 7---
@@ -9,7 +9,7 @@ Subject: [PATCH 53/63] Fixed the missing stack adjustment in prologue of
9 1 file changed, 1 insertion(+) 9 1 file changed, 1 insertion(+)
10 10
11diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 11diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
12index 7e61453..b0e6cad 100644 12index 9500d64bdc0..4dbb25900d9 100644
13--- a/libgcc/config/microblaze/modsi3.S 13--- a/libgcc/config/microblaze/modsi3.S
14+++ b/libgcc/config/microblaze/modsi3.S 14+++ b/libgcc/config/microblaze/modsi3.S
15@@ -119,6 +119,7 @@ $LaRETURN_HERE: 15@@ -119,6 +119,7 @@ $LaRETURN_HERE:
@@ -21,5 +21,5 @@ index 7e61453..b0e6cad 100644
21 .end __modsi3 21 .end __modsi3
22 .size __modsi3, . - __modsi3 22 .size __modsi3, . - __modsi3
23-- 23--
242.7.4 242.17.1
25 25
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch
index 0e704506..92fa9e57 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0048-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch
@@ -1,7 +1,7 @@
1From 0dbb2b7bfe466c18d54aec680208fd1459619bc1 Mon Sep 17 00:00:00 2001 1From d12f2da2ae7fa7946aef94c161730c7b851c086a Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 24 Oct 2018 18:31:04 +0530 3Date: Wed, 24 Oct 2018 18:31:04 +0530
4Subject: [PATCH 54/63] [Patch,Microblaze] : corrected SPN for dlong 4Subject: [PATCH 48/58] [Patch,Microblaze] : corrected SPN for dlong
5 instruction mapping. 5 instruction mapping.
6 6
7--- 7---
@@ -9,7 +9,7 @@ Subject: [PATCH 54/63] [Patch,Microblaze] : corrected SPN for dlong
9 1 file changed, 2 insertions(+), 2 deletions(-) 9 1 file changed, 2 insertions(+), 2 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index d6370d8..6b6b7c6 100644 12index 6a1e45a5b66..53dbe4e4060 100644
13--- a/gcc/config/microblaze/microblaze.md 13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 14+++ b/gcc/config/microblaze/microblaze.md
15@@ -602,9 +602,9 @@ 15@@ -602,9 +602,9 @@
@@ -25,5 +25,5 @@ index d6370d8..6b6b7c6 100644
25 "dlong\t%0,%1" 25 "dlong\t%0,%1"
26 [(set_attr "type" "fcvt") 26 [(set_attr "type" "fcvt")
27-- 27--
282.7.4 282.17.1
29 29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0049-fixing-the-long-long-long-mingw-toolchain-issue.patch
index 28554722..346157ce 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-fixing-the-long-long-long-mingw-toolchain-issue.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0049-fixing-the-long-long-long-mingw-toolchain-issue.patch
@@ -1,7 +1,7 @@
1From a56b23ae244eee1da6d6595d3a6477085d77271e Mon Sep 17 00:00:00 2001 1From dfe4f5aa180a7b4c15b4b586b253541aa9d29e52 Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com> 2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 29 Nov 2018 17:55:08 +0530 3Date: Thu, 29 Nov 2018 17:55:08 +0530
4Subject: [PATCH 55/63] fixing the long & long long mingw toolchain issue 4Subject: [PATCH 49/58] fixing the long & long long mingw toolchain issue
5 5
6--- 6---
7 gcc/config/microblaze/constraints.md | 2 +- 7 gcc/config/microblaze/constraints.md | 2 +-
@@ -9,7 +9,7 @@ Subject: [PATCH 55/63] fixing the long & long long mingw toolchain issue
9 2 files changed, 5 insertions(+), 5 deletions(-) 9 2 files changed, 5 insertions(+), 5 deletions(-)
10 10
11diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 11diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
12index 2fce91e..9a5aa6b 100644 12index c2b0a21c53b..4a6cf419671 100644
13--- a/gcc/config/microblaze/constraints.md 13--- a/gcc/config/microblaze/constraints.md
14+++ b/gcc/config/microblaze/constraints.md 14+++ b/gcc/config/microblaze/constraints.md
15@@ -55,7 +55,7 @@ 15@@ -55,7 +55,7 @@
@@ -22,7 +22,7 @@ index 2fce91e..9a5aa6b 100644
22 ;; Define floating point constraints 22 ;; Define floating point constraints
23 23
24diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 24diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
25index 6b6b7c6..a1dc41f 100644 25index 53dbe4e4060..5d277014e42 100644
26--- a/gcc/config/microblaze/microblaze.md 26--- a/gcc/config/microblaze/microblaze.md
27+++ b/gcc/config/microblaze/microblaze.md 27+++ b/gcc/config/microblaze/microblaze.md
28@@ -648,8 +648,8 @@ 28@@ -648,8 +648,8 @@
@@ -55,5 +55,5 @@ index 6b6b7c6..a1dc41f 100644
55 else 55 else
56 return "addlik\t%0,r0,%1"; 56 return "addlik\t%0,r0,%1";
57-- 57--
582.7.4 582.17.1
59 59
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Fix-the-MB-64-bug-of-handling-QI-objects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0050-Fix-the-MB-64-bug-of-handling-QI-objects.patch
index a419216c..360bdb51 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Fix-the-MB-64-bug-of-handling-QI-objects.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0050-Fix-the-MB-64-bug-of-handling-QI-objects.patch
@@ -1,14 +1,14 @@
1From e13b1b70972511a642512cbc7093ed21e5a9e141 Mon Sep 17 00:00:00 2001 1From b21e115bc1af625b2ae1acb893027af6af3c2d16 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 14 Mar 2019 18:11:04 +0530 3Date: Thu, 14 Mar 2019 18:11:04 +0530
4Subject: [PATCH 56/63] Fix the MB-64 bug of handling QI objects 4Subject: [PATCH 50/58] Fix the MB-64 bug of handling QI objects
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.md | 14 +++++++------- 7 gcc/config/microblaze/microblaze.md | 14 +++++++-------
8 1 file changed, 7 insertions(+), 7 deletions(-) 8 1 file changed, 7 insertions(+), 7 deletions(-)
9 9
10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
11index a1dc41f..bb96e2d 100644 11index 5d277014e42..a1363935c42 100644
12--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
13+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
14@@ -2347,11 +2347,11 @@ else 14@@ -2347,11 +2347,11 @@ else
@@ -43,5 +43,5 @@ index a1dc41f..bb96e2d 100644
43 "TARGET_MB_64" 43 "TARGET_MB_64"
44 { 44 {
45-- 45--
462.7.4 462.17.1
47 47
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0051-Patch-Microblaze-Check-the-possibiity-of-peephole2-o.patch
index 940009de..6b7bb2a1 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0051-Patch-Microblaze-Check-the-possibiity-of-peephole2-o.patch
@@ -1,15 +1,17 @@
1From 1387d4fedb397f78b08ad33204a3fcf2bd63f183 Mon Sep 17 00:00:00 2001 1From ed17f79b22769e5a256e3990715e32e943bfd929 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Fri, 29 Mar 2019 12:08:39 +0530 3Date: Fri, 29 Mar 2019 12:08:39 +0530
4Subject: [PATCH 57/63] [Patch,Microblaze] : We will check the possibility of 4Subject: [PATCH 51/58] [Patch,Microblaze] : Check the possibiity of peephole2
5 peephole2 optimization,if we can then we will fix the compiler issue. 5 opt
6 6
7We will check the possibility of peephole2
8optimization,if we can then we will fix the compiler issue.
7--- 9---
8 gcc/config/microblaze/microblaze.md | 63 ++++++++++++++++++++++--------------- 10 gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------
9 1 file changed, 38 insertions(+), 25 deletions(-) 11 1 file changed, 38 insertions(+), 25 deletions(-)
10 12
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 13diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index bb96e2d..830ef77 100644 14index a1363935c42..626eade9468 100644
13--- a/gcc/config/microblaze/microblaze.md 15--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md 16+++ b/gcc/config/microblaze/microblaze.md
15@@ -882,31 +882,44 @@ 17@@ -882,31 +882,44 @@
@@ -83,5 +85,5 @@ index bb96e2d..830ef77 100644
83 ;;---------------------------------------------------------------- 85 ;;----------------------------------------------------------------
84 ;; Negation and one's complement 86 ;; Negation and one's complement
85-- 87--
862.7.4 882.17.1
87 89
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0052-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
index 1548faad..45505cf1 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0052-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
@@ -1,19 +1,19 @@
1From 80919b0f43b275e70521e4f85cd28bcd0ece3b80 Mon Sep 17 00:00:00 2001 1From d845981b381b0174d97dda8a78d82cf8fcae7ca1 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 17 Apr 2019 12:36:16 +0530 3Date: Wed, 17 Apr 2019 12:36:16 +0530
4Subject: [PATCH 60/61] [Patch,MicroBlaze]: fixed typos in mul,div and mod 4Subject: [PATCH 52/58] [Patch,MicroBlaze]: fixed typos in mul,div and mod
5 assembly files. 5 assembly files.
6 6
7--- 7---
8 libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++++++++---- 8 libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++----
9 libgcc/config/microblaze/modsi3.S | 40 +++++++++++++++++++++++--- 9 libgcc/config/microblaze/modsi3.S | 40 ++++++++++++++++++---
10 libgcc/config/microblaze/mulsi3.S | 33 +++++++++++++++++++++- 10 libgcc/config/microblaze/mulsi3.S | 33 ++++++++++++++++-
11 libgcc/config/microblaze/udivsi3.S | 54 +++++++++++++++++++++++++++++++---- 11 libgcc/config/microblaze/udivsi3.S | 54 +++++++++++++++++++++++++---
12 libgcc/config/microblaze/umodsi3.S | 58 +++++++++++++++++++++++++++++++++++--- 12 libgcc/config/microblaze/umodsi3.S | 58 +++++++++++++++++++++++++++---
13 5 files changed, 212 insertions(+), 20 deletions(-) 13 5 files changed, 212 insertions(+), 20 deletions(-)
14 14
15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S 15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S
16index 7e7d875..cfb4c05 100644 16index 104243e35fe..5755e29fbb6 100644
17--- a/libgcc/config/microblaze/divsi3.S 17--- a/libgcc/config/microblaze/divsi3.S
18+++ b/libgcc/config/microblaze/divsi3.S 18+++ b/libgcc/config/microblaze/divsi3.S
19@@ -46,7 +46,7 @@ 19@@ -46,7 +46,7 @@
@@ -107,7 +107,7 @@ index 7e7d875..cfb4c05 100644
107 $LaDiv_By_Zero: 107 $LaDiv_By_Zero:
108 $LaResult_Is_Zero: 108 $LaResult_Is_Zero:
109diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S 109diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
110index 46ff34a..49618dd 100644 110index 4dbb25900d9..b6129f5e822 100644
111--- a/libgcc/config/microblaze/modsi3.S 111--- a/libgcc/config/microblaze/modsi3.S
112+++ b/libgcc/config/microblaze/modsi3.S 112+++ b/libgcc/config/microblaze/modsi3.S
113@@ -62,40 +62,72 @@ __modsi3: 113@@ -62,40 +62,72 @@ __modsi3:
@@ -196,7 +196,7 @@ index 46ff34a..49618dd 100644
196 nop 196 nop
197 #else 197 #else
198diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S 198diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S
199index 31a73c2..39951be 100644 199index 2044399db4a..95709d5bb01 100644
200--- a/libgcc/config/microblaze/mulsi3.S 200--- a/libgcc/config/microblaze/mulsi3.S
201+++ b/libgcc/config/microblaze/mulsi3.S 201+++ b/libgcc/config/microblaze/mulsi3.S
202@@ -43,7 +43,37 @@ 202@@ -43,7 +43,37 @@
@@ -246,7 +246,7 @@ index 31a73c2..39951be 100644
246 .end __mulsi3 246 .end __mulsi3
247 .size __mulsi3, . - __mulsi3 247 .size __mulsi3, . - __mulsi3
248diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S 248diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S
249index 94adb6a..d4fe285 100644 249index d2332bcfe62..687d5588801 100644
250--- a/libgcc/config/microblaze/udivsi3.S 250--- a/libgcc/config/microblaze/udivsi3.S
251+++ b/libgcc/config/microblaze/udivsi3.S 251+++ b/libgcc/config/microblaze/udivsi3.S
252@@ -59,52 +59,96 @@ __udivsi3: 252@@ -59,52 +59,96 @@ __udivsi3:
@@ -360,7 +360,7 @@ index 94adb6a..d4fe285 100644
360 NOP 360 NOP
361 #else 361 #else
362diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S 362diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
363index 9bf65c3..3bd5d48 100644 363index 2dd72aef68e..59646ce437f 100644
364--- a/libgcc/config/microblaze/umodsi3.S 364--- a/libgcc/config/microblaze/umodsi3.S
365+++ b/libgcc/config/microblaze/umodsi3.S 365+++ b/libgcc/config/microblaze/umodsi3.S
366@@ -46,7 +46,7 @@ 366@@ -46,7 +46,7 @@
@@ -462,5 +462,5 @@ index 9bf65c3..3bd5d48 100644
462 $LaRETURN_HERE: 462 $LaRETURN_HERE:
463 # Restore values of CSRs and that of r3 and the divisor and the dividend 463 # Restore values of CSRs and that of r3 and the divisor and the dividend
464-- 464--
4652.7.4 4652.17.1
466 466
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Author-Nagaraju-nmekala-xilinx.com.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch
index 9f878669..8dce8476 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0060-Author-Nagaraju-nmekala-xilinx.com.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0053-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch
@@ -1,25 +1,24 @@
1From f0332f119c3cbe95886dae77c4b5a9b9907b4b17 Mon Sep 17 00:00:00 2001 1From e3b95d5646d4197bff81105c12bcbc5e7dba1725 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 18 Apr 2019 16:00:37 +0530 3Date: Thu, 18 Apr 2019 16:00:37 +0530
4Subject: [PATCH 60/63] Author: Nagaraju <nmekala@xilinx.com> Date: Wed Apr 4Subject: [PATCH 53/58] [Patch, microblaze]: MB-64 removal of barrel-shift
5 17 14:11:00 2019 +0530 5 instructions from default
6 6
7 [Patch, microblaze]: MB-64 removal of barrel-shift instructions from default 7By default MB-64 is generatting barrel-shift instructions. It has been
8 By default MB-64 is generatting barrel-shift instructions. It has been 8removed from default. Barrel-shift instructions will be generated only if
9 removed from default. Barrel-shift instructions will be generated only if 9barrel-shifter is enabled. Similarly to double instructions as well.
10 barrel-shifter is enabled. Similarly to double instructions as well.
11 10
12 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 11Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
13--- 12---
14 gcc/config/microblaze/microblaze.c | 2 +- 13 gcc/config/microblaze/microblaze.c | 2 +-
15 gcc/config/microblaze/microblaze.md | 269 +++++++++++++++++++++++++++++++++--- 14 gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++--
16 2 files changed, 252 insertions(+), 19 deletions(-) 15 2 files changed, 252 insertions(+), 19 deletions(-)
17 16
18diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 17diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
19index 220e03d..5c09452 100644 18index 12b1da852dd..5b4c21af365 100644
20--- a/gcc/config/microblaze/microblaze.c 19--- a/gcc/config/microblaze/microblaze.c
21+++ b/gcc/config/microblaze/microblaze.c 20+++ b/gcc/config/microblaze/microblaze.c
22@@ -4008,7 +4008,7 @@ microblaze_expand_divide (rtx operands[]) 21@@ -4000,7 +4000,7 @@ microblaze_expand_divide (rtx operands[])
23 emit_insn (gen_rtx_CLOBBER (Pmode, reg18)); 22 emit_insn (gen_rtx_CLOBBER (Pmode, reg18));
24 23
25 if (TARGET_MB_64) { 24 if (TARGET_MB_64) {
@@ -29,7 +28,7 @@ index 220e03d..5c09452 100644
29 } 28 }
30 else { 29 else {
31diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 30diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
32index 830ef77..3e7c647 100644 31index 626eade9468..6cc62666269 100644
33--- a/gcc/config/microblaze/microblaze.md 32--- a/gcc/config/microblaze/microblaze.md
34+++ b/gcc/config/microblaze/microblaze.md 33+++ b/gcc/config/microblaze/microblaze.md
35@@ -547,7 +547,7 @@ 34@@ -547,7 +547,7 @@
@@ -475,5 +474,5 @@ index 830ef77..3e7c647 100644
475 [(set_attr "type" "arith") 474 [(set_attr "type" "arith")
476 (set_attr "mode" "DI") 475 (set_attr "mode" "DI")
477-- 476--
4782.7.4 4772.17.1
479 478
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
index d3ed669c..70e05117 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0054-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
@@ -1,7 +1,7 @@
1From 11766e4f7aaad3f217944079335c71525b72201c Mon Sep 17 00:00:00 2001 1From 6bdb6f300593c4a633a8ec485ac2744a97b51460 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Wed, 8 May 2019 14:12:03 +0530 3Date: Wed, 8 May 2019 14:12:03 +0530
4Subject: [PATCH 61/63] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and 4Subject: [PATCH 54/58] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and
5 disable fivopts by default 5 disable fivopts by default
6 6
7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. 7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default.
@@ -15,7 +15,7 @@ Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com>
15 1 file changed, 4 insertions(+), 2 deletions(-) 15 1 file changed, 4 insertions(+), 2 deletions(-)
16 16
17diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c 17diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c
18index 9b6ef21..3cae2a6 100644 18index 0b9d5a1b453..cf2db8afe36 100644
19--- a/gcc/common/config/microblaze/microblaze-common.c 19--- a/gcc/common/config/microblaze/microblaze-common.c
20+++ b/gcc/common/config/microblaze/microblaze-common.c 20+++ b/gcc/common/config/microblaze/microblaze-common.c
21@@ -27,13 +27,15 @@ 21@@ -27,13 +27,15 @@
@@ -37,5 +37,5 @@ index 9b6ef21..3cae2a6 100644
37+#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table 37+#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
38 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; 38 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
39-- 39--
402.7.4 402.17.1
41 41
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Added-new-MB-64-single-register-arithmetic-instructi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-Added-new-MB-64-single-register-arithmetic-instructi.patch
index ca1a2b9f..4ab3cec9 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Added-new-MB-64-single-register-arithmetic-instructi.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-Added-new-MB-64-single-register-arithmetic-instructi.patch
@@ -1,14 +1,14 @@
1From bb65903ab6293a47d154764a585f6c53b5fcf853 Mon Sep 17 00:00:00 2001 1From 3198a31122bb0436d298d29e986bb69bc3c526a9 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Fri, 23 Aug 2019 16:16:53 +0530 3Date: Fri, 23 Aug 2019 16:16:53 +0530
4Subject: [PATCH 62/63] Added new MB-64 single register arithmetic instructions 4Subject: [PATCH 55/58] Added new MB-64 single register arithmetic instructions
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++++++++++ 7 gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++
8 1 file changed, 56 insertions(+) 8 1 file changed, 56 insertions(+)
9 9
10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
11index 3e7c647..4d40cc5 100644 11index 6cc62666269..696be7b300f 100644
12--- a/gcc/config/microblaze/microblaze.md 12--- a/gcc/config/microblaze/microblaze.md
13+++ b/gcc/config/microblaze/microblaze.md 13+++ b/gcc/config/microblaze/microblaze.md
14@@ -654,6 +654,18 @@ 14@@ -654,6 +654,18 @@
@@ -103,5 +103,5 @@ index 3e7c647..4d40cc5 100644
103 [(set (match_operand:DI 0 "register_operand" "=d,d") 103 [(set (match_operand:DI 0 "register_operand" "=d,d")
104 (xor:DI (match_operand:DI 1 "arith_operand" "%d,d") 104 (xor:DI (match_operand:DI 1 "arith_operand" "%d,d")
105-- 105--
1062.7.4 1062.17.1
107 107
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-microblaze_linker_script_xilinx_ld.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-microblaze_linker_script_xilinx_ld.patch
deleted file mode 100644
index c009c92d..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0055-microblaze_linker_script_xilinx_ld.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
2index 740b8d9..4bda9c2 100644
3--- a/gcc/config/microblaze/microblaze.h
4+++ b/gcc/config/microblaze/microblaze.h
5@@ -114,8 +114,9 @@ extern enum pipeline_type microblaze_pipe;
6 %{m64:-EL --oformat=elf64-microblazeel} \
7 %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
8 %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
9- %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
10- %{!T*: -dT xilinx.ld%s}"
11+ %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0}"
12+
13+// %{!T*: -dT xilinx.ld%s}"
14
15 /* Specs for the compiler proper */
16
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0063-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch
index edf6a0f3..afe3ae96 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0063-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch
@@ -1,7 +1,7 @@
1From d4b23a1dd0564bcf67b5b88a68d62eb49bdab15d Mon Sep 17 00:00:00 2001 1From 1dadde6d9a49010a495529c9b5ea6c2bb75cc5f1 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com> 2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Mon, 26 Aug 2019 15:55:22 +0530 3Date: Mon, 26 Aug 2019 15:55:22 +0530
4Subject: [PATCH 63/63] [Patch,MicroBlaze] : Added support for 64 bit Immediate 4Subject: [PATCH 56/58] [Patch,MicroBlaze] : Added support for 64 bit Immediate
5 values. 5 values.
6 6
7--- 7---
@@ -10,7 +10,7 @@ Subject: [PATCH 63/63] [Patch,MicroBlaze] : Added support for 64 bit Immediate
10 2 files changed, 3 insertions(+), 4 deletions(-) 10 2 files changed, 3 insertions(+), 4 deletions(-)
11 11
12diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 12diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
13index 9a5aa6b..e87a90f 100644 13index 4a6cf419671..2432b480a2c 100644
14--- a/gcc/config/microblaze/constraints.md 14--- a/gcc/config/microblaze/constraints.md
15+++ b/gcc/config/microblaze/constraints.md 15+++ b/gcc/config/microblaze/constraints.md
16@@ -53,9 +53,9 @@ 16@@ -53,9 +53,9 @@
@@ -26,7 +26,7 @@ index 9a5aa6b..e87a90f 100644
26 ;; Define floating point constraints 26 ;; Define floating point constraints
27 27
28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 28diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
29index 4d40cc5..6e74503 100644 29index 696be7b300f..f0a9701ab18 100644
30--- a/gcc/config/microblaze/microblaze.md 30--- a/gcc/config/microblaze/microblaze.md
31+++ b/gcc/config/microblaze/microblaze.md 31+++ b/gcc/config/microblaze/microblaze.md
32@@ -1334,8 +1334,7 @@ 32@@ -1334,8 +1334,7 @@
@@ -40,5 +40,5 @@ index 4d40cc5..6e74503 100644
40 addlk\t%0,r0,r0\t 40 addlk\t%0,r0,r0\t
41 addlik\t%0,r0,%1\t #N1 %X1 41 addlik\t%0,r0,%1\t #N1 %X1
42-- 42--
432.7.4 432.17.1
44 44
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-fix-the-lto-wrapper-issue-on-windows.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-fix-the-lto-wrapper-issue-on-windows.patch
deleted file mode 100644
index ff524770..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0056-fix-the-lto-wrapper-issue-on-windows.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From f30b99b5b8d3f2a8d8e4973cd155a4b9f1849039 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 14 Mar 2019 18:08:06 +0530
4Subject: [PATCH 56/57] fix the lto-wrapper issue on windows
5
6---
7 libiberty/simple-object.c | 6 +++++-
8 1 file changed, 5 insertions(+), 1 deletion(-)
9
10diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c
11index 42aa6ac..d2465c6 100644
12--- a/libiberty/simple-object.c
13+++ b/libiberty/simple-object.c
14@@ -44,6 +44,10 @@ Boston, MA 02110-1301, USA. */
15 #define SEEK_SET 0
16 #endif
17
18+#ifndef O_BINARY
19+#define O_BINARY 0
20+#endif
21+
22 #include "simple-object-common.h"
23
24 /* The known object file formats. */
25@@ -326,7 +330,7 @@ simple_object_copy_lto_debug_sections (simple_object_read *sobj,
26 return errmsg;
27 }
28
29- outfd = creat (dest, 00777);
30+ outfd = open (dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 00777);
31 if (outfd == -1)
32 {
33 *err = errno;
34--
352.7.4
36
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Fix-the-MB-64-bug-of-handling-QI-objects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Fix-the-MB-64-bug-of-handling-QI-objects.patch
deleted file mode 100644
index a5a2039d..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Fix-the-MB-64-bug-of-handling-QI-objects.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 6c58973f1cc1e37773aeab583aa3ac6331489106 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 14 Mar 2019 18:11:04 +0530
4Subject: [PATCH 57/57] Fix the MB-64 bug of handling QI objects
5
6---
7 gcc/config/microblaze/microblaze.md | 14 +++++++-------
8 1 file changed, 7 insertions(+), 7 deletions(-)
9
10diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
11index e03b835..88aee9e 100644
12--- a/gcc/config/microblaze/microblaze.md
13+++ b/gcc/config/microblaze/microblaze.md
14@@ -2345,11 +2345,11 @@ else
15
16 (define_insn "branch_zero_64"
17 [(set (pc)
18- (if_then_else (match_operator:SI 0 "ordered_comparison_operator"
19+ (if_then_else (match_operator 0 "ordered_comparison_operator"
20 [(match_operand:SI 1 "register_operand" "d")
21 (const_int 0)])
22- (match_operand:SI 2 "pc_or_label_operand" "")
23- (match_operand:SI 3 "pc_or_label_operand" "")))
24+ (match_operand 2 "pc_or_label_operand" "")
25+ (match_operand 3 "pc_or_label_operand" "")))
26 ]
27 "TARGET_MB_64"
28 {
29@@ -2365,11 +2365,11 @@ else
30
31 (define_insn "long_branch_zero"
32 [(set (pc)
33- (if_then_else (match_operator 0 "ordered_comparison_operator"
34- [(match_operand 1 "register_operand" "d")
35+ (if_then_else (match_operator:DI 0 "ordered_comparison_operator"
36+ [(match_operand:DI 1 "register_operand" "d")
37 (const_int 0)])
38- (match_operand 2 "pc_or_label_operand" "")
39- (match_operand 3 "pc_or_label_operand" "")))
40+ (match_operand:DI 2 "pc_or_label_operand" "")
41+ (match_operand:DI 3 "pc_or_label_operand" "")))
42 ]
43 "TARGET_MB_64"
44 {
45--
462.7.4
47
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0064-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
index 41c90353..ebd707c9 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0064-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0057-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
@@ -1,23 +1,32 @@
1From 5f54efe1e7d9604b45ddddd510ce439477d0e94f Mon Sep 17 00:00:00 2001 1From ab73daf6bf1bc652e9557386cba5eb237af66350 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com> 2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 9 Jan 2020 12:30:41 +0530 3Date: Thu, 9 Jan 2020 12:30:41 +0530
4Subject: [PATCH] [Patch, microblaze]: Fix Compiler crash with 4Subject: [PATCH 57/58] [Patch, microblaze]: Fix Compiler crash with
5 -freg-struct-return This patch fixes a bug in MB GCC regarding the passing 5 -freg-struct-return This patch fixes a bug in MB GCC regarding the passing
6 struct values in registers. Currently we are only handling SImode With this 6 struct values in registers. Currently we are only handling SImode With this
7 patch all other modes are handled properly 7 patch all other modes are handled properly
8 8
9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
10 10
11ChangeLog:
122020-01-09 Nagaraju Mekala <nmekala@xilix.com>
13
14 * gcc/config/microblaze/microblaze.h
15 (LIBCALL_Value): Remove macro
16 (PROMOTE_MODE): Remove macro
17 * gcc/config/microblaze/microblaze.c
18 (TARGET_LIBCALL_Value): Added new macro
19 (microblaze_function_value): Updated the return Value
11--- 20---
12 gcc/config/microblaze/microblaze.c | 11 ++++++++++- 21 gcc/config/microblaze/microblaze.c | 11 ++++++++++-
13 gcc/config/microblaze/microblaze.h | 19 ------------------- 22 gcc/config/microblaze/microblaze.h | 19 -------------------
14 2 files changed, 10 insertions(+), 20 deletions(-) 23 2 files changed, 10 insertions(+), 20 deletions(-)
15 24
16diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 25diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
17index 5c09452..beccd12 100644 26index 5b4c21af365..31869982d27 100644
18--- a/gcc/config/microblaze/microblaze.c 27--- a/gcc/config/microblaze/microblaze.c
19+++ b/gcc/config/microblaze/microblaze.c 28+++ b/gcc/config/microblaze/microblaze.c
20@@ -4046,7 +4046,16 @@ microblaze_function_value (const_tree valtype, 29@@ -4038,7 +4038,16 @@ microblaze_function_value (const_tree valtype,
21 const_tree func ATTRIBUTE_UNUSED, 30 const_tree func ATTRIBUTE_UNUSED,
22 bool outgoing ATTRIBUTE_UNUSED) 31 bool outgoing ATTRIBUTE_UNUSED)
23 { 32 {
@@ -36,7 +45,7 @@ index 5c09452..beccd12 100644
36 45
37 /* Implement TARGET_SCHED_ADJUST_COST. */ 46 /* Implement TARGET_SCHED_ADJUST_COST. */
38diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 47diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
39index ab541f7..100e7b2 100644 48index 0c493b6f6e4..5eb95c2600a 100644
40--- a/gcc/config/microblaze/microblaze.h 49--- a/gcc/config/microblaze/microblaze.h
41+++ b/gcc/config/microblaze/microblaze.h 50+++ b/gcc/config/microblaze/microblaze.h
42@@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe; 51@@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe;
@@ -73,5 +82,5 @@ index ab541f7..100e7b2 100644
73 On the MicroBlaze, R2 R3 are the only register thus used. 82 On the MicroBlaze, R2 R3 are the only register thus used.
74 Currently, R2 are only implemented here (C has no complex type) */ 83 Currently, R2 are only implemented here (C has no complex type) */
75-- 84--
761.8.3.1 852.17.1
77 86
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch
deleted file mode 100644
index 8bc47a43..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From bcbfd9f69d858306a080aa7213e96ca6eca66106 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Fri, 29 Mar 2019 12:08:39 +0530
4Subject: [PATCH 58/61] [Patch,Microblaze] : We will check the possibility of
5 peephole2 optimization,if we can then we will fix the compiler issue.
6
7---
8 gcc/config/microblaze/microblaze.md | 63 ++++++++++++++++++++++---------------
9 1 file changed, 38 insertions(+), 25 deletions(-)
10
11diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
12index 88aee9e..8bd175f 100644
13--- a/gcc/config/microblaze/microblaze.md
14+++ b/gcc/config/microblaze/microblaze.md
15@@ -880,31 +880,44 @@
16 (set_attr "mode" "SI")
17 (set_attr "length" "4")])
18
19-(define_peephole2
20- [(set (match_operand:SI 0 "register_operand")
21- (fix:SI (match_operand:SF 1 "register_operand")))
22- (set (pc)
23- (if_then_else (match_operator 2 "ordered_comparison_operator"
24- [(match_operand:SI 3 "register_operand")
25- (match_operand:SI 4 "arith_operand")])
26- (label_ref (match_operand 5))
27- (pc)))]
28- "TARGET_HARD_FLOAT && !TARGET_MB_64"
29- [(set (match_dup 1) (match_dup 3))]
30-
31- {
32- rtx condition;
33- rtx cmp_op0 = operands[3];
34- rtx cmp_op1 = operands[4];
35- rtx comp_reg = gen_rtx_REG (SImode, MB_ABI_ASM_TEMP_REGNUM);
36-
37- emit_insn (gen_cstoresf4 (comp_reg, operands[2],
38- gen_rtx_REG (SFmode, REGNO (cmp_op0)),
39- gen_rtx_REG (SFmode, REGNO (cmp_op1))));
40- condition = gen_rtx_NE (SImode, comp_reg, const0_rtx);
41- emit_jump_insn (gen_condjump (condition, operands[5]));
42- }
43-)
44+;; peephole2 optimization will be done only if fint and if-then-else
45+;; are dependent.added condition for the same.
46+;; if they are dependent then gcc is giving "flow control insn inside a basic block"
47+;; testcase:
48+;; volatile float vec = 1.0;
49+;; volatile int ci = 2;
50+;; register int cj = (int)(vec);
51+;;// ci=cj;
52+;;// if (ci <0) {
53+;; if (cj < 0) {
54+;; ci = 0;
55+;; }
56+;; commenting for now.we will check the possibility of this optimization later
57+
58+;;(define_peephole2
59+;; [(set (match_operand:SI 0 "register_operand")
60+;; (fix:SI (match_operand:SF 1 "register_operand")))
61+;; (set (pc)
62+;; (if_then_else (match_operator 2 "ordered_comparison_operator"
63+;; [(match_operand:SI 3 "register_operand")
64+;; (match_operand:SI 4 "arith_operand")])
65+;; (label_ref (match_operand 5))
66+;; (pc)))]
67+;; "TARGET_HARD_FLOAT && !TARGET_MB_64 && ((REGNO (operands[0])) == (REGNO (operands[3])))"
68+;; [(set (match_dup 1) (match_dup 3))]
69+;; {
70+;; rtx condition;
71+;; rtx cmp_op0 = operands[3];
72+;; rtx cmp_op1 = operands[4];
73+;; rtx comp_reg = gen_rtx_REG (SImode, MB_ABI_ASM_TEMP_REGNUM);
74+;;
75+;; emit_insn (gen_cstoresf4 (comp_reg, operands[2],
76+;; gen_rtx_REG (SFmode, REGNO (cmp_op0)),
77+;; gen_rtx_REG (SFmode, REGNO (cmp_op1))));
78+;; condition = gen_rtx_NE (SImode, comp_reg, const0_rtx);
79+;; emit_jump_insn (gen_condjump (condition, operands[5]));
80+;; }
81+;;)
82
83 ;;----------------------------------------------------------------
84 ;; Negation and one's complement
85--
862.7.4
87
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch
deleted file mode 100644
index 69b49898..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 8e7d7f3d2e103c34bbb28afe1338107b9fd824f0 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 16 Apr 2019 17:20:24 +0530
4Subject: [PATCH 58/63] Reverting the patch as kernel boot is not working with
5 this patch CR-1026413 Revert "[Patch,Microblaze]:reverting the cost check
6 before propagating constants."
7
8This reverts commit 7156e379a67fa47a5fb9ede1448c0d528dbda65b.
9---
10 gcc/cprop.c | 4 ----
11 1 file changed, 4 deletions(-)
12
13diff --git a/gcc/cprop.c b/gcc/cprop.c
14index 42bcc81..65c0130 100644
15--- a/gcc/cprop.c
16+++ b/gcc/cprop.c
17@@ -733,7 +733,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
18 int success = 0;
19 rtx set = single_set (insn);
20
21-#if 0
22 bool check_rtx_costs = true;
23 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
24 int old_cost = set ? set_rtx_cost (set, speed) : 0;
25@@ -745,7 +744,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
26 && (GET_CODE (XEXP (note, 0)) == CONST
27 || CONSTANT_P (XEXP (note, 0)))))
28 check_rtx_costs = false;
29-#endif
30
31 /* Usually we substitute easy stuff, so we won't copy everything.
32 We however need to take care to not duplicate non-trivial CONST
33@@ -754,7 +752,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
34
35 validate_replace_src_group (from, to, insn);
36
37-#if 0
38 /* If TO is a constant, check the cost of the set after propagation
39 to the cost of the set before the propagation. If the cost is
40 higher, then do not replace FROM with TO. */
41@@ -767,7 +764,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
42 return false;
43 }
44
45-#endif
46
47 if (num_changes_pending () && apply_change_group ())
48 success = 1;
49--
502.7.4
51
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-microblaze-Avoid-UINTPTR_TYPE-macro-redefinition.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-microblaze-Avoid-UINTPTR_TYPE-macro-redefinition.patch
new file mode 100644
index 00000000..e3c4b87b
--- /dev/null
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-10/0058-microblaze-Avoid-UINTPTR_TYPE-macro-redefinition.patch
@@ -0,0 +1,29 @@
1From dd73d8ba32c0c24f17a54538b9bb54beb5d8d4e0 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@kernel.crashing.org>
3Date: Thu, 13 Aug 2020 16:28:57 -0500
4Subject: [PATCH 58/58] microblaze: Avoid UINTPTR_TYPE macro redefinition
5
6Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
7---
8 gcc/config/microblaze/microblaze.h | 5 -----
9 1 file changed, 5 deletions(-)
10
11diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
12index 5eb95c2600a..4cb98bac849 100644
13--- a/gcc/config/microblaze/microblaze.h
14+++ b/gcc/config/microblaze/microblaze.h
15@@ -246,11 +246,6 @@ extern enum pipeline_type microblaze_pipe;
16 #undef PTRDIFF_TYPE
17 #define PTRDIFF_TYPE (TARGET_MB_64 ? "long int" : "int")
18
19-/*#undef INTPTR_TYPE
20-#define INTPTR_TYPE (TARGET_MB_64 ? "long int" : "int")*/
21-#undef UINTPTR_TYPE
22-#define UINTPTR_TYPE (TARGET_MB_64 ? "long unsigned int" : "unsigned int")
23-
24 #define DATA_ALIGNMENT(TYPE, ALIGN) \
25 ((((ALIGN) < BITS_PER_WORD) \
26 && (TREE_CODE (TYPE) == ARRAY_TYPE \
27--
282.17.1
29
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
deleted file mode 100644
index 2e570330..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch
+++ /dev/null
@@ -1,466 +0,0 @@
1From e1a10a708f209704a3921cf66dd3ff4d0814befc Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 17 Apr 2019 12:36:16 +0530
4Subject: [PATCH 59/63] [Patch,MicroBlaze]: fixed typos in mul,div and mod
5 assembly files.
6
7---
8 libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++++++++----
9 libgcc/config/microblaze/modsi3.S | 40 +++++++++++++++++++++++---
10 libgcc/config/microblaze/mulsi3.S | 33 +++++++++++++++++++++-
11 libgcc/config/microblaze/udivsi3.S | 54 +++++++++++++++++++++++++++++++----
12 libgcc/config/microblaze/umodsi3.S | 58 +++++++++++++++++++++++++++++++++++---
13 5 files changed, 212 insertions(+), 20 deletions(-)
14
15diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S
16index 2765e42..bd56522 100644
17--- a/libgcc/config/microblaze/divsi3.S
18+++ b/libgcc/config/microblaze/divsi3.S
19@@ -46,7 +46,7 @@
20 __divsi3:
21 .frame r1,0,r15
22
23- ADDIK r1,r1,-32
24+ ADDLIK r1,r1,-32
25 SLI r28,r1,0
26 SLI r29,r1,8
27 SLI r30,r1,16
28@@ -61,13 +61,23 @@ __divsi3:
29 SWI r30,r1,8
30 SWI r31,r1,12
31 #endif
32- BEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
33- BEQI r5,$LaResult_Is_Zero # Result is Zero
34- BGEID r5,$LaR5_Pos
35+#ifdef __arch64__
36+ BEAEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
37+ BEAEQI r5,$LaResult_Is_Zero # Result is Zero
38+ BEAGEID r5,$LaR5_Pos
39+#else
40+ BEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
41+ BEQI r5,$LaResult_Is_Zero # Result is Zero
42+ BGEID r5,$LaR5_Pos
43+#endif
44 XOR r28,r5,r6 # Get the sign of the result
45 RSUBI r5,r5,0 # Make r5 positive
46 $LaR5_Pos:
47- BGEI r6,$LaR6_Pos
48+#ifdef __arch64__
49+ BEAGEI r6,$LaR6_Pos
50+#else
51+ BGEI r6,$LaR6_Pos
52+#endif
53 RSUBI r6,r6,0 # Make r6 positive
54 $LaR6_Pos:
55 ADDIK r30,r0,0 # Clear mod
56@@ -76,26 +86,51 @@ $LaR6_Pos:
57
58 # First part try to find the first '1' in the r5
59 $LaDIV0:
60- BLTI r5,$LaDIV2 # This traps r5 == 0x80000000
61+#ifdef __arch64__
62+ BEALTI r5,$LaDIV2 # This traps r5 == 0x80000000
63+#else
64+ BLTI r5,$LaDIV2 # This traps r5 == 0x80000000
65+#endif
66 $LaDIV1:
67 ADD r5,r5,r5 # left shift logical r5
68+#ifdef __arch64__
69+ BEAGTID r5,$LaDIV1
70+#else
71 BGTID r5,$LaDIV1
72+#endif
73 ADDIK r29,r29,-1
74 $LaDIV2:
75 ADD r5,r5,r5 # left shift logical r5 get the '1' into the Carry
76 ADDC r30,r30,r30 # Move that bit into the Mod register
77 RSUB r31,r6,r30 # Try to subtract (r30 a r6)
78+#ifdef __arch64__
79+ BEALTI r31,$LaMOD_TOO_SMALL
80+#else
81 BLTI r31,$LaMOD_TOO_SMALL
82+#endif
83 OR r30,r0,r31 # Move the r31 to mod since the result was positive
84 ADDIK r3,r3,1
85 $LaMOD_TOO_SMALL:
86 ADDIK r29,r29,-1
87+#ifdef __arch64__
88+ BEAEQi r29,$LaLOOP_END
89+#else
90 BEQi r29,$LaLOOP_END
91+#endif
92 ADD r3,r3,r3 # Shift in the '1' into div
93+#ifdef __arch64__
94+ BREAI $LaDIV2 # Div2
95+#else
96 BRI $LaDIV2 # Div2
97+#endif
98 $LaLOOP_END:
99+#ifdef __arch64__
100+ BEAGEI r28,$LaRETURN_HERE
101+ BREAID $LaRETURN_HERE
102+#else
103 BGEI r28,$LaRETURN_HERE
104 BRID $LaRETURN_HERE
105+#endif
106 RSUBI r3,r3,0 # Negate the result
107 $LaDiv_By_Zero:
108 $LaResult_Is_Zero:
109diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S
110index b0e6cad..3632fad 100644
111--- a/libgcc/config/microblaze/modsi3.S
112+++ b/libgcc/config/microblaze/modsi3.S
113@@ -62,40 +62,72 @@ __modsi3:
114 swi r31,r1,12
115 #endif
116
117+#ifdef __arch64__
118+ BEAEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
119+ BEAEQI r5,$LaResult_Is_Zero # Result is Zero
120+ BEAGEId r5,$LaR5_Pos
121+#else
122 BEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
123 BEQI r5,$LaResult_Is_Zero # Result is Zero
124 BGEId r5,$LaR5_Pos
125+#endif
126 ADD r28,r5,r0 # Get the sign of the result [ Depends only on the first arg]
127 RSUBI r5,r5,0 # Make r5 positive
128 $LaR5_Pos:
129- BGEI r6,$LaR6_Pos
130+#ifdef __arch64__
131+ BEAGEI r6,$LaR6_Pos
132+#else
133+ BGEI r6,$LaR6_Pos
134+#endif
135 RSUBI r6,r6,0 # Make r6 positive
136 $LaR6_Pos:
137 ADDIK r3,r0,0 # Clear mod
138 ADDIK r30,r0,0 # clear div
139- BLTId r5,$LaDIV2 # If r5 is still negative (0x80000000), skip
140+#ifdef __arch64__
141+ BEALTId r5,$LaDIV2 # If r5 is still negative (0x80000000), skip
142 # the first bit search.
143+#else
144+ BLTId r5,$LaDIV2 # If r5 is still negative (0x80000000), skip
145+ # the first bit search.
146+#endif
147 ADDIK r29,r0,32 # Initialize the loop count
148 # First part try to find the first '1' in the r5
149 $LaDIV1:
150 ADD r5,r5,r5 # left shift logical r5
151- BGEID r5,$LaDIV1 #
152+#ifdef __arch64__
153+ BEAGEID r5,$LaDIV1 #
154+#else
155+ BGEID r5,$LaDIV1 #
156+#endif
157 ADDIK r29,r29,-1
158 $LaDIV2:
159 ADD r5,r5,r5 # left shift logical r5 get the '1' into the Carry
160 ADDC r3,r3,r3 # Move that bit into the Mod register
161 rSUB r31,r6,r3 # Try to subtract (r30 a r6)
162+#ifdef __arch64__
163+ BEALTi r31,$LaMOD_TOO_SMALL
164+#else
165 BLTi r31,$LaMOD_TOO_SMALL
166+#endif
167 OR r3,r0,r31 # Move the r31 to mod since the result was positive
168 ADDIK r30,r30,1
169 $LaMOD_TOO_SMALL:
170 ADDIK r29,r29,-1
171+#ifdef __arch64__
172+ BEAEQi r29,$LaLOOP_END
173+ ADD r30,r30,r30 # Shift in the '1' into div
174+ BREAI $LaDIV2 # Div2
175+$LaLOOP_END:
176+ BEAGEI r28,$LaRETURN_HERE
177+ BREAId $LaRETURN_HERE
178+#else
179 BEQi r29,$LaLOOP_END
180 ADD r30,r30,r30 # Shift in the '1' into div
181 BRI $LaDIV2 # Div2
182 $LaLOOP_END:
183 BGEI r28,$LaRETURN_HERE
184 BRId $LaRETURN_HERE
185+#endif
186 rsubi r3,r3,0 # Negate the result
187 $LaDiv_By_Zero:
188 $LaResult_Is_Zero:
189@@ -108,7 +140,7 @@ $LaRETURN_HERE:
190 lli r29,r1,8
191 lli r30,r1,16
192 lli r31,r1,24
193- addik r1,r1,32
194+ addlik r1,r1,32
195 rtsd r15,8
196 nop
197 #else
198diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S
199index e28c69a..991dbcd 100644
200--- a/libgcc/config/microblaze/mulsi3.S
201+++ b/libgcc/config/microblaze/mulsi3.S
202@@ -43,7 +43,37 @@
203 .type __mulsi3,@function
204 #ifdef __arch64__
205 .align 3
206-#endif
207+__mulsi3:
208+ .frame r1,0,r15
209+ add r3,r0,r0
210+ BEAEQI r5,$L_Result_Is_Zero # Multiply by Zero
211+ BEAEQI r6,$L_Result_Is_Zero # Multiply by Zero
212+ BEAGEId r5,$L_R5_Pos
213+ XOR r4,r5,r6 # Get the sign of the result
214+ RSUBI r5,r5,0 # Make r5 positive
215+$L_R5_Pos:
216+ BEAGEI r6,$L_R6_Pos
217+ RSUBI r6,r6,0 # Make r6 positive
218+$L_R6_Pos:
219+ breai $L1
220+$L2:
221+ add r5,r5,r5
222+$L1:
223+ srl r6,r6
224+ addc r7,r0,r0
225+ beaeqi r7,$L2
226+ beaneid r6,$L2
227+ add r3,r3,r5
228+ bealti r4,$L_NegateResult
229+ rtsd r15,8
230+ nop
231+$L_NegateResult:
232+ rtsd r15,8
233+ rsub r3,r3,r0
234+$L_Result_Is_Zero:
235+ rtsd r15,8
236+ addi r3,r0,0
237+#else
238 __mulsi3:
239 .frame r1,0,r15
240 add r3,r0,r0
241@@ -74,5 +104,6 @@ $L_NegateResult:
242 $L_Result_Is_Zero:
243 rtsd r15,8
244 addi r3,r0,0
245+#endif
246 .end __mulsi3
247 .size __mulsi3, . - __mulsi3
248diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S
249index b1e44b6..42b086e 100644
250--- a/libgcc/config/microblaze/udivsi3.S
251+++ b/libgcc/config/microblaze/udivsi3.S
252@@ -59,52 +59,96 @@ __udivsi3:
253 SWI r30,r1,4
254 SWI r31,r1,8
255 #endif
256+#ifdef __arch64__
257+ BEAEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
258+ BEAEQID r5,$LaResult_Is_Zero # Result is Zero
259+#else
260 BEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
261 BEQID r5,$LaResult_Is_Zero # Result is Zero
262+#endif
263 ADDIK r30,r0,0 # Clear mod
264 ADDIK r29,r0,32 # Initialize the loop count
265
266 # Check if r6 and r5 are equal # if yes, return 1
267 RSUB r18,r5,r6
268+#ifdef __arch64__
269+ BEAEQID r18,$LaRETURN_HERE
270+#else
271 BEQID r18,$LaRETURN_HERE
272+#endif
273 ADDIK r3,r0,1
274
275 # Check if (uns)r6 is greater than (uns)r5. In that case, just return 0
276 XOR r18,r5,r6
277- BGEID r18,16
278+#ifdef __arch64__
279+ BEAGEID r18,16
280+#else
281+ BGEID r18,16
282+#endif
283 ADD r3,r0,r0 # We would anyways clear r3
284+#ifdef __arch64__
285+ BEALTI r6,$LaRETURN_HERE # r6[bit 31 = 1] hence is greater
286+ BREAI $LCheckr6
287+ RSUB r18,r6,r5 # MICROBLAZEcmp
288+ BEALTI r18,$LaRETURN_HERE
289+#else
290 BLTI r6,$LaRETURN_HERE # r6[bit 31 = 1] hence is greater
291 BRI $LCheckr6
292 RSUB r18,r6,r5 # MICROBLAZEcmp
293 BLTI r18,$LaRETURN_HERE
294-
295+#endif
296 # If r6 [bit 31] is set, then return result as 1
297 $LCheckr6:
298- BGTI r6,$LaDIV0
299- BRID $LaRETURN_HERE
300+#ifdef __arch64__
301+ BEAGTI r6,$LaDIV0
302+ BREAID $LaRETURN_HERE
303+#else
304+ BGTI r6,$LaDIV0
305+ BRID $LaRETURN_HERE
306+#endif
307 ADDIK r3,r0,1
308
309 # First part try to find the first '1' in the r5
310 $LaDIV0:
311+#ifdef __arch64__
312+ BEALTI r5,$LaDIV2
313+#else
314 BLTI r5,$LaDIV2
315+#endif
316 $LaDIV1:
317 ADD r5,r5,r5 # left shift logical r5
318+#ifdef __arch64__
319+ BEAGTID r5,$LaDIV1
320+#else
321 BGTID r5,$LaDIV1
322+#endif
323 ADDIK r29,r29,-1
324 $LaDIV2:
325 ADD r5,r5,r5 # left shift logical r5 get the '1' into the Carry
326 ADDC r30,r30,r30 # Move that bit into the Mod register
327 RSUB r31,r6,r30 # Try to subtract (r30 a r6)
328+#ifdef __arch64__
329+ BEALTI r31,$LaMOD_TOO_SMALL
330+#else
331 BLTI r31,$LaMOD_TOO_SMALL
332+#endif
333 OR r30,r0,r31 # Move the r31 to mod since the result was positive
334 ADDIK r3,r3,1
335 $LaMOD_TOO_SMALL:
336 ADDIK r29,r29,-1
337+#ifdef __arch64__
338+ BEAEQi r29,$LaLOOP_END
339+ ADD r3,r3,r3 # Shift in the '1' into div
340+ BREAI $LaDIV2 # Div2
341+$LaLOOP_END:
342+ BREAI $LaRETURN_HERE
343+#else
344 BEQi r29,$LaLOOP_END
345 ADD r3,r3,r3 # Shift in the '1' into div
346 BRI $LaDIV2 # Div2
347 $LaLOOP_END:
348 BRI $LaRETURN_HERE
349+#endif
350 $LaDiv_By_Zero:
351 $LaResult_Is_Zero:
352 OR r3,r0,r0 # set result to 0
353@@ -115,7 +159,7 @@ $LaRETURN_HERE:
354 LLI r29,r1,0
355 LLI r30,r1,8
356 LLI r31,r1,16
357- ADDIK r1,r1,24
358+ ADDLIK r1,r1,24
359 RTSD r15,8
360 NOP
361 #else
362diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S
363index 1b3070e..91430a6 100644
364--- a/libgcc/config/microblaze/umodsi3.S
365+++ b/libgcc/config/microblaze/umodsi3.S
366@@ -46,7 +46,7 @@
367 __umodsi3:
368 .frame r1,0,r15
369
370- addik r1,r1,-24
371+ addlik r1,r1,-24
372 sli r29,r1,0
373 sli r30,r1,8
374 sli r31,r1,16
375@@ -59,27 +59,77 @@ __umodsi3:
376 swi r30,r1,4
377 swi r31,r1,8
378 #endif
379+#ifdef __arch64__
380+ BEAEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
381+ BEAEQId r5,$LaResult_Is_Zero # Result is Zero
382+#else
383 BEQI r6,$LaDiv_By_Zero # Div_by_Zero # Division Error
384 BEQId r5,$LaResult_Is_Zero # Result is Zero
385+#endif
386 ADDIK r3,r0,0 # Clear div
387 ADDIK r30,r0,0 # clear mod
388 ADDIK r29,r0,32 # Initialize the loop count
389
390 # Check if r6 and r5 are equal # if yes, return 0
391 rsub r18,r5,r6
392- beqi r18,$LaRETURN_HERE
393
394+#ifdef __arch64__
395+ beaeqi r18,$LaRETURN_HERE
396+#else
397+ beqi r18,$LaRETURN_HERE
398+#endif
399 # Check if (uns)r6 is greater than (uns)r5. In that case, just return r5
400 xor r18,r5,r6
401+#ifdef __arch64__
402+ beageid r18,16
403+ addik r3,r5,0
404+ bealti r6,$LaRETURN_HERE
405+ breai $LCheckr6
406+ rsub r18,r5,r6 # MICROBLAZEcmp
407+ beagti r18,$LaRETURN_HERE
408+#else
409 bgeid r18,16
410 addik r3,r5,0
411 blti r6,$LaRETURN_HERE
412 bri $LCheckr6
413 rsub r18,r5,r6 # MICROBLAZEcmp
414 bgti r18,$LaRETURN_HERE
415-
416+#endif
417 # If r6 [bit 31] is set, then return result as r5-r6
418 $LCheckr6:
419+#ifdef __arch64__
420+ beagtid r6,$LaDIV0
421+ addik r3,r0,0
422+ addik r18,r0,0x7fffffff
423+ and r5,r5,r18
424+ and r6,r6,r18
425+ breaid $LaRETURN_HERE
426+ rsub r3,r6,r5
427+# First part: try to find the first '1' in the r5
428+$LaDIV0:
429+ BEALTI r5,$LaDIV2
430+$LaDIV1:
431+ ADD r5,r5,r5 # left shift logical r5
432+ BEAGEID r5,$LaDIV1 #
433+ ADDIK r29,r29,-1
434+$LaDIV2:
435+ ADD r5,r5,r5 # left shift logical r5 get the '1' into the Carry
436+ ADDC r3,r3,r3 # Move that bit into the Mod register
437+ rSUB r31,r6,r3 # Try to subtract (r3 a r6)
438+ BEALTi r31,$LaMOD_TOO_SMALL
439+ OR r3,r0,r31 # Move the r31 to mod since the result was positive
440+ ADDIK r30,r30,1
441+$LaMOD_TOO_SMALL:
442+ ADDIK r29,r29,-1
443+ BEAEQi r29,$LaLOOP_END
444+ ADD r30,r30,r30 # Shift in the '1' into div
445+ BREAI $LaDIV2 # Div2
446+$LaLOOP_END:
447+ BREAI $LaRETURN_HERE
448+$LaDiv_By_Zero:
449+$LaResult_Is_Zero:
450+ or r3,r0,r0 # set result to 0
451+#else
452 bgtid r6,$LaDIV0
453 addik r3,r0,0
454 addik r18,r0,0x7fffffff
455@@ -111,7 +161,7 @@ $LaLOOP_END:
456 $LaDiv_By_Zero:
457 $LaResult_Is_Zero:
458 or r3,r0,r0 # set result to 0
459-
460+#endif
461 #ifdef __arch64__
462 $LaRETURN_HERE:
463 # Restore values of CSRs and that of r3 and the divisor and the dividend
464--
4652.7.4
466
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch
deleted file mode 100644
index be4dfad5..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0059-Reverting-the-patch-as-kernel-boot-is-not-working-wi.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 2f22090a7e8216f7a9f7e958b77ac83006a7ce89 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 16 Apr 2019 17:20:24 +0530
4Subject: [PATCH 59/61] Reverting the patch as kernel boot is not working with
5 this patch CR-1026413 Revert "[Patch,Microblaze]:reverting the cost check
6 before propagating constants."
7
8This reverts commit 7156e379a67fa47a5fb9ede1448c0d528dbda65b.
9---
10 gcc/cprop.c | 4 ----
11 1 file changed, 4 deletions(-)
12
13diff --git a/gcc/cprop.c b/gcc/cprop.c
14index deb706b..e4df509 100644
15--- a/gcc/cprop.c
16+++ b/gcc/cprop.c
17@@ -733,7 +733,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
18 int success = 0;
19 rtx set = single_set (insn);
20
21-#if 0
22 bool check_rtx_costs = true;
23 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
24 int old_cost = set ? set_rtx_cost (set, speed) : 0;
25@@ -745,7 +744,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
26 && (GET_CODE (XEXP (note, 0)) == CONST
27 || CONSTANT_P (XEXP (note, 0)))))
28 check_rtx_costs = false;
29-#endif
30
31 /* Usually we substitute easy stuff, so we won't copy everything.
32 We however need to take care to not duplicate non-trivial CONST
33@@ -754,7 +752,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
34
35 validate_replace_src_group (from, to, insn);
36
37-#if 0
38 /* If TO is a constant, check the cost of the set after propagation
39 to the cost of the set before the propagation. If the cost is
40 higher, then do not replace FROM with TO. */
41@@ -767,7 +764,6 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
42 return false;
43 }
44
45-#endif
46
47 if (num_changes_pending () && apply_change_group ())
48 success = 1;
49--
502.7.4
51
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Author-Nagaraju-nmekala-xilinx.com.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Author-Nagaraju-nmekala-xilinx.com.patch
deleted file mode 100644
index 690bc727..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0061-Author-Nagaraju-nmekala-xilinx.com.patch
+++ /dev/null
@@ -1,479 +0,0 @@
1From e1b8cfe6c0b4a0bd90ecbd3e85ae7114df21b6cc Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com>
3Date: Thu, 18 Apr 2019 16:00:37 +0530
4Subject: [PATCH 61/62] Author: Nagaraju <nmekala@xilinx.com> Date: Wed Apr
5 17 14:11:00 2019 +0530
6
7 [Patch, microblaze]: MB-64 removal of barrel-shift instructions from default
8 By default MB-64 is generatting barrel-shift instructions. It has been
9 removed from default. Barrel-shift instructions will be generated only if
10 barrel-shifter is enabled. Similarly to double instructions as well.
11
12 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
13---
14 gcc/config/microblaze/microblaze.c | 2 +-
15 gcc/config/microblaze/microblaze.md | 269 +++++++++++++++++++++++++++++++++---
16 2 files changed, 252 insertions(+), 19 deletions(-)
17
18diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
19index 33d183e..c321b03 100644
20--- a/gcc/config/microblaze/microblaze.c
21+++ b/gcc/config/microblaze/microblaze.c
22@@ -3868,7 +3868,7 @@ microblaze_expand_divide (rtx operands[])
23 emit_insn (gen_rtx_CLOBBER (Pmode, reg18));
24
25 if (TARGET_MB_64) {
26- emit_insn (gen_ashldi3_long (regt1, operands[1], GEN_INT(4)));
27+ emit_insn (gen_ashldi3 (regt1, operands[1], GEN_INT(4)));
28 emit_insn (gen_adddi3 (regt1, regt1, operands[2]));
29 }
30 else {
31diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
32index 8bd175f..b5b60fb 100644
33--- a/gcc/config/microblaze/microblaze.md
34+++ b/gcc/config/microblaze/microblaze.md
35@@ -545,7 +545,7 @@
36 [(set (match_operand:DF 0 "register_operand" "=d")
37 (plus:DF (match_operand:DF 1 "register_operand" "d")
38 (match_operand:DF 2 "register_operand" "d")))]
39- "TARGET_MB_64"
40+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
41 "dadd\t%0,%1,%2"
42 [(set_attr "type" "fadd")
43 (set_attr "mode" "DF")
44@@ -555,7 +555,7 @@
45 [(set (match_operand:DF 0 "register_operand" "=d")
46 (minus:DF (match_operand:DF 1 "register_operand" "d")
47 (match_operand:DF 2 "register_operand" "d")))]
48- "TARGET_MB_64"
49+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
50 "drsub\t%0,%2,%1"
51 [(set_attr "type" "frsub")
52 (set_attr "mode" "DF")
53@@ -565,7 +565,7 @@
54 [(set (match_operand:DF 0 "register_operand" "=d")
55 (mult:DF (match_operand:DF 1 "register_operand" "d")
56 (match_operand:DF 2 "register_operand" "d")))]
57- "TARGET_MB_64"
58+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
59 "dmul\t%0,%1,%2"
60 [(set_attr "type" "fmul")
61 (set_attr "mode" "DF")
62@@ -575,7 +575,7 @@
63 [(set (match_operand:DF 0 "register_operand" "=d")
64 (div:DF (match_operand:DF 1 "register_operand" "d")
65 (match_operand:DF 2 "register_operand" "d")))]
66- "TARGET_MB_64"
67+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
68 "ddiv\t%0,%2,%1"
69 [(set_attr "type" "fdiv")
70 (set_attr "mode" "DF")
71@@ -585,7 +585,7 @@
72 (define_insn "sqrtdf2"
73 [(set (match_operand:DF 0 "register_operand" "=d")
74 (sqrt:DF (match_operand:DF 1 "register_operand" "d")))]
75- "TARGET_MB_64"
76+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
77 "dsqrt\t%0,%1"
78 [(set_attr "type" "fsqrt")
79 (set_attr "mode" "DF")
80@@ -594,7 +594,7 @@
81 (define_insn "floatdidf2"
82 [(set (match_operand:DF 0 "register_operand" "=d")
83 (float:DF (match_operand:DI 1 "register_operand" "d")))]
84- "TARGET_MB_64"
85+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
86 "dbl\t%0,%1"
87 [(set_attr "type" "fcvt")
88 (set_attr "mode" "DF")
89@@ -603,7 +603,7 @@
90 (define_insn "fix_truncdfdi2"
91 [(set (match_operand:DI 0 "register_operand" "=d")
92 (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "d"))))]
93- "TARGET_MB_64"
94+ "TARGET_MB_64 && TARGET_HARD_FLOAT && TARGET_FLOAT_CONVERT"
95 "dlong\t%0,%1"
96 [(set_attr "type" "fcvt")
97 (set_attr "mode" "DI")
98@@ -1299,6 +1299,34 @@
99 (set_attr "mode" "DI")
100 (set_attr "length" "4")])
101
102+(define_insn "*movdi_internal2_bshift"
103+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d, d,d,R,m")
104+ (match_operand:DI 1 "move_src_operand" " d,I,Mnis,R,m,dJ,dJ"))]
105+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
106+ {
107+ switch (which_alternative)
108+ {
109+ case 0:
110+ return "addlk\t%0,%1,r0";
111+ case 1:
112+ case 2:
113+ if (GET_CODE (operands[1]) == CONST_INT &&
114+ (INTVAL (operands[1]) > (long long)549755813887 || INTVAL (operands[1]) < (long long)-549755813888))
115+ return "addlik\t%0,r0,%h1\n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%j1 #li => la";
116+ else
117+ return "addlik\t%0,r0,%1";
118+ case 3:
119+ case 4:
120+ return "ll%i1\t%0,%1";
121+ case 5:
122+ case 6:
123+ return "sl%i0\t%z1,%0";
124+ }
125+ }
126+ [(set_attr "type" "load,no_delay_load,no_delay_load,no_delay_load,no_delay_load,no_delay_store,no_delay_store")
127+ (set_attr "mode" "DI")
128+ (set_attr "length" "4,4,12,4,8,4,8")])
129+
130 (define_insn "*movdi_internal2"
131 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d, d,d,R,m")
132 (match_operand:DI 1 "move_src_operand" " d,I,Mnis,R,m,dJ,dJ"))]
133@@ -1312,7 +1340,15 @@
134 case 2:
135 if (GET_CODE (operands[1]) == CONST_INT &&
136 (INTVAL (operands[1]) > (long long)549755813887 || INTVAL (operands[1]) < (long long)-549755813888))
137- return "addlik\t%0,r0,%h1\n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%j1 #li => la";
138+ {
139+ operands[2] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
140+ output_asm_insn ("addlik\t%0,r0,%h1", operands);
141+ output_asm_insn ("addlik\t%2,r0,32", operands);
142+ output_asm_insn ("addlik\t%2,%2,-1", operands);
143+ output_asm_insn ("beaneid\t%2,.-8", operands);
144+ output_asm_insn ("addlk\t%0,%0,%0", operands);
145+ return "addlik\t%0,%0,%j1 #li => la";
146+ }
147 else
148 return "addlik\t%0,r0,%1";
149 case 3:
150@@ -1386,7 +1422,7 @@
151 (define_insn "movdi_long_int"
152 [(set (match_operand:DI 0 "nonimmediate_operand" "=d")
153 (match_operand:DI 1 "general_operand" "i"))]
154- "TARGET_MB_64"
155+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
156 "addlik\t%0,r0,%h1\n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%j1 #li => la";
157 [(set_attr "type" "no_delay_arith")
158 (set_attr "mode" "DI")
159@@ -1653,6 +1689,33 @@
160 ;; movdf_internal
161 ;; Applies to both TARGET_SOFT_FLOAT and TARGET_HARD_FLOAT
162 ;;
163+(define_insn "*movdf_internal_64_bshift"
164+ [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,d,d,m")
165+ (match_operand:DF 1 "general_operand" "d,dG,m,F,T,d"))]
166+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
167+ {
168+ switch (which_alternative)
169+ {
170+ case 0:
171+ return "addlk\t%0,%1,r0";
172+ case 1:
173+ return "addlk\t%0,r0,r0";
174+ case 2:
175+ case 4:
176+ return "ll%i1\t%0,%1";
177+ case 3:
178+ {
179+ return "addlik\t%0,r0,%j1 \n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%h1 #Xfer Lo";
180+ }
181+ case 5:
182+ return "sl%i0\t%1,%0";
183+ }
184+ gcc_unreachable ();
185+ }
186+ [(set_attr "type" "no_delay_move,no_delay_move,no_delay_load,no_delay_load,no_delay_load,no_delay_store")
187+ (set_attr "mode" "DF")
188+ (set_attr "length" "4,4,4,16,4,4")])
189+
190 (define_insn "*movdf_internal_64"
191 [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,d,d,m")
192 (match_operand:DF 1 "general_operand" "d,dG,m,F,T,d"))]
193@@ -1669,7 +1732,13 @@
194 return "ll%i1\t%0,%1";
195 case 3:
196 {
197- return "addlik\t%0,r0,%j1 \n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%h1 #Xfer Lo";
198+ operands[2] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
199+ output_asm_insn ("addlik\t%0,r0,%h1", operands);
200+ output_asm_insn ("addlik\t%2,r0,32", operands);
201+ output_asm_insn ("addlik\t%2,%2,-1", operands);
202+ output_asm_insn ("beaneid\t%2,.-8", operands);
203+ output_asm_insn ("addlk\t%0,%0,%0", operands);
204+ return "addlik\t%0,%0,%j1 #li => la";
205 }
206 case 5:
207 return "sl%i0\t%1,%0";
208@@ -1789,11 +1858,21 @@
209 "TARGET_MB_64"
210 {
211 ;;if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
212-if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
213+if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && TARGET_BARREL_SHIFT)
214 {
215 emit_insn(gen_ashldi3_long (operands[0], operands[1],operands[2]));
216 DONE;
217 }
218+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && CONST_INT_P (operands[2]))
219+ {
220+ emit_insn(gen_ashldi3_const (operands[0], operands[1],operands[2]));
221+ DONE;
222+ }
223+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && GET_CODE (operands[2]) == REG)
224+ {
225+ emit_insn(gen_ashldi3_reg (operands[0], operands[1],operands[2]));
226+ DONE;
227+ }
228 else
229 FAIL;
230 }
231@@ -1803,7 +1882,7 @@ else
232 [(set (match_operand:DI 0 "register_operand" "=d,d")
233 (ashift:DI (match_operand:DI 1 "register_operand" "d,d")
234 (match_operand:DI 2 "arith_operand" "I,d")))]
235- "TARGET_MB_64"
236+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
237 "@
238 bsllli\t%0,%1,%2
239 bslll\t%0,%1,%2"
240@@ -1811,6 +1890,51 @@ else
241 (set_attr "mode" "DI,DI")
242 (set_attr "length" "4,4")]
243 )
244+
245+(define_insn "ashldi3_const"
246+ [(set (match_operand:DI 0 "register_operand" "=&d")
247+ (ashift:DI (match_operand:DI 1 "register_operand" "d")
248+ (match_operand:DI 2 "immediate_operand" "I")))]
249+ "TARGET_MB_64"
250+ {
251+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
252+
253+ output_asm_insn ("orli\t%3,r0,%2", operands);
254+ if (REGNO (operands[0]) != REGNO (operands[1]))
255+ output_asm_insn ("addlk\t%0,%1,r0", operands);
256+
257+ output_asm_insn ("addlik\t%3,%3,-1", operands);
258+ output_asm_insn ("beaneid\t%3,.-8", operands);
259+ return "addlk\t%0,%0,%0";
260+ }
261+ [(set_attr "type" "multi")
262+ (set_attr "mode" "DI")
263+ (set_attr "length" "20")]
264+)
265+
266+(define_insn "ashldi3_reg"
267+ [(set (match_operand:DI 0 "register_operand" "=&d")
268+ (ashift:DI (match_operand:DI 1 "register_operand" "d")
269+ (match_operand:DI 2 "register_operand" "d")))]
270+ "TARGET_MB_64"
271+ {
272+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
273+ output_asm_insn ("andli\t%3,%2,31", operands);
274+ if (REGNO (operands[0]) != REGNO (operands[1]))
275+ output_asm_insn ("addlk\t%0,r0,%1", operands);
276+ /* Exit the loop if zero shift. */
277+ output_asm_insn ("beaeqid\t%3,.+24", operands);
278+ /* Emit the loop. */
279+ output_asm_insn ("addlk\t%0,%0,r0", operands);
280+ output_asm_insn ("addlik\t%3,%3,-1", operands);
281+ output_asm_insn ("beaneid\t%3,.-8", operands);
282+ return "addlk\t%0,%0,%0";
283+ }
284+ [(set_attr "type" "multi")
285+ (set_attr "mode" "DI")
286+ (set_attr "length" "28")]
287+)
288+
289 ;; The following patterns apply when there is no barrel shifter present
290
291 (define_insn "*ashlsi3_with_mul_delay"
292@@ -1944,11 +2068,21 @@ else
293 "TARGET_MB_64"
294 {
295 ;;if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
296-if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
297+if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && TARGET_BARREL_SHIFT)
298 {
299 emit_insn(gen_ashrdi3_long (operands[0], operands[1],operands[2]));
300 DONE;
301 }
302+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && CONST_INT_P (operands[2]))
303+ {
304+ emit_insn(gen_ashrdi3_const (operands[0], operands[1],operands[2]));
305+ DONE;
306+ }
307+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && GET_CODE (operands[2]) == REG)
308+ {
309+ emit_insn(gen_ashrdi3_reg (operands[0], operands[1],operands[2]));
310+ DONE;
311+ }
312 else
313 FAIL;
314 }
315@@ -1958,7 +2092,7 @@ else
316 [(set (match_operand:DI 0 "register_operand" "=d,d")
317 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d,d")
318 (match_operand:DI 2 "arith_operand" "I,d")))]
319- "TARGET_MB_64"
320+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
321 "@
322 bslrai\t%0,%1,%2
323 bslra\t%0,%1,%2"
324@@ -1966,6 +2100,51 @@ else
325 (set_attr "mode" "DI,DI")
326 (set_attr "length" "4,4")]
327 )
328+
329+(define_insn "ashrdi3_const"
330+ [(set (match_operand:DI 0 "register_operand" "=&d")
331+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
332+ (match_operand:DI 2 "immediate_operand" "I")))]
333+ "TARGET_MB_64"
334+ {
335+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
336+
337+ output_asm_insn ("orli\t%3,r0,%2", operands);
338+ if (REGNO (operands[0]) != REGNO (operands[1]))
339+ output_asm_insn ("addlk\t%0,%1,r0", operands);
340+
341+ output_asm_insn ("addlik\t%3,%3,-1", operands);
342+ output_asm_insn ("beaneid\t%3,.-8", operands);
343+ return "srla\t%0,%0";
344+ }
345+ [(set_attr "type" "arith")
346+ (set_attr "mode" "DI")
347+ (set_attr "length" "20")]
348+)
349+
350+(define_insn "ashrdi3_reg"
351+ [(set (match_operand:DI 0 "register_operand" "=&d")
352+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
353+ (match_operand:DI 2 "register_operand" "d")))]
354+ "TARGET_MB_64"
355+ {
356+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
357+ output_asm_insn ("andli\t%3,%2,31", operands);
358+ if (REGNO (operands[0]) != REGNO (operands[1]))
359+ output_asm_insn ("addlk\t%0,r0,%1", operands);
360+ /* Exit the loop if zero shift. */
361+ output_asm_insn ("beaeqid\t%3,.+24", operands);
362+ /* Emit the loop. */
363+ output_asm_insn ("addlk\t%0,%0,r0", operands);
364+ output_asm_insn ("addlik\t%3,%3,-1", operands);
365+ output_asm_insn ("beaneid\t%3,.-8", operands);
366+ return "srla\t%0,%0";
367+ }
368+ [(set_attr "type" "multi")
369+ (set_attr "mode" "DI")
370+ (set_attr "length" "28")]
371+)
372+
373 (define_expand "ashrsi3"
374 [(set (match_operand:SI 0 "register_operand" "=&d")
375 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
376@@ -2083,11 +2262,21 @@ else
377 "TARGET_MB_64"
378 {
379 ;;if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
380-if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65)
381+if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && TARGET_BARREL_SHIFT)
382 {
383 emit_insn(gen_lshrdi3_long (operands[0], operands[1],operands[2]));
384 DONE;
385 }
386+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && CONST_INT_P (operands[2]))
387+ {
388+ emit_insn(gen_lshrdi3_const (operands[0], operands[1],operands[2]));
389+ DONE;
390+ }
391+else if(INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 65 && GET_CODE (operands[2]) == REG)
392+ {
393+ emit_insn(gen_lshrdi3_reg (operands[0], operands[1],operands[2]));
394+ DONE;
395+ }
396 else
397 FAIL;
398 }
399@@ -2097,7 +2286,7 @@ else
400 [(set (match_operand:DI 0 "register_operand" "=d,d")
401 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d,d")
402 (match_operand:DI 2 "arith_operand" "I,d")))]
403- "TARGET_MB_64"
404+ "TARGET_MB_64 && TARGET_BARREL_SHIFT"
405 "@
406 bslrli\t%0,%1,%2
407 bslrl\t%0,%1,%2"
408@@ -2106,6 +2295,50 @@ else
409 (set_attr "length" "4,4")]
410 )
411
412+(define_insn "lshrdi3_const"
413+ [(set (match_operand:DI 0 "register_operand" "=&d")
414+ (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
415+ (match_operand:DI 2 "immediate_operand" "I")))]
416+ "TARGET_MB_64"
417+ {
418+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
419+
420+ output_asm_insn ("orli\t%3,r0,%2", operands);
421+ if (REGNO (operands[0]) != REGNO (operands[1]))
422+ output_asm_insn ("addlk\t%0,%1,r0", operands);
423+
424+ output_asm_insn ("addlik\t%3,%3,-1", operands);
425+ output_asm_insn ("beaneid\t%3,.-8", operands);
426+ return "srll\t%0,%0";
427+ }
428+ [(set_attr "type" "multi")
429+ (set_attr "mode" "DI")
430+ (set_attr "length" "20")]
431+)
432+
433+(define_insn "lshrdi3_reg"
434+ [(set (match_operand:DI 0 "register_operand" "=&d")
435+ (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
436+ (match_operand:DI 2 "register_operand" "d")))]
437+ "TARGET_MB_64"
438+ {
439+ operands[3] = gen_rtx_REG (DImode, MB_ABI_ASM_TEMP_REGNUM);
440+ output_asm_insn ("andli\t%3,%2,31", operands);
441+ if (REGNO (operands[0]) != REGNO (operands[1]))
442+ output_asm_insn ("addlk\t%0,r0,%1", operands);
443+ /* Exit the loop if zero shift. */
444+ output_asm_insn ("beaeqid\t%3,.+24", operands);
445+ /* Emit the loop. */
446+ output_asm_insn ("addlk\t%0,%0,r0", operands);
447+ output_asm_insn ("addlik\t%3,%3,-1", operands);
448+ output_asm_insn ("beaneid\t%3,.-8", operands);
449+ return "srll\t%0,%0";
450+ }
451+ [(set_attr "type" "multi")
452+ (set_attr "mode" "SI")
453+ (set_attr "length" "28")]
454+)
455+
456 (define_expand "lshrsi3"
457 [(set (match_operand:SI 0 "register_operand" "=&d")
458 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
459@@ -2233,7 +2466,7 @@ else
460 (eq:DI
461 (match_operand:DI 1 "register_operand" "d")
462 (match_operand:DI 2 "register_operand" "d")))]
463- "TARGET_MB_64"
464+ "TARGET_MB_64 && TARGET_PATTERN_COMPARE"
465 "pcmpleq\t%0,%1,%2"
466 [(set_attr "type" "arith")
467 (set_attr "mode" "DI")
468@@ -2245,7 +2478,7 @@ else
469 (ne:DI
470 (match_operand:DI 1 "register_operand" "d")
471 (match_operand:DI 2 "register_operand" "d")))]
472- "TARGET_MB_64"
473+ "TARGET_MB_64 && TARGET_PATTERN_COMPARE"
474 "pcmplne\t%0,%1,%2"
475 [(set_attr "type" "arith")
476 (set_attr "mode" "DI")
477--
4782.7.4
479
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
deleted file mode 100644
index e7dfa89c..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0062-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 612e6579116e6714417ea21e6c13b0968bb6aac2 Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com>
3Date: Wed, 8 May 2019 14:12:03 +0530
4Subject: [PATCH 62/62] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and
5 disable fivopts by default
6
7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default.
8
9 * gcc/common/config/microblaze/microblaze-common.c
10 (microblaze_option_optimization_table): Disable fivopts by default.
11
12Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com>
13---
14 gcc/common/config/microblaze/microblaze-common.c | 6 ++++--
15 1 file changed, 4 insertions(+), 2 deletions(-)
16
17diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c
18index fe45f2e..2873d4b 100644
19--- a/gcc/common/config/microblaze/microblaze-common.c
20+++ b/gcc/common/config/microblaze/microblaze-common.c
21@@ -27,13 +27,15 @@
22 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
23 static const struct default_options microblaze_option_optimization_table[] =
24 {
25- /* Turn off ivopts by default. It messes up cse. */
26+ /* Turn off ivopts by default. It messes up cse.
27+ { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, */
28 { OPT_LEVELS_ALL, OPT_fivopts, NULL, 0 },
29- { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
30 { OPT_LEVELS_NONE, 0, NULL, 0 }
31 };
32
33 #undef TARGET_DEFAULT_TARGET_FLAGS
34 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
35
36+#undef TARGET_OPTION_OPTIMIZATION_TABLE
37+#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
38 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
39--
402.7.4
41