summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch')
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch105
1 files changed, 51 insertions, 54 deletions
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