aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_insts_end.sail
diff options
context:
space:
mode:
authorPrashanth Mundkur <prashanth.mundkur@gmail.com>2019-01-25 11:09:57 -0800
committerPrashanth Mundkur <prashanth.mundkur@gmail.com>2019-01-25 11:15:15 -0800
commit6aae2163fb13fc3f3ccd85c2304f20a4d1165b44 (patch)
treedc1af80f40aee65a5395937ed6c6da0f6b2df101 /model/riscv_insts_end.sail
parentbfcabc089618fe6bfbd1a5dcc64626531abd2ba2 (diff)
downloadsail-riscv-6aae2163fb13fc3f3ccd85c2304f20a4d1165b44.zip
sail-riscv-6aae2163fb13fc3f3ccd85c2304f20a4d1165b44.tar.gz
sail-riscv-6aae2163fb13fc3f3ccd85c2304f20a4d1165b44.tar.bz2
Factor out each extension into separate files, do some minor cleanup.
Diffstat (limited to 'model/riscv_insts_end.sail')
-rw-r--r--model/riscv_insts_end.sail24
1 files changed, 24 insertions, 0 deletions
diff --git a/model/riscv_insts_end.sail b/model/riscv_insts_end.sail
index 144f06e..f52b6dc 100644
--- a/model/riscv_insts_end.sail
+++ b/model/riscv_insts_end.sail
@@ -1,3 +1,27 @@
+/* Put the illegal instructions last to use their wildcard match. */
+
+/* ****************************************************************** */
+
+union clause ast = ILLEGAL : word
+
+mapping clause encdec = ILLEGAL(s) <-> s
+
+function clause execute (ILLEGAL(s)) = { handle_illegal(); false }
+
+mapping clause assembly = ILLEGAL(s) <-> "illegal" ^ spc() ^ hex_bits_32(s)
+
+/* ****************************************************************** */
+
+union clause ast = C_ILLEGAL : half
+
+mapping clause encdec_compressed = C_ILLEGAL(s) <-> s
+
+function clause execute C_ILLEGAL(s) = { handle_illegal(); false }
+
+mapping clause assembly = C_ILLEGAL(s) <-> "c.illegal" ^ spc() ^ hex_bits_16(s)
+
+/* ****************************************************************** */
+
/* End definitions */
end ast
end execute