This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001607] New: Cortex-M4F architectural Floating Point Support

Please do not reply to this email. Use the web interface provided at:

           Summary: Cortex-M4F architectural Floating Point Support
           Product: eCos
           Version: CVS
          Platform: stm3240g_eval (ST STM3240G-EVAL board)
        OS/Version: Cortex-M
            Status: NEW
          Severity: enhancement
          Priority: low
         Component: Patches and contributions
             Class: Advice Request

Created an attachment (id=1784)
 --> (
Cortex-M4F Floating Point Support 120603

Here I submit architectural floating point support for Cortex-M4F.

Floating point operation:
Three context saving schemes are available as configurable options:

   LAZY: Save context only for threads that actually use FP. This scheme
provides lower delay penalty for threads that don't use FP but is more complex
than the other two as it involves Usage Fault Exception. It is suitable for
applications where few threads use FP.

   ALL : Save FPU context for all threads. This is suitable for applications
where all or most threads use hardware FP. Then average context switching delay
may be lower than for LAZY. Also worst case delay is smaller than for LAZY.

   NONE: Do not save FPU context. This is applicable only if maximum one thread
uses hardware FP and adds no additional delay compared to standard no FPU

The proposed code only supports FPU usage within thread context. FPU in
exceptions and interrupts is possible but then the handler must save/restore
the FP registers. Such example is the modified _default exception VSR_. This
choice is deliberate since saving FPU context during interrupts would add
considerable delay penalty (ALL) and/or complexity+penalty (LAZY).

GDB STUB: GDB STUB is extended with floating point registers d0..d15 aka
s0..s31 as per .

Software was tested on Kinetis K70. Testing programs, provided as separate
attachments are taken from standard Kernel tests and may be included into if

thread_switch_fpu.cxx - (context switching test stripped from tm_basic.cxx then
modified to present different context switching cases)

fptestf.c - fptest.c, only with float instead of double.

fpinttest.c - fptestf.c with added some "integer" threads.

Everybody is welcome to comment and ask.


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]