Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-3645

Qt apps can't exploit the hardware FPU on Symbian^3 devices

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • Qt Creator 2.1.0-rc1
    • None
    • Windows (ie any environment in which the Symbian functionality of the Qt SDK 1.1 runs).

    Description

      SDK 1.1 doesn't provide a way for ISVs to build apps which use the FPU on Symbian^3 devices.

      The diff posted below causes all Symbian^3 apps to build using ARM ISA and VFPv2 instructions (instead of the default Thumb ISA and AEABI helper calls for floating-point operations). With this diff, my floating-point code runs 5x-8x faster than without it.

      Because this causes code to build using ARM, not Thumb, there is a slight binary-size bloat for non-floating-point programs (perhaps 50%) which also reduces performance (perhaps by 5%). Therefore this hack is not recommended as the requested fix – rather, there needs to be a project-specific option (eg in the .pro file) to enable ISVs to make this choice.

      This is only requested for Symbian^3 and later. In Symbian^1 and earlier, there are a (very) few models with a kernel bug which means that enabling floating-point isn't actually safe.

      Finally note that this is not the same as QTBUG-14244 which requests that the Qt runtime itself (or more significant parts of it) be built with hardware floating-point enabled. That is a quite separate question, from enabling ISVs to choose whether to build ther apps with floating-point.

      Here's the diff:

      diff --git a/tools/sbs/lib/config/gcce.xml b/tools/sbs/lib/config/gcce.xml
      index d11e449..91b7510 100644
      — a/tools/sbs/lib/config/gcce.xml
      +++ b/tools/sbs/lib/config/gcce.xml
      @@ -25,7 +25,7 @@
      <set name="ASSEMBLER_LISTING_OPTION" value="-S"/>
      <set name="BPABI_OPTION" value=""/>
      <set name="C_LANG_OPTION" value="-x c"/>

      • <set name="CC.ARMV5" value="-march=armv5t"/>
        + <set name="CC.ARMV5" value="-march=armv6"/>
        <set name="CC.ARMV6" value="-march=armv6t2"/>
        <set name="CC.ARMV7" value="-march=armv7"/>
        <!-- From the GCC manual: "With this option, GCC uses features of DWARF version 3 when they are useful; ..." -->
        @@ -33,7 +33,7 @@
        <set name="CC.DWARF2" value="-gdwarf-2"/>
        <set name="CC.DWARF3" value="-gdwarf-2"/>
        <set name="CC.NO_UNALIGNED_ACCESS" value=""/>
      • <set name="CC.SOFTVFP_MAYBE_VFPV2" value="soft"/>
        + <set name="CC.SOFTVFP_MAYBE_VFPV2" value="softfp"/>
        <set name="CC.SOFTVFP_MAYBE_VFPV3" value="soft"/>
        <set name="CC_ERRORS_CONTROL_OPTION" value=""/>
        <set name="CC_WARNINGS_CONTROL_OPTION" value="-Wall -Wno-unknown-pragmas"/>
        @@ -42,7 +42,7 @@
        <set name="COMMANDFILE_OPTION" value="@"/>
        <set name="COMPILE_ONLY_OPTION" value="-c"/>
        <set name="COMPILER_CIA_FLAGS" value="-marm"/>
      • <set name="COMPILER_FPU_OPTION" value="-mfloat-abi="/>
        + <set name="COMPILER_FPU_OPTION" value="-mfpu=vfp -mfloat-abi="/>
        <set name="COMPILER_INTERWORK_DEFINES" value="_MARM_INTERWORK_"/>
        <set name="COMPILER_NO_HIDE_ALL_OPTION" value="-fvisibility=default"/>
        <set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-I"/>
        diff --git a/tools/sbs/lib/flm/standard.xml b/tools/sbs/lib/flm/standard.xml
        index f0deac5..224272a 100644
          • a/tools/sbs/lib/flm/standard.xml
            +++ b/tools/sbs/lib/flm/standard.xml
            @@ -2,10 +2,10 @@
            <build xmlns="http://symbian.com/xml/build" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symbian.com/xml/build ../../schema/build/2_0.xsd">
            <interface name="Symbian.mmp" extends="base.flm" abstract="true">
            <param name='AAPCS_OPTION'/>
      • <param name='ALWAYS_BUILD_AS_ARM' default=''/>
        + <param name='ALWAYS_BUILD_AS_ARM' default='yes'/>
        <param name='SET_ARMINC' default=''/>
        <param name='ARMLIBS' default=''/>
      • <param name='ARMFPU' default=''/>
        + <param name='ARMFPU' default=''/>
        <param name='ARMRT' default=''/>
        <param name='BYTEPAIRCOMPRESSTARGET' default=''/>
        <param name='TESTPATH' default=''/>

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            portale Alessandro Portale
            martintasker Martin Tasker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes