Skip to content

Commit 2153c01

Browse files
committed
arm: asm: Fix inline asm in z_arch_switch_to_main_thread for clang
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]>
1 parent 96a7545 commit 2153c01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm/include/kernel_arch_func.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ z_arch_switch_to_main_thread(struct k_thread *main_thread,
115115
#error Unknown ARM architecture
116116
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
117117
"isb \n\t"
118-
"mov r1, #0 \n\t"
119-
"mov r2, #0 \n\t"
120-
"mov r3, #0 \n\t"
118+
"movs r1, #0 \n\t"
119+
"movs r2, #0 \n\t"
120+
"movs r3, #0 \n\t"
121121
"bl z_thread_entry \n\t" /* z_thread_entry(_main, 0, 0, 0); */
122122
:
123123
: "r" (_main), "r" (start_of_main_stack)

0 commit comments

Comments
 (0)