diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index 882bfd7cf05..85752dd6fc8 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -265,13 +265,11 @@ ENTRY(savectx) mrs x6, tpidr_el0 stp x5, x6, [x0, #PCB_SP] - /* Store the VFP registers */ #ifdef VFP - mov x28, lr - bl vfp_save_state_savectx - mov lr, x28 -#endif - + /* Store the VFP registers */ + b vfp_save_state_savectx +#else ret +#endif END(savectx) diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h index 273b53cdc6c..c0feb1149cf 100644 --- a/sys/arm64/include/pcb.h +++ b/sys/arm64/include/pcb.h @@ -85,7 +85,7 @@ struct pcb { #ifdef _KERNEL void makectx(struct trapframe *tf, struct pcb *pcb); -int savectx(struct pcb *pcb) __returns_twice; +void savectx(struct pcb *pcb) __returns_twice; #endif #endif /* !LOCORE */