Mercurial > ecos
diff packages/kernel/current/tests/kexcept1.c @ 78:59d97b6ba612 ecos-sw-2000-03-28
Merge from eCos master repository on 2000-03-28-19:50:47-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 20:13:29 +0000 |
| parents | c5536bad4c24 |
| children | 518f42066aba |
line wrap: on
line diff
--- a/packages/kernel/current/tests/kexcept1.c +++ b/packages/kernel/current/tests/kexcept1.c @@ -93,6 +93,7 @@ static void handler1(cyg_addrword_t data } +#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS // The following function attempts to cause an exception in various // hacky ways. It is machine dependent what exception is generated. // It does reads rather than writes hoping not to corrupt anything @@ -107,10 +108,13 @@ void cause_exception(void) p+=0x100000; } while(p != 0); } +#endif static void entry0( CYG_ADDRWORD data ) { +#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS cyg_code_t n; +#endif cyg_exception_handler_t *old_handler, *old_handler1; cyg_addrword_t old_data, old_data1; @@ -145,6 +149,8 @@ static void entry0( CYG_ADDRWORD data ) cyg_exception_clear_handler(CYGNUM_HAL_EXCEPTION_MAX); cyg_exception_clear_handler(CYGNUM_HAL_EXCEPTION_MAX); +#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS + #if 0 #elif defined(CYGPKG_HAL_POWERPC_SIM) // The exception generated by the SIM is not recognized by GDB. @@ -169,6 +175,9 @@ static void entry0( CYG_ADDRWORD data ) cause_exception(); CYG_TEST_FAIL_FINISH("Couldn't cause exception"); +#else // CYGNUM_HAL_EXCEPTION_DATA_ACCESS + CYG_TEST_NA("Platform does not support data exceptions"); +#endif } #ifdef CYG_HAL_MIPS_TX39_JMR3904
