]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Do not set 'flush to zero' VFPSCR_FZ bit by default. The correct
authorkib <kib@FreeBSD.org>
Fri, 2 Oct 2015 13:25:59 +0000 (13:25 +0000)
committerkib <kib@FreeBSD.org>
Fri, 2 Oct 2015 13:25:59 +0000 (13:25 +0000)
implementation of IEEE 754 arithmetic depends on denormals operating
correctly.  Both perl test suite and paranoia tripped over the
setting.

Reported by: Stefan Parvu <sparvu@kronometrix.org>
Discussed with: andrew
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

sys/arm/arm/machdep.c
sys/arm/arm/vm_machdep.c

index 32bbbc6235d3738ba5f4888d136c352415d5fb98..1c422f3b7d8c8a0e142d5d1cf402cbf5bad44c82 100644 (file)
@@ -1069,7 +1069,7 @@ init_proc0(vm_offset_t kstack)
                (thread0.td_kstack + kstack_pages * PAGE_SIZE) - 1;
        thread0.td_pcb->pcb_flags = 0;
        thread0.td_pcb->pcb_vfpcpu = -1;
-       thread0.td_pcb->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ;
+       thread0.td_pcb->pcb_vfpstate.fpscr = VFPSCR_DN;
        thread0.td_frame = &proc0_tf;
        pcpup->pc_curpcb = thread0.td_pcb;
 }
index 223ad96cfb39f9a52322389dd8ca0fe7b125b2f4..895a14ce6b564f22778760d257886f0feb930050 100644 (file)
@@ -134,7 +134,7 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
        pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame);
 
        pcb2->pcb_vfpcpu = -1;
-       pcb2->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ;
+       pcb2->pcb_vfpstate.fpscr = VFPSCR_DN;
 
        tf = td2->td_frame;
        tf->tf_spsr &= ~PSR_C;