public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
@ 2013-03-04 23:37 olegendo at gcc dot gnu.org
2013-03-04 23:44 ` [Bug target/56529] " olegendo at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-04 23:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
Bug #: 56529
Summary: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are
generated on SH2
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: olegendo@gcc.gnu.org
Target: sh*-*-*
The original problem was reported here:
http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00088.html
Actually the compiler should prohibit the -mdiv=call-table option on SH2,
because there is no suitable implementation in libgcc.
However, this fails, due to the following lines in sh.c:
/* SH1 .. SH3 cores often go into small-footprint systems, so
default to the smallest implementation available. */
else if (TARGET_SH2) /* ??? EXPERIMENTAL */
sh_div_strategy = SH_DIV_CALL_TABLE;
I'm not sure what that is for, but it certainly is broken or incomplete (libgcc
pieces missing).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/56529] [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
@ 2013-03-04 23:44 ` olegendo at gcc dot gnu.org
2013-03-05 0:59 ` kkojima at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-04 23:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-04 23:44:09 UTC ---
Created attachment 29581
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29581
A possible patch
This patch seems to fix the problem, although tested only with 'make all-gcc'.
BTW, the 'call-table' option for -mdiv= hasn't been documented either. Will
fix that, too.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/56529] [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
2013-03-04 23:44 ` [Bug target/56529] " olegendo at gcc dot gnu.org
@ 2013-03-05 0:59 ` kkojima at gcc dot gnu.org
2013-03-06 0:41 ` olegendo at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kkojima at gcc dot gnu.org @ 2013-03-05 0:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu.org
--- Comment #2 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2013-03-05 00:58:33 UTC ---
(In reply to comment #1)
> Created attachment 29581 [details]
> A possible patch
The patch looks fine. Pre-approved.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/56529] [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
2013-03-04 23:44 ` [Bug target/56529] " olegendo at gcc dot gnu.org
2013-03-05 0:59 ` kkojima at gcc dot gnu.org
@ 2013-03-06 0:41 ` olegendo at gcc dot gnu.org
2013-03-06 22:54 ` olegendo at gcc dot gnu.org
2013-03-09 12:08 ` olegendo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-06 0:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-06 00:41:33 UTC ---
Author: olegendo
Date: Wed Mar 6 00:41:25 2013
New Revision: 196484
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196484
Log:
PR target/56529
* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
instead of TARGET_SH2 for call-table case. Do not set sh_div_strategy
to SH_DIV_CALL_TABLE for TARGET_SH2.
* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
list.
* doc/invoke.texi (SH options): Document mdiv= call-div1, call-fp,
call-table options.
PR target/56529
* config/sh/lib1funcs.S (udivsi3_i4i, sdivsi3_i4i): Add __SH2A__ to
inclusion list.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/config/sh/sh.c
trunk/gcc/doc/invoke.texi
trunk/libgcc/ChangeLog
trunk/libgcc/config/sh/lib1funcs.S
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/56529] [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
` (2 preceding siblings ...)
2013-03-06 0:41 ` olegendo at gcc dot gnu.org
@ 2013-03-06 22:54 ` olegendo at gcc dot gnu.org
2013-03-09 12:08 ` olegendo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-06 22:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-06 22:54:18 UTC ---
Author: olegendo
Date: Wed Mar 6 22:54:11 2013
New Revision: 196510
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196510
Log:
Backport from mainline
2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
PR target/56529
* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
instead of TARGET_SH2 for call-table case. Do not set sh_div_strategy
to SH_DIV_CALL_TABLE for TARGET_SH2.
* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
list.
* doc/invoke.texi (SH options): Use table for mdiv= option. Document
mdiv= call-div1, call-fp, call-table options.
Backport from mainline.
2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
PR target/56529
* config/sh/lib1funcs.S (udivsi3_i4i, sdivsi3_i4i): Add __SH2A__ to
inclusion list.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config.gcc
branches/gcc-4_7-branch/gcc/config/sh/sh.c
branches/gcc-4_7-branch/gcc/doc/invoke.texi
branches/gcc-4_7-branch/libgcc/ChangeLog
branches/gcc-4_7-branch/libgcc/config/sh/lib1funcs.S
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/56529] [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
` (3 preceding siblings ...)
2013-03-06 22:54 ` olegendo at gcc dot gnu.org
@ 2013-03-09 12:08 ` olegendo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-03-09 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56529
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-03-09 12:08:31 UTC ---
Fixed on 4.7 and 4.8.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-09 12:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 23:37 [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 olegendo at gcc dot gnu.org
2013-03-04 23:44 ` [Bug target/56529] " olegendo at gcc dot gnu.org
2013-03-05 0:59 ` kkojima at gcc dot gnu.org
2013-03-06 0:41 ` olegendo at gcc dot gnu.org
2013-03-06 22:54 ` olegendo at gcc dot gnu.org
2013-03-09 12:08 ` olegendo at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).