From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22901 invoked by alias); 4 Mar 2013 23:37:25 -0000 Received: (qmail 21092 invoked by uid 48); 4 Mar 2013 23:37:06 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56529] New: [SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2 Date: Mon, 04 Mar 2013 23:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg00292.txt.bz2 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).