From 6100dc08a6a9f4592f324204bad26ba11239a030 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 20 Dec 2011 18:51:28 +0000 Subject: Cortex-M4 FPU support working. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3644 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARMCMx/chcore_v7m.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os/ports/GCC/ARMCMx') diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.c b/os/ports/GCC/ARMCMx/chcore_v7m.c index e4ea3a72e..ca45f4f1a 100644 --- a/os/ports/GCC/ARMCMx/chcore_v7m.c +++ b/os/ports/GCC/ARMCMx/chcore_v7m.c @@ -76,6 +76,7 @@ void SVCallVector(void) { #if CORTEX_USE_FPU /* Restoring the special register SCB_FPCCR.*/ SCB_FPCCR = (uint32_t)ctxp->fpccr; + SCB_FPCAR = SCB_FPCAR + sizeof (struct extctx); #endif asm volatile ("msr PSP, %0" : : "r" (ctxp) : "memory"); port_unlock_from_isr(); @@ -102,6 +103,7 @@ void PendSVVector(void) { #if CORTEX_USE_FPU /* Restoring the special register SCB_FPCCR.*/ SCB_FPCCR = (uint32_t)ctxp->fpccr; + SCB_FPCAR = SCB_FPCAR + sizeof (struct extctx); #endif asm volatile ("msr PSP, %0" : : "r" (ctxp) : "memory"); } -- cgit v1.2.3