Welcome to mirror list, hosted at ThFree Co, Russian Federation.

exceptions.c « or1k « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8240d09d2d33e77233a728d3acbedb9137b22222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "include/or1k-support.h"

#include "or1k-internals.h"

#ifdef __OR1K_MULTICORE__
or1k_exception_handler_table_t *_or1k_exception_handler_table;
#else
or1k_exception_handler_table_t _or1k_exception_handler_table;
#endif

void or1k_exception_handler_add(int id, or1k_exception_handler_fptr handler)
{
	// Subtract 2 as we do not have a vector at 0 and reset is static
	id = id - 2;
#ifdef __OR1K_MULTICORE__
	_or1k_exception_handler_table[or1k_coreid()][id] = handler;

#else
	_or1k_exception_handler_table[id] = handler;
#endif
}