Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [arm-gnu] Advanced SIMD instruction support


  • To: Paul Brook <paul@xxxxxxxxxxxxxxxx>
  • Subject: RE: [arm-gnu] Advanced SIMD instruction support
  • From: Akshay Joshi <akshay.joshi@xxxxxxxxxxx>
  • Date: Wed, 17 Sep 2008 11:08:53 +0530

>	I'm still a bit confused why you're doing this at all though. The Linux
kernel
>	already has NEON support. You shouldn't need to add anything.
>
>	Paul

Well, I am using the 2.6.24 kernel. And it does say that it has NEON
support. But when I try to run a small program which has SIMD isntructions,
it gives me an "Illegal Instruction" error at run-time.
The wierd part is that I get this error for different SIMD instructions at
different times... I'm running the SIMD code in a loop. Sometimes I get the
error in the 1st iteration and sometimes in between. Sometimes it even runs
successfully w/o giving any error.
This inexplicable behaviour led me to go thru the Linux src, and I couldnt
find any code which would enable the NEON coprocessor.
Then I read the FPEXC register after the call to "setup_arch(&command_line)"
and before the call to "sched_init()" in init/main.c and it showed that the
FPEXC.EN bit was 0. (which indicates that SIMD & VFP instructions are
disabled.)
And I think there is no cpu specific initialization after that(I may be
horribly wrong here..).
That's why I am going thru this whole ordeal. :-)

The emulation settings in the 'defconfig' file are:
CONFIG_FPE_NWFPE=y
	# CONFIG_FPE_NWFPE_XP is not set
	# CONFIG_FPE_FASTFPE is not set
CONFIG_VFP=y
CONFIG_VFPv3=y
	# CONFIG_NEON is not set
CONFIG_NEON=y

I've tried different combinations of the above keeping CONFIG_NEON=y, but no
luck.


>	> Empirically, you also need the "-mfloat-abi=softfp" to gcc.  With that,
>	> I can compile this:
>	>
>	> void f() {
>	>   asm ("msr fpexc, r1");
>	> }
>	>
>	> Paul, is that what you'd expect?

Well I added this option and voila, it compiles w/o any error! Thanks!
But now I'm facing with a different problem. More on this after I
investigate further...


Thanks a lot,
--Akshay