riscv: do not duplicate sd of tp

Reviewed by:	jhb
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39894
This commit is contained in:
Christos Margiolis 2023-05-22 23:03:06 +03:00
parent 136b8bd610
commit 3c6fb586b9

View File

@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
addi sp, sp, -(TF_SIZE)
sd ra, (TF_RA)(sp)
sd tp, (TF_TP)(sp)
.if \mode == 0 /* We came from userspace. */
sd gp, (TF_GP)(sp)
@ -54,10 +55,7 @@ __FBSDID("$FreeBSD$");
.option pop
/* Load our pcpu */
sd tp, (TF_TP)(sp)
ld tp, (TF_SIZE)(sp)
.else
sd tp, (TF_TP)(sp)
.endif
sd t0, (TF_T + 0 * 8)(sp)