zephyr/arch/arm
Mathieu Choplain 77378a8c75 arch: arm: pm_s2ram: fix compatibility with ARMv6-M again
The original 'arch_pm_s2ram_resume' implementation saved lr on the stack
using 'push {lr}' and restored it using 'pop {lr}'. However, the Thumb-1
'pop' does not support lr as a target register, so this code would not
compile for ARMv6-M or ARMv8-M Baseline. r0 was added to these push/pop
later in 2590c48d40.

In 474d4c3249, arch_pm_s2ram* functions were
modified to no longer use the stack, which incidentally "fixed" this issue.
b4fb5d38eb reverted this commit and brought
back 'pop {r0, lr}' as-is, without taking compatibility into account.

Modify the sequence to use "pop {r0, pc}" which is supported on all
ARM M-profile implementations (v6/v7/v8 Baseline/v8 Mainline), and
add comments to (hopefully) prevent this issue from re-appearing.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-05-13 17:46:40 +02:00
..
core arch: arm: pm_s2ram: fix compatibility with ARMv6-M again 2025-05-13 17:46:40 +02:00
include arm: exception: fix comparison of int of different signs 2025-05-13 10:05:52 +02:00
CMakeLists.txt
Kconfig arch: arm: rename CPU_HAS_NXP_MPU to align with binding 2024-12-06 22:23:06 +01:00