From 29e98d2f8fb3646fc60ee80558e12a397a5fbd14 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Mon, 11 Feb 2019 08:53:13 +0100 Subject: [PATCH] arch: arm: remove unnecessary stacking of r3 in swap.S Stacking r3 at this point is not required as the register value is not used afterwards, therefore, it does not need to be retained. Signed-off-by: Ioannis Glaropoulos --- arch/arm/core/swap_helper.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/core/swap_helper.S b/arch/arm/core/swap_helper.S index db57535d5aa..8d1796d4423 100644 --- a/arch/arm/core/swap_helper.S +++ b/arch/arm/core/swap_helper.S @@ -216,11 +216,9 @@ _thread_irq_disabled: #ifdef CONFIG_BUILTIN_STACK_GUARD /* clear stack pointer limit before setting the PSP */ - push {r3} - mov r3, #0 - msr PSPLIM, r3 - pop {r3} -#endif + mov r0, #0 + msr PSPLIM, r0 +#endif /* CONFIG_BUILTIN_STACK_GUARD */ msr PSP, ip