• Maciej W. Rozycki's avatar
    MIPS: math-emu: Always propagate sNaN payload in quieting · acd9e20c
    Maciej W. Rozycki authored
    Propagate sNaN payload in quieting in the legacy-NaN mode as well.  If
    clearing the quiet bit would produce infinity, then set the next lower
    trailing significand field bit, matching the SB-1 and BMIPS5000 hardware
    implementations.  Some other MIPS FPU hardware implementations do
    produce the default qNaN bit pattern instead.
    
    This reverts some changes made for semantics preservation with commit
    dc3ddf42 [MIPS: math-emu: Update sNaN quieting handlers], consequently
    bringing back most of the semantics from before commit fdffbafb [Lots of
    FPU bug fixes from Kjeld Borch Egevang.], except from the qNaN produced
    in the infinity case.  Previously the default qNaN bit pattern was
    produced in that case.
    Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/11483/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    acd9e20c
ieee754dp.c 4.84 KB