From b8dcd884ffaf6856108d2279905503bbd86c33cf Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 9 Mar 2015 14:57:41 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7744 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/ports/ARMCMx/chcore_v7m.c | 18 +++++++++++------- os/rt/ports/ARMCMx/chcore_v7m.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'os/rt') diff --git a/os/rt/ports/ARMCMx/chcore_v7m.c b/os/rt/ports/ARMCMx/chcore_v7m.c index 577599834..82cbb1c32 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.c +++ b/os/rt/ports/ARMCMx/chcore_v7m.c @@ -51,14 +51,16 @@ /* Module interrupt handlers. */ /*===========================================================================*/ -#if !CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__) +#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) || defined(__DOXYGEN__) /** * @brief SVC vector. * @details The SVC vector is used for exception mode re-entering after a * context switch. * @note The PendSV vector is only used in advanced kernel mode. */ +/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/ void SVC_Handler(void) { +/*lint -restore*/ struct port_extctx *ctxp; #if CORTEX_USE_FPU @@ -79,16 +81,18 @@ void SVC_Handler(void) { /* Restoring the normal interrupts status.*/ port_unlock_from_isr(); } -#endif /* !CORTEX_SIMPLIFIED_PRIORITY */ +#endif /* CORTEX_SIMPLIFIED_PRIORITY == FALSE */ -#if CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__) +#if (CORTEX_SIMPLIFIED_PRIORITY == TRUE) || defined(__DOXYGEN__) /** * @brief PendSV vector. * @details The PendSV vector is used for exception mode re-entering after a * context switch. * @note The PendSV vector is only used in compact kernel mode. */ +/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/ void PendSV_Handler(void) { +/*lint -restore*/ struct port_extctx *ctxp; #if CORTEX_USE_FPU @@ -106,7 +110,7 @@ void PendSV_Handler(void) { /* Writing back the modified PSP value.*/ __set_PSP((uint32_t)ctxp); } -#endif /* CORTEX_SIMPLIFIED_PRIORITY */ +#endif /* CORTEX_SIMPLIFIED_PRIORITY == TRUE */ /*===========================================================================*/ /* Module exported functions. */ @@ -118,10 +122,10 @@ void PendSV_Handler(void) { void _port_irq_epilogue(void) { port_lock_from_isr(); - if ((SCB->ICSR & SCB_ICSR_RETTOBASE_Msk) != 0) { + if ((SCB->ICSR & SCB_ICSR_RETTOBASE_Msk) != 0U) { struct port_extctx *ctxp; -#if CORTEX_USE_FPU +#if CORTEX_USE_FPU == TRUE /* Enforcing a lazy FPU state save by accessing the FPCSR register.*/ (void) __get_FPSCR(); #endif @@ -135,7 +139,7 @@ void _port_irq_epilogue(void) { /* Setting up a fake XPSR register value.*/ ctxp->xpsr = (regarm_t)0x01000000; -#if CORTEX_USE_FPU +#if CORTEX_USE_FPU == TRUE ctxp->fpscr = (regarm_t)FPU->FPDSCR; #endif diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h index b4fafc736..f3c59a296 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.h +++ b/os/rt/ports/ARMCMx/chcore_v7m.h @@ -85,7 +85,7 @@ */ #if !defined(CORTEX_USE_FPU) #define CORTEX_USE_FPU CORTEX_HAS_FPU -#elif CORTEX_USE_FPU && !CORTEX_HAS_FPU +#elif (CORTEX_USE_FPU == TRUE) && (CORTEX_HAS_FPU == FALSE) /* This setting requires an FPU presence check in case it is externally redefined.*/ #error "the selected core does not have an FPU" -- cgit v1.2.3