Commit 563a8d11 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Maureen Helm
Browse files

arm64: refer to the link register as "lr" rather than "x30"



In ARM parlance, the subroutine call return address is stored in the
"link register" or simply lr. Refer to it as lr which is clearer than
the anonymous x30 designation.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 47f7befc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@ _ASM_FILE_PROLOGUE
GTEXT(arch_cpu_idle)
SECTION_FUNC(TEXT, arch_cpu_idle)
#ifdef CONFIG_TRACING
	stp	xzr, x30, [sp, #-16]!
	str	lr, [sp, #-16]!
	bl	sys_trace_idle
	ldp	xzr, x30, [sp], #16
	ldr	lr, [sp], #16
#endif
	dsb	sy
	wfi
@@ -29,9 +29,9 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
GTEXT(arch_cpu_atomic_idle)
SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
#ifdef CONFIG_TRACING
	stp	x0, x30, [sp, #-16]!
	stp	x0, lr, [sp, #-16]!
	bl	sys_trace_idle
	ldp	x0, x30, [sp], #16
	ldp	x0, lr, [sp], #16
#endif
	msr	daifset, #(DAIFSET_IRQ_BIT)
	isb
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static void esf_dump(const z_arch_esf_t *esf)
	LOG_ERR("x12: 0x%016llx  x13: 0x%016llx", esf->x12, esf->x13);
	LOG_ERR("x14: 0x%016llx  x15: 0x%016llx", esf->x14, esf->x15);
	LOG_ERR("x16: 0x%016llx  x17: 0x%016llx", esf->x16, esf->x17);
	LOG_ERR("x18: 0x%016llx  x30: 0x%016llx", esf->x18, esf->x30);
	LOG_ERR("x18: 0x%016llx  lr:  0x%016llx", esf->x18, esf->lr);
}
#endif /* CONFIG_EXCEPTION_DEBUG */

+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ GEN_NAMED_OFFSET_SYM(_callee_saved_t, sp_elx, sp_elx_lr);
GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved));

GEN_NAMED_OFFSET_SYM(_esf_t, spsr, spsr_elr);
GEN_NAMED_OFFSET_SYM(_esf_t, x18, x18_x30);
GEN_NAMED_OFFSET_SYM(_esf_t, x18, x18_lr);
GEN_NAMED_OFFSET_SYM(_esf_t, x16, x16_x17);
GEN_NAMED_OFFSET_SYM(_esf_t, x14, x14_x15);
GEN_NAMED_OFFSET_SYM(_esf_t, x12, x12_x13);
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ SECTION_FUNC(TEXT,z_arm64_el1_plat_prep_c)
GTEXT(__reset_prep_c)
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__reset_prep_c)
	/* return address: x23 */
	mov	x23, x30
	mov	x23, lr

	switch_el x0, 3f, 2f, 1f
3:
+4 −4
Original line number Diff line number Diff line
@@ -99,15 +99,15 @@ SECTION_FUNC(TEXT, z_arm64_context_switch)
	mov	sp, x4

#ifdef CONFIG_USERSPACE
	stp     xzr, x30, [sp, #-16]!
	str     lr, [sp, #-16]!
	bl      z_arm64_swap_mem_domains
	ldp     xzr, x30, [sp], #16
	ldr     lr, [sp], #16
#endif

#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
	stp	xzr, x30, [sp, #-16]!
	str	lr, [sp, #-16]!
	bl	z_thread_mark_switched_in
	ldp	xzr, x30, [sp], #16
	ldr	lr, [sp], #16
#endif

	/* Return to arch_switch() or _isr_wrapper() */
Loading