diff options
author | Liu Yu <b13201@freescale.com> | 2007-12-10 13:00:52 +0800 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-12-13 22:59:00 -0600 |
commit | c89686210542f6946e48a907772a356b9fce03f0 (patch) | |
tree | 10cb6d3d857ad3534fb487bef292582428aff996 /arch/alpha | |
parent | e8b5f43f7b572a898c7b17e9949b26e7362e7f31 (diff) |
[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>
Diffstat (limited to 'arch/alpha')
0 files changed, 0 insertions, 0 deletions