Skip to content

Commit 7015a0e

Browse files
fabiobaltierimmahadevan108
authored andcommitted
arch: arm: cortex_m: move _main in input list
Move the _main argument to the input list rather than the output one on the asm block and change the spec to "r". The ASM block does not return, so it does not make sense for it to expect any output. Signed-off-by: Wilfried Chauveau <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 78f688a commit 7015a0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm/core/cortex_m/thread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
586586
"mov r3, #0\n"
587587
"ldr r4, =z_thread_entry\n"
588588
"bx r4\n" /* We don’t intend to return, so there is no need to link. */
589-
: "+r" (_main)
590-
: "r" (stack_ptr)
589+
:
590+
: "r" (_main), "r" (stack_ptr)
591591
: "r0", "r1", "r2", "r3", "r4", "ip", "lr");
592592

593593
CODE_UNREACHABLE;

0 commit comments

Comments
 (0)