mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-04-21 12:27:27 +03:00
Make it work with new gcc version; use linker script to force entry code in page 0.
This commit is contained in:
@@ -90,39 +90,41 @@ namespace Iris:
|
||||
NUM_EXCEPTION_CODES
|
||||
|
||||
#ifndef NDEBUG
|
||||
static const char *exception_name[NUM_EXCEPTION_CODES] = {
|
||||
"no error",
|
||||
"write denied",
|
||||
"unmapped read",
|
||||
"unmapped write",
|
||||
"invalid address read",
|
||||
"invalid address write",
|
||||
"reserved instruction",
|
||||
"coprocessor unusable",
|
||||
"overflow",
|
||||
"trap",
|
||||
"watchpoint",
|
||||
"breakpoint",
|
||||
"no page directory",
|
||||
"no page table",
|
||||
"out of memory",
|
||||
"invalid operation"
|
||||
}
|
||||
static inline const char *exception_name(int code):
|
||||
const char *names[] = {
|
||||
"no error",
|
||||
"write denied",
|
||||
"unmapped read",
|
||||
"unmapped write",
|
||||
"invalid address read",
|
||||
"invalid address write",
|
||||
"reserved instruction",
|
||||
"coprocessor unusable",
|
||||
"overflow",
|
||||
"trap",
|
||||
"watchpoint",
|
||||
"breakpoint",
|
||||
"no page directory",
|
||||
"no page table",
|
||||
"out of memory",
|
||||
"invalid operation"
|
||||
}
|
||||
return names[code]
|
||||
#endif
|
||||
|
||||
struct Num:
|
||||
unsigned l, h
|
||||
Num (unsigned long long n = 0) : l (n), h (n >> 32):
|
||||
Num (unsigned ll, unsigned hh) : l (ll), h (hh):
|
||||
unsigned long long value () const:
|
||||
inline Num (unsigned long long n = 0) : l (n), h (n >> 32):
|
||||
inline Num (unsigned ll, unsigned hh) : l (ll), h (hh):
|
||||
inline unsigned long long value () const:
|
||||
return ((unsigned long long)h << 32) | l
|
||||
unsigned &low ():
|
||||
inline unsigned &low ():
|
||||
return l
|
||||
unsigned &high ():
|
||||
inline unsigned &high ():
|
||||
return h
|
||||
unsigned const &low () const:
|
||||
inline unsigned const &low () const:
|
||||
return l
|
||||
unsigned const &high () const:
|
||||
inline unsigned const &high () const:
|
||||
return h
|
||||
|
||||
struct Cap
|
||||
|
||||
Reference in New Issue
Block a user