struct trapframe *tf;
/* If we were using the FPU, forget about it. */
-#if 0 // XXX ignore fp for now
if (p->p_addr->u_pcb.pcb_fpcpu != NULL)
- vfp_discard(p);
-#endif
+ fpu_discard(p);
p->p_addr->u_pcb.pcb_flags &= ~PCB_FPU;
tf = p->p_addr->u_pcb.pcb_tf;
uvmexp.syscalls++;
-#if 0 // XXX Save FPU State
/* Before enabling interrupts, save FPU state */
- vfp_save();
-#endif
+ fpu_save(p, frame);
-#if 0 // XXX Re-enable interrupts
/* Re-enable interrupts if they were enabled previously */
- if (__predict_true((frame->tf_spsr & I_bit) == 0))
+ if (__predict_true(frame->tf_scause & EXCP_INTR))
enable_interrupts();
-#endif
ap = &frame->tf_a[0]; // Pointer to first arg
code = frame->tf_t[0]; // Syscall code