Commit 8926e65d authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Anas Nashif
Browse files

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: default avatarWilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
(cherry picked from commit 7015a0ee)
parent 8bae4f24
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -586,8 +586,8 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
	"mov   r3, #0\n"
	"mov   r3, #0\n"
	"ldr   r4, =z_thread_entry\n"
	"ldr   r4, =z_thread_entry\n"
	"bx    r4\n"		/* We don’t intend to return, so there is no need to link. */
	"bx    r4\n"		/* We don’t intend to return, so there is no need to link. */
	: "+r" (_main)
	:
	: "r" (stack_ptr)
	: "r" (_main), "r" (stack_ptr)
	: "r0", "r1", "r2", "r3", "r4", "ip", "lr");
	: "r0", "r1", "r2", "r3", "r4", "ip", "lr");


	CODE_UNREACHABLE;
	CODE_UNREACHABLE;