From: Ivan Kokshaysky Date: Thu, 17 Jan 2008 23:21:13 +0000 (-0800) Subject: alpha: fix conversion from denormal float to double X-Git-Tag: v2.6.24~53 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6b2d2cec1081a979e0efd6a1e9559e5a01a3c10e;p=linux-2.6-omap-h63xx.git 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 Cc: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/alpha/math-emu/math.c b/arch/alpha/math-emu/math.c index ae79dd970b0..58c2669a1dd 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; }