[Development] Enabling SSE2 by default on x86 builds (32-bit)

Pau Garcia i Quiles pgquiles at elpauer.org
Thu Dec 12 19:06:20 CET 2013

On Wed, Dec 11, 2013 at 10:21 AM, Simon Hausmann
<simon.hausmann at digia.com>wrote:

> > The other option for 5.2 would be to do runtime detection of SSE2 and
> > enable/disable the JIT according to that.
> I think the main issue with run-time detection is that we need -msse2
> -mfpmath=sse in order to get reliable math results (no 80-bit temps) that
> match with our test expectations, when using the interpreter or non-inline
> math functions.

I have not looked into the actual code, I know everybody hates dlopen and I
haven't even though about the performance implications but, what about this?

- Move "maybe-SSE2" code to a separate library
- Compile that library twice, one with SSE2 (-msse2 -mfmath=sse), the other
without SSE2
- Ship both versions of the library: libwhatever_sse2.so,
- On runtime, check for SSE2 and load the appropriate version

The same approach could be used in other parts of Qt, or even for having
SSE2, SSE2, etc versions of that library/plugin

Pau Garcia i Quiles
(Due to my workload, I may need 10 days to answer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131212/e6851d62/attachment.html>

More information about the Development mailing list