cmrx icon indicating copy to clipboard operation
cmrx copied to clipboard

ARM Cortex-M: Add support for floating point

Open ventZl opened this issue 8 months ago • 1 comments

This set of patches adds support for working with floating point from within userspace running under CMRX.

Lazy loading of FP context is used to speed up exception processing. FP state is saved only for threads which actually use FP instructions to save stack space.

ventZl avatar Apr 24 '25 12:04 ventZl

This implementation would be OK if we didn't have RPC. Fortunately we have it and that makes things a little bit more complicated. We will have to be more involved in the FPU state save/restore: Don't save it onto stack, rather into struct OS_Thread. This will play nicely with RPC and will keep the exception frame on the stack of constant size. It will prohibit easy use of FP in handlers but we can live with this limitation.

ventZl avatar Apr 24 '25 12:04 ventZl