1
linux/arch/powerpc/math-emu
Shan Hai afc0a07d4a powerpc/85xx: Fix SPE float to integer conversion failure
Conversion from float to integer should based on both the instruction
encoding and the sign of the operand.

A simple testcase to show the issue:

static float fm;
static signed int si_min = (-2147483647 - 1);
static unsigned int ui;
int main()
{
       fm = (float) si_min; ;
       ui = (unsigned int)fm;
       printf("ui=%d, should be %d\n", ui, si_min);

       return 0;
}
Result: ui=-1, should be -2147483648

Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-03-15 13:48:15 -05:00
..
fabs.c
fadd.c
fadds.c
fcmpo.c
fcmpu.c
fctiw.c
fctiwz.c
fdiv.c
fdivs.c
fmadd.c
fmadds.c
fmr.c
fmsub.c
fmsubs.c
fmul.c
fmuls.c
fnabs.c
fneg.c
fnmadd.c
fnmadds.c
fnmsub.c
fnmsubs.c
fres.c
frsp.c
frsqrte.c
fsel.c
fsqrt.c
fsqrts.c
fsub.c
fsubs.c
lfd.c
lfs.c
Makefile powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
math_efp.c powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
math.c
mcrfs.c
mffs.c
mtfsb0.c
mtfsb1.c
mtfsf.c
mtfsfi.c
stfd.c
stfiwx.c
stfs.c
udivmodti4.c