Modify CTL to save FPU selectively

Comments

4 comments

  • Avatar
    Michael Johnson

    I started on this route - someone from ARM pointed out that there's no guarantee that a compiler won't use the FP registers for integer operations. So in general it's not an option - but it may be for your case.

    0
    Comment actions Permalink
  • Avatar
    Joe

    The comment from the ARM guy sounds like a very general statement.  If the FPU is present, then the compiler has more registers to work with.

    Are you aware of gcc having this behavior? 

     

    0
    Comment actions Permalink
  • Avatar
    Joe

    I reviewed a UCOS-III implementation that did exactly what I'm asking -- After I understood what the implementation was doing -- it looked like an opportunity to save ram.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    The cm4/cm7 ctl implementation will only save the FPU registers if they have been used...

    I've not seen it - but/maybe if the register pressure is too high then gcc will use the FPU registers rather than spill to memory.

    0
    Comment actions Permalink

Please sign in to leave a comment.