diff options
Diffstat (limited to 'recipes-devtools/gcc/files/gcc.fix_min_max.patch')
-rw-r--r-- | recipes-devtools/gcc/files/gcc.fix_min_max.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/files/gcc.fix_min_max.patch b/recipes-devtools/gcc/files/gcc.fix_min_max.patch new file mode 100644 index 0000000..81167be --- /dev/null +++ b/recipes-devtools/gcc/files/gcc.fix_min_max.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | 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 | ||
2 | --- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500 | ||
3 | +++ gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c 2012-01-13 07:07:31.702487887 -0600 | ||
4 | @@ -17727,11 +17727,34 @@ | ||
5 | c = GEU; | ||
6 | |||
7 | if (code == SMAX || code == UMAX) | ||
8 | + { | ||
9 | target = emit_conditional_move (dest, c, op0, op1, mode, | ||
10 | op0, op1, mode, 0); | ||
11 | + if(!target) | ||
12 | + { | ||
13 | + rtx tem; | ||
14 | + tem = simplify_const_relational_operation (c, mode, op0, op1); | ||
15 | + if(rtx_equal_p(tem,const0_rtx)) | ||
16 | + target = op1; | ||
17 | + else if(rtx_equal_p(tem,const1_rtx)) | ||
18 | + target = op0; | ||
19 | + } | ||
20 | + | ||
21 | + } | ||
22 | else | ||
23 | + { | ||
24 | target = emit_conditional_move (dest, c, op0, op1, mode, | ||
25 | op1, op0, mode, 0); | ||
26 | + if(!target) | ||
27 | + { | ||
28 | + rtx tem; | ||
29 | + tem = simplify_const_relational_operation (c, mode, op0, op1); | ||
30 | + if(rtx_equal_p(tem,const0_rtx)) | ||
31 | + target = op0; | ||
32 | + else if(rtx_equal_p(tem,const1_rtx)) | ||
33 | + target = op1; | ||
34 | + } | ||
35 | + } | ||
36 | gcc_assert (target); | ||
37 | if (target != dest) | ||
38 | emit_move_insn (dest, target); | ||