aboutsummaryrefslogtreecommitdiff
path: root/riscv/trap.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-06-19 20:47:29 -0700
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-06-19 20:47:29 -0700
commit77452a26e7d95d29dbaa797595ae683f03a3345b (patch)
treee7aaae682f73a20ceb4d3366528b0cd38378f49d /riscv/trap.h
parent740f981cfd55604d46598144dccac26dd53f643c (diff)
downloadspike-77452a26e7d95d29dbaa797595ae683f03a3345b.zip
spike-77452a26e7d95d29dbaa797595ae683f03a3345b.tar.gz
spike-77452a26e7d95d29dbaa797595ae683f03a3345b.tar.bz2
temporary undoing of renaming
Diffstat (limited to 'riscv/trap.h')
-rw-r--r--riscv/trap.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/riscv/trap.h b/riscv/trap.h
new file mode 100644
index 0000000..ad5491a
--- /dev/null
+++ b/riscv/trap.h
@@ -0,0 +1,44 @@
+#ifndef _RISCV_TRAP_H
+#define _RISCV_TRAP_H
+
+#define TRAP_LIST \
+ DECLARE_TRAP(instruction_address_misaligned), \
+ DECLARE_TRAP(instruction_access_fault), \
+ DECLARE_TRAP(illegal_instruction), \
+ DECLARE_TRAP(privileged_instruction), \
+ DECLARE_TRAP(fp_disabled), \
+ DECLARE_TRAP(interrupt), \
+ DECLARE_TRAP(syscall), \
+ DECLARE_TRAP(breakpoint), \
+ DECLARE_TRAP(load_address_misaligned), \
+ DECLARE_TRAP(store_address_misaligned), \
+ DECLARE_TRAP(load_access_fault), \
+ DECLARE_TRAP(store_access_fault), \
+ DECLARE_TRAP(vector_disabled), \
+ DECLARE_TRAP(vector_bank), \
+ DECLARE_TRAP(vector_illegal_instruction), \
+ DECLARE_TRAP(reserved1), \
+ DECLARE_TRAP(reserved2), \
+ DECLARE_TRAP(reserved3), \
+ 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
+};
+#undef DECLARE_TRAP
+
+struct halt_t {}; // thrown to stop the processor from running
+
+extern "C" const char* trap_name(trap_t t);
+
+#endif