1 |
#include "linux.h" |
#include "linux.h" |
2 |
|
|
3 |
#ifdef IN_GBC |
/*FIXME test Linux default*/ |
4 |
|
|
5 |
/* GET_FAULT_ADDR is a bit complicated to implement on m68k, because the fault |
/* GET_FAULT_ADDR is a bit complicated to implement on m68k, because the fault |
6 |
address can't be found directly in the sigcontext. One has to look at the |
address can't be found directly in the sigcontext. One has to look at the |
7 |
CPU frame, and that one is different for each CPU. |
CPU frame, and that one is different for each CPU. |
8 |
*/ |
*/ |
|
/* the following two files have changed back |
|
|
and forth in recent versions of linux... |
|
|
Include both if they both exist, otherwise |
|
|
include whatever one exists... |
|
|
basically one wants the |
|
|
struct sigcontext_struct { ... } ; |
|
|
so as to get the fault address. |
|
|
*/ |
|
|
|
|
9 |
#if !defined(SIGNAL_H_HAS_SIGCONTEXT) && !defined(HAVE_SIGCONTEXT) |
#if !defined(SIGNAL_H_HAS_SIGCONTEXT) && !defined(HAVE_SIGCONTEXT) |
10 |
#error Need sigcontext on linux, at least in some architectures |
#error Need sigcontext on linux, at least in some architectures |
11 |
#else |
#else |
20 |
#endif |
#endif |
21 |
#endif |
#endif |
22 |
|
|
23 |
|
#undef GET_FAULT_ADDR |
24 |
#define GET_FAULT_ADDR(sig,code,sv,a) \ |
#define GET_FAULT_ADDR(sig,code,sv,a) \ |
25 |
({\ |
({\ |
26 |
struct sigcontext *scp1 = (struct sigcontext *)(sv); \ |
struct sigcontext *scp1 = (struct sigcontext *)(sv); \ |
45 |
ea=0;\ |
ea=0;\ |
46 |
} \ |
} \ |
47 |
(char *)ea; }) |
(char *)ea; }) |
|
#endif |
|
48 |
|
|
49 |
#define NULL_OR_ON_C_STACK(x) ( x == 0 || (((unsigned int) x) >= 0xe0000000 )) |
/* #define NULL_OR_ON_C_STACK(x) ( x == 0 || (((unsigned int) x) >= 0xe0000000 )) */ |
50 |
|
|
51 |
#define ADDITIONAL_FEATURES \ |
#define ADDITIONAL_FEATURES \ |
52 |
ADD_FEATURE("BSD386"); \ |
ADD_FEATURE("BSD386"); \ |