]> code.ossystems Code Review - meta-freescale.git/commitdiff
gcc: add gcc.fix_min_max.patch
authorZhenhua Luo <b19537@freescale.com>
Fri, 16 Mar 2012 17:02:31 +0000 (17:02 +0000)
committerMatthew McClintock <msm@freescale.com>
Fri, 16 Mar 2012 14:19:17 +0000 (09:19 -0500)
Signed-off-by: Zhenhua Luo <b19537@freescale.com>
meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch [new file with mode: 0644]
meta-fsl-ppc/recipes-devtools/gcc/gcc-fsl.inc

diff --git a/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch b/meta-fsl-ppc/recipes-devtools/gcc/files/gcc.fix_min_max.patch
new file mode 100644 (file)
index 0000000..81167be
--- /dev/null
@@ -0,0 +1,38 @@
+diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c
+--- gcc-4.6.2/gcc/config/rs6000/rs6000.c       2011-09-18 17:01:56.000000000 -0500
++++ gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c  2012-01-13 07:07:31.702487887 -0600
+@@ -17727,11 +17727,34 @@
+     c = GEU;
+   if (code == SMAX || code == UMAX)
++  {
+     target = emit_conditional_move (dest, c, op0, op1, mode,
+                                   op0, op1, mode, 0);
++    if(!target)
++    {
++      rtx tem;
++      tem = simplify_const_relational_operation (c, mode, op0, op1);
++      if(rtx_equal_p(tem,const0_rtx))
++         target = op1;
++      else if(rtx_equal_p(tem,const1_rtx))
++         target = op0;
++    }
++ 
++  }
+   else
++  {
+     target = emit_conditional_move (dest, c, op0, op1, mode,
+                                   op1, op0, mode, 0);
++    if(!target)
++    {
++      rtx tem;
++      tem = simplify_const_relational_operation (c, mode, op0, op1);
++      if(rtx_equal_p(tem,const0_rtx))
++         target = op0;
++      else if(rtx_equal_p(tem,const1_rtx))
++         target = op1;
++    }
++  }
+   gcc_assert (target);
+   if (target != dest)
+     emit_move_insn (dest, target);
index 2e5be82299d3ef8aaa5add16655b222b38698167..9e7c615515ca1007f013beaeb51b3b5bf361d45a 100644 (file)
@@ -38,8 +38,9 @@ SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
           file://gcc.fix_header_issue.patch \
           file://gcc.fix_SSIZE_MAX_undefine_issue.patch \
           file://GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch \
+          file://gcc.fix_min_max.patch \
 "
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 
-PR_fsl .= "+${DISTRO}.1"
+PR_fsl .= "+${DISTRO}.2"