[ELDK] enable FPU on my target?

orlan at hyperautomation.com orlan at hyperautomation.com
Wed May 21 18:40:45 CEST 2008

  Thanx for the help last week on '.configure' setup for cross-compile (post: [ELDK] newbie autoconf on ELDK 4.1).  Apparently I was trying to outsmart what already works.

  Does the ELDK add appropriate instructions at compile-time to enable the FPU on an AMCC 440EPx (using ppc_4xxFP)?  I looked at my compiled code with Ida and didn't see an MTMSR instruction, but then again I'm not sure which specific instruction I should be looking for.  I contacted AMCC because the floating point performance seems _very_ low, and this was one of their tech's responses:

"To ensure that you have configured the highest floating point operation you should verify that you are using the correct compiler to build your applications. To configure the compiler in the ELDK to build for floating point you should set the environment variable ${CROSS_COMPILE} to the value ppc_4xxFP.  And in you application before using the FPU, it must be enabled and configured in the processor's MSR register.  Specifically by setting the MSR[FP]=1 and MSR[FE0,FE1] must be set as desired. You must also enable the Auxiliary Processor Unit (APU) CCR0[DAPUIB]=0. Software must also verify the Soft Reset Register 0 (SDR0_SRST0), and the Soft Reset Register 1(SDR0_SRST1) to make sure that the reset default values will accommodate floating point executions. The SDR0_SRST1[FPU] bit is defaulted to hold the floating point unit in reset. This bit must be cleared so that the soft reset state will be released before using the FPU."

  Do I need to add the appropriate FPU assembly instructions myself through asm directives in my code?  Is this restored for my process following a context switch?  This seems like I'm having to get very low-level, so surely I'm missing something, right?


More information about the eldk mailing list