x86: unify the implementation of FPU traps