Mercurial > flash_v2
diff packages/hal/mips/arch/current/src/hal_misc.c @ 26:4741a3c3496a ecos-sw-1999-07-23
Merge from eCos master repository on 1999-07-23-05:47:06-BST
| author | jlarmour |
|---|---|
| date | Fri, 23 Jul 1999 15:20:15 +0000 |
| parents | 7253dcc42a09 |
| children | e97d78785e2d |
line wrap: on
line diff
--- a/packages/hal/mips/arch/current/src/hal_misc.c +++ b/packages/hal/mips/arch/current/src/hal_misc.c @@ -68,8 +68,24 @@ externC void __handle_exception (void); externC HAL_SavedRegisters *_hal_registers; +externC cyg_uint8 cyg_hal_mips_process_fpe( HAL_SavedRegisters *regs ); + externC void exception_handler(HAL_SavedRegisters *regs) { +#ifdef CYGHWR_HAL_MIPS_FPU + // We may be required to emulate certain unimplemented Floating Point + // operations + + if ((regs->vector>>2) == CYGNUM_HAL_VECTOR_FPE) { + + // cyg_hal_mips_process_fpe() returns non-zero if it could handle + // the exception successfully. If so, we just return + + if ( cyg_hal_mips_process_fpe(regs) ) + return; + } +#endif + #if defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS) // Set the pointer to the registers of the current exception
