Giter Site home page Giter Site logo

Comments (2)

NicoPy avatar NicoPy commented on June 29, 2024

I have understood how the FPU configuration works (for ARM architecture).
Here it is for reference.

cortexm.py is used to configure the runtime sources/configuration :

  • has_fpu() property must always be set to True else the runtime does not compile.

  • To use software floating point calculations, has_single_precision_fpu() and has_double_precision_fpu() properties must return False. You also have to set -msoft-float switch in compiler_switches().

  • To use hardware floating point calculations, has_single_precision_fpu() or has_double_precision_fpu() or both must return True. You also have to set -mfpu=xxx switch to the correct value in compiler_switches().

In s-bbpara__xxxx.ads the constant Has_FPU is indirectly related to the runtime configuration.
When Has_FPU is True, the floating point context is saved/restored in Pend_SV_Handler() (s-bcpcst__pendsv.adb).

  • To use software floating point calculations, set Has_FPU to False.
  • To use hardware floating point calculations, set Has_FPU to True.

To be more complete :

has_double_precision_fpu() has_single_precision_fpu() --> compiler switch Has_FPU
False False --> soft float -msoft-float False
False True --> single precision : hard
double precision : soft
-mfpu=xxx True
True False --> single precision : soft
double precision : hard
-mfpu=xxx True
True True --> single precision : hard
double precision : hard
-mfpu=xxx True

from bb-runtimes.

Fabien-Chouteau avatar Fabien-Chouteau commented on June 29, 2024

Hi @NicoPy,
I am glad you found the answer :)

from bb-runtimes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.