alpha: fix conversion from denormal float to double

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, January 17, 2008 - 8:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b2d2c...
Commit:     6b2d2cec1081a979e0efd6a1e9559e5a01a3c10e
Parent:     f63dcda197bd71c6565c2121bf70e3d371539f90
Author:     Ivan Kokshaysky <ink@jurassic.park.msu.ru>
AuthorDate: Thu Jan 17 15:21:13 2008 -0800
Committer:  Linus Torvalds <torvalds@woody.linux-foundation.org>
CommitDate: Thu Jan 17 15:38:59 2008 -0800

    alpha: fix conversion from denormal float to double
    
    The trap handler does properly update the fraction,
    but not the exponent...
    
    Thanks to Paolo Bonzini for the bug report and the testcase.
    
    Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Cc: Paolo Bonzini <bonzini@gnu.org>
    Cc: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 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;
 			}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
alpha: fix conversion from denormal float to double, Linux Kernel Mailing ..., (Thu Jan 17, 8:59 pm)