Problem with NEON for I.MX 6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problem with NEON for I.MX 6

跳至解决方案
2,829 次查看
曦刘
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

标记 (3)
0 项奖励
回复
1 解答
1,442 次查看
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 项奖励
回复
2 回复数
1,443 次查看
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 项奖励
回复
1,442 次查看
曦刘
Contributor II

it's correct.

and it's our fault with struct align.

thanks.

0 项奖励
回复