diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 15:12:03 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 15:12:03 +0000 |
commit | e537388b84276d74fed2441cb00048dbb19c809c (patch) | |
tree | fbfd6f79ff61342c3b3e402c171476bbcdc018a3 /sys/powerpc/booke | |
parent | a3985bdd129e6541240f235a896a29345ad4583f (diff) | |
download | src-e537388b84276d74fed2441cb00048dbb19c809c.tar.gz src-e537388b84276d74fed2441cb00048dbb19c809c.zip |
Unify handling of illegal instruction faults between AIM and Book-E. This
allows FPU emulation on AIM as well as providing support for the mfpvr
and lwsync instructions from userland on e500 cores. lwsync, in particular,
is required for many C++ programs to work correctly.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=258259
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r-- | sys/powerpc/booke/trap.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/powerpc/booke/trap.c b/sys/powerpc/booke/trap.c index 72c4f474f631..dc84ede5bca3 100644 --- a/sys/powerpc/booke/trap.c +++ b/sys/powerpc/booke/trap.c @@ -71,10 +71,6 @@ __FBSDID("$FreeBSD$"); #include <machine/trap.h> #include <machine/spr.h> -#ifdef FPU_EMU -#include <powerpc/fpu/fpu_extern.h> -#endif - #define FAULTBUF_LR 0 #define FAULTBUF_R1 1 #define FAULTBUF_R2 2 @@ -193,18 +189,7 @@ trap(struct trapframe *frame) break; case EXC_PGM: /* Program exception */ -#ifdef FPU_EMU - if (!(td->td_pcb->pcb_flags & PCB_FPREGS)) { - bzero(&td->td_pcb->pcb_fpu, - sizeof(td->td_pcb->pcb_fpu)); - td->td_pcb->pcb_flags |= PCB_FPREGS; - } - sig = fpu_emulate(frame, - (struct fpreg *)&td->td_pcb->pcb_fpu); -#else - /* XXX SIGILL for non-trap instructions. */ - sig = SIGTRAP; -#endif + sig = ppc_instr_emulate(frame, td->td_pcb); break; default: |