[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:
Leandro Lupori 2019-08-12 12:51:47 +00:00
parent 4139761bb5
commit b501589d81

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);