Problem with NEON for I.MX 6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with NEON for I.MX 6

Jump to solution
2,827 Views
曦刘
Contributor II

Hello, please excuse me for taking some of your time.

We have a program using I.MX 6 with android ndk platform. We are currently optimize our C++ code with NEON, and encountered with some problems:

  when we turn on the neon flag i.e. "-mfpu=neon", a bus error occrued while the code runs well with no error with flag "mfpu=vfpv3d16".

With further investigate, we found that gcc assume neon is by default with vfpv3d32, so we guess the error may be caused by vfp instruction which using d16-d31 (because gcc assumes that d16-d31 is available when the neon flag is used).

However, the I.MX 6 is configured with neon + vfpv3d16 which means that there are only 16 d reg for vfp. We want to know if there is any possibility that I.MX 6 can have NEON worked (if the answer is yes, then how?), or this problem can not be solved for this chip?

We would be greatly appreciated if you could answer our question. Thank you very much for your consideration.

Best regards

Tags (3)
0 Kudos
Reply
1 Solution
1,440 Views
Yuri
NXP Employee
NXP Employee

  Basically the i.MX6 supports VFPv3-D32.

But note, that under OS we should use the same options for floating point support  and

the same interface for floating point parameters in function calls (ABI) .

Therefore if OS release is based on some agreements and options, it is needed to apply
those ones to all applications.

 
  Below are general considerations.

Please refer to the next VFP introduction on i.MX6 :

https://community.freescale.com/docs/DOC-100112

Also, the following may be helpful :


"Question, enabling NEON H/W"

https://community.freescale.com/message/380469#380469


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
1,441 Views
Yuri
NXP Employee
NXP Employee

  Basically the i.MX6 supports VFPv3-D32.

But note, that under OS we should use the same options for floating point support  and

the same interface for floating point parameters in function calls (ABI) .

Therefore if OS release is based on some agreements and options, it is needed to apply
those ones to all applications.

 
  Below are general considerations.

Please refer to the next VFP introduction on i.MX6 :

https://community.freescale.com/docs/DOC-100112

Also, the following may be helpful :


"Question, enabling NEON H/W"

https://community.freescale.com/message/380469#380469


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,440 Views
曦刘
Contributor II

it's correct.

and it's our fault with struct align.

thanks.

0 Kudos
Reply