Re: [arm-gnu] how to compile C code to NEON instructions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] how to compile C code to NEON instructions
- To: vandung.tran@xxxxxxxxxxxxxxxx
- Subject: Re: [arm-gnu] how to compile C code to NEON instructions
- From: Bob Feretich <bob.feretich@xxxxxxxxxxxxxxx>
- Date: Thu, 07 Jul 2011 21:46:03 -0700
Yes, but the automatic vectorization is poor.
Check out the Neon Intrinsics and using inline assembly in your C programs.
The three below links should help.
http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
http://www.delmarnorth.com/microwave/requirements/neon-test-tutorial.pdf
http://hardwarebug.org/2010/07/06/arm-inline-asm-secrets/
All of the above permits the C compiler to manage the register
assignments. Intrinsics are optimized by the compiler, inline assembler
is not.
To understand this level of Neon programming, you need to know the Neon
instruction set. It is defined in the Arm Architecture Reference Manual.
You can download a copy after your register with Arm.com.
Regards,
Bob
On 7/7/2011 7:23 PM, vandung.tran@xxxxxxxxxxxxxxxx wrote:
Hi
Is it possible to compile C/C++ source code to an executable file
that contains NEON instructions?
Please give an example (C/C++ source code).
I am using compiler: arm-none-linux-gnueabi-gcc.
Thanks and Best Regards,
=====================
Tran Van Dung
"The information in this e-mail (including attachments) is
confidential and is only intended for use by the addressee. If you are
not the intended recipient or addressee, please notify us immediately.
Any unauthorized disclosure, use or dissemination either in whole or
in part is prohibited. Opinions, conclusions and other information
contained in this message are personal opinions of the sender and do
not necessarily represent the views of the Panasonic Group of companies."