GCC uses suboptimal Thumb-1 code in libgcc, causing slow integer divide etc.

Bug #589779 reported by Dave Martin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.4 (Ubuntu)
High
Unassigned
Maverick
High
Unassigned

Bug Description

Binary package hint: gcc-4.4

Affected: lucid gcc-4.4 (4.4.3-4ubuntu5)

GCC has some special-case Thumb-1 code for libgcc (in
gcc/config/arm/lib1funcs.asm) which is being assembled in preference to the ARM implementation
as a result of targeting the compiler to Thumb. I haven't benchmarked anything, but it's
highly likely to be significantly slow compared to an ARM/Thumb-2 implementation.

Fixed on trunk by the following patch:

http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00365.html

Related branches

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Note: we should aim to resolve this early for maverick to maximise the number of binary packages which benfit.

description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

presumably we should target this for fixing at the same time as we get the CS patches in, since that's when rebuilds will begin in earnest?

Steve Langasek (vorlon)
Changed in gcc-4.4 (Ubuntu Maverick):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Attached patch adds that speedup into gcc-4.4 package.

Not tested on device.

Revision history for this message
Matthias Klose (doko) wrote :

delaying this until the CS merge

Revision history for this message
Matthias Klose (doko) wrote :

part of the cs merge; applied in the ubuntu-toolchain-r PPA

Changed in gcc-4.4 (Ubuntu Maverick):
status: Triaged → In Progress
tags: added: toolchain
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.4 - 4.4.4-6ubuntu1

---------------
gcc-4.4 (4.4.4-6ubuntu1) maverick; urgency=low

  * Merge with Debian.

gcc-4.4 (4.4.4-6) unstable; urgency=low

  * Update to SVN 20100622 from the gcc-4_4-branch (r161235).
    - Fix PR bootstrap/44544, PR fortran/44536, PR target/44534,
      PR tree-optimization/44508, PR target/44261, PR target/43740,
      PR bootstrap/44426. PR c++/44627 (LP: #503668), PR target/39690.

  [ Matthias Klose ]
  * Add M68K TLS support, backport from the 4.5 branch. Closes: #586060.
  * Merge binary-libgcc.mk packaging changes into binary-libgcc-cross.mk
    (Loic Minier).
  * Fix Fortran cross-compiler build when not building the runtime library.
  * Apply proposed fix for PR target/44626 (backport from the 4.5 branch).
    LP: #564492.
  * Add maintainer scripts for cross packages.

  [ Marcin Juszkiewicz ]
  * Merge the rules.d/binary-*-cross.mk files into rules.d/binary-*.mk.
  * ARM: speed up division on Thumb-2 (backport from the trunk). LP: #589779.

gcc-4.4 (4.4.4-5) unstable; urgency=low

  [ Matthias Klose ]

  * Update to SVN 20100612 from the gcc-4_4-branch (r160657).
    - Fix PR target/44169, PR target/44481, PR target/44075, PR other/43838,
      PR libstdc++/32499, PR libgcj/44216.
  * debian/patches/libstdc++-pic.diff: Fix installation for cross builds.
  * Update libsupc++/vmi_class_type_info.cc from the 4.5 branch.
    Closes: #584308.
  * Export long double versions of "C" math library for arm-linux-gnueabi,
    m68k-linux-gnu (ColdFire), mips*-linux-gnu (o32 ABI), sh*-linux-gnu
    (not 32 bit). Merge the libstdc++-*-ldbl-compat.diff patches.
  * Remove the backport for the plugin support.

  [ Aurelien Jarno ]
  * libstdc++-mips-ldbl-compat.diff: On MIPS provide the long double
    versions of "C" math functions in libstdc++ as we need to keep the
    ABI. Closes: #584610.
 -- Matthias Klose <email address hidden> Fri, 25 Jun 2010 15:04:36 +0200

Changed in gcc-4.4 (Ubuntu Maverick):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers