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
..
Makefile powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
fabs.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
fadd.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fadds.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
fcmpo.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fcmpu.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
fctiw.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
fctiwz.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
fdiv.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fdivs.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmadd.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmadds.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmr.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
fmsub.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmsubs.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmul.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fmuls.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fnabs.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
fneg.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
fnmadd.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fnmadds.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fnmsub.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fnmsubs.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fres.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
frsp.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
frsqrte.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
fsel.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
fsqrt.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fsqrts.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fsub.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
fsubs.c powerpc/math-emu: Remove redundant 'ret' 2008-12-03 08:19:15 -06:00
lfd.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
lfs.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
math.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
math_efp.c powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
mcrfs.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
mffs.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
mtfsb0.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
mtfsb1.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
mtfsf.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
mtfsfi.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
stfd.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
stfiwx.c [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
stfs.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00
udivmodti4.c powerpc/math-emu: Use kernel generic math-emu code 2008-10-01 08:40:07 -05:00