Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From 7d5f59e035341430e20f47420535d0e987516e55 Mon Sep 17 00:00:00 2001
|
||||
From: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Date: Mon, 25 Jul 2022 00:29:55 +0200
|
||||
Subject: [PATCH] disable split-stack for non-thread builds
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
[Romain: convert to git format]
|
||||
Signed-off-by: Romain Naour <romain.naour@smile.fr>
|
||||
---
|
||||
libgcc/config/t-stack | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libgcc/config/t-stack b/libgcc/config/t-stack
|
||||
index cc0366b4cd8..f3f97e86d60 100644
|
||||
--- a/libgcc/config/t-stack
|
||||
+++ b/libgcc/config/t-stack
|
||||
@@ -1,4 +1,6 @@
|
||||
# Makefile fragment to provide generic support for -fsplit-stack.
|
||||
# This should be used in config.host for any host which supports
|
||||
# -fsplit-stack.
|
||||
+ifeq ($(enable_threads),yes)
|
||||
LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
|
||||
+endif
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
From d2fdbd8c4abe67eea86877dfb3b3b9d8508c165f Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 6 Aug 2025 22:32:30 +0200
|
||||
Subject: [PATCH] gcc/config/microblaze: fix ira for GCC15
|
||||
|
||||
Add new hooks for callee-save on microblaze defined by [1] and
|
||||
return 1 to restore the old behavior prior to the commit [3].
|
||||
|
||||
Tested with qemu_microblazeel_mmu_defconfig and used to generate
|
||||
Microblaze toolchains for the Bootlin toolchains 2025.08-1 [4][5].
|
||||
|
||||
Upstream: suggested in the bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121432#c10
|
||||
|
||||
[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b191e8bdecf881d11c1544c441e38f4c18392a15
|
||||
[2] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/i386.cc;h=3128973ba79cccfc6761f451dcb716b9558cc4da;hb=d3ff498c478acefce35de04402f99171b4f64a1a#l20606
|
||||
[3] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b
|
||||
[4] https://lore.kernel.org/buildroot/87sehzndtp.fsf@dell.be.48ers.dk/T/#mce7decd0b3f6a41008d5de577538a8525c91b374
|
||||
[5] https://toolchains.bootlin.com/
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gcc/config/microblaze/microblaze.cc | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc
|
||||
index 78b9428ef3b..84ea7e8d55a 100644
|
||||
--- a/gcc/config/microblaze/microblaze.cc
|
||||
+++ b/gcc/config/microblaze/microblaze.cc
|
||||
@@ -3228,6 +3228,14 @@ microblaze_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
|
||||
return NO_REGS;
|
||||
}
|
||||
|
||||
+/* Implement TARGET_CALLEE_SAVE_COST. */
|
||||
+static int
|
||||
+microblaze_callee_save_cost (spill_cost_type, unsigned int hard_regno, machine_mode,
|
||||
+ unsigned int, int mem_cost, const HARD_REG_SET &, bool)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
microblaze_globalize_label (FILE * stream, const char *name)
|
||||
{
|
||||
@@ -4066,6 +4074,9 @@ microblaze_starting_frame_offset (void)
|
||||
#undef TARGET_SECONDARY_RELOAD
|
||||
#define TARGET_SECONDARY_RELOAD microblaze_secondary_reload
|
||||
|
||||
+#undef TARGET_CALLEE_SAVE_COST
|
||||
+#define TARGET_CALLEE_SAVE_COST microblaze_callee_save_cost
|
||||
+
|
||||
#undef TARGET_ASM_OUTPUT_MI_THUNK
|
||||
#define TARGET_ASM_OUTPUT_MI_THUNK microblaze_asm_output_mi_thunk
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From 654c733fa3f10531f3fd6b6d89e39f28c0075bd6 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Sat, 7 Feb 2026 07:50:41 +0000
|
||||
Subject: [PATCH] PR rtl-optimization/123833: Use of insn attributes in
|
||||
insn_costs corrupts recog_data.
|
||||
|
||||
Thanks again to Jeff Law and Andrew Pinski. Here's a revised patch that
|
||||
addresses the true underlying cause of PR 128333. recog.cc's cancel_changes
|
||||
was not correctly updating the recog_data cache, which leads to strange
|
||||
(incorrect) behavior in fwprop and ifcvt.
|
||||
|
||||
2026-02-07 Roger Sayle <roger@nextmovesoftware.com>
|
||||
Andrew Pinski <andrew.pinski@oss.qualcomm.com>
|
||||
Jeff Law <jeffrey.law@oss.qualcomm.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR rtl-optimization/123833
|
||||
* recog.cc (cancel_changes): Update the recog_data cache if it
|
||||
holds the instruction being changed.
|
||||
|
||||
gcc/testsuite
|
||||
PR rtl-optimization/123833
|
||||
* gcc.target/mips/pr123833.c: New test case.
|
||||
|
||||
Upstream: https://gcc.gnu.org/cgit/gcc/commit/?id=654c733fa3f10531f3fd6b6d89e39f28c0075bd6
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
gcc/recog.cc | 6 +++++-
|
||||
gcc/testsuite/gcc.target/mips/pr123833.c | 26 ++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/mips/pr123833.c
|
||||
|
||||
diff --git a/gcc/recog.cc b/gcc/recog.cc
|
||||
index 48f6b45ec6d..f37e548d6ab 100644
|
||||
--- a/gcc/recog.cc
|
||||
+++ b/gcc/recog.cc
|
||||
@@ -608,7 +608,11 @@ cancel_changes (int num)
|
||||
else
|
||||
*changes[i].loc = changes[i].old;
|
||||
if (changes[i].object && !MEM_P (changes[i].object))
|
||||
- INSN_CODE (changes[i].object) = changes[i].old_code;
|
||||
+ {
|
||||
+ INSN_CODE (changes[i].object) = changes[i].old_code;
|
||||
+ if (recog_data.insn == changes[i].object)
|
||||
+ recog_data.insn = nullptr;
|
||||
+ }
|
||||
}
|
||||
num_changes = num;
|
||||
}
|
||||
diff --git a/gcc/testsuite/gcc.target/mips/pr123833.c b/gcc/testsuite/gcc.target/mips/pr123833.c
|
||||
new file mode 100644
|
||||
index 00000000000..4d0c9e8eaec
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/mips/pr123833.c
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O1 -mabi=64 -mhard-float" } */
|
||||
+
|
||||
+typedef short int16_t;
|
||||
+typedef signed char int8_t;
|
||||
+typedef long long int64_t;
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef unsigned long long uint64_t;
|
||||
+
|
||||
+#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))
|
||||
+BS_VEC(int8_t, 2) backsmith_pure_0(int64_t);
|
||||
+uint64_t backsmith_pure_4(int16_t BS_ARG_0)
|
||||
+{
|
||||
+ BS_VEC(int16_t, 16)
|
||||
+ BS_VAR_0 = __builtin_convertvector(
|
||||
+ __builtin_shufflevector(backsmith_pure_0(0), backsmith_pure_0(0), 0, 2,
|
||||
+ 2, 3, 2, 1, 2, 3, 0, 2, 0, 0, 2, 2, 0, 1),
|
||||
+ BS_VEC(int16_t, 16));
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ if (__builtin_ctzg((uint8_t)BS_VAR_0[3], BS_ARG_0))
|
||||
+ for (;;);
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.47.3
|
||||
|
||||
Reference in New Issue
Block a user