aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm64/arm64/machdep.c')
-rw-r--r--sys/arm64/arm64/machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 739257bed1db..90fc19d57415 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -732,11 +732,11 @@ makectx(struct trapframe *tf, struct pcb *pcb)
{
int i;
- for (i = 0; i < PCB_LR; i++)
+ for (i = 0; i < nitems(pcb->pcb_x); i++)
pcb->pcb_x[i] = tf->tf_x[i];
- pcb->pcb_x[PCB_LR] = tf->tf_lr;
- pcb->pcb_pc = tf->tf_elr;
+ /* NB: pcb_lr is the PC, see PC_REGS() in db_machdep.h */
+ pcb->pcb_lr = tf->tf_elr;
pcb->pcb_sp = tf->tf_sp;
}