summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon French2018-05-11 17:18:37 +0100
committerJon French2018-05-11 17:18:37 +0100
commit0e7a57c63b0430b4d5b126a3ddce26eacf1f272c (patch)
treee777ae81dd0388630741b5a327feda52369a37be /src
parent3b57f110103bda40398f752950248c50d834670e (diff)
further riscv mapping
Diffstat (limited to 'src')
-rw-r--r--src/sail_lib.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sail_lib.ml b/src/sail_lib.ml
index bab4000b..81685bec 100644
--- a/src/sail_lib.ml
+++ b/src/sail_lib.ml
@@ -655,6 +655,16 @@ let hex_bits_12_matches_prefix s =
else
ZNone ()
+let hex_bits_13_matches_prefix s =
+ match maybe_int_of_prefix s with
+ | ZNone () -> ZNone ()
+ | ZSome (n, len) ->
+ let n = Big_int.to_int n in
+ if 0 <= n && n < 8192 then
+ ZSome ((bits_of_int 4096 n, len))
+ else
+ ZNone ()
+
let hex_bits_20_matches_prefix s =
match maybe_int_of_prefix s with
| ZNone () -> ZNone ()