On Wednesday 18 August 2010 13:19:08 ext Carsten Munk, you wrote: > Qt on OMAP3 has very big benefits from using NEON, just like using > SSSE3 does on Atom. However, we do not currently compile for NEON in > MeeGo for ARMv7 as not all ARMv7 has NEON (Marvell, Nvidia being > notable exceptions). > > We'd obviously like to use NEON on Nokia N900 but we're wondering how > to do this in the most ecosystem-friendly way. > > I have been talking to Thiago and he mentions that an environment > variable QT_NO_NEON=1 exists to disable NEON usage by Qt. > > So, my proposal is the following: > > Compile Qt with NEON support by default on ARMv7.
In theory, NEON is not dependent on ARMv7. In fact, you can tell GCC to use NEON for FPU against even ARMv4. In other words, the -mfpu and -march settings are independent. > Include script in > startup that provides QT_NO_NEON=1 to the UX session based on NEON > presence in /proc/cpuinfo. > > Risks: that the addition of the compiler flags for NEON optimizes > other code that isn't guarded by QT_NO_NEON In my understanding, GCC is currently unable to vectorize code properly, and can even generate broken code. So enabling NEON for plain C/C++ code should be avoided. I would rather compile with the approprivate VFP version (was it v3?) as the target FPU. Then isolate NEON code to dedicated files compiled explicitly with -mfpu=neon, and make sure those affected functions are only called if /proc/cpuinfo states NEON is supported. The situation may change if/when GCC gets better at vectorizing on ARM. -- Rémi Denis-Courmont Nokia Devices R&D, Maemo Software, Helsinki _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
