RE: [PATCH] Fix bug on soft emulation of float point in gcc/longlong.c

2008-03-12 Thread Liu Yu
Hi Ian, Thanks a lot for your detailed explanation. > -Original Message- > From: Ian Lance Taylor [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2008 1:45 PM > To: Liu Yu > Cc: gcc@gcc.gnu.org > Subject: Re: [PATCH] Fix bug on soft emulation of float point &

[PATCH] Fix bug on soft emulation of float point in gcc/longlong.c

2008-03-12 Thread Liu Yu
There are 2 bugs existing in __udiv_qrnnd_c: 1. remainder could not be counted correctly __r1 and __r0 are not adding enough, so I use do..while to replace former if 2. the case of overflow of __m are not considered so I add a couple of lines to handle it I found the bugs from Linux kernel, for

[PATCH] Fix bug on soft emulation of float point in gcc/longlong.c

2008-03-12 Thread Liu Yu
t; : "(FAIL)"); printf(" %e / %e = %e\n", a.f, b.f, z.f); } int main() { union fu fa,fb,fe; fa.u = 0xc0843fff; fb.u = 0x80ff; fe.u = 0x7f044000; fdiv(fa,fb,fe); } --- Signed-off-by: Liu Yu <[EMAIL PROTECTED]> --- gcc/l