Commit 4670cb27 authored by Robin Kastberg's avatar Robin Kastberg Committed by Daniel DeGrasse
Browse files

iar: ltorg directive not supported



Currently this directive is not supported in EWARM 9.70.1,
it will be in future versions, but we want Zephyr 4.2
to work with IAR EWARM 9.70.1.

Signed-off-by: default avatarRobin Kastberg <robin.kastberg@iar.com>
(cherry picked from commit fa165da6)
parent a55b5444
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -560,7 +560,9 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
			 /* We don’t intend to return, so there is no need to link. */
			 "bx    r4\n"
			 /* Force a literal pool placement for the addresses referenced above */
#ifndef __IAR_SYSTEMS_ICC__
			 ".ltorg\n"
#endif
			 :
			 : "r"(_main), "r"(stack_ptr)
			 : "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
@@ -628,7 +630,9 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(k_thread_entry_t main_
		"blx r0\n"
		"loop: b loop\n\t" /* while (true); */
		/* Force a literal pool placement for the addresses referenced above */
#ifndef __IAR_SYSTEMS_ICC__
		".ltorg\n"
#endif
		:
		: [_p1] "r"(p1), [_p2] "r"(p2), [_p3] "r"(p3), [_psp] "r"(psp),
		  [_main_entry] "r"(main_entry)