From 692e54a3ef33e6149921b430dc6419519784d228 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Thu, 11 Jul 2013 14:52:59 +1000 Subject: gcc: Add patch to resolve MicroBlaze -mhard-float issue * Resolve internal compiler error for MicroBlaze when -mhard-float is set. Signed-off-by: Nathan Rossi --- ...blaze-cstoresf4-add-mode-and-ordered_comp.patch | 44 ++++++++++++++++++++++ recipes-devtools/gcc/gcc-microblaze-4.8.inc | 1 + 2 files changed, 45 insertions(+) create mode 100644 recipes-devtools/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch (limited to 'recipes-devtools') diff --git a/recipes-devtools/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch b/recipes-devtools/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch new file mode 100644 index 00000000..934e7fa9 --- /dev/null +++ b/recipes-devtools/gcc/files/Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch @@ -0,0 +1,44 @@ +From: David Holsgrove +Subject: [PATCH] [Patch, microblaze]: cstoresf4, add mode and + ordered_comparison_operator + +Add SImode to comparison operator, prevents ICE during combine +rtl pass with error message; + +internal compiler error: in simplify_subreg, at simplify-rtx.c:5725 + +Use ordered_comparison_operator predicate to limit operators to +those fcmp can handle, and letting compiler reorder insns to +accomodate unordered as necessary + +Signed-off-by: David Holsgrove +Upstream-Status: Pending +--- + gcc/config/microblaze/microblaze.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md +index 786dabb..e9b032b 100644 +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -1650,7 +1650,7 @@ + ;;---------------------------------------------------------------- + (define_insn "cstoresf4" + [(set (match_operand:SI 0 "register_operand" "=r") +- (match_operator 1 "comparison_operator" ++ (match_operator:SI 1 "ordered_comparison_operator" + [(match_operand:SF 2 "register_operand" "r") + (match_operand:SF 3 "register_operand" "r")]))] + "TARGET_HARD_FLOAT" +@@ -1679,7 +1679,7 @@ + + (define_expand "cbranchsf4" + [(set (pc) +- (if_then_else (match_operator 0 "comparison_operator" ++ (if_then_else (match_operator 0 "ordered_comparison_operator" + [(match_operand:SF 1 "register_operand") + (match_operand:SF 2 "register_operand")]) + (label_ref (match_operand 3 "")) +-- +1.7.9.5 + diff --git a/recipes-devtools/gcc/gcc-microblaze-4.8.inc b/recipes-devtools/gcc/gcc-microblaze-4.8.inc index 7d68f8d0..8acd32b2 100644 --- a/recipes-devtools/gcc/gcc-microblaze-4.8.inc +++ b/recipes-devtools/gcc/gcc-microblaze-4.8.inc @@ -11,4 +11,5 @@ SRC_URI_append += " \ file://0007-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch \ file://0008-Patch-microblaze-Add-branch_compare-instruction.patch \ file://Patch-microblaze-Fix-bswaphi2-implementation.patch \ + file://Patch-microblaze-cstoresf4-add-mode-and-ordered_comp.patch \ " -- cgit v1.2.3-54-g00ecf