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 fix the carry bug.

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

[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