Skip to content

Commit

Permalink
sh: fcnvds fix with denormalized numbers on SH-4 FPU.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carmelo AMOROSO authored and Paul Mundt committed Jan 29, 2009
1 parent 4886516 commit 0f6dee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh4/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f6dee2

Please sign in to comment.