Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.7.1/gentoo: 40_all_superh-mieee-default-fix-pr33135.patch README.history
Date: Sun, 25 Nov 2012 03:34:32
Message-Id: 20121125033356.741EC215FF@flycatcher.gentoo.org
1 vapier 12/11/25 03:33:56
2
3 Modified: README.history
4 Added: 40_all_superh-mieee-default-fix-pr33135.patch
5 Log:
6 add fix from upstream for -fno-finite-math-only handling on SuperH PR33135 #439988
7
8 Revision Changes Path
9 1.9 src/patchsets/gcc/4.7.1/gentoo/README.history
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.1/gentoo/README.history?rev=1.9&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.1/gentoo/README.history?rev=1.9&content-type=text/plain
13 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.1/gentoo/README.history?r1=1.8&r2=1.9
14
15 Index: README.history
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.7.1/gentoo/README.history,v
18 retrieving revision 1.8
19 retrieving revision 1.9
20 diff -u -r1.8 -r1.9
21 --- README.history 22 Nov 2012 04:02:46 -0000 1.8
22 +++ README.history 25 Nov 2012 03:33:56 -0000 1.9
23 @@ -1,5 +1,6 @@
24 1.6 [pending]
25 - 03_all_java-nomulti.patch
26 + + 40_all_superh-mieee-default-fix-pr33135.patch
27
28 1.5 21 Oct 2012
29 + 39_all_gfortran-sysroot-pr54725.patch
30
31
32
33 1.1 src/patchsets/gcc/4.7.1/gentoo/40_all_superh-mieee-default-fix-pr33135.patch
34
35 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.1/gentoo/40_all_superh-mieee-default-fix-pr33135.patch?rev=1.1&view=markup
36 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.1/gentoo/40_all_superh-mieee-default-fix-pr33135.patch?rev=1.1&content-type=text/plain
37
38 Index: 40_all_superh-mieee-default-fix-pr33135.patch
39 ===================================================================
40 https://bugs.gentoo.org/439988
41 http://gcc.gnu.org/PR33135
42
43 From 16877e7c80bd921fdff0e32e6d4887731985a58a Mon Sep 17 00:00:00 2001
44 From: olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>
45 Date: Sun, 22 Jul 2012 23:44:45 +0000
46 Subject: [PATCH] PR target/33135 * config/sh/sh.opt (mieee):
47 Use Var instead of Mask. Correct description. *
48 config/sh/sh.c (sh_option_override): Do not change
49 flag_finite_math_only. Set TARGET_IEEE to complement of
50 flag_finite_math_only. * doc/invoke.texi (SH
51 options): Add mno-ieee. Correct description of mieee
52 and mno-ieee behavior.
53
54 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189761 138bc75d-0d04-0410-961f-82ee72b054a4
55 ---
56 gcc/ChangeLog | 11 +++++++++++
57 gcc/config/sh/sh.c | 10 +++++-----
58 gcc/config/sh/sh.opt | 4 ++--
59 gcc/doc/invoke.texi | 18 ++++++++++--------
60 4 files changed, 28 insertions(+), 15 deletions(-)
61
62 diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
63 index 9d0ede3..f828ed4 100644
64 --- a/gcc/config/sh/sh.c
65 +++ b/gcc/config/sh/sh.c
66 @@ -592,11 +592,6 @@ sh_option_override (void)
67 SUBTARGET_OVERRIDE_OPTIONS;
68 if (optimize > 1 && !optimize_size)
69 target_flags |= MASK_SAVE_ALL_TARGET_REGS;
70 - if (flag_finite_math_only == 2)
71 - flag_finite_math_only
72 - = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
73 - if (TARGET_SH2E && !flag_finite_math_only)
74 - target_flags |= MASK_IEEE;
75 sh_cpu = PROCESSOR_SH1;
76 assembler_dialect = 0;
77 if (TARGET_SH2)
78 @@ -843,6 +838,11 @@ sh_option_override (void)
79 align_functions = min_align;
80 }
81
82 + /* If the -mieee option was not explicitly set by the user, turn it on
83 + unless -ffinite-math-only was specified. See also PR 33135. */
84 + if (! global_options_set.x_TARGET_IEEE)
85 + TARGET_IEEE = ! flag_finite_math_only;
86 +
87 if (sh_fixed_range_str)
88 sh_fix_range (sh_fixed_range_str);
89
90 diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt
91 index 13771eb..bf3f64d 100644
92 --- a/gcc/config/sh/sh.opt
93 +++ b/gcc/config/sh/sh.opt
94 @@ -270,8 +270,8 @@ Target Report RejectNegative Mask(HITACHI)
95 Follow Renesas (formerly Hitachi) / SuperH calling conventions
96
97 mieee
98 -Target Report Mask(IEEE)
99 -Increase the IEEE compliance for floating-point code
100 +Target Var(TARGET_IEEE)
101 +Increase the IEEE compliance for floating-point comparisons
102
103 mindexed-addressing
104 Target Report Mask(ALLOW_INDEXED_ADDRESS) Condition(SUPPORT_ANY_SH5_32MEDIA)
105 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
106 index a513e01..aa8a0d3 100644
107 --- a/gcc/doc/invoke.texi
108 +++ b/gcc/doc/invoke.texi
109 @@ -883,8 +883,8 @@ See RS/6000 and PowerPC Options.
110 -m5-compact -m5-compact-nofpu @gol
111 -mb -ml -mdalign -mrelax @gol
112 -mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
113 --mieee -mbitops -misize -minline-ic_invalidate -mpadstruct -mspace @gol
114 --mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
115 +-mieee -mno-ieee -mbitops -misize -minline-ic_invalidate -mpadstruct @gol
116 +-mspace -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
117 -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
118 -madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
119 -maccumulate-outgoing-args -minvalid-symbols -msoft-atomic @gol
120 @@ -17970,13 +17970,15 @@ Mark the @code{MAC} register as call-clobbered, even if
121 @option{-mhitachi} is given.
122
123 @item -mieee
124 +@item -mno-ieee
125 @opindex mieee
126 -Increase IEEE compliance of floating-point code.
127 -At the moment, this is equivalent to @option{-fno-finite-math-only}.
128 -When generating 16-bit SH opcodes, getting IEEE-conforming results for
129 -comparisons of NANs / infinities incurs extra overhead in every
130 -floating-point comparison, therefore the default is set to
131 -@option{-ffinite-math-only}.
132 +@opindex mnoieee
133 +Control the IEEE compliance of floating-point comparisons, which affects the
134 +handling of cases where the result of a comparison is unordered. By default
135 +@option{-mieee} is implicitly enabled. If @option{-ffinite-math-only} is
136 +enabled @option{-mno-ieee} is implicitly set, which results in faster
137 +floating-point greater-equal and less-equal comparisons. The implcit settings
138 +can be overridden by specifying either @option{-mieee} or @option{-mno-ieee}.
139
140 @item -minline-ic_invalidate
141 @opindex minline-ic_invalidate
142 --
143 1.7.12.4