[Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Nuno Santos
Hi, I’m trying to enable hard float computation on arm. I think I have managed to enable it doing the following changes: 1) Set a new environment var ANDROID_ARCH_TARGET=armeabi-v7a-hard 2) Adding equals(ANDROID_TARGET_ARCH, armeabi-v7a-hard): \ QMAKE_CFLAGS = -Wno-psabi -march=armv7-a -mf

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Ola Røer Thorsen
2016-04-29 10:11 GMT+02:00 Nuno Santos : > > Code compiled and ruined fine but couldn’t notice a faster performance (I > have profiling timers in critical parts of the application). > > Has anyone done this before? > > As far as I know Qt is built with qreal as double as a default setting. In cas

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Nuno Santos
Ola, Thanks for your reply. While Qt code may be compiled with support for hard float, the qmake.specs file for android doesn’t show that and, in general, it seems that hard float support is disabled by default in android: QMAKE_CFLAGS = -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Jean-Michaël Celerier
On Fri, Apr 29, 2016 at 1:55 PM, Ola Røer Thorsen wrote: > > float a = 1.0f; > float b = 2.0*a; // BAD! > float b = 2.0f*a; // Good! > Pretty sure that this would be a non-problem starting at -O1 optimization level. ___ Interest mailing list Interest@q

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Thiago Macieira
On sexta-feira, 29 de abril de 2016 13:55:05 PDT Ola Røer Thorsen wrote: > As far as I know Qt is built with qreal as double as a default setting. qreal is double. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Thiago Macieira
On sexta-feira, 29 de abril de 2016 14:59:35 PDT Nuno Santos wrote: > While Qt code may be compiled with support for hard float, the qmake.specs > file for android doesn’t show that and, in general, it seems that hard > float support is disabled by default in android: Unless you're recompiling ALL

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Nuno Santos
Thiago, > On 29 Apr 2016, at 17:12, Thiago Macieira wrote: > > So I have to ask: > a) are you sure your system wasn't already hard-float? I don’t have a clue > b) if it wasn't, are the hard-float libs for EVERYTHING available on the > system? And does the lib loader know how to find them?

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Ola Røer Thorsen
2016-04-29 16:36 GMT+02:00 Jean-Michaël Celerier < jeanmichael.celer...@gmail.com>: > > On Fri, Apr 29, 2016 at 1:55 PM, Ola Røer Thorsen > wrote: > >> >> float a = 1.0f; >> float b = 2.0*a; // BAD! >> float b = 2.0f*a; // Good! >> > > Pretty sure that this would be a non-problem starting at -O1

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Thiago Macieira
On sexta-feira, 29 de abril de 2016 17:19:03 PDT Nuno Santos wrote: > > So I have to ask: > > a) are you sure your system wasn't already hard-float? > > I don’t have a clue > > > b) if it wasn't, are the hard-float libs for EVERYTHING available on the > > > > system? And does the lib loader kn

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-29 Thread Nuno Santos
Ok Thiago, many thanks! > On 29 Apr 2016, at 17:35, Thiago Macieira wrote: > > On sexta-feira, 29 de abril de 2016 17:19:03 PDT Nuno Santos wrote: >>> So I have to ask: >>> a) are you sure your system wasn't already hard-float? >> >> I don’t have a clue >> >>> b) if it wasn't, are the hard-fl

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-30 Thread Jean-Michaël Celerier
https://godbolt.org/g/DqBlFG With gcc -O1 float f(float x) { return 2. * x; } becomes f(float): addss %xmm0, %xmm0 ret and float g (float x) { return 2.f * x; } becomes g(float): addss %xmm0, %xmm0 ret On Fri, Apr 29, 2016 at 6:30 PM, Ola Røer Thor

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-30 Thread Ola Røer Thorsen
2016-04-30 10:46 GMT+02:00 Jean-Michaël Celerier < jeanmichael.celer...@gmail.com>: > https://godbolt.org/g/DqBlFG > > With gcc -O1 > > float f(float x) > { > return 2. * x; > } > > becomes > > f(float): > addss %xmm0, %xmm0 > ret > > > and > > float g (float x) > { > return

Re: [Interest] armv7a-hard-float in Qt android apps

2016-04-30 Thread Elvis Stansvik
2016-04-30 11:51 GMT+02:00 Ola Røer Thorsen : > > 2016-04-30 10:46 GMT+02:00 Jean-Michaël Celerier > : >> >> https://godbolt.org/g/DqBlFG >> >> With gcc -O1 >> >> float f(float x) >> { >> return 2. * x; >> } >> >> becomes >> >> f(float): >> addss %xmm0, %xmm0 >> ret >> >> >> and

Re: [Interest] armv7a-hard-float in Qt android apps

2016-05-01 Thread Thiago Macieira
On sábado, 30 de abril de 2016 10:46:21 PDT Jean-Michaël Celerier wrote: > https://godbolt.org/g/DqBlFG > > With gcc -O1 > > float f(float x) > { > return 2. * x; > } > > becomes > > f(float): > addss %xmm0, %xmm0 > ret > > > and > > float g (float x) > { > return 2.f *