From 581e8a514bf7e7c3fb7df219dca55fae5de044c0 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 24 Sep 2018 23:26:46 -0700 Subject: Fix build with ISL 0.20 Signed-off-by: Alexey Neyman diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 48ec556..74fbb70 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -11,8 +11,10 @@ ## select ISL_REQUIRE_0_15_or_later if ISL_NEEDED && GCC_7_or_later # GCC6 requires ISL 0.14+ (it says 0.14-0.16, but accepts newer ISL as well) ## select ISL_REQUIRE_0_14_or_later if ISL_NEEDED && GCC_6_or_later -# GCC5 requires ISL 0.12+ (again, it says 0.12-0.16, but also accepts newer ISL) +# GCC5 requires ISL 0.12+ (again, it says 0.12-0.16, but also accepts newer ISL up to 0.18; +# fails to compile with 0.19+) ## select ISL_REQUIRE_0_12_or_later if ISL_NEEDED && GCC_5_or_later +## select ISL_REQUIRE_0_18_or_older if ISL_NEEDED && GCC_5_or_later && !GCC_6_or_later # GCC4.9 requires ISL 0.10..0.15 # GCC4.8 requires ISL 0.10..0.14 ## select ISL_REQUIRE_0_10_or_later if ISL_NEEDED && GCC_4_8_or_later diff --git a/packages/gcc-linaro/6.4-2018.05/0028-isl-0.20.patch b/packages/gcc-linaro/6.4-2018.05/0028-isl-0.20.patch new file mode 100644 index 0000000..f253eab --- /dev/null +++ b/packages/gcc-linaro/6.4-2018.05/0028-isl-0.20.patch @@ -0,0 +1,26 @@ +commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0 +Author: Alexey Neyman +Date: Mon Sep 24 22:50:11 2018 -0700 + + Fix build with ISL 0.20 + + * gcc/graphite.h: Include and ; these + headers are no longer pulled in by . + + Signed-off-by: Alexey Neyman + +--- + gcc/graphite.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/packages/gcc-linaro/7.3-2018.05/0020-isl-0.20.patch b/packages/gcc-linaro/7.3-2018.05/0020-isl-0.20.patch new file mode 100644 index 0000000..3e14966 --- /dev/null +++ b/packages/gcc-linaro/7.3-2018.05/0020-isl-0.20.patch @@ -0,0 +1,26 @@ +commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0 +Author: Alexey Neyman +Date: Mon Sep 24 22:50:11 2018 -0700 + + Fix build with ISL 0.20 + + * gcc/graphite.h: Include and ; these + headers are no longer pulled in by . + + Signed-off-by: Alexey Neyman + +--- + gcc/graphite.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch b/packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch index 69da404..31356a0 100644 --- a/packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch +++ b/packages/gcc/5.5.0/0034-xtensa-fix-PR-target-65416.patch @@ -22,11 +22,9 @@ gcc/ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261755 138bc75d-0d04-0410-961f-82ee72b054a4 Signed-off-by: Max Filippov --- - gcc/config/xtensa/xtensa.md | 46 +++++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/xtensa.md | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) -diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md -index a4228da2bb44..61c963a02037 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -38,6 +38,7 @@ @@ -96,6 +94,3 @@ index a4228da2bb44..61c963a02037 100644 (define_insn "trap" [(trap_if (const_int 1) (const_int 0))] "" --- -2.11.0 - diff --git a/packages/gcc/6.4.0/0032-xtensa-fix-PR-target-65416.patch b/packages/gcc/6.4.0/0032-xtensa-fix-PR-target-65416.patch new file mode 100644 index 0000000..14fd30f --- /dev/null +++ b/packages/gcc/6.4.0/0032-xtensa-fix-PR-target-65416.patch @@ -0,0 +1,96 @@ +From fa0a207efdfca73fdcd1798789b7121e9e9ae90f Mon Sep 17 00:00:00 2001 +From: jcmvbkbc +Date: Tue, 19 Jun 2018 18:26:07 +0000 +Subject: [PATCH] xtensa: fix PR target/65416 + +The issue is caused by reordering of stack pointer update after stack +space allocation with instructions that write to the allocated stack +space. In windowed ABI register spill area for the previous call frame +is located just below the stack pointer and may be reloaded back into +the register file on movsp. +Implement allocate_stack pattern for windowed ABI configuration and +insert an instruction that prevents reordering of frame memory access +and stack pointer update. + +gcc/ +2018-06-19 Max Filippov + + * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec + constant. + (allocate_stack, frame_blockage, *frame_blockage): New patterns. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261755 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + gcc/config/xtensa/xtensa.md | 46 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +--- a/gcc/config/xtensa/xtensa.md ++++ b/gcc/config/xtensa/xtensa.md +@@ -38,6 +38,7 @@ + (UNSPEC_MEMW 11) + (UNSPEC_LSETUP_START 12) + (UNSPEC_LSETUP_END 13) ++ (UNSPEC_FRAME_BLOCKAGE 14) + + (UNSPECV_SET_FP 1) + (UNSPECV_ENTRY 2) +@@ -1676,6 +1677,32 @@ + + ;; Miscellaneous instructions. + ++;; In windowed ABI stack pointer adjustment must happen before any access ++;; to the space allocated on stack is allowed, otherwise register spill ++;; area may be clobbered. That's what frame blockage is supposed to enforce. ++ ++(define_expand "allocate_stack" ++ [(set (match_operand 0 "nonimmed_operand") ++ (minus (reg A1_REG) (match_operand 1 "add_operand"))) ++ (set (reg A1_REG) ++ (minus (reg A1_REG) (match_dup 1)))] ++ "TARGET_WINDOWED_ABI" ++{ ++ if (CONST_INT_P (operands[1])) ++ { ++ rtx neg_op0 = GEN_INT (-INTVAL (operands[1])); ++ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0)); ++ } ++ else ++ { ++ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, ++ operands[1])); ++ } ++ emit_move_insn (operands[0], virtual_stack_dynamic_rtx); ++ emit_insn (gen_frame_blockage ()); ++ DONE; ++}) ++ + (define_expand "prologue" + [(const_int 0)] + "" +@@ -1767,6 +1794,25 @@ + [(set_attr "length" "0") + (set_attr "type" "nop")]) + ++;; Do not schedule instructions accessing memory before this point. ++ ++(define_expand "frame_blockage" ++ [(set (match_dup 0) ++ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))] ++ "" ++{ ++ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); ++ MEM_VOLATILE_P (operands[0]) = 1; ++ operands[1] = stack_pointer_rtx; ++}) ++ ++(define_insn "*frame_blockage" ++ [(set (match_operand:BLK 0 "" "") ++ (unspec:BLK [(match_operand:SI 1 "" "")] UNSPEC_FRAME_BLOCKAGE))] ++ "" ++ "" ++ [(set_attr "length" "0")]) ++ + (define_insn "trap" + [(trap_if (const_int 1) (const_int 0))] + "" diff --git a/packages/gcc/6.4.0/0033-isl-0.20.patch b/packages/gcc/6.4.0/0033-isl-0.20.patch new file mode 100644 index 0000000..f253eab --- /dev/null +++ b/packages/gcc/6.4.0/0033-isl-0.20.patch @@ -0,0 +1,26 @@ +commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0 +Author: Alexey Neyman +Date: Mon Sep 24 22:50:11 2018 -0700 + + Fix build with ISL 0.20 + + * gcc/graphite.h: Include and ; these + headers are no longer pulled in by . + + Signed-off-by: Alexey Neyman + +--- + gcc/graphite.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/packages/gcc/6.4.0/0034-xtensa-fix-PR-target-65416.patch b/packages/gcc/6.4.0/0034-xtensa-fix-PR-target-65416.patch deleted file mode 100644 index e352975..0000000 --- a/packages/gcc/6.4.0/0034-xtensa-fix-PR-target-65416.patch +++ /dev/null @@ -1,101 +0,0 @@ -From fa0a207efdfca73fdcd1798789b7121e9e9ae90f Mon Sep 17 00:00:00 2001 -From: jcmvbkbc -Date: Tue, 19 Jun 2018 18:26:07 +0000 -Subject: [PATCH] xtensa: fix PR target/65416 - -The issue is caused by reordering of stack pointer update after stack -space allocation with instructions that write to the allocated stack -space. In windowed ABI register spill area for the previous call frame -is located just below the stack pointer and may be reloaded back into -the register file on movsp. -Implement allocate_stack pattern for windowed ABI configuration and -insert an instruction that prevents reordering of frame memory access -and stack pointer update. - -gcc/ -2018-06-19 Max Filippov - - * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec - constant. - (allocate_stack, frame_blockage, *frame_blockage): New patterns. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261755 138bc75d-0d04-0410-961f-82ee72b054a4 -Signed-off-by: Max Filippov ---- - gcc/config/xtensa/xtensa.md | 46 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 46 insertions(+) - -diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md -index fcdb6c8ecadf..6b27e2ba76f9 100644 ---- a/gcc/config/xtensa/xtensa.md -+++ b/gcc/config/xtensa/xtensa.md -@@ -38,6 +38,7 @@ - (UNSPEC_MEMW 11) - (UNSPEC_LSETUP_START 12) - (UNSPEC_LSETUP_END 13) -+ (UNSPEC_FRAME_BLOCKAGE 14) - - (UNSPECV_SET_FP 1) - (UNSPECV_ENTRY 2) -@@ -1676,6 +1677,32 @@ - - ;; Miscellaneous instructions. - -+;; In windowed ABI stack pointer adjustment must happen before any access -+;; to the space allocated on stack is allowed, otherwise register spill -+;; area may be clobbered. That's what frame blockage is supposed to enforce. -+ -+(define_expand "allocate_stack" -+ [(set (match_operand 0 "nonimmed_operand") -+ (minus (reg A1_REG) (match_operand 1 "add_operand"))) -+ (set (reg A1_REG) -+ (minus (reg A1_REG) (match_dup 1)))] -+ "TARGET_WINDOWED_ABI" -+{ -+ if (CONST_INT_P (operands[1])) -+ { -+ rtx neg_op0 = GEN_INT (-INTVAL (operands[1])); -+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0)); -+ } -+ else -+ { -+ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, -+ operands[1])); -+ } -+ emit_move_insn (operands[0], virtual_stack_dynamic_rtx); -+ emit_insn (gen_frame_blockage ()); -+ DONE; -+}) -+ - (define_expand "prologue" - [(const_int 0)] - "" -@@ -1767,6 +1794,25 @@ - [(set_attr "length" "0") - (set_attr "type" "nop")]) - -+;; Do not schedule instructions accessing memory before this point. -+ -+(define_expand "frame_blockage" -+ [(set (match_dup 0) -+ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))] -+ "" -+{ -+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); -+ MEM_VOLATILE_P (operands[0]) = 1; -+ operands[1] = stack_pointer_rtx; -+}) -+ -+(define_insn "*frame_blockage" -+ [(set (match_operand:BLK 0 "" "") -+ (unspec:BLK [(match_operand:SI 1 "" "")] UNSPEC_FRAME_BLOCKAGE))] -+ "" -+ "" -+ [(set_attr "length" "0")]) -+ - (define_insn "trap" - [(trap_if (const_int 1) (const_int 0))] - "" --- -2.11.0 - diff --git a/packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch b/packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch index 721df32..37dc7f8 100644 --- a/packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch +++ b/packages/gcc/7.3.0/0022-xtensa-fix-PR-target-65416.patch @@ -22,11 +22,9 @@ gcc/ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261755 138bc75d-0d04-0410-961f-82ee72b054a4 Signed-off-by: Max Filippov --- - gcc/config/xtensa/xtensa.md | 46 +++++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/xtensa.md | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) -diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md -index d5596e25d828..0eba10b742cd 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -38,6 +38,7 @@ @@ -96,6 +94,3 @@ index d5596e25d828..0eba10b742cd 100644 (define_insn "trap" [(trap_if (const_int 1) (const_int 0))] "" --- -2.11.0 - diff --git a/packages/gcc/7.3.0/0023-isl-0.20.patch b/packages/gcc/7.3.0/0023-isl-0.20.patch new file mode 100644 index 0000000..3e14966 --- /dev/null +++ b/packages/gcc/7.3.0/0023-isl-0.20.patch @@ -0,0 +1,26 @@ +commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0 +Author: Alexey Neyman +Date: Mon Sep 24 22:50:11 2018 -0700 + + Fix build with ISL 0.20 + + * gcc/graphite.h: Include and ; these + headers are no longer pulled in by . + + Signed-off-by: Alexey Neyman + +--- + gcc/graphite.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/packages/gcc/8.2.0/0019-isl-0.20.patch b/packages/gcc/8.2.0/0019-isl-0.20.patch new file mode 100644 index 0000000..3e14966 --- /dev/null +++ b/packages/gcc/8.2.0/0019-isl-0.20.patch @@ -0,0 +1,26 @@ +commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0 +Author: Alexey Neyman +Date: Mon Sep 24 22:50:11 2018 -0700 + + Fix build with ISL 0.20 + + * gcc/graphite.h: Include and ; these + headers are no longer pulled in by . + + Signed-off-by: Alexey Neyman + +--- + gcc/graphite.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/gcc/graphite.h ++++ b/gcc/graphite.h +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/packages/isl/package.desc b/packages/isl/package.desc index 727bd30..3e1e9ca 100644 --- a/packages/isl/package.desc +++ b/packages/isl/package.desc @@ -1,5 +1,5 @@ repository='git git://repo.or.cz/isl.git' bootstrap='./autogen.sh' mirrors='http://isl.gforge.inria.fr' -milestones='0.12 0.13 0.14 0.15' +milestones='0.12 0.13 0.14 0.15 0.18' archive_formats='.tar.xz .tar.bz2 .tar.gz' -- cgit v0.10.2-6-g49f6