Commit cf5c2e54 authored by Kevin Hao's avatar Kevin Hao Committed by Benjamin Herrenschmidt

powerpc/math-emu: Remove the dead code in math.c

The math.c is only built when CONFIG_MATH_EMULATION is enabled.
So we would never get into the case that CONFIG_MATH_EMULATION
is not defined in this file.
Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8a05dd85
...@@ -231,47 +231,6 @@ do_mathemu(struct pt_regs *regs) ...@@ -231,47 +231,6 @@ do_mathemu(struct pt_regs *regs)
if (get_user(insn, (u32 *)pc)) if (get_user(insn, (u32 *)pc))
return -EFAULT; return -EFAULT;
#ifndef CONFIG_MATH_EMULATION
switch (insn >> 26) {
case LFD:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f);
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
lfd(op0, op1, op2, op3);
break;
case LFDU:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f);
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
lfd(op0, op1, op2, op3);
regs->gpr[idx] = (unsigned long)op1;
break;
case STFD:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f);
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
stfd(op0, op1, op2, op3);
break;
case STFDU:
idx = (insn >> 16) & 0x1f;
sdisp = (insn & 0xffff);
op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f);
op1 = (void *)((idx ? regs->gpr[idx] : 0) + sdisp);
stfd(op0, op1, op2, op3);
regs->gpr[idx] = (unsigned long)op1;
break;
case OP63:
op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f);
op1 = (void *)&current->thread.TS_FPR((insn >> 11) & 0x1f);
fmr(op0, op1, op2, op3);
break;
default:
goto illegal;
}
#else /* CONFIG_MATH_EMULATION */
switch (insn >> 26) { switch (insn >> 26) {
case LFS: func = lfs; type = D; break; case LFS: func = lfs; type = D; break;
case LFSU: func = lfs; type = DU; break; case LFSU: func = lfs; type = DU; break;
...@@ -485,7 +444,6 @@ do_mathemu(struct pt_regs *regs) ...@@ -485,7 +444,6 @@ do_mathemu(struct pt_regs *regs)
default: default:
break; break;
} }
#endif /* CONFIG_MATH_EMULATION */
regs->nip += 4; regs->nip += 4;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment