diff options
| author | Nathan Rossi <nathan.rossi@xilinx.com> | 2015-05-11 15:57:46 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2015-05-11 15:57:46 +1000 |
| commit | 2d87a30be9c7dbf8bc25b746cb098d47209c7027 (patch) | |
| tree | d194555984f5b083970806a29f11ec651ae88ad9 /recipes-microblaze | |
| parent | 4ea3064483b1d70c78d5393556f9d77918a72fb5 (diff) | |
| download | meta-xilinx-2d87a30be9c7dbf8bc25b746cb098d47209c7027.tar.gz | |
gcc: Update patches for gcc 4.8.4
* Remove patches that are available in gcc 4.8.4
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-microblaze')
7 files changed, 0 insertions, 500 deletions
diff --git a/recipes-microblaze/gcc/files/0006-Patch-microblaze-Remove-SECONDARY_MEMORY_NEEDED.patch b/recipes-microblaze/gcc/files/0006-Patch-microblaze-Remove-SECONDARY_MEMORY_NEEDED.patch deleted file mode 100644 index 923756a5..00000000 --- a/recipes-microblaze/gcc/files/0006-Patch-microblaze-Remove-SECONDARY_MEMORY_NEEDED.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> | ||
| 2 | Subject: [PATCH 6/8] [Patch, microblaze]: Remove SECONDARY_MEMORY_NEEDED | ||
| 3 | |||
| 4 | MicroBlaze doesn't have restrictions that would force us to | ||
| 5 | reload regs via memory. Don't define SECONDARY_MEMORY_NEEDED. | ||
| 6 | Fixes an ICE when compiling OpenSSL for linux. | ||
| 7 | |||
| 8 | Changelog | ||
| 9 | |||
| 10 | 2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
| 11 | |||
| 12 | * gcc/config/microblaze/microblaze.h: Remove SECONDARY_MEMORY_NEEDED | ||
| 13 | definition. | ||
| 14 | |||
| 15 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
| 16 | Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@xilinx.com> | ||
| 17 | Upstream-Status: Pending | ||
| 18 | |||
| 19 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | ||
| 20 | index 074b78e..add69e8 100644 | ||
| 21 | --- a/gcc/config/microblaze/microblaze.h | ||
| 22 | +++ b/gcc/config/microblaze/microblaze.h | ||
| 23 | @@ -422,9 +422,6 @@ extern enum reg_class microblaze_regno_to_class[]; | ||
| 24 | || GET_MODE (X) == VOIDmode) \ | ||
| 25 | ? (GR_REGS) : (CLASS)))) | ||
| 26 | |||
| 27 | -#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ | ||
| 28 | - (GET_MODE_CLASS (MODE) == MODE_INT) | ||
| 29 | - | ||
| 30 | /* Stack layout; function entry, exit and calling. */ | ||
| 31 | |||
| 32 | #define STACK_GROWS_DOWNWARD | ||
| 33 | -- | ||
| 34 | 1.7.5.4 | ||
| 35 | |||
diff --git a/recipes-microblaze/gcc/files/0007-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch b/recipes-microblaze/gcc/files/0007-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch deleted file mode 100644 index 33aee3a7..00000000 --- a/recipes-microblaze/gcc/files/0007-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 2 | Subject: [PATCH 7/8] [Patch, microblaze]: Add SIZE_TYPE and PTRDIFF_TYPE to | ||
| 3 | microblaze.h | ||
| 4 | |||
| 5 | Fixes warnings like; | ||
| 6 | |||
| 7 | warning: format '%zX' expects argument of type 'size_t', | ||
| 8 | but argument 3 has type 'unsigned int' [-Wformat] | ||
| 9 | |||
| 10 | Changelog | ||
| 11 | |||
| 12 | 2013-03-18 David Holsgrove <david.holsgrove@xilinx.com> | ||
| 13 | |||
| 14 | * gcc/config/microblaze/microblaze.h: Define SIZE_TYPE | ||
| 15 | and PTRDIFF_TYPE. | ||
| 16 | |||
| 17 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 18 | Upstream-Status: Pending | ||
| 19 | |||
| 20 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | ||
| 21 | index add69e8..367e986 100644 | ||
| 22 | --- a/gcc/config/microblaze/microblaze.h | ||
| 23 | +++ b/gcc/config/microblaze/microblaze.h | ||
| 24 | @@ -228,6 +228,12 @@ extern enum pipeline_type microblaze_pipe; | ||
| 25 | #define STRICT_ALIGNMENT 1 | ||
| 26 | #define PCC_BITFIELD_TYPE_MATTERS 1 | ||
| 27 | |||
| 28 | +#undef SIZE_TYPE | ||
| 29 | +#define SIZE_TYPE "unsigned int" | ||
| 30 | + | ||
| 31 | +#undef PTRDIFF_TYPE | ||
| 32 | +#define PTRDIFF_TYPE "int" | ||
| 33 | + | ||
| 34 | #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ | ||
| 35 | ((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \ | ||
| 36 | && (ALIGN) < BITS_PER_WORD \ | ||
| 37 | -- | ||
| 38 | 1.7.5.4 | ||
| 39 | |||
diff --git a/recipes-microblaze/gcc/files/0008-Patch-microblaze-Add-branch_compare-instruction.patch b/recipes-microblaze/gcc/files/0008-Patch-microblaze-Add-branch_compare-instruction.patch deleted file mode 100644 index 4da74f3f..00000000 --- a/recipes-microblaze/gcc/files/0008-Patch-microblaze-Add-branch_compare-instruction.patch +++ /dev/null | |||
| @@ -1,224 +0,0 @@ | |||
| 1 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 2 | Subject: [PATCH 8/8] [Patch, microblaze]: Add branch_compare instruction | ||
| 3 | |||
| 4 | To facilitate optimization pass understanding of the conditional | ||
| 5 | branch for microblaze, remove the UNSPEC'd signed_compare / | ||
| 6 | unsigned_compare instructions, and replace with a complete | ||
| 7 | branch_compare which will output_asm_insn the correct cmp/cmpu | ||
| 8 | depending on comparison code and signed / unsigned. | ||
| 9 | |||
| 10 | We then return the correct branch instruction. | ||
| 11 | |||
| 12 | cbranchsi now calls an expanded microblaze_expand_conditional_branch | ||
| 13 | function which will carry out compare against zero, compare EQ/NE, | ||
| 14 | and all other compares appropriately. | ||
| 15 | |||
| 16 | -funroll-loops optimization pass can now proceed | ||
| 17 | |||
| 18 | Changelog | ||
| 19 | |||
| 20 | 2013-03-19 David Holsgrove <david.holsgrove@xilinx.com> | ||
| 21 | |||
| 22 | * gcc/config/microblaze/predicates.md: Add cmp_op predicate. | ||
| 23 | * gcc/config/microblaze/microblaze.md: Add branch_compare | ||
| 24 | instruction which uses cmp_op predicate and emits cmp insn | ||
| 25 | before branch. | ||
| 26 | * gcc/config/microblaze/microblaze.c | ||
| 27 | (microblaze_emit_compare): Rename to | ||
| 28 | microblaze_expand_conditional_branch and consolidate logic. | ||
| 29 | (microblaze_expand_conditional_branch): emit branch_compare | ||
| 30 | insn instead of handling cmp op separate from branch insn. | ||
| 31 | |||
| 32 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 33 | Upstream-Status: Pending | ||
| 34 | |||
| 35 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c | ||
| 36 | index 4417289..84b58bf 100644 | ||
| 37 | --- a/gcc/config/microblaze/microblaze.c | ||
| 38 | +++ b/gcc/config/microblaze/microblaze.c | ||
| 39 | @@ -3336,65 +3336,45 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) | ||
| 40 | emit_move_insn (mem, fnaddr); | ||
| 41 | } | ||
| 42 | |||
| 43 | -/* Emit instruction to perform compare. | ||
| 44 | - cmp is (compare_op op0 op1). */ | ||
| 45 | -static rtx | ||
| 46 | -microblaze_emit_compare (enum machine_mode mode, rtx cmp, enum rtx_code *cmp_code) | ||
| 47 | +/* Generate conditional branch -- first, generate test condition, | ||
| 48 | + second, generate correct branch instruction. */ | ||
| 49 | + | ||
| 50 | +void | ||
| 51 | +microblaze_expand_conditional_branch (enum machine_mode mode, rtx operands[]) | ||
| 52 | { | ||
| 53 | - rtx cmp_op0 = XEXP (cmp, 0); | ||
| 54 | - rtx cmp_op1 = XEXP (cmp, 1); | ||
| 55 | + enum rtx_code code = GET_CODE (operands[0]); | ||
| 56 | + rtx cmp_op0 = operands[1]; | ||
| 57 | + rtx cmp_op1 = operands[2]; | ||
| 58 | + rtx label1 = operands[3]; | ||
| 59 | rtx comp_reg = gen_reg_rtx (SImode); | ||
| 60 | - enum rtx_code code = *cmp_code; | ||
| 61 | - | ||
| 62 | + rtx condition; | ||
| 63 | + | ||
| 64 | gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); | ||
| 65 | |||
| 66 | /* If comparing against zero, just test source reg. */ | ||
| 67 | - if (cmp_op1 == const0_rtx) | ||
| 68 | - return cmp_op0; | ||
| 69 | + if (cmp_op1 == const0_rtx) | ||
| 70 | + { | ||
| 71 | + comp_reg = cmp_op0; | ||
| 72 | + condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp_reg, const0_rtx); | ||
| 73 | + emit_jump_insn (gen_condjump (condition, label1)); | ||
| 74 | + } | ||
| 75 | |||
| 76 | - if (code == EQ || code == NE) | ||
| 77 | + else if (code == EQ || code == NE) | ||
| 78 | { | ||
| 79 | /* Use xor for equal/not-equal comparison. */ | ||
| 80 | emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1)); | ||
| 81 | + condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp_reg, const0_rtx); | ||
| 82 | + emit_jump_insn (gen_condjump (condition, label1)); | ||
| 83 | } | ||
| 84 | - else if (code == GT || code == GTU || code == LE || code == LEU) | ||
| 85 | - { | ||
| 86 | - /* MicroBlaze compare is not symmetrical. */ | ||
| 87 | - /* Swap argument order. */ | ||
| 88 | - cmp_op1 = force_reg (mode, cmp_op1); | ||
| 89 | - if (code == GT || code == LE) | ||
| 90 | - emit_insn (gen_signed_compare (comp_reg, cmp_op0, cmp_op1)); | ||
| 91 | - else | ||
| 92 | - emit_insn (gen_unsigned_compare (comp_reg, cmp_op0, cmp_op1)); | ||
| 93 | - /* Translate test condition. */ | ||
| 94 | - *cmp_code = swap_condition (code); | ||
| 95 | - } | ||
| 96 | - else /* if (code == GE || code == GEU || code == LT || code == LTU) */ | ||
| 97 | + else | ||
| 98 | { | ||
| 99 | + /* Generate compare and branch in single instruction. */ | ||
| 100 | cmp_op1 = force_reg (mode, cmp_op1); | ||
| 101 | - if (code == GE || code == LT) | ||
| 102 | - emit_insn (gen_signed_compare (comp_reg, cmp_op1, cmp_op0)); | ||
| 103 | - else | ||
| 104 | - emit_insn (gen_unsigned_compare (comp_reg, cmp_op1, cmp_op0)); | ||
| 105 | + condition = gen_rtx_fmt_ee (code, mode, cmp_op0, cmp_op1); | ||
| 106 | + emit_jump_insn (gen_branch_compare(condition, cmp_op0, cmp_op1, label1)); | ||
| 107 | } | ||
| 108 | - | ||
| 109 | - return comp_reg; | ||
| 110 | } | ||
| 111 | |||
| 112 | -/* Generate conditional branch -- first, generate test condition, | ||
| 113 | - second, generate correct branch instruction. */ | ||
| 114 | - | ||
| 115 | -void | ||
| 116 | -microblaze_expand_conditional_branch (enum machine_mode mode, rtx operands[]) | ||
| 117 | -{ | ||
| 118 | - enum rtx_code code = GET_CODE (operands[0]); | ||
| 119 | - rtx comp; | ||
| 120 | - rtx condition; | ||
| 121 | - | ||
| 122 | - comp = microblaze_emit_compare (mode, operands[0], &code); | ||
| 123 | - condition = gen_rtx_fmt_ee (signed_condition (code), SImode, comp, const0_rtx); | ||
| 124 | - emit_jump_insn (gen_condjump (condition, operands[3])); | ||
| 125 | -} | ||
| 126 | |||
| 127 | void | ||
| 128 | microblaze_expand_conditional_branch_sf (rtx operands[]) | ||
| 129 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
| 130 | index 49d8f01..9c1e1a3 100644 | ||
| 131 | --- a/gcc/config/microblaze/microblaze.md | ||
| 132 | +++ b/gcc/config/microblaze/microblaze.md | ||
| 133 | @@ -1624,28 +1624,6 @@ | ||
| 134 | (set_attr "length" "4")] | ||
| 135 | ) | ||
| 136 | |||
| 137 | -(define_insn "signed_compare" | ||
| 138 | - [(set (match_operand:SI 0 "register_operand" "=d") | ||
| 139 | - (unspec | ||
| 140 | - [(match_operand:SI 1 "register_operand" "d") | ||
| 141 | - (match_operand:SI 2 "register_operand" "d")] UNSPEC_CMP))] | ||
| 142 | - "" | ||
| 143 | - "cmp\t%0,%1,%2" | ||
| 144 | - [(set_attr "type" "arith") | ||
| 145 | - (set_attr "mode" "SI") | ||
| 146 | - (set_attr "length" "4")]) | ||
| 147 | - | ||
| 148 | -(define_insn "unsigned_compare" | ||
| 149 | - [(set (match_operand:SI 0 "register_operand" "=d") | ||
| 150 | - (unspec | ||
| 151 | - [(match_operand:SI 1 "register_operand" "d") | ||
| 152 | - (match_operand:SI 2 "register_operand" "d")] UNSPEC_CMPU))] | ||
| 153 | - "" | ||
| 154 | - "cmpu\t%0,%1,%2" | ||
| 155 | - [(set_attr "type" "arith") | ||
| 156 | - (set_attr "mode" "SI") | ||
| 157 | - (set_attr "length" "4")]) | ||
| 158 | - | ||
| 159 | ;;---------------------------------------------------------------- | ||
| 160 | ;; Setting a register from an floating point comparison. | ||
| 161 | ;;---------------------------------------------------------------- | ||
| 162 | @@ -1719,6 +1697,47 @@ | ||
| 163 | (set_attr "length" "4")] | ||
| 164 | ) | ||
| 165 | |||
| 166 | +(define_insn "branch_compare" | ||
| 167 | + [(set (pc) | ||
| 168 | + (if_then_else (match_operator:SI 0 "cmp_op" | ||
| 169 | + [(match_operand:SI 1 "register_operand" "d") | ||
| 170 | + (match_operand:SI 2 "register_operand" "d") | ||
| 171 | + ]) | ||
| 172 | + (label_ref (match_operand 3)) | ||
| 173 | + (pc))) | ||
| 174 | + (clobber(reg:SI R_TMP))] | ||
| 175 | + "" | ||
| 176 | + { | ||
| 177 | + operands[4] = gen_rtx_REG (SImode, MB_ABI_ASM_TEMP_REGNUM); | ||
| 178 | + enum rtx_code code = GET_CODE (operands[0]); | ||
| 179 | + | ||
| 180 | + if (code == GT || code == LE) | ||
| 181 | + { | ||
| 182 | + output_asm_insn ("cmp\tr18,%z1,%z2", operands); | ||
| 183 | + code = swap_condition (code); | ||
| 184 | + } | ||
| 185 | + else if (code == GTU || code == LEU) | ||
| 186 | + { | ||
| 187 | + output_asm_insn ("cmpu\tr18,%z1,%z2", operands); | ||
| 188 | + code = swap_condition (code); | ||
| 189 | + } | ||
| 190 | + else if (code == GE || code == LT) | ||
| 191 | + { | ||
| 192 | + output_asm_insn ("cmp\tr18,%z2,%z1", operands); | ||
| 193 | + } | ||
| 194 | + else if (code == GEU || code == LTU) | ||
| 195 | + { | ||
| 196 | + output_asm_insn ("cmpu\tr18,%z2,%z1", operands); | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + operands[0] = gen_rtx_fmt_ee (signed_condition (code), SImode, operands[4], const0_rtx); | ||
| 200 | + return "b%C0i%?\tr18,%3"; | ||
| 201 | + } | ||
| 202 | + [(set_attr "type" "branch") | ||
| 203 | + (set_attr "mode" "none") | ||
| 204 | + (set_attr "length" "12")] | ||
| 205 | +) | ||
| 206 | + | ||
| 207 | ;;---------------------------------------------------------------- | ||
| 208 | ;; Unconditional branches | ||
| 209 | ;;---------------------------------------------------------------- | ||
| 210 | diff --git a/gcc/config/microblaze/predicates.md b/gcc/config/microblaze/predicates.md | ||
| 211 | index 5fd1bd4..2c23291 100644 | ||
| 212 | --- a/gcc/config/microblaze/predicates.md | ||
| 213 | +++ b/gcc/config/microblaze/predicates.md | ||
| 214 | @@ -119,3 +119,7 @@ | ||
| 215 | ;; Test for valid PIC call operand | ||
| 216 | (define_predicate "call_insn_plt_operand" | ||
| 217 | (match_test "PLT_ADDR_P (op)")) | ||
| 218 | + | ||
| 219 | +;; Return if the code of this rtx pattern is a comparison. | ||
| 220 | +(define_predicate "cmp_op" | ||
| 221 | + (match_code "gt,ge,gtu,geu,lt,le,ltu,leu")) | ||
| 222 | -- | ||
| 223 | 1.7.5.4 | ||
| 224 | |||
diff --git a/recipes-microblaze/gcc/files/0462b5f-2014-02-23-David-Holsgrove-david.holsgrove.patch b/recipes-microblaze/gcc/files/0462b5f-2014-02-23-David-Holsgrove-david.holsgrove.patch deleted file mode 100644 index efd127de..00000000 --- a/recipes-microblaze/gcc/files/0462b5f-2014-02-23-David-Holsgrove-david.holsgrove.patch +++ /dev/null | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | From 0462b5fb1e91183c16e204e1a6cf436ef0d8d0f8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 3 | Date: Sun, 23 Feb 2014 18:44:27 +0000 | ||
| 4 | Subject: [PATCH] 2014-02-23 David Holsgrove <david.holsgrove@xilinx.com> | ||
| 5 | |||
| 6 | * /config/microblaze/microblaze.c: Add microblaze_asm_output_mi_thunk | ||
| 7 | and define TARGET_ASM_OUTPUT_MI_THUNK and | ||
| 8 | TARGET_ASM_CAN_OUTPUT_MI_THUNK. | ||
| 9 | |||
| 10 | Upstream-Status: Backport | ||
| 11 | --- | ||
| 12 | gcc/config/microblaze/microblaze.c | 73 ++++++++++++++++++++++++++++++++++++++ | ||
| 13 | 2 files changed, 79 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c | ||
| 16 | index 985d26a..ba8109b 100644 | ||
| 17 | --- a/gcc/config/microblaze/microblaze.c | ||
| 18 | +++ b/gcc/config/microblaze/microblaze.c | ||
| 19 | @@ -3087,6 +3087,73 @@ expand_pic_symbol_ref (enum machine_mode mode ATTRIBUTE_UNUSED, rtx op) | ||
| 20 | return result; | ||
| 21 | } | ||
| 22 | |||
| 23 | +static void | ||
| 24 | +microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, | ||
| 25 | + HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, | ||
| 26 | + tree function) | ||
| 27 | +{ | ||
| 28 | + rtx this_rtx, insn, funexp; | ||
| 29 | + | ||
| 30 | + reload_completed = 1; | ||
| 31 | + epilogue_completed = 1; | ||
| 32 | + | ||
| 33 | + /* Mark the end of the (empty) prologue. */ | ||
| 34 | + emit_note (NOTE_INSN_PROLOGUE_END); | ||
| 35 | + | ||
| 36 | + /* Find the "this" pointer. If the function returns a structure, | ||
| 37 | + the structure return pointer is in MB_ABI_FIRST_ARG_REGNUM. */ | ||
| 38 | + if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)) | ||
| 39 | + this_rtx = gen_rtx_REG (Pmode, (MB_ABI_FIRST_ARG_REGNUM + 1)); | ||
| 40 | + else | ||
| 41 | + this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM); | ||
| 42 | + | ||
| 43 | + /* Apply the constant offset, if required. */ | ||
| 44 | + if (delta) | ||
| 45 | + emit_insn (gen_addsi3 (this_rtx, this_rtx, GEN_INT (delta))); | ||
| 46 | + | ||
| 47 | + /* Apply the offset from the vtable, if required. */ | ||
| 48 | + if (vcall_offset) | ||
| 49 | + { | ||
| 50 | + rtx vcall_offset_rtx = GEN_INT (vcall_offset); | ||
| 51 | + rtx temp1 = gen_rtx_REG (Pmode, MB_ABI_TEMP1_REGNUM); | ||
| 52 | + | ||
| 53 | + emit_move_insn (temp1, gen_rtx_MEM (Pmode, this_rtx)); | ||
| 54 | + | ||
| 55 | + rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx); | ||
| 56 | + emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc)); | ||
| 57 | + | ||
| 58 | + emit_insn (gen_addsi3 (this_rtx, this_rtx, temp1)); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /* Generate a tail call to the target function. */ | ||
| 62 | + if (!TREE_USED (function)) | ||
| 63 | + { | ||
| 64 | + assemble_external (function); | ||
| 65 | + TREE_USED (function) = 1; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + funexp = XEXP (DECL_RTL (function), 0); | ||
| 69 | + rtx temp2 = gen_rtx_REG (Pmode, MB_ABI_TEMP2_REGNUM); | ||
| 70 | + | ||
| 71 | + if (flag_pic) | ||
| 72 | + emit_move_insn (temp2, expand_pic_symbol_ref (Pmode, funexp)); | ||
| 73 | + else | ||
| 74 | + emit_move_insn (temp2, funexp); | ||
| 75 | + | ||
| 76 | + emit_insn (gen_indirect_jump (temp2)); | ||
| 77 | + | ||
| 78 | + /* Run just enough of rest_of_compilation. This sequence was | ||
| 79 | + "borrowed" from rs6000.c. */ | ||
| 80 | + insn = get_insns (); | ||
| 81 | + shorten_branches (insn); | ||
| 82 | + final_start_function (insn, file, 1); | ||
| 83 | + final (insn, file, 1); | ||
| 84 | + final_end_function (); | ||
| 85 | + | ||
| 86 | + reload_completed = 0; | ||
| 87 | + epilogue_completed = 0; | ||
| 88 | +} | ||
| 89 | + | ||
| 90 | bool | ||
| 91 | microblaze_expand_move (enum machine_mode mode, rtx operands[]) | ||
| 92 | { | ||
| 93 | @@ -3504,6 +3571,12 @@ microblaze_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x | ||
| 94 | #undef TARGET_SECONDARY_RELOAD | ||
| 95 | #define TARGET_SECONDARY_RELOAD microblaze_secondary_reload | ||
| 96 | |||
| 97 | +#undef TARGET_ASM_OUTPUT_MI_THUNK | ||
| 98 | +#define TARGET_ASM_OUTPUT_MI_THUNK microblaze_asm_output_mi_thunk | ||
| 99 | + | ||
| 100 | +#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK | ||
| 101 | +#define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_const_tree_hwi_hwi_const_tree_true | ||
| 102 | + | ||
| 103 | #undef TARGET_SCHED_ADJUST_COST | ||
| 104 | #define TARGET_SCHED_ADJUST_COST microblaze_adjust_cost | ||
| 105 | |||
| 106 | -- | ||
| 107 | 1.9.0 | ||
| 108 | |||
diff --git a/recipes-microblaze/gcc/files/Patch-microblaze-Fix-bswaphi2-implementation.patch b/recipes-microblaze/gcc/files/Patch-microblaze-Fix-bswaphi2-implementation.patch deleted file mode 100644 index b39dc4db..00000000 --- a/recipes-microblaze/gcc/files/Patch-microblaze-Fix-bswaphi2-implementation.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 2 | Subject: [PATCH] [Patch, microblaze]: Fix bswaphi2 implementation | ||
| 3 | |||
| 4 | MicroBlaze insn swaph swaps the contents of register rA | ||
| 5 | as two halfwords placing result in rD; | ||
| 6 | |||
| 7 | (rD)[0:15] <- (rA)[16:31] | ||
| 8 | (rD)[16:31] <- (rA)[0:15] | ||
| 9 | |||
| 10 | gcc bswaphi2 is intended to reverse the order of the bytes | ||
| 11 | in the half integer in rA | ||
| 12 | |||
| 13 | (rD)[8:15] <- (rA)[0:7] | ||
| 14 | (rD)[7:0] <- (rA)[8:15] | ||
| 15 | (rD)[24:31] <- (rA)[16:23] | ||
| 16 | (rD)[16:23] <- (rA)[24:31] | ||
| 17 | |||
| 18 | Correct microblaze bswaphi2 insn pattern to be a | ||
| 19 | swapb followed by swaph | ||
| 20 | |||
| 21 | Reported-by: Nathan Rossi <nathan.rossi@xilinx.com> | ||
| 22 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 23 | Upstream-Status: Pending | ||
| 24 | --- | ||
| 25 | gcc/config/microblaze/microblaze.md | 3 ++- | ||
| 26 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
| 27 | |||
| 28 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
| 29 | index ae4ade7..c7485fc 100644 | ||
| 30 | --- a/gcc/config/microblaze/microblaze.md | ||
| 31 | +++ b/gcc/config/microblaze/microblaze.md | ||
| 32 | @@ -367,7 +367,8 @@ | ||
| 33 | [(set (match_operand:HI 0 "register_operand" "=r") | ||
| 34 | (bswap:HI (match_operand:HI 1 "register_operand" "r")))] | ||
| 35 | "TARGET_REORDER" | ||
| 36 | - "swaph %0, %1" | ||
| 37 | + "swapb %0, %1 | ||
| 38 | + swaph %0, %0" | ||
| 39 | ) | ||
| 40 | |||
| 41 | ;;---------------------------------------------------------------- | ||
| 42 | -- | ||
| 43 | 1.7.1 | ||
| 44 | |||
diff --git a/recipes-microblaze/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch b/recipes-microblaze/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch deleted file mode 100644 index 934e7fa9..00000000 --- a/recipes-microblaze/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 2 | Subject: [PATCH] [Patch, microblaze]: cstoresf4, add mode and | ||
| 3 | ordered_comparison_operator | ||
| 4 | |||
| 5 | Add SImode to comparison operator, prevents ICE during combine | ||
| 6 | rtl pass with error message; | ||
| 7 | |||
| 8 | internal compiler error: in simplify_subreg, at simplify-rtx.c:5725 | ||
| 9 | |||
| 10 | Use ordered_comparison_operator predicate to limit operators to | ||
| 11 | those fcmp can handle, and letting compiler reorder insns to | ||
| 12 | accomodate unordered as necessary | ||
| 13 | |||
| 14 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
| 15 | Upstream-Status: Pending | ||
| 16 | --- | ||
| 17 | gcc/config/microblaze/microblaze.md | 4 ++-- | ||
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
| 21 | index 786dabb..e9b032b 100644 | ||
| 22 | --- a/gcc/config/microblaze/microblaze.md | ||
| 23 | +++ b/gcc/config/microblaze/microblaze.md | ||
| 24 | @@ -1650,7 +1650,7 @@ | ||
| 25 | ;;---------------------------------------------------------------- | ||
| 26 | (define_insn "cstoresf4" | ||
| 27 | [(set (match_operand:SI 0 "register_operand" "=r") | ||
| 28 | - (match_operator 1 "comparison_operator" | ||
| 29 | + (match_operator:SI 1 "ordered_comparison_operator" | ||
| 30 | [(match_operand:SF 2 "register_operand" "r") | ||
| 31 | (match_operand:SF 3 "register_operand" "r")]))] | ||
| 32 | "TARGET_HARD_FLOAT" | ||
| 33 | @@ -1679,7 +1679,7 @@ | ||
| 34 | |||
| 35 | (define_expand "cbranchsf4" | ||
| 36 | [(set (pc) | ||
| 37 | - (if_then_else (match_operator 0 "comparison_operator" | ||
| 38 | + (if_then_else (match_operator 0 "ordered_comparison_operator" | ||
| 39 | [(match_operand:SF 1 "register_operand") | ||
| 40 | (match_operand:SF 2 "register_operand")]) | ||
| 41 | (label_ref (match_operand 3 "")) | ||
| 42 | -- | ||
| 43 | 1.7.9.5 | ||
| 44 | |||
diff --git a/recipes-microblaze/gcc/gcc-microblaze-4.8.inc b/recipes-microblaze/gcc/gcc-microblaze-4.8.inc index f0578dbd..87f01816 100644 --- a/recipes-microblaze/gcc/gcc-microblaze-4.8.inc +++ b/recipes-microblaze/gcc/gcc-microblaze-4.8.inc | |||
| @@ -5,12 +5,6 @@ SRC_URI_append += " \ | |||
| 5 | file://0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch \ | 5 | file://0001-Patch-microblaze-Enable-DWARF-exception-handling-sup.patch \ |
| 6 | file://0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch \ | 6 | file://0002-Patch-microblaze-Add-4-byte-implementation-for-atomi.patch \ |
| 7 | file://0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch \ | 7 | file://0003-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch \ |
| 8 | file://0462b5f-2014-02-23-David-Holsgrove-david.holsgrove.patch \ | ||
| 9 | file://0005-Patch-microblaze-Add-fstack-usage-support.patch \ | 8 | file://0005-Patch-microblaze-Add-fstack-usage-support.patch \ |
| 10 | file://0006-Patch-microblaze-Remove-SECONDARY_MEMORY_NEEDED.patch \ | ||
| 11 | file://0007-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch \ | ||
| 12 | file://0008-Patch-microblaze-Add-branch_compare-instruction.patch \ | ||
| 13 | file://Patch-microblaze-Fix-bswaphi2-implementation.patch \ | ||
| 14 | file://Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch \ | ||
| 15 | file://gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch \ | 9 | file://gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch \ |
| 16 | " | 10 | " |
