aboutsummaryrefslogtreecommitdiff
path: root/riscv/trap.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-07-18 18:28:05 -0700
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-07-18 18:28:05 -0700
commit01c01cc36f006cfb03cd6d1c5a68f926b93f7787 (patch)
tree1bc5333057ff935073a595834092e4dd0936e34d /riscv/trap.h
downloadspike-01c01cc36f006cfb03cd6d1c5a68f926b93f7787.zip
spike-01c01cc36f006cfb03cd6d1c5a68f926b93f7787.tar.gz
spike-01c01cc36f006cfb03cd6d1c5a68f926b93f7787.tar.bz2
Reorganized directory structure
Moved cross-compiler to /xcc/ rather than / Added ISA sim in /sim/ Added Proxy Kernel in /pk/ (to be cleaned up) Added opcode map to /opcodes/ (ditto) Added documentation to /doc/
Diffstat (limited to 'riscv/trap.h')
-rw-r--r--riscv/trap.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/riscv/trap.h b/riscv/trap.h
new file mode 100644
index 0000000..026cc76
--- /dev/null
+++ b/riscv/trap.h
@@ -0,0 +1,31 @@
+#ifndef _RISCV_TRAP_H
+#define _RISCV_TRAP_H
+
+#define TRAP_LIST \
+ DECLARE_TRAP(illegal_instruction), \
+ DECLARE_TRAP(privileged_instruction), \
+ DECLARE_TRAP(instruction_address_misaligned), \
+ DECLARE_TRAP(data_address_misaligned), \
+ DECLARE_TRAP(instruction_access_fault), \
+ DECLARE_TRAP(data_access_fault), \
+ DECLARE_TRAP(syscall), \
+ DECLARE_TRAP(breakpoint), \
+ DECLARE_TRAP(int0), \
+ DECLARE_TRAP(int1), \
+ DECLARE_TRAP(int2), \
+ DECLARE_TRAP(int3), \
+ DECLARE_TRAP(int4), \
+ DECLARE_TRAP(int5), \
+ DECLARE_TRAP(int6), \
+ DECLARE_TRAP(int7), \
+
+#define DECLARE_TRAP(x) trap_##x
+enum trap_t
+{
+ TRAP_LIST
+ NUM_TRAPS
+};
+
+extern "C" const char* trap_name(trap_t t);
+
+#endif