diff --git a/arch/arm/src/armv8-m/arm_exception.S b/arch/arm/src/armv8-m/arm_exception.S index a82092e28c0..e9f18f03ebc 100644 --- a/arch/arm/src/armv8-m/arm_exception.S +++ b/arch/arm/src/armv8-m/arm_exception.S @@ -320,11 +320,12 @@ exception_common: #else tst r14, #EXC_RETURN_PROCESS_STACK /* nonzero if context on process stack */ #ifdef CONFIG_ARMV8M_STACKCHECK_HARDWARE - ite eq + itete eq msreq msplim, r0 msrne psplim, r0 -#endif +#else ite eq /* Next two instructions conditional */ +#endif msreq msp, r1 /* R1=The main stack pointer */ msrne psp, r1 /* R1=The process stack pointer */ #endif