Re: [PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-17 Thread Kumar Gala
On Fri, 18 Jan 2008, Liu Yu wrote: > Synchronize it to the definition in include/math-emu/op-4.h for short term. > > Signed-off-by: Liu Yu <[EMAIL PROTECTED]> > --- > arch/powerpc/math-emu/op-4.h | 40 ++-- > 1 files changed, 30 insertions(+), 10 deletions(-)

[PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-17 Thread Liu Yu
Synchronize it to the definition in include/math-emu/op-4.h for short term. Signed-off-by: Liu Yu <[EMAIL PROTECTED]> --- arch/powerpc/math-emu/op-4.h | 40 ++-- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/math-emu/op-4.h b/a

Re: [PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-15 Thread Kumar Gala
On Jan 8, 2008, at 9:05 PM, Liu Yu wrote: > >> >> take a look at how include/math-emu/op-4.h implements >> __FP_FRAC_ADD_4 & __FP_FRAC_SUB_4. Will that fix the bug, if >> so we should make the code match how its done there. >> >> - k >> >> > > The macro define __FP_FRAC_ADD_4 is below. It can fi

RE: [PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-08 Thread Liu Yu
> > take a look at how include/math-emu/op-4.h implements > __FP_FRAC_ADD_4 & __FP_FRAC_SUB_4. Will that fix the bug, if > so we should make the code match how its done there. > > - k > > The macro define __FP_FRAC_ADD_4 is below. It can fix the carry bug. But still exist a problem that r

Re: [PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-07 Thread Kumar Gala
On Jan 6, 2008, at 8:26 AM, Liu Yu wrote: > This bug exists in math emulation for powerpc. > The macro define are mainly used by multiplication. > > When adding two unsigned operands ( r = x + y ), > the carry bit can be counted by whether r is less than x. > However, when adding three unsigned o

[PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-06 Thread Liu Yu
This bug exists in math emulation for powerpc. The macro define are mainly used by multiplication. When adding two unsigned operands ( r = x + y ), the carry bit can be counted by whether r is less than x. However, when adding three unsigned operands, this method does not work. The original code