source: trunk/libs/newlib/src/libgloss/or1k/exceptions.c @ 546

Last change on this file since 546 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 538 bytes
Line 
1#include "include/or1k-support.h"
2
3#include "or1k-internals.h"
4
5#ifdef __OR1K_MULTICORE__
6or1k_exception_handler_table_t *_or1k_exception_handler_table;
7#else
8or1k_exception_handler_table_t _or1k_exception_handler_table;
9#endif
10
11void or1k_exception_handler_add(int id, or1k_exception_handler_fptr handler)
12{
13        // Subtract 2 as we do not have a vector at 0 and reset is static
14        id = id - 2;
15#ifdef __OR1K_MULTICORE__
16        _or1k_exception_handler_table[or1k_coreid()][id] = handler;
17
18#else
19        _or1k_exception_handler_table[id] = handler;
20#endif
21}
Note: See TracBrowser for help on using the repository browser.