diff options
author | ian <ian@FreeBSD.org> | 2014-05-14 04:42:38 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-14 04:42:38 +0000 |
commit | 9277bb1a2b74a398eb2fd572785d2d6db451d8c1 (patch) | |
tree | 1db333efac7875c8cb26cb76df9eecc9a08af919 /sys/powerpc/booke | |
parent | d168d59495df2455ad00bf4c5663f265523c3691 (diff) | |
download | FreeBSD-src-9277bb1a2b74a398eb2fd572785d2d6db451d8c1.zip FreeBSD-src-9277bb1a2b74a398eb2fd572785d2d6db451d8c1.tar.gz |
MFC r258247, r258250, r258257
Remove a pointless #ifdef AIM. This is just PPC64 specific, including
64-bit Book-E.
Make single precision floating point arithmetic actually work
Split the function of the PCB_FPU flags into two: PCB_FPU now indicates that
the actual FPU is enabled, while PCB_FPREGS indicates that the FPU state
structure in the PCB is valid.
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r-- | sys/powerpc/booke/trap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/powerpc/booke/trap.c b/sys/powerpc/booke/trap.c index 959d8b1..72c4f47 100644 --- a/sys/powerpc/booke/trap.c +++ b/sys/powerpc/booke/trap.c @@ -194,6 +194,11 @@ trap(struct trapframe *frame) 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 |