[POWERPC] 8xx: Move softemu8xx.c from arch/ppc
Previously, Soft_emulate_8xx was called with no implementation, resulting in build failures whenever building 8xx without math emulation. The implementation is copied from arch/ppc to resolve this issue. However, this sort of minimal emulation is not a very good idea other than for compatibility with existing userspaces, as it's less efficient than soft-float and can mislead users into believing they have soft-float. Thus, it is made a configurable option, off by default. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
@@ -906,7 +906,9 @@ void SoftwareEmulation(struct pt_regs *regs)
|
||||
{
|
||||
extern int do_mathemu(struct pt_regs *);
|
||||
extern int Soft_emulate_8xx(struct pt_regs *);
|
||||
#if defined(CONFIG_MATH_EMULATION) || defined(CONFIG_8XX_MINIMAL_FPEMU)
|
||||
int errcode;
|
||||
#endif
|
||||
|
||||
CHECK_FULL_REGS(regs);
|
||||
|
||||
@@ -936,7 +938,7 @@ void SoftwareEmulation(struct pt_regs *regs)
|
||||
return;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
|
||||
errcode = Soft_emulate_8xx(regs);
|
||||
switch (errcode) {
|
||||
case 0:
|
||||
@@ -949,6 +951,8 @@ void SoftwareEmulation(struct pt_regs *regs)
|
||||
_exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_8xx */
|
||||
|
Reference in New Issue
Block a user