summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--encoding.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/encoding.h b/encoding.h
index 8a7d3ba..6f981f3 100644
--- a/encoding.h
+++ b/encoding.h
@@ -410,22 +410,6 @@
#define CSR_FFLAGS 0x1
#define CSR_FRM 0x2
#define CSR_FCSR 0x3
-#define CSR_UARCH0 0x80
-#define CSR_UARCH1 0x81
-#define CSR_UARCH2 0x82
-#define CSR_UARCH3 0x83
-#define CSR_UARCH4 0x84
-#define CSR_UARCH5 0x85
-#define CSR_UARCH6 0x86
-#define CSR_UARCH7 0x87
-#define CSR_UARCH8 0x88
-#define CSR_UARCH9 0x89
-#define CSR_UARCH10 0x8a
-#define CSR_UARCH11 0x8b
-#define CSR_UARCH12 0x8c
-#define CSR_UARCH13 0x8d
-#define CSR_UARCH14 0x8e
-#define CSR_UARCH15 0x8f
#define CSR_SUP0 0x500
#define CSR_SUP1 0x501
#define CSR_EPC 0x502
@@ -449,6 +433,22 @@
#define CSR_CYCLE 0xc00
#define CSR_TIME 0xc01
#define CSR_INSTRET 0xc02
+#define CSR_UARCH0 0xc10
+#define CSR_UARCH1 0xc11
+#define CSR_UARCH2 0xc12
+#define CSR_UARCH3 0xc13
+#define CSR_UARCH4 0xc14
+#define CSR_UARCH5 0xc15
+#define CSR_UARCH6 0xc16
+#define CSR_UARCH7 0xc17
+#define CSR_UARCH8 0xc18
+#define CSR_UARCH9 0xc19
+#define CSR_UARCH10 0xc1a
+#define CSR_UARCH11 0xc1b
+#define CSR_UARCH12 0xc1c
+#define CSR_UARCH13 0xc1d
+#define CSR_UARCH14 0xc1e
+#define CSR_UARCH15 0xc1f
#define CAUSE_MISALIGNED_FETCH 0x0
#define CAUSE_FAULT_FETCH 0x1
#define CAUSE_ILLEGAL_INSTRUCTION 0x2
@@ -623,22 +623,6 @@ DECLARE_INSN(sd, MATCH_SD, MASK_SD)
DECLARE_CSR(fflags, CSR_FFLAGS)
DECLARE_CSR(frm, CSR_FRM)
DECLARE_CSR(fcsr, CSR_FCSR)
-DECLARE_CSR(uarch0, CSR_UARCH0)
-DECLARE_CSR(uarch1, CSR_UARCH1)
-DECLARE_CSR(uarch2, CSR_UARCH2)
-DECLARE_CSR(uarch3, CSR_UARCH3)
-DECLARE_CSR(uarch4, CSR_UARCH4)
-DECLARE_CSR(uarch5, CSR_UARCH5)
-DECLARE_CSR(uarch6, CSR_UARCH6)
-DECLARE_CSR(uarch7, CSR_UARCH7)
-DECLARE_CSR(uarch8, CSR_UARCH8)
-DECLARE_CSR(uarch9, CSR_UARCH9)
-DECLARE_CSR(uarch10, CSR_UARCH10)
-DECLARE_CSR(uarch11, CSR_UARCH11)
-DECLARE_CSR(uarch12, CSR_UARCH12)
-DECLARE_CSR(uarch13, CSR_UARCH13)
-DECLARE_CSR(uarch14, CSR_UARCH14)
-DECLARE_CSR(uarch15, CSR_UARCH15)
DECLARE_CSR(sup0, CSR_SUP0)
DECLARE_CSR(sup1, CSR_SUP1)
DECLARE_CSR(epc, CSR_EPC)
@@ -662,27 +646,27 @@ DECLARE_CSR(fromhost, CSR_FROMHOST)
DECLARE_CSR(cycle, CSR_CYCLE)
DECLARE_CSR(time, CSR_TIME)
DECLARE_CSR(instret, CSR_INSTRET)
+DECLARE_CSR(uarch0, CSR_UARCH0)
+DECLARE_CSR(uarch1, CSR_UARCH1)
+DECLARE_CSR(uarch2, CSR_UARCH2)
+DECLARE_CSR(uarch3, CSR_UARCH3)
+DECLARE_CSR(uarch4, CSR_UARCH4)
+DECLARE_CSR(uarch5, CSR_UARCH5)
+DECLARE_CSR(uarch6, CSR_UARCH6)
+DECLARE_CSR(uarch7, CSR_UARCH7)
+DECLARE_CSR(uarch8, CSR_UARCH8)
+DECLARE_CSR(uarch9, CSR_UARCH9)
+DECLARE_CSR(uarch10, CSR_UARCH10)
+DECLARE_CSR(uarch11, CSR_UARCH11)
+DECLARE_CSR(uarch12, CSR_UARCH12)
+DECLARE_CSR(uarch13, CSR_UARCH13)
+DECLARE_CSR(uarch14, CSR_UARCH14)
+DECLARE_CSR(uarch15, CSR_UARCH15)
#endif
#ifdef DECLARE_CAUSE
DECLARE_CAUSE("fflags", CAUSE_FFLAGS)
DECLARE_CAUSE("frm", CAUSE_FRM)
DECLARE_CAUSE("fcsr", CAUSE_FCSR)
-DECLARE_CAUSE("uarch0", CAUSE_UARCH0)
-DECLARE_CAUSE("uarch1", CAUSE_UARCH1)
-DECLARE_CAUSE("uarch2", CAUSE_UARCH2)
-DECLARE_CAUSE("uarch3", CAUSE_UARCH3)
-DECLARE_CAUSE("uarch4", CAUSE_UARCH4)
-DECLARE_CAUSE("uarch5", CAUSE_UARCH5)
-DECLARE_CAUSE("uarch6", CAUSE_UARCH6)
-DECLARE_CAUSE("uarch7", CAUSE_UARCH7)
-DECLARE_CAUSE("uarch8", CAUSE_UARCH8)
-DECLARE_CAUSE("uarch9", CAUSE_UARCH9)
-DECLARE_CAUSE("uarch10", CAUSE_UARCH10)
-DECLARE_CAUSE("uarch11", CAUSE_UARCH11)
-DECLARE_CAUSE("uarch12", CAUSE_UARCH12)
-DECLARE_CAUSE("uarch13", CAUSE_UARCH13)
-DECLARE_CAUSE("uarch14", CAUSE_UARCH14)
-DECLARE_CAUSE("uarch15", CAUSE_UARCH15)
DECLARE_CAUSE("sup0", CAUSE_SUP0)
DECLARE_CAUSE("sup1", CAUSE_SUP1)
DECLARE_CAUSE("epc", CAUSE_EPC)
@@ -706,4 +690,20 @@ DECLARE_CAUSE("fromhost", CAUSE_FROMHOST)
DECLARE_CAUSE("cycle", CAUSE_CYCLE)
DECLARE_CAUSE("time", CAUSE_TIME)
DECLARE_CAUSE("instret", CAUSE_INSTRET)
+DECLARE_CAUSE("uarch0", CAUSE_UARCH0)
+DECLARE_CAUSE("uarch1", CAUSE_UARCH1)
+DECLARE_CAUSE("uarch2", CAUSE_UARCH2)
+DECLARE_CAUSE("uarch3", CAUSE_UARCH3)
+DECLARE_CAUSE("uarch4", CAUSE_UARCH4)
+DECLARE_CAUSE("uarch5", CAUSE_UARCH5)
+DECLARE_CAUSE("uarch6", CAUSE_UARCH6)
+DECLARE_CAUSE("uarch7", CAUSE_UARCH7)
+DECLARE_CAUSE("uarch8", CAUSE_UARCH8)
+DECLARE_CAUSE("uarch9", CAUSE_UARCH9)
+DECLARE_CAUSE("uarch10", CAUSE_UARCH10)
+DECLARE_CAUSE("uarch11", CAUSE_UARCH11)
+DECLARE_CAUSE("uarch12", CAUSE_UARCH12)
+DECLARE_CAUSE("uarch13", CAUSE_UARCH13)
+DECLARE_CAUSE("uarch14", CAUSE_UARCH14)
+DECLARE_CAUSE("uarch15", CAUSE_UARCH15)
#endif