NDK and NEON on QSD8250

来源:百度文库 编辑:神马文学网 时间:2024/04/28 11:55:08

-march=armv7-a -mfpu=neon -mfloat-abi=softfp

crashes nicelly to ...
so probably I'm doomed to assembly ... :/

BTW ... this one crashes too ... so this is not a qword only flaw

void CrashTest(float32_t *a, float32_t *b, float32_t *o)
{
 float32x2_t ta, tb, tc;

 ta = vld1_f32(a);
 tb = vld1_f32(b);
 tc = vmul_f32(ta, tb);

 vst1_f32(o, tc);
 return;
}


On 14 May 2010 16:28, Mark Rawls gmail.com> wrote:
You can try these flags:
  -march=armv7-a -mfpu=neon -mfloat-abi=softfp 

Ihaven't tried the functions you are using, but note that if you writeassembly with a neon quad-word multiply, the assembler will segfault inmy experience.  It can handle some neon instructions, but some alwayscause a segfault for me.  If you really have to use these, the onlysolution I have found is to embed the machine code yourself, in a .Sassembly file (the inline assembler has been flaky for me).

-Mark

On Fri, May 14, 2010 at 10:22 AM, Louise Cypher gmail.com> wrote:
but this is just load of float elements (with duplication), multiplication and store ???
Did you actualy ben able to compile SOME neon based code ?
What are your compilation flags ?



On 14 May 2010 16:03, mic _ gmail.com> wrote:
Iirc I got some errors like that one with certain combinations of NEONinstructions and operands, even when they conformed to the documentationfrom ARM. I don't know which is correct - gcc or the documentation.It's certainly a very poor error message in any case.

/Michael

On Fri, May 14, 2010 at 3:42 PM, Louise Cypher gmail.com> wrote:
Hi

I need some high perfomance code to be run on QSD8250 (the one in nexus one).
So I'v changed architecture in build\toolchains\arm-eabi-4.4.0\setup.mk to be arm7 not arm5 and tried to compile some realy simple stuff:

-- file
#include

extern void CrashTest(float32_t *a, float32_t *b, float32_t *o);

void CrashTest(float32_t *a, float32_t *b, float32_t *o)
{
 float32x4_t ta, tb, tc;

 ta = vld1q_dup_f32(a);
 tb = vld1q_dup_f32(b);
 tc = vmulq_f32(ta, tb);

 vst1q_lane_f32(o, tc, 0);
 return;
}
-- eof

compile command line:

build\prebuilt\windows\arm-eabi-4.4.0\bin\arm-eabi-g++-Ibuild/platforms/android-5/arch-arm/usr/include -D__ARM_ARCH_7__-march=armv7 -mfloat-abi=softfp -mfpu=neon -fno-exceptions -fno-rtti-mthumb -Iapps/MXEngine/project/jni -DANDROID -Werror -DANDROID_NDK-DNDEBUG -c -MMD -MP -MFout/apps/MXEngine/armeabi/objs/MXEngine/main.o.d.tmpapps/MXEngine/project/jni/main.cpp -oout/apps/MXEngine/armeabi/objs/MXEngine/main.o

and I get:

apps/MXEngine/project/jni/main.cpp:23: internal compiler error: in write_builtin_type, at cp/mangle.c:1855
Please submit a full bug report,

isthere any trick to get it to work - some specific compiler optionsneeds to be enabled ? I'v experimented a little and the compiler ALWAYScrashes no matter what compilation flags I pass :/
(I'm working with cygwin on win7 x64 if that matters)

Is there someone who actually uses NEON opcodes to do the heavy stuff (like on iPhone / iPad) ?


--
Code it black!
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.



--
--
Code it black!
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.



--
--
Code it black!
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.