Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-35430

qt5-qtdeclarative requires SSE2 on i686

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.2.0 RC1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Fedora i686

      Description

      There are 2 places where qt5-qtdeclarative assumes that SSE2 is available on 32-bit x86:

      1. In src/qml/jsruntime/jsruntime.pri, the following compiler flags are hardcoded:
      QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
      (Note that these also assume a Pentium 4 or newer in addition to assuming SSE2.)

      2. MacroAssemblerX86.h only implements floating point support if SSE2 is detected at runtime, otherwise it triggers an assertion failure when floating point is used. As far as I can see, the V4 code makes no attempt at using the supportsFloatingPoint method and just assumes floating point is always available in the JIT.

      We cannot ship binaries that require SSE2 (nor a Pentium 4) on i686 (32-bit x86) in Fedora:
      https://fedoraproject.org/wiki/Features/F12X86Support
      (This is still the current state of x86 architecture support in Fedora.) Back when this was discussed, some people advocated requiring SSE2, but it was rejected (because it would mean dropping support for a lot of hardware compared to the benefits). Therefore, if things in qt5-qtdeclarative remain as they stand, we will have no other choice than disabling the JIT on i686 (and also removing the compiler flags I pointed out in point 1).

      To fix point 2, you need to either add support for 387 floating point in MacroAssemblerX86.h (and also change the hardcoded FPRegister=xmm0 in V4) or disable the JIT at runtime if supportsFloatingPoint() returns false (for any code containing floating point, or just globally for everything). Otherwise, we will not be able to ship qt5-qtdeclarative with the JIT enabled on i686.

        Attachments

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

          Activity

            People

            • Assignee:
              shausman Simon Hausmann
              Reporter:
              kevin kofler Kevin Kofler
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes