Skip to content

Commit

Permalink
FROMPULL: arch: arm: cortex_m: move _main in input list
Browse files Browse the repository at this point in the history
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.

zephyrproject-rtos/zephyr#80579

BUG=b:376282914

Change-Id: Ie6f1ab781bdc8d0de87353bcf48e2c4ade2d4dc1
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5975475
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
  • Loading branch information
fabiobaltieri authored and Chromeos LUCI committed Oct 29, 2024
1 parent 0870f0b commit 1307455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/core/cortex_m/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
"mov r3, #0\n"
"ldr r4, =z_thread_entry\n"
"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");

CODE_UNREACHABLE;
Expand Down

0 comments on commit 1307455

Please # to comment.