summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorCarmelo AMOROSO <carmelo.amoroso@st.com>2008-10-15 17:48:16 +0200
committerPaul Mundt <lethal@linux-sh.org>2009-01-29 03:56:02 +0100
commit0f6dee232f84c11ec195721571763ccae1b82639 (patch)
tree8047c67cb532d3735e61ae915cf5a6e366d6855d /arch/sh
parentsh: Only reserve memory under CONFIG_ZERO_PAGE_OFFSET when it != 0. (diff)
downloadlinux-0f6dee232f84c11ec195721571763ccae1b82639.tar.xz
linux-0f6dee232f84c11ec195721571763ccae1b82639.zip
sh: fcnvds fix with denormalized numbers on SH-4 FPU.
This fixes a bug in the FPU exception handler for the FCNVDS instruction. To get the register number the instruction is shifted right by 9, though it should be shifted right by 8. More information at ST Linux bugzilla: https://bugzilla.stlinux.com/show_bug.cgi?id=4892 Signed-off-by: Giuseppe Di Giore <giuseppe.di-giore@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/cpu/sh4/fpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c
index 2780917c0088..e3ea5411da6d 100644
--- a/arch/sh/kernel/cpu/sh4/fpu.c
+++ b/arch/sh/kernel/cpu/sh4/fpu.c
@@ -423,7 +423,7 @@ static int ieee_fpe_handler(struct pt_regs *regs)
int m;
unsigned int hx;
- m = (finsn >> 9) & 0x7;
+ m = (finsn >> 8) & 0x7;
hx = tsk->thread.fpu.hard.fp_regs[m];
if ((tsk->thread.fpu.hard.fpscr & FPSCR_CAUSE_ERROR)