summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@kernel.crashing.org>2022-07-25 21:50:29 -0500
committerMark Hatle <mark.hatle@kernel.crashing.org>2022-09-01 09:53:21 -0500
commit4f55e171396816ee995e47060fba59463f5ddccd (patch)
tree6cc38644fe8e08718c686f1a935e912a24afbb5d
parentd018b3b86a7933f8ae03e47548db2c39e2c4a25a (diff)
downloadmeta-xilinx-4f55e171396816ee995e47060fba59463f5ddccd.tar.gz
gcc: Update patches for Langdale gcc
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch15
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch20
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch2
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0021-Patch-microblaze-Correct-the-const-high-double-immed.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has.patch67
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch105
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch247
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0029-re-arrangement-of-the-compare-branches.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Fixed-issues-like.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Fixed-below-issues.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Author-Nagaraju-nmekala-xilinx.com.patch8
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch10
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch12
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch44
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch8
21 files changed, 297 insertions, 331 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
index a1896298..a1ba1188 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
@@ -11,14 +11,14 @@ Subject: [PATCH 10/53] [Patch, microblaze]: Fix the Microblaze crash with
11 11
12Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> 12Signed-off-by:Nagaraju Mekala <nmekala@xilix.com>
13--- 13---
14 gcc/config/microblaze/microblaze.c | 3 +-- 14 gcc/config/microblaze/microblaze.cc | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-) 15 1 file changed, 1 insertion(+), 2 deletions(-)
16 16
17diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 17Index: gcc-12.1.0/gcc/config/microblaze/microblaze.cc
18index b444db17719..45405fa2160 100644 18===================================================================
19--- a/gcc/config/microblaze/microblaze.c 19--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.cc
20+++ b/gcc/config/microblaze/microblaze.c 20+++ gcc-12.1.0/gcc/config/microblaze/microblaze.cc
21@@ -3709,8 +3709,7 @@ microblaze_expand_divide (rtx operands[]) 21@@ -3710,8 +3710,7 @@ microblaze_expand_divide (rtx operands[]
22 mem_rtx = gen_rtx_MEM (QImode, 22 mem_rtx = gen_rtx_MEM (QImode,
23 gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); 23 gen_rtx_PLUS (Pmode, regt1, div_table_rtx));
24 24
@@ -28,6 +28,3 @@ index b444db17719..45405fa2160 100644
28 jump = emit_jump_insn_after (gen_jump (div_end_label), insn); 28 jump = emit_jump_insn_after (gen_jump (div_end_label), insn);
29 JUMP_LABEL (jump) = div_end_label; 29 JUMP_LABEL (jump) = div_end_label;
30 LABEL_NUSES (div_end_label) = 1; 30 LABEL_NUSES (div_end_label) = 1;
31--
322.17.1
33
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch
index 0891750a..64cb1e88 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch
@@ -14,15 +14,14 @@ Conflicts:
14 2 files changed, 1 insertion(+), 123 deletions(-) 14 2 files changed, 1 insertion(+), 123 deletions(-)
15 delete mode 100644 libgcc/config/microblaze/moddi3.S 15 delete mode 100644 libgcc/config/microblaze/moddi3.S
16 16
17diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S 17Index: gcc-12.1.0/libgcc/config/microblaze/moddi3.S
18deleted file mode 100644 18===================================================================
19index 4bac960107e..00000000000 19--- gcc-12.1.0.orig/libgcc/config/microblaze/moddi3.S
20--- a/libgcc/config/microblaze/moddi3.S
21+++ /dev/null 20+++ /dev/null
22@@ -1,121 +0,0 @@ 21@@ -1,121 +0,0 @@
23-################################### 22-###################################
24-# 23-#
25-# Copyright (C) 2009-2021 Free Software Foundation, Inc. 24-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
26-# 25-#
27-# Contributed by Michael Eager <eager@eagercon.com>. 26-# Contributed by Michael Eager <eager@eagercon.com>.
28-# 27-#
@@ -141,10 +140,10 @@ index 4bac960107e..00000000000
141- addik r1,r1,24 140- addik r1,r1,24
142- .end __moddi3 141- .end __moddi3
143- 142-
144diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze 143Index: gcc-12.1.0/libgcc/config/microblaze/t-microblaze
145index 96959f0292b..8d954a49575 100644 144===================================================================
146--- a/libgcc/config/microblaze/t-microblaze 145--- gcc-12.1.0.orig/libgcc/config/microblaze/t-microblaze
147+++ b/libgcc/config/microblaze/t-microblaze 146+++ gcc-12.1.0/libgcc/config/microblaze/t-microblaze
148@@ -1,8 +1,7 @@ 147@@ -1,8 +1,7 @@
149-LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _moddi3 _mulsi3 _udivsi3 _umodsi3 148-LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _moddi3 _mulsi3 _udivsi3 _umodsi3
150+LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3 149+LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3
@@ -155,6 +154,3 @@ index 96959f0292b..8d954a49575 100644
155 $(srcdir)/config/microblaze/modsi3.S \ 154 $(srcdir)/config/microblaze/modsi3.S \
156 $(srcdir)/config/microblaze/muldi3_hard.S \ 155 $(srcdir)/config/microblaze/muldi3_hard.S \
157 $(srcdir)/config/microblaze/mulsi3.S \ 156 $(srcdir)/config/microblaze/mulsi3.S \
158--
1592.17.1
160
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support.patch
index cbee1692..abb8fcba 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support.patch
@@ -15,20 +15,20 @@ Changelog
15 15
162013-11-26 Nagaraju Mekala <nagaraju.mekala@xilinx.com> 162013-11-26 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
17 17
18 * gcc/config/microblaze/microblaze.c: Add microblaze_asm_constructor, 18 * gcc/config/microblaze/microblaze.cc: Add microblaze_asm_constructor,
19 microblaze_asm_destructor. Define TARGET_ASM_CONSTRUCTOR and 19 microblaze_asm_destructor. Define TARGET_ASM_CONSTRUCTOR and
20 TARGET_ASM_DESTRUCTOR. 20 TARGET_ASM_DESTRUCTOR.
21 21
22Signed-off-by:nagaraju <nmekala@xilix.com> 22Signed-off-by:nagaraju <nmekala@xilix.com>
23Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> 23Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
24--- 24---
25 gcc/config/microblaze/microblaze.c | 53 ++++++++++++++++++++++++++++++ 25 gcc/config/microblaze/microblaze.cc | 53 ++++++++++++++++++++++++++++++
26 1 file changed, 53 insertions(+) 26 1 file changed, 53 insertions(+)
27 27
28diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 28diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
29index 45405fa2160..62630aab64e 100644 29index 45405fa2160..62630aab64e 100644
30--- a/gcc/config/microblaze/microblaze.c 30--- a/gcc/config/microblaze/microblaze.cc
31+++ b/gcc/config/microblaze/microblaze.c 31+++ b/gcc/config/microblaze/microblaze.cc
32@@ -2634,6 +2634,53 @@ print_operand_address (FILE * file, rtx addr) 32@@ -2634,6 +2634,53 @@ print_operand_address (FILE * file, rtx addr)
33 } 33 }
34 } 34 }
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch
index 3ee98b39..2f974977 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch
@@ -14,7 +14,7 @@ ChangeLog:
14 Ajit Agarwal <ajitkum@xilinx.com> 14 Ajit Agarwal <ajitkum@xilinx.com>
15 15
16 *microblaze.md (cbranchsi4_reg): New 16 *microblaze.md (cbranchsi4_reg): New
17 *microblaze.c (microblaze_expand_conditional_branch_reg): New 17 *microblaze.cc (microblaze_expand_conditional_branch_reg): New
18 18
19Conflicts: 19Conflicts:
20 20
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
index b67d8424..b4182f5e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch
@@ -18,18 +18,18 @@ ChangeLog:
18 ashlsi3_with_mul_delay, 18 ashlsi3_with_mul_delay,
19 movsf_internal): 19 movsf_internal):
20 Updated the patterns to use gen_int_mode function 20 Updated the patterns to use gen_int_mode function
21 *microblaze.c (print_operand): 21 *microblaze.cc (print_operand):
22 updated the 'F' case to use "unsinged int" instead 22 updated the 'F' case to use "unsinged int" instead
23 of HOST_WIDE_INT_PRINT_HEX 23 of HOST_WIDE_INT_PRINT_HEX
24--- 24---
25 gcc/config/microblaze/microblaze.c | 2 +- 25 gcc/config/microblaze/microblaze.cc | 2 +-
26 gcc/config/microblaze/microblaze.md | 10 ++++++++-- 26 gcc/config/microblaze/microblaze.md | 10 ++++++++--
27 2 files changed, 9 insertions(+), 3 deletions(-) 27 2 files changed, 9 insertions(+), 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.cc b/gcc/config/microblaze/microblaze.cc
30index 62630aab64e..16f3120e415 100644 30index 62630aab64e..16f3120e415 100644
31--- a/gcc/config/microblaze/microblaze.c 31--- a/gcc/config/microblaze/microblaze.cc
32+++ b/gcc/config/microblaze/microblaze.c 32+++ b/gcc/config/microblaze/microblaze.cc
33@@ -2468,7 +2468,7 @@ print_operand (FILE * file, rtx op, int letter) 33@@ -2468,7 +2468,7 @@ print_operand (FILE * file, rtx op, int letter)
34 unsigned long value_long; 34 unsigned long value_long;
35 REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), 35 REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op),
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
index 3e19f449..a2292e02 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch
@@ -8,16 +8,16 @@ pipeline reduces the latencies of float & integer division drastically
8 8
9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 9Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
10--- 10---
11 gcc/config/microblaze/microblaze.c | 11 ++++ 11 gcc/config/microblaze/microblaze.cc | 11 ++++
12 gcc/config/microblaze/microblaze.h | 3 +- 12 gcc/config/microblaze/microblaze.h | 3 +-
13 gcc/config/microblaze/microblaze.md | 79 +++++++++++++++++++++++++++- 13 gcc/config/microblaze/microblaze.md | 79 +++++++++++++++++++++++++++-
14 gcc/config/microblaze/microblaze.opt | 4 ++ 14 gcc/config/microblaze/microblaze.opt | 4 ++
15 4 files changed, 94 insertions(+), 3 deletions(-) 15 4 files changed, 94 insertions(+), 3 deletions(-)
16 16
17diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 17diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
18index 16f3120e415..c730faa9814 100644 18index 16f3120e415..c730faa9814 100644
19--- a/gcc/config/microblaze/microblaze.c 19--- a/gcc/config/microblaze/microblaze.cc
20+++ b/gcc/config/microblaze/microblaze.c 20+++ b/gcc/config/microblaze/microblaze.cc
21@@ -1840,6 +1840,17 @@ microblaze_option_override (void) 21@@ -1840,6 +1840,17 @@ microblaze_option_override (void)
22 "%<-mcpu=v8.30.a%>"); 22 "%<-mcpu=v8.30.a%>");
23 TARGET_REORDER = 0; 23 TARGET_REORDER = 0;
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-Patch-microblaze-Correct-the-const-high-double-immed.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-Patch-microblaze-Correct-the-const-high-double-immed.patch
index 4ef976b7..d4e43afc 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-Patch-microblaze-Correct-the-const-high-double-immed.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-Patch-microblaze-Correct-the-const-high-double-immed.patch
@@ -10,15 +10,15 @@ Subject: [PATCH 21/53] [Patch, microblaze]: Correct the const high double
10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 10Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 Ajit Agarwal <ajitkum@xilinx.com> 11 Ajit Agarwal <ajitkum@xilinx.com>
12--- 12---
13 gcc/config/microblaze/microblaze.c | 6 ++++-- 13 gcc/config/microblaze/microblaze.cc | 6 ++++--
14 gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ 14 gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++
15 2 files changed, 13 insertions(+), 2 deletions(-) 15 2 files changed, 13 insertions(+), 2 deletions(-)
16 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c 16 create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c
17 17
18diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 18diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
19index c730faa9814..3b1e992fa28 100644 19index c730faa9814..3b1e992fa28 100644
20--- a/gcc/config/microblaze/microblaze.c 20--- a/gcc/config/microblaze/microblaze.cc
21+++ b/gcc/config/microblaze/microblaze.c 21+++ b/gcc/config/microblaze/microblaze.cc
22@@ -2452,14 +2452,16 @@ print_operand (FILE * file, rtx op, int letter) 22@@ -2452,14 +2452,16 @@ print_operand (FILE * file, rtx op, int letter)
23 else if (letter == 'h' || letter == 'j') 23 else if (letter == 'h' || letter == 'j')
24 { 24 {
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
index 58c4a146..91208c24 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch
@@ -13,15 +13,15 @@ ChangeLog:
13 2016-02-23 Nagaraju Mekala <nmekala@xilix.com> 13 2016-02-23 Nagaraju Mekala <nmekala@xilix.com>
14 Ajit Agarwal <ajitkum@xilinx.com> 14 Ajit Agarwal <ajitkum@xilinx.com>
15 15
16 *microblaze.c (microblaze_expand_divide): Update 16 *microblaze.cc (microblaze_expand_divide): Update
17--- 17---
18 gcc/config/microblaze/microblaze.c | 2 +- 18 gcc/config/microblaze/microblaze.cc | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 21diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
22index 3b1e992fa28..94aaeaa3a67 100644 22index 3b1e992fa28..94aaeaa3a67 100644
23--- a/gcc/config/microblaze/microblaze.c 23--- a/gcc/config/microblaze/microblaze.cc
24+++ b/gcc/config/microblaze/microblaze.c 24+++ b/gcc/config/microblaze/microblaze.cc
25@@ -3767,7 +3767,7 @@ microblaze_expand_divide (rtx operands[]) 25@@ -3767,7 +3767,7 @@ microblaze_expand_divide (rtx operands[])
26 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); 26 emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4)));
27 emit_insn (gen_addsi3 (regt1, regt1, operands[2])); 27 emit_insn (gen_addsi3 (regt1, regt1, operands[2]));
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
index 62f8f5e5..cc50426e 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch
@@ -19,17 +19,17 @@ ChangeLog:
192016-03-01 Nagaraju Mekala <nmekala@xilix.com> 192016-03-01 Nagaraju Mekala <nmekala@xilix.com>
20 Ajit Agarwal <ajitkum@xilinx.com> 20 Ajit Agarwal <ajitkum@xilinx.com>
21 21
22 *config/microblaze/microblaze.c (print_operand): Remove the condition of checking 22 *config/microblaze/microblaze.cc (print_operand): Remove the condition of checking
23 high word = 0 & low word < 0. 23 high word = 0 & low word < 0.
24 *testsuite/gcc.target/microblaze/others/long.c: Add -O0 option. 24 *testsuite/gcc.target/microblaze/others/long.c: Add -O0 option.
25--- 25---
26 gcc/config/microblaze/microblaze.c | 3 --- 26 gcc/config/microblaze/microblaze.cc | 3 ---
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.cc b/gcc/config/microblaze/microblaze.cc
30index 94aaeaa3a67..84e17fc4520 100644 30index 94aaeaa3a67..84e17fc4520 100644
31--- a/gcc/config/microblaze/microblaze.c 31--- a/gcc/config/microblaze/microblaze.cc
32+++ b/gcc/config/microblaze/microblaze.c 32+++ b/gcc/config/microblaze/microblaze.cc
33@@ -2468,9 +2468,6 @@ print_operand (FILE * file, rtx op, int letter) 33@@ -2468,9 +2468,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;
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has.patch
index c5c9f416..52fde1e7 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has.patch
@@ -5,16 +5,16 @@ Subject: [PATCH 24/53] [Patch,MicroBlaze] : this patch has 1.Fixed the bug in
5 version calculation. 2.Add new bitfield instructions. 5 version calculation. 2.Add new bitfield instructions.
6 6
7--- 7---
8 gcc/config/microblaze/microblaze.c | 154 ++++++++++++++-------------- 8 gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++--------------
9 gcc/config/microblaze/microblaze.h | 2 + 9 gcc/config/microblaze/microblaze.h | 2 +
10 gcc/config/microblaze/microblaze.md | 69 +++++++++++++ 10 gcc/config/microblaze/microblaze.md | 69 +++++++++++++
11 3 files changed, 147 insertions(+), 78 deletions(-) 11 3 files changed, 147 insertions(+), 78 deletions(-)
12 12
13diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 13Index: gcc-12.1.0/gcc/config/microblaze/microblaze.cc
14index 84e17fc4520..9f94d015597 100644 14===================================================================
15--- a/gcc/config/microblaze/microblaze.c 15--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.cc
16+++ b/gcc/config/microblaze/microblaze.c 16+++ gcc-12.1.0/gcc/config/microblaze/microblaze.cc
17@@ -164,6 +164,9 @@ int microblaze_no_unsafe_delay; 17@@ -165,6 +165,9 @@ int microblaze_no_unsafe_delay;
18 /* Set to one if the targeted core has the CLZ insn. */ 18 /* Set to one if the targeted core has the CLZ insn. */
19 int microblaze_has_clz = 0; 19 int microblaze_has_clz = 0;
20 20
@@ -24,7 +24,7 @@ index 84e17fc4520..9f94d015597 100644
24 /* Which CPU pipeline do we use. We haven't really standardized on a CPU 24 /* Which CPU pipeline do we use. We haven't really standardized on a CPU
25 version having only a particular type of pipeline. There can still be 25 version having only a particular type of pipeline. There can still be
26 options on the CPU to scale pipeline features up or down. :( 26 options on the CPU to scale pipeline features up or down. :(
27@@ -239,6 +242,63 @@ section *sdata2_section; 27@@ -240,6 +243,63 @@ section *sdata2_section;
28 #define TARGET_HAVE_TLS true 28 #define TARGET_HAVE_TLS true
29 #endif 29 #endif
30 30
@@ -88,7 +88,7 @@ index 84e17fc4520..9f94d015597 100644
88 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ 88 /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */
89 static bool 89 static bool
90 microblaze_const_double_ok (rtx op, machine_mode mode) 90 microblaze_const_double_ok (rtx op, machine_mode mode)
91@@ -1338,8 +1398,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 91@@ -1339,8 +1399,7 @@ microblaze_rtx_costs (rtx x, machine_mod
92 { 92 {
93 if (TARGET_BARREL_SHIFT) 93 if (TARGET_BARREL_SHIFT)
94 { 94 {
@@ -98,7 +98,7 @@ index 84e17fc4520..9f94d015597 100644
98 *total = COSTS_N_INSNS (1); 98 *total = COSTS_N_INSNS (1);
99 else 99 else
100 *total = COSTS_N_INSNS (2); 100 *total = COSTS_N_INSNS (2);
101@@ -1400,8 +1459,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, 101@@ -1401,8 +1460,7 @@ microblaze_rtx_costs (rtx x, machine_mod
102 } 102 }
103 else if (!TARGET_SOFT_MUL) 103 else if (!TARGET_SOFT_MUL)
104 { 104 {
@@ -108,7 +108,7 @@ index 84e17fc4520..9f94d015597 100644
108 *total = COSTS_N_INSNS (1); 108 *total = COSTS_N_INSNS (1);
109 else 109 else
110 *total = COSTS_N_INSNS (3); 110 *total = COSTS_N_INSNS (3);
111@@ -1674,72 +1732,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v, 111@@ -1675,72 +1733,13 @@ function_arg_partial_bytes (cumulative_a
112 return 0; 112 return 0;
113 } 113 }
114 114
@@ -174,15 +174,15 @@ index 84e17fc4520..9f94d015597 100644
174 static void 174 static void
175 microblaze_option_override (void) 175 microblaze_option_override (void)
176 { 176 {
177 register int i, start; 177 int i, start;
178 register int regno; 178 int regno;
179 register machine_mode mode; 179 machine_mode mode;
180- int ver; 180- int ver;
181+ int ver,ver_int; 181+ int ver,ver_int;
182 182
183 microblaze_section_threshold = (global_options_set.x_g_switch_value 183 microblaze_section_threshold = (OPTION_SET_P (g_switch_value)
184 ? g_switch_value 184 ? g_switch_value
185@@ -1760,13 +1759,13 @@ microblaze_option_override (void) 185@@ -1761,13 +1760,13 @@ microblaze_option_override (void)
186 /* Check the MicroBlaze CPU version for any special action to be done. */ 186 /* Check the MicroBlaze CPU version for any special action to be done. */
187 if (microblaze_select_cpu == NULL) 187 if (microblaze_select_cpu == NULL)
188 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU; 188 microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU;
@@ -199,7 +199,7 @@ index 84e17fc4520..9f94d015597 100644
199 if (ver < 0) 199 if (ver < 0)
200 { 200 {
201 /* No hardware exceptions in earlier versions. So no worries. */ 201 /* No hardware exceptions in earlier versions. So no worries. */
202@@ -1777,8 +1776,7 @@ microblaze_option_override (void) 202@@ -1778,8 +1777,7 @@ microblaze_option_override (void)
203 microblaze_pipe = MICROBLAZE_PIPE_3; 203 microblaze_pipe = MICROBLAZE_PIPE_3;
204 } 204 }
205 else if (ver == 0 205 else if (ver == 0
@@ -209,7 +209,7 @@ index 84e17fc4520..9f94d015597 100644
209 { 209 {
210 #if 0 210 #if 0
211 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY); 211 microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY);
212@@ -1795,11 +1793,9 @@ microblaze_option_override (void) 212@@ -1796,11 +1794,9 @@ microblaze_option_override (void)
213 #endif 213 #endif
214 microblaze_no_unsafe_delay = 0; 214 microblaze_no_unsafe_delay = 0;
215 microblaze_pipe = MICROBLAZE_PIPE_5; 215 microblaze_pipe = MICROBLAZE_PIPE_5;
@@ -224,7 +224,7 @@ index 84e17fc4520..9f94d015597 100644
224 { 224 {
225 /* Pattern compares are to be turned on by default only when 225 /* Pattern compares are to be turned on by default only when
226 compiling for MB v5.00.'z'. */ 226 compiling for MB v5.00.'z'. */
227@@ -1807,7 +1803,7 @@ microblaze_option_override (void) 227@@ -1808,7 +1804,7 @@ microblaze_option_override (void)
228 } 228 }
229 } 229 }
230 230
@@ -233,7 +233,7 @@ index 84e17fc4520..9f94d015597 100644
233 if (ver < 0) 233 if (ver < 0)
234 { 234 {
235 if (TARGET_MULTIPLY_HIGH) 235 if (TARGET_MULTIPLY_HIGH)
236@@ -1816,7 +1812,7 @@ microblaze_option_override (void) 236@@ -1817,7 +1813,7 @@ microblaze_option_override (void)
237 "%<-mcpu=v6.00.a%> or greater"); 237 "%<-mcpu=v6.00.a%> or greater");
238 } 238 }
239 239
@@ -242,7 +242,7 @@ index 84e17fc4520..9f94d015597 100644
242 microblaze_has_clz = 1; 242 microblaze_has_clz = 1;
243 if (ver < 0) 243 if (ver < 0)
244 { 244 {
245@@ -1825,7 +1821,7 @@ microblaze_option_override (void) 245@@ -1826,7 +1822,7 @@ microblaze_option_override (void)
246 } 246 }
247 247
248 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ 248 /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */
@@ -251,7 +251,7 @@ index 84e17fc4520..9f94d015597 100644
251 if (ver < 0) 251 if (ver < 0)
252 { 252 {
253 if (TARGET_REORDER == 1) 253 if (TARGET_REORDER == 1)
254@@ -1840,7 +1836,7 @@ microblaze_option_override (void) 254@@ -1841,7 +1837,7 @@ microblaze_option_override (void)
255 "%<-mcpu=v8.30.a%>"); 255 "%<-mcpu=v8.30.a%>");
256 TARGET_REORDER = 0; 256 TARGET_REORDER = 0;
257 } 257 }
@@ -260,7 +260,7 @@ index 84e17fc4520..9f94d015597 100644
260 if (ver < 0) 260 if (ver < 0)
261 { 261 {
262 if (TARGET_AREA_OPTIMIZED_2) 262 if (TARGET_AREA_OPTIMIZED_2)
263@@ -1850,6 +1846,8 @@ microblaze_option_override (void) 263@@ -1851,6 +1847,8 @@ microblaze_option_override (void)
264 { 264 {
265 if (TARGET_AREA_OPTIMIZED_2) 265 if (TARGET_AREA_OPTIMIZED_2)
266 microblaze_pipe = MICROBLAZE_PIPE_8; 266 microblaze_pipe = MICROBLAZE_PIPE_8;
@@ -269,10 +269,10 @@ index 84e17fc4520..9f94d015597 100644
269 } 269 }
270 270
271 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) 271 if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL)
272diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 272Index: gcc-12.1.0/gcc/config/microblaze/microblaze.h
273index 21560ec1618..6aac8a6cc2a 100644 273===================================================================
274--- a/gcc/config/microblaze/microblaze.h 274--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.h
275+++ b/gcc/config/microblaze/microblaze.h 275+++ gcc-12.1.0/gcc/config/microblaze/microblaze.h
276@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[]; 276@@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[];
277 277
278 extern int microblaze_no_unsafe_delay; 278 extern int microblaze_no_unsafe_delay;
@@ -281,7 +281,7 @@ index 21560ec1618..6aac8a6cc2a 100644
281 extern enum pipeline_type microblaze_pipe; 281 extern enum pipeline_type microblaze_pipe;
282 282
283 #define OBJECT_FORMAT_ELF 283 #define OBJECT_FORMAT_ELF
284@@ -63,6 +64,7 @@ extern enum pipeline_type microblaze_pipe; 284@@ -63,6 +64,7 @@ extern enum pipeline_type microblaze_pip
285 /* Do we have CLZ? */ 285 /* Do we have CLZ? */
286 #define TARGET_HAS_CLZ (TARGET_PATTERN_COMPARE && microblaze_has_clz) 286 #define TARGET_HAS_CLZ (TARGET_PATTERN_COMPARE && microblaze_has_clz)
287 287
@@ -289,11 +289,11 @@ index 21560ec1618..6aac8a6cc2a 100644
289 /* The default is to support PIC. */ 289 /* The default is to support PIC. */
290 #define TARGET_SUPPORTS_PIC 1 290 #define TARGET_SUPPORTS_PIC 1
291 291
292diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 292Index: gcc-12.1.0/gcc/config/microblaze/microblaze.md
293index ce72acb9ee0..fc3326b2314 100644 293===================================================================
294--- a/gcc/config/microblaze/microblaze.md 294--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.md
295+++ b/gcc/config/microblaze/microblaze.md 295+++ gcc-12.1.0/gcc/config/microblaze/microblaze.md
296@@ -2489,4 +2489,73 @@ 296@@ -2491,4 +2491,73 @@
297 DONE; 297 DONE;
298 }") 298 }")
299 299
@@ -367,6 +367,3 @@ index ce72acb9ee0..fc3326b2314 100644
367+ (set_attr "length" "4")]) 367+ (set_attr "length" "4")])
368+ 368+
369 (include "sync.md") 369 (include "sync.md")
370--
3712.17.1
372
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch
index 140332aa..aa7a2b0a 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch
@@ -8,17 +8,17 @@ Conflicts:
8--- 8---
9 gcc/config/microblaze/constraints.md | 6 + 9 gcc/config/microblaze/constraints.md | 6 +
10 gcc/config/microblaze/microblaze-protos.h | 1 + 10 gcc/config/microblaze/microblaze-protos.h | 1 +
11 gcc/config/microblaze/microblaze.c | 109 +++++-- 11 gcc/config/microblaze/microblaze.cc | 109 +++++--
12 gcc/config/microblaze/microblaze.h | 4 +- 12 gcc/config/microblaze/microblaze.h | 4 +-
13 gcc/config/microblaze/microblaze.md | 352 +++++++++++++++++++++- 13 gcc/config/microblaze/microblaze.md | 352 +++++++++++++++++++++-
14 gcc/config/microblaze/microblaze.opt | 7 +- 14 gcc/config/microblaze/microblaze.opt | 7 +-
15 gcc/config/microblaze/t-microblaze | 7 +- 15 gcc/config/microblaze/t-microblaze | 7 +-
16 7 files changed, 456 insertions(+), 30 deletions(-) 16 7 files changed, 456 insertions(+), 30 deletions(-)
17 17
18diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md 18Index: gcc-12.1.0/gcc/config/microblaze/constraints.md
19index b4d7ee329b8..95b21d58f88 100644 19===================================================================
20--- a/gcc/config/microblaze/constraints.md 20--- gcc-12.1.0.orig/gcc/config/microblaze/constraints.md
21+++ b/gcc/config/microblaze/constraints.md 21+++ gcc-12.1.0/gcc/config/microblaze/constraints.md
22@@ -52,6 +52,12 @@ 22@@ -52,6 +52,12 @@
23 (and (match_code "const_int") 23 (and (match_code "const_int")
24 (match_test "ival > 0 && ival < 0x10000"))) 24 (match_test "ival > 0 && ival < 0x10000")))
@@ -32,11 +32,11 @@ index b4d7ee329b8..95b21d58f88 100644
32 ;; Define floating point constraints 32 ;; Define floating point constraints
33 33
34 (define_constraint "G" 34 (define_constraint "G"
35diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 35Index: gcc-12.1.0/gcc/config/microblaze/microblaze-protos.h
36index 3a5f439703c..302f6bbda2e 100644 36===================================================================
37--- a/gcc/config/microblaze/microblaze-protos.h 37--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze-protos.h
38+++ b/gcc/config/microblaze/microblaze-protos.h 38+++ gcc-12.1.0/gcc/config/microblaze/microblaze-protos.h
39@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *); 39@@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rt
40 extern void microblaze_expand_conditional_branch (enum machine_mode, rtx *); 40 extern void microblaze_expand_conditional_branch (enum machine_mode, rtx *);
41 extern void microblaze_expand_conditional_branch_reg (machine_mode, rtx *); 41 extern void microblaze_expand_conditional_branch_reg (machine_mode, rtx *);
42 extern void microblaze_expand_conditional_branch_sf (rtx *); 42 extern void microblaze_expand_conditional_branch_sf (rtx *);
@@ -44,11 +44,11 @@ index 3a5f439703c..302f6bbda2e 100644
44 extern int microblaze_can_use_return_insn (void); 44 extern int microblaze_can_use_return_insn (void);
45 extern void print_operand (FILE *, rtx, int); 45 extern void print_operand (FILE *, rtx, int);
46 extern void print_operand_address (FILE *, rtx); 46 extern void print_operand_address (FILE *, rtx);
47diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 47Index: gcc-12.1.0/gcc/config/microblaze/microblaze.cc
48index 9f94d015597..58d7397945e 100644 48===================================================================
49--- a/gcc/config/microblaze/microblaze.c 49--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.cc
50+++ b/gcc/config/microblaze/microblaze.c 50+++ gcc-12.1.0/gcc/config/microblaze/microblaze.cc
51@@ -3432,11 +3432,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 51@@ -3433,11 +3433,11 @@ microblaze_expand_move (machine_mode mod
52 op0 = operands[0]; 52 op0 = operands[0];
53 op1 = operands[1]; 53 op1 = operands[1];
54 54
@@ -63,7 +63,7 @@ index 9f94d015597..58d7397945e 100644
63 emit_move_insn (op0, temp); 63 emit_move_insn (op0, temp);
64 return true; 64 return true;
65 } 65 }
66@@ -3501,12 +3501,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) 66@@ -3502,12 +3502,12 @@ microblaze_expand_move (machine_mode mod
67 && (flag_pic == 2 || microblaze_tls_symbol_p (p0) 67 && (flag_pic == 2 || microblaze_tls_symbol_p (p0)
68 || !SMALL_INT (p1))))) 68 || !SMALL_INT (p1)))))
69 { 69 {
@@ -78,7 +78,7 @@ index 9f94d015597..58d7397945e 100644
78 return true; 78 return true;
79 } 79 }
80 } 80 }
81@@ -3637,7 +3637,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 81@@ -3638,7 +3638,7 @@ microblaze_expand_conditional_branch (ma
82 rtx cmp_op0 = operands[1]; 82 rtx cmp_op0 = operands[1];
83 rtx cmp_op1 = operands[2]; 83 rtx cmp_op1 = operands[2];
84 rtx label1 = operands[3]; 84 rtx label1 = operands[3];
@@ -87,7 +87,7 @@ index 9f94d015597..58d7397945e 100644
87 rtx condition; 87 rtx condition;
88 88
89 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); 89 gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG));
90@@ -3646,23 +3646,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 90@@ -3647,23 +3647,36 @@ microblaze_expand_conditional_branch (ma
91 if (cmp_op1 == const0_rtx) 91 if (cmp_op1 == const0_rtx)
92 { 92 {
93 comp_reg = cmp_op0; 93 comp_reg = cmp_op0;
@@ -130,7 +130,7 @@ index 9f94d015597..58d7397945e 100644
130 } 130 }
131 } 131 }
132 132
133@@ -3673,7 +3686,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 133@@ -3674,7 +3687,7 @@ microblaze_expand_conditional_branch_reg
134 rtx cmp_op0 = operands[1]; 134 rtx cmp_op0 = operands[1];
135 rtx cmp_op1 = operands[2]; 135 rtx cmp_op1 = operands[2];
136 rtx label1 = operands[3]; 136 rtx label1 = operands[3];
@@ -139,7 +139,7 @@ index 9f94d015597..58d7397945e 100644
139 rtx condition; 139 rtx condition;
140 140
141 gcc_assert ((GET_CODE (cmp_op0) == REG) 141 gcc_assert ((GET_CODE (cmp_op0) == REG)
142@@ -3684,30 +3697,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) 142@@ -3685,30 +3698,63 @@ microblaze_expand_conditional_branch_reg
143 { 143 {
144 comp_reg = cmp_op0; 144 comp_reg = cmp_op0;
145 condition = gen_rtx_fmt_ee (signed_condition (code), 145 condition = gen_rtx_fmt_ee (signed_condition (code),
@@ -215,7 +215,7 @@ index 9f94d015597..58d7397945e 100644
215 } 215 }
216 } 216 }
217 217
218@@ -3724,6 +3770,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 218@@ -3725,6 +3771,19 @@ microblaze_expand_conditional_branch_sf
219 emit_jump_insn (gen_condjump (condition, operands[3])); 219 emit_jump_insn (gen_condjump (condition, operands[3]));
220 } 220 }
221 221
@@ -235,11 +235,11 @@ index 9f94d015597..58d7397945e 100644
235 /* Implement TARGET_FRAME_POINTER_REQUIRED. */ 235 /* Implement TARGET_FRAME_POINTER_REQUIRED. */
236 236
237 static bool 237 static bool
238diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h 238Index: gcc-12.1.0/gcc/config/microblaze/microblaze.h
239index 6aac8a6cc2a..22fc3509319 100644 239===================================================================
240--- a/gcc/config/microblaze/microblaze.h 240--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.h
241+++ b/gcc/config/microblaze/microblaze.h 241+++ gcc-12.1.0/gcc/config/microblaze/microblaze.h
242@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe; 242@@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pip
243 #define ASM_SPEC "\ 243 #define ASM_SPEC "\
244 %(target_asm_spec) \ 244 %(target_asm_spec) \
245 %{mbig-endian:-EB} \ 245 %{mbig-endian:-EB} \
@@ -247,7 +247,7 @@ index 6aac8a6cc2a..22fc3509319 100644
247 %{mlittle-endian:-EL}" 247 %{mlittle-endian:-EL}"
248 248
249 /* Extra switches sometimes passed to the linker. */ 249 /* Extra switches sometimes passed to the linker. */
250@@ -110,6 +111,7 @@ extern enum pipeline_type microblaze_pipe; 250@@ -110,6 +111,7 @@ extern enum pipeline_type microblaze_pip
251 #define LINK_SPEC "%{shared:-shared} -N -relax \ 251 #define LINK_SPEC "%{shared:-shared} -N -relax \
252 %{mbig-endian:-EB --oformat=elf32-microblaze} \ 252 %{mbig-endian:-EB --oformat=elf32-microblaze} \
253 %{mlittle-endian:-EL --oformat=elf32-microblazeel} \ 253 %{mlittle-endian:-EL --oformat=elf32-microblazeel} \
@@ -255,7 +255,7 @@ index 6aac8a6cc2a..22fc3509319 100644
255 %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \ 255 %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
256 %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \ 256 %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
257 %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \ 257 %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
258@@ -217,7 +219,7 @@ extern enum pipeline_type microblaze_pipe; 258@@ -217,7 +219,7 @@ extern enum pipeline_type microblaze_pip
259 #define MIN_UNITS_PER_WORD 4 259 #define MIN_UNITS_PER_WORD 4
260 #define INT_TYPE_SIZE 32 260 #define INT_TYPE_SIZE 32
261 #define SHORT_TYPE_SIZE 16 261 #define SHORT_TYPE_SIZE 16
@@ -264,10 +264,10 @@ index 6aac8a6cc2a..22fc3509319 100644
264 #define LONG_LONG_TYPE_SIZE 64 264 #define LONG_LONG_TYPE_SIZE 64
265 #define FLOAT_TYPE_SIZE 32 265 #define FLOAT_TYPE_SIZE 32
266 #define DOUBLE_TYPE_SIZE 64 266 #define DOUBLE_TYPE_SIZE 64
267diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md 267Index: gcc-12.1.0/gcc/config/microblaze/microblaze.md
268index 9dd12d1011b..3834725eec1 100644 268===================================================================
269--- a/gcc/config/microblaze/microblaze.md 269--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.md
270+++ b/gcc/config/microblaze/microblaze.md 270+++ gcc-12.1.0/gcc/config/microblaze/microblaze.md
271@@ -497,7 +497,6 @@ 271@@ -497,7 +497,6 @@
272 (set_attr "mode" "SF") 272 (set_attr "mode" "SF")
273 (set_attr "length" "4")]) 273 (set_attr "length" "4")])
@@ -630,10 +630,13 @@ index 9dd12d1011b..3834725eec1 100644
630 ;;---------------------------------------------------------------- 630 ;;----------------------------------------------------------------
631 ;; Conditional branches 631 ;; Conditional branches
632 ;;---------------------------------------------------------------- 632 ;;----------------------------------------------------------------
633@@ -1927,6 +2168,115 @@ 633@@ -1924,6 +2165,115 @@
634 (set_attr "length" "12")] 634 }
635 ) 635 [(set_attr "type" "branch")
636 636 (set_attr "mode" "none")
637+ (set_attr "length" "12")]
638+)
639+
637+ 640+
638+(define_expand "cbranchdi4" 641+(define_expand "cbranchdi4"
639+ [(set (pc) 642+ [(set (pc)
@@ -740,16 +743,13 @@ index 9dd12d1011b..3834725eec1 100644
740+ } 743+ }
741+ [(set_attr "type" "branch") 744+ [(set_attr "type" "branch")
742+ (set_attr "mode" "none") 745+ (set_attr "mode" "none")
743+ (set_attr "length" "12")] 746 (set_attr "length" "12")]
744+) 747 )
745+ 748
746 ;;---------------------------------------------------------------- 749Index: gcc-12.1.0/gcc/config/microblaze/microblaze.opt
747 ;; Unconditional branches 750===================================================================
748 ;;---------------------------------------------------------------- 751--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.opt
749diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt 752+++ gcc-12.1.0/gcc/config/microblaze/microblaze.opt
750index 2a72566372b..206899c0384 100644
751--- a/gcc/config/microblaze/microblaze.opt
752+++ b/gcc/config/microblaze/microblaze.opt
753@@ -136,4 +136,9 @@ Target 753@@ -136,4 +136,9 @@ Target
754 754
755 mxl-frequency 755 mxl-frequency
@@ -761,10 +761,10 @@ index 2a72566372b..206899c0384 100644
761+Target Mask(MB_64) 761+Target Mask(MB_64)
762+MicroBlaze 64-bit mode. 762+MicroBlaze 64-bit mode.
763+ 763+
764diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 764Index: gcc-12.1.0/gcc/config/microblaze/t-microblaze
765index 41fa9a92081..e9a1921ae26 100644 765===================================================================
766--- a/gcc/config/microblaze/t-microblaze 766--- gcc-12.1.0.orig/gcc/config/microblaze/t-microblaze
767+++ b/gcc/config/microblaze/t-microblaze 767+++ gcc-12.1.0/gcc/config/microblaze/t-microblaze
768@@ -1,8 +1,11 @@ 768@@ -1,8 +1,11 @@
769-MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high mlittle-endian 769-MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high mlittle-endian
770-MULTILIB_DIRNAMES = bs m mh le 770-MULTILIB_DIRNAMES = bs m mh le
@@ -778,7 +778,4 @@ index 41fa9a92081..e9a1921ae26 100644
778+MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 778+MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
779 779
780 # Extra files 780 # Extra files
781 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ 781 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \
782--
7832.17.1
784
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch
index 9d38091e..fad1752f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch
@@ -6,8 +6,8 @@ Subject: [PATCH 28/53] Intial commit for 64bit-MB sources. Need to cleanup the
6 6
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.cc | 6 +
10 gcc/config/microblaze/microblaze.c | 218 ++++++--- 10 gcc/config/microblaze/microblaze.cc | 218 ++++++---
11 gcc/config/microblaze/microblaze.h | 63 ++- 11 gcc/config/microblaze/microblaze.h | 63 ++-
12 gcc/config/microblaze/microblaze.md | 605 ++++++++++++++++++------ 12 gcc/config/microblaze/microblaze.md | 605 ++++++++++++++++++------
13 gcc/config/microblaze/t-microblaze | 3 +- 13 gcc/config/microblaze/t-microblaze | 3 +-
@@ -28,10 +28,10 @@ Subject: [PATCH 28/53] Intial commit for 64bit-MB sources. Need to cleanup the
28 create mode 100644 libgcc/config/microblaze/udivdi3.S 28 create mode 100644 libgcc/config/microblaze/udivdi3.S
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 31Index: gcc-12.1.0/gcc/config/microblaze/constraints.md
32index 95b21d58f88..0a4d5269314 100644 32===================================================================
33--- a/gcc/config/microblaze/constraints.md 33--- gcc-12.1.0.orig/gcc/config/microblaze/constraints.md
34+++ b/gcc/config/microblaze/constraints.md 34+++ gcc-12.1.0/gcc/config/microblaze/constraints.md
35@@ -55,7 +55,7 @@ 35@@ -55,7 +55,7 @@
36 (define_constraint "K" 36 (define_constraint "K"
37 "A constant in the range 0xffffff8000000000L to 0x0000007fffffffffL (inclusive)." 37 "A constant in the range 0xffffff8000000000L to 0x0000007fffffffffL (inclusive)."
@@ -41,11 +41,11 @@ index 95b21d58f88..0a4d5269314 100644
41 41
42 42
43 ;; Define floating point constraints 43 ;; Define floating point constraints
44diff --git a/gcc/config/microblaze/microblaze-c.c b/gcc/config/microblaze/microblaze-c.c 44Index: gcc-12.1.0/gcc/config/microblaze/microblaze-c.cc
45index e0b29bcb0b0..2dcb879992c 100644 45===================================================================
46--- a/gcc/config/microblaze/microblaze-c.c 46--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze-c.cc
47+++ b/gcc/config/microblaze/microblaze-c.c 47+++ gcc-12.1.0/gcc/config/microblaze/microblaze-c.cc
48@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile) 48@@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile
49 builtin_define ("HAVE_HW_FPU_SQRT"); 49 builtin_define ("HAVE_HW_FPU_SQRT");
50 builtin_define ("__HAVE_HW_FPU_SQRT__"); 50 builtin_define ("__HAVE_HW_FPU_SQRT__");
51 } 51 }
@@ -56,11 +56,11 @@ index e0b29bcb0b0..2dcb879992c 100644
56+ builtin_define ("__MICROBLAZE64__"); 56+ builtin_define ("__MICROBLAZE64__");
57+ } 57+ }
58 } 58 }
59diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 59Index: gcc-12.1.0/gcc/config/microblaze/microblaze.cc
60index 58d7397945e..f59a71ac072 100644 60===================================================================
61--- a/gcc/config/microblaze/microblaze.c 61--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.cc
62+++ b/gcc/config/microblaze/microblaze.c 62+++ gcc-12.1.0/gcc/config/microblaze/microblaze.cc
63@@ -383,10 +383,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) 63@@ -384,10 +384,10 @@ simple_memory_operand (rtx op, machine_m
64 { 64 {
65 return 1; 65 return 1;
66 } 66 }
@@ -73,7 +73,7 @@ index 58d7397945e..f59a71ac072 100644
73 else 73 else
74 return 0; 74 return 0;
75 75
76@@ -434,7 +434,7 @@ double_memory_operand (rtx op, machine_mode mode) 76@@ -435,7 +435,7 @@ double_memory_operand (rtx op, machine_m
77 return 1; 77 return 1;
78 78
79 return memory_address_p ((GET_MODE_CLASS (mode) == MODE_INT 79 return memory_address_p ((GET_MODE_CLASS (mode) == MODE_INT
@@ -82,7 +82,7 @@ index 58d7397945e..f59a71ac072 100644
82 plus_constant (Pmode, addr, 4)); 82 plus_constant (Pmode, addr, 4));
83 } 83 }
84 84
85@@ -681,7 +681,7 @@ microblaze_legitimize_tls_address(rtx x, rtx reg) 85@@ -682,7 +682,7 @@ microblaze_legitimize_tls_address(rtx x,
86 /* Load the addend. */ 86 /* Load the addend. */
87 addend = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, x, GEN_INT (TLS_DTPREL)), 87 addend = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, x, GEN_INT (TLS_DTPREL)),
88 UNSPEC_TLS); 88 UNSPEC_TLS);
@@ -91,7 +91,7 @@ index 58d7397945e..f59a71ac072 100644
91 dest = gen_rtx_PLUS (Pmode, dest, addend); 91 dest = gen_rtx_PLUS (Pmode, dest, addend);
92 break; 92 break;
93 93
94@@ -699,7 +699,7 @@ microblaze_classify_unspec (struct microblaze_address_info *info, rtx x) 94@@ -700,7 +700,7 @@ microblaze_classify_unspec (struct micro
95 95
96 if (XINT (x, 1) == UNSPEC_GOTOFF) 96 if (XINT (x, 1) == UNSPEC_GOTOFF)
97 { 97 {
@@ -100,7 +100,7 @@ index 58d7397945e..f59a71ac072 100644
100 info->type = ADDRESS_GOTOFF; 100 info->type = ADDRESS_GOTOFF;
101 } 101 }
102 else if (XINT (x, 1) == UNSPEC_PLT) 102 else if (XINT (x, 1) == UNSPEC_PLT)
103@@ -1302,8 +1302,16 @@ microblaze_block_move_loop (rtx dest, rtx src, HOST_WIDE_INT length) 103@@ -1303,8 +1303,16 @@ microblaze_block_move_loop (rtx dest, rt
104 emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES)); 104 emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES));
105 105
106 /* Emit the test & branch. */ 106 /* Emit the test & branch. */
@@ -108,17 +108,17 @@ index 58d7397945e..f59a71ac072 100644
108+ 108+
109+ if (TARGET_MB_64) { 109+ if (TARGET_MB_64) {
110+ emit_insn (gen_cbranchdi4 (gen_rtx_NE (Pmode, src_reg, final_src), 110+ emit_insn (gen_cbranchdi4 (gen_rtx_NE (Pmode, src_reg, final_src),
111+ src_reg, final_src, label)); 111 src_reg, final_src, label));
112+ } 112+ }
113+ else { 113+ else {
114+ emit_insn (gen_cbranchsi4 (gen_rtx_NE (Pmode, src_reg, final_src), 114+ emit_insn (gen_cbranchsi4 (gen_rtx_NE (Pmode, src_reg, final_src),
115 src_reg, final_src, label)); 115+ src_reg, final_src, label));
116+ 116+
117+ } 117+ }
118 118
119 /* Mop up any left-over bytes. */ 119 /* Mop up any left-over bytes. */
120 if (leftover) 120 if (leftover)
121@@ -1633,14 +1641,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v, 121@@ -1634,14 +1642,20 @@ microblaze_function_arg_advance (cumulat
122 break; 122 break;
123 123
124 case E_DFmode: 124 case E_DFmode:
@@ -141,7 +141,7 @@ index 58d7397945e..f59a71ac072 100644
141 break; 141 break;
142 142
143 case E_QImode: 143 case E_QImode:
144@@ -2155,7 +2169,7 @@ compute_frame_size (HOST_WIDE_INT size) 144@@ -2156,7 +2170,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 58d7397945e..f59a71ac072 100644
150 150
151 mask |= (1L << (regno - GP_REG_FIRST)); 151 mask |= (1L << (regno - GP_REG_FIRST));
152 } 152 }
153@@ -2424,7 +2438,7 @@ print_operand (FILE * file, rtx op, int letter) 153@@ -2425,7 +2439,7 @@ print_operand (FILE * file, rtx op, int
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 58d7397945e..f59a71ac072 100644
159 159
160 fprintf (file, "%s", reg_names[regnum]); 160 fprintf (file, "%s", reg_names[regnum]);
161 } 161 }
162@@ -2450,6 +2464,7 @@ print_operand (FILE * file, rtx op, int letter) 162@@ -2451,6 +2465,7 @@ print_operand (FILE * file, rtx op, int
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 58d7397945e..f59a71ac072 100644
167 long l[2]; 167 long l[2];
168 if (code == CONST_DOUBLE) 168 if (code == CONST_DOUBLE)
169 { 169 {
170@@ -2462,12 +2477,12 @@ print_operand (FILE * file, rtx op, int letter) 170@@ -2463,12 +2478,12 @@ print_operand (FILE * file, rtx op, int
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 58d7397945e..f59a71ac072 100644
184 } 184 }
185 else if (code == CONST_DOUBLE) 185 else if (code == CONST_DOUBLE)
186 { 186 {
187@@ -2661,7 +2676,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority) 187@@ -2662,7 +2677,10 @@ microblaze_asm_constructor (rtx symbol A
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 58d7397945e..f59a71ac072 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@@ -2684,7 +2702,10 @@ microblaze_asm_destructor (rtx symbol, int priority) 199@@ -2685,7 +2703,10 @@ microblaze_asm_destructor (rtx symbol, i
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 58d7397945e..f59a71ac072 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@@ -2750,7 +2771,7 @@ save_restore_insns (int prologue) 211@@ -2751,7 +2772,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 58d7397945e..f59a71ac072 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@@ -2758,8 +2779,8 @@ save_restore_insns (int prologue) 220@@ -2759,8 +2780,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 58d7397945e..f59a71ac072 100644
228 } 228 }
229 229
230 if (microblaze_is_interrupt_variant () && !prologue) 230 if (microblaze_is_interrupt_variant () && !prologue)
231@@ -2767,8 +2788,8 @@ save_restore_insns (int prologue) 231@@ -2768,8 +2789,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 58d7397945e..f59a71ac072 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@@ -2779,9 +2800,9 @@ save_restore_insns (int prologue) 242@@ -2780,9 +2801,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 58d7397945e..f59a71ac072 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@@ -2796,7 +2817,7 @@ save_restore_insns (int prologue) 254@@ -2797,7 +2818,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 58d7397945e..f59a71ac072 100644
260 } 260 }
261 } 261 }
262 262
263@@ -2806,8 +2827,8 @@ save_restore_insns (int prologue) 263@@ -2807,8 +2828,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 58d7397945e..f59a71ac072 100644
271 } 271 }
272 272
273 /* Done saving and restoring */ 273 /* Done saving and restoring */
274@@ -2897,7 +2918,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) 274@@ -2898,7 +2919,10 @@ microblaze_elf_asm_cdtor (rtx symbol, in
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 58d7397945e..f59a71ac072 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@@ -3041,10 +3065,10 @@ microblaze_expand_prologue (void) 286@@ -3042,10 +3066,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 58d7397945e..f59a71ac072 100644
297 } 297 }
298 } 298 }
299 299
300@@ -3053,15 +3077,23 @@ microblaze_expand_prologue (void) 300@@ -3054,15 +3078,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;
@@ -306,11 +306,11 @@ index 58d7397945e..f59a71ac072 100644
306+ { 306+ {
307+ 307+
308+ insn = emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx, 308+ insn = emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx,
309 fsiz_rtx)); 309+ fsiz_rtx));
310+ } 310+ }
311+ else { 311+ else {
312+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, 312+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
313+ fsiz_rtx)); 313 fsiz_rtx));
314+ } 314+ }
315 if (insn) 315 if (insn)
316 RTX_FRAME_RELATED_P (insn) = 1; 316 RTX_FRAME_RELATED_P (insn) = 1;
@@ -323,7 +323,7 @@ index 58d7397945e..f59a71ac072 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@@ -3069,7 +3101,7 @@ microblaze_expand_prologue (void) 326@@ -3070,7 +3102,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 58d7397945e..f59a71ac072 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@@ -3179,12 +3211,12 @@ microblaze_expand_epilogue (void) 335@@ -3180,12 +3212,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 58d7397945e..f59a71ac072 100644
347 emit_move_insn (reg_rtx, mem_rtx); 347 emit_move_insn (reg_rtx, mem_rtx);
348 } 348 }
349 349
350@@ -3200,15 +3232,25 @@ microblaze_expand_epilogue (void) 350@@ -3201,15 +3233,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 58d7397945e..f59a71ac072 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@@ -3375,9 +3417,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 380@@ -3376,9 +3418,14 @@ microblaze_asm_output_mi_thunk (FILE *fi
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 58d7397945e..f59a71ac072 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@@ -3390,7 +3437,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 397@@ -3391,7 +3438,10 @@ microblaze_asm_output_mi_thunk (FILE *fi
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,16 +406,16 @@ index 58d7397945e..f59a71ac072 100644
406 } 406 }
407 407
408 /* Generate a tail call to the target function. */ 408 /* Generate a tail call to the target function. */
409@@ -3566,7 +3616,7 @@ microblaze_eh_return (rtx op0) 409@@ -3567,7 +3617,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.cc.
413- In that case, do nothing. */ 413- In that case, do nothing. */
414+ In that case, do nothing. */ 414+ In that case, do nothing. */
415 void 415 void
416 microblaze_asm_output_ident (const char *string) 416 microblaze_asm_output_ident (const char *string)
417 { 417 {
418@@ -3621,9 +3671,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) 418@@ -3622,9 +3672,9 @@ microblaze_trampoline_init (rtx m_tramp,
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 58d7397945e..f59a71ac072 100644
427 emit_move_insn (mem, fnaddr); 427 emit_move_insn (mem, fnaddr);
428 } 428 }
429 429
430@@ -3647,7 +3697,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 430@@ -3648,7 +3698,7 @@ microblaze_expand_conditional_branch (ma
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 58d7397945e..f59a71ac072 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@@ -3766,7 +3816,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) 439@@ -3767,7 +3817,7 @@ microblaze_expand_conditional_branch_sf
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 58d7397945e..f59a71ac072 100644
445 emit_jump_insn (gen_condjump (condition, operands[3])); 445 emit_jump_insn (gen_condjump (condition, operands[3]));
446 } 446 }
447 447
448@@ -3776,10 +3826,10 @@ microblaze_expand_conditional_branch_df (rtx operands[]) 448@@ -3777,10 +3827,10 @@ microblaze_expand_conditional_branch_df
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 58d7397945e..f59a71ac072 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@@ -3800,8 +3850,8 @@ microblaze_expand_divide (rtx operands[]) 461@@ -3801,8 +3851,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 58d7397945e..f59a71ac072 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@@ -3809,17 +3859,31 @@ microblaze_expand_divide (rtx operands[]) 472@@ -3810,17 +3860,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 58d7397945e..f59a71ac072 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@@ -3966,7 +4030,7 @@ insert_wic_for_ilb_runout (rtx_insn *first) 511@@ -3967,7 +4031,7 @@ insert_wic_for_ilb_runout (rtx_insn *fir
512 { 512 {
513 insn = 513 insn =
514 emit_insn_before (gen_iprefetch 514 emit_insn_before (gen_iprefetch
@@ -517,7 +517,7 @@ index 58d7397945e..f59a71ac072 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@@ -3976,7 +4040,27 @@ insert_wic_for_ilb_runout (rtx_insn *first) 520@@ -3977,7 +4041,27 @@ insert_wic_for_ilb_runout (rtx_insn *fir
521 } 521 }
522 } 522 }
523 } 523 }
@@ -546,7 +546,7 @@ index 58d7397945e..f59a71ac072 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@@ -4129,6 +4213,17 @@ microblaze_starting_frame_offset (void) 549@@ -4130,6 +4214,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 58d7397945e..f59a71ac072 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@@ -4138,6 +4233,9 @@ microblaze_starting_frame_offset (void) 567@@ -4139,6 +4234,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
@@ -574,11 +574,11 @@ index 58d7397945e..f59a71ac072 100644
574 #undef TARGET_PROMOTE_FUNCTION_MODE 574 #undef TARGET_PROMOTE_FUNCTION_MODE
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 577Index: gcc-12.1.0/gcc/config/microblaze/microblaze.h
578index 22fc3509319..94ac736221c 100644 578===================================================================
579--- a/gcc/config/microblaze/microblaze.h 579--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.h
580+++ b/gcc/config/microblaze/microblaze.h 580+++ gcc-12.1.0/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_pip
582 582
583 /* Generate DWARF exception handling info. */ 583 /* Generate DWARF exception handling info. */
584 #define DWARF2_UNWIND_INFO 1 584 #define DWARF2_UNWIND_INFO 1
@@ -586,7 +586,7 @@ index 22fc3509319..94ac736221c 100644
586 /* Don't generate .loc operations. */ 586 /* Don't generate .loc operations. */
587 #define DWARF2_ASM_LINE_DEBUG_INFO 0 587 #define DWARF2_ASM_LINE_DEBUG_INFO 0
588 588
589@@ -206,38 +205,51 @@ extern enum pipeline_type microblaze_pipe; 589@@ -206,38 +205,51 @@ extern enum pipeline_type microblaze_pip
590 ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) 590 ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
591 591
592 /* Use DWARF 2 debugging information by default. */ 592 /* Use DWARF 2 debugging information by default. */
@@ -649,7 +649,7 @@ index 22fc3509319..94ac736221c 100644
649 649
650 #define DATA_ALIGNMENT(TYPE, ALIGN) \ 650 #define DATA_ALIGNMENT(TYPE, ALIGN) \
651 ((((ALIGN) < BITS_PER_WORD) \ 651 ((((ALIGN) < BITS_PER_WORD) \
652@@ -253,12 +265,12 @@ extern enum pipeline_type microblaze_pipe; 652@@ -253,12 +265,12 @@ extern enum pipeline_type microblaze_pip
653 #define WORD_REGISTER_OPERATIONS 1 653 #define WORD_REGISTER_OPERATIONS 1
654 654
655 #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND 655 #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
@@ -666,7 +666,7 @@ index 22fc3509319..94ac736221c 100644
666 /* Standard register usage. */ 666 /* Standard register usage. */
667 667
668 /* On the MicroBlaze, we have 32 integer registers */ 668 /* On the MicroBlaze, we have 32 integer registers */
669@@ -438,13 +450,16 @@ extern struct microblaze_frame_info current_frame_info; 669@@ -438,13 +450,16 @@ extern struct microblaze_frame_info curr
670 #define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD) 670 #define FIRST_PARM_OFFSET(FNDECL) (UNITS_PER_WORD)
671 671
672 #define ARG_POINTER_CFA_OFFSET(FNDECL) 0 672 #define ARG_POINTER_CFA_OFFSET(FNDECL) 0
@@ -684,7 +684,7 @@ index 22fc3509319..94ac736221c 100644
684 #define NUM_OF_ARGS 6 684 #define NUM_OF_ARGS 6
685 685
686 #define GP_RETURN (GP_REG_FIRST + MB_ABI_INT_RETURN_VAL_REGNUM) 686 #define GP_RETURN (GP_REG_FIRST + MB_ABI_INT_RETURN_VAL_REGNUM)
687@@ -455,12 +470,15 @@ extern struct microblaze_frame_info current_frame_info; 687@@ -455,12 +470,15 @@ extern struct microblaze_frame_info curr
688 #define MAX_ARGS_IN_REGISTERS MB_ABI_MAX_ARG_REGS 688 #define MAX_ARGS_IN_REGISTERS MB_ABI_MAX_ARG_REGS
689 689
690 #define LIBCALL_VALUE(MODE) \ 690 #define LIBCALL_VALUE(MODE) \
@@ -743,10 +743,10 @@ index 22fc3509319..94ac736221c 100644
743 743
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 746Index: gcc-12.1.0/gcc/config/microblaze/microblaze.md
747index 3834725eec1..7bc91602ca2 100644 747===================================================================
748--- a/gcc/config/microblaze/microblaze.md 748--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.md
749+++ b/gcc/config/microblaze/microblaze.md 749+++ gcc-12.1.0/gcc/config/microblaze/microblaze.md
750@@ -26,6 +26,7 @@ 750@@ -26,6 +26,7 @@
751 ;; Constants 751 ;; Constants
752 ;;---------------------------------------------------- 752 ;;----------------------------------------------------
@@ -1069,11 +1069,11 @@ index 3834725eec1..7bc91602ca2 100644
1069- handle it just like microblaze_legitimize_address does. */ 1069- handle it just like microblaze_legitimize_address does. */
1070- if (flag_pic && pic_address_needs_scratch (operands[1])) 1070- if (flag_pic && pic_address_needs_scratch (operands[1]))
1071+ if (TARGET_MB_64) 1071+ if (TARGET_MB_64)
1072+ { 1072 {
1073+ if (microblaze_expand_move (DImode, operands)) DONE; 1073+ if (microblaze_expand_move (DImode, operands)) DONE;
1074+ } 1074+ }
1075+ else 1075+ else
1076 { 1076+ {
1077+ /* If operands[1] is a constant address illegal for pic, then we need to 1077+ /* If operands[1] is a constant address illegal for pic, then we need to
1078+ handle it just like microblaze_legitimize_address does. */ 1078+ handle it just like microblaze_legitimize_address does. */
1079+ if (flag_pic && pic_address_needs_scratch (operands[1])) 1079+ if (flag_pic && pic_address_needs_scratch (operands[1]))
@@ -1122,11 +1122,7 @@ index 3834725eec1..7bc91602ca2 100644
1122+ [(set_attr "type" "move") 1122+ [(set_attr "type" "move")
1123+ (set_attr "mode" "DI") 1123+ (set_attr "mode" "DI")
1124+ (set_attr "length" "12")]) 1124+ (set_attr "length" "12")])
1125 1125+
1126-(define_insn "*movdi_internal_64"
1127- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
1128- (match_operand:DI 1 "general_operand" " d,K,J,R,o,d,d"))]
1129- "TARGET_MB_64 && (INTVAL(operands[1]) < 0x7fffffffff) && (INTVAL(operands[1]) > 0xffffff8000000000)"
1130+;; This move will be not be moved to delay slot. 1126+;; This move will be not be moved to delay slot.
1131+(define_insn "*movdi_internal3" 1127+(define_insn "*movdi_internal3"
1132+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d") 1128+ [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d")
@@ -1141,7 +1137,11 @@ index 3834725eec1..7bc91602ca2 100644
1141+ [(set_attr "type" "arith,no_delay_arith,no_delay_arith") 1137+ [(set_attr "type" "arith,no_delay_arith,no_delay_arith")
1142+ (set_attr "mode" "DI") 1138+ (set_attr "mode" "DI")
1143+ (set_attr "length" "4")]) 1139+ (set_attr "length" "4")])
1144+ 1140
1141-(define_insn "*movdi_internal_64"
1142- [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
1143- (match_operand:DI 1 "general_operand" " d,K,J,R,o,d,d"))]
1144- "TARGET_MB_64 && (INTVAL(operands[1]) < 0x7fffffffff) && (INTVAL(operands[1]) > 0xffffff8000000000)"
1145+;; This move may be used for PLT label operand 1145+;; This move may be used for PLT label operand
1146+(define_insn "*movdi_internal5_pltop" 1146+(define_insn "*movdi_internal5_pltop"
1147+ [(set (match_operand:DI 0 "register_operand" "=d,d") 1147+ [(set (match_operand:DI 0 "register_operand" "=d,d")
@@ -1619,7 +1619,7 @@ index 3834725eec1..7bc91602ca2 100644
1619+ (use (reg R_GOT))] 1619+ (use (reg R_GOT))]
1620 "flag_pic" 1620 "flag_pic"
1621 { 1621 {
1622 register rtx target2 = gen_rtx_REG (Pmode, 1622 rtx target2
1623@@ -2591,10 +2829,41 @@ else 1623@@ -2591,10 +2829,41 @@ else
1624 (set_attr "mode" "none") 1624 (set_attr "mode" "none")
1625 (set_attr "length" "4")]) 1625 (set_attr "length" "4")])
@@ -1663,7 +1663,7 @@ index 3834725eec1..7bc91602ca2 100644
1663+ (clobber (reg R_SR))] 1663+ (clobber (reg R_SR))]
1664 "" 1664 ""
1665 { 1665 {
1666 register rtx target = operands[0]; 1666 rtx target = operands[0];
1667@@ -2628,7 +2897,7 @@ else 1667@@ -2628,7 +2897,7 @@ else
1668 [(parallel [(set (match_operand 0 "register_operand" "=d") 1668 [(parallel [(set (match_operand 0 "register_operand" "=d")
1669 (call (match_operand 1 "memory_operand" "m") 1669 (call (match_operand 1 "memory_operand" "m")
@@ -1739,8 +1739,8 @@ index 3834725eec1..7bc91602ca2 100644
1739+ (use (match_operand 4 "register_operand"))] 1739+ (use (match_operand 4 "register_operand"))]
1740 "flag_pic" 1740 "flag_pic"
1741 { 1741 {
1742 register rtx target2=gen_rtx_REG (Pmode,GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM); 1742 rtx target2
1743@@ -2700,11 +2986,46 @@ else 1743@@ -2701,11 +2987,46 @@ else
1744 (set_attr "mode" "none") 1744 (set_attr "mode" "none")
1745 (set_attr "length" "4")]) 1745 (set_attr "length" "4")])
1746 1746
@@ -1788,12 +1788,12 @@ index 3834725eec1..7bc91602ca2 100644
1788+ (clobber (match_operand 3 "register_operand" "=d"))] 1788+ (clobber (match_operand 3 "register_operand" "=d"))]
1789 "" 1789 ""
1790 { 1790 {
1791 register rtx target = operands[1]; 1791 rtx target = operands[1];
1792diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze 1792Index: gcc-12.1.0/gcc/config/microblaze/t-microblaze
1793index e9a1921ae26..9fc80b142ce 100644 1793===================================================================
1794--- a/gcc/config/microblaze/t-microblaze 1794--- gcc-12.1.0.orig/gcc/config/microblaze/t-microblaze
1795+++ b/gcc/config/microblaze/t-microblaze 1795+++ gcc-12.1.0/gcc/config/microblaze/t-microblaze
1796@@ -2,7 +2,8 @@ MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high mlittle-en 1796@@ -2,7 +2,8 @@ MULTILIB_OPTIONS = mxl-barrel-shift mno-
1797 MULTILIB_DIRNAMES = bs m mh le m64 1797 MULTILIB_DIRNAMES = bs m mh le m64
1798 MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high 1798 MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high
1799 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian 1799 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian
@@ -1803,10 +1803,10 @@ index e9a1921ae26..9fc80b142ce 100644
1803 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian 1803 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian
1804 MULTILIB_EXCEPTIONS += mxl-multiply-high/m64 1804 MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
1805 MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 1805 MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
1806diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S 1806Index: gcc-12.1.0/libgcc/config/microblaze/crti.S
1807index f9bafaf3aa5..bc69d890370 100644 1807===================================================================
1808--- a/libgcc/config/microblaze/crti.S 1808--- gcc-12.1.0.orig/libgcc/config/microblaze/crti.S
1809+++ b/libgcc/config/microblaze/crti.S 1809+++ gcc-12.1.0/libgcc/config/microblaze/crti.S
1810@@ -40,7 +40,7 @@ 1810@@ -40,7 +40,7 @@
1811 1811
1812 .align 2 1812 .align 2
@@ -1823,10 +1823,10 @@ index f9bafaf3aa5..bc69d890370 100644
1823- addik r1, r1, -8 1823- addik r1, r1, -8
1824+ addik r1, r1, -16 1824+ addik r1, r1, -16
1825 sw r15, r0, r1 1825 sw r15, r0, r1
1826diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S 1826Index: gcc-12.1.0/libgcc/config/microblaze/crtn.S
1827index 0260e432371..1a1f0a8e0f3 100644 1827===================================================================
1828--- a/libgcc/config/microblaze/crtn.S 1828--- gcc-12.1.0.orig/libgcc/config/microblaze/crtn.S
1829+++ b/libgcc/config/microblaze/crtn.S 1829+++ gcc-12.1.0/libgcc/config/microblaze/crtn.S
1830@@ -33,9 +33,9 @@ 1830@@ -33,9 +33,9 @@
1831 .section .init, "ax" 1831 .section .init, "ax"
1832 lw r15, r0, r1 1832 lw r15, r0, r1
@@ -1839,11 +1839,10 @@ index 0260e432371..1a1f0a8e0f3 100644
1839 rtsd r15, 8 1839 rtsd r15, 8
1840- addik r1, r1, 8 1840- addik r1, r1, 8
1841+ addik r1, r1, 16 1841+ addik r1, r1, 16
1842diff --git a/libgcc/config/microblaze/divdi3.S b/libgcc/config/microblaze/divdi3.S 1842Index: gcc-12.1.0/libgcc/config/microblaze/divdi3.S
1843new file mode 100644 1843===================================================================
1844index 00000000000..d37bf5165c6
1845--- /dev/null 1844--- /dev/null
1846+++ b/libgcc/config/microblaze/divdi3.S 1845+++ gcc-12.1.0/libgcc/config/microblaze/divdi3.S
1847@@ -0,0 +1,98 @@ 1846@@ -0,0 +1,98 @@
1848+###################################- 1847+###################################-
1849+# 1848+#
@@ -1943,11 +1942,10 @@ index 00000000000..d37bf5165c6
1943+.end __divdi3 1942+.end __divdi3
1944+ .size __divdi3, . - __divdi3 1943+ .size __divdi3, . - __divdi3
1945+#endif 1944+#endif
1946diff --git a/libgcc/config/microblaze/divdi3_table.c b/libgcc/config/microblaze/divdi3_table.c 1945Index: gcc-12.1.0/libgcc/config/microblaze/divdi3_table.c
1947new file mode 100644 1946===================================================================
1948index 00000000000..80962597ea5
1949--- /dev/null 1947--- /dev/null
1950+++ b/libgcc/config/microblaze/divdi3_table.c 1948+++ gcc-12.1.0/libgcc/config/microblaze/divdi3_table.c
1951@@ -0,0 +1,62 @@ 1949@@ -0,0 +1,62 @@
1952+/* Table for software lookup divide for Xilinx MicroBlaze. 1950+/* Table for software lookup divide for Xilinx MicroBlaze.
1953+ 1951+
@@ -2011,11 +2009,10 @@ index 00000000000..80962597ea5
2011+ 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15, 2009+ 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
2012+}; 2010+};
2013+ 2011+
2014diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S 2012Index: gcc-12.1.0/libgcc/config/microblaze/moddi3.S
2015new file mode 100644 2013===================================================================
2016index 00000000000..5d3f7c03fc8
2017--- /dev/null 2014--- /dev/null
2018+++ b/libgcc/config/microblaze/moddi3.S 2015+++ gcc-12.1.0/libgcc/config/microblaze/moddi3.S
2019@@ -0,0 +1,97 @@ 2016@@ -0,0 +1,97 @@
2020+################################### 2017+###################################
2021+# 2018+#
@@ -2114,11 +2111,10 @@ index 00000000000..5d3f7c03fc8
2114+ .end __moddi3 2111+ .end __moddi3
2115+ .size __moddi3, . - __moddi3 2112+ .size __moddi3, . - __moddi3
2116+#endif 2113+#endif
2117diff --git a/libgcc/config/microblaze/muldi3.S b/libgcc/config/microblaze/muldi3.S 2114Index: gcc-12.1.0/libgcc/config/microblaze/muldi3.S
2118new file mode 100644 2115===================================================================
2119index 00000000000..567784197d3
2120--- /dev/null 2116--- /dev/null
2121+++ b/libgcc/config/microblaze/muldi3.S 2117+++ gcc-12.1.0/libgcc/config/microblaze/muldi3.S
2122@@ -0,0 +1,73 @@ 2118@@ -0,0 +1,73 @@
2123+/*###################################-*-asm*- 2119+/*###################################-*-asm*-
2124+# 2120+#
@@ -2193,10 +2189,10 @@ index 00000000000..567784197d3
2193+ .end __muldi3 2189+ .end __muldi3
2194+ .size __muldi3, . - __muldi3 2190+ .size __muldi3, . - __muldi3
2195+#endif 2191+#endif
2196diff --git a/libgcc/config/microblaze/t-microblaze b/libgcc/config/microblaze/t-microblaze 2192Index: gcc-12.1.0/libgcc/config/microblaze/t-microblaze
2197index 8d954a49575..35021b24b7d 100644 2193===================================================================
2198--- a/libgcc/config/microblaze/t-microblaze 2194--- gcc-12.1.0.orig/libgcc/config/microblaze/t-microblaze
2199+++ b/libgcc/config/microblaze/t-microblaze 2195+++ gcc-12.1.0/libgcc/config/microblaze/t-microblaze
2200@@ -1,11 +1,16 @@ 2196@@ -1,11 +1,16 @@
2201-LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3 2197-LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3
2202+LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3 \ 2198+LIB2FUNCS_EXCLUDE += _divsi3 _modsi3 _mulsi3 _udivsi3 _umodsi3 \
@@ -2217,11 +2213,10 @@ index 8d954a49575..35021b24b7d 100644
2217- $(srcdir)/config/microblaze/divsi3_table.c 2213- $(srcdir)/config/microblaze/divsi3_table.c
2218+ $(srcdir)/config/microblaze/umoddi3.S \ 2214+ $(srcdir)/config/microblaze/umoddi3.S \
2219+ $(srcdir)/config/microblaze/divsi3_table.c \ 2215+ $(srcdir)/config/microblaze/divsi3_table.c \
2220diff --git a/libgcc/config/microblaze/udivdi3.S b/libgcc/config/microblaze/udivdi3.S 2216Index: gcc-12.1.0/libgcc/config/microblaze/udivdi3.S
2221new file mode 100644 2217===================================================================
2222index 00000000000..c210fbc7128
2223--- /dev/null 2218--- /dev/null
2224+++ b/libgcc/config/microblaze/udivdi3.S 2219+++ gcc-12.1.0/libgcc/config/microblaze/udivdi3.S
2225@@ -0,0 +1,107 @@ 2220@@ -0,0 +1,107 @@
2226+###################################- 2221+###################################-
2227+# 2222+#
@@ -2330,11 +2325,10 @@ index 00000000000..c210fbc7128
2330+ .end __udivdi3 2325+ .end __udivdi3
2331+ .size __udivdi3, . - __udivdi3 2326+ .size __udivdi3, . - __udivdi3
2332+#endif 2327+#endif
2333diff --git a/libgcc/config/microblaze/umoddi3.S b/libgcc/config/microblaze/umoddi3.S 2328Index: gcc-12.1.0/libgcc/config/microblaze/umoddi3.S
2334new file mode 100644 2329===================================================================
2335index 00000000000..7f5cd23f9a1
2336--- /dev/null 2330--- /dev/null
2337+++ b/libgcc/config/microblaze/umoddi3.S 2331+++ gcc-12.1.0/libgcc/config/microblaze/umoddi3.S
2338@@ -0,0 +1,110 @@ 2332@@ -0,0 +1,110 @@
2339+################################### 2333+###################################
2340+# 2334+#
@@ -2446,6 +2440,3 @@ index 00000000000..7f5cd23f9a1
2446+.end __umoddi3 2440+.end __umoddi3
2447+ .size __umoddi3, . - __umoddi3 2441+ .size __umoddi3, . - __umoddi3
2448+#endif 2442+#endif
2449--
24502.17.1
2451
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-re-arrangement-of-the-compare-branches.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-re-arrangement-of-the-compare-branches.patch
index 19605270..bc3c23fa 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-re-arrangement-of-the-compare-branches.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-re-arrangement-of-the-compare-branches.patch
@@ -4,14 +4,14 @@ Date: Fri, 3 Aug 2018 15:41:39 +0530
4Subject: [PATCH 29/53] re-arrangement of the compare branches 4Subject: [PATCH 29/53] re-arrangement of the compare branches
5 5
6--- 6---
7 gcc/config/microblaze/microblaze.c | 28 ++---- 7 gcc/config/microblaze/microblaze.cc | 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.cc b/gcc/config/microblaze/microblaze.cc
12index f59a71ac072..e33e1bc1482 100644 12index f59a71ac072..e33e1bc1482 100644
13--- a/gcc/config/microblaze/microblaze.c 13--- a/gcc/config/microblaze/microblaze.cc
14+++ b/gcc/config/microblaze/microblaze.c 14+++ b/gcc/config/microblaze/microblaze.cc
15@@ -3697,11 +3697,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) 15@@ -3697,11 +3697,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[])
16 { 16 {
17 comp_reg = cmp_op0; 17 comp_reg = cmp_op0;
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch
index c247120b..5235aedc 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch
@@ -4,15 +4,15 @@ Date: Tue, 11 Sep 2018 13:43:48 +0530
4Subject: [PATCH 31/53] [Patch, Microblaze] : Support of multilibs with m64 ... 4Subject: [PATCH 31/53] [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.cc | 1 +
8 gcc/config/microblaze/t-microblaze | 15 ++++++--------- 8 gcc/config/microblaze/t-microblaze | 15 ++++++---------
9 libgcc/config/microblaze/t-microblaze | 11 +++-------- 9 libgcc/config/microblaze/t-microblaze | 11 +++--------
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.cc b/gcc/config/microblaze/microblaze-c.cc
13index 2dcb879992c..50d01feb670 100644 13index 2dcb879992c..50d01feb670 100644
14--- a/gcc/config/microblaze/microblaze-c.c 14--- a/gcc/config/microblaze/microblaze-c.cc
15+++ b/gcc/config/microblaze/microblaze-c.c 15+++ b/gcc/config/microblaze/microblaze-c.cc
16@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile) 16@@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile)
17 } 17 }
18 if (TARGET_MB_64) 18 if (TARGET_MB_64)
@@ -43,7 +43,7 @@ index 9fc80b142ce..35ab9654052 100644
43+MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high 43+MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high
44 44
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.cc \
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 35021b24b7d..8d954a49575 100644 48index 35021b24b7d..8d954a49575 100644
49--- a/libgcc/config/microblaze/t-microblaze 49--- a/libgcc/config/microblaze/t-microblaze
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Fixed-issues-like.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Fixed-issues-like.patch
index 9f5381af..66a0a0d3 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Fixed-issues-like.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Fixed-issues-like.patch
@@ -5,14 +5,14 @@ Subject: [PATCH 32/53] Fixed issues like: 1 Interrupt alignment issue 2 Sign
5 extension issue 5 extension issue
6 6
7--- 7---
8 gcc/config/microblaze/microblaze.c | 16 ++++++++++------ 8 gcc/config/microblaze/microblaze.cc | 16 ++++++++++------
9 gcc/config/microblaze/microblaze.md | 2 +- 9 gcc/config/microblaze/microblaze.md | 2 +-
10 2 files changed, 11 insertions(+), 7 deletions(-) 10 2 files changed, 11 insertions(+), 7 deletions(-)
11 11
12diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 12diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
13index e33e1bc1482..64b948d6cfc 100644 13index e33e1bc1482..64b948d6cfc 100644
14--- a/gcc/config/microblaze/microblaze.c 14--- a/gcc/config/microblaze/microblaze.cc
15+++ b/gcc/config/microblaze/microblaze.c 15+++ b/gcc/config/microblaze/microblaze.cc
16@@ -2177,9 +2177,14 @@ compute_frame_size (HOST_WIDE_INT size) 16@@ -2177,9 +2177,14 @@ compute_frame_size (HOST_WIDE_INT size)
17 17
18 total_size += gp_reg_size; 18 total_size += gp_reg_size;
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Fixed-below-issues.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Fixed-below-issues.patch
index 3a4b2037..c2e2b5ed 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Fixed-below-issues.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Fixed-below-issues.patch
@@ -10,17 +10,17 @@ Subject: [PATCH 33/53] Fixed below issues:
10Conflicts: 10Conflicts:
11 gcc/config/microblaze/microblaze.md 11 gcc/config/microblaze/microblaze.md
12--- 12---
13 gcc/config/microblaze/microblaze.c | 12 +++- 13 gcc/config/microblaze/microblaze.cc | 12 +++-
14 gcc/config/microblaze/microblaze.h | 7 +++ 14 gcc/config/microblaze/microblaze.h | 7 +++
15 gcc/config/microblaze/microblaze.md | 86 ++++++++++++++++++++++++----- 15 gcc/config/microblaze/microblaze.md | 86 ++++++++++++++++++++++++-----
16 libgcc/config/microblaze/crti.S | 24 +++++++- 16 libgcc/config/microblaze/crti.S | 24 +++++++-
17 libgcc/config/microblaze/crtn.S | 13 +++++ 17 libgcc/config/microblaze/crtn.S | 13 +++++
18 5 files changed, 125 insertions(+), 17 deletions(-) 18 5 files changed, 125 insertions(+), 17 deletions(-)
19 19
20diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 20diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
21index 64b948d6cfc..b2cd89a310a 100644 21index 64b948d6cfc..b2cd89a310a 100644
22--- a/gcc/config/microblaze/microblaze.c 22--- a/gcc/config/microblaze/microblaze.cc
23+++ b/gcc/config/microblaze/microblaze.c 23+++ b/gcc/config/microblaze/microblaze.cc
24@@ -2473,7 +2473,12 @@ print_operand (FILE * file, rtx op, int letter) 24@@ -2473,7 +2473,12 @@ print_operand (FILE * file, rtx op, int letter)
25 if (code == CONST_DOUBLE) 25 if (code == CONST_DOUBLE)
26 { 26 {
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Author-Nagaraju-nmekala-xilinx.com.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Author-Nagaraju-nmekala-xilinx.com.patch
index 456c5a48..abe08e56 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Author-Nagaraju-nmekala-xilinx.com.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Author-Nagaraju-nmekala-xilinx.com.patch
@@ -11,14 +11,14 @@ Subject: [PATCH 46/53] Author: Nagaraju <nmekala@xilinx.com> Date: Wed Apr
11 11
12 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> 12 Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
13--- 13---
14 gcc/config/microblaze/microblaze.c | 2 +- 14 gcc/config/microblaze/microblaze.cc | 2 +-
15 gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- 15 gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++--
16 2 files changed, 252 insertions(+), 19 deletions(-) 16 2 files changed, 252 insertions(+), 19 deletions(-)
17 17
18diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 18diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
19index b2cd89a310a..d1257032bfb 100644 19index b2cd89a310a..d1257032bfb 100644
20--- a/gcc/config/microblaze/microblaze.c 20--- a/gcc/config/microblaze/microblaze.cc
21+++ b/gcc/config/microblaze/microblaze.c 21+++ b/gcc/config/microblaze/microblaze.cc
22@@ -3870,7 +3870,7 @@ microblaze_expand_divide (rtx operands[]) 22@@ -3870,7 +3870,7 @@ microblaze_expand_divide (rtx operands[])
23 emit_insn (gen_rtx_CLOBBER (Pmode, reg18)); 23 emit_insn (gen_rtx_CLOBBER (Pmode, reg18));
24 24
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
index 163d4925..d3cab66f 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch
@@ -14,18 +14,18 @@ ChangeLog:
14 * gcc/config/microblaze/microblaze.h 14 * gcc/config/microblaze/microblaze.h
15 (LIBCALL_Value): Remove macro 15 (LIBCALL_Value): Remove macro
16 (PROMOTE_MODE): Remove macro 16 (PROMOTE_MODE): Remove macro
17 * gcc/config/microblaze/microblaze.c 17 * gcc/config/microblaze/microblaze.cc
18 (TARGET_LIBCALL_Value): Added new macro 18 (TARGET_LIBCALL_Value): Added new macro
19 (microblaze_function_value): Updated the return Value 19 (microblaze_function_value): Updated the return Value
20--- 20---
21 gcc/config/microblaze/microblaze.c | 11 ++++++++++- 21 gcc/config/microblaze/microblaze.cc | 11 ++++++++++-
22 gcc/config/microblaze/microblaze.h | 19 ------------------- 22 gcc/config/microblaze/microblaze.h | 19 -------------------
23 2 files changed, 10 insertions(+), 20 deletions(-) 23 2 files changed, 10 insertions(+), 20 deletions(-)
24 24
25diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 25diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
26index d1257032bfb..5afac2ba8d1 100644 26index d1257032bfb..5afac2ba8d1 100644
27--- a/gcc/config/microblaze/microblaze.c 27--- a/gcc/config/microblaze/microblaze.cc
28+++ b/gcc/config/microblaze/microblaze.c 28+++ b/gcc/config/microblaze/microblaze.cc
29@@ -3908,7 +3908,16 @@ microblaze_function_value (const_tree valtype, 29@@ -3908,7 +3908,16 @@ microblaze_function_value (const_tree valtype,
30 const_tree func ATTRIBUTE_UNUSED, 30 const_tree func ATTRIBUTE_UNUSED,
31 bool outgoing ATTRIBUTE_UNUSED) 31 bool outgoing ATTRIBUTE_UNUSED)
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
index 37945b65..bcd941da 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
@@ -6,21 +6,21 @@ Subject: [PATCH 50/53] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and
6 6
7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. 7Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default.
8 8
9 * gcc/common/config/microblaze/microblaze-common.c 9 * gcc/common/config/microblaze/microblaze-common.cc
10 (microblaze_option_optimization_table): Disable fivopts by default. 10 (microblaze_option_optimization_table): Disable fivopts by default.
11 11
12Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> 12Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com>
13 13
14Conflicts: 14Conflicts:
15 gcc/common/config/microblaze/microblaze-common.c 15 gcc/common/config/microblaze/microblaze-common.cc
16--- 16---
17 gcc/common/config/microblaze/microblaze-common.c | 11 +++++++++++ 17 gcc/common/config/microblaze/microblaze-common.cc | 11 +++++++++++
18 1 file changed, 11 insertions(+) 18 1 file changed, 11 insertions(+)
19 19
20diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c 20diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc
21index 1e4abb34027..d3a74fcc99e 100644 21index 1e4abb34027..d3a74fcc99e 100644
22--- a/gcc/common/config/microblaze/microblaze-common.c 22--- a/gcc/common/config/microblaze/microblaze-common.cc
23+++ b/gcc/common/config/microblaze/microblaze-common.c 23+++ b/gcc/common/config/microblaze/microblaze-common.cc
24@@ -24,7 +24,18 @@ 24@@ -24,7 +24,18 @@
25 #include "common/common-target.h" 25 #include "common/common-target.h"
26 #include "common/common-target-def.h" 26 #include "common/common-target-def.h"
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
index 73b170c1..fbc51bc8 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch
@@ -11,14 +11,14 @@ Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
11 :Ajit Agarwal <ajitkum@xilinx.com> 11 :Ajit Agarwal <ajitkum@xilinx.com>
12--- 12---
13 gcc/config/microblaze/microblaze-protos.h | 1 + 13 gcc/config/microblaze/microblaze-protos.h | 1 +
14 gcc/config/microblaze/microblaze.c | 132 +++++++++++++++++++++- 14 gcc/config/microblaze/microblaze.cc | 132 +++++++++++++++++++++-
15 gcc/config/microblaze/microblaze.h | 4 +- 15 gcc/config/microblaze/microblaze.h | 4 +-
16 3 files changed, 134 insertions(+), 3 deletions(-) 16 3 files changed, 134 insertions(+), 3 deletions(-)
17 17
18diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h 18Index: gcc-12.1.0/gcc/config/microblaze/microblaze-protos.h
19index 302f6bbda2e..87a7093e369 100644 19===================================================================
20--- a/gcc/config/microblaze/microblaze-protos.h 20--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze-protos.h
21+++ b/gcc/config/microblaze/microblaze-protos.h 21+++ gcc-12.1.0/gcc/config/microblaze/microblaze-protos.h
22@@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx); 22@@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx);
23 extern int label_mentioned_p (rtx); 23 extern int label_mentioned_p (rtx);
24 extern bool microblaze_cannot_force_const_mem (machine_mode, rtx); 24 extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
@@ -26,12 +26,12 @@ index 302f6bbda2e..87a7093e369 100644
26+int microblaze_reg_parm_stack_space(tree fun); 26+int microblaze_reg_parm_stack_space(tree fun);
27 #endif /* RTX_CODE */ 27 #endif /* RTX_CODE */
28 28
29 /* Declare functions in microblaze-c.c. */ 29 /* Declare functions in microblaze-c.cc. */
30diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 30Index: gcc-12.1.0/gcc/config/microblaze/microblaze.cc
31index 5afac2ba8d1..6914eb8380c 100644 31===================================================================
32--- a/gcc/config/microblaze/microblaze.c 32--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.cc
33+++ b/gcc/config/microblaze/microblaze.c 33+++ gcc-12.1.0/gcc/config/microblaze/microblaze.cc
34@@ -2080,6 +2080,136 @@ microblaze_must_save_register (int regno) 34@@ -2081,6 +2081,136 @@ microblaze_must_save_register (int regno
35 return 0; 35 return 0;
36 } 36 }
37 37
@@ -168,20 +168,11 @@ index 5afac2ba8d1..6914eb8380c 100644
168 /* Return the bytes needed to compute the frame pointer from the current 168 /* Return the bytes needed to compute the frame pointer from the current
169 stack pointer. 169 stack pointer.
170 170
171@@ -3470,7 +3600,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, 171Index: gcc-12.1.0/gcc/config/microblaze/microblaze.h
172 emit_insn (gen_indirect_jump (temp2)); 172===================================================================
173 173--- gcc-12.1.0.orig/gcc/config/microblaze/microblaze.h
174 /* Run just enough of rest_of_compilation. This sequence was 174+++ gcc-12.1.0/gcc/config/microblaze/microblaze.h
175- "borrowed" from rs6000.c. */ 175@@ -447,9 +447,9 @@ extern struct microblaze_frame_info curr
176+ "borrowed" from microblaze.c */
177 insn = get_insns ();
178 shorten_branches (insn);
179 assemble_start_function (thunk_fndecl, fnname);
180diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
181index 2581d52d17a..9c48978d2ca 100644
182--- a/gcc/config/microblaze/microblaze.h
183+++ b/gcc/config/microblaze/microblaze.h
184@@ -447,9 +447,9 @@ extern struct microblaze_frame_info current_frame_info;
185 #define ARG_POINTER_CFA_OFFSET(FNDECL) 0 176 #define ARG_POINTER_CFA_OFFSET(FNDECL) 0
186 #define DWARF_CIE_DATA_ALIGNMENT -1 177 #define DWARF_CIE_DATA_ALIGNMENT -1
187 178
@@ -193,6 +184,3 @@ index 2581d52d17a..9c48978d2ca 100644
193 184
194 #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32) 185 #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32)
195 186
196--
1972.17.1
198
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch
index 293a7486..76004f15 100644
--- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch
+++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch
@@ -8,13 +8,13 @@ Subject: [PATCH 52/53] [Patch,MicroBlaze] : If we use break_handler attribute
8 attribute. 8 attribute.
9 9
10--- 10---
11 gcc/config/microblaze/microblaze.c | 13 +++++-------- 11 gcc/config/microblaze/microblaze.cc | 13 +++++--------
12 1 file changed, 5 insertions(+), 8 deletions(-) 12 1 file changed, 5 insertions(+), 8 deletions(-)
13 13
14diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c 14diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
15index 6914eb8380c..d0546a164d7 100644 15index 6914eb8380c..d0546a164d7 100644
16--- a/gcc/config/microblaze/microblaze.c 16--- a/gcc/config/microblaze/microblaze.cc
17+++ b/gcc/config/microblaze/microblaze.c 17+++ b/gcc/config/microblaze/microblaze.cc
18@@ -2019,7 +2019,7 @@ microblaze_save_volatiles (tree func) 18@@ -2019,7 +2019,7 @@ microblaze_save_volatiles (tree func)
19 int 19 int
20 microblaze_is_interrupt_variant (void) 20 microblaze_is_interrupt_variant (void)