LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] alpha: fix conversion from denormal float to double
@ 2008-01-16  9:11 Ivan Kokshaysky
  0 siblings, 0 replies; only message in thread
From: Ivan Kokshaysky @ 2008-01-16  9:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Richard Henderson, linux-kernel

The trap handler does properly update the fraction,
but not the exponent...

Thanks to Paolo Bonzini <bonzini@gnu.org> for the bug report
and the testcase.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
---
 arch/alpha/math-emu/math.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/alpha/math-emu/math.c b/arch/alpha/math-emu/math.c
index ae79dd9..58c2669 100644
--- a/arch/alpha/math-emu/math.c
+++ b/arch/alpha/math-emu/math.c
@@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc)
 				FP_UNPACK_SP(SB, &vb);
 				DR_c = DB_c;
 				DR_s = DB_s;
-				DR_e = DB_e;
+				DR_e = DB_e + (1024 - 128);
 				DR_f = SB_f << (52 - 23);
 				goto pack_d;
 			}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-16  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16  9:11 [PATCH] alpha: fix conversion from denormal float to double Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).