aboutsummaryrefslogtreecommitdiff
path: root/debug/programs
diff options
context:
space:
mode:
Diffstat (limited to 'debug/programs')
-rw-r--r--debug/programs/priv.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/debug/programs/priv.S b/debug/programs/priv.S
new file mode 100644
index 0000000..2d20a65
--- /dev/null
+++ b/debug/programs/priv.S
@@ -0,0 +1,11 @@
+#include "../../env/encoding.h"
+
+ .global main
+
+ .section .text
+main:
+ # MISA is only readable from machine mode
+ csrr t0, CSR_MISA
+ csrr t0, CSR_MISA
+ csrr t0, CSR_MISA
+ csrr t0, CSR_MISA