diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-12-10 07:56:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-12-10 07:56:02 +0000 |
commit | 57826f276a6fc8de0665dd956f78533fe0c25c7e (patch) | |
tree | 467de18afa9e4a3b3c02073a945a317a850991d7 /arch/mips/kernel/unaligned.c | |
parent | 5c03a0eb664aa8802f9e3ede6fb6531581302762 (diff) |
Final round of FPU emulator bits.
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r-- | arch/mips/kernel/unaligned.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index a5b8791c1..672388d52 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c @@ -379,6 +379,21 @@ unsigned long unaligned_instructions; asmlinkage void do_ade(struct pt_regs *regs) { unsigned long pc; +#ifdef CONFIG_MIPS_FPU_EMULATOR + extern int do_dsemulret(struct pt_regs *); + + /* + * Address errors may be deliberately induced + * by the FPU emulator to take retake control + * of the CPU after executing the instruction + * in the delay slot of an emulated branch. + */ + + if((unsigned long)regs->cp0_epc == current->thread.dsemul_aerpc) { + (void)do_dsemulret(regs); + return; + } +#endif /* CONFIG_MIPS_FPU_EMULATOR */ /* * Did we catch a fault trying to load an instruction? |