Skip to content

Commit

Permalink
arm: asm: Fix inline asm in z_arch_switch_to_main_thread for clang
Browse files Browse the repository at this point in the history
The clang ARM assembler is a bit stricter than GNU as.  Change mov to
movs for ARMv6 case of z_arch_switch_to_main_thread.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Mar 15, 2019
1 parent 96a7545 commit 2153c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/arm/include/kernel_arch_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ z_arch_switch_to_main_thread(struct k_thread *main_thread,
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
"isb \n\t"
"mov r1, #0 \n\t"
"mov r2, #0 \n\t"
"mov r3, #0 \n\t"
"movs r1, #0 \n\t"
"movs r2, #0 \n\t"
"movs r3, #0 \n\t"
"bl z_thread_entry \n\t" /* z_thread_entry(_main, 0, 0, 0); */
:
: "r" (_main), "r" (start_of_main_stack)
Expand Down

0 comments on commit 2153c01

Please sign in to comment.