how do I disable hard floating point in P1024/1015

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

how do I disable hard floating point in P1024/1015

1,513 Views
georgewang
Contributor I

how do I disable hard floating point in P1024/1015

Labels (1)
0 Kudos
6 Replies

793 Views
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 Kudos

793 Views
georgewang
Contributor I

BTW what is a classic FPU?

Thanks.

-George

0 Kudos

793 Views
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 Kudos

793 Views
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 Kudos

793 Views
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 Kudos

793 Views
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 Kudos