kernel_optimize_test/arch/powerpc/math-emu
Liu Yu c896862105 [POWERPC] Fix rounding bug in emulation for double float operating
This patch fixes rounding bug in emulation for double float operating on PowerPC platform.

When pack double float operand, it need to truncate the tail due to the limited precision.
If the truncated part is not zero, the last bit of work bit (totally 3 bits) need to '|' 1.

This patch is completed in _FP_FRAC_SRS_2(X,N,sz) (arch/powerpc/math-emu/op-2.h).
Originally the code leftwards rotates the operand to just keep the truncated part,
then check whether it is zero. However, the number it rotates is not correct when
N is not smaller than _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the improper case.

This patch fixes this issue.

Signed-off-by: Liu Yu <b13201@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-13 22:59:00 -06:00
..
double.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fabs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fadd.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fadds.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fcmpo.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fcmpu.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fctiw.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fctiwz.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fdiv.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fdivs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmadd.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmadds.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmr.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmsub.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmsubs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmul.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fmuls.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fnabs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fneg.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fnmadd.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fnmadds.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fnmsub.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fnmsubs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fres.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
frsp.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
frsqrte.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fsel.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fsqrt.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fsqrts.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fsub.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
fsubs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
lfd.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
lfs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
Makefile [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c 2006-09-26 15:24:35 +10:00
math.c [POWERPC] Fix handling of stfiwx math emulation 2007-10-16 09:05:24 -05:00
mcrfs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mffs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mtfsb0.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mtfsb1.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mtfsf.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mtfsfi.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
op-1.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
op-2.h [POWERPC] Fix rounding bug in emulation for double float operating 2007-12-13 22:59:00 -06:00
op-4.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
op-common.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
sfp-machine.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
single.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
soft-fp.h powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
stfd.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
stfiwx.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
stfs.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
types.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
udivmodti4.c powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00