From 5f7e4cd10e7d829ec346953883f73dd1f02a80dd Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Mon, 23 Nov 2015 17:12:13 +1000 Subject: gcc_4.8: Drop appends * The recipe is no longer provided in oe-core Signed-off-by: Nathan Rossi --- ...blaze-Enable-DWARF-exception-handling-sup.patch | 158 --------------------- ...blaze-Add-4-byte-implementation-for-atomi.patch | 157 -------------------- ...blaze-Extend-jump-insn-to-accept-bri-to-S.patch | 35 ----- ...Patch-microblaze-Add-fstack-usage-support.patch | 30 ---- ...herry-pick-mainline-patch-to-resolve-MB-k.patch | 110 -------------- recipes-microblaze/gcc/gcc-source_4.8.bbappend | 11 -- 6 files changed, 501 deletions(-) delete mode 100644 recipes-microblaze/gcc/files/0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch delete mode 100644 recipes-microblaze/gcc/files/0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch delete mode 100644 recipes-microblaze/gcc/files/0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch delete mode 100644 recipes-microblaze/gcc/files/0005-Patch-microblaze-Add-fstack-usage-support.patch delete mode 100644 recipes-microblaze/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch delete mode 100644 recipes-microblaze/gcc/gcc-source_4.8.bbappend diff --git a/recipes-microblaze/gcc/files/0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch b/recipes-microblaze/gcc/files/0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch deleted file mode 100644 index d6549cad..00000000 --- a/recipes-microblaze/gcc/files/0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch +++ /dev/null @@ -1,158 +0,0 @@ -From: "Edgar E. Iglesias" -Subject: [PATCH 1/8] [Patch, microblaze]: Enable DWARF exception handling - support. - -Changelog - -2013-03-18 Edgar E. Iglesias - David Holsgrove - - * common/config/microblaze/microblaze-common.c: Remove - TARGET_EXCEPT_UNWIND_INFO definition. - * config/microblaze/microblaze-protos.h: Add - microblaze_eh_return prototype. - * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, - microblaze_expand_epilogue, microblaze_return_addr): Handle - calls_eh_return - (microblaze_eh_return): New function. - * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, - EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, - ASM_PREFERRED_EH_DATA_FORMAT - * gcc/config/microblaze/microblaze.md: Define eh_return pattern. - -Signed-off-by: David Holsgrove -Signed-off-by: Edgar E. Iglesias -Upstream-Status: Pending - -diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c -index 07a71fb..6c25a76 100644 ---- a/gcc/common/config/microblaze/microblaze-common.c -+++ b/gcc/common/config/microblaze/microblaze-common.c -@@ -37,7 +37,4 @@ static const struct default_options microblaze_option_optimization_table[] = - #undef TARGET_OPTION_OPTIMIZATION_TABLE - #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table - --#undef TARGET_EXCEPT_UNWIND_INFO --#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info -- - struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; -diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h -index 34be76f..201390b 100644 ---- a/gcc/config/microblaze/microblaze-protos.h -+++ b/gcc/config/microblaze/microblaze-protos.h -@@ -54,6 +54,7 @@ extern bool microblaze_tls_referenced_p (rtx); - extern int symbol_mentioned_p (rtx); - extern int label_mentioned_p (rtx); - extern bool microblaze_cannot_force_const_mem (enum machine_mode, rtx); -+extern void microblaze_eh_return (rtx op0); - #endif /* RTX_CODE */ - - /* Declare functions in microblaze-c.c. */ -diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c -index c121c2b..5f4bc60 100644 ---- a/gcc/config/microblaze/microblaze.c -+++ b/gcc/config/microblaze/microblaze.c -@@ -1896,6 +1896,11 @@ microblaze_must_save_register (int regno) - if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) - return 1; - -+ if (crtl->calls_eh_return -+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { -+ return 1; -+ } -+ - if (!crtl->is_leaf) - { - if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) -@@ -1923,6 +1928,13 @@ microblaze_must_save_register (int regno) - return 1; - } - -+ if (crtl->calls_eh_return -+ && (regno == EH_RETURN_DATA_REGNO (0) -+ || regno == EH_RETURN_DATA_REGNO (1))) -+ { -+ return 1; -+ } -+ - return 0; - } - -@@ -2939,6 +2951,12 @@ microblaze_expand_epilogue (void) - emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); - } - -+ if (crtl->calls_eh_return) -+ emit_insn (gen_addsi3 (stack_pointer_rtx, -+ stack_pointer_rtx, -+ gen_rtx_raw_REG (SImode, -+ MB_EH_STACKADJ_REGNUM))); -+ - emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + - MB_ABI_SUB_RETURN_ADDR_REGNUM))); - } -@@ -3166,10 +3184,13 @@ microblaze_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) - if (count != 0) - return NULL_RTX; - -- return gen_rtx_PLUS (Pmode, -- get_hard_reg_initial_val (Pmode, -- MB_ABI_SUB_RETURN_ADDR_REGNUM), -- GEN_INT (8)); -+ return get_hard_reg_initial_val (Pmode, -+ MB_ABI_SUB_RETURN_ADDR_REGNUM); -+} -+ -+void microblaze_eh_return (rtx op0) -+{ -+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); - } - - /* Queue an .ident string in the queue of top-level asm statements. -diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h -index bc4d9a1..074b78e 100644 ---- a/gcc/config/microblaze/microblaze.h -+++ b/gcc/config/microblaze/microblaze.h -@@ -184,6 +184,21 @@ extern enum pipeline_type microblaze_pipe; - #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) - -+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ -+#define RETURN_ADDR_OFFSET (8) -+ -+/* Describe how we implement __builtin_eh_return. */ -+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) -+ -+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM -+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) -+ -+/* Select a format to encode pointers in exception handling data. CODE -+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is -+ true if the symbol may be affected by dynamic relocations. */ -+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ -+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) -+ - /* Use DWARF 2 debugging information by default. */ - #define DWARF2_DEBUGGING_INFO - #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md -index 3618cad..4e7fe3b 100644 ---- a/gcc/config/microblaze/microblaze.md -+++ b/gcc/config/microblaze/microblaze.md -@@ -2221,3 +2221,13 @@ - [(set_attr "type" "arith") - (set_attr "mode" "SI") - (set_attr "length" "4")]) -+ -+; This is used in compiling the unwind routines. -+(define_expand "eh_return" -+ [(use (match_operand 0 "general_operand" ""))] -+ "" -+ " -+{ -+ microblaze_eh_return(operands[0]); -+ DONE; -+}") --- -1.7.5.4 - diff --git a/recipes-microblaze/gcc/files/0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch b/recipes-microblaze/gcc/files/0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch deleted file mode 100644 index aefa13b0..00000000 --- a/recipes-microblaze/gcc/files/0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch +++ /dev/null @@ -1,157 +0,0 @@ -From: David Holsgrove -Subject: [PATCH 2/8] [Patch, microblaze]: Add 4 byte implementation for - atomic builtin - -By providing this initial atomic implementation, gcc is able to generate the other atomic -builtins by using a __sync_compare_and_swap loop - -Add __sync_lock_test_and_set 4 byte atomic builtin - -Changelog - -2013-03-18 David Holsgrove - - * gcc/config/microblaze/sync.md: New file. - * gcc/config/microblaze/microblaze.md: Add UNSPEC_SYNC_CAS, - UNSPEC_SYNC_XCHG and include sync.md. - * gcc/config/microblaze/microblaze.c: Add print_operand 'y'. - * gcc/config/microblaze/constraints.md: Add memory_contraint - 'Q' which is a single register. - -Signed-off-by: David Holsgrove -Upstream-Status: Pending - -diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md -index c6fbc98..c9c1649 100644 ---- a/gcc/config/microblaze/constraints.md -+++ b/gcc/config/microblaze/constraints.md -@@ -70,3 +70,8 @@ - "Double word operand." - (and (match_code "mem") - (match_test "double_memory_operand (op, GET_MODE (op))"))) -+ -+(define_memory_constraint "Q" -+ "Memory operand which is a single register." -+ (and (match_code "mem") -+ (match_test "GET_CODE ( XEXP (op, 0)) == REG"))) -diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c -index 5f4bc60..1562e60 100644 ---- a/gcc/config/microblaze/microblaze.c -+++ b/gcc/config/microblaze/microblaze.c -@@ -2130,6 +2130,7 @@ microblaze_initial_elimination_offset (int from, int to) - 't' print 't' for EQ, 'f' for NE - 'm' Print 1<. -+ -+ -+(define_insn "sync_compare_and_swapsi" -+ [(set (match_operand:SI 0 "register_operand" "=&d") ;; retval -+ (match_operand:SI 1 "nonimmediate_operand" "+Q")) ;; mem -+ (set (match_dup 1) -+ (unspec -+ [(match_operand:SI 2 "register_operand" "d") ;; oldval -+ (match_operand:SI 3 "register_operand" "d")] ;; newval -+ UNSPEC_SYNC_CAS)) -+ (clobber (match_scratch:SI 4 "=&d"))] ;; scratch -+ "" -+ { -+ output_asm_insn ("addc \tr0,r0,r0", operands); -+ output_asm_insn ("lwx \t%0,%y1,r0", operands); -+ output_asm_insn ("addic\t%4,r0,0", operands); -+ output_asm_insn ("bnei \t%4,.-8", operands); -+ output_asm_insn ("cmp \t%4,%0,%2", operands); -+ output_asm_insn ("bnei \t%4,.+16", operands); -+ output_asm_insn ("swx \t%3,%y1,r0", operands); -+ output_asm_insn ("addic\t%4,r0,0", operands); -+ output_asm_insn ("bnei \t%4,.-28", operands); -+ return ""; -+ } -+) -+ -+(define_insn "sync_test_and_setsi" -+ [(set (match_operand:SI 0 "register_operand" "=&d") ;; retval -+ (match_operand:SI 1 "nonimmediate_operand" "+Q")) ;; mem -+ (set (match_dup 1) -+ (unspec -+ [(match_operand:SI 2 "register_operand" "d")] ;; value -+ UNSPEC_SYNC_XCHG)) -+ (clobber (match_scratch:SI 3 "=&d"))] ;; scratch -+ "" -+ { -+ output_asm_insn ("addc \tr0,r0,r0", operands); -+ output_asm_insn ("lwx \t%0,%y1,r0", operands); -+ output_asm_insn ("addic\t%3,r0,0", operands); -+ output_asm_insn ("bnei \t%3,.-8", operands); -+ output_asm_insn ("swx \t%2,%y1,r0", operands); -+ output_asm_insn ("addic\t%3,r0,0", operands); -+ output_asm_insn ("bnei \t%3,.-20", operands); -+ return ""; -+ } -+) --- -1.7.5.4 - diff --git a/recipes-microblaze/gcc/files/0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch b/recipes-microblaze/gcc/files/0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch deleted file mode 100644 index 998dfa03..00000000 --- a/recipes-microblaze/gcc/files/0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: David Holsgrove -Subject: [PATCH 3/8] [Patch, microblaze]: Extend jump insn to accept bri to - SYMBOL_REFS - -Current insn checks if operand is a REG - if so, uses br -else it bri to %l0 - using a label_ref print operand - -Check if operand is a SYMBOL_REF, and if so, use %0 - -Changelog - -2013-03-18 David Holsgrove - - * gcc/config/microblaze/microblaze.md (jump): - Account for jumps to SYMBOL_REFs. - -Signed-off-by: David Holsgrove -Upstream-Status: Pending - -diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md -index 55cc730..49d8f01 100644 ---- a/gcc/config/microblaze/microblaze.md -+++ b/gcc/config/microblaze/microblaze.md -@@ -1729,6 +1729,8 @@ - { - if (GET_CODE (operands[0]) == REG) - return "br%?\t%0"; -+ else if (GET_CODE (operands[0]) == SYMBOL_REF) -+ return "bri%?\t%0"; - else - return "bri%?\t%l0"; - } --- -1.7.5.4 - diff --git a/recipes-microblaze/gcc/files/0005-Patch-microblaze-Add-fstack-usage-support.patch b/recipes-microblaze/gcc/files/0005-Patch-microblaze-Add-fstack-usage-support.patch deleted file mode 100644 index ee3cb9db..00000000 --- a/recipes-microblaze/gcc/files/0005-Patch-microblaze-Add-fstack-usage-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: David Holsgrove -Subject: [PATCH 5/8] [Patch, microblaze]: Add -fstack-usage support - -Changelog - -2013-03-18 David Holsgrove - - * gcc/config/microblaze/microblaze.c (microblaze_expand_prologue): - Add check for flag_stack_usage to enable -fstack-usage support - -Signed-off-by: David Holsgrove -Upstream-Status: Pending - -diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c -index 7418e49..4417289 100644 ---- a/gcc/config/microblaze/microblaze.c -+++ b/gcc/config/microblaze/microblaze.c -@@ -2790,6 +2790,9 @@ microblaze_expand_prologue (void) - - fsiz = compute_frame_size (get_frame_size ()); - -+ if (flag_stack_usage) -+ current_function_static_stack_size = fsiz; -+ - /* If this function is a varargs function, store any registers that - would normally hold arguments ($5 - $10) on the stack. */ - if (((TYPE_ARG_TYPES (fntype) != 0 --- -1.7.5.4 - diff --git a/recipes-microblaze/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch b/recipes-microblaze/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch deleted file mode 100644 index 1cdc4029..00000000 --- a/recipes-microblaze/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch +++ /dev/null @@ -1,110 +0,0 @@ -Subject: Cherry-pick mainline patch to resolve MB kernel panic - -Cherry-pick backend optimization patch from gcc HEAD which 'resolves' a kernel -panic for microblaze when compiled with -Os - -Upstream HEAD (soon to be gcc 4.9) does not exhibt this error any longer, -and this patch when applied as a workaround on the 4.8 branch also hides the -kernel panic resulting from incorrect branch-delay slot filling. - - * tree-ssa-threadedge.c (thread_around_empty_block): Remove - checks for the number of predecessors and successors allowed. - * tree-ssa-threadupdate.c (mark_threaded_blocks): Ignore requests - which require copying a joiner block if there is a request which - is a subpath that requires no joiner block copying. - -Signed-off-by: David Holsgrove -Upstream-Status: Backport ---- - gcc/tree-ssa-threadedge.c | 8 ------- - gcc/tree-ssa-threadupdate.c | 49 ++++++++++++++++++++++++++++++++++++++----- - 2 files changed, 44 insertions(+), 13 deletions(-) - -diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c -index b31e961..ab58ae8 100644 ---- a/gcc/tree-ssa-threadedge.c -+++ b/gcc/tree-ssa-threadedge.c -@@ -761,14 +761,6 @@ thread_around_empty_block (edge taken_edge, - gimple stmt; - tree cond; - -- /* This block must have a single predecessor (E->dest). */ -- if (!single_pred_p (bb)) -- return NULL; -- -- /* This block must have more than one successor. */ -- if (single_succ_p (bb)) -- return NULL; -- - /* This block can have no PHI nodes. This is overly conservative. */ - if (!gsi_end_p (gsi_start_phis (bb))) - return NULL; -diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c -index 0e4cbc9..cf8df8e 100644 ---- a/gcc/tree-ssa-threadupdate.c -+++ b/gcc/tree-ssa-threadupdate.c -@@ -1146,17 +1146,56 @@ mark_threaded_blocks (bitmap threaded_blocks) - edge e; - edge_iterator ei; - -+ /* It is possible to have jump threads in which one is a subpath -+ of the other. ie, (A, B), (B, C), (C, D) where B is a joiner -+ block and (B, C), (C, D) where no joiner block exists. -+ -+ When this occurs ignore the jump thread request with the joiner -+ block. It's totally subsumed by the simpler jump thread request. -+ -+ This results in less block copying, simpler CFGs. More improtantly, -+ when we duplicate the joiner block, B, in this case we will create -+ a new threading opportunity that we wouldn't be able to optimize -+ until the next jump threading iteration. -+ -+ So first convert the jump thread requests which do not require a -+ joiner block. */ - for (i = 0; i < threaded_edges.length (); i += 3) - { - edge e = threaded_edges[i]; -- edge *x = XNEWVEC (edge, 2); - -- e->aux = x; -- THREAD_TARGET (e) = threaded_edges[i + 1]; -- THREAD_TARGET2 (e) = threaded_edges[i + 2]; -- bitmap_set_bit (tmp, e->dest->index); -+ if (threaded_edges[i + 2] == NULL) -+ { -+ edge *x = XNEWVEC (edge, 2); -+ -+ e->aux = x; -+ THREAD_TARGET (e) = threaded_edges[i + 1]; -+ THREAD_TARGET2 (e) = NULL; -+ bitmap_set_bit (tmp, e->dest->index); -+ } - } - -+ -+ /* Now iterate again, converting cases where we threaded through -+ a joiner block, but ignoring those where we have already -+ threaded through the joiner block. */ -+ for (i = 0; i < threaded_edges.length (); i += 3) -+ { -+ edge e = threaded_edges[i]; -+ -+ if (threaded_edges[i + 2] != NULL -+ && threaded_edges[i + 1]->aux == NULL) -+ { -+ edge *x = XNEWVEC (edge, 2); -+ -+ e->aux = x; -+ THREAD_TARGET (e) = threaded_edges[i + 1]; -+ THREAD_TARGET2 (e) = threaded_edges[i + 2]; -+ bitmap_set_bit (tmp, e->dest->index); -+ } -+ } -+ -+ - /* If optimizing for size, only thread through block if we don't have - to duplicate it or it's an otherwise empty redirection block. */ - if (optimize_function_for_size_p (cfun)) --- -1.7.9.5 - diff --git a/recipes-microblaze/gcc/gcc-source_4.8.bbappend b/recipes-microblaze/gcc/gcc-source_4.8.bbappend deleted file mode 100644 index 80b78f44..00000000 --- a/recipes-microblaze/gcc/gcc-source_4.8.bbappend +++ /dev/null @@ -1,11 +0,0 @@ - -# Add MicroBlaze Patches -FILESEXTRAPATHS_append := "${THISDIR}/files:" -SRC_URI_append += " \ - file://0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch \ - file://0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch \ - file://0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch \ - file://0005-Patch-microblaze-Add-fstack-usage-support.patch \ - file://gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch \ - " - -- cgit v1.2.3-54-g00ecf