Skip to content
Commit 03734eeb authored by Ioannis Glaropoulos's avatar Ioannis Glaropoulos Committed by Kumar Gala
Browse files

arch: arm: protect r0 in z_arch_switch_to_main_thread() inline ASM



Adding r0 to the clobber list in the inline ASM block of
z_arch_switch_to_main_thread(). This instructs assembler
to not use r0 to store ASM expression operands, e.g. in
the subsequent instruction, msr PSR %1.

We also do a minor optimization with the clearing of R1
before jumping to main.

Signed-off-by: default avatarIoannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
parent e34fa01d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment