how do I disable hard floating point in P1024/1015

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

how do I disable hard floating point in P1024/1015

2,802 次查看
georgewang
Contributor I

how do I disable hard floating point in P1024/1015

标签 (1)
0 项奖励
回复
6 回复数

2,082 次查看
bpe
NXP Employee
NXP Employee

You can clear MSR[SPE] to disable e500 core SPE APU. Note, e500v2 has no

PowerPC classic floating point support.


Have a great day,
Platon

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

0 项奖励
回复

2,082 次查看
georgewang
Contributor I

BTW what is a classic FPU?

Thanks.

-George

0 项奖励
回复

2,082 次查看
georgewang
Contributor I

Hi bpe,

I found out even though in my libm it shows "Tag_GNU_POWER_ABI_FP: Hard float", it looks like the HW FPU is not turned on. I was running a program between Soft float enable and Hard float enable, however soft float is much more faster than hard.

So my question is, do you know where I can really turn hard float on in P1015/e500?, Maybe somewhere in Makefile gcc. My gcc version is 4.3.5

Thanks,

-George

0 项奖励
回复

2,082 次查看
scottwood
NXP Employee
NXP Employee

If you're seeing soft float being faster than hard float, that most likely means that the software was built for the wrong type of floating point, and it ends up getting emulated.  Classic FP is the normal PowerPC floating point unit found on most PPC chips; e500 implements something different called SPE.  Try passing "-mspe" to GCC.

0 项奖励
回复

2,082 次查看
georgewang
Contributor I

Hi Scott,

Thanks for your reply. I have enabled the -mspe --enable-e500_double option when I build my toolchain, and also I add -mspe=yes flag to build my program. But the result is that soft floating point is still much more faster than mspe enabled.

The way how I enable soft float is in gcc Makefile.in:

SOFT_FLOAT_CONFIG_OPTION=-msoft-float

Thanks,

-George

0 项奖励
回复

2,082 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello George,

If you use the Toolchain provided in Linux SDK, please refer to the following build options.

powerpc-fsl-linux-gnuspe-gcc  -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot=$SDKTARGETSYSROOT


Have a great day,
Yiping

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

0 项奖励
回复