[PPC64] Save FPU registers before enabling VSX

Fixed trap handler logic, in order to make it save FPU registers,
if FPU is enabled, before enabling VSX. Without this change, FPU
register contents were being lost when set before VSX was enabled.
This commit is contained in:
luporl 2019-08-12 12:51:47 +00:00
parent b4b2b0a955
commit 29bd1140e7

View File

@ -295,7 +295,7 @@ trap(struct trapframe *frame)
("VSX already enabled for thread"));
if (!(td->td_pcb->pcb_flags & PCB_VEC))
enable_vec(td);
if (!(td->td_pcb->pcb_flags & PCB_FPU))
if (td->td_pcb->pcb_flags & PCB_FPU)
save_fpu(td);
td->td_pcb->pcb_flags |= PCB_VSX;
enable_fpu(td);