Line 17... |
Line 17... |
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
#ifndef _EXCEPT_H_
|
#ifndef _EXCEPT_H_
|
#define _EXCEPT_H_
|
#define _EXCEPT_H_
|
/* Prototypes */
|
|
void except_handle(int except, unsigned long ea);
|
|
|
|
|
|
/* Define if you want pure virtual machine simulation (no exceptions etc.) */
|
/* Define if you want pure virtual machine simulation (no exceptions etc.) */
|
#define ONLY_VIRTUAL_MACHINE 0
|
#define ONLY_VIRTUAL_MACHINE 0
|
|
|
/* Definition of OR1K exceptions */
|
/* Definition of OR1K exceptions */
|
Line 38... |
Line 35... |
#define EXCEPT_HPINT 0x0800
|
#define EXCEPT_HPINT 0x0800
|
#define EXCEPT_DTLBMISS 0x0900
|
#define EXCEPT_DTLBMISS 0x0900
|
#define EXCEPT_ITLBMISS 0x0a00
|
#define EXCEPT_ITLBMISS 0x0a00
|
#define EXCEPT_RANGE 0x0b00
|
#define EXCEPT_RANGE 0x0b00
|
#define EXCEPT_SYSCALL 0x0c00
|
#define EXCEPT_SYSCALL 0x0c00
|
#define EXCEPT_BREAK 0x0d00
|
|
#define EXCEPT_TRAP 0x0e00
|
#define EXCEPT_TRAP 0x0e00
|
|
|
/* Non maskable exceptions */
|
/* Non maskable exceptions */
|
#define IS_NME(E) ((E) == EXCEPT_RESET)
|
#define IS_NME(E) ((E) == EXCEPT_RESET)
|
|
|
Line 56... |
Line 52... |
E == EXCEPT_HPINT ? "High Priority Interrupt" : \
|
E == EXCEPT_HPINT ? "High Priority Interrupt" : \
|
E == EXCEPT_DTLBMISS ? "Data TLB Miss" : \
|
E == EXCEPT_DTLBMISS ? "Data TLB Miss" : \
|
E == EXCEPT_ITLBMISS ? "Insn TLB Miss" : \
|
E == EXCEPT_ITLBMISS ? "Insn TLB Miss" : \
|
E == EXCEPT_RANGE ? "Range" : \
|
E == EXCEPT_RANGE ? "Range" : \
|
E == EXCEPT_SYSCALL ? "System Call" : \
|
E == EXCEPT_SYSCALL ? "System Call" : \
|
E == EXCEPT_BREAK ? "Break" : \
|
|
E == EXCEPT_TRAP ? "Trap" : "Unknown"
|
E == EXCEPT_TRAP ? "Trap" : "Unknown"
|
|
|
extern struct _pending {
|
extern struct _pending {
|
int valid;
|
int valid;
|
int type;
|
int type;
|
unsigned long address;
|
unsigned long address;
|
unsigned long saved;
|
unsigned long saved;
|
} pending;
|
} pending;
|
|
|
|
/* Prototypes */
|
|
void except_handle(int except, unsigned long ea);
|
|
|
|
/* Actually handles exception */
|
|
void except_handle_backend (int except, unsigned long ea, unsigned long pc_saved);
|
|
|
|
/* Discards all pending exceptions */
|
|
void clear_pending_exception();
|
|
|
#endif
|
#endif
|
|
|
No newline at end of file
|
No newline at end of file
|