aboutsummaryrefslogtreecommitdiff
path: root/prover_snapshots
diff options
context:
space:
mode:
authorBrian Campbell <Brian.Campbell@ed.ac.uk>2021-07-26 23:32:30 +0100
committerBrian Campbell <Brian.Campbell@ed.ac.uk>2021-07-26 23:32:30 +0100
commitaf3f41a29349972a6c36f31e1f3a9ee4ae9c0227 (patch)
tree26a904f2dab28e7a122fda6ac70a958146fd7848 /prover_snapshots
parent99bffcb9ecb8fa228cf47cfd2f44d666933eca95 (diff)
downloadsail-riscv-af3f41a29349972a6c36f31e1f3a9ee4ae9c0227.zip
sail-riscv-af3f41a29349972a6c36f31e1f3a9ee4ae9c0227.tar.gz
sail-riscv-af3f41a29349972a6c36f31e1f3a9ee4ae9c0227.tar.bz2
Update HOL4 snapshot
Diffstat (limited to 'prover_snapshots')
-rw-r--r--prover_snapshots/hol4/README.md8
-rw-r--r--prover_snapshots/hol4/RV32/mem_metadataScript.sml34
-rw-r--r--prover_snapshots/hol4/RV32/riscvAuxiliaryScript.sml2
-rw-r--r--prover_snapshots/hol4/RV32/riscvScript.sml41289
-rw-r--r--prover_snapshots/hol4/RV32/riscv_extrasScript.sml34
-rw-r--r--prover_snapshots/hol4/RV32/riscv_extras_fdextScript.sml209
-rw-r--r--prover_snapshots/hol4/RV32/riscv_typesScript.sml1934
-rw-r--r--prover_snapshots/hol4/RV64/mem_metadataScript.sml34
-rw-r--r--prover_snapshots/hol4/RV64/riscvAuxiliaryScript.sml2
-rw-r--r--prover_snapshots/hol4/RV64/riscvScript.sml53092
-rw-r--r--prover_snapshots/hol4/RV64/riscv_extrasScript.sml34
-rw-r--r--prover_snapshots/hol4/RV64/riscv_extras_fdextScript.sml209
-rw-r--r--prover_snapshots/hol4/RV64/riscv_typesScript.sml1954
-rw-r--r--prover_snapshots/hol4/lib/lem/lem_debugScript.sml33
-rw-r--r--prover_snapshots/hol4/lib/lem/lem_listScript.sml8
-rw-r--r--prover_snapshots/hol4/lib/lem/lem_machine_wordScript.sml2
-rw-r--r--prover_snapshots/hol4/lib/lem/lem_numScript.sml2
-rw-r--r--prover_snapshots/hol4/lib/sail/Holmakefile2
-rw-r--r--prover_snapshots/hol4/lib/sail/Makefile36
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_instr_kindsScript.sml298
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_operators_bitlistsScript.sml5
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_prompt.lem20
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_prompt_monad.lem53
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_state_monadScript.sml5
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_valuesAuxiliaryScript.sml3
-rw-r--r--prover_snapshots/hol4/lib/sail/sail2_valuesScript.sml111
26 files changed, 70764 insertions, 28649 deletions
diff --git a/prover_snapshots/hol4/README.md b/prover_snapshots/hol4/README.md
index 6a16b91..43bfde7 100644
--- a/prover_snapshots/hol4/README.md
+++ b/prover_snapshots/hol4/README.md
@@ -6,6 +6,8 @@ files are included.
A recent checkout of HOL4 from the repository at
<https://github.com/HOL-Theorem-Prover/HOL/> is required. This snapshot was
-successfully built with commit `86a5bc67f`, for example. Some older versions
-will fail with a Holdep error due to a lexer bug in HOL that has now been
-fixed.
+successfully built with commit `0c88037d2`, for example.
+
+It was generated using sail commit `f69ac352` on revision `c6c1e38`
+with the extra option `SAIL_FLAGS+=-grouped_regstate` to make the main
+state record small enough for HOL's datatype support.
diff --git a/prover_snapshots/hol4/RV32/mem_metadataScript.sml b/prover_snapshots/hol4/RV32/mem_metadataScript.sml
new file mode 100644
index 0000000..b90d93e
--- /dev/null
+++ b/prover_snapshots/hol4/RV32/mem_metadataScript.sml
@@ -0,0 +1,34 @@
+(*Generated by Lem from handwritten_support/0.11/mem_metadata.lem.*)
+open HolKernel Parse boolLib bossLib;
+open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
+
+val _ = numLib.prefer_num();
+
+
+
+val _ = new_theory "mem_metadata"
+
+(*open import Pervasives*)
+(*open import Pervasives_extra*)
+(*open import Sail2_instr_kinds*)
+(*open import Sail2_values*)
+(*open import Sail2_operators_mwords*)
+(*open import Sail2_prompt_monad*)
+(*open import Sail2_prompt*)
+
+(*val write_ram : forall 'rv 'e 'a 'n. Size 'a, Size 'n => write_kind -> mword 'a -> integer -> mword 'n -> unit -> monad 'rv bool 'e*)
+val _ = Define `
+ ((write_ram:write_kind -> 'a words$word -> int -> 'n words$word -> unit -> 'rv sail2_state_monad$sequential_state ->(((bool),'e)sail2_state_monad$result#'rv sail2_state_monad$sequential_state)set) wk addr width data meta=
+ (sail2_state_monad$write_memS
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict wk () addr width data))`;
+
+
+(*val read_ram : forall 'rv 'e 'a 'n. Size 'a, Size 'n => read_kind -> mword 'a -> integer -> bool -> monad 'rv (mword 'n * unit) 'e*)
+val _ = Define `
+ ((read_ram:read_kind -> 'a words$word -> int -> bool -> 'rv sail2_state_monad$sequential_state ->((('n words$word#unit),'e)sail2_state_monad$result#'rv sail2_state_monad$sequential_state)set) rk addr width read_tag= (sail2_state_monad$bindS
+ (sail2_state_monad$read_memS
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict rk () addr width) (\ (data : 'n words$word) .
+ sail2_state_monad$returnS (data, () ))))`;
+
+val _ = export_theory()
+
diff --git a/prover_snapshots/hol4/RV32/riscvAuxiliaryScript.sml b/prover_snapshots/hol4/RV32/riscvAuxiliaryScript.sml
index 8de7133..4196a5f 100644
--- a/prover_snapshots/hol4/RV32/riscvAuxiliaryScript.sml
+++ b/prover_snapshots/hol4/RV32/riscvAuxiliaryScript.sml
@@ -1,6 +1,6 @@
(*Generated by Lem from generated_definitions/lem/RV32/riscv.lem.*)
open HolKernel Parse boolLib bossLib;
-open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory riscv_extrasTheory riscvTheory;
+open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory mem_metadataTheory riscv_extras_fdextTheory riscv_extrasTheory riscvTheory;
val _ = numLib.prefer_num();
diff --git a/prover_snapshots/hol4/RV32/riscvScript.sml b/prover_snapshots/hol4/RV32/riscvScript.sml
index 52b43e6..e8a4065 100644
--- a/prover_snapshots/hol4/RV32/riscvScript.sml
+++ b/prover_snapshots/hol4/RV32/riscvScript.sml
@@ -1,6 +1,6 @@
(*Generated by Lem from generated_definitions/lem/RV32/riscv.lem.*)
open HolKernel Parse boolLib bossLib;
-open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory riscv_extrasTheory;
+open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory mem_metadataTheory riscv_extras_fdextTheory riscv_extrasTheory;
val _ = numLib.prefer_num();
@@ -17,6 +17,8 @@ val _ = new_theory "riscv"
(*open import Sail2_prompt_monad*)
(*open import Sail2_prompt*)
(*open import Riscv_types*)
+(*open import Mem_metadata*)
+(*open import Riscv_extras_fdext*)
(*open import Riscv_extras*)
(*val is_none : forall 'a. maybe 'a -> bool*)
@@ -51,6 +53,39 @@ val _ = Define `
((id:int -> int) x= x)`;
+(*val _shl_int_general : ii -> ii -> ii*)
+
+val _ = Define `
+ ((shl_int_general:int -> int -> int) (m : ii) (n : ii)=
+ (if ((n >= (( 0 : int):ii))) then shl_int m n
+ else shr_int m ((~ n))))`;
+
+
+(*val _shr_int_general : ii -> ii -> ii*)
+
+val _ = Define `
+ ((shr_int_general:int -> int -> int) (m : ii) (n : ii)=
+ (if ((n >= (( 0 : int):ii))) then shr_int m n
+ else shl_int m ((~ n))))`;
+
+
+(*val fdiv_int : ii -> ii -> ii*)
+
+val _ = Define `
+ ((fdiv_int:int -> int -> int) (n : ii) (m : ii)=
+ (if (((((n < (( 0 : int):ii))) /\ ((m > (( 0 : int):ii)))))) then
+ ((tdiv_int ((n + (( 1 : int):ii))) m)) - (( 1 : int):ii)
+ else if (((((n > (( 0 : int):ii))) /\ ((m < (( 0 : int):ii)))))) then
+ ((tdiv_int ((n - (( 1 : int):ii))) m)) - (( 1 : int):ii)
+ else tdiv_int n m))`;
+
+
+(*val fmod_int : ii -> ii -> ii*)
+
+val _ = Define `
+ ((fmod_int:int -> int -> int) (n : ii) (m : ii)= (n - ((m * ((fdiv_int n m))))))`;
+
+
(*val concat_str_bits : forall 'n. Size 'n => string -> mword 'n -> string*)
val _ = Define `
@@ -85,7 +120,7 @@ val _ = Define `
((slice_mask:int -> int -> int -> 'n words$word) n i l=
(if ((l >= n)) then (shiftl ((sail_ones n : 'n words$word)) i : 'n words$word)
else
- let one1 = ((sail_mask n (vec_of_bits [B1] : 1 words$word) : 'n words$word)) in
+ let (one1 : 'n words$word) = ((sail_mask n (0b1w : 1 words$word) : 'n words$word)) in
(shiftl ((sub_vec ((shiftl one1 l : 'n words$word)) one1 : 'n words$word)) i : 'n words$word)))`;
@@ -93,18 +128,18 @@ val _ = Define `
val _ = Define `
((read_kind_of_num:int -> read_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Read_plain
- else if (((p0_ = (( 1 : int):ii)))) then Read_reserve
- else if (((p0_ = (( 2 : int):ii)))) then Read_acquire
- else if (((p0_ = (( 3 : int):ii)))) then Read_exclusive
- else if (((p0_ = (( 4 : int):ii)))) then Read_exclusive_acquire
- else if (((p0_ = (( 5 : int):ii)))) then Read_stream
- else if (((p0_ = (( 6 : int):ii)))) then Read_RISCV_acquire
- else if (((p0_ = (( 7 : int):ii)))) then Read_RISCV_strong_acquire
- else if (((p0_ = (( 8 : int):ii)))) then Read_RISCV_reserved
- else if (((p0_ = (( 9 : int):ii)))) then Read_RISCV_reserved_acquire
- else if (((p0_ = (( 10 : int):ii)))) then Read_RISCV_reserved_strong_acquire
+ (let l__299 = arg_ in
+ if (((l__299 = (( 0 : int):ii)))) then Read_plain
+ else if (((l__299 = (( 1 : int):ii)))) then Read_reserve
+ else if (((l__299 = (( 2 : int):ii)))) then Read_acquire
+ else if (((l__299 = (( 3 : int):ii)))) then Read_exclusive
+ else if (((l__299 = (( 4 : int):ii)))) then Read_exclusive_acquire
+ else if (((l__299 = (( 5 : int):ii)))) then Read_stream
+ else if (((l__299 = (( 6 : int):ii)))) then Read_RISCV_acquire
+ else if (((l__299 = (( 7 : int):ii)))) then Read_RISCV_strong_acquire
+ else if (((l__299 = (( 8 : int):ii)))) then Read_RISCV_reserved
+ else if (((l__299 = (( 9 : int):ii)))) then Read_RISCV_reserved_acquire
+ else if (((l__299 = (( 10 : int):ii)))) then Read_RISCV_reserved_strong_acquire
else Read_X86_locked))`;
@@ -132,17 +167,17 @@ val _ = Define `
val _ = Define `
((write_kind_of_num:int -> write_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Write_plain
- else if (((p0_ = (( 1 : int):ii)))) then Write_conditional
- else if (((p0_ = (( 2 : int):ii)))) then Write_release
- else if (((p0_ = (( 3 : int):ii)))) then Write_exclusive
- else if (((p0_ = (( 4 : int):ii)))) then Write_exclusive_release
- else if (((p0_ = (( 5 : int):ii)))) then Write_RISCV_release
- else if (((p0_ = (( 6 : int):ii)))) then Write_RISCV_strong_release
- else if (((p0_ = (( 7 : int):ii)))) then Write_RISCV_conditional
- else if (((p0_ = (( 8 : int):ii)))) then Write_RISCV_conditional_release
- else if (((p0_ = (( 9 : int):ii)))) then Write_RISCV_conditional_strong_release
+ (let l__289 = arg_ in
+ if (((l__289 = (( 0 : int):ii)))) then Write_plain
+ else if (((l__289 = (( 1 : int):ii)))) then Write_conditional
+ else if (((l__289 = (( 2 : int):ii)))) then Write_release
+ else if (((l__289 = (( 3 : int):ii)))) then Write_exclusive
+ else if (((l__289 = (( 4 : int):ii)))) then Write_exclusive_release
+ else if (((l__289 = (( 5 : int):ii)))) then Write_RISCV_release
+ else if (((l__289 = (( 6 : int):ii)))) then Write_RISCV_strong_release
+ else if (((l__289 = (( 7 : int):ii)))) then Write_RISCV_conditional
+ else if (((l__289 = (( 8 : int):ii)))) then Write_RISCV_conditional_release
+ else if (((l__289 = (( 9 : int):ii)))) then Write_RISCV_conditional_strong_release
else Write_X86_locked))`;
@@ -165,66 +200,47 @@ val _ = Define `
)))`;
-(*val barrier_kind_of_num : integer -> barrier_kind*)
+(*val a64_barrier_domain_of_num : integer -> a64_barrier_domain*)
val _ = Define `
- ((barrier_kind_of_num:int -> barrier_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Barrier_Sync
- else if (((p0_ = (( 1 : int):ii)))) then Barrier_LwSync
- else if (((p0_ = (( 2 : int):ii)))) then Barrier_Eieio
- else if (((p0_ = (( 3 : int):ii)))) then Barrier_Isync
- else if (((p0_ = (( 4 : int):ii)))) then Barrier_DMB
- else if (((p0_ = (( 5 : int):ii)))) then Barrier_DMB_ST
- else if (((p0_ = (( 6 : int):ii)))) then Barrier_DMB_LD
- else if (((p0_ = (( 7 : int):ii)))) then Barrier_DSB
- else if (((p0_ = (( 8 : int):ii)))) then Barrier_DSB_ST
- else if (((p0_ = (( 9 : int):ii)))) then Barrier_DSB_LD
- else if (((p0_ = (( 10 : int):ii)))) then Barrier_ISB
- else if (((p0_ = (( 11 : int):ii)))) then Barrier_MIPS_SYNC
- else if (((p0_ = (( 12 : int):ii)))) then Barrier_RISCV_rw_rw
- else if (((p0_ = (( 13 : int):ii)))) then Barrier_RISCV_r_rw
- else if (((p0_ = (( 14 : int):ii)))) then Barrier_RISCV_r_r
- else if (((p0_ = (( 15 : int):ii)))) then Barrier_RISCV_rw_w
- else if (((p0_ = (( 16 : int):ii)))) then Barrier_RISCV_w_w
- else if (((p0_ = (( 17 : int):ii)))) then Barrier_RISCV_w_rw
- else if (((p0_ = (( 18 : int):ii)))) then Barrier_RISCV_rw_r
- else if (((p0_ = (( 19 : int):ii)))) then Barrier_RISCV_r_w
- else if (((p0_ = (( 20 : int):ii)))) then Barrier_RISCV_w_r
- else if (((p0_ = (( 21 : int):ii)))) then Barrier_RISCV_tso
- else if (((p0_ = (( 22 : int):ii)))) then Barrier_RISCV_i
- else Barrier_x86_MFENCE))`;
-
-
-(*val num_of_barrier_kind : barrier_kind -> integer*)
-
-val _ = Define `
- ((num_of_barrier_kind:barrier_kind -> int) arg_=
+ ((a64_barrier_domain_of_num:int -> a64_barrier_domain) arg_=
+ (let l__286 = arg_ in
+ if (((l__286 = (( 0 : int):ii)))) then A64_FullShare
+ else if (((l__286 = (( 1 : int):ii)))) then A64_InnerShare
+ else if (((l__286 = (( 2 : int):ii)))) then A64_OuterShare
+ else A64_NonShare))`;
+
+
+(*val num_of_a64_barrier_domain : a64_barrier_domain -> integer*)
+
+val _ = Define `
+ ((num_of_a64_barrier_domain:a64_barrier_domain -> int) arg_=
+ ((case arg_ of
+ A64_FullShare => (( 0 : int):ii)
+ | A64_InnerShare => (( 1 : int):ii)
+ | A64_OuterShare => (( 2 : int):ii)
+ | A64_NonShare => (( 3 : int):ii)
+ )))`;
+
+
+(*val a64_barrier_type_of_num : integer -> a64_barrier_type*)
+
+val _ = Define `
+ ((a64_barrier_type_of_num:int -> a64_barrier_type) arg_=
+ (let l__284 = arg_ in
+ if (((l__284 = (( 0 : int):ii)))) then A64_barrier_all
+ else if (((l__284 = (( 1 : int):ii)))) then A64_barrier_LD
+ else A64_barrier_ST))`;
+
+
+(*val num_of_a64_barrier_type : a64_barrier_type -> integer*)
+
+val _ = Define `
+ ((num_of_a64_barrier_type:a64_barrier_type -> int) arg_=
((case arg_ of
- Barrier_Sync => (( 0 : int):ii)
- | Barrier_LwSync => (( 1 : int):ii)
- | Barrier_Eieio => (( 2 : int):ii)
- | Barrier_Isync => (( 3 : int):ii)
- | Barrier_DMB => (( 4 : int):ii)
- | Barrier_DMB_ST => (( 5 : int):ii)
- | Barrier_DMB_LD => (( 6 : int):ii)
- | Barrier_DSB => (( 7 : int):ii)
- | Barrier_DSB_ST => (( 8 : int):ii)
- | Barrier_DSB_LD => (( 9 : int):ii)
- | Barrier_ISB => (( 10 : int):ii)
- | Barrier_MIPS_SYNC => (( 11 : int):ii)
- | Barrier_RISCV_rw_rw => (( 12 : int):ii)
- | Barrier_RISCV_r_rw => (( 13 : int):ii)
- | Barrier_RISCV_r_r => (( 14 : int):ii)
- | Barrier_RISCV_rw_w => (( 15 : int):ii)
- | Barrier_RISCV_w_w => (( 16 : int):ii)
- | Barrier_RISCV_w_rw => (( 17 : int):ii)
- | Barrier_RISCV_rw_r => (( 18 : int):ii)
- | Barrier_RISCV_r_w => (( 19 : int):ii)
- | Barrier_RISCV_w_r => (( 20 : int):ii)
- | Barrier_RISCV_tso => (( 21 : int):ii)
- | Barrier_RISCV_i => (( 22 : int):ii)
- | Barrier_x86_MFENCE => (( 23 : int):ii)
+ A64_barrier_all => (( 0 : int):ii)
+ | A64_barrier_LD => (( 1 : int):ii)
+ | A64_barrier_ST => (( 2 : int):ii)
)))`;
@@ -232,9 +248,9 @@ val _ = Define `
val _ = Define `
((trans_kind_of_num:int -> trans_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Transaction_start
- else if (((p0_ = (( 1 : int):ii)))) then Transaction_commit
+ (let l__282 = arg_ in
+ if (((l__282 = (( 0 : int):ii)))) then Transaction_start
+ else if (((l__282 = (( 1 : int):ii)))) then Transaction_commit
else Transaction_abort))`;
@@ -253,17 +269,17 @@ val _ = Define `
val _ = Define `
((cache_op_kind_of_num:int -> cache_op_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Cache_op_D_IVAC
- else if (((p0_ = (( 1 : int):ii)))) then Cache_op_D_ISW
- else if (((p0_ = (( 2 : int):ii)))) then Cache_op_D_CSW
- else if (((p0_ = (( 3 : int):ii)))) then Cache_op_D_CISW
- else if (((p0_ = (( 4 : int):ii)))) then Cache_op_D_ZVA
- else if (((p0_ = (( 5 : int):ii)))) then Cache_op_D_CVAC
- else if (((p0_ = (( 6 : int):ii)))) then Cache_op_D_CVAU
- else if (((p0_ = (( 7 : int):ii)))) then Cache_op_D_CIVAC
- else if (((p0_ = (( 8 : int):ii)))) then Cache_op_I_IALLUIS
- else if (((p0_ = (( 9 : int):ii)))) then Cache_op_I_IALLU
+ (let l__272 = arg_ in
+ if (((l__272 = (( 0 : int):ii)))) then Cache_op_D_IVAC
+ else if (((l__272 = (( 1 : int):ii)))) then Cache_op_D_ISW
+ else if (((l__272 = (( 2 : int):ii)))) then Cache_op_D_CSW
+ else if (((l__272 = (( 3 : int):ii)))) then Cache_op_D_CISW
+ else if (((l__272 = (( 4 : int):ii)))) then Cache_op_D_ZVA
+ else if (((l__272 = (( 5 : int):ii)))) then Cache_op_D_CVAC
+ else if (((l__272 = (( 6 : int):ii)))) then Cache_op_D_CVAU
+ else if (((l__272 = (( 7 : int):ii)))) then Cache_op_D_CIVAC
+ else if (((l__272 = (( 8 : int):ii)))) then Cache_op_I_IALLUIS
+ else if (((l__272 = (( 9 : int):ii)))) then Cache_op_I_IALLU
else Cache_op_I_IVAU))`;
@@ -286,15 +302,20 @@ val _ = Define `
)))`;
+(*val not_bit : bitU -> bitU*)
+
+val _ = Define `
+ ((not_bit0:bitU -> bitU) b= (if (((b = B1))) then B0 else B1))`;
+
-(*val cast_unit_vec : bitU -> mword ty1*)
+
+(*val string_of_bit : bitU -> string*)
val _ = Define `
- ((cast_unit_vec0:bitU ->(1)words$word) b=
- ((case b of B0 => (vec_of_bits [B0] : 1 words$word) | B1 => (vec_of_bits [B1] : 1 words$word) )))`;
+ ((string_of_bit:bitU -> string) b= ((case b of B0 => "0b0" | B1 => "0b1" )))`;
(*val get_config_print_instr : unit -> bool*)
@@ -348,7 +369,7 @@ val _ = Define `
(*val bool_to_bits : bool -> mword ty1*)
val _ = Define `
- ((bool_to_bits:bool ->(1)words$word) x= (if x then (vec_of_bits [B1] : 1 words$word) else (vec_of_bits [B0] : 1 words$word)))`;
+ ((bool_to_bits:bool ->(1)words$word) x= (if x then (0b1w : 1 words$word) else (0b0w : 1 words$word)))`;
(*val bit_to_bool : bitU -> bool*)
@@ -409,6 +430,46 @@ val _ = Define `
(subrange_vec_dec ((shift_bits_right v64 shift : 64 words$word)) (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+(*val spc_forwards : unit -> string*)
+
+(*val spc_backwards : string -> unit*)
+
+(*val spc_forwards_matches : unit -> bool*)
+
+(*val spc_backwards_matches : string -> bool*)
+
+(*val spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val opt_spc_forwards : unit -> string*)
+
+(*val opt_spc_backwards : string -> unit*)
+
+(*val opt_spc_forwards_matches : unit -> bool*)
+
+(*val opt_spc_backwards_matches : string -> bool*)
+
+(*val opt_spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val def_spc_forwards : unit -> string*)
+
+(*val def_spc_backwards : string -> unit*)
+
+(*val def_spc_forwards_matches : unit -> bool*)
+
+(*val def_spc_backwards_matches : string -> bool*)
+
+(*val def_spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val hex_bits_forwards : forall 'n. Size 'n => (integer * mword 'n) -> string*)
+
+(*val hex_bits_backwards : forall 'n. Size 'n => string -> (integer * mword 'n)*)
+
+(*val hex_bits_forwards_matches : forall 'n. Size 'n => (integer * mword 'n) -> bool*)
+
+(*val hex_bits_backwards_matches : string -> bool*)
+
+(*val hex_bits_matches_prefix : forall 'n. Size 'n => string -> maybe (((integer * mword 'n) * ii))*)
+
(*val n_leading_spaces : string -> ii*)
val n_leading_spaces0_defn = Hol_defn "n_leading_spaces0" `
@@ -422,72 +483,56 @@ val _ = Define `
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn n_leading_spaces0_defn;
-(*val spc_forwards : unit -> string*)
-
val _ = Define `
((spc_forwards:unit -> string) () = " ")`;
-(*val spc_backwards : string -> unit*)
-
val _ = Define `
((spc_backwards:string -> unit) s= () )`;
-(*val spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((spc_matches_prefix0:string ->(unit#int)option) s=
(let n = (n_leading_spaces0 s) in
- let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then NONE
+ let l__271 = n in
+ if (((l__271 = (( 0 : int):ii)))) then NONE
else SOME (() , n)))`;
-(*val opt_spc_forwards : unit -> string*)
-
val _ = Define `
((opt_spc_forwards:unit -> string) () = "")`;
-(*val opt_spc_backwards : string -> unit*)
-
val _ = Define `
((opt_spc_backwards:string -> unit) s= () )`;
-(*val opt_spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((opt_spc_matches_prefix0:string ->(unit#int)option) s= (SOME (() , n_leading_spaces0 s)))`;
-(*val def_spc_forwards : unit -> string*)
-
val _ = Define `
((def_spc_forwards:unit -> string) () = " ")`;
-(*val def_spc_backwards : string -> unit*)
-
val _ = Define `
((def_spc_backwards:string -> unit) s= () )`;
-(*val def_spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((def_spc_matches_prefix:string ->(unit#ii)option) s= (opt_spc_matches_prefix0 s))`;
+(*val hex_bits_1_backwards : string -> M (mword ty1)*)
+
(*val hex_bits_1_forwards_matches : mword ty1 -> bool*)
+(*val hex_bits_1_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_1_forwards_matches:(1)words$word -> bool) bv= T)`;
-(*val hex_bits_1_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_1_backwards_matches:string -> bool) s=
((case s of
@@ -495,15 +540,13 @@ val _ = Define `
if ((case ((hex_bits_1_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 1 words$word # ii)) option)) of
- SOME ((g__39, n)) =>
+ SOME ((g__362, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_1_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((hex_bits_1_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_1_matches_prefix
@@ -518,14 +561,16 @@ val _ = Define `
)))`;
+(*val hex_bits_2_backwards : string -> M (mword ty2)*)
+
(*val hex_bits_2_forwards_matches : mword ty2 -> bool*)
+(*val hex_bits_2_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_2_forwards_matches:(2)words$word -> bool) bv= T)`;
-(*val hex_bits_2_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_2_backwards_matches:string -> bool) s=
((case s of
@@ -533,15 +578,13 @@ val _ = Define `
if ((case ((hex_bits_2_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 2 words$word # ii)) option)) of
- SOME ((g__38, n)) =>
+ SOME ((g__361, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_2_backwards : string -> M (mword ty2)*)
-
val _ = Define `
((hex_bits_2_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((2)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_2_matches_prefix
@@ -556,14 +599,16 @@ val _ = Define `
)))`;
+(*val hex_bits_3_backwards : string -> M (mword ty3)*)
+
(*val hex_bits_3_forwards_matches : mword ty3 -> bool*)
+(*val hex_bits_3_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_3_forwards_matches:(3)words$word -> bool) bv= T)`;
-(*val hex_bits_3_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_3_backwards_matches:string -> bool) s=
((case s of
@@ -571,15 +616,13 @@ val _ = Define `
if ((case ((hex_bits_3_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 3 words$word # ii)) option)) of
- SOME ((g__37, n)) =>
+ SOME ((g__360, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_3_backwards : string -> M (mword ty3)*)
-
val _ = Define `
((hex_bits_3_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((3)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_3_matches_prefix
@@ -594,14 +637,16 @@ val _ = Define `
)))`;
+(*val hex_bits_4_backwards : string -> M (mword ty4)*)
+
(*val hex_bits_4_forwards_matches : mword ty4 -> bool*)
+(*val hex_bits_4_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_4_forwards_matches:(4)words$word -> bool) bv= T)`;
-(*val hex_bits_4_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_4_backwards_matches:string -> bool) s=
((case s of
@@ -609,15 +654,13 @@ val _ = Define `
if ((case ((hex_bits_4_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 4 words$word # ii)) option)) of
- SOME ((g__36, n)) =>
+ SOME ((g__359, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_4_backwards : string -> M (mword ty4)*)
-
val _ = Define `
((hex_bits_4_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((4)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_4_matches_prefix
@@ -633,14 +676,16 @@ val _ = Define `
)))`;
+(*val hex_bits_5_backwards : string -> M (mword ty5)*)
+
(*val hex_bits_5_forwards_matches : mword ty5 -> bool*)
+(*val hex_bits_5_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_5_forwards_matches:(5)words$word -> bool) bv= T)`;
-(*val hex_bits_5_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_5_backwards_matches:string -> bool) s=
((case s of
@@ -648,15 +693,13 @@ val _ = Define `
if ((case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 5 words$word # ii)) option)) of
- SOME ((g__35, n)) =>
+ SOME ((g__358, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_5_backwards : string -> M (mword ty5)*)
-
val _ = Define `
((hex_bits_5_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_5_matches_prefix
@@ -672,14 +715,16 @@ val _ = Define `
)))`;
+(*val hex_bits_6_backwards : string -> M (mword ty6)*)
+
(*val hex_bits_6_forwards_matches : mword ty6 -> bool*)
+(*val hex_bits_6_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_6_forwards_matches:(6)words$word -> bool) bv= T)`;
-(*val hex_bits_6_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_6_backwards_matches:string -> bool) s=
((case s of
@@ -687,15 +732,13 @@ val _ = Define `
if ((case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 6 words$word # ii)) option)) of
- SOME ((g__34, n)) =>
+ SOME ((g__357, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_6_backwards : string -> M (mword ty6)*)
-
val _ = Define `
((hex_bits_6_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((6)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_6_matches_prefix
@@ -711,14 +754,16 @@ val _ = Define `
)))`;
+(*val hex_bits_7_backwards : string -> M (mword ty7)*)
+
(*val hex_bits_7_forwards_matches : mword ty7 -> bool*)
+(*val hex_bits_7_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_7_forwards_matches:(7)words$word -> bool) bv= T)`;
-(*val hex_bits_7_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_7_backwards_matches:string -> bool) s=
((case s of
@@ -726,15 +771,13 @@ val _ = Define `
if ((case ((hex_bits_7_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 7 words$word # ii)) option)) of
- SOME ((g__33, n)) =>
+ SOME ((g__356, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_7_backwards : string -> M (mword ty7)*)
-
val _ = Define `
((hex_bits_7_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((7)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_7_matches_prefix
@@ -750,14 +793,16 @@ val _ = Define `
)))`;
+(*val hex_bits_8_backwards : string -> M (mword ty8)*)
+
(*val hex_bits_8_forwards_matches : mword ty8 -> bool*)
+(*val hex_bits_8_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_8_forwards_matches:(8)words$word -> bool) bv= T)`;
-(*val hex_bits_8_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_8_backwards_matches:string -> bool) s=
((case s of
@@ -765,15 +810,13 @@ val _ = Define `
if ((case ((hex_bits_8_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 8 words$word # ii)) option)) of
- SOME ((g__32, n)) =>
+ SOME ((g__355, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_8_backwards : string -> M (mword ty8)*)
-
val _ = Define `
((hex_bits_8_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((8)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_8_matches_prefix
@@ -789,14 +832,16 @@ val _ = Define `
)))`;
+(*val hex_bits_9_backwards : string -> M (mword ty9)*)
+
(*val hex_bits_9_forwards_matches : mword ty9 -> bool*)
+(*val hex_bits_9_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_9_forwards_matches:(9)words$word -> bool) bv= T)`;
-(*val hex_bits_9_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_9_backwards_matches:string -> bool) s=
((case s of
@@ -804,15 +849,13 @@ val _ = Define `
if ((case ((hex_bits_9_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 9 words$word # ii)) option)) of
- SOME ((g__31, n)) =>
+ SOME ((g__354, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_9_backwards : string -> M (mword ty9)*)
-
val _ = Define `
((hex_bits_9_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((9)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_9_matches_prefix
@@ -828,14 +871,16 @@ val _ = Define `
)))`;
+(*val hex_bits_10_backwards : string -> M (mword ty10)*)
+
(*val hex_bits_10_forwards_matches : mword ty10 -> bool*)
+(*val hex_bits_10_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_10_forwards_matches:(10)words$word -> bool) bv= T)`;
-(*val hex_bits_10_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_10_backwards_matches:string -> bool) s=
((case s of
@@ -843,15 +888,13 @@ val _ = Define `
if ((case ((hex_bits_10_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 10 words$word # ii)) option)) of
- SOME ((g__30, n)) =>
+ SOME ((g__353, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_10_backwards : string -> M (mword ty10)*)
-
val _ = Define `
((hex_bits_10_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((10)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_10_matches_prefix
@@ -867,14 +910,16 @@ val _ = Define `
)))`;
+(*val hex_bits_11_backwards : string -> M (mword ty11)*)
+
(*val hex_bits_11_forwards_matches : mword ty11 -> bool*)
+(*val hex_bits_11_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_11_forwards_matches:(11)words$word -> bool) bv= T)`;
-(*val hex_bits_11_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_11_backwards_matches:string -> bool) s=
((case s of
@@ -882,15 +927,13 @@ val _ = Define `
if ((case ((hex_bits_11_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 11 words$word # ii)) option)) of
- SOME ((g__29, n)) =>
+ SOME ((g__352, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_11_backwards : string -> M (mword ty11)*)
-
val _ = Define `
((hex_bits_11_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((11)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_11_matches_prefix
@@ -906,53 +949,58 @@ val _ = Define `
)))`;
+(*val hex_bits_12_backwards : string -> M (mword ty12)*)
+
(*val hex_bits_12_forwards_matches : mword ty12 -> bool*)
+(*val hex_bits_12_backwards_matches : string -> bool*)
+
+(*val hex_bits_12_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+
val _ = Define `
((hex_bits_12_forwards_matches:(12)words$word -> bool) bv= T)`;
-(*val hex_bits_12_backwards_matches : string -> bool*)
+val _ = Define `
+ ((hex_bits_12_matches_prefix0:string ->((12)words$word#ii)option) s= NONE)`;
+
val _ = Define `
((hex_bits_12_backwards_matches:string -> bool) s=
((case s of
s =>
- if ((case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s : (( 12 words$word # ii)) option)) of
- SOME ((g__28, n)) =>
+ if ((case ((hex_bits_12_matches_prefix0 s : (( 12 words$word # ii)) option)) of
+ SOME ((g__351, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_12_backwards : string -> M (mword ty12)*)
-
val _ = Define `
((hex_bits_12_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
- ((case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s : (( 12 words$word # ii))option)) of
+ ((case ((hex_bits_12_matches_prefix0 s : (( 12 words$word # ii))option)) of
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 258:2 - 260:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 262:2 - 264:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 258:2 - 260:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 262:2 - 264:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_13_backwards : string -> M (mword ty13)*)
+
(*val hex_bits_13_forwards_matches : mword ty13 -> bool*)
+(*val hex_bits_13_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_13_forwards_matches:(13)words$word -> bool) bv= T)`;
-(*val hex_bits_13_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_13_backwards_matches:string -> bool) s=
((case s of
@@ -960,15 +1008,13 @@ val _ = Define `
if ((case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 13 words$word # ii)) option)) of
- SOME ((g__27, n)) =>
+ SOME ((g__350, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_13_backwards : string -> M (mword ty13)*)
-
val _ = Define `
((hex_bits_13_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((13)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_13_matches_prefix
@@ -976,22 +1022,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 277:2 - 279:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 281:2 - 283:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 277:2 - 279:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 281:2 - 283:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_14_backwards : string -> M (mword ty14)*)
+
(*val hex_bits_14_forwards_matches : mword ty14 -> bool*)
+(*val hex_bits_14_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_14_forwards_matches:(14)words$word -> bool) bv= T)`;
-(*val hex_bits_14_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_14_backwards_matches:string -> bool) s=
((case s of
@@ -999,15 +1047,13 @@ val _ = Define `
if ((case ((hex_bits_14_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 14 words$word # ii)) option)) of
- SOME ((g__26, n)) =>
+ SOME ((g__349, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_14_backwards : string -> M (mword ty14)*)
-
val _ = Define `
((hex_bits_14_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((14)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_14_matches_prefix
@@ -1015,22 +1061,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 296:2 - 298:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 300:2 - 302:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 296:2 - 298:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 300:2 - 302:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_15_backwards : string -> M (mword ty15)*)
+
(*val hex_bits_15_forwards_matches : mword ty15 -> bool*)
+(*val hex_bits_15_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_15_forwards_matches:(15)words$word -> bool) bv= T)`;
-(*val hex_bits_15_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_15_backwards_matches:string -> bool) s=
((case s of
@@ -1038,15 +1086,13 @@ val _ = Define `
if ((case ((hex_bits_15_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 15 words$word # ii)) option)) of
- SOME ((g__25, n)) =>
+ SOME ((g__348, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_15_backwards : string -> M (mword ty15)*)
-
val _ = Define `
((hex_bits_15_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((15)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_15_matches_prefix
@@ -1054,22 +1100,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 315:2 - 317:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 319:2 - 321:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 315:2 - 317:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 319:2 - 321:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_16_backwards : string -> M (mword ty16)*)
+
(*val hex_bits_16_forwards_matches : mword ty16 -> bool*)
+(*val hex_bits_16_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_16_forwards_matches:(16)words$word -> bool) bv= T)`;
-(*val hex_bits_16_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_16_backwards_matches:string -> bool) s=
((case s of
@@ -1077,15 +1125,13 @@ val _ = Define `
if ((case ((hex_bits_16_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 16 words$word # ii)) option)) of
- SOME ((g__24, n)) =>
+ SOME ((g__347, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_16_backwards : string -> M (mword ty16)*)
-
val _ = Define `
((hex_bits_16_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((16)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_16_matches_prefix
@@ -1093,22 +1139,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 334:2 - 336:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 338:2 - 340:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 334:2 - 336:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 338:2 - 340:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_17_backwards : string -> M (mword ty17)*)
+
(*val hex_bits_17_forwards_matches : mword ty17 -> bool*)
+(*val hex_bits_17_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_17_forwards_matches:(17)words$word -> bool) bv= T)`;
-(*val hex_bits_17_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_17_backwards_matches:string -> bool) s=
((case s of
@@ -1116,15 +1164,13 @@ val _ = Define `
if ((case ((hex_bits_17_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 17 words$word # ii)) option)) of
- SOME ((g__23, n)) =>
+ SOME ((g__346, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_17_backwards : string -> M (mword ty17)*)
-
val _ = Define `
((hex_bits_17_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((17)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_17_matches_prefix
@@ -1132,22 +1178,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 353:2 - 355:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 357:2 - 359:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 353:2 - 355:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 357:2 - 359:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_18_backwards : string -> M (mword ty18)*)
+
(*val hex_bits_18_forwards_matches : mword ty18 -> bool*)
+(*val hex_bits_18_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_18_forwards_matches:(18)words$word -> bool) bv= T)`;
-(*val hex_bits_18_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_18_backwards_matches:string -> bool) s=
((case s of
@@ -1155,15 +1203,13 @@ val _ = Define `
if ((case ((hex_bits_18_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 18 words$word # ii)) option)) of
- SOME ((g__22, n)) =>
+ SOME ((g__345, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_18_backwards : string -> M (mword ty18)*)
-
val _ = Define `
((hex_bits_18_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((18)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_18_matches_prefix
@@ -1171,22 +1217,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 372:2 - 374:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 376:2 - 378:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 372:2 - 374:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 376:2 - 378:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_19_backwards : string -> M (mword ty19)*)
+
(*val hex_bits_19_forwards_matches : mword ty19 -> bool*)
+(*val hex_bits_19_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_19_forwards_matches:(19)words$word -> bool) bv= T)`;
-(*val hex_bits_19_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_19_backwards_matches:string -> bool) s=
((case s of
@@ -1194,15 +1242,13 @@ val _ = Define `
if ((case ((hex_bits_19_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 19 words$word # ii)) option)) of
- SOME ((g__21, n)) =>
+ SOME ((g__344, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_19_backwards : string -> M (mword ty19)*)
-
val _ = Define `
((hex_bits_19_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((19)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_19_matches_prefix
@@ -1210,22 +1256,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 391:2 - 393:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 395:2 - 397:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 391:2 - 393:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 395:2 - 397:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_20_backwards : string -> M (mword ty20)*)
+
(*val hex_bits_20_forwards_matches : mword ty20 -> bool*)
+(*val hex_bits_20_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_20_forwards_matches:(20)words$word -> bool) bv= T)`;
-(*val hex_bits_20_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_20_backwards_matches:string -> bool) s=
((case s of
@@ -1233,15 +1281,13 @@ val _ = Define `
if ((case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 20 words$word # ii)) option)) of
- SOME ((g__20, n)) =>
+ SOME ((g__343, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_20_backwards : string -> M (mword ty20)*)
-
val _ = Define `
((hex_bits_20_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((20)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_20_matches_prefix
@@ -1249,22 +1295,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 410:2 - 412:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 414:2 - 416:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 410:2 - 412:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 414:2 - 416:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_21_backwards : string -> M (mword ty21)*)
+
(*val hex_bits_21_forwards_matches : mword ty21 -> bool*)
+(*val hex_bits_21_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_21_forwards_matches:(21)words$word -> bool) bv= T)`;
-(*val hex_bits_21_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_21_backwards_matches:string -> bool) s=
((case s of
@@ -1272,15 +1320,13 @@ val _ = Define `
if ((case ((hex_bits_21_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 21 words$word # ii)) option)) of
- SOME ((g__19, n)) =>
+ SOME ((g__342, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_21_backwards : string -> M (mword ty21)*)
-
val _ = Define `
((hex_bits_21_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((21)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_21_matches_prefix
@@ -1288,22 +1334,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 429:2 - 431:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 433:2 - 435:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 429:2 - 431:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 433:2 - 435:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_22_backwards : string -> M (mword ty22)*)
+
(*val hex_bits_22_forwards_matches : mword ty22 -> bool*)
+(*val hex_bits_22_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_22_forwards_matches:(22)words$word -> bool) bv= T)`;
-(*val hex_bits_22_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_22_backwards_matches:string -> bool) s=
((case s of
@@ -1311,15 +1359,13 @@ val _ = Define `
if ((case ((hex_bits_22_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 22 words$word # ii)) option)) of
- SOME ((g__18, n)) =>
+ SOME ((g__341, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_22_backwards : string -> M (mword ty22)*)
-
val _ = Define `
((hex_bits_22_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((22)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_22_matches_prefix
@@ -1327,22 +1373,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 448:2 - 450:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 452:2 - 454:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 448:2 - 450:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 452:2 - 454:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_23_backwards : string -> M (mword ty23)*)
+
(*val hex_bits_23_forwards_matches : mword ty23 -> bool*)
+(*val hex_bits_23_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_23_forwards_matches:(23)words$word -> bool) bv= T)`;
-(*val hex_bits_23_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_23_backwards_matches:string -> bool) s=
((case s of
@@ -1350,15 +1398,13 @@ val _ = Define `
if ((case ((hex_bits_23_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 23 words$word # ii)) option)) of
- SOME ((g__17, n)) =>
+ SOME ((g__340, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_23_backwards : string -> M (mword ty23)*)
-
val _ = Define `
((hex_bits_23_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((23)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_23_matches_prefix
@@ -1366,22 +1412,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 467:2 - 469:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 471:2 - 473:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 467:2 - 469:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 471:2 - 473:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_24_backwards : string -> M (mword ty24)*)
+
(*val hex_bits_24_forwards_matches : mword ty24 -> bool*)
+(*val hex_bits_24_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_24_forwards_matches:(24)words$word -> bool) bv= T)`;
-(*val hex_bits_24_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_24_backwards_matches:string -> bool) s=
((case s of
@@ -1389,15 +1437,13 @@ val _ = Define `
if ((case ((hex_bits_24_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 24 words$word # ii)) option)) of
- SOME ((g__16, n)) =>
+ SOME ((g__339, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_24_backwards : string -> M (mword ty24)*)
-
val _ = Define `
((hex_bits_24_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((24)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_24_matches_prefix
@@ -1405,22 +1451,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 486:2 - 488:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 490:2 - 492:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 486:2 - 488:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 490:2 - 492:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_25_backwards : string -> M (mword ty25)*)
+
(*val hex_bits_25_forwards_matches : mword ty25 -> bool*)
+(*val hex_bits_25_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_25_forwards_matches:(25)words$word -> bool) bv= T)`;
-(*val hex_bits_25_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_25_backwards_matches:string -> bool) s=
((case s of
@@ -1428,15 +1476,13 @@ val _ = Define `
if ((case ((hex_bits_25_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 25 words$word # ii)) option)) of
- SOME ((g__15, n)) =>
+ SOME ((g__338, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_25_backwards : string -> M (mword ty25)*)
-
val _ = Define `
((hex_bits_25_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((25)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_25_matches_prefix
@@ -1444,22 +1490,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 505:2 - 507:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 509:2 - 511:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 505:2 - 507:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 509:2 - 511:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_26_backwards : string -> M (mword ty26)*)
+
(*val hex_bits_26_forwards_matches : mword ty26 -> bool*)
+(*val hex_bits_26_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_26_forwards_matches:(26)words$word -> bool) bv= T)`;
-(*val hex_bits_26_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_26_backwards_matches:string -> bool) s=
((case s of
@@ -1467,15 +1515,13 @@ val _ = Define `
if ((case ((hex_bits_26_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 26 words$word # ii)) option)) of
- SOME ((g__14, n)) =>
+ SOME ((g__337, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_26_backwards : string -> M (mword ty26)*)
-
val _ = Define `
((hex_bits_26_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((26)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_26_matches_prefix
@@ -1483,22 +1529,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 524:2 - 526:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 528:2 - 530:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 524:2 - 526:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 528:2 - 530:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_27_backwards : string -> M (mword ty27)*)
+
(*val hex_bits_27_forwards_matches : mword ty27 -> bool*)
+(*val hex_bits_27_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_27_forwards_matches:(27)words$word -> bool) bv= T)`;
-(*val hex_bits_27_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_27_backwards_matches:string -> bool) s=
((case s of
@@ -1506,15 +1554,13 @@ val _ = Define `
if ((case ((hex_bits_27_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 27 words$word # ii)) option)) of
- SOME ((g__13, n)) =>
+ SOME ((g__336, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_27_backwards : string -> M (mword ty27)*)
-
val _ = Define `
((hex_bits_27_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((27)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_27_matches_prefix
@@ -1522,22 +1568,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 543:2 - 545:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 547:2 - 549:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 543:2 - 545:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 547:2 - 549:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_28_backwards : string -> M (mword ty28)*)
+
(*val hex_bits_28_forwards_matches : mword ty28 -> bool*)
+(*val hex_bits_28_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_28_forwards_matches:(28)words$word -> bool) bv= T)`;
-(*val hex_bits_28_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_28_backwards_matches:string -> bool) s=
((case s of
@@ -1545,15 +1593,13 @@ val _ = Define `
if ((case ((hex_bits_28_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 28 words$word # ii)) option)) of
- SOME ((g__12, n)) =>
+ SOME ((g__335, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_28_backwards : string -> M (mword ty28)*)
-
val _ = Define `
((hex_bits_28_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((28)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_28_matches_prefix
@@ -1561,22 +1607,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 562:2 - 564:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 566:2 - 568:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 562:2 - 564:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 566:2 - 568:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_29_backwards : string -> M (mword ty29)*)
+
(*val hex_bits_29_forwards_matches : mword ty29 -> bool*)
+(*val hex_bits_29_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_29_forwards_matches:(29)words$word -> bool) bv= T)`;
-(*val hex_bits_29_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_29_backwards_matches:string -> bool) s=
((case s of
@@ -1584,15 +1632,13 @@ val _ = Define `
if ((case ((hex_bits_29_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 29 words$word # ii)) option)) of
- SOME ((g__11, n)) =>
+ SOME ((g__334, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_29_backwards : string -> M (mword ty29)*)
-
val _ = Define `
((hex_bits_29_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((29)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_29_matches_prefix
@@ -1600,22 +1646,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 581:2 - 583:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 585:2 - 587:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 581:2 - 583:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 585:2 - 587:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_30_backwards : string -> M (mword ty30)*)
+
(*val hex_bits_30_forwards_matches : mword ty30 -> bool*)
+(*val hex_bits_30_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_30_forwards_matches:(30)words$word -> bool) bv= T)`;
-(*val hex_bits_30_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_30_backwards_matches:string -> bool) s=
((case s of
@@ -1623,15 +1671,13 @@ val _ = Define `
if ((case ((hex_bits_30_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 30 words$word # ii)) option)) of
- SOME ((g__10, n)) =>
+ SOME ((g__333, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_30_backwards : string -> M (mword ty30)*)
-
val _ = Define `
((hex_bits_30_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((30)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_30_matches_prefix
@@ -1639,22 +1685,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 600:2 - 602:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 604:2 - 606:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 600:2 - 602:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 604:2 - 606:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_31_backwards : string -> M (mword ty31)*)
+
(*val hex_bits_31_forwards_matches : mword ty31 -> bool*)
+(*val hex_bits_31_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_31_forwards_matches:(31)words$word -> bool) bv= T)`;
-(*val hex_bits_31_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_31_backwards_matches:string -> bool) s=
((case s of
@@ -1662,15 +1710,13 @@ val _ = Define `
if ((case ((hex_bits_31_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 31 words$word # ii)) option)) of
- SOME ((g__9, n)) =>
+ SOME ((g__332, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_31_backwards : string -> M (mword ty31)*)
-
val _ = Define `
((hex_bits_31_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((31)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_31_matches_prefix
@@ -1678,22 +1724,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 619:2 - 621:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 623:2 - 625:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 619:2 - 621:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 623:2 - 625:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_32_backwards : string -> M (mword ty32)*)
+
(*val hex_bits_32_forwards_matches : mword ty32 -> bool*)
+(*val hex_bits_32_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_32_forwards_matches:(32)words$word -> bool) bv= T)`;
-(*val hex_bits_32_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_32_backwards_matches:string -> bool) s=
((case s of
@@ -1701,15 +1749,13 @@ val _ = Define `
if ((case ((hex_bits_32_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 32 words$word # ii)) option)) of
- SOME ((g__8, n)) =>
+ SOME ((g__331, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_32_backwards : string -> M (mword ty32)*)
-
val _ = Define `
((hex_bits_32_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_32_matches_prefix
@@ -1717,22 +1763,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 638:2 - 640:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 642:2 - 644:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 638:2 - 640:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 642:2 - 644:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_33_backwards : string -> M (mword ty33)*)
+
(*val hex_bits_33_forwards_matches : mword ty33 -> bool*)
+(*val hex_bits_33_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_33_forwards_matches:(33)words$word -> bool) bv= T)`;
-(*val hex_bits_33_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_33_backwards_matches:string -> bool) s=
((case s of
@@ -1740,15 +1788,13 @@ val _ = Define `
if ((case ((hex_bits_33_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 33 words$word # ii)) option)) of
- SOME ((g__7, n)) =>
+ SOME ((g__330, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_33_backwards : string -> M (mword ty33)*)
-
val _ = Define `
((hex_bits_33_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((33)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_33_matches_prefix
@@ -1756,22 +1802,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 657:2 - 659:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 661:2 - 663:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 657:2 - 659:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 661:2 - 663:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_48_backwards : string -> M (mword ty48)*)
+
(*val hex_bits_48_forwards_matches : mword ty48 -> bool*)
+(*val hex_bits_48_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_48_forwards_matches:(48)words$word -> bool) bv= T)`;
-(*val hex_bits_48_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_48_backwards_matches:string -> bool) s=
((case s of
@@ -1779,15 +1827,13 @@ val _ = Define `
if ((case ((hex_bits_48_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 48 words$word # ii)) option)) of
- SOME ((g__6, n)) =>
+ SOME ((g__329, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_48_backwards : string -> M (mword ty48)*)
-
val _ = Define `
((hex_bits_48_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((48)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_48_matches_prefix
@@ -1795,22 +1841,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 676:2 - 678:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 680:2 - 682:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 676:2 - 678:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 680:2 - 682:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_64_backwards : string -> M (mword ty64)*)
+
(*val hex_bits_64_forwards_matches : mword ty64 -> bool*)
+(*val hex_bits_64_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_64_forwards_matches:(64)words$word -> bool) bv= T)`;
-(*val hex_bits_64_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_64_backwards_matches:string -> bool) s=
((case s of
@@ -1818,15 +1866,13 @@ val _ = Define `
if ((case ((hex_bits_64_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 64 words$word # ii)) option)) of
- SOME ((g__5, n)) =>
+ SOME ((g__328, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_64_backwards : string -> M (mword ty64)*)
-
val _ = Define `
((hex_bits_64_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_64_matches_prefix
@@ -1834,10 +1880,10 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 695:2 - 697:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 699:2 - 701:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 695:2 - 697:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 699:2 - 701:3")
(sail2_state_monad$exitS () )
)))`;
@@ -1858,13 +1904,6 @@ val _ = Define `
((ReadRAM_Meta:(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width= (sail2_state_monad$returnS () ))`;
-(*val write_ram : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> unit -> M bool*)
-
-val _ = Define `
- ((write_ram:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) wk addr width data meta= (sail2_state_monad$bindS
- (sail2_state_monad$write_memS
- instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict wk (( 32 : int):ii) addr width data) (\ (ret : bool) . sail2_state_monad$seqS
- (if ret then WriteRAM_Meta addr width meta else sail2_state_monad$returnS () ) (sail2_state_monad$returnS ret))))`;
(*val write_ram_ea : write_kind -> mword ty32 -> integer -> M unit*)
@@ -1873,11 +1912,6 @@ val _ = Define `
((write_ram_ea:write_kind ->(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) wk addr width= (sail2_state_monad$returnS () ))`;
-(*val read_ram : forall 'int8_times_n. Size 'int8_times_n => read_kind -> mword ty32 -> integer -> M (mword 'int8_times_n)*)
-
-val _ = Define `
- ((read_ram:read_kind ->(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->((('int8_times_n words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rk addr width= ((sail2_state_monad$read_memS
- instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict rk (( 32 : int):ii) addr width : ( 'int8_times_n words$word) M)))`;
(*val __TraceMemoryWrite : forall 'm 'int8_times_n. Size 'm, Size 'int8_times_n => integer -> mword 'm -> mword 'int8_times_n -> unit*)
@@ -1885,19 +1919,47 @@ val _ = Define `
(*val __TraceMemoryRead : forall 'm 'int8_times_n. Size 'm, Size 'int8_times_n => integer -> mword 'm -> mword 'int8_times_n -> unit*)
val _ = Define `
- ((xlen_val:int)= ((( 32 : int):ii)))`;
+((init_ext_ptw:unit)= () )`;
+
+
+(*val ext_translate_exception : unit -> unit*)
+
+val _ = Define `
+ ((ext_translate_exception:unit -> unit) e= e)`;
+
+
+(*val ext_exc_type_to_bits : unit -> mword ty8*)
+
+val _ = Define `
+ ((ext_exc_type_to_bits:unit ->(8)words$word) e= ((0x18w : 8 words$word)))`;
+
+
+(*val num_of_ext_exc_type : unit -> integer*)
+
+val _ = Define `
+ ((num_of_ext_exc_type:unit -> int) e= ((( 24 : int):ii)))`;
+
+
+(*val ext_exc_type_to_str : unit -> string*)
+
+val _ = Define `
+ ((ext_exc_type_to_str:unit -> string) e= "extension-exception")`;
val _ = Define `
- ((xlen_max_unsigned:int)= (((pow2 (( 32 : int):ii))) - (( 1 : int):ii)))`;
+((xlen_val:int)= ((( 32 : int):ii)))`;
val _ = Define `
- ((xlen_max_signed:int)= (((pow2 (((( 32 : int):ii) - (( 1 : int):ii))))) - (( 1 : int):ii)))`;
+((xlen_max_unsigned:int)= ((( 4294967295 : int):ii)))`;
val _ = Define `
- ((xlen_min_signed:int)= ((( 0 : int):ii) - ((pow2 (((( 32 : int):ii) - (( 1 : int):ii)))))))`;
+((xlen_max_signed:int)= ((( 2147483647 : int):ii)))`;
+
+
+val _ = Define `
+((xlen_min_signed:int)= (((( 0 : int)-( 2147483648 : int)):ii)))`;
(*val regidx_to_regno : mword ty5 -> integer*)
@@ -1911,28 +1973,28 @@ val _ = Define `
(*val creg2reg_idx : mword ty3 -> mword ty5*)
val _ = Define `
- ((creg2reg_idx:(3)words$word ->(5)words$word) creg= ((concat_vec (vec_of_bits [B0;B1] : 2 words$word) creg : 5 words$word)))`;
+ ((creg2reg_idx:(3)words$word ->(5)words$word) creg= ((concat_vec (0b01w : 2 words$word) creg : 5 words$word)))`;
val _ = Define `
-((zreg:(5)words$word)= ((vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))`;
+((zreg:(5)words$word)= ((0b00000w : 5 words$word)))`;
val _ = Define `
-((ra:(5)words$word)= ((vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))`;
+((ra:(5)words$word)= ((0b00001w : 5 words$word)))`;
val _ = Define `
-((sp:(5)words$word)= ((vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))`;
+((sp:(5)words$word)= ((0b00010w : 5 words$word)))`;
(*val Architecture_of_num : integer -> Architecture*)
val _ = Define `
((Architecture_of_num:int -> Architecture) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RV32
- else if (((p0_ = (( 1 : int):ii)))) then RV64
+ (let l__269 = arg_ in
+ if (((l__269 = (( 0 : int):ii)))) then RV32
+ else if (((l__269 = (( 1 : int):ii)))) then RV64
else RV128))`;
@@ -1948,9 +2010,9 @@ val _ = Define `
val _ = Define `
((architecture:(2)words$word ->(Architecture)option) a=
(let b__0 = a in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then SOME RV32
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then SOME RV64
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then SOME RV128
+ if (((b__0 = (0b01w : 2 words$word)))) then SOME RV32
+ else if (((b__0 = (0b10w : 2 words$word)))) then SOME RV64
+ else if (((b__0 = (0b11w : 2 words$word)))) then SOME RV128
else NONE))`;
@@ -1959,9 +2021,9 @@ val _ = Define `
val _ = Define `
((arch_to_bits:Architecture ->(2)words$word) a=
((case a of
- RV32 => (vec_of_bits [B0;B1] : 2 words$word)
- | RV64 => (vec_of_bits [B1;B0] : 2 words$word)
- | RV128 => (vec_of_bits [B1;B1] : 2 words$word)
+ RV32 => (0b01w : 2 words$word)
+ | RV64 => (0b10w : 2 words$word)
+ | RV128 => (0b11w : 2 words$word)
)))`;
@@ -1969,9 +2031,9 @@ val _ = Define `
val _ = Define `
((Privilege_of_num:int -> Privilege) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then User
- else if (((p0_ = (( 1 : int):ii)))) then Supervisor
+ (let l__267 = arg_ in
+ if (((l__267 = (( 0 : int):ii)))) then User
+ else if (((l__267 = (( 1 : int):ii)))) then Supervisor
else Machine))`;
@@ -1987,9 +2049,9 @@ val _ = Define `
val _ = Define `
((privLevel_to_bits:Privilege ->(2)words$word) p=
((case p of
- User => (vec_of_bits [B0;B0] : 2 words$word)
- | Supervisor => (vec_of_bits [B0;B1] : 2 words$word)
- | Machine => (vec_of_bits [B1;B1] : 2 words$word)
+ User => (0b00w : 2 words$word)
+ | Supervisor => (0b01w : 2 words$word)
+ | Machine => (0b11w : 2 words$word)
)))`;
@@ -1998,9 +2060,9 @@ val _ = Define `
val _ = Define `
((privLevel_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
(let b__0 = p in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS User
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS Supervisor
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS Machine
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS User
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS Supervisor
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS Machine
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 78:2 - 82:3") (sail2_state_monad$exitS () )))`;
@@ -2010,14 +2072,24 @@ val _ = Define `
((privLevel_to_str:Privilege -> string) p= ((case p of User => "U" | Supervisor => "S" | Machine => "M" )))`;
+(*val accessType_to_str : AccessType unit -> string*)
+
+(*val csr_name : mword ty12 -> string*)
+
+(*val exceptionType_to_str : ExceptionType -> string*)
+
(*val print_insn : ast -> M string*)
+(*val ptw_error_to_str : PTW_Error -> string*)
+
+(*val reg_name_abi : mword ty5 -> M string*)
+
(*val Retired_of_num : integer -> Retired*)
val _ = Define `
((Retired_of_num:int -> Retired) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RETIRE_SUCCESS
+ (let l__266 = arg_ in
+ if (((l__266 = (( 0 : int):ii)))) then RETIRE_SUCCESS
else RETIRE_FAIL))`;
@@ -2027,39 +2099,14 @@ val _ = Define `
((num_of_Retired:Retired -> int) arg_= ((case arg_ of RETIRE_SUCCESS => (( 0 : int):ii) | RETIRE_FAIL => (( 1 : int):ii) )))`;
-(*val AccessType_of_num : integer -> AccessType*)
-
-val _ = Define `
- ((AccessType_of_num:int -> AccessType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Read
- else if (((p0_ = (( 1 : int):ii)))) then Write
- else if (((p0_ = (( 2 : int):ii)))) then ReadWrite
- else Execute))`;
-
-
-(*val num_of_AccessType : AccessType -> integer*)
-
-val _ = Define `
- ((num_of_AccessType:AccessType -> int) arg_=
- ((case arg_ of Read => (( 0 : int):ii) | Write => (( 1 : int):ii) | ReadWrite => (( 2 : int):ii) | Execute => (( 3 : int):ii) )))`;
-
-
-(*val accessType_to_str : AccessType -> string*)
-
-val _ = Define `
- ((accessType_to_str:AccessType -> string) a=
- ((case a of Read => "R" | Write => "W" | ReadWrite => "RW" | Execute => "X" )))`;
-
-
(*val word_width_of_num : integer -> word_width*)
val _ = Define `
((word_width_of_num:int -> word_width) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then BYTE
- else if (((p0_ = (( 1 : int):ii)))) then HALF
- else if (((p0_ = (( 2 : int):ii)))) then WORD
+ (let l__263 = arg_ in
+ if (((l__263 = (( 0 : int):ii)))) then BYTE
+ else if (((l__263 = (( 1 : int):ii)))) then HALF
+ else if (((l__263 = (( 2 : int):ii)))) then WORD
else DOUBLE))`;
@@ -2074,15 +2121,15 @@ val _ = Define `
val _ = Define `
((InterruptType_of_num:int -> InterruptType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then I_U_Software
- else if (((p0_ = (( 1 : int):ii)))) then I_S_Software
- else if (((p0_ = (( 2 : int):ii)))) then I_M_Software
- else if (((p0_ = (( 3 : int):ii)))) then I_U_Timer
- else if (((p0_ = (( 4 : int):ii)))) then I_S_Timer
- else if (((p0_ = (( 5 : int):ii)))) then I_M_Timer
- else if (((p0_ = (( 6 : int):ii)))) then I_U_External
- else if (((p0_ = (( 7 : int):ii)))) then I_S_External
+ (let l__255 = arg_ in
+ if (((l__255 = (( 0 : int):ii)))) then I_U_Software
+ else if (((l__255 = (( 1 : int):ii)))) then I_S_Software
+ else if (((l__255 = (( 2 : int):ii)))) then I_M_Software
+ else if (((l__255 = (( 3 : int):ii)))) then I_U_Timer
+ else if (((l__255 = (( 4 : int):ii)))) then I_S_Timer
+ else if (((l__255 = (( 5 : int):ii)))) then I_M_Timer
+ else if (((l__255 = (( 6 : int):ii)))) then I_U_External
+ else if (((l__255 = (( 7 : int):ii)))) then I_S_External
else I_M_External))`;
@@ -2108,114 +2155,88 @@ val _ = Define `
val _ = Define `
((interruptType_to_bits:InterruptType ->(8)words$word) i=
((case i of
- I_U_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)
- | I_S_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)
- | I_M_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B1] : 8 words$word)
- | I_U_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0] : 8 words$word)
- | I_S_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B1] : 8 words$word)
- | I_M_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B1] : 8 words$word)
- | I_U_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B0] : 8 words$word)
- | I_S_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B1] : 8 words$word)
- | I_M_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1] : 8 words$word)
+ I_U_Software => (0x00w : 8 words$word)
+ | I_S_Software => (0x01w : 8 words$word)
+ | I_M_Software => (0x03w : 8 words$word)
+ | I_U_Timer => (0x04w : 8 words$word)
+ | I_S_Timer => (0x05w : 8 words$word)
+ | I_M_Timer => (0x07w : 8 words$word)
+ | I_U_External => (0x08w : 8 words$word)
+ | I_S_External => (0x09w : 8 words$word)
+ | I_M_External => (0x0Bw : 8 words$word)
)))`;
-(*val ExceptionType_of_num : integer -> ExceptionType*)
-
-val _ = Define `
- ((ExceptionType_of_num:int -> ExceptionType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then E_Fetch_Addr_Align
- else if (((p0_ = (( 1 : int):ii)))) then E_Fetch_Access_Fault
- else if (((p0_ = (( 2 : int):ii)))) then E_Illegal_Instr
- else if (((p0_ = (( 3 : int):ii)))) then E_Breakpoint
- else if (((p0_ = (( 4 : int):ii)))) then E_Load_Addr_Align
- else if (((p0_ = (( 5 : int):ii)))) then E_Load_Access_Fault
- else if (((p0_ = (( 6 : int):ii)))) then E_SAMO_Addr_Align
- else if (((p0_ = (( 7 : int):ii)))) then E_SAMO_Access_Fault
- else if (((p0_ = (( 8 : int):ii)))) then E_U_EnvCall
- else if (((p0_ = (( 9 : int):ii)))) then E_S_EnvCall
- else if (((p0_ = (( 10 : int):ii)))) then E_Reserved_10
- else if (((p0_ = (( 11 : int):ii)))) then E_M_EnvCall
- else if (((p0_ = (( 12 : int):ii)))) then E_Fetch_Page_Fault
- else if (((p0_ = (( 13 : int):ii)))) then E_Load_Page_Fault
- else if (((p0_ = (( 14 : int):ii)))) then E_Reserved_14
- else if (((p0_ = (( 15 : int):ii)))) then E_SAMO_Page_Fault
- else E_CHERI))`;
-
-
-(*val num_of_ExceptionType : ExceptionType -> integer*)
+(*val exceptionType_to_bits : ExceptionType -> mword ty8*)
val _ = Define `
- ((num_of_ExceptionType:ExceptionType -> int) arg_=
- ((case arg_ of
- E_Fetch_Addr_Align => (( 0 : int):ii)
- | E_Fetch_Access_Fault => (( 1 : int):ii)
- | E_Illegal_Instr => (( 2 : int):ii)
- | E_Breakpoint => (( 3 : int):ii)
- | E_Load_Addr_Align => (( 4 : int):ii)
- | E_Load_Access_Fault => (( 5 : int):ii)
- | E_SAMO_Addr_Align => (( 6 : int):ii)
- | E_SAMO_Access_Fault => (( 7 : int):ii)
- | E_U_EnvCall => (( 8 : int):ii)
- | E_S_EnvCall => (( 9 : int):ii)
- | E_Reserved_10 => (( 10 : int):ii)
- | E_M_EnvCall => (( 11 : int):ii)
- | E_Fetch_Page_Fault => (( 12 : int):ii)
- | E_Load_Page_Fault => (( 13 : int):ii)
- | E_Reserved_14 => (( 14 : int):ii)
- | E_SAMO_Page_Fault => (( 15 : int):ii)
- | E_CHERI => (( 16 : int):ii)
+ ((exceptionType_to_bits:ExceptionType ->(8)words$word) e=
+ ((case e of
+ E_Fetch_Addr_Align (() ) => (0x00w : 8 words$word)
+ | E_Fetch_Access_Fault (() ) => (0x01w : 8 words$word)
+ | E_Illegal_Instr (() ) => (0x02w : 8 words$word)
+ | E_Breakpoint (() ) => (0x03w : 8 words$word)
+ | E_Load_Addr_Align (() ) => (0x04w : 8 words$word)
+ | E_Load_Access_Fault (() ) => (0x05w : 8 words$word)
+ | E_SAMO_Addr_Align (() ) => (0x06w : 8 words$word)
+ | E_SAMO_Access_Fault (() ) => (0x07w : 8 words$word)
+ | E_U_EnvCall (() ) => (0x08w : 8 words$word)
+ | E_S_EnvCall (() ) => (0x09w : 8 words$word)
+ | E_Reserved_10 (() ) => (0x0Aw : 8 words$word)
+ | E_M_EnvCall (() ) => (0x0Bw : 8 words$word)
+ | E_Fetch_Page_Fault (() ) => (0x0Cw : 8 words$word)
+ | E_Load_Page_Fault (() ) => (0x0Dw : 8 words$word)
+ | E_Reserved_14 (() ) => (0x0Ew : 8 words$word)
+ | E_SAMO_Page_Fault (() ) => (0x0Fw : 8 words$word)
+ | E_Extension (e) => (ext_exc_type_to_bits e : 8 words$word)
)))`;
-(*val exceptionType_to_bits : ExceptionType -> mword ty8*)
+(*val num_of_ExceptionType : ExceptionType -> integer*)
val _ = Define `
- ((exceptionType_to_bits:ExceptionType ->(8)words$word) e=
+ ((num_of_ExceptionType:ExceptionType -> int) e=
((case e of
- E_Fetch_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)
- | E_Fetch_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)
- | E_Illegal_Instr => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B0] : 8 words$word)
- | E_Breakpoint => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B1] : 8 words$word)
- | E_Load_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0] : 8 words$word)
- | E_Load_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B1] : 8 words$word)
- | E_SAMO_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B0] : 8 words$word)
- | E_SAMO_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B1] : 8 words$word)
- | E_U_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B0] : 8 words$word)
- | E_S_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B1] : 8 words$word)
- | E_Reserved_10 => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B0] : 8 words$word)
- | E_M_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1] : 8 words$word)
- | E_Fetch_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B0;B0] : 8 words$word)
- | E_Load_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B0;B1] : 8 words$word)
- | E_Reserved_14 => (vec_of_bits [B0;B0;B0;B0;B1;B1;B1;B0] : 8 words$word)
- | E_SAMO_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B1;B1] : 8 words$word)
- | E_CHERI => (vec_of_bits [B0;B0;B1;B0;B0;B0;B0;B0] : 8 words$word)
+ E_Fetch_Addr_Align (() ) => (( 0 : int):ii)
+ | E_Fetch_Access_Fault (() ) => (( 1 : int):ii)
+ | E_Illegal_Instr (() ) => (( 2 : int):ii)
+ | E_Breakpoint (() ) => (( 3 : int):ii)
+ | E_Load_Addr_Align (() ) => (( 4 : int):ii)
+ | E_Load_Access_Fault (() ) => (( 5 : int):ii)
+ | E_SAMO_Addr_Align (() ) => (( 6 : int):ii)
+ | E_SAMO_Access_Fault (() ) => (( 7 : int):ii)
+ | E_U_EnvCall (() ) => (( 8 : int):ii)
+ | E_S_EnvCall (() ) => (( 9 : int):ii)
+ | E_Reserved_10 (() ) => (( 10 : int):ii)
+ | E_M_EnvCall (() ) => (( 11 : int):ii)
+ | E_Fetch_Page_Fault (() ) => (( 12 : int):ii)
+ | E_Load_Page_Fault (() ) => (( 13 : int):ii)
+ | E_Reserved_14 (() ) => (( 14 : int):ii)
+ | E_SAMO_Page_Fault (() ) => (( 15 : int):ii)
+ | E_Extension (e) => num_of_ext_exc_type e
)))`;
-(*val exceptionType_to_str : ExceptionType -> string*)
-
val _ = Define `
((exceptionType_to_str:ExceptionType -> string) e=
((case e of
- E_Fetch_Addr_Align => "misaligned-fetch"
- | E_Fetch_Access_Fault => "fetch-access-fault"
- | E_Illegal_Instr => "illegal-instruction"
- | E_Breakpoint => "breakpoint"
- | E_Load_Addr_Align => "misaligned-load"
- | E_Load_Access_Fault => "load-access-fault"
- | E_SAMO_Addr_Align => "misaliged-store/amo"
- | E_SAMO_Access_Fault => "store/amo-access-fault"
- | E_U_EnvCall => "u-call"
- | E_S_EnvCall => "s-call"
- | E_Reserved_10 => "reserved-0"
- | E_M_EnvCall => "m-call"
- | E_Fetch_Page_Fault => "fetch-page-fault"
- | E_Load_Page_Fault => "load-page-fault"
- | E_Reserved_14 => "reserved-1"
- | E_SAMO_Page_Fault => "store/amo-page-fault"
- | E_CHERI => "CHERI"
+ E_Fetch_Addr_Align (() ) => "misaligned-fetch"
+ | E_Fetch_Access_Fault (() ) => "fetch-access-fault"
+ | E_Illegal_Instr (() ) => "illegal-instruction"
+ | E_Breakpoint (() ) => "breakpoint"
+ | E_Load_Addr_Align (() ) => "misaligned-load"
+ | E_Load_Access_Fault (() ) => "load-access-fault"
+ | E_SAMO_Addr_Align (() ) => "misaliged-store/amo"
+ | E_SAMO_Access_Fault (() ) => "store/amo-access-fault"
+ | E_U_EnvCall (() ) => "u-call"
+ | E_S_EnvCall (() ) => "s-call"
+ | E_Reserved_10 (() ) => "reserved-0"
+ | E_M_EnvCall (() ) => "m-call"
+ | E_Fetch_Page_Fault (() ) => "fetch-page-fault"
+ | E_Load_Page_Fault (() ) => "load-page-fault"
+ | E_Reserved_14 (() ) => "reserved-1"
+ | E_SAMO_Page_Fault (() ) => "store/amo-page-fault"
+ | E_Extension (e) => ext_exc_type_to_str e
)))`;
@@ -2235,9 +2256,9 @@ val _ = Define `
val _ = Define `
((TrapVectorMode_of_num:int -> TrapVectorMode) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then TV_Direct
- else if (((p0_ = (( 1 : int):ii)))) then TV_Vector
+ (let l__253 = arg_ in
+ if (((l__253 = (( 0 : int):ii)))) then TV_Direct
+ else if (((l__253 = (( 1 : int):ii)))) then TV_Vector
else TV_Reserved))`;
@@ -2253,8 +2274,8 @@ val _ = Define `
val _ = Define `
((trapVectorMode_of_bits:(2)words$word -> TrapVectorMode) m=
(let b__0 = m in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then TV_Direct
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then TV_Vector
+ if (((b__0 = (0b00w : 2 words$word)))) then TV_Direct
+ else if (((b__0 = (0b01w : 2 words$word)))) then TV_Vector
else TV_Reserved))`;
@@ -2262,10 +2283,10 @@ val _ = Define `
val _ = Define `
((ExtStatus_of_num:int -> ExtStatus) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Off
- else if (((p0_ = (( 1 : int):ii)))) then Initial
- else if (((p0_ = (( 2 : int):ii)))) then Clean
+ (let l__250 = arg_ in
+ if (((l__250 = (( 0 : int):ii)))) then Off
+ else if (((l__250 = (( 1 : int):ii)))) then Initial
+ else if (((l__250 = (( 2 : int):ii)))) then Clean
else Dirty))`;
@@ -2281,10 +2302,10 @@ val _ = Define `
val _ = Define `
((extStatus_to_bits:ExtStatus ->(2)words$word) e=
((case e of
- Off => (vec_of_bits [B0;B0] : 2 words$word)
- | Initial => (vec_of_bits [B0;B1] : 2 words$word)
- | Clean => (vec_of_bits [B1;B0] : 2 words$word)
- | Dirty => (vec_of_bits [B1;B1] : 2 words$word)
+ Off => (0b00w : 2 words$word)
+ | Initial => (0b01w : 2 words$word)
+ | Clean => (0b10w : 2 words$word)
+ | Dirty => (0b11w : 2 words$word)
)))`;
@@ -2293,21 +2314,21 @@ val _ = Define `
val _ = Define `
((extStatus_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ExtStatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) e=
(let b__0 = e in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS Off
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS Initial
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS Clean
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS Dirty
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 264:2 - 269:3") (sail2_state_monad$exitS () )))`;
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS Off
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS Initial
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS Clean
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS Dirty
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 281:2 - 286:3") (sail2_state_monad$exitS () )))`;
(*val SATPMode_of_num : integer -> SATPMode*)
val _ = Define `
((SATPMode_of_num:int -> SATPMode) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Sbare
- else if (((p0_ = (( 1 : int):ii)))) then Sv32
- else if (((p0_ = (( 2 : int):ii)))) then Sv39
+ (let l__247 = arg_ in
+ if (((l__247 = (( 0 : int):ii)))) then Sbare
+ else if (((l__247 = (( 1 : int):ii)))) then Sv32
+ else if (((l__247 = (( 2 : int):ii)))) then Sv39
else Sv48))`;
@@ -2323,16 +2344,16 @@ val _ = Define `
val _ = Define `
((satp64Mode_of_bits:Architecture ->(4)words$word ->(SATPMode)option) (a : Architecture) (m : satp_mode)=
((case (a, m) of
- (g__4, b__0) =>
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) then SOME Sbare
+ (g__327, b__0) =>
+ if (((b__0 = (0x0w : 4 words$word)))) then SOME Sbare
else
- (case (g__4, b__0) of
+ (case (g__327, b__0) of
(RV32, b__0) =>
- if (((b__0 = (vec_of_bits [B0;B0;B0;B1] : 4 words$word)))) then SOME Sv32
+ if (((b__0 = (0x1w : 4 words$word)))) then SOME Sv32
else (case (RV32, b__0) of (_, _) => NONE )
| (RV64, b__0) =>
- if (((b__0 = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) then SOME Sv39
- else if (((b__0 = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) then SOME Sv48
+ if (((b__0 = (0x8w : 4 words$word)))) then SOME Sv39
+ else if (((b__0 = (0x9w : 4 words$word)))) then SOME Sv48
else (case (RV64, b__0) of (_, _) => NONE )
| (_, _) => NONE
)
@@ -2343,8 +2364,8 @@ val _ = Define `
val _ = Define `
((uop_of_num:int -> uop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_LUI
+ (let l__246 = arg_ in
+ if (((l__246 = (( 0 : int):ii)))) then RISCV_LUI
else RISCV_AUIPC))`;
@@ -2358,12 +2379,12 @@ val _ = Define `
val _ = Define `
((bop_of_num:int -> bop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_BEQ
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_BNE
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_BLT
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_BGE
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_BLTU
+ (let l__241 = arg_ in
+ if (((l__241 = (( 0 : int):ii)))) then RISCV_BEQ
+ else if (((l__241 = (( 1 : int):ii)))) then RISCV_BNE
+ else if (((l__241 = (( 2 : int):ii)))) then RISCV_BLT
+ else if (((l__241 = (( 3 : int):ii)))) then RISCV_BGE
+ else if (((l__241 = (( 4 : int):ii)))) then RISCV_BLTU
else RISCV_BGEU))`;
@@ -2385,12 +2406,12 @@ val _ = Define `
val _ = Define `
((iop_of_num:int -> iop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADDI
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SLTI
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLTIU
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_XORI
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_ORI
+ (let l__236 = arg_ in
+ if (((l__236 = (( 0 : int):ii)))) then RISCV_ADDI
+ else if (((l__236 = (( 1 : int):ii)))) then RISCV_SLTI
+ else if (((l__236 = (( 2 : int):ii)))) then RISCV_SLTIU
+ else if (((l__236 = (( 3 : int):ii)))) then RISCV_XORI
+ else if (((l__236 = (( 4 : int):ii)))) then RISCV_ORI
else RISCV_ANDI))`;
@@ -2412,9 +2433,9 @@ val _ = Define `
val _ = Define `
((sop_of_num:int -> sop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_SLLI
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SRLI
+ (let l__234 = arg_ in
+ if (((l__234 = (( 0 : int):ii)))) then RISCV_SLLI
+ else if (((l__234 = (( 1 : int):ii)))) then RISCV_SRLI
else RISCV_SRAI))`;
@@ -2429,16 +2450,16 @@ val _ = Define `
val _ = Define `
((rop_of_num:int -> rop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADD
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SUB
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLL
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_SLT
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_SLTU
- else if (((p0_ = (( 5 : int):ii)))) then RISCV_XOR
- else if (((p0_ = (( 6 : int):ii)))) then RISCV_SRL
- else if (((p0_ = (( 7 : int):ii)))) then RISCV_SRA
- else if (((p0_ = (( 8 : int):ii)))) then RISCV_OR
+ (let l__225 = arg_ in
+ if (((l__225 = (( 0 : int):ii)))) then RISCV_ADD
+ else if (((l__225 = (( 1 : int):ii)))) then RISCV_SUB
+ else if (((l__225 = (( 2 : int):ii)))) then RISCV_SLL
+ else if (((l__225 = (( 3 : int):ii)))) then RISCV_SLT
+ else if (((l__225 = (( 4 : int):ii)))) then RISCV_SLTU
+ else if (((l__225 = (( 5 : int):ii)))) then RISCV_XOR
+ else if (((l__225 = (( 6 : int):ii)))) then RISCV_SRL
+ else if (((l__225 = (( 7 : int):ii)))) then RISCV_SRA
+ else if (((l__225 = (( 8 : int):ii)))) then RISCV_OR
else RISCV_AND))`;
@@ -2464,11 +2485,11 @@ val _ = Define `
val _ = Define `
((ropw_of_num:int -> ropw) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADDW
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SUBW
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLLW
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_SRLW
+ (let l__221 = arg_ in
+ if (((l__221 = (( 0 : int):ii)))) then RISCV_ADDW
+ else if (((l__221 = (( 1 : int):ii)))) then RISCV_SUBW
+ else if (((l__221 = (( 2 : int):ii)))) then RISCV_SLLW
+ else if (((l__221 = (( 3 : int):ii)))) then RISCV_SRLW
else RISCV_SRAW))`;
@@ -2489,9 +2510,9 @@ val _ = Define `
val _ = Define `
((sopw_of_num:int -> sopw) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_SLLIW
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SRLIW
+ (let l__219 = arg_ in
+ if (((l__219 = (( 0 : int):ii)))) then RISCV_SLLIW
+ else if (((l__219 = (( 1 : int):ii)))) then RISCV_SRLIW
else RISCV_SRAIW))`;
@@ -2506,15 +2527,15 @@ val _ = Define `
val _ = Define `
((amoop_of_num:int -> amoop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then AMOSWAP
- else if (((p0_ = (( 1 : int):ii)))) then AMOADD
- else if (((p0_ = (( 2 : int):ii)))) then AMOXOR
- else if (((p0_ = (( 3 : int):ii)))) then AMOAND
- else if (((p0_ = (( 4 : int):ii)))) then AMOOR
- else if (((p0_ = (( 5 : int):ii)))) then AMOMIN
- else if (((p0_ = (( 6 : int):ii)))) then AMOMAX
- else if (((p0_ = (( 7 : int):ii)))) then AMOMINU
+ (let l__211 = arg_ in
+ if (((l__211 = (( 0 : int):ii)))) then AMOSWAP
+ else if (((l__211 = (( 1 : int):ii)))) then AMOADD
+ else if (((l__211 = (( 2 : int):ii)))) then AMOXOR
+ else if (((l__211 = (( 3 : int):ii)))) then AMOAND
+ else if (((l__211 = (( 4 : int):ii)))) then AMOOR
+ else if (((l__211 = (( 5 : int):ii)))) then AMOMIN
+ else if (((l__211 = (( 6 : int):ii)))) then AMOMAX
+ else if (((l__211 = (( 7 : int):ii)))) then AMOMINU
else AMOMAXU))`;
@@ -2539,9 +2560,9 @@ val _ = Define `
val _ = Define `
((csrop_of_num:int -> csrop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then CSRRW
- else if (((p0_ = (( 1 : int):ii)))) then CSRRS
+ (let l__209 = arg_ in
+ if (((l__209 = (( 0 : int):ii)))) then CSRRW
+ else if (((l__209 = (( 1 : int):ii)))) then CSRRS
else CSRRC))`;
@@ -2553,6 +2574,14 @@ val _ = Define `
(*val sep_forwards : unit -> string*)
+(*val sep_backwards : string -> M unit*)
+
+(*val sep_forwards_matches : unit -> bool*)
+
+(*val sep_backwards_matches : string -> bool*)
+
+(*val sep_matches_prefix : string -> maybe ((unit * ii))*)
+
val _ = Define `
((sep_forwards:unit -> string) arg_=
((case arg_ of
@@ -2562,8 +2591,6 @@ val _ = Define `
)))`;
-(*val sep_backwards : string -> M unit*)
-
(*val _s0_ : string -> maybe unit*)
val _ = Define `
@@ -2596,15 +2623,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val sep_forwards_matches : unit -> bool*)
-
val _ = Define `
((sep_forwards_matches:unit -> bool) arg_=
((case arg_ of () => T )))`;
-(*val sep_backwards_matches : string -> bool*)
-
(*val _s8_ : string -> maybe unit*)
val _ = Define `
@@ -2637,8 +2660,6 @@ val _ = Define `
else F))`;
-(*val sep_matches_prefix : string -> maybe ((unit * ii))*)
-
(*val _s16_ : string -> maybe string*)
val _ = Define `
@@ -2675,130 +2696,130 @@ val _ = Define `
(*val bool_bits_forwards : bool -> mword ty1*)
+(*val bool_bits_backwards : mword ty1 -> M bool*)
+
+(*val bool_bits_forwards_matches : bool -> bool*)
+
+(*val bool_bits_backwards_matches : mword ty1 -> bool*)
+
val _ = Define `
((bool_bits_forwards:bool ->(1)words$word) arg_=
- ((case arg_ of
- T => (vec_of_bits [B1] : 1 words$word)
- | F => (vec_of_bits [B0] : 1 words$word)
- )))`;
+ ((case arg_ of T => (0b1w : 1 words$word) | F => (0b0w : 1 words$word) )))`;
-(*val bool_bits_backwards : mword ty1 -> M bool*)
-
val _ = Define `
((bool_bits_backwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS F
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS T
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS F
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bool_bits_forwards_matches : bool -> bool*)
-
val _ = Define `
((bool_bits_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val bool_bits_backwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bool_bits_backwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
(*val bool_not_bits_forwards : bool -> mword ty1*)
+(*val bool_not_bits_backwards : mword ty1 -> M bool*)
+
+(*val bool_not_bits_forwards_matches : bool -> bool*)
+
+(*val bool_not_bits_backwards_matches : mword ty1 -> bool*)
+
val _ = Define `
((bool_not_bits_forwards:bool ->(1)words$word) arg_=
- ((case arg_ of
- T => (vec_of_bits [B0] : 1 words$word)
- | F => (vec_of_bits [B1] : 1 words$word)
- )))`;
+ ((case arg_ of T => (0b0w : 1 words$word) | F => (0b1w : 1 words$word) )))`;
-(*val bool_not_bits_backwards : mword ty1 -> M bool*)
-
val _ = Define `
((bool_not_bits_backwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS T
- else if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS F
+ if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS T
+ else if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS F
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bool_not_bits_forwards_matches : bool -> bool*)
-
val _ = Define `
((bool_not_bits_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val bool_not_bits_backwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bool_not_bits_backwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
+ if (((b__0 = (0b0w : 1 words$word)))) then T
+ else if (((b__0 = (0b1w : 1 words$word)))) then T
else F))`;
(*val size_bits_forwards : word_width -> mword ty2*)
+(*val size_bits_backwards : mword ty2 -> M word_width*)
+
+(*val size_bits_forwards_matches : word_width -> bool*)
+
+(*val size_bits_backwards_matches : mword ty2 -> bool*)
+
val _ = Define `
((size_bits_forwards:word_width ->(2)words$word) arg_=
((case arg_ of
- BYTE => (vec_of_bits [B0;B0] : 2 words$word)
- | HALF => (vec_of_bits [B0;B1] : 2 words$word)
- | WORD => (vec_of_bits [B1;B0] : 2 words$word)
- | DOUBLE => (vec_of_bits [B1;B1] : 2 words$word)
+ BYTE => (0b00w : 2 words$word)
+ | HALF => (0b01w : 2 words$word)
+ | WORD => (0b10w : 2 words$word)
+ | DOUBLE => (0b11w : 2 words$word)
)))`;
-(*val size_bits_backwards : mword ty2 -> M word_width*)
-
val _ = Define `
((size_bits_backwards:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((word_width),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS BYTE
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS HALF
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS WORD
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS DOUBLE
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS BYTE
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS HALF
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS WORD
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS DOUBLE
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val size_bits_forwards_matches : word_width -> bool*)
-
val _ = Define `
((size_bits_forwards_matches:word_width -> bool) arg_=
((case arg_ of BYTE => T | HALF => T | WORD => T | DOUBLE => T )))`;
-(*val size_bits_backwards_matches : mword ty2 -> bool*)
-
val _ = Define `
((size_bits_backwards_matches:(2)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then T
+ if (((b__0 = (0b00w : 2 words$word)))) then T
+ else if (((b__0 = (0b01w : 2 words$word)))) then T
+ else if (((b__0 = (0b10w : 2 words$word)))) then T
+ else if (((b__0 = (0b11w : 2 words$word)))) then T
else F))`;
(*val size_mnemonic_forwards : word_width -> string*)
+(*val size_mnemonic_backwards : string -> M word_width*)
+
+(*val size_mnemonic_forwards_matches : word_width -> bool*)
+
+(*val size_mnemonic_backwards_matches : string -> bool*)
+
+(*val size_mnemonic_matches_prefix : string -> maybe ((word_width * ii))*)
+
val _ = Define `
((size_mnemonic_forwards:word_width -> string) arg_=
((case arg_ of BYTE => "b" | HALF => "h" | WORD => "w" | DOUBLE => "d" )))`;
-(*val size_mnemonic_backwards : string -> M word_width*)
-
val _ = Define `
((size_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((word_width),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -2809,15 +2830,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val size_mnemonic_forwards_matches : word_width -> bool*)
-
val _ = Define `
((size_mnemonic_forwards_matches:word_width -> bool) arg_=
((case arg_ of BYTE => T | HALF => T | WORD => T | DOUBLE => T )))`;
-(*val size_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((size_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -2828,8 +2845,6 @@ val _ = Define `
else F))`;
-(*val size_mnemonic_matches_prefix : string -> maybe ((word_width * ii))*)
-
(*val _s36_ : string -> maybe string*)
val _ = Define `
@@ -2904,7 +2919,25 @@ val _ = Define `
val _ = Define `
-((zero_reg:(32)words$word)= ((EXTZ (( 32 : int):ii) (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 32 words$word)))`;
+((Data:unit)= () )`;
+
+
+val _ = Define `
+((default_write_acc:unit)= () )`;
+
+
+val _ = Define `
+ ((accessType_to_str:(unit)AccessType -> string) a=
+ ((case a of
+ Read (_) => "R"
+ | Write (_) => "W"
+ | ReadWrite ((_, _)) => "RW"
+ | Execute (() ) => "X"
+ )))`;
+
+
+val _ = Define `
+((zero_reg:(32)words$word)= ((0x00000000w : 32 words$word)))`;
(*val RegStr : mword ty32 -> string*)
@@ -2925,43 +2958,340 @@ val _ = Define `
((regval_into_reg:(32)words$word ->(32)words$word) v= v)`;
+val _ = Define `
+((zero_freg:(32)words$word)= ((0x00000000w : 32 words$word)))`;
+
+
+(*val FRegStr : mword ty32 -> string*)
+
+val _ = Define `
+ ((FRegStr:(32)words$word -> string) r= (string_of_bits r))`;
+
+
+(*val fregval_from_freg : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((fregval_from_freg:(32)words$word ->(32)words$word) r= r)`;
+
+
+(*val fregval_into_freg : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((fregval_into_freg:(32)words$word ->(32)words$word) v= v)`;
+
+
+(*val rounding_mode_of_num : integer -> rounding_mode*)
+
+val _ = Define `
+ ((rounding_mode_of_num:int -> rounding_mode) arg_=
+ (let l__204 = arg_ in
+ if (((l__204 = (( 0 : int):ii)))) then RM_RNE
+ else if (((l__204 = (( 1 : int):ii)))) then RM_RTZ
+ else if (((l__204 = (( 2 : int):ii)))) then RM_RDN
+ else if (((l__204 = (( 3 : int):ii)))) then RM_RUP
+ else if (((l__204 = (( 4 : int):ii)))) then RM_RMM
+ else RM_DYN))`;
+
+
+(*val num_of_rounding_mode : rounding_mode -> integer*)
+
+val _ = Define `
+ ((num_of_rounding_mode:rounding_mode -> int) arg_=
+ ((case arg_ of
+ RM_RNE => (( 0 : int):ii)
+ | RM_RTZ => (( 1 : int):ii)
+ | RM_RDN => (( 2 : int):ii)
+ | RM_RUP => (( 3 : int):ii)
+ | RM_RMM => (( 4 : int):ii)
+ | RM_DYN => (( 5 : int):ii)
+ )))`;
+
+
+(*val f_madd_op_S_of_num : integer -> f_madd_op_S*)
+
+val _ = Define `
+ ((f_madd_op_S_of_num:int -> f_madd_op_S) arg_=
+ (let l__201 = arg_ in
+ if (((l__201 = (( 0 : int):ii)))) then FMADD_S
+ else if (((l__201 = (( 1 : int):ii)))) then FMSUB_S
+ else if (((l__201 = (( 2 : int):ii)))) then FNMSUB_S
+ else FNMADD_S))`;
+
+
+(*val num_of_f_madd_op_S : f_madd_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_madd_op_S:f_madd_op_S -> int) arg_=
+ ((case arg_ of
+ FMADD_S => (( 0 : int):ii)
+ | FMSUB_S => (( 1 : int):ii)
+ | FNMSUB_S => (( 2 : int):ii)
+ | FNMADD_S => (( 3 : int):ii)
+ )))`;
+
+
+(*val f_bin_rm_op_S_of_num : integer -> f_bin_rm_op_S*)
+
+val _ = Define `
+ ((f_bin_rm_op_S_of_num:int -> f_bin_rm_op_S) arg_=
+ (let l__198 = arg_ in
+ if (((l__198 = (( 0 : int):ii)))) then FADD_S
+ else if (((l__198 = (( 1 : int):ii)))) then FSUB_S
+ else if (((l__198 = (( 2 : int):ii)))) then FMUL_S
+ else FDIV_S))`;
+
+
+(*val num_of_f_bin_rm_op_S : f_bin_rm_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_rm_op_S:f_bin_rm_op_S -> int) arg_=
+ ((case arg_ of FADD_S => (( 0 : int):ii) | FSUB_S => (( 1 : int):ii) | FMUL_S => (( 2 : int):ii) | FDIV_S => (( 3 : int):ii) )))`;
+
+
+(*val f_un_rm_op_S_of_num : integer -> f_un_rm_op_S*)
+
+val _ = Define `
+ ((f_un_rm_op_S_of_num:int -> f_un_rm_op_S) arg_=
+ (let l__190 = arg_ in
+ if (((l__190 = (( 0 : int):ii)))) then FSQRT_S
+ else if (((l__190 = (( 1 : int):ii)))) then FCVT_W_S
+ else if (((l__190 = (( 2 : int):ii)))) then FCVT_WU_S
+ else if (((l__190 = (( 3 : int):ii)))) then FCVT_S_W
+ else if (((l__190 = (( 4 : int):ii)))) then FCVT_S_WU
+ else if (((l__190 = (( 5 : int):ii)))) then FCVT_L_S
+ else if (((l__190 = (( 6 : int):ii)))) then FCVT_LU_S
+ else if (((l__190 = (( 7 : int):ii)))) then FCVT_S_L
+ else FCVT_S_LU))`;
+
+
+(*val num_of_f_un_rm_op_S : f_un_rm_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_rm_op_S:f_un_rm_op_S -> int) arg_=
+ ((case arg_ of
+ FSQRT_S => (( 0 : int):ii)
+ | FCVT_W_S => (( 1 : int):ii)
+ | FCVT_WU_S => (( 2 : int):ii)
+ | FCVT_S_W => (( 3 : int):ii)
+ | FCVT_S_WU => (( 4 : int):ii)
+ | FCVT_L_S => (( 5 : int):ii)
+ | FCVT_LU_S => (( 6 : int):ii)
+ | FCVT_S_L => (( 7 : int):ii)
+ | FCVT_S_LU => (( 8 : int):ii)
+ )))`;
+
+
+(*val f_un_op_S_of_num : integer -> f_un_op_S*)
+
+val _ = Define `
+ ((f_un_op_S_of_num:int -> f_un_op_S) arg_=
+ (let l__188 = arg_ in
+ if (((l__188 = (( 0 : int):ii)))) then FCLASS_S
+ else if (((l__188 = (( 1 : int):ii)))) then FMV_X_W
+ else FMV_W_X))`;
+
+
+(*val num_of_f_un_op_S : f_un_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_op_S:f_un_op_S -> int) arg_=
+ ((case arg_ of FCLASS_S => (( 0 : int):ii) | FMV_X_W => (( 1 : int):ii) | FMV_W_X => (( 2 : int):ii) )))`;
+
+
+(*val f_bin_op_S_of_num : integer -> f_bin_op_S*)
+
+val _ = Define `
+ ((f_bin_op_S_of_num:int -> f_bin_op_S) arg_=
+ (let l__181 = arg_ in
+ if (((l__181 = (( 0 : int):ii)))) then FSGNJ_S
+ else if (((l__181 = (( 1 : int):ii)))) then FSGNJN_S
+ else if (((l__181 = (( 2 : int):ii)))) then FSGNJX_S
+ else if (((l__181 = (( 3 : int):ii)))) then FMIN_S
+ else if (((l__181 = (( 4 : int):ii)))) then FMAX_S
+ else if (((l__181 = (( 5 : int):ii)))) then FEQ_S
+ else if (((l__181 = (( 6 : int):ii)))) then FLT_S
+ else FLE_S))`;
+
+
+(*val num_of_f_bin_op_S : f_bin_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_op_S:f_bin_op_S -> int) arg_=
+ ((case arg_ of
+ FSGNJ_S => (( 0 : int):ii)
+ | FSGNJN_S => (( 1 : int):ii)
+ | FSGNJX_S => (( 2 : int):ii)
+ | FMIN_S => (( 3 : int):ii)
+ | FMAX_S => (( 4 : int):ii)
+ | FEQ_S => (( 5 : int):ii)
+ | FLT_S => (( 6 : int):ii)
+ | FLE_S => (( 7 : int):ii)
+ )))`;
+
+
+(*val f_madd_op_D_of_num : integer -> f_madd_op_D*)
+
+val _ = Define `
+ ((f_madd_op_D_of_num:int -> f_madd_op_D) arg_=
+ (let l__178 = arg_ in
+ if (((l__178 = (( 0 : int):ii)))) then FMADD_D
+ else if (((l__178 = (( 1 : int):ii)))) then FMSUB_D
+ else if (((l__178 = (( 2 : int):ii)))) then FNMSUB_D
+ else FNMADD_D))`;
+
+
+(*val num_of_f_madd_op_D : f_madd_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_madd_op_D:f_madd_op_D -> int) arg_=
+ ((case arg_ of
+ FMADD_D => (( 0 : int):ii)
+ | FMSUB_D => (( 1 : int):ii)
+ | FNMSUB_D => (( 2 : int):ii)
+ | FNMADD_D => (( 3 : int):ii)
+ )))`;
+
+
+(*val f_bin_rm_op_D_of_num : integer -> f_bin_rm_op_D*)
+
+val _ = Define `
+ ((f_bin_rm_op_D_of_num:int -> f_bin_rm_op_D) arg_=
+ (let l__175 = arg_ in
+ if (((l__175 = (( 0 : int):ii)))) then FADD_D
+ else if (((l__175 = (( 1 : int):ii)))) then FSUB_D
+ else if (((l__175 = (( 2 : int):ii)))) then FMUL_D
+ else FDIV_D))`;
+
+
+(*val num_of_f_bin_rm_op_D : f_bin_rm_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_rm_op_D:f_bin_rm_op_D -> int) arg_=
+ ((case arg_ of FADD_D => (( 0 : int):ii) | FSUB_D => (( 1 : int):ii) | FMUL_D => (( 2 : int):ii) | FDIV_D => (( 3 : int):ii) )))`;
+
+
+(*val f_un_rm_op_D_of_num : integer -> f_un_rm_op_D*)
+
+val _ = Define `
+ ((f_un_rm_op_D_of_num:int -> f_un_rm_op_D) arg_=
+ (let l__165 = arg_ in
+ if (((l__165 = (( 0 : int):ii)))) then FSQRT_D
+ else if (((l__165 = (( 1 : int):ii)))) then FCVT_W_D
+ else if (((l__165 = (( 2 : int):ii)))) then FCVT_WU_D
+ else if (((l__165 = (( 3 : int):ii)))) then FCVT_D_W
+ else if (((l__165 = (( 4 : int):ii)))) then FCVT_D_WU
+ else if (((l__165 = (( 5 : int):ii)))) then FCVT_S_D
+ else if (((l__165 = (( 6 : int):ii)))) then FCVT_D_S
+ else if (((l__165 = (( 7 : int):ii)))) then FCVT_L_D
+ else if (((l__165 = (( 8 : int):ii)))) then FCVT_LU_D
+ else if (((l__165 = (( 9 : int):ii)))) then FCVT_D_L
+ else FCVT_D_LU))`;
+
+
+(*val num_of_f_un_rm_op_D : f_un_rm_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_rm_op_D:f_un_rm_op_D -> int) arg_=
+ ((case arg_ of
+ FSQRT_D => (( 0 : int):ii)
+ | FCVT_W_D => (( 1 : int):ii)
+ | FCVT_WU_D => (( 2 : int):ii)
+ | FCVT_D_W => (( 3 : int):ii)
+ | FCVT_D_WU => (( 4 : int):ii)
+ | FCVT_S_D => (( 5 : int):ii)
+ | FCVT_D_S => (( 6 : int):ii)
+ | FCVT_L_D => (( 7 : int):ii)
+ | FCVT_LU_D => (( 8 : int):ii)
+ | FCVT_D_L => (( 9 : int):ii)
+ | FCVT_D_LU => (( 10 : int):ii)
+ )))`;
+
+
+(*val f_bin_op_D_of_num : integer -> f_bin_op_D*)
+
+val _ = Define `
+ ((f_bin_op_D_of_num:int -> f_bin_op_D) arg_=
+ (let l__158 = arg_ in
+ if (((l__158 = (( 0 : int):ii)))) then FSGNJ_D
+ else if (((l__158 = (( 1 : int):ii)))) then FSGNJN_D
+ else if (((l__158 = (( 2 : int):ii)))) then FSGNJX_D
+ else if (((l__158 = (( 3 : int):ii)))) then FMIN_D
+ else if (((l__158 = (( 4 : int):ii)))) then FMAX_D
+ else if (((l__158 = (( 5 : int):ii)))) then FEQ_D
+ else if (((l__158 = (( 6 : int):ii)))) then FLT_D
+ else FLE_D))`;
+
+
+(*val num_of_f_bin_op_D : f_bin_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_op_D:f_bin_op_D -> int) arg_=
+ ((case arg_ of
+ FSGNJ_D => (( 0 : int):ii)
+ | FSGNJN_D => (( 1 : int):ii)
+ | FSGNJX_D => (( 2 : int):ii)
+ | FMIN_D => (( 3 : int):ii)
+ | FMAX_D => (( 4 : int):ii)
+ | FEQ_D => (( 5 : int):ii)
+ | FLT_D => (( 6 : int):ii)
+ | FLE_D => (( 7 : int):ii)
+ )))`;
+
+
+(*val f_un_op_D_of_num : integer -> f_un_op_D*)
+
+val _ = Define `
+ ((f_un_op_D_of_num:int -> f_un_op_D) arg_=
+ (let l__156 = arg_ in
+ if (((l__156 = (( 0 : int):ii)))) then FCLASS_D
+ else if (((l__156 = (( 1 : int):ii)))) then FMV_X_D
+ else FMV_D_X))`;
+
+
+(*val num_of_f_un_op_D : f_un_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_op_D:f_un_op_D -> int) arg_=
+ ((case arg_ of FCLASS_D => (( 0 : int):ii) | FMV_X_D => (( 1 : int):ii) | FMV_D_X => (( 2 : int):ii) )))`;
+
+
(*val rX : integer -> M (mword ty32)*)
val _ = Define `
((rX:int ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
- (let p0_ = r in sail2_state_monad$bindS
- (if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$returnS zero_reg
- else if (((p0_ = (( 1 : int):ii)))) then (sail2_state_monad$read_regS x1_ref : ( 32 words$word) M)
- else if (((p0_ = (( 2 : int):ii)))) then (sail2_state_monad$read_regS x2_ref : ( 32 words$word) M)
- else if (((p0_ = (( 3 : int):ii)))) then (sail2_state_monad$read_regS x3_ref : ( 32 words$word) M)
- else if (((p0_ = (( 4 : int):ii)))) then (sail2_state_monad$read_regS x4_ref : ( 32 words$word) M)
- else if (((p0_ = (( 5 : int):ii)))) then (sail2_state_monad$read_regS x5_ref : ( 32 words$word) M)
- else if (((p0_ = (( 6 : int):ii)))) then (sail2_state_monad$read_regS x6_ref : ( 32 words$word) M)
- else if (((p0_ = (( 7 : int):ii)))) then (sail2_state_monad$read_regS x7_ref : ( 32 words$word) M)
- else if (((p0_ = (( 8 : int):ii)))) then (sail2_state_monad$read_regS x8_ref : ( 32 words$word) M)
- else if (((p0_ = (( 9 : int):ii)))) then (sail2_state_monad$read_regS x9_ref : ( 32 words$word) M)
- else if (((p0_ = (( 10 : int):ii)))) then (sail2_state_monad$read_regS x10_ref : ( 32 words$word) M)
- else if (((p0_ = (( 11 : int):ii)))) then (sail2_state_monad$read_regS x11_ref : ( 32 words$word) M)
- else if (((p0_ = (( 12 : int):ii)))) then (sail2_state_monad$read_regS x12_ref : ( 32 words$word) M)
- else if (((p0_ = (( 13 : int):ii)))) then (sail2_state_monad$read_regS x13_ref : ( 32 words$word) M)
- else if (((p0_ = (( 14 : int):ii)))) then (sail2_state_monad$read_regS x14_ref : ( 32 words$word) M)
- else if (((p0_ = (( 15 : int):ii)))) then (sail2_state_monad$read_regS x15_ref : ( 32 words$word) M)
- else if (((p0_ = (( 16 : int):ii)))) then (sail2_state_monad$read_regS x16_ref : ( 32 words$word) M)
- else if (((p0_ = (( 17 : int):ii)))) then (sail2_state_monad$read_regS x17_ref : ( 32 words$word) M)
- else if (((p0_ = (( 18 : int):ii)))) then (sail2_state_monad$read_regS x18_ref : ( 32 words$word) M)
- else if (((p0_ = (( 19 : int):ii)))) then (sail2_state_monad$read_regS x19_ref : ( 32 words$word) M)
- else if (((p0_ = (( 20 : int):ii)))) then (sail2_state_monad$read_regS x20_ref : ( 32 words$word) M)
- else if (((p0_ = (( 21 : int):ii)))) then (sail2_state_monad$read_regS x21_ref : ( 32 words$word) M)
- else if (((p0_ = (( 22 : int):ii)))) then (sail2_state_monad$read_regS x22_ref : ( 32 words$word) M)
- else if (((p0_ = (( 23 : int):ii)))) then (sail2_state_monad$read_regS x23_ref : ( 32 words$word) M)
- else if (((p0_ = (( 24 : int):ii)))) then (sail2_state_monad$read_regS x24_ref : ( 32 words$word) M)
- else if (((p0_ = (( 25 : int):ii)))) then (sail2_state_monad$read_regS x25_ref : ( 32 words$word) M)
- else if (((p0_ = (( 26 : int):ii)))) then (sail2_state_monad$read_regS x26_ref : ( 32 words$word) M)
- else if (((p0_ = (( 27 : int):ii)))) then (sail2_state_monad$read_regS x27_ref : ( 32 words$word) M)
- else if (((p0_ = (( 28 : int):ii)))) then (sail2_state_monad$read_regS x28_ref : ( 32 words$word) M)
- else if (((p0_ = (( 29 : int):ii)))) then (sail2_state_monad$read_regS x29_ref : ( 32 words$word) M)
- else if (((p0_ = (( 30 : int):ii)))) then (sail2_state_monad$read_regS x30_ref : ( 32 words$word) M)
- else if (((p0_ = (( 31 : int):ii)))) then (sail2_state_monad$read_regS x31_ref : ( 32 words$word) M)
+ (let l__124 = r in sail2_state_monad$bindS
+ (if (((l__124 = (( 0 : int):ii)))) then sail2_state_monad$returnS zero_reg
+ else if (((l__124 = (( 1 : int):ii)))) then (sail2_state_monad$read_regS x1_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 2 : int):ii)))) then (sail2_state_monad$read_regS x2_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 3 : int):ii)))) then (sail2_state_monad$read_regS x3_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 4 : int):ii)))) then (sail2_state_monad$read_regS x4_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 5 : int):ii)))) then (sail2_state_monad$read_regS x5_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 6 : int):ii)))) then (sail2_state_monad$read_regS x6_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 7 : int):ii)))) then (sail2_state_monad$read_regS x7_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 8 : int):ii)))) then (sail2_state_monad$read_regS x8_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 9 : int):ii)))) then (sail2_state_monad$read_regS x9_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 10 : int):ii)))) then (sail2_state_monad$read_regS x10_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 11 : int):ii)))) then (sail2_state_monad$read_regS x11_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 12 : int):ii)))) then (sail2_state_monad$read_regS x12_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 13 : int):ii)))) then (sail2_state_monad$read_regS x13_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 14 : int):ii)))) then (sail2_state_monad$read_regS x14_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 15 : int):ii)))) then (sail2_state_monad$read_regS x15_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 16 : int):ii)))) then (sail2_state_monad$read_regS x16_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 17 : int):ii)))) then (sail2_state_monad$read_regS x17_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 18 : int):ii)))) then (sail2_state_monad$read_regS x18_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 19 : int):ii)))) then (sail2_state_monad$read_regS x19_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 20 : int):ii)))) then (sail2_state_monad$read_regS x20_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 21 : int):ii)))) then (sail2_state_monad$read_regS x21_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 22 : int):ii)))) then (sail2_state_monad$read_regS x22_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 23 : int):ii)))) then (sail2_state_monad$read_regS x23_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 24 : int):ii)))) then (sail2_state_monad$read_regS x24_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 25 : int):ii)))) then (sail2_state_monad$read_regS x25_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 26 : int):ii)))) then (sail2_state_monad$read_regS x26_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 27 : int):ii)))) then (sail2_state_monad$read_regS x27_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 28 : int):ii)))) then (sail2_state_monad$read_regS x28_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 29 : int):ii)))) then (sail2_state_monad$read_regS x29_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 30 : int):ii)))) then (sail2_state_monad$read_regS x30_ref : ( 32 words$word) M)
+ else if (((l__124 = (( 31 : int):ii)))) then (sail2_state_monad$read_regS x31_ref : ( 32 words$word) M)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid register number") (sail2_state_monad$exitS () )) (\ (v : regtype) .
sail2_state_monad$returnS ((regval_from_reg v : 32 words$word)))))`;
@@ -2977,39 +3307,39 @@ val _ = Define `
val _ = Define `
((wX:int ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r in_v=
(let v = ((regval_into_reg in_v : 32 words$word)) in
- let p0_ = r in sail2_state_monad$seqS
- (if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$returnS ()
- else if (((p0_ = (( 1 : int):ii)))) then sail2_state_monad$write_regS x1_ref v
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$write_regS x2_ref v
- else if (((p0_ = (( 3 : int):ii)))) then sail2_state_monad$write_regS x3_ref v
- else if (((p0_ = (( 4 : int):ii)))) then sail2_state_monad$write_regS x4_ref v
- else if (((p0_ = (( 5 : int):ii)))) then sail2_state_monad$write_regS x5_ref v
- else if (((p0_ = (( 6 : int):ii)))) then sail2_state_monad$write_regS x6_ref v
- else if (((p0_ = (( 7 : int):ii)))) then sail2_state_monad$write_regS x7_ref v
- else if (((p0_ = (( 8 : int):ii)))) then sail2_state_monad$write_regS x8_ref v
- else if (((p0_ = (( 9 : int):ii)))) then sail2_state_monad$write_regS x9_ref v
- else if (((p0_ = (( 10 : int):ii)))) then sail2_state_monad$write_regS x10_ref v
- else if (((p0_ = (( 11 : int):ii)))) then sail2_state_monad$write_regS x11_ref v
- else if (((p0_ = (( 12 : int):ii)))) then sail2_state_monad$write_regS x12_ref v
- else if (((p0_ = (( 13 : int):ii)))) then sail2_state_monad$write_regS x13_ref v
- else if (((p0_ = (( 14 : int):ii)))) then sail2_state_monad$write_regS x14_ref v
- else if (((p0_ = (( 15 : int):ii)))) then sail2_state_monad$write_regS x15_ref v
- else if (((p0_ = (( 16 : int):ii)))) then sail2_state_monad$write_regS x16_ref v
- else if (((p0_ = (( 17 : int):ii)))) then sail2_state_monad$write_regS x17_ref v
- else if (((p0_ = (( 18 : int):ii)))) then sail2_state_monad$write_regS x18_ref v
- else if (((p0_ = (( 19 : int):ii)))) then sail2_state_monad$write_regS x19_ref v
- else if (((p0_ = (( 20 : int):ii)))) then sail2_state_monad$write_regS x20_ref v
- else if (((p0_ = (( 21 : int):ii)))) then sail2_state_monad$write_regS x21_ref v
- else if (((p0_ = (( 22 : int):ii)))) then sail2_state_monad$write_regS x22_ref v
- else if (((p0_ = (( 23 : int):ii)))) then sail2_state_monad$write_regS x23_ref v
- else if (((p0_ = (( 24 : int):ii)))) then sail2_state_monad$write_regS x24_ref v
- else if (((p0_ = (( 25 : int):ii)))) then sail2_state_monad$write_regS x25_ref v
- else if (((p0_ = (( 26 : int):ii)))) then sail2_state_monad$write_regS x26_ref v
- else if (((p0_ = (( 27 : int):ii)))) then sail2_state_monad$write_regS x27_ref v
- else if (((p0_ = (( 28 : int):ii)))) then sail2_state_monad$write_regS x28_ref v
- else if (((p0_ = (( 29 : int):ii)))) then sail2_state_monad$write_regS x29_ref v
- else if (((p0_ = (( 30 : int):ii)))) then sail2_state_monad$write_regS x30_ref v
- else if (((p0_ = (( 31 : int):ii)))) then sail2_state_monad$write_regS x31_ref v
+ let l__92 = r in sail2_state_monad$seqS
+ (if (((l__92 = (( 0 : int):ii)))) then sail2_state_monad$returnS ()
+ else if (((l__92 = (( 1 : int):ii)))) then sail2_state_monad$write_regS x1_ref v
+ else if (((l__92 = (( 2 : int):ii)))) then sail2_state_monad$write_regS x2_ref v
+ else if (((l__92 = (( 3 : int):ii)))) then sail2_state_monad$write_regS x3_ref v
+ else if (((l__92 = (( 4 : int):ii)))) then sail2_state_monad$write_regS x4_ref v
+ else if (((l__92 = (( 5 : int):ii)))) then sail2_state_monad$write_regS x5_ref v
+ else if (((l__92 = (( 6 : int):ii)))) then sail2_state_monad$write_regS x6_ref v
+ else if (((l__92 = (( 7 : int):ii)))) then sail2_state_monad$write_regS x7_ref v
+ else if (((l__92 = (( 8 : int):ii)))) then sail2_state_monad$write_regS x8_ref v
+ else if (((l__92 = (( 9 : int):ii)))) then sail2_state_monad$write_regS x9_ref v
+ else if (((l__92 = (( 10 : int):ii)))) then sail2_state_monad$write_regS x10_ref v
+ else if (((l__92 = (( 11 : int):ii)))) then sail2_state_monad$write_regS x11_ref v
+ else if (((l__92 = (( 12 : int):ii)))) then sail2_state_monad$write_regS x12_ref v
+ else if (((l__92 = (( 13 : int):ii)))) then sail2_state_monad$write_regS x13_ref v
+ else if (((l__92 = (( 14 : int):ii)))) then sail2_state_monad$write_regS x14_ref v
+ else if (((l__92 = (( 15 : int):ii)))) then sail2_state_monad$write_regS x15_ref v
+ else if (((l__92 = (( 16 : int):ii)))) then sail2_state_monad$write_regS x16_ref v
+ else if (((l__92 = (( 17 : int):ii)))) then sail2_state_monad$write_regS x17_ref v
+ else if (((l__92 = (( 18 : int):ii)))) then sail2_state_monad$write_regS x18_ref v
+ else if (((l__92 = (( 19 : int):ii)))) then sail2_state_monad$write_regS x19_ref v
+ else if (((l__92 = (( 20 : int):ii)))) then sail2_state_monad$write_regS x20_ref v
+ else if (((l__92 = (( 21 : int):ii)))) then sail2_state_monad$write_regS x21_ref v
+ else if (((l__92 = (( 22 : int):ii)))) then sail2_state_monad$write_regS x22_ref v
+ else if (((l__92 = (( 23 : int):ii)))) then sail2_state_monad$write_regS x23_ref v
+ else if (((l__92 = (( 24 : int):ii)))) then sail2_state_monad$write_regS x24_ref v
+ else if (((l__92 = (( 25 : int):ii)))) then sail2_state_monad$write_regS x25_ref v
+ else if (((l__92 = (( 26 : int):ii)))) then sail2_state_monad$write_regS x26_ref v
+ else if (((l__92 = (( 27 : int):ii)))) then sail2_state_monad$write_regS x27_ref v
+ else if (((l__92 = (( 28 : int):ii)))) then sail2_state_monad$write_regS x28_ref v
+ else if (((l__92 = (( 29 : int):ii)))) then sail2_state_monad$write_regS x29_ref v
+ else if (((l__92 = (( 30 : int):ii)))) then sail2_state_monad$write_regS x30_ref v
+ else if (((l__92 = (( 31 : int):ii)))) then sail2_state_monad$write_regS x31_ref v
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid register number") (sail2_state_monad$exitS () ))
(sail2_state_monad$returnS (if (((r <> (( 0 : int):ii)))) then
let (_ : unit) = (rvfi_wX r in_v) in
@@ -3021,267 +3351,180 @@ val _ = Define `
else () ))))`;
-(*val reg_name_abi : mword ty5 -> M string*)
+(*val rX_bits : mword ty5 -> M (mword ty32)*)
+
+val _ = Define `
+ ((rX_bits:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) i= ((rX ((lem$w2ui i)) : ( 32 words$word) M)))`;
+
+
+(*val wX_bits : mword ty5 -> mword ty32 -> M unit*)
+
+val _ = Define `
+ ((wX_bits:(5)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (i : 5 bits) (data : xlenbits)= (wX ((lem$w2ui i)) data))`;
+
val _ = Define `
((reg_name_abi:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
(let b__0 = r in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- sail2_state_monad$returnS "zero"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "ra"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "sp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "gp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "tp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "fp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s8"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s9"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s10"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s11"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t6"
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_regs.sail 149:2 - 182:3") (sail2_state_monad$exitS () )))`;
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "zero"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ra"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "sp"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "gp"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "tp"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "t0"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "t1"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "t2"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fp"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "a5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "a6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "a7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "s2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "s3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "s4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "s5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "s6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "s7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "s8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "s9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "s10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "s11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "t3"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "t4"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "t5"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "t6"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_regs.sail 154:2 - 187:3") (sail2_state_monad$exitS () )))`;
(*val reg_name_forwards : mword ty5 -> M string*)
+(*val reg_name_backwards : string -> M (mword ty5)*)
+
+(*val reg_name_forwards_matches : mword ty5 -> bool*)
+
+(*val reg_name_backwards_matches : string -> bool*)
+
+(*val reg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
val _ = Define `
((reg_name_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- sail2_state_monad$returnS "zero"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "ra"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "sp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "gp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "tp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "fp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s8"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s9"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s10"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s11"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t6"
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "zero"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ra"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "sp"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "gp"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "tp"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "t0"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "t1"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "t2"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fp"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "a5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "a6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "a7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "s2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "s3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "s4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "s5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "s6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "s7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "s8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "s9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "s10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "s11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "t3"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "t4"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "t5"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "t6"
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val reg_name_backwards : string -> M (mword ty5)*)
-
val _ = Define `
((reg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "zero"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "ra"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "sp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "gp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "tp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "t0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "t1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "t2"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "fp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "s1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "a0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "a1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "a2"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "a3"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "a4"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "a5"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "a6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "a7"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "s2"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "s3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "s4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "s5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "s6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "s7"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "s8"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "s9"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "s10"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "s11"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "t3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "t4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "t5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "t6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)
+ if (((p0_ = "zero"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ra"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "sp"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "gp"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "tp"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "t0"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "t1"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "t2"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fp"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "s1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "a0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "a1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "a2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "a3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "a4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "a5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "a6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "a7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "s2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "s3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "s4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "s5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "s6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "s7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "s8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "s9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "s10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "s11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "t3"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "t4"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "t5"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "t6"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val reg_name_forwards_matches : mword ty5 -> bool*)
-
val _ = Define `
((reg_name_forwards_matches:(5)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- T
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
else F))`;
-(*val reg_name_backwards_matches : string -> bool*)
-
val _ = Define `
((reg_name_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -3320,8 +3563,6 @@ val _ = Define `
else F))`;
-(*val reg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
-
(*val _s164_ : string -> maybe string*)
val _ = Define `
@@ -3649,279 +3890,249 @@ val _ = Define `
(case s40_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s44_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s44_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s48_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s48_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s52_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s52_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s56_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s56_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s60_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s60_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s64_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s64_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s68_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s68_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s72_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s72_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s76_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s76_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s80_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s80_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s84_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s84_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s88_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s88_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s92_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s92_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s96_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s96_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s100_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s100_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s104_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s104_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s108_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s108_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s112_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s112_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s116_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s116_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s120_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s120_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s124_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s124_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s128_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s128_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s132_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s132_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s136_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s136_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s140_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s140_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s144_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s144_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s148_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s148_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s152_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s152_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s156_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s156_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s160_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s160_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s164_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s164_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val creg_name_forwards : mword ty3 -> M string*)
+(*val creg_name_backwards : string -> M (mword ty3)*)
+
+(*val creg_name_forwards_matches : mword ty3 -> bool*)
+
+(*val creg_name_backwards_matches : string -> bool*)
+
+(*val creg_name_matches_prefix : string -> maybe ((mword ty3 * ii))*)
+
val _ = Define `
((creg_name_forwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS "s0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS "s1"
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS "a0"
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS "a1"
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS "a2"
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS "a3"
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS "a4"
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS "a5"
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS "s0"
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS "a5"
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val creg_name_backwards : string -> M (mword ty3)*)
-
val _ = Define `
((creg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((3)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "s0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0] : 3 words$word)
- else if (((p0_ = "s1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1] : 3 words$word)
- else if (((p0_ = "a0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0] : 3 words$word)
- else if (((p0_ = "a1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1] : 3 words$word)
- else if (((p0_ = "a2"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0] : 3 words$word)
- else if (((p0_ = "a3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1] : 3 words$word)
- else if (((p0_ = "a4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0] : 3 words$word)
- else if (((p0_ = "a5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1] : 3 words$word)
+ if (((p0_ = "s0"))) then sail2_state_monad$returnS (0b000w : 3 words$word)
+ else if (((p0_ = "s1"))) then sail2_state_monad$returnS (0b001w : 3 words$word)
+ else if (((p0_ = "a0"))) then sail2_state_monad$returnS (0b010w : 3 words$word)
+ else if (((p0_ = "a1"))) then sail2_state_monad$returnS (0b011w : 3 words$word)
+ else if (((p0_ = "a2"))) then sail2_state_monad$returnS (0b100w : 3 words$word)
+ else if (((p0_ = "a3"))) then sail2_state_monad$returnS (0b101w : 3 words$word)
+ else if (((p0_ = "a4"))) then sail2_state_monad$returnS (0b110w : 3 words$word)
+ else if (((p0_ = "a5"))) then sail2_state_monad$returnS (0b111w : 3 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val creg_name_forwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((creg_name_forwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
else F))`;
-(*val creg_name_backwards_matches : string -> bool*)
-
val _ = Define `
((creg_name_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -3936,8 +4147,6 @@ val _ = Define `
else F))`;
-(*val creg_name_matches_prefix : string -> maybe ((mword ty3 * ii))*)
-
(*val _s196_ : string -> maybe string*)
val _ = Define `
@@ -4025,57 +4234,49 @@ val _ = Define `
(case s168_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b000w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s172_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s172_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b001w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s176_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s176_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b010w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s180_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s180_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b011w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s184_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s184_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b100w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s188_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s188_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b101w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s192_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s192_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b110w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s196_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s196_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b111w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
@@ -4120,7 +4321,7 @@ val _ = Define `
found in the PC register as extensions may choose to override this function.
The value in the PC register is the absolute virtual address of the instruction
to fetch.
- *)
+*)
(*val get_arch_pc : unit -> M (mword ty32)*)
val _ = Define `
@@ -4164,11 +4365,11 @@ val _ = Define `
((set_Misa_bits:((regstate),(register_value),(Misa))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4176,19 +4377,181 @@ val _ = Define `
val _ = Define `
((update_Misa_bits:Misa ->(32)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+
+(*val _update_Counteren_bits : Counteren -> mword ty32 -> Counteren*)
+
+(*val _update_Counterin_bits : Counterin -> mword ty32 -> Counterin*)
+
+(*val _update_Fcsr_bits : Fcsr -> mword ty32 -> Fcsr*)
+
+(*val _update_Mcause_bits : Mcause -> mword ty32 -> Mcause*)
+
+(*val _update_Medeleg_bits : Medeleg -> mword ty32 -> Medeleg*)
+
+(*val _update_Minterrupts_bits : Minterrupts -> mword ty32 -> Minterrupts*)
+
+(*val _update_Mstatus_bits : Mstatus -> mword ty32 -> Mstatus*)
+
+(*val _update_Mstatush_bits : Mstatush -> mword ty32 -> Mstatush*)
+(*val _update_Mtvec_bits : Mtvec -> mword ty32 -> Mtvec*)
+
+(*val _update_PTE_Bits_bits : PTE_Bits -> mword ty8 -> PTE_Bits*)
+
+(*val _update_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
+
+(*val _update_SV32_PTE_bits : SV32_PTE -> mword ty32 -> SV32_PTE*)
+
+(*val _update_SV32_Paddr_bits : SV32_Paddr -> mword ty34 -> SV32_Paddr*)
+
+(*val _update_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32 -> SV32_Vaddr*)
+
+(*val _update_SV39_PTE_bits : SV39_PTE -> mword ty64 -> SV39_PTE*)
+
+(*val _update_SV39_Paddr_bits : SV39_Paddr -> mword ty56 -> SV39_Paddr*)
+
+(*val _update_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39 -> SV39_Vaddr*)
(*val _update_SV48_PTE_bits : SV48_PTE -> mword ty64 -> SV48_PTE*)
+(*val _update_SV48_Paddr_bits : SV48_Paddr -> mword ty56 -> SV48_Paddr*)
+
+(*val _update_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48 -> SV48_Vaddr*)
+
+(*val _update_Satp32_bits : Satp32 -> mword ty32 -> Satp32*)
+
+(*val _update_Satp64_bits : Satp64 -> mword ty64 -> Satp64*)
+
+(*val _update_Sedeleg_bits : Sedeleg -> mword ty32 -> Sedeleg*)
+
+(*val _update_Sinterrupts_bits : Sinterrupts -> mword ty32 -> Sinterrupts*)
+
+(*val _update_Sstatus_bits : Sstatus -> mword ty32 -> Sstatus*)
+
+(*val _update_Uinterrupts_bits : Uinterrupts -> mword ty32 -> Uinterrupts*)
+
+(*val _update_Ustatus_bits : Ustatus -> mword ty32 -> Ustatus*)
+
+(*val _update_htif_cmd_bits : htif_cmd -> mword ty64 -> htif_cmd*)
+
+(*val _get_Counteren_bits : Counteren -> mword ty32*)
+
+(*val _get_Counterin_bits : Counterin -> mword ty32*)
+
+(*val _get_Fcsr_bits : Fcsr -> mword ty32*)
+
+(*val _get_Mcause_bits : Mcause -> mword ty32*)
+
+(*val _get_Medeleg_bits : Medeleg -> mword ty32*)
+
+(*val _get_Minterrupts_bits : Minterrupts -> mword ty32*)
+
+(*val _get_Mstatus_bits : Mstatus -> mword ty32*)
+
+(*val _get_Mstatush_bits : Mstatush -> mword ty32*)
+
+(*val _get_Mtvec_bits : Mtvec -> mword ty32*)
+
+(*val _get_PTE_Bits_bits : PTE_Bits -> mword ty8*)
+
+(*val _get_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8*)
+
+(*val _get_SV32_PTE_bits : SV32_PTE -> mword ty32*)
+
+(*val _get_SV32_Paddr_bits : SV32_Paddr -> mword ty34*)
+
+(*val _get_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32*)
+
+(*val _get_SV39_PTE_bits : SV39_PTE -> mword ty64*)
+
+(*val _get_SV39_Paddr_bits : SV39_Paddr -> mword ty56*)
+
+(*val _get_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39*)
+
(*val _get_SV48_PTE_bits : SV48_PTE -> mword ty64*)
+(*val _get_SV48_Paddr_bits : SV48_Paddr -> mword ty56*)
+
+(*val _get_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48*)
+
+(*val _get_Satp32_bits : Satp32 -> mword ty32*)
+
+(*val _get_Satp64_bits : Satp64 -> mword ty64*)
+
+(*val _get_Sedeleg_bits : Sedeleg -> mword ty32*)
+
+(*val _get_Sinterrupts_bits : Sinterrupts -> mword ty32*)
+
+(*val _get_Sstatus_bits : Sstatus -> mword ty32*)
+
+(*val _get_Uinterrupts_bits : Uinterrupts -> mword ty32*)
+
+(*val _get_Ustatus_bits : Ustatus -> mword ty32*)
+
+(*val _get_htif_cmd_bits : htif_cmd -> mword ty64*)
+
+(*val _set_Counteren_bits : register_ref regstate register_value Counteren -> mword ty32 -> M unit*)
+
+(*val _set_Counterin_bits : register_ref regstate register_value Counterin -> mword ty32 -> M unit*)
+
+(*val _set_Fcsr_bits : register_ref regstate register_value Fcsr -> mword ty32 -> M unit*)
+
+(*val _set_Mcause_bits : register_ref regstate register_value Mcause -> mword ty32 -> M unit*)
+
+(*val _set_Medeleg_bits : register_ref regstate register_value Medeleg -> mword ty32 -> M unit*)
+
+(*val _set_Minterrupts_bits : register_ref regstate register_value Minterrupts -> mword ty32 -> M unit*)
+
+(*val _set_Mstatus_bits : register_ref regstate register_value Mstatus -> mword ty32 -> M unit*)
+
+(*val _set_Mstatush_bits : register_ref regstate register_value Mstatush -> mword ty32 -> M unit*)
+
+(*val _set_Mtvec_bits : register_ref regstate register_value Mtvec -> mword ty32 -> M unit*)
+
+(*val _set_PTE_Bits_bits : register_ref regstate register_value PTE_Bits -> mword ty8 -> M unit*)
+
+(*val _set_Pmpcfg_ent_bits : register_ref regstate register_value Pmpcfg_ent -> mword ty8 -> M unit*)
+
+(*val _set_SV32_PTE_bits : register_ref regstate register_value SV32_PTE -> mword ty32 -> M unit*)
+
+(*val _set_SV32_Paddr_bits : register_ref regstate register_value SV32_Paddr -> mword ty34 -> M unit*)
+
+(*val _set_SV32_Vaddr_bits : register_ref regstate register_value SV32_Vaddr -> mword ty32 -> M unit*)
+
+(*val _set_SV39_PTE_bits : register_ref regstate register_value SV39_PTE -> mword ty64 -> M unit*)
+
+(*val _set_SV39_Paddr_bits : register_ref regstate register_value SV39_Paddr -> mword ty56 -> M unit*)
+
+(*val _set_SV39_Vaddr_bits : register_ref regstate register_value SV39_Vaddr -> mword ty39 -> M unit*)
+
(*val _set_SV48_PTE_bits : register_ref regstate register_value SV48_PTE -> mword ty64 -> M unit*)
+(*val _set_SV48_Paddr_bits : register_ref regstate register_value SV48_Paddr -> mword ty56 -> M unit*)
+
+(*val _set_SV48_Vaddr_bits : register_ref regstate register_value SV48_Vaddr -> mword ty48 -> M unit*)
+
+(*val _set_Satp32_bits : register_ref regstate register_value Satp32 -> mword ty32 -> M unit*)
+
+(*val _set_Satp64_bits : register_ref regstate register_value Satp64 -> mword ty64 -> M unit*)
+
+(*val _set_Sedeleg_bits : register_ref regstate register_value Sedeleg -> mword ty32 -> M unit*)
+
+(*val _set_Sinterrupts_bits : register_ref regstate register_value Sinterrupts -> mword ty32 -> M unit*)
+
+(*val _set_Sstatus_bits : register_ref regstate register_value Sstatus -> mword ty32 -> M unit*)
+
+(*val _set_Uinterrupts_bits : register_ref regstate register_value Uinterrupts -> mword ty32 -> M unit*)
+
+(*val _set_Ustatus_bits : register_ref regstate register_value Ustatus -> mword ty32 -> M unit*)
+
+(*val _set_htif_cmd_bits : register_ref regstate register_value htif_cmd -> mword ty64 -> M unit*)
+
(*val _get_Misa_MXL : Misa -> mword ty2*)
val _ = Define `
@@ -4201,11 +4564,11 @@ val _ = Define `
((set_Misa_MXL:((regstate),(register_value),(Misa))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 31 : int):ii) (( 30 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4213,11 +4576,11 @@ val _ = Define `
val _ = Define `
((update_Misa_MXL:Misa ->(2)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 31 : int):ii) (( 30 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_Z : Misa -> mword ty1*)
@@ -4232,11 +4595,11 @@ val _ = Define `
((set_Misa_Z:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 25 : int):ii) (( 25 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4244,11 +4607,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Z:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 25 : int):ii) (( 25 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_Y : Misa -> mword ty1*)
@@ -4263,11 +4626,11 @@ val _ = Define `
((set_Misa_Y:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 24 : int):ii) (( 24 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4275,11 +4638,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Y:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 24 : int):ii) (( 24 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_X : Misa -> mword ty1*)
@@ -4294,11 +4657,11 @@ val _ = Define `
((set_Misa_X:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 23 : int):ii) (( 23 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4306,19 +4669,25 @@ val _ = Define `
val _ = Define `
((update_Misa_X:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 23 : int):ii) (( 23 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_X : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_X : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_X : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_X : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_W : Misa -> mword ty1*)
val _ = Define `
@@ -4331,11 +4700,11 @@ val _ = Define `
((set_Misa_W:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4343,19 +4712,25 @@ val _ = Define `
val _ = Define `
((update_Misa_W:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_W : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_W : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_W : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_W : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_V : Misa -> mword ty1*)
val _ = Define `
@@ -4368,11 +4743,11 @@ val _ = Define `
((set_Misa_V:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4380,11 +4755,11 @@ val _ = Define `
val _ = Define `
((update_Misa_V:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_V : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4405,11 +4780,11 @@ val _ = Define `
((set_Misa_U:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4417,11 +4792,11 @@ val _ = Define `
val _ = Define `
((update_Misa_U:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_U : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4442,11 +4817,11 @@ val _ = Define `
((set_Misa_T:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4454,11 +4829,11 @@ val _ = Define `
val _ = Define `
((update_Misa_T:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_S : Misa -> mword ty1*)
@@ -4473,11 +4848,11 @@ val _ = Define `
((set_Misa_S:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4485,11 +4860,11 @@ val _ = Define `
val _ = Define `
((update_Misa_S:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_R : Misa -> mword ty1*)
@@ -4504,11 +4879,11 @@ val _ = Define `
((set_Misa_R:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4516,19 +4891,25 @@ val _ = Define `
val _ = Define `
((update_Misa_R:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_R : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_R : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_R : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_R : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_Q : Misa -> mword ty1*)
val _ = Define `
@@ -4541,11 +4922,11 @@ val _ = Define `
((set_Misa_Q:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 16 : int):ii) (( 16 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4553,11 +4934,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Q:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 16 : int):ii) (( 16 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_P : Misa -> mword ty1*)
@@ -4572,11 +4953,11 @@ val _ = Define `
((set_Misa_P:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4584,11 +4965,11 @@ val _ = Define `
val _ = Define `
((update_Misa_P:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_O : Misa -> mword ty1*)
@@ -4603,11 +4984,11 @@ val _ = Define `
((set_Misa_O:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 14 : int):ii) (( 14 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4615,11 +4996,11 @@ val _ = Define `
val _ = Define `
((update_Misa_O:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 14 : int):ii) (( 14 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_N : Misa -> mword ty1*)
@@ -4634,11 +5015,11 @@ val _ = Define `
((set_Misa_N:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4646,11 +5027,11 @@ val _ = Define `
val _ = Define `
((update_Misa_N:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_M : Misa -> mword ty1*)
@@ -4665,11 +5046,11 @@ val _ = Define `
((set_Misa_M:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4677,11 +5058,11 @@ val _ = Define `
val _ = Define `
((update_Misa_M:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_L : Misa -> mword ty1*)
@@ -4696,11 +5077,11 @@ val _ = Define `
((set_Misa_L:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4708,11 +5089,11 @@ val _ = Define `
val _ = Define `
((update_Misa_L:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Pmpcfg_ent_L : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
@@ -4733,11 +5114,11 @@ val _ = Define `
((set_Misa_K:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4745,11 +5126,11 @@ val _ = Define `
val _ = Define `
((update_Misa_K:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_J : Misa -> mword ty1*)
@@ -4764,11 +5145,11 @@ val _ = Define `
((set_Misa_J:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4776,11 +5157,11 @@ val _ = Define `
val _ = Define `
((update_Misa_J:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_I : Misa -> mword ty1*)
@@ -4795,11 +5176,11 @@ val _ = Define `
((set_Misa_I:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4807,11 +5188,11 @@ val _ = Define `
val _ = Define `
((update_Misa_I:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_H : Misa -> mword ty1*)
@@ -4826,11 +5207,11 @@ val _ = Define `
((set_Misa_H:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4838,11 +5219,11 @@ val _ = Define `
val _ = Define `
((update_Misa_H:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_G : Misa -> mword ty1*)
@@ -4857,11 +5238,11 @@ val _ = Define `
((set_Misa_G:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4869,11 +5250,11 @@ val _ = Define `
val _ = Define `
((update_Misa_G:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_G : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4894,11 +5275,11 @@ val _ = Define `
((set_Misa_F:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4906,11 +5287,11 @@ val _ = Define `
val _ = Define `
((update_Misa_F:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_E : Misa -> mword ty1*)
@@ -4925,11 +5306,11 @@ val _ = Define `
((set_Misa_E:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4937,11 +5318,11 @@ val _ = Define `
val _ = Define `
((update_Misa_E:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_D : Misa -> mword ty1*)
@@ -4956,11 +5337,11 @@ val _ = Define `
((set_Misa_D:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4968,11 +5349,11 @@ val _ = Define `
val _ = Define `
((update_Misa_D:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_D : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4993,11 +5374,11 @@ val _ = Define `
((set_Misa_C:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5005,11 +5386,11 @@ val _ = Define `
val _ = Define `
((update_Misa_C:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_B : Misa -> mword ty1*)
@@ -5024,11 +5405,11 @@ val _ = Define `
((set_Misa_B:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5036,11 +5417,11 @@ val _ = Define `
val _ = Define `
((update_Misa_B:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Misa_A : Misa -> mword ty1*)
@@ -5055,11 +5436,11 @@ val _ = Define `
((set_Misa_A:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5067,31 +5448,49 @@ val _ = Define `
val _ = Define `
((update_Misa_A:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_PTE_Bits_A : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_A : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2*)
+
(*val _set_PTE_Bits_A : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_A : register_ref regstate register_value Pmpcfg_ent -> mword ty2 -> M unit*)
+
+(*val ext_veto_disable_C : unit -> M bool*)
+
(*val legalize_misa : Misa -> mword ty32 -> M Misa*)
val _ = Define `
+ ((ext_veto_disable_C:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$returnS F))`;
+
+
+val _ = Define `
((legalize_misa:Misa ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Misa),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Misa) (v : xlenbits)=
(if ((sys_enable_writable_misa () )) then
let v = (Mk_Misa v) in sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((get_Misa_C v : 1 words$word)) = ((bool_to_bits F : 1 words$word))))))
- ( sail2_state_monad$bindS(sail2_state_monad$read_regS nextPC_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
- sail2_state_monad$returnS (((((bit_to_bool ((access_vec_dec w__0 (( 1 : int):ii))))) = T)))))) (\ (w__1 : bool) .
- sail2_state_monad$returnS (if w__1 then m
- else update_Misa_C m ((get_Misa_C v : 1 words$word))))
+ (sail2_state$or_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((get_Misa_C v : 1 words$word)) = (0b0w : 1 words$word)))))
+ (sail2_state$or_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS nextPC_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ sail2_state_monad$returnS (((((access_vec_dec w__0 (( 1 : int):ii))) = B1))))) ((ext_veto_disable_C () ))))
+ (sail2_state_monad$returnS ((~ ((sys_enable_rvc () )))))) (\ (w__4 : bool) .
+ let m = (if w__4 then m else update_Misa_C m ((get_Misa_C v : 1 words$word))) in
+ sail2_state_monad$returnS (if (((((~ ((sys_enable_fdext () )))) \/ ((((((((get_Misa_D v : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_Misa_F v : 1 words$word)) = (0b0w : 1 words$word)))))))))) then
+ m
+ else
+ update_Misa_D ((update_Misa_F m ((get_Misa_F v : 1 words$word))))
+ ((get_Misa_D v : 1 words$word))))
else sail2_state_monad$returnS m))`;
@@ -5100,7 +5499,7 @@ val _ = Define `
val _ = Define `
((haveAtomics:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_A w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_A w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveRVC : unit -> M bool*)
@@ -5108,7 +5507,7 @@ val _ = Define `
val _ = Define `
((haveRVC:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveMulDiv : unit -> M bool*)
@@ -5116,7 +5515,7 @@ val _ = Define `
val _ = Define `
((haveMulDiv:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_M w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_M w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveSupMode : unit -> M bool*)
@@ -5124,7 +5523,7 @@ val _ = Define `
val _ = Define `
((haveSupMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_S w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_S w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveUsrMode : unit -> M bool*)
@@ -5132,7 +5531,7 @@ val _ = Define `
val _ = Define `
((haveUsrMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_U w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_U w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveNExt : unit -> M bool*)
@@ -5140,7 +5539,102 @@ val _ = Define `
val _ = Define `
((haveNExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_N w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_N w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
+
+
+(*val Mk_Mstatush : mword ty32 -> Mstatush*)
+
+val _ = Define `
+ ((Mk_Mstatush:(32)words$word -> Mstatush) v=
+ (<| Mstatush_Mstatush_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+
+
+val _ = Define `
+ ((get_Mstatush_bits:Mstatush ->(32)words$word) v=
+ ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
+
+val _ = Define `
+ ((set_Mstatush_bits:((regstate),(register_value),(Mstatush))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Mstatush_bits:Mstatush ->(32)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Mstatush_MBE : Mstatush -> mword ty1*)
+
+val _ = Define `
+ ((get_Mstatush_MBE:Mstatush ->(1)words$word) v= ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)))`;
+
+
+(*val _set_Mstatush_MBE : register_ref regstate register_value Mstatush -> mword ty1 -> M unit*)
+
+val _ = Define `
+ ((set_Mstatush_MBE:((regstate),(register_value),(Mstatush))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Mstatush_MBE : Mstatush -> mword ty1 -> Mstatush*)
+
+val _ = Define `
+ ((update_Mstatush_MBE:Mstatush ->(1)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Mstatush_SBE : Mstatush -> mword ty1*)
+
+val _ = Define `
+ ((get_Mstatush_SBE:Mstatush ->(1)words$word) v= ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+
+
+(*val _set_Mstatush_SBE : register_ref regstate register_value Mstatush -> mword ty1 -> M unit*)
+
+val _ = Define `
+ ((set_Mstatush_SBE:((regstate),(register_value),(Mstatush))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Mstatush_SBE : Mstatush -> mword ty1 -> Mstatush*)
+
+val _ = Define `
+ ((update_Mstatush_SBE:Mstatush ->(1)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
(*val Mk_Mstatus : mword ty32 -> Mstatus*)
@@ -5150,35 +5644,29 @@ val _ = Define `
(<| Mstatus_Mstatus_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Mstatus_bits : Mstatus -> mword ty32*)
-
val _ = Define `
((get_Mstatus_bits:Mstatus ->(32)words$word) v= ((subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Mstatus_bits : register_ref regstate register_value Mstatus -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Mstatus_bits:((regstate),(register_value),(Mstatus))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mstatus_bits : Mstatus -> mword ty32 -> Mstatus*)
-
val _ = Define `
((update_Mstatus_bits:Mstatus ->(32)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_SD : Mstatus -> mword ty1*)
@@ -5193,11 +5681,11 @@ val _ = Define `
((set_Mstatus_SD:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5205,11 +5693,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SD:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_SD : Sstatus -> mword ty1 -> Sstatus*)
@@ -5230,11 +5718,11 @@ val _ = Define `
((set_Mstatus_TSR:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5242,11 +5730,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TSR:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_TW : Mstatus -> mword ty1*)
@@ -5261,11 +5749,11 @@ val _ = Define `
((set_Mstatus_TW:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5273,11 +5761,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TW:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_TVM : Mstatus -> mword ty1*)
@@ -5292,11 +5780,11 @@ val _ = Define `
((set_Mstatus_TVM:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5304,11 +5792,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TVM:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_MXR : Mstatus -> mword ty1*)
@@ -5323,11 +5811,11 @@ val _ = Define `
((set_Mstatus_MXR:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5335,11 +5823,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MXR:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_MXR : Sstatus -> mword ty1 -> Sstatus*)
@@ -5360,11 +5848,11 @@ val _ = Define `
((set_Mstatus_SUM:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5372,11 +5860,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SUM:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_SUM : Sstatus -> mword ty1 -> Sstatus*)
@@ -5397,11 +5885,11 @@ val _ = Define `
((set_Mstatus_MPRV:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5409,11 +5897,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPRV:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_XS : Mstatus -> mword ty2*)
@@ -5428,11 +5916,11 @@ val _ = Define `
((set_Mstatus_XS:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5440,11 +5928,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_XS:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_XS : Sstatus -> mword ty2 -> Sstatus*)
@@ -5465,11 +5953,11 @@ val _ = Define `
((set_Mstatus_FS:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5477,11 +5965,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_FS:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_FS : Sstatus -> mword ty2 -> Sstatus*)
@@ -5502,11 +5990,11 @@ val _ = Define `
((set_Mstatus_MPP:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 12 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5514,11 +6002,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPP:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 12 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_SPP : Mstatus -> mword ty1*)
@@ -5533,11 +6021,11 @@ val _ = Define `
((set_Mstatus_SPP:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5545,11 +6033,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SPP:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_SPP : Sstatus -> mword ty1 -> Sstatus*)
@@ -5570,11 +6058,11 @@ val _ = Define `
((set_Mstatus_MPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5582,11 +6070,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_SPIE : Mstatus -> mword ty1*)
@@ -5601,11 +6089,11 @@ val _ = Define `
((set_Mstatus_SPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5613,11 +6101,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_SPIE : Sstatus -> mword ty1 -> Sstatus*)
@@ -5638,11 +6126,11 @@ val _ = Define `
((set_Mstatus_UPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5650,17 +6138,23 @@ val _ = Define `
val _ = Define `
((update_Mstatus_UPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_Sstatus_UPIE : Sstatus -> mword ty1 -> Sstatus*)
(*val _update_Ustatus_UPIE : Ustatus -> mword ty1 -> Ustatus*)
+(*val _get_Sstatus_UPIE : Sstatus -> mword ty1*)
+
(*val _get_Ustatus_UPIE : Ustatus -> mword ty1*)
+(*val _set_Sstatus_UPIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
+
(*val _set_Ustatus_UPIE : register_ref regstate register_value Ustatus -> mword ty1 -> M unit*)
(*val _get_Mstatus_MIE : Mstatus -> mword ty1*)
@@ -5675,11 +6169,11 @@ val _ = Define `
((set_Mstatus_MIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5687,11 +6181,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mstatus_SIE : Mstatus -> mword ty1*)
@@ -5706,11 +6200,11 @@ val _ = Define `
((set_Mstatus_SIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5718,11 +6212,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sstatus_SIE : Sstatus -> mword ty1 -> Sstatus*)
@@ -5743,11 +6237,11 @@ val _ = Define `
((set_Mstatus_UIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5755,27 +6249,32 @@ val _ = Define `
val _ = Define `
((update_Mstatus_UIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_Sstatus_UIE : Sstatus -> mword ty1 -> Sstatus*)
+
(*val _update_Ustatus_UIE : Ustatus -> mword ty1 -> Ustatus*)
+(*val _get_Sstatus_UIE : Sstatus -> mword ty1*)
+
(*val _get_Ustatus_UIE : Ustatus -> mword ty1*)
+(*val _set_Sstatus_UIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
+
(*val _set_Ustatus_UIE : register_ref regstate register_value Ustatus -> mword ty1 -> M unit*)
-(*val effectivePrivilege : Mstatus -> Privilege -> M Privilege*)
+(*val effectivePrivilege : AccessType unit -> Mstatus -> Privilege -> M Privilege*)
val _ = Define `
- ((effectivePrivilege:Mstatus -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (priv : Privilege)=
- (if (((((get_Mstatus_MPRV m : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
- privLevel_of_bits ((get_Mstatus_MPP w__0 : 2 words$word)))
- else sail2_state_monad$read_regS cur_privilege_ref))`;
+ ((effectivePrivilege:(ext_access_type)AccessType -> Mstatus -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (m : Mstatus) (priv : Privilege)=
+ (if ((((((t <> (Execute () )))) /\ (((((get_Mstatus_MPRV m : 1 words$word)) = (0b1w : 1 words$word))))))) then
+ privLevel_of_bits ((get_Mstatus_MPP m : 2 words$word))
+ else sail2_state_monad$returnS priv))`;
(*val get_mstatus_SXL : Mstatus -> mword ty2*)
@@ -5806,19 +6305,42 @@ val _ = Define `
val _ = Define `
((legalize_mstatus:Mstatus ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Mstatus) (v : xlenbits)=
- (let (m : Mstatus) = (Mk_Mstatus v) in
+ (let (m : Mstatus) =
+ (Mk_Mstatus
+ ((EXTZ (( 32 : int):ii)
+ ((concat_vec ((subrange_vec_dec v (( 22 : int):ii) (( 11 : int):ii) : 12 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec ((subrange_vec_dec v (( 8 : int):ii) (( 7 : int):ii) : 2 words$word))
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec ((subrange_vec_dec v (( 5 : int):ii) (( 3 : int):ii) : 3 words$word))
+ ((concat_vec (0b0w : 1 words$word)
+ ((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
+ : 3 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 11 words$word))
+ : 23 words$word))
+ : 32 words$word))) in
let m = (update_Mstatus_XS m ((extStatus_to_bits Off : 2 words$word))) in sail2_state_monad$bindS
(sail2_state$or_boolS
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_FS m : 2 words$word))) (\ (w__0 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__0 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))
+ sail2_state_monad$returnS (((w__0 = Dirty)))))
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_XS m : 2 words$word))) (\ (w__1 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__1 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))) (\ (w__2 : bool) .
- let m = (update_Mstatus_SD m ((bool_to_bits w__2 : 1 words$word))) in
+ sail2_state_monad$returnS (((w__1 = Dirty)))))) (\ dirty .
+ let m = (update_Mstatus_SD m ((bool_to_bits dirty : 1 words$word))) in
let m = (set_mstatus_SXL m ((get_mstatus_SXL o1 : 2 words$word))) in
let m = (set_mstatus_UXL m ((get_mstatus_UXL o1 : 2 words$word))) in
- let m = (update_Mstatus_UPIE m ((bool_to_bits F : 1 words$word))) in
- let m = (update_Mstatus_UIE m ((bool_to_bits F : 1 words$word))) in
- sail2_state_monad$returnS m)))`;
+ let m = m in sail2_state_monad$bindS
+ (haveNExt () ) (\ (w__2 : bool) .
+ let m =
+ (if ((~ w__2)) then
+ let m = (update_Mstatus_UPIE m (0b0w : 1 words$word)) in
+ update_Mstatus_UIE m (0b0w : 1 words$word)
+ else m) in sail2_state_monad$bindS
+ (haveUsrMode () ) (\ (w__3 : bool) .
+ sail2_state_monad$returnS (if ((~ w__3)) then update_Mstatus_MPRV m (0b0w : 1 words$word)
+ else m))))))`;
(*val cur_Architecture : unit -> M Architecture*)
@@ -5846,6 +6368,28 @@ val _ = Define `
((in32BitMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (cur_Architecture () ) (\ (w__0 : Architecture) . sail2_state_monad$returnS (((w__0 = RV32))))))`;
+(*val haveFExt : unit -> M bool*)
+
+val _ = Define `
+ ((haveFExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
+ sail2_state_monad$returnS (((((get_Misa_F w__0 : 1 words$word)) = (0b1w : 1 words$word))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ sail2_state_monad$returnS (((((get_Mstatus_FS w__1 : 2 words$word)) <> (0b00w : 2 words$word))))))))`;
+
+
+(*val haveDExt : unit -> M bool*)
+
+val _ = Define `
+ ((haveDExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
+ sail2_state_monad$returnS (((((get_Misa_D w__0 : 1 words$word)) = (0b1w : 1 words$word))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ sail2_state_monad$returnS (((((get_Mstatus_FS w__1 : 2 words$word)) <> (0b00w : 2 words$word))))))))`;
+
+
(*val Mk_Minterrupts : mword ty32 -> Minterrupts*)
val _ = Define `
@@ -5853,36 +6397,30 @@ val _ = Define `
(<| Minterrupts_Minterrupts_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Minterrupts_bits : Minterrupts -> mword ty32*)
-
val _ = Define `
((get_Minterrupts_bits:Minterrupts ->(32)words$word) v=
((subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Minterrupts_bits : register_ref regstate register_value Minterrupts -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Minterrupts_bits:((regstate),(register_value),(Minterrupts))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Minterrupts_bits : Minterrupts -> mword ty32 -> Minterrupts*)
-
val _ = Define `
((update_Minterrupts_bits:Minterrupts ->(32)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Minterrupts_MEI : Minterrupts -> mword ty1*)
@@ -5898,11 +6436,11 @@ val _ = Define `
((set_Minterrupts_MEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5910,11 +6448,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Minterrupts_SEI : Minterrupts -> mword ty1*)
@@ -5930,11 +6468,11 @@ val _ = Define `
((set_Minterrupts_SEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5942,11 +6480,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_SEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sinterrupts_SEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -5968,11 +6506,11 @@ val _ = Define `
((set_Minterrupts_UEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5980,17 +6518,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_UEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_Sinterrupts_UEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
(*val _update_Uinterrupts_UEI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_UEI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_UEI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_UEI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_UEI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val _get_Minterrupts_MTI : Minterrupts -> mword ty1*)
@@ -6006,11 +6550,11 @@ val _ = Define `
((set_Minterrupts_MTI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6018,11 +6562,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MTI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Minterrupts_STI : Minterrupts -> mword ty1*)
@@ -6038,11 +6582,11 @@ val _ = Define `
((set_Minterrupts_STI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6050,11 +6594,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_STI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sinterrupts_STI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -6076,11 +6620,11 @@ val _ = Define `
((set_Minterrupts_UTI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6088,17 +6632,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_UTI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_Sinterrupts_UTI : Sinterrupts -> mword ty1 -> Sinterrupts*)
+
(*val _update_Uinterrupts_UTI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_UTI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_UTI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_UTI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_UTI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val _get_Minterrupts_MSI : Minterrupts -> mword ty1*)
@@ -6114,11 +6664,11 @@ val _ = Define `
((set_Minterrupts_MSI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6126,11 +6676,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MSI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Minterrupts_SSI : Minterrupts -> mword ty1*)
@@ -6146,11 +6696,11 @@ val _ = Define `
((set_Minterrupts_SSI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6158,11 +6708,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_SSI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sinterrupts_SSI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -6184,11 +6734,11 @@ val _ = Define `
((set_Minterrupts_USI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6196,17 +6746,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_USI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_Sinterrupts_USI : Sinterrupts -> mword ty1 -> Sinterrupts*)
(*val _update_Uinterrupts_USI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_USI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_USI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_USI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_USI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val legalize_mip : Minterrupts -> mword ty32 -> M Minterrupts*)
@@ -6217,8 +6773,8 @@ val _ = Define `
let m = (update_Minterrupts_SEI o1 ((get_Minterrupts_SEI v : 1 words$word))) in
let m = (update_Minterrupts_STI m ((get_Minterrupts_STI v : 1 words$word))) in
let m = (update_Minterrupts_SSI m ((get_Minterrupts_SSI v : 1 words$word))) in sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) .
- sail2_state_monad$returnS (if w__0 then
+ (sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))) (\ (w__2 : bool) .
+ sail2_state_monad$returnS (if w__2 then
let m = (update_Minterrupts_UEI m ((get_Minterrupts_UEI v : 1 words$word))) in
let m = (update_Minterrupts_UTI m ((get_Minterrupts_UTI v : 1 words$word))) in
update_Minterrupts_USI m ((get_Minterrupts_USI v : 1 words$word))
@@ -6236,8 +6792,8 @@ val _ = Define `
let m = (update_Minterrupts_SEI m ((get_Minterrupts_SEI v : 1 words$word))) in
let m = (update_Minterrupts_STI m ((get_Minterrupts_STI v : 1 words$word))) in
let m = (update_Minterrupts_SSI m ((get_Minterrupts_SSI v : 1 words$word))) in sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) .
- sail2_state_monad$returnS (if w__0 then
+ (sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))) (\ (w__2 : bool) .
+ sail2_state_monad$returnS (if w__2 then
let m = (update_Minterrupts_UEI m ((get_Minterrupts_UEI v : 1 words$word))) in
let m = (update_Minterrupts_UTI m ((get_Minterrupts_UTI v : 1 words$word))) in
update_Minterrupts_USI m ((get_Minterrupts_USI v : 1 words$word))
@@ -6249,9 +6805,9 @@ val _ = Define `
val _ = Define `
((legalize_mideleg:Minterrupts ->(32)words$word -> Minterrupts) (o1 : Minterrupts) (v : xlenbits)=
(let m = (Mk_Minterrupts v) in
- let m = (update_Minterrupts_MEI m ((bool_to_bits F : 1 words$word))) in
- let m = (update_Minterrupts_MTI m ((bool_to_bits F : 1 words$word))) in
- update_Minterrupts_MSI m ((bool_to_bits F : 1 words$word))))`;
+ let m = (update_Minterrupts_MEI m (0b0w : 1 words$word)) in
+ let m = (update_Minterrupts_MTI m (0b0w : 1 words$word)) in
+ update_Minterrupts_MSI m (0b0w : 1 words$word)))`;
(*val Mk_Medeleg : mword ty32 -> Medeleg*)
@@ -6261,35 +6817,29 @@ val _ = Define `
(<| Medeleg_Medeleg_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Medeleg_bits : Medeleg -> mword ty32*)
-
val _ = Define `
((get_Medeleg_bits:Medeleg ->(32)words$word) v= ((subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Medeleg_bits : register_ref regstate register_value Medeleg -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Medeleg_bits:((regstate),(register_value),(Medeleg))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Medeleg_bits : Medeleg -> mword ty32 -> Medeleg*)
-
val _ = Define `
((update_Medeleg_bits:Medeleg ->(32)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_SAMO_Page_Fault : Medeleg -> mword ty1*)
@@ -6305,11 +6855,11 @@ val _ = Define `
((set_Medeleg_SAMO_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6317,11 +6867,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_Load_Page_Fault : Medeleg -> mword ty1*)
@@ -6337,11 +6887,11 @@ val _ = Define `
((set_Medeleg_Load_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6349,11 +6899,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_Fetch_Page_Fault : Medeleg -> mword ty1*)
@@ -6369,11 +6919,11 @@ val _ = Define `
((set_Medeleg_Fetch_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6381,11 +6931,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_MEnvCall : Medeleg -> mword ty1*)
@@ -6401,11 +6951,11 @@ val _ = Define `
((set_Medeleg_MEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6413,11 +6963,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_MEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_SEnvCall : Medeleg -> mword ty1*)
@@ -6433,11 +6983,11 @@ val _ = Define `
((set_Medeleg_SEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6445,11 +6995,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Medeleg_UEnvCall : Medeleg -> mword ty1*)
@@ -6465,11 +7015,11 @@ val _ = Define `
((set_Medeleg_UEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6477,11 +7027,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_UEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_UEnvCall : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6503,11 +7053,11 @@ val _ = Define `
((set_Medeleg_SAMO_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6515,11 +7065,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_SAMO_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6541,11 +7091,11 @@ val _ = Define `
((set_Medeleg_SAMO_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6553,11 +7103,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_SAMO_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6579,11 +7129,11 @@ val _ = Define `
((set_Medeleg_Load_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6591,11 +7141,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Load_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6617,11 +7167,11 @@ val _ = Define `
((set_Medeleg_Load_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6629,11 +7179,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Load_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6655,11 +7205,11 @@ val _ = Define `
((set_Medeleg_Breakpoint:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6667,11 +7217,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Breakpoint:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Breakpoint : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6693,11 +7243,11 @@ val _ = Define `
((set_Medeleg_Illegal_Instr:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6705,11 +7255,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Illegal_Instr:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Illegal_Instr : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6731,11 +7281,11 @@ val _ = Define `
((set_Medeleg_Fetch_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6743,11 +7293,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Fetch_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6769,11 +7319,11 @@ val _ = Define `
((set_Medeleg_Fetch_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6781,11 +7331,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Sedeleg_Fetch_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6799,7 +7349,7 @@ val _ = Define `
val _ = Define `
((legalize_medeleg:Medeleg ->(32)words$word -> Medeleg) (o1 : Medeleg) (v : xlenbits)=
(let m = (Mk_Medeleg v) in
- update_Medeleg_MEnvCall m ((bool_to_bits F : 1 words$word))))`;
+ update_Medeleg_MEnvCall m (0b0w : 1 words$word)))`;
(*val Mk_Mtvec : mword ty32 -> Mtvec*)
@@ -6808,35 +7358,29 @@ val _ = Define `
((Mk_Mtvec:(32)words$word -> Mtvec) v= (<| Mtvec_Mtvec_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Mtvec_bits : Mtvec -> mword ty32*)
-
val _ = Define `
((get_Mtvec_bits:Mtvec ->(32)words$word) v= ((subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Mtvec_bits : register_ref regstate register_value Mtvec -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Mtvec_bits:((regstate),(register_value),(Mtvec))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mtvec_bits : Mtvec -> mword ty32 -> Mtvec*)
-
val _ = Define `
((update_Mtvec_bits:Mtvec ->(32)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mtvec_Base : Mtvec -> mword ty30*)
@@ -6851,11 +7395,11 @@ val _ = Define `
((set_Mtvec_Base:((regstate),(register_value),(Mtvec))register_ref ->(30)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 31 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 29 : int):ii) (( 0 : int):ii) : 30 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6863,11 +7407,11 @@ val _ = Define `
val _ = Define `
((update_Mtvec_Base:Mtvec ->(30)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 31 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 29 : int):ii) (( 0 : int):ii) : 30 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mtvec_Mode : Mtvec -> mword ty2*)
@@ -6882,11 +7426,11 @@ val _ = Define `
((set_Mtvec_Mode:((regstate),(register_value),(Mtvec))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 1 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6894,19 +7438,25 @@ val _ = Define `
val _ = Define `
((update_Mtvec_Mode:Mtvec ->(2)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 1 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _update_Satp32_Mode : Satp32 -> mword ty1 -> Satp32*)
+(*val _update_Satp64_Mode : Satp64 -> mword ty4 -> Satp64*)
+
(*val _get_Satp32_Mode : Satp32 -> mword ty1*)
+(*val _get_Satp64_Mode : Satp64 -> mword ty4*)
+
(*val _set_Satp32_Mode : register_ref regstate register_value Satp32 -> mword ty1 -> M unit*)
+(*val _set_Satp64_Mode : register_ref regstate register_value Satp64 -> mword ty4 -> M unit*)
+
(*val legalize_tvec : Mtvec -> mword ty32 -> Mtvec*)
val _ = Define `
@@ -6925,35 +7475,29 @@ val _ = Define `
((Mk_Mcause:(32)words$word -> Mcause) v= (<| Mcause_Mcause_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Mcause_bits : Mcause -> mword ty32*)
-
val _ = Define `
((get_Mcause_bits:Mcause ->(32)words$word) v= ((subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Mcause_bits : register_ref regstate register_value Mcause -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Mcause_bits:((regstate),(register_value),(Mcause))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mcause_bits : Mcause -> mword ty32 -> Mcause*)
-
val _ = Define `
((update_Mcause_bits:Mcause ->(32)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mcause_IsInterrupt : Mcause -> mword ty1*)
@@ -6969,11 +7513,11 @@ val _ = Define `
((set_Mcause_IsInterrupt:((regstate),(register_value),(Mcause))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6981,11 +7525,11 @@ val _ = Define `
val _ = Define `
((update_Mcause_IsInterrupt:Mcause ->(1)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Mcause_Cause : Mcause -> mword ty31*)
@@ -7000,11 +7544,11 @@ val _ = Define `
((set_Mcause_Cause:((regstate),(register_value),(Mcause))register_ref ->(31)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 30 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 30 : int):ii) (( 0 : int):ii) : 31 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7012,11 +7556,11 @@ val _ = Define `
val _ = Define `
((update_Mcause_Cause:Mcause ->(31)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 30 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 30 : int):ii) (( 0 : int):ii) : 31 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val tvec_addr : Mtvec -> Mcause -> maybe (mword ty32)*)
@@ -7024,13 +7568,11 @@ val _ = Define `
val _ = Define `
((tvec_addr:Mtvec -> Mcause ->((32)words$word)option) (m : Mtvec) (c : Mcause)=
(let (base : xlenbits) =
- ((concat_vec ((get_Mtvec_Base m : 30 words$word)) (vec_of_bits [B0;B0] : 2 words$word)
- : 32 words$word)) in
+ ((concat_vec ((get_Mtvec_Base m : 30 words$word)) (0b00w : 2 words$word) : 32 words$word)) in
(case ((trapVectorMode_of_bits ((get_Mtvec_Mode m : 2 words$word)))) of
TV_Direct => SOME base
| TV_Vector =>
- if (((((get_Mcause_IsInterrupt c : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Mcause_IsInterrupt c : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME ((add_vec base
((shiftl ((EXTZ (( 32 : int):ii) ((get_Mcause_Cause c : 31 words$word)) : 32 words$word))
(( 2 : int):ii)
@@ -7045,14 +7587,11 @@ val _ = Define `
val _ = Define `
((legalize_xepc:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v= (sail2_state_monad$bindS
- (sail2_state$or_boolS (sail2_state_monad$returnS ((sys_enable_writable_misa () )))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((((sys_enable_writable_misa () )) /\ ((sys_enable_rvc () ))))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))) (\ (w__1 :
- bool) .
+ sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word))))))) (\ (w__1 : bool) .
sail2_state_monad$returnS (if w__1 then (update_vec_dec v (( 0 : int):ii) B0 : 32 words$word)
- else
- (and_vec v ((EXTS (( 32 : int):ii) (vec_of_bits [B1;B0;B0] : 3 words$word) : 32 words$word))
- : 32 words$word)))))`;
+ else (and_vec v ((EXTS (( 32 : int):ii) (0b100w : 3 words$word) : 32 words$word)) : 32 words$word)))))`;
(*val pc_alignment_mask : unit -> M (mword ty32)*)
@@ -7062,10 +7601,9 @@ val _ = Define `
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
sail2_state_monad$returnS ((not_vec
((EXTZ (( 32 : int):ii)
- (if (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- (vec_of_bits [B0;B0] : 2 words$word)
- else (vec_of_bits [B1;B0] : 2 words$word))
+ (if (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word)))) then
+ (0b00w : 2 words$word)
+ else (0b10w : 2 words$word))
: 32 words$word))
: 32 words$word)))))`;
@@ -7077,36 +7615,30 @@ val _ = Define `
(<| Counteren_Counteren_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Counteren_bits : Counteren -> mword ty32*)
-
val _ = Define `
((get_Counteren_bits:Counteren ->(32)words$word) v=
((subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Counteren_bits : register_ref regstate register_value Counteren -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Counteren_bits:((regstate),(register_value),(Counteren))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Counteren_bits : Counteren -> mword ty32 -> Counteren*)
-
val _ = Define `
((update_Counteren_bits:Counteren ->(32)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_HPM : Counteren -> mword ty29*)
@@ -7122,11 +7654,11 @@ val _ = Define `
((set_Counteren_HPM:((regstate),(register_value),(Counteren))register_ref ->(29)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 28 : int):ii) (( 0 : int):ii) : 29 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7134,11 +7666,11 @@ val _ = Define `
val _ = Define `
((update_Counteren_HPM:Counteren ->(29)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 28 : int):ii) (( 0 : int):ii) : 29 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_IR : Counteren -> mword ty1*)
@@ -7154,11 +7686,11 @@ val _ = Define `
((set_Counteren_IR:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7166,12 +7698,18 @@ val _ = Define `
val _ = Define `
((update_Counteren_IR:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+
+(*val _update_Counterin_IR : Counterin -> mword ty1 -> Counterin*)
+(*val _get_Counterin_IR : Counterin -> mword ty1*)
+
+(*val _set_Counterin_IR : register_ref regstate register_value Counterin -> mword ty1 -> M unit*)
(*val _get_Counteren_TM : Counteren -> mword ty1*)
@@ -7186,11 +7724,11 @@ val _ = Define `
((set_Counteren_TM:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7198,11 +7736,11 @@ val _ = Define `
val _ = Define `
((update_Counteren_TM:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_CY : Counteren -> mword ty1*)
@@ -7218,11 +7756,11 @@ val _ = Define `
((set_Counteren_CY:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7230,29 +7768,128 @@ val _ = Define `
val _ = Define `
((update_Counteren_CY:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+
+(*val _update_Counterin_CY : Counterin -> mword ty1 -> Counterin*)
+(*val _get_Counterin_CY : Counterin -> mword ty1*)
+
+(*val _set_Counterin_CY : register_ref regstate register_value Counterin -> mword ty1 -> M unit*)
(*val legalize_mcounteren : Counteren -> mword ty32 -> Counteren*)
val _ = Define `
((legalize_mcounteren:Counteren ->(32)words$word -> Counteren) (c : Counteren) (v : xlenbits)=
- (let c = (update_Counteren_IR c ((cast_unit_vec0 ((access_vec_dec v (( 2 : int):ii))) : 1 words$word))) in
- let c = (update_Counteren_TM c ((cast_unit_vec0 ((access_vec_dec v (( 1 : int):ii))) : 1 words$word))) in
- update_Counteren_CY c ((cast_unit_vec0 ((access_vec_dec v (( 0 : int):ii))) : 1 words$word))))`;
+ (let c = (update_Counteren_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ let c = (update_Counteren_TM c (vec_of_bits [access_vec_dec v (( 1 : int):ii)] : 1 words$word)) in
+ update_Counteren_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
(*val legalize_scounteren : Counteren -> mword ty32 -> Counteren*)
val _ = Define `
((legalize_scounteren:Counteren ->(32)words$word -> Counteren) (c : Counteren) (v : xlenbits)=
- (let c = (update_Counteren_IR c ((cast_unit_vec0 ((access_vec_dec v (( 2 : int):ii))) : 1 words$word))) in
- let c = (update_Counteren_TM c ((cast_unit_vec0 ((access_vec_dec v (( 1 : int):ii))) : 1 words$word))) in
- update_Counteren_CY c ((cast_unit_vec0 ((access_vec_dec v (( 0 : int):ii))) : 1 words$word))))`;
+ (let c = (update_Counteren_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ let c = (update_Counteren_TM c (vec_of_bits [access_vec_dec v (( 1 : int):ii)] : 1 words$word)) in
+ update_Counteren_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
+
+
+(*val Mk_Counterin : mword ty32 -> Counterin*)
+
+val _ = Define `
+ ((Mk_Counterin:(32)words$word -> Counterin) v=
+ (<| Counterin_Counterin_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+
+
+val _ = Define `
+ ((get_Counterin_bits:Counterin ->(32)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_bits:((regstate),(register_value),(Counterin))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_bits:Counterin ->(32)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_Counterin_IR:Counterin ->(1)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_IR:((regstate),(register_value),(Counterin))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_IR:Counterin ->(1)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_Counterin_CY:Counterin ->(1)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_CY:((regstate),(register_value),(Counterin))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_CY:Counterin ->(1)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val legalize_mcountinhibit : Counterin -> mword ty32 -> Counterin*)
+
+val _ = Define `
+ ((legalize_mcountinhibit:Counterin ->(32)words$word -> Counterin) (c : Counterin) (v : xlenbits)=
+ (let c = (update_Counterin_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ update_Counterin_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
(*val retire_instruction : unit -> M unit*)
@@ -7262,8 +7899,11 @@ val _ = Define `
(sail2_state_monad$read_regS minstret_written_ref) (\ (w__0 : bool) .
if (((w__0 = T))) then sail2_state_monad$write_regS minstret_written_ref F
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
- sail2_state_monad$write_regS minstret_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word))))))`;
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__1 : Counterin) .
+ if (((((get_Counterin_IR w__1 : 1 words$word)) = (0b0w : 1 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ sail2_state_monad$write_regS minstret_ref ((add_vec_int w__2 (( 1 : int):ii) : 64 words$word)))
+ else sail2_state_monad$returnS () ))))`;
(*val Mk_Sstatus : mword ty32 -> Sstatus*)
@@ -7273,35 +7913,29 @@ val _ = Define `
(<| Sstatus_Sstatus_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Sstatus_bits : Sstatus -> mword ty32*)
-
val _ = Define `
((get_Sstatus_bits:Sstatus ->(32)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Sstatus_bits : register_ref regstate register_value Sstatus -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Sstatus_bits:((regstate),(register_value),(Sstatus))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_bits : Sstatus -> mword ty32 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_bits:Sstatus ->(32)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7312,21 +7946,21 @@ val _ = Define `
((set_Sstatus_SD:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SD:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7337,21 +7971,21 @@ val _ = Define `
((set_Sstatus_MXR:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_MXR:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7362,21 +7996,21 @@ val _ = Define `
((set_Sstatus_SUM:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SUM:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7387,21 +8021,21 @@ val _ = Define `
((set_Sstatus_XS:((regstate),(register_value),(Sstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_XS:Sstatus ->(2)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7412,21 +8046,21 @@ val _ = Define `
((set_Sstatus_FS:((regstate),(register_value),(Sstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_FS:Sstatus ->(2)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7437,21 +8071,21 @@ val _ = Define `
((set_Sstatus_SPP:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SPP:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7462,52 +8096,46 @@ val _ = Define `
((set_Sstatus_SPIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SPIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_Sstatus_UPIE : Sstatus -> mword ty1*)
-
val _ = Define `
((get_Sstatus_UPIE:Sstatus ->(1)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val _set_Sstatus_UPIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sstatus_UPIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_UPIE : Sstatus -> mword ty1 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_UPIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7518,52 +8146,46 @@ val _ = Define `
((set_Sstatus_SIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_Sstatus_UIE : Sstatus -> mword ty1*)
-
val _ = Define `
((get_Sstatus_UIE:Sstatus ->(1)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Sstatus_UIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sstatus_UIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_UIE : Sstatus -> mword ty1 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_UIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val get_sstatus_UXL : Sstatus -> mword ty2*)
@@ -7587,7 +8209,7 @@ val _ = Define `
val _ = Define `
((lower_mstatus:Mstatus -> Sstatus) m=
- (let s = (Mk_Sstatus ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
+ (let s = (Mk_Sstatus ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
let s = (update_Sstatus_SD s ((get_Mstatus_SD m : 1 words$word))) in
let s = (set_sstatus_UXL s ((get_mstatus_UXL m : 2 words$word))) in
let s = (update_Sstatus_MXR s ((get_Mstatus_MXR m : 1 words$word))) in
@@ -7611,10 +8233,10 @@ val _ = Define `
let m = (update_Mstatus_FS m ((get_Sstatus_FS s : 2 words$word))) in sail2_state_monad$bindS
(sail2_state$or_boolS
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_FS m : 2 words$word))) (\ (w__0 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__0 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))
+ sail2_state_monad$returnS (((w__0 = Dirty)))))
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_XS m : 2 words$word))) (\ (w__1 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__1 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))) (\ (w__2 : bool) .
- let m = (update_Mstatus_SD m ((bool_to_bits w__2 : 1 words$word))) in
+ sail2_state_monad$returnS (((w__1 = Dirty)))))) (\ dirty .
+ let m = (update_Mstatus_SD m ((bool_to_bits dirty : 1 words$word))) in
let m = (update_Mstatus_SPP m ((get_Sstatus_SPP s : 1 words$word))) in
let m = (update_Mstatus_SPIE m ((get_Sstatus_SPIE s : 1 words$word))) in
let m = (update_Mstatus_UPIE m ((get_Sstatus_UPIE s : 1 words$word))) in
@@ -7626,7 +8248,9 @@ val _ = Define `
(*val legalize_sstatus : Mstatus -> mword ty32 -> M Mstatus*)
val _ = Define `
- ((legalize_sstatus:Mstatus ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)= (lift_sstatus m ((Mk_Sstatus v))))`;
+ ((legalize_sstatus:Mstatus ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)= (sail2_state_monad$bindS
+ (lift_sstatus m ((Mk_Sstatus v))) (\ (w__0 : Mstatus) .
+ legalize_mstatus m ((get_Mstatus_bits w__0 : 32 words$word)))))`;
(*val Mk_Sedeleg : mword ty32 -> Sedeleg*)
@@ -7636,35 +8260,29 @@ val _ = Define `
(<| Sedeleg_Sedeleg_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Sedeleg_bits : Sedeleg -> mword ty32*)
-
val _ = Define `
((get_Sedeleg_bits:Sedeleg ->(32)words$word) v= ((subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Sedeleg_bits : register_ref regstate register_value Sedeleg -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Sedeleg_bits:((regstate),(register_value),(Sedeleg))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sedeleg_bits : Sedeleg -> mword ty32 -> Sedeleg*)
-
val _ = Define `
((update_Sedeleg_bits:Sedeleg ->(32)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7676,21 +8294,21 @@ val _ = Define `
((set_Sedeleg_UEnvCall:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_UEnvCall:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7702,21 +8320,21 @@ val _ = Define `
((set_Sedeleg_SAMO_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_SAMO_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7728,21 +8346,21 @@ val _ = Define `
((set_Sedeleg_SAMO_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_SAMO_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7754,21 +8372,21 @@ val _ = Define `
((set_Sedeleg_Load_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Load_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7780,21 +8398,21 @@ val _ = Define `
((set_Sedeleg_Load_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Load_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7806,21 +8424,21 @@ val _ = Define `
((set_Sedeleg_Breakpoint:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Breakpoint:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7832,21 +8450,21 @@ val _ = Define `
((set_Sedeleg_Illegal_Instr:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Illegal_Instr:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7858,21 +8476,21 @@ val _ = Define `
((set_Sedeleg_Fetch_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Fetch_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7884,21 +8502,21 @@ val _ = Define `
((set_Sedeleg_Fetch_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Fetch_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val legalize_sedeleg : Sedeleg -> mword ty32 -> Sedeleg*)
@@ -7915,36 +8533,30 @@ val _ = Define `
(<| Sinterrupts_Sinterrupts_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Sinterrupts_bits : Sinterrupts -> mword ty32*)
-
val _ = Define `
((get_Sinterrupts_bits:Sinterrupts ->(32)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Sinterrupts_bits : register_ref regstate register_value Sinterrupts -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_bits:((regstate),(register_value),(Sinterrupts))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_bits : Sinterrupts -> mword ty32 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_bits:Sinterrupts ->(32)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -7956,53 +8568,47 @@ val _ = Define `
((set_Sinterrupts_SEI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_SEI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
-
+ : 32 words$word)) |>)))`;
-(*val _get_Sinterrupts_UEI : Sinterrupts -> mword ty1*)
val _ = Define `
((get_Sinterrupts_UEI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_UEI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_UEI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_UEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_UEI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8014,53 +8620,47 @@ val _ = Define `
((set_Sinterrupts_STI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_STI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_Sinterrupts_UTI : Sinterrupts -> mword ty1*)
-
val _ = Define `
((get_Sinterrupts_UTI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_UTI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_UTI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_UTI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_UTI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8072,61 +8672,54 @@ val _ = Define `
((set_Sinterrupts_SSI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_SSI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_Sinterrupts_USI : Sinterrupts -> mword ty1*)
-
val _ = Define `
((get_Sinterrupts_USI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_USI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_USI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_USI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_USI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val lower_mip : Minterrupts -> Minterrupts -> Sinterrupts*)
val _ = Define `
((lower_mip:Minterrupts -> Minterrupts -> Sinterrupts) (m : Minterrupts) (d : Minterrupts)=
- (let (s : Sinterrupts) =
- (Mk_Sinterrupts ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
+ (let (s : Sinterrupts) = (Mk_Sinterrupts ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
let s =
(update_Sinterrupts_SEI s
((and_vec ((get_Minterrupts_SEI m : 1 words$word)) ((get_Minterrupts_SEI d : 1 words$word))
@@ -8156,8 +8749,7 @@ val _ = Define `
val _ = Define `
((lower_mie:Minterrupts -> Minterrupts -> Sinterrupts) (m : Minterrupts) (d : Minterrupts)=
- (let (s : Sinterrupts) =
- (Mk_Sinterrupts ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
+ (let (s : Sinterrupts) = (Mk_Sinterrupts ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
let s =
(update_Sinterrupts_SEI s
((and_vec ((get_Minterrupts_SEI m : 1 words$word)) ((get_Minterrupts_SEI d : 1 words$word))
@@ -8189,17 +8781,16 @@ val _ = Define `
((lift_sip:Minterrupts -> Minterrupts -> Sinterrupts ->(regstate)sail2_state_monad$sequential_state ->(((Minterrupts),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Minterrupts) (d : Minterrupts) (s : Sinterrupts)=
(let (m : Minterrupts) = o1 in
let m =
- (update_Minterrupts_SSI m
- ((and_vec ((get_Sinterrupts_SSI s : 1 words$word)) ((get_Minterrupts_SSI d : 1 words$word))
- : 1 words$word))) in sail2_state_monad$bindS
+ (if (((((get_Minterrupts_SSI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Minterrupts_SSI m ((get_Sinterrupts_SSI s : 1 words$word))
+ else m) in sail2_state_monad$bindS
(haveNExt () ) (\ (w__0 : bool) .
sail2_state_monad$returnS (if w__0 then
let m =
- (if (((((get_Minterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UEI m ((get_Sinterrupts_UEI s : 1 words$word))
else m) in
- if (((((get_Minterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_USI m ((get_Sinterrupts_USI s : 1 words$word))
else m
else m))))`;
@@ -8218,29 +8809,28 @@ val _ = Define `
((lift_sie:Minterrupts -> Minterrupts -> Sinterrupts ->(regstate)sail2_state_monad$sequential_state ->(((Minterrupts),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Minterrupts) (d : Minterrupts) (s : Sinterrupts)=
(let (m : Minterrupts) = o1 in
let m =
- (if (((((get_Minterrupts_SEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_SEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_SEI m ((get_Sinterrupts_SEI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_STI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_STI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_STI m ((get_Sinterrupts_STI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_SSI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_SSI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_SSI m ((get_Sinterrupts_SSI s : 1 words$word))
else m) in sail2_state_monad$bindS
(haveNExt () ) (\ (w__0 : bool) .
sail2_state_monad$returnS (if w__0 then
let m =
- (if (((((get_Minterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UEI m ((get_Sinterrupts_UEI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_UTI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UTI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UTI m ((get_Sinterrupts_UTI s : 1 words$word))
else m) in
- if (((((get_Minterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_USI m ((get_Sinterrupts_USI s : 1 words$word))
else m
else m))))`;
@@ -8259,66 +8849,54 @@ val _ = Define `
((Mk_Satp64:(64)words$word -> Satp64) v= (<| Satp64_Satp64_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Satp64_bits : Satp64 -> mword ty64*)
-
val _ = Define `
((get_Satp64_bits:Satp64 ->(64)words$word) v= ((subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Satp64_bits : register_ref regstate register_value Satp64 -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Satp64_bits:((regstate),(register_value),(Satp64))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp64_bits : Satp64 -> mword ty64 -> Satp64*)
-
val _ = Define `
((update_Satp64_bits:Satp64 ->(64)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_Satp64_Mode : Satp64 -> mword ty4*)
-
val _ = Define `
((get_Satp64_Mode:Satp64 ->(4)words$word) v= ((subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii) : 4 words$word)))`;
-(*val _set_Satp64_Mode : register_ref regstate register_value Satp64 -> mword ty4 -> M unit*)
-
val _ = Define `
((set_Satp64_Mode:((regstate),(register_value),(Satp64))register_ref ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii)
((subrange_vec_dec v (( 3 : int):ii) (( 0 : int):ii) : 4 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp64_Mode : Satp64 -> mword ty4 -> Satp64*)
-
val _ = Define `
((update_Satp64_Mode:Satp64 ->(4)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii)
((subrange_vec_dec x (( 3 : int):ii) (( 0 : int):ii) : 4 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Satp64_Asid : Satp64 -> mword ty16*)
@@ -8333,11 +8911,11 @@ val _ = Define `
((set_Satp64_Asid:((regstate),(register_value),(Satp64))register_ref ->(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 59 : int):ii) (( 44 : int):ii)
((subrange_vec_dec v (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -8345,11 +8923,11 @@ val _ = Define `
val _ = Define `
((update_Satp64_Asid:Satp64 ->(16)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 59 : int):ii) (( 44 : int):ii)
((subrange_vec_dec x (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Satp32_Asid : Satp32 -> mword ty9 -> Satp32*)
@@ -8370,11 +8948,11 @@ val _ = Define `
((set_Satp64_PPN:((regstate),(register_value),(Satp64))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 43 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -8382,11 +8960,11 @@ val _ = Define `
val _ = Define `
((update_Satp64_PPN:Satp64 ->(44)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 43 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Satp32_PPN : Satp32 -> mword ty22 -> Satp32*)
@@ -8413,35 +8991,29 @@ val _ = Define `
((Mk_Satp32:(32)words$word -> Satp32) v= (<| Satp32_Satp32_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Satp32_bits : Satp32 -> mword ty32*)
-
val _ = Define `
((get_Satp32_bits:Satp32 ->(32)words$word) v= ((subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Satp32_bits : register_ref regstate register_value Satp32 -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Satp32_bits:((regstate),(register_value),(Satp32))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp32_bits : Satp32 -> mword ty32 -> Satp32*)
-
val _ = Define `
((update_Satp32_bits:Satp32 ->(32)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8452,21 +9024,21 @@ val _ = Define `
((set_Satp32_Mode:((regstate),(register_value),(Satp32))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_Mode:Satp32 ->(1)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8477,21 +9049,21 @@ val _ = Define `
((set_Satp32_Asid:((regstate),(register_value),(Satp32))register_ref ->(9)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 30 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 8 : int):ii) (( 0 : int):ii) : 9 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_Asid:Satp32 ->(9)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 30 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 8 : int):ii) (( 0 : int):ii) : 9 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8502,21 +9074,21 @@ val _ = Define `
((set_Satp32_PPN:((regstate),(register_value),(Satp32))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 21 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_PPN:Satp32 ->(22)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 21 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val legalize_satp32 : Architecture -> mword ty32 -> mword ty32 -> mword ty32*)
@@ -8529,10 +9101,10 @@ val _ = Define `
val _ = Define `
((PmpAddrMatchType_of_num:int -> PmpAddrMatchType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then OFF
- else if (((p0_ = (( 1 : int):ii)))) then TOR
- else if (((p0_ = (( 2 : int):ii)))) then NA4
+ (let l__89 = arg_ in
+ if (((l__89 = (( 0 : int):ii)))) then OFF
+ else if (((l__89 = (( 1 : int):ii)))) then TOR
+ else if (((l__89 = (( 2 : int):ii)))) then NA4
else NAPOT))`;
@@ -8548,10 +9120,10 @@ val _ = Define `
val _ = Define `
((pmpAddrMatchType_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((PmpAddrMatchType),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bs=
(let b__0 = bs in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS OFF
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS TOR
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS NA4
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS NAPOT
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS OFF
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS TOR
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS NA4
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS NAPOT
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 7:2 - 12:3") (sail2_state_monad$exitS () )))`;
@@ -8560,10 +9132,10 @@ val _ = Define `
val _ = Define `
((pmpAddrMatchType_to_bits:PmpAddrMatchType ->(2)words$word) bs=
((case bs of
- OFF => (vec_of_bits [B0;B0] : 2 words$word)
- | TOR => (vec_of_bits [B0;B1] : 2 words$word)
- | NA4 => (vec_of_bits [B1;B0] : 2 words$word)
- | NAPOT => (vec_of_bits [B1;B1] : 2 words$word)
+ OFF => (0b00w : 2 words$word)
+ | TOR => (0b01w : 2 words$word)
+ | NA4 => (0b10w : 2 words$word)
+ | NAPOT => (0b11w : 2 words$word)
)))`;
@@ -8574,36 +9146,30 @@ val _ = Define `
(<| Pmpcfg_ent_Pmpcfg_ent_chunk_0 := ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) |>))`;
-(*val _get_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8*)
-
val _ = Define `
((get_Pmpcfg_ent_bits:Pmpcfg_ent ->(8)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_Pmpcfg_ent_bits : register_ref regstate register_value Pmpcfg_ent -> mword ty8 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_bits:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_bits:Pmpcfg_ent ->(8)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -8615,157 +9181,133 @@ val _ = Define `
((set_Pmpcfg_ent_L:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Pmpcfg_ent_L:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
-
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2*)
val _ = Define `
((get_Pmpcfg_ent_A:Pmpcfg_ent ->(2)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)))`;
-(*val _set_Pmpcfg_ent_A : register_ref regstate register_value Pmpcfg_ent -> mword ty2 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_A:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_A:Pmpcfg_ent ->(2)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1*)
-
val _ = Define `
((get_Pmpcfg_ent_X:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_X : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_X:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_X:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
-
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1*)
val _ = Define `
((get_Pmpcfg_ent_W:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_W : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_W:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_W:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1*)
-
val _ = Define `
((get_Pmpcfg_ent_R:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_R : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_R:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_R:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
(*val pmpReadCfgReg : integer -> M (mword ty32)*)
val _ = Define `
((pmpReadCfgReg:int ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) n=
- (let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$bindS
+ (let l__85 = n in
+ if (((l__85 = (( 0 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__1 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__2 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8777,7 +9319,7 @@ val _ = Define `
: 16 words$word))
: 24 words$word))
: 32 words$word))))))
- else if (((p0_ = (( 1 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__85 = (( 1 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__4 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__5 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__6 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8789,7 +9331,7 @@ val _ = Define `
: 16 words$word))
: 24 words$word))
: 32 words$word))))))
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__85 = (( 2 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__8 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__9 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8801,7 +9343,7 @@ val _ = Define `
: 16 words$word))
: 24 words$word))
: 32 words$word))))))
- else if (((p0_ = (( 3 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__85 = (( 3 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__12 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__13 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__14 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8816,20 +9358,36 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 75:2 - 85:8") (sail2_state_monad$exitS () )))`;
+(*val pmpLocked : Pmpcfg_ent -> bool*)
+
+val _ = Define `
+ ((pmpLocked:Pmpcfg_ent -> bool) cfg= (((get_Pmpcfg_ent_L cfg : 1 words$word)) = (0b1w : 1 words$word)))`;
+
+
+(*val pmpTORLocked : Pmpcfg_ent -> M bool*)
+
+val _ = Define `
+ ((pmpTORLocked:Pmpcfg_ent ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) cfg=
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = (0b1w : 1 words$word)))))
+ ( sail2_state_monad$bindS(pmpAddrMatchType_of_bits ((get_Pmpcfg_ent_A cfg : 2 words$word))) (\ (w__0 :
+ PmpAddrMatchType) .
+ sail2_state_monad$returnS (((w__0 = TOR)))))))`;
+
+
(*val pmpWriteCfg : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
val _ = Define `
((pmpWriteCfg:Pmpcfg_ent ->(8)words$word -> Pmpcfg_ent) (cfg : Pmpcfg_ent) (v : 8 bits)=
- (if (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then cfg
- else Mk_Pmpcfg_ent v))`;
+ (if ((pmpLocked cfg)) then cfg
+ else Mk_Pmpcfg_ent ((and_vec v (0x9Fw : 8 words$word) : 8 words$word))))`;
(*val pmpWriteCfgReg : integer -> mword ty32 -> M unit*)
val _ = Define `
((pmpWriteCfgReg:int ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) n v=
- (let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$bindS
+ (let l__81 = n in
+ if (((l__81 = (( 0 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS pmp0cfg_ref ((pmpWriteCfg w__0 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp1cfg_ref)) (\ (w__1 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
@@ -8838,7 +9396,7 @@ val _ = Define `
(sail2_state_monad$write_regS pmp2cfg_ref ((pmpWriteCfg w__2 ((subrange_vec_dec v (( 23 : int):ii) (( 16 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp3cfg_ref)) (\ (w__3 : Pmpcfg_ent) .
sail2_state_monad$write_regS pmp3cfg_ref ((pmpWriteCfg w__3 ((subrange_vec_dec v (( 31 : int):ii) (( 24 : int):ii) : 8 words$word))))))))
- else if (((p0_ = (( 1 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__81 = (( 1 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__4 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS pmp4cfg_ref ((pmpWriteCfg w__4 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp5cfg_ref)) (\ (w__5 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
@@ -8847,12 +9405,12 @@ val _ = Define `
(sail2_state_monad$write_regS pmp6cfg_ref ((pmpWriteCfg w__6 ((subrange_vec_dec v (( 23 : int):ii) (( 16 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp7cfg_ref)) (\ (w__7 : Pmpcfg_ent) .
sail2_state_monad$write_regS pmp7cfg_ref ((pmpWriteCfg w__7 ((subrange_vec_dec v (( 31 : int):ii) (( 24 : int):ii) : 8 words$word))))))))
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__8 : Pmpcfg_ent) .
- let pmp8cfg8 = (pmpWriteCfg w__8 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__9 : Pmpcfg_ent) .
- let pmp9cfg9 = (pmpWriteCfg w__9 ((subrange_vec_dec v (( 15 : int):ii) (( 8 : int):ii) : 8 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if (((l__81 = (( 2 : int):ii)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__8 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmp8cfg_ref ((pmpWriteCfg w__8 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
+ (sail2_state_monad$read_regS pmp9cfg_ref)) (\ (w__9 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmp9cfg_ref ((pmpWriteCfg w__9 ((subrange_vec_dec v (( 15 : int):ii) (( 8 : int):ii) : 8 words$word)))))
+ (sail2_state_monad$read_regS pmp10cfg_ref)) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
pmp10cfg_ref
((pmpWriteCfg w__10 ((subrange_vec_dec v (( 23 : int):ii) (( 16 : int):ii) : 8 words$word)))))
@@ -8860,7 +9418,7 @@ val _ = Define `
sail2_state_monad$write_regS
pmp11cfg_ref
((pmpWriteCfg w__11 ((subrange_vec_dec v (( 31 : int):ii) (( 24 : int):ii) : 8 words$word))))))))
- else if (((p0_ = (( 3 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__81 = (( 3 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__12 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS pmp12cfg_ref ((pmpWriteCfg w__12 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp13cfg_ref)) (\ (w__13 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
@@ -8874,14 +9432,14 @@ val _ = Define `
pmp15cfg_ref
((pmpWriteCfg w__15 ((subrange_vec_dec v (( 31 : int):ii) (( 24 : int):ii) : 8 words$word))))))))
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 94:2 - 137:8") (sail2_state_monad$exitS () )))`;
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 101:2 - 144:8") (sail2_state_monad$exitS () )))`;
-(*val pmpWriteAddr : Pmpcfg_ent -> mword ty32 -> mword ty32 -> mword ty32*)
+(*val pmpWriteAddr : bool -> bool -> mword ty32 -> mword ty32 -> mword ty32*)
val _ = Define `
- ((pmpWriteAddr:Pmpcfg_ent ->(32)words$word ->(32)words$word ->(32)words$word) (cfg : Pmpcfg_ent) (reg : xlenbits) (v : xlenbits)=
- (if (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then reg
+ ((pmpWriteAddr:bool -> bool ->(32)words$word ->(32)words$word ->(32)words$word) (locked : bool) (tor_locked : bool) (reg : xlenbits) (v : xlenbits)=
+ (if (((locked \/ tor_locked))) then reg
else v))`;
@@ -8905,28 +9463,25 @@ val _ = Define `
)))))`;
-(*val pmpCheckRWX : Pmpcfg_ent -> AccessType -> bool*)
+(*val pmpCheckRWX : Pmpcfg_ent -> AccessType unit -> bool*)
val _ = Define `
- ((pmpCheckRWX:Pmpcfg_ent -> AccessType -> bool) ent acc=
+ ((pmpCheckRWX:Pmpcfg_ent ->(unit)AccessType -> bool) ent acc=
((case acc of
- Read => (((get_Pmpcfg_ent_R ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
- | Write => (((get_Pmpcfg_ent_W ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
- | ReadWrite =>
- ((((((get_Pmpcfg_ent_R ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_Pmpcfg_ent_W ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- | Execute => (((get_Pmpcfg_ent_X ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
+ Read (_) => (((get_Pmpcfg_ent_R ent : 1 words$word)) = (0b1w : 1 words$word))
+ | Write (_) => (((get_Pmpcfg_ent_W ent : 1 words$word)) = (0b1w : 1 words$word))
+ | ReadWrite (_) =>
+ ((((((get_Pmpcfg_ent_R ent : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_Pmpcfg_ent_W ent : 1 words$word)) = (0b1w : 1 words$word)))))
+ | Execute (() ) => (((get_Pmpcfg_ent_X ent : 1 words$word)) = (0b1w : 1 words$word))
)))`;
-(*val pmpCheckPerms : Pmpcfg_ent -> AccessType -> Privilege -> bool*)
+(*val pmpCheckPerms : Pmpcfg_ent -> AccessType unit -> Privilege -> bool*)
val _ = Define `
- ((pmpCheckPerms:Pmpcfg_ent -> AccessType -> Privilege -> bool) ent acc priv=
+ ((pmpCheckPerms:Pmpcfg_ent ->(unit)AccessType -> Privilege -> bool) ent acc priv=
((case priv of
- Machine =>
- if (((((get_Pmpcfg_ent_L ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- pmpCheckRWX ent acc
- else T
+ Machine => if ((pmpLocked ent)) then pmpCheckRWX ent acc else T
| _ => pmpCheckRWX ent acc
)))`;
@@ -8935,9 +9490,9 @@ val _ = Define `
val _ = Define `
((pmpAddrMatch_of_num:int -> pmpAddrMatch) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PMP_NoMatch
- else if (((p0_ = (( 1 : int):ii)))) then PMP_PartialMatch
+ (let l__79 = arg_ in
+ if (((l__79 = (( 0 : int):ii)))) then PMP_NoMatch
+ else if (((l__79 = (( 1 : int):ii)))) then PMP_PartialMatch
else PMP_Match))`;
@@ -8956,8 +9511,7 @@ val _ = Define `
NONE => PMP_NoMatch
| SOME ((lo, hi)) =>
if ((zopz0zI_u hi lo)) then PMP_NoMatch
- else if (((((zopz0zI_u ((add_vec addr width : 32 words$word)) lo)) \/ ((zopz0zI_u hi addr)))))
- then
+ else if (((((zopz0zIzJ_u ((add_vec addr width : 32 words$word)) lo)) \/ ((zopz0zIzJ_u hi addr))))) then
PMP_NoMatch
else if (((((zopz0zIzJ_u lo addr)) /\ ((zopz0zIzJ_u ((add_vec addr width : 32 words$word)) hi))))) then
PMP_Match
@@ -8969,9 +9523,9 @@ val _ = Define `
val _ = Define `
((pmpMatch_of_num:int -> pmpMatch) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PMP_Success
- else if (((p0_ = (( 1 : int):ii)))) then PMP_Continue
+ (let l__77 = arg_ in
+ if (((l__77 = (( 0 : int):ii)))) then PMP_Success
+ else if (((l__77 = (( 1 : int):ii)))) then PMP_Continue
else PMP_Fail))`;
@@ -8982,11 +9536,11 @@ val _ = Define `
((case arg_ of PMP_Success => (( 0 : int):ii) | PMP_Continue => (( 1 : int):ii) | PMP_Fail => (( 2 : int):ii) )))`;
-(*val pmpMatchEntry : mword ty32 -> mword ty32 -> AccessType -> Privilege -> Pmpcfg_ent -> mword ty32 -> mword ty32 -> M pmpMatch*)
+(*val pmpMatchEntry : mword ty32 -> mword ty32 -> AccessType unit -> Privilege -> Pmpcfg_ent -> mword ty32 -> mword ty32 -> M pmpMatch*)
val _ = Define `
- ((pmpMatchEntry:(32)words$word ->(32)words$word -> AccessType -> Privilege -> Pmpcfg_ent ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((pmpMatch),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : xlenbits) (acc : AccessType) (priv : Privilege) (ent :
- Pmpcfg_ent) (pmpaddr : xlenbits) (prev_pmpaddr : xlenbits)= (sail2_state_monad$bindS
+ ((pmpMatchEntry:(32)words$word ->(32)words$word ->(ext_access_type)AccessType -> Privilege -> Pmpcfg_ent ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((pmpMatch),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : xlenbits) (acc : ext_access_type AccessType) (priv :
+ Privilege) (ent : Pmpcfg_ent) (pmpaddr : xlenbits) (prev_pmpaddr : xlenbits)= (sail2_state_monad$bindS
(pmpAddrRange ent pmpaddr prev_pmpaddr : ( (( 32 words$word # 32 words$word))option) M) (\ rng .
sail2_state_monad$returnS ((case ((pmpMatchAddr addr width rng)) of
PMP_NoMatch => PMP_Continue
@@ -8995,10 +9549,11 @@ val _ = Define `
)))))`;
-(*val pmpCheck : mword ty32 -> integer -> AccessType -> Privilege -> M (maybe ExceptionType)*)
+(*val pmpCheck : mword ty32 -> integer -> AccessType unit -> Privilege -> M (maybe ExceptionType)*)
val _ = Define `
- ((pmpCheck:(32)words$word -> int -> AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((ExceptionType)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) (acc : AccessType) (priv : Privilege)=
+ ((pmpCheck:(32)words$word -> int ->(ext_access_type)AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((ExceptionType)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) (acc : ext_access_type AccessType) (priv :
+ Privilege)=
(let (width : xlenbits) = ((to_bits (( 32 : int):ii) width : 32 words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M) (\ (w__1 : 32 words$word) . sail2_state_monad$bindS
@@ -9172,10 +9727,10 @@ val _ = Define `
sail2_state_monad$returnS (if check' then NONE
else
(case acc of
- Read => SOME E_Load_Access_Fault
- | Write => SOME E_SAMO_Access_Fault
- | ReadWrite => SOME E_SAMO_Access_Fault
- | Execute => SOME E_Fetch_Access_Fault
+ Read (_) => SOME (E_Load_Access_Fault () )
+ | Write (_) => SOME (E_SAMO_Access_Fault () )
+ | ReadWrite (_) => SOME (E_SAMO_Access_Fault () )
+ | Execute (() ) => SOME (E_Fetch_Access_Fault () )
))))))))`;
@@ -9239,13 +9794,50 @@ val _ = Define `
This function is called after above when running rvfi and allows the model
to be initialised differently (e.g. CHERI cap regs are initialised
to omnipotent instead of null).
- *)
+*)
(*val ext_rvfi_init : unit -> M unit*)
val _ = Define `
- ((ext_rvfi_init:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$returnS () ))`;
+ ((ext_rvfi_init:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS x1_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) . sail2_state_monad$write_regS x1_ref w__0)))`;
+
+
+(*
+THIS(csrno, priv, isWrite) allows an extension to block access to csrno,
+at Privilege level priv. It should return true if the access is allowed.
+*)
+(*val ext_check_CSR : mword ty12 -> Privilege -> bool -> bool*)
+
+val _ = Define `
+ ((ext_check_CSR:(12)words$word -> Privilege -> bool -> bool) csrno p isWrite= T)`;
+
+
+(*
+THIS is called if ext_check_CSR returns false. It should
+cause an appropriate RISCV exception.
+*)
+(*val ext_check_CSR_fail : unit -> unit*)
+
+val _ = Define `
+ ((ext_check_CSR_fail:unit -> unit) () = () )`;
+(*
+Validate a read from physical memory.
+THIS(access_type, paddr, size, aquire, release, reserved, read_meta) should
+return Some(exception) to abort the read or None to allow it to proceed. The
+check is performed after PMP checks and does not apply to MMIO memory.
+*)
+(*val ext_check_phys_mem_read : AccessType unit -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> Ext_PhysAddr_Check*)
+
+(*
+Validate a write to physical memory.
+THIS(write_kind, paddr, size, data, metadata) should return Some(exception)
+to abort the write or None to allow it to proceed. The check is performed
+after PMP checks and does not apply to MMIO memory.
+*)
+(*val ext_check_phys_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> unit -> Ext_PhysAddr_Check*)
+
(*val ext_fetch_check_pc : mword ty32 -> mword ty32 -> Ext_FetchAddr_Check unit*)
val _ = Define `
@@ -9276,11 +9868,12 @@ val _ = Define `
((ext_handle_control_check_error:unit -> unit) err= () )`;
-(*val ext_data_get_addr : mword ty5 -> mword ty32 -> AccessType -> word_width -> M (Ext_DataAddr_Check unit)*)
+(*val ext_data_get_addr : mword ty5 -> mword ty32 -> AccessType unit -> word_width -> M (Ext_DataAddr_Check unit)*)
val _ = Define `
- ((ext_data_get_addr:(5)words$word ->(32)words$word -> AccessType -> word_width ->(regstate)sail2_state_monad$sequential_state ->((((unit)Ext_DataAddr_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (base : regidx) (offset : xlenbits) (acc : AccessType) (width : word_width)= (sail2_state_monad$bindS
- (rX ((regidx_to_regno base)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ ((ext_data_get_addr:(5)words$word ->(32)words$word ->(ext_access_type)AccessType -> word_width ->(regstate)sail2_state_monad$sequential_state ->((((unit)Ext_DataAddr_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (base : regidx) (offset : xlenbits) (acc : ext_access_type AccessType) (width :
+ word_width)= (sail2_state_monad$bindS
+ (rX_bits base : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
let addr = ((add_vec w__0 offset : 32 words$word)) in
sail2_state_monad$returnS (Ext_DataAddr_OK addr))))`;
@@ -9291,1130 +9884,1093 @@ val _ = Define `
((ext_handle_data_check_error:unit -> unit) err= () )`;
-(*val csr_name : mword ty12 -> string*)
+val _ = Define `
+ ((ext_check_phys_mem_read:(unit)AccessType ->(32)words$word -> int -> bool -> bool -> bool -> bool -> Ext_PhysAddr_Check) access_type paddr size1 aquire release reserved read_meta=
+ (Ext_PhysAddr_OK () ))`;
+
val _ = Define `
- ((csr_name:(12)words$word -> string) csr=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "ustatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "uie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "utvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "uscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "uepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "ucause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "utval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "uip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "fflags"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "frm"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "fcsr"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "cycle"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "time"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "instret"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "cycleh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "timeh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "instreth"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "sstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "sedeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "sideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "sie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "stvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- "scounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "sscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "sepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "scause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "stval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "sip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "satp"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- "mvendorid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- "marchid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- "mimpid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- "mhartid"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "misa"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "medeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "mideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "mie"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "mtvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- "mcounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "mepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "mcause"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "mtval"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "mip"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "pmpcfg0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- "pmpaddr0"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mcycle"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "minstret"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mcycleh"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "minstreth"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "tselect"
- else "UNKNOWN"))`;
-
-
-(*val csr_name_map_forwards : mword ty12 -> M string*)
-
-val _ = Define `
- ((csr_name_map_forwards:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "ustatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "utvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "uepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "ucause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "utval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "fflags"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "frm"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "fcsr"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "cycle"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "time"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "instret"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "cycleh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "timeh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "instreth"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sedeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "sideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "stvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "scounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "sepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "scause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "stval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "satp"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mvendorid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "marchid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mimpid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mhartid"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "misa"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "medeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mie"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mtvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcause"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mtval"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mip"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg1"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg2"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg3"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr1"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr2"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr3"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr4"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr5"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr6"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr7"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr8"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr9"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr10"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr11"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr12"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr13"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr14"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr15"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcycle"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "minstret"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcycleh"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "minstreth"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "tselect"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata1"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata2"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata3"
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+ ((ext_check_phys_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit -> Ext_PhysAddr_Check) write_kind paddr size1 data metadata= (Ext_PhysAddr_OK () ))`;
+
+(*val csr_name_map_forwards : mword ty12 -> string*)
(*val csr_name_map_backwards : string -> M (mword ty12)*)
+(*val csr_name_map_forwards_matches : mword ty12 -> bool*)
+
+(*val csr_name_map_backwards_matches : string -> M bool*)
+
+(*val csr_name_map_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+
+(*val ext_is_CSR_defined : mword ty12 -> Privilege -> M bool*)
+
+(*val ext_read_CSR : mword ty12 -> M (maybe (mword ty32))*)
+
+(*val ext_write_CSR : mword ty12 -> mword ty32 -> M (maybe (mword ty32))*)
+
+(*val Mk_Ustatus : mword ty32 -> Ustatus*)
+
val _ = Define `
- ((csr_name_map_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let p0_ = arg_ in
- if (((p0_ = "ustatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "uie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "utvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "uscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "uepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "ucause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "utval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "uip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "fflags"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "frm"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "fcsr"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "cycle"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "time"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "instret"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "cycleh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "timeh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "instreth"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "sstatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "sedeleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "sideleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "sie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "stvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "scounteren"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "sscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "sepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "scause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "stval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "sip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "satp"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "mvendorid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "marchid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mimpid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mhartid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "mstatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "misa"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "medeleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mideleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "mtvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "mcounteren"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "mscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "mepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "mcause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mtval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg0"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpcfg2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr0"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr4"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr5"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr6"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr7"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr8"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr9"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr10"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr11"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr12"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr13"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr14"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr15"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)
- else if (((p0_ = "mcycle"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "minstret"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mcycleh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "minstreth"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "tselect"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "tdata1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "tdata2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "tdata3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+ ((Mk_Ustatus:(32)words$word -> Ustatus) v=
+ (<| Ustatus_Ustatus_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val csr_name_map_forwards_matches : mword ty12 -> bool*)
+val _ = Define `
+ ((get_Ustatus_bits:Ustatus ->(32)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
val _ = Define `
- ((csr_name_map_forwards_matches:(12)words$word -> bool) arg_=
- (let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else F))`;
+ ((set_Ustatus_bits:((regstate),(register_value),(Ustatus))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+val _ = Define `
+ ((update_Ustatus_bits:Ustatus ->(32)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
-(*val csr_name_map_backwards_matches : string -> bool*)
val _ = Define `
- ((csr_name_map_backwards_matches:string -> bool) arg_=
- (let p0_ = arg_ in
- if (((p0_ = "ustatus"))) then T
- else if (((p0_ = "uie"))) then T
- else if (((p0_ = "utvec"))) then T
- else if (((p0_ = "uscratch"))) then T
- else if (((p0_ = "uepc"))) then T
- else if (((p0_ = "ucause"))) then T
- else if (((p0_ = "utval"))) then T
- else if (((p0_ = "uip"))) then T
- else if (((p0_ = "fflags"))) then T
- else if (((p0_ = "frm"))) then T
- else if (((p0_ = "fcsr"))) then T
- else if (((p0_ = "cycle"))) then T
- else if (((p0_ = "time"))) then T
- else if (((p0_ = "instret"))) then T
- else if (((p0_ = "cycleh"))) then T
- else if (((p0_ = "timeh"))) then T
- else if (((p0_ = "instreth"))) then T
- else if (((p0_ = "sstatus"))) then T
- else if (((p0_ = "sedeleg"))) then T
- else if (((p0_ = "sideleg"))) then T
- else if (((p0_ = "sie"))) then T
- else if (((p0_ = "stvec"))) then T
- else if (((p0_ = "scounteren"))) then T
- else if (((p0_ = "sscratch"))) then T
- else if (((p0_ = "sepc"))) then T
- else if (((p0_ = "scause"))) then T
- else if (((p0_ = "stval"))) then T
- else if (((p0_ = "sip"))) then T
- else if (((p0_ = "satp"))) then T
- else if (((p0_ = "mvendorid"))) then T
- else if (((p0_ = "marchid"))) then T
- else if (((p0_ = "mimpid"))) then T
- else if (((p0_ = "mhartid"))) then T
- else if (((p0_ = "mstatus"))) then T
- else if (((p0_ = "misa"))) then T
- else if (((p0_ = "medeleg"))) then T
- else if (((p0_ = "mideleg"))) then T
- else if (((p0_ = "mie"))) then T
- else if (((p0_ = "mtvec"))) then T
- else if (((p0_ = "mcounteren"))) then T
- else if (((p0_ = "mscratch"))) then T
- else if (((p0_ = "mepc"))) then T
- else if (((p0_ = "mcause"))) then T
- else if (((p0_ = "mtval"))) then T
- else if (((p0_ = "mip"))) then T
- else if (((p0_ = "pmpcfg0"))) then T
- else if (((p0_ = "pmpcfg1"))) then T
- else if (((p0_ = "pmpcfg2"))) then T
- else if (((p0_ = "pmpcfg3"))) then T
- else if (((p0_ = "pmpaddr0"))) then T
- else if (((p0_ = "pmpaddr1"))) then T
- else if (((p0_ = "pmpaddr2"))) then T
- else if (((p0_ = "pmpaddr3"))) then T
- else if (((p0_ = "pmpaddr4"))) then T
- else if (((p0_ = "pmpaddr5"))) then T
- else if (((p0_ = "pmpaddr6"))) then T
- else if (((p0_ = "pmpaddr7"))) then T
- else if (((p0_ = "pmpaddr8"))) then T
- else if (((p0_ = "pmpaddr9"))) then T
- else if (((p0_ = "pmpaddr10"))) then T
- else if (((p0_ = "pmpaddr11"))) then T
- else if (((p0_ = "pmpaddr12"))) then T
- else if (((p0_ = "pmpaddr13"))) then T
- else if (((p0_ = "pmpaddr14"))) then T
- else if (((p0_ = "pmpaddr15"))) then T
- else if (((p0_ = "mcycle"))) then T
- else if (((p0_ = "minstret"))) then T
- else if (((p0_ = "mcycleh"))) then T
- else if (((p0_ = "minstreth"))) then T
- else if (((p0_ = "tselect"))) then T
- else if (((p0_ = "tdata1"))) then T
- else if (((p0_ = "tdata2"))) then T
- else if (((p0_ = "tdata3"))) then T
- else F))`;
+ ((get_Ustatus_UPIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val csr_name_map_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+val _ = Define `
+ ((set_Ustatus_UPIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s488_ : string -> maybe string*)
val _ = Define `
- ((s488_:string ->(string)option) s489_0=
- (let s490_0 = s489_0 in
- if ((string_startswith s490_0 "tdata3")) then
- (case ((string_drop s490_0 ((string_length "tdata3")))) of s_ => SOME s_ )
- else NONE))`;
+ ((update_Ustatus_UPIE:Ustatus ->(1)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
-(*val _s484_ : string -> maybe string*)
+val _ = Define `
+ ((get_Ustatus_UIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+
val _ = Define `
- ((s484_:string ->(string)option) s485_0=
- (let s486_0 = s485_0 in
- if ((string_startswith s486_0 "tdata2")) then
- (case ((string_drop s486_0 ((string_length "tdata2")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_Ustatus_UIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s480_ : string -> maybe string*)
+val _ = Define `
+ ((update_Ustatus_UIE:Ustatus ->(1)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val lower_sstatus : Sstatus -> Ustatus*)
val _ = Define `
- ((s480_:string ->(string)option) s481_0=
- (let s482_0 = s481_0 in
- if ((string_startswith s482_0 "tdata1")) then
- (case ((string_drop s482_0 ((string_length "tdata1")))) of s_ => SOME s_ )
- else NONE))`;
+ ((lower_sstatus:Sstatus -> Ustatus) s=
+ (let u = (Mk_Ustatus ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
+ let u = (update_Ustatus_UPIE u ((get_Sstatus_UPIE s : 1 words$word))) in
+ update_Ustatus_UIE u ((get_Sstatus_UIE s : 1 words$word))))`;
-(*val _s476_ : string -> maybe string*)
+(*val lift_ustatus : Sstatus -> Ustatus -> Sstatus*)
val _ = Define `
- ((s476_:string ->(string)option) s477_0=
- (let s478_0 = s477_0 in
- if ((string_startswith s478_0 "tselect")) then
- (case ((string_drop s478_0 ((string_length "tselect")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_ustatus:Sstatus -> Ustatus -> Sstatus) (s : Sstatus) (u : Ustatus)=
+ (let s = (update_Sstatus_UPIE s ((get_Ustatus_UPIE u : 1 words$word))) in
+ update_Sstatus_UIE s ((get_Ustatus_UIE u : 1 words$word))))`;
-(*val _s472_ : string -> maybe string*)
+(*val legalize_ustatus : Mstatus -> mword ty32 -> M Mstatus*)
val _ = Define `
- ((s472_:string ->(string)option) s473_0=
- (let s474_0 = s473_0 in
- if ((string_startswith s474_0 "minstreth")) then
- (case ((string_drop s474_0 ((string_length "minstreth")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_ustatus:Mstatus ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)=
+ (let u = (Mk_Ustatus v) in
+ let s = (lower_mstatus m) in
+ let s = (lift_ustatus s u) in
+ lift_sstatus m s))`;
-(*val _s468_ : string -> maybe string*)
+(*val Mk_Uinterrupts : mword ty32 -> Uinterrupts*)
val _ = Define `
- ((s468_:string ->(string)option) s469_0=
- (let s470_0 = s469_0 in
- if ((string_startswith s470_0 "mcycleh")) then
- (case ((string_drop s470_0 ((string_length "mcycleh")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((Mk_Uinterrupts:(32)words$word -> Uinterrupts) v=
+ (<| Uinterrupts_Uinterrupts_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _s464_ : string -> maybe string*)
+val _ = Define `
+ ((get_Uinterrupts_bits:Uinterrupts ->(32)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
val _ = Define `
- ((s464_:string ->(string)option) s465_0=
- (let s466_0 = s465_0 in
- if ((string_startswith s466_0 "minstret")) then
- (case ((string_drop s466_0 ((string_length "minstret")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_Uinterrupts_bits:((regstate),(register_value),(Uinterrupts))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s460_ : string -> maybe string*)
+val _ = Define `
+ ((update_Uinterrupts_bits:Uinterrupts ->(32)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
val _ = Define `
- ((s460_:string ->(string)option) s461_0=
- (let s462_0 = s461_0 in
- if ((string_startswith s462_0 "mcycle")) then
- (case ((string_drop s462_0 ((string_length "mcycle")))) of s_ => SOME s_ )
- else NONE))`;
+ ((get_Uinterrupts_UEI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
-(*val _s456_ : string -> maybe string*)
+val _ = Define `
+ ((set_Uinterrupts_UEI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
val _ = Define `
- ((s456_:string ->(string)option) s457_0=
- (let s458_0 = s457_0 in
- if ((string_startswith s458_0 "pmpaddr15")) then
- (case ((string_drop s458_0 ((string_length "pmpaddr15")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((update_Uinterrupts_UEI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
-(*val _s452_ : string -> maybe string*)
+val _ = Define `
+ ((get_Uinterrupts_UTI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+
val _ = Define `
- ((s452_:string ->(string)option) s453_0=
- (let s454_0 = s453_0 in
- if ((string_startswith s454_0 "pmpaddr14")) then
- (case ((string_drop s454_0 ((string_length "pmpaddr14")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_Uinterrupts_UTI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s448_ : string -> maybe string*)
+val _ = Define `
+ ((update_Uinterrupts_UTI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
val _ = Define `
- ((s448_:string ->(string)option) s449_0=
- (let s450_0 = s449_0 in
- if ((string_startswith s450_0 "pmpaddr13")) then
- (case ((string_drop s450_0 ((string_length "pmpaddr13")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_Uinterrupts_USI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _s444_ : string -> maybe string*)
+val _ = Define `
+ ((set_Uinterrupts_USI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
val _ = Define `
- ((s444_:string ->(string)option) s445_0=
- (let s446_0 = s445_0 in
- if ((string_startswith s446_0 "pmpaddr12")) then
- (case ((string_drop s446_0 ((string_length "pmpaddr12")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((update_Uinterrupts_USI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
-(*val _s440_ : string -> maybe string*)
+(*val lower_sip : Sinterrupts -> Sinterrupts -> Uinterrupts*)
val _ = Define `
- ((s440_:string ->(string)option) s441_0=
- (let s442_0 = s441_0 in
- if ((string_startswith s442_0 "pmpaddr11")) then
- (case ((string_drop s442_0 ((string_length "pmpaddr11")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lower_sip:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
+ (let (u : Uinterrupts) = (Mk_Uinterrupts ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
+ let u =
+ (update_Uinterrupts_UEI u
+ ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
+ : 1 words$word))) in
+ let u =
+ (update_Uinterrupts_UTI u
+ ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
+ : 1 words$word))) in
+ update_Uinterrupts_USI u
+ ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
+ : 1 words$word))))`;
-(*val _s436_ : string -> maybe string*)
+(*val lower_sie : Sinterrupts -> Sinterrupts -> Uinterrupts*)
val _ = Define `
- ((s436_:string ->(string)option) s437_0=
- (let s438_0 = s437_0 in
- if ((string_startswith s438_0 "pmpaddr10")) then
- (case ((string_drop s438_0 ((string_length "pmpaddr10")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lower_sie:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
+ (let (u : Uinterrupts) = (Mk_Uinterrupts ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))) in
+ let u =
+ (update_Uinterrupts_UEI u
+ ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
+ : 1 words$word))) in
+ let u =
+ (update_Uinterrupts_UTI u
+ ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
+ : 1 words$word))) in
+ update_Uinterrupts_USI u
+ ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
+ : 1 words$word))))`;
-(*val _s432_ : string -> maybe string*)
+(*val lift_uip : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
val _ = Define `
- ((s432_:string ->(string)option) s433_0=
- (let s434_0 = s433_0 in
- if ((string_startswith s434_0 "pmpaddr9")) then
- (case ((string_drop s434_0 ((string_length "pmpaddr9")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_uip:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
+ (let (s : Sinterrupts) = o1 in
+ if (((((get_Sinterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
+ else s))`;
-(*val _s428_ : string -> maybe string*)
+(*val legalize_uip : Sinterrupts -> Sinterrupts -> mword ty32 -> Sinterrupts*)
val _ = Define `
- ((s428_:string ->(string)option) s429_0=
- (let s430_0 = s429_0 in
- if ((string_startswith s430_0 "pmpaddr8")) then
- (case ((string_drop s430_0 ((string_length "pmpaddr8")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_uip:Sinterrupts -> Sinterrupts ->(32)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
+ (lift_uip s d ((Mk_Uinterrupts v))))`;
-(*val _s424_ : string -> maybe string*)
+(*val lift_uie : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
val _ = Define `
- ((s424_:string ->(string)option) s425_0=
- (let s426_0 = s425_0 in
- if ((string_startswith s426_0 "pmpaddr7")) then
- (case ((string_drop s426_0 ((string_length "pmpaddr7")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_uie:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
+ (let (s : Sinterrupts) = o1 in
+ let s =
+ (if (((((get_Sinterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_UEI s ((get_Uinterrupts_UEI u : 1 words$word))
+ else s) in
+ let s =
+ (if (((((get_Sinterrupts_UTI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_UTI s ((get_Uinterrupts_UTI u : 1 words$word))
+ else s) in
+ if (((((get_Sinterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
+ else s))`;
-(*val _s420_ : string -> maybe string*)
+(*val legalize_uie : Sinterrupts -> Sinterrupts -> mword ty32 -> Sinterrupts*)
val _ = Define `
- ((s420_:string ->(string)option) s421_0=
- (let s422_0 = s421_0 in
- if ((string_startswith s422_0 "pmpaddr6")) then
- (case ((string_drop s422_0 ((string_length "pmpaddr6")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_uie:Sinterrupts -> Sinterrupts ->(32)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
+ (lift_uie s d ((Mk_Uinterrupts v))))`;
-(*val _s416_ : string -> maybe string*)
+(*val ext_check_xret_priv : Privilege -> bool*)
val _ = Define `
- ((s416_:string ->(string)option) s417_0=
- (let s418_0 = s417_0 in
- if ((string_startswith s418_0 "pmpaddr5")) then
- (case ((string_drop s418_0 ((string_length "pmpaddr5")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((ext_check_xret_priv:Privilege -> bool) p= T)`;
-(*val _s412_ : string -> maybe string*)
+(*val ext_fail_xret_priv : unit -> unit*)
val _ = Define `
- ((s412_:string ->(string)option) s413_0=
- (let s414_0 = s413_0 in
- if ((string_startswith s414_0 "pmpaddr4")) then
- (case ((string_drop s414_0 ((string_length "pmpaddr4")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((ext_fail_xret_priv:unit -> unit) () = () )`;
-(*val _s408_ : string -> maybe string*)
+(*val handle_trap_extension : Privilege -> mword ty32 -> maybe unit -> unit*)
val _ = Define `
- ((s408_:string ->(string)option) s409_0=
- (let s410_0 = s409_0 in
- if ((string_startswith s410_0 "pmpaddr3")) then
- (case ((string_drop s410_0 ((string_length "pmpaddr3")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((handle_trap_extension:Privilege ->(32)words$word ->(unit)option -> unit) (p : Privilege) (pc : xlenbits) (u : unit option)= () )`;
-(*val _s404_ : string -> maybe string*)
+(*val prepare_trap_vector : Privilege -> Mcause -> M (mword ty32)*)
val _ = Define `
- ((s404_:string ->(string)option) s405_0=
- (let s406_0 = s405_0 in
- if ((string_startswith s406_0 "pmpaddr2")) then
- (case ((string_drop s406_0 ((string_length "pmpaddr2")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((prepare_trap_vector:Privilege -> Mcause ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (p : Privilege) (cause : Mcause)= (sail2_state_monad$bindS
+ (case p of
+ Machine => sail2_state_monad$read_regS mtvec_ref
+ | Supervisor => sail2_state_monad$read_regS stvec_ref
+ | User => sail2_state_monad$read_regS utvec_ref
+ ) (\ (tvec : Mtvec) .
+ (case ((tvec_addr tvec cause : ( 32 words$word)option)) of
+ SOME (epc) => sail2_state_monad$returnS epc
+ | NONE => (internal_error "Invalid tvec mode" : ( 32 words$word) M)
+ ))))`;
-(*val _s400_ : string -> maybe string*)
+(*val get_xret_target : Privilege -> M (mword ty32)*)
val _ = Define `
- ((s400_:string ->(string)option) s401_0=
- (let s402_0 = s401_0 in
- if ((string_startswith s402_0 "pmpaddr1")) then
- (case ((string_drop s402_0 ((string_length "pmpaddr1")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
+ ((case p of
+ Machine => (sail2_state_monad$read_regS mepc_ref : ( 32 words$word) M)
+ | Supervisor => (sail2_state_monad$read_regS sepc_ref : ( 32 words$word) M)
+ | User => (sail2_state_monad$read_regS uepc_ref : ( 32 words$word) M)
+ )))`;
-(*val _s396_ : string -> maybe string*)
+(*val set_xret_target : Privilege -> mword ty32 -> M (mword ty32)*)
val _ = Define `
- ((s396_:string ->(string)option) s397_0=
- (let s398_0 = s397_0 in
- if ((string_startswith s398_0 "pmpaddr0")) then
- (case ((string_drop s398_0 ((string_length "pmpaddr0")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_xret_target:Privilege ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p value= (sail2_state_monad$bindS
+ (legalize_xepc value : ( 32 words$word) M) (\ target . sail2_state_monad$seqS
+ (case p of
+ Machine => sail2_state_monad$write_regS mepc_ref target
+ | Supervisor => sail2_state_monad$write_regS sepc_ref target
+ | User => sail2_state_monad$write_regS uepc_ref target
+ )
+ (sail2_state_monad$returnS target))))`;
-(*val _s392_ : string -> maybe string*)
+(*val prepare_xret_target : Privilege -> M (mword ty32)*)
val _ = Define `
- ((s392_:string ->(string)option) s393_0=
- (let s394_0 = s393_0 in
- if ((string_startswith s394_0 "pmpcfg3")) then
- (case ((string_drop s394_0 ((string_length "pmpcfg3")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((prepare_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p= ((get_xret_target p : ( 32 words$word) M)))`;
-(*val _s388_ : string -> maybe string*)
+(*val get_mtvec : unit -> M (mword ty32)*)
val _ = Define `
- ((s388_:string ->(string)option) s389_0=
- (let s390_0 = s389_0 in
- if ((string_startswith s390_0 "pmpcfg2")) then
- (case ((string_drop s390_0 ((string_length "pmpcfg2")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_mtvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
-(*val _s384_ : string -> maybe string*)
+(*val get_stvec : unit -> M (mword ty32)*)
val _ = Define `
- ((s384_:string ->(string)option) s385_0=
- (let s386_0 = s385_0 in
- if ((string_startswith s386_0 "pmpcfg1")) then
- (case ((string_drop s386_0 ((string_length "pmpcfg1")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_stvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
-(*val _s380_ : string -> maybe string*)
+(*val get_utvec : unit -> M (mword ty32)*)
val _ = Define `
- ((s380_:string ->(string)option) s381_0=
- (let s382_0 = s381_0 in
- if ((string_startswith s382_0 "pmpcfg0")) then
- (case ((string_drop s382_0 ((string_length "pmpcfg0")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_utvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
-(*val _s376_ : string -> maybe string*)
+(*val set_mtvec : mword ty32 -> M (mword ty32)*)
val _ = Define `
- ((s376_:string ->(string)option) s377_0=
- (let s378_0 = s377_0 in
- if ((string_startswith s378_0 "mip")) then
- (case ((string_drop s378_0 ((string_length "mip")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_mtvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mtvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS mtvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
-(*val _s372_ : string -> maybe string*)
+(*val set_stvec : mword ty32 -> M (mword ty32)*)
val _ = Define `
- ((s372_:string ->(string)option) s373_0=
- (let s374_0 = s373_0 in
- if ((string_startswith s374_0 "mtval")) then
- (case ((string_drop s374_0 ((string_length "mtval")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_stvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS stvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS stvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
-(*val _s368_ : string -> maybe string*)
+(*val set_utvec : mword ty32 -> M (mword ty32)*)
val _ = Define `
- ((s368_:string ->(string)option) s369_0=
- (let s370_0 = s369_0 in
- if ((string_startswith s370_0 "mcause")) then
- (case ((string_drop s370_0 ((string_length "mcause")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_utvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS utvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS utvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
-(*val _s364_ : string -> maybe string*)
+(*val update_softfloat_fflags : mword ty5 -> M unit*)
val _ = Define `
- ((s364_:string ->(string)option) s365_0=
- (let s366_0 = s365_0 in
- if ((string_startswith s366_0 "mepc")) then
- (case ((string_drop s366_0 ((string_length "mepc")))) of s_ => SOME s_ )
- else NONE))`;
+ ((update_softfloat_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) flags=
+ (sail2_state_monad$write_regS float_fflags_ref ((zero_extend flags (( 64 : int):ii) : 64 words$word))))`;
-(*val _s360_ : string -> maybe string*)
+(*val riscv_f32Add : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s360_:string ->(string)option) s361_0=
- (let s362_0 = s361_0 in
- if ((string_startswith s362_0 "mscratch")) then
- (case ((string_drop s362_0 ((string_length "mscratch")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32Add:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_add rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s356_ : string -> maybe string*)
+(*val riscv_f32Sub : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s356_:string ->(string)option) s357_0=
- (let s358_0 = s357_0 in
- if ((string_startswith s358_0 "mcounteren")) then
- (case ((string_drop s358_0 ((string_length "mcounteren")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32Sub:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_sub rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s352_ : string -> maybe string*)
+(*val riscv_f32Mul : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s352_:string ->(string)option) s353_0=
- (let s354_0 = s353_0 in
- if ((string_startswith s354_0 "mtvec")) then
- (case ((string_drop s354_0 ((string_length "mtvec")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f32Mul:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_mul rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s348_ : string -> maybe string*)
+(*val riscv_f32Div : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s348_:string ->(string)option) s349_0=
- (let s350_0 = s349_0 in
- if ((string_startswith s350_0 "mie")) then
- (case ((string_drop s350_0 ((string_length "mie")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f32Div:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_div rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s344_ : string -> maybe string*)
+(*val riscv_f64Add : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s344_:string ->(string)option) s345_0=
- (let s346_0 = s345_0 in
- if ((string_startswith s346_0 "mideleg")) then
- (case ((string_drop s346_0 ((string_length "mideleg")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Add:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_add rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s340_ : string -> maybe string*)
+(*val riscv_f64Sub : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s340_:string ->(string)option) s341_0=
- (let s342_0 = s341_0 in
- if ((string_startswith s342_0 "medeleg")) then
- (case ((string_drop s342_0 ((string_length "medeleg")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Sub:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_sub rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s336_ : string -> maybe string*)
+(*val riscv_f64Mul : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s336_:string ->(string)option) s337_0=
- (let s338_0 = s337_0 in
- if ((string_startswith s338_0 "misa")) then
- (case ((string_drop s338_0 ((string_length "misa")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f64Mul:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_mul rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s332_ : string -> maybe string*)
+(*val riscv_f64Div : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s332_:string ->(string)option) s333_0=
- (let s334_0 = s333_0 in
- if ((string_startswith s334_0 "mstatus")) then
- (case ((string_drop s334_0 ((string_length "mstatus")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Div:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_div rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s328_ : string -> maybe string*)
+(*val riscv_f32MulAdd : mword ty3 -> mword ty32 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s328_:string ->(string)option) s329_0=
- (let s330_0 = s329_0 in
- if ((string_startswith s330_0 "mhartid")) then
- (case ((string_drop s330_0 ((string_length "mhartid")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32MulAdd:(3)words$word ->(32)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2 v3=
+ (let (_ : unit) = (softfloat_f32_muladd rm v1 v2 v3) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64MulAdd : mword ty3 -> mword ty64 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64MulAdd:(3)words$word ->(64)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2 v3=
+ (let (_ : unit) = (softfloat_f64_muladd rm v1 v2 v3) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32Sqrt : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Sqrt:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_sqrt rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64Sqrt : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Sqrt:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_sqrt rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToI32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32ToI32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_i32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32ToUi32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32ToUi32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_ui32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_i32ToF32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_i32ToF32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i32_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_ui32ToF32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_ui32ToF32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui32_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32ToI64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToI64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_i64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToUi64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToUi64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_ui64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_i64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_i64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_ui64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_ui64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64ToI32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToI32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_i32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64ToUi32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToUi32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_ui32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_i32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_i32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_ui32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_ui32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToI64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64ToI64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_i64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToUi64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64ToUi64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_ui64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_i64ToF64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_i64ToF64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i64_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_ui64ToF64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_ui64ToF64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui64_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Lt : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Lt:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_lt v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Le : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Le:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_le v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Eq : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Eq:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_eq v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64Lt : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Lt:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_lt v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64Le : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Le:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_le v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64Eq : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Eq:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_eq v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val dirty_fd_context : unit -> M unit*)
+
+val _ = Define `
+ ((dirty_fd_context:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS
+ (set_Mstatus_FS mstatus_ref ((extStatus_to_bits Dirty : 2 words$word)))
+ (set_Mstatus_SD mstatus_ref (0b1w : 1 words$word))))`;
+
+
+(*val rF : integer -> M (mword ty32)*)
+
+val _ = Define `
+ ((rF:int ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
+ (let l__45 = r in sail2_state_monad$bindS
+ (if (((l__45 = (( 0 : int):ii)))) then (sail2_state_monad$read_regS f0_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 1 : int):ii)))) then (sail2_state_monad$read_regS f1_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 2 : int):ii)))) then (sail2_state_monad$read_regS f2_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 3 : int):ii)))) then (sail2_state_monad$read_regS f3_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 4 : int):ii)))) then (sail2_state_monad$read_regS f4_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 5 : int):ii)))) then (sail2_state_monad$read_regS f5_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 6 : int):ii)))) then (sail2_state_monad$read_regS f6_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 7 : int):ii)))) then (sail2_state_monad$read_regS f7_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 8 : int):ii)))) then (sail2_state_monad$read_regS f8_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 9 : int):ii)))) then (sail2_state_monad$read_regS f9_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 10 : int):ii)))) then (sail2_state_monad$read_regS f10_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 11 : int):ii)))) then (sail2_state_monad$read_regS f11_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 12 : int):ii)))) then (sail2_state_monad$read_regS f12_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 13 : int):ii)))) then (sail2_state_monad$read_regS f13_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 14 : int):ii)))) then (sail2_state_monad$read_regS f14_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 15 : int):ii)))) then (sail2_state_monad$read_regS f15_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 16 : int):ii)))) then (sail2_state_monad$read_regS f16_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 17 : int):ii)))) then (sail2_state_monad$read_regS f17_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 18 : int):ii)))) then (sail2_state_monad$read_regS f18_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 19 : int):ii)))) then (sail2_state_monad$read_regS f19_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 20 : int):ii)))) then (sail2_state_monad$read_regS f20_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 21 : int):ii)))) then (sail2_state_monad$read_regS f21_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 22 : int):ii)))) then (sail2_state_monad$read_regS f22_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 23 : int):ii)))) then (sail2_state_monad$read_regS f23_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 24 : int):ii)))) then (sail2_state_monad$read_regS f24_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 25 : int):ii)))) then (sail2_state_monad$read_regS f25_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 26 : int):ii)))) then (sail2_state_monad$read_regS f26_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 27 : int):ii)))) then (sail2_state_monad$read_regS f27_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 28 : int):ii)))) then (sail2_state_monad$read_regS f28_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 29 : int):ii)))) then (sail2_state_monad$read_regS f29_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 30 : int):ii)))) then (sail2_state_monad$read_regS f30_ref : ( 32 words$word) M)
+ else if (((l__45 = (( 31 : int):ii)))) then (sail2_state_monad$read_regS f31_ref : ( 32 words$word) M)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid floating point register number") (sail2_state_monad$exitS () )) (\ (v : fregtype) .
+ sail2_state_monad$returnS ((fregval_from_freg v : 32 words$word)))))`;
+
+
+(*val wF : integer -> mword ty32 -> M unit*)
+
+val _ = Define `
+ ((wF:int ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r in_v=
+ (let v = ((fregval_into_freg in_v : 32 words$word)) in
+ let l__13 = r in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((l__13 = (( 0 : int):ii)))) then sail2_state_monad$write_regS f0_ref v
+ else if (((l__13 = (( 1 : int):ii)))) then sail2_state_monad$write_regS f1_ref v
+ else if (((l__13 = (( 2 : int):ii)))) then sail2_state_monad$write_regS f2_ref v
+ else if (((l__13 = (( 3 : int):ii)))) then sail2_state_monad$write_regS f3_ref v
+ else if (((l__13 = (( 4 : int):ii)))) then sail2_state_monad$write_regS f4_ref v
+ else if (((l__13 = (( 5 : int):ii)))) then sail2_state_monad$write_regS f5_ref v
+ else if (((l__13 = (( 6 : int):ii)))) then sail2_state_monad$write_regS f6_ref v
+ else if (((l__13 = (( 7 : int):ii)))) then sail2_state_monad$write_regS f7_ref v
+ else if (((l__13 = (( 8 : int):ii)))) then sail2_state_monad$write_regS f8_ref v
+ else if (((l__13 = (( 9 : int):ii)))) then sail2_state_monad$write_regS f9_ref v
+ else if (((l__13 = (( 10 : int):ii)))) then sail2_state_monad$write_regS f10_ref v
+ else if (((l__13 = (( 11 : int):ii)))) then sail2_state_monad$write_regS f11_ref v
+ else if (((l__13 = (( 12 : int):ii)))) then sail2_state_monad$write_regS f12_ref v
+ else if (((l__13 = (( 13 : int):ii)))) then sail2_state_monad$write_regS f13_ref v
+ else if (((l__13 = (( 14 : int):ii)))) then sail2_state_monad$write_regS f14_ref v
+ else if (((l__13 = (( 15 : int):ii)))) then sail2_state_monad$write_regS f15_ref v
+ else if (((l__13 = (( 16 : int):ii)))) then sail2_state_monad$write_regS f16_ref v
+ else if (((l__13 = (( 17 : int):ii)))) then sail2_state_monad$write_regS f17_ref v
+ else if (((l__13 = (( 18 : int):ii)))) then sail2_state_monad$write_regS f18_ref v
+ else if (((l__13 = (( 19 : int):ii)))) then sail2_state_monad$write_regS f19_ref v
+ else if (((l__13 = (( 20 : int):ii)))) then sail2_state_monad$write_regS f20_ref v
+ else if (((l__13 = (( 21 : int):ii)))) then sail2_state_monad$write_regS f21_ref v
+ else if (((l__13 = (( 22 : int):ii)))) then sail2_state_monad$write_regS f22_ref v
+ else if (((l__13 = (( 23 : int):ii)))) then sail2_state_monad$write_regS f23_ref v
+ else if (((l__13 = (( 24 : int):ii)))) then sail2_state_monad$write_regS f24_ref v
+ else if (((l__13 = (( 25 : int):ii)))) then sail2_state_monad$write_regS f25_ref v
+ else if (((l__13 = (( 26 : int):ii)))) then sail2_state_monad$write_regS f26_ref v
+ else if (((l__13 = (( 27 : int):ii)))) then sail2_state_monad$write_regS f27_ref v
+ else if (((l__13 = (( 28 : int):ii)))) then sail2_state_monad$write_regS f28_ref v
+ else if (((l__13 = (( 29 : int):ii)))) then sail2_state_monad$write_regS f29_ref v
+ else if (((l__13 = (( 30 : int):ii)))) then sail2_state_monad$write_regS f30_ref v
+ else if (((l__13 = (( 31 : int):ii)))) then sail2_state_monad$write_regS f31_ref v
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid floating point register number") (sail2_state_monad$exitS () ))
+ (dirty_fd_context () ))
+ (sail2_state_monad$returnS (if ((get_config_print_reg () )) then
+ print_dbg
+ ((STRCAT "f"
+ ((STRCAT ((stringFromInteger r)) ((STRCAT " <- " ((FRegStr v))))))))
+ else () ))))`;
+
+
+(*val rF_bits : mword ty5 -> M (mword ty32)*)
+
+val _ = Define `
+ ((rF_bits:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) i= ((rF ((lem$w2ui i)) : ( 32 words$word) M)))`;
+
+
+(*val wF_bits : mword ty5 -> mword ty32 -> M unit*)
+
+val _ = Define `
+ ((wF_bits:(5)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (i : 5 bits) (data : flenbits)= (wF ((lem$w2ui i)) data))`;
+
+
+(*val freg_name_abi_forwards : mword ty5 -> M string*)
+
+(*val freg_name_abi_backwards : string -> M (mword ty5)*)
+
+(*val freg_name_abi_forwards_matches : mword ty5 -> bool*)
+
+(*val freg_name_abi_backwards_matches : string -> bool*)
+
+(*val freg_name_abi_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
+val _ = Define `
+ ((freg_name_abi_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "ft0"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ft1"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "ft2"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "ft3"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "ft4"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "ft5"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "ft6"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "ft7"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fs0"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "fs1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "fa0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "fa1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "fa2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "fa3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "fa4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "fa5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "fa6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "fa7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "fs2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "fs3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "fs4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "fs5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "fs6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "fs7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "fs8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "fs9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "fs10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "fs11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "ft8"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "ft9"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "ft10"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "ft11"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_abi_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ft1"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "ft2"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "ft3"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "ft4"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "ft5"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "ft6"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "ft7"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fs0"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "fs1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "fa0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "fa1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "fa2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "fa3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "fa4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "fa5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "fa6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "fa7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "fs2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "fs3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "fs4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "fs5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "fs6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "fs7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "fs8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "fs9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "fs10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "fs11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "ft8"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "ft9"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "ft10"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "ft11"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_abi_forwards_matches:(5)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
+ else F))`;
+
+
+val _ = Define `
+ ((freg_name_abi_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then T
+ else if (((p0_ = "ft1"))) then T
+ else if (((p0_ = "ft2"))) then T
+ else if (((p0_ = "ft3"))) then T
+ else if (((p0_ = "ft4"))) then T
+ else if (((p0_ = "ft5"))) then T
+ else if (((p0_ = "ft6"))) then T
+ else if (((p0_ = "ft7"))) then T
+ else if (((p0_ = "fs0"))) then T
+ else if (((p0_ = "fs1"))) then T
+ else if (((p0_ = "fa0"))) then T
+ else if (((p0_ = "fa1"))) then T
+ else if (((p0_ = "fa2"))) then T
+ else if (((p0_ = "fa3"))) then T
+ else if (((p0_ = "fa4"))) then T
+ else if (((p0_ = "fa5"))) then T
+ else if (((p0_ = "fa6"))) then T
+ else if (((p0_ = "fa7"))) then T
+ else if (((p0_ = "fs2"))) then T
+ else if (((p0_ = "fs3"))) then T
+ else if (((p0_ = "fs4"))) then T
+ else if (((p0_ = "fs5"))) then T
+ else if (((p0_ = "fs6"))) then T
+ else if (((p0_ = "fs7"))) then T
+ else if (((p0_ = "fs8"))) then T
+ else if (((p0_ = "fs9"))) then T
+ else if (((p0_ = "fs10"))) then T
+ else if (((p0_ = "fs11"))) then T
+ else if (((p0_ = "ft8"))) then T
+ else if (((p0_ = "ft9"))) then T
+ else if (((p0_ = "ft10"))) then T
+ else if (((p0_ = "ft11"))) then T
+ else F))`;
(*val _s324_ : string -> maybe string*)
@@ -10422,8 +10978,8 @@ val _ = Define `
val _ = Define `
((s324_:string ->(string)option) s325_0=
(let s326_0 = s325_0 in
- if ((string_startswith s326_0 "mimpid")) then
- (case ((string_drop s326_0 ((string_length "mimpid")))) of s_ => SOME s_ )
+ if ((string_startswith s326_0 "ft11")) then
+ (case ((string_drop s326_0 ((string_length "ft11")))) of s_ => SOME s_ )
else NONE))`;
@@ -10432,10 +10988,8 @@ val _ = Define `
val _ = Define `
((s320_:string ->(string)option) s321_0=
(let s322_0 = s321_0 in
- if ((string_startswith s322_0 "marchid")) then
- (case ((string_drop s322_0 ((string_length "marchid")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s322_0 "ft10")) then
+ (case ((string_drop s322_0 ((string_length "ft10")))) of s_ => SOME s_ )
else NONE))`;
@@ -10444,10 +10998,8 @@ val _ = Define `
val _ = Define `
((s316_:string ->(string)option) s317_0=
(let s318_0 = s317_0 in
- if ((string_startswith s318_0 "mvendorid")) then
- (case ((string_drop s318_0 ((string_length "mvendorid")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s318_0 "ft9")) then
+ (case ((string_drop s318_0 ((string_length "ft9")))) of s_ => SOME s_ )
else NONE))`;
@@ -10456,8 +11008,8 @@ val _ = Define `
val _ = Define `
((s312_:string ->(string)option) s313_0=
(let s314_0 = s313_0 in
- if ((string_startswith s314_0 "satp")) then
- (case ((string_drop s314_0 ((string_length "satp")))) of s_ => SOME s_ )
+ if ((string_startswith s314_0 "ft8")) then
+ (case ((string_drop s314_0 ((string_length "ft8")))) of s_ => SOME s_ )
else NONE))`;
@@ -10466,8 +11018,8 @@ val _ = Define `
val _ = Define `
((s308_:string ->(string)option) s309_0=
(let s310_0 = s309_0 in
- if ((string_startswith s310_0 "sip")) then
- (case ((string_drop s310_0 ((string_length "sip")))) of s_ => SOME s_ )
+ if ((string_startswith s310_0 "fs11")) then
+ (case ((string_drop s310_0 ((string_length "fs11")))) of s_ => SOME s_ )
else NONE))`;
@@ -10476,8 +11028,8 @@ val _ = Define `
val _ = Define `
((s304_:string ->(string)option) s305_0=
(let s306_0 = s305_0 in
- if ((string_startswith s306_0 "stval")) then
- (case ((string_drop s306_0 ((string_length "stval")))) of s_ => SOME s_ )
+ if ((string_startswith s306_0 "fs10")) then
+ (case ((string_drop s306_0 ((string_length "fs10")))) of s_ => SOME s_ )
else NONE))`;
@@ -10486,8 +11038,8 @@ val _ = Define `
val _ = Define `
((s300_:string ->(string)option) s301_0=
(let s302_0 = s301_0 in
- if ((string_startswith s302_0 "scause")) then
- (case ((string_drop s302_0 ((string_length "scause")))) of s_ => SOME s_ )
+ if ((string_startswith s302_0 "fs9")) then
+ (case ((string_drop s302_0 ((string_length "fs9")))) of s_ => SOME s_ )
else NONE))`;
@@ -10496,8 +11048,8 @@ val _ = Define `
val _ = Define `
((s296_:string ->(string)option) s297_0=
(let s298_0 = s297_0 in
- if ((string_startswith s298_0 "sepc")) then
- (case ((string_drop s298_0 ((string_length "sepc")))) of s_ => SOME s_ )
+ if ((string_startswith s298_0 "fs8")) then
+ (case ((string_drop s298_0 ((string_length "fs8")))) of s_ => SOME s_ )
else NONE))`;
@@ -10506,10 +11058,8 @@ val _ = Define `
val _ = Define `
((s292_:string ->(string)option) s293_0=
(let s294_0 = s293_0 in
- if ((string_startswith s294_0 "sscratch")) then
- (case ((string_drop s294_0 ((string_length "sscratch")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s294_0 "fs7")) then
+ (case ((string_drop s294_0 ((string_length "fs7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10518,10 +11068,8 @@ val _ = Define `
val _ = Define `
((s288_:string ->(string)option) s289_0=
(let s290_0 = s289_0 in
- if ((string_startswith s290_0 "scounteren")) then
- (case ((string_drop s290_0 ((string_length "scounteren")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s290_0 "fs6")) then
+ (case ((string_drop s290_0 ((string_length "fs6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10530,8 +11078,8 @@ val _ = Define `
val _ = Define `
((s284_:string ->(string)option) s285_0=
(let s286_0 = s285_0 in
- if ((string_startswith s286_0 "stvec")) then
- (case ((string_drop s286_0 ((string_length "stvec")))) of s_ => SOME s_ )
+ if ((string_startswith s286_0 "fs5")) then
+ (case ((string_drop s286_0 ((string_length "fs5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10540,8 +11088,8 @@ val _ = Define `
val _ = Define `
((s280_:string ->(string)option) s281_0=
(let s282_0 = s281_0 in
- if ((string_startswith s282_0 "sie")) then
- (case ((string_drop s282_0 ((string_length "sie")))) of s_ => SOME s_ )
+ if ((string_startswith s282_0 "fs4")) then
+ (case ((string_drop s282_0 ((string_length "fs4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10550,10 +11098,8 @@ val _ = Define `
val _ = Define `
((s276_:string ->(string)option) s277_0=
(let s278_0 = s277_0 in
- if ((string_startswith s278_0 "sideleg")) then
- (case ((string_drop s278_0 ((string_length "sideleg")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s278_0 "fs3")) then
+ (case ((string_drop s278_0 ((string_length "fs3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10562,10 +11108,8 @@ val _ = Define `
val _ = Define `
((s272_:string ->(string)option) s273_0=
(let s274_0 = s273_0 in
- if ((string_startswith s274_0 "sedeleg")) then
- (case ((string_drop s274_0 ((string_length "sedeleg")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s274_0 "fs2")) then
+ (case ((string_drop s274_0 ((string_length "fs2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10574,10 +11118,8 @@ val _ = Define `
val _ = Define `
((s268_:string ->(string)option) s269_0=
(let s270_0 = s269_0 in
- if ((string_startswith s270_0 "sstatus")) then
- (case ((string_drop s270_0 ((string_length "sstatus")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s270_0 "fa7")) then
+ (case ((string_drop s270_0 ((string_length "fa7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10586,10 +11128,8 @@ val _ = Define `
val _ = Define `
((s264_:string ->(string)option) s265_0=
(let s266_0 = s265_0 in
- if ((string_startswith s266_0 "instreth")) then
- (case ((string_drop s266_0 ((string_length "instreth")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s266_0 "fa6")) then
+ (case ((string_drop s266_0 ((string_length "fa6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10598,8 +11138,8 @@ val _ = Define `
val _ = Define `
((s260_:string ->(string)option) s261_0=
(let s262_0 = s261_0 in
- if ((string_startswith s262_0 "timeh")) then
- (case ((string_drop s262_0 ((string_length "timeh")))) of s_ => SOME s_ )
+ if ((string_startswith s262_0 "fa5")) then
+ (case ((string_drop s262_0 ((string_length "fa5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10608,8 +11148,8 @@ val _ = Define `
val _ = Define `
((s256_:string ->(string)option) s257_0=
(let s258_0 = s257_0 in
- if ((string_startswith s258_0 "cycleh")) then
- (case ((string_drop s258_0 ((string_length "cycleh")))) of s_ => SOME s_ )
+ if ((string_startswith s258_0 "fa4")) then
+ (case ((string_drop s258_0 ((string_length "fa4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10618,10 +11158,8 @@ val _ = Define `
val _ = Define `
((s252_:string ->(string)option) s253_0=
(let s254_0 = s253_0 in
- if ((string_startswith s254_0 "instret")) then
- (case ((string_drop s254_0 ((string_length "instret")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s254_0 "fa3")) then
+ (case ((string_drop s254_0 ((string_length "fa3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10630,8 +11168,8 @@ val _ = Define `
val _ = Define `
((s248_:string ->(string)option) s249_0=
(let s250_0 = s249_0 in
- if ((string_startswith s250_0 "time")) then
- (case ((string_drop s250_0 ((string_length "time")))) of s_ => SOME s_ )
+ if ((string_startswith s250_0 "fa2")) then
+ (case ((string_drop s250_0 ((string_length "fa2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10640,8 +11178,8 @@ val _ = Define `
val _ = Define `
((s244_:string ->(string)option) s245_0=
(let s246_0 = s245_0 in
- if ((string_startswith s246_0 "cycle")) then
- (case ((string_drop s246_0 ((string_length "cycle")))) of s_ => SOME s_ )
+ if ((string_startswith s246_0 "fa1")) then
+ (case ((string_drop s246_0 ((string_length "fa1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10650,8 +11188,8 @@ val _ = Define `
val _ = Define `
((s240_:string ->(string)option) s241_0=
(let s242_0 = s241_0 in
- if ((string_startswith s242_0 "fcsr")) then
- (case ((string_drop s242_0 ((string_length "fcsr")))) of s_ => SOME s_ )
+ if ((string_startswith s242_0 "fa0")) then
+ (case ((string_drop s242_0 ((string_length "fa0")))) of s_ => SOME s_ )
else NONE))`;
@@ -10660,8 +11198,8 @@ val _ = Define `
val _ = Define `
((s236_:string ->(string)option) s237_0=
(let s238_0 = s237_0 in
- if ((string_startswith s238_0 "frm")) then
- (case ((string_drop s238_0 ((string_length "frm")))) of s_ => SOME s_ )
+ if ((string_startswith s238_0 "fs1")) then
+ (case ((string_drop s238_0 ((string_length "fs1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10670,8 +11208,8 @@ val _ = Define `
val _ = Define `
((s232_:string ->(string)option) s233_0=
(let s234_0 = s233_0 in
- if ((string_startswith s234_0 "fflags")) then
- (case ((string_drop s234_0 ((string_length "fflags")))) of s_ => SOME s_ )
+ if ((string_startswith s234_0 "fs0")) then
+ (case ((string_drop s234_0 ((string_length "fs0")))) of s_ => SOME s_ )
else NONE))`;
@@ -10680,8 +11218,8 @@ val _ = Define `
val _ = Define `
((s228_:string ->(string)option) s229_0=
(let s230_0 = s229_0 in
- if ((string_startswith s230_0 "uip")) then
- (case ((string_drop s230_0 ((string_length "uip")))) of s_ => SOME s_ )
+ if ((string_startswith s230_0 "ft7")) then
+ (case ((string_drop s230_0 ((string_length "ft7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10690,8 +11228,8 @@ val _ = Define `
val _ = Define `
((s224_:string ->(string)option) s225_0=
(let s226_0 = s225_0 in
- if ((string_startswith s226_0 "utval")) then
- (case ((string_drop s226_0 ((string_length "utval")))) of s_ => SOME s_ )
+ if ((string_startswith s226_0 "ft6")) then
+ (case ((string_drop s226_0 ((string_length "ft6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10700,8 +11238,8 @@ val _ = Define `
val _ = Define `
((s220_:string ->(string)option) s221_0=
(let s222_0 = s221_0 in
- if ((string_startswith s222_0 "ucause")) then
- (case ((string_drop s222_0 ((string_length "ucause")))) of s_ => SOME s_ )
+ if ((string_startswith s222_0 "ft5")) then
+ (case ((string_drop s222_0 ((string_length "ft5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10710,8 +11248,8 @@ val _ = Define `
val _ = Define `
((s216_:string ->(string)option) s217_0=
(let s218_0 = s217_0 in
- if ((string_startswith s218_0 "uepc")) then
- (case ((string_drop s218_0 ((string_length "uepc")))) of s_ => SOME s_ )
+ if ((string_startswith s218_0 "ft4")) then
+ (case ((string_drop s218_0 ((string_length "ft4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10720,10 +11258,8 @@ val _ = Define `
val _ = Define `
((s212_:string ->(string)option) s213_0=
(let s214_0 = s213_0 in
- if ((string_startswith s214_0 "uscratch")) then
- (case ((string_drop s214_0 ((string_length "uscratch")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s214_0 "ft3")) then
+ (case ((string_drop s214_0 ((string_length "ft3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10732,8 +11268,8 @@ val _ = Define `
val _ = Define `
((s208_:string ->(string)option) s209_0=
(let s210_0 = s209_0 in
- if ((string_startswith s210_0 "utvec")) then
- (case ((string_drop s210_0 ((string_length "utvec")))) of s_ => SOME s_ )
+ if ((string_startswith s210_0 "ft2")) then
+ (case ((string_drop s210_0 ((string_length "ft2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10742,8 +11278,8 @@ val _ = Define `
val _ = Define `
((s204_:string ->(string)option) s205_0=
(let s206_0 = s205_0 in
- if ((string_startswith s206_0 "uie")) then
- (case ((string_drop s206_0 ((string_length "uie")))) of s_ => SOME s_ )
+ if ((string_startswith s206_0 "ft1")) then
+ (case ((string_drop s206_0 ((string_length "ft1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10752,1081 +11288,2790 @@ val _ = Define `
val _ = Define `
((s200_:string ->(string)option) s201_0=
(let s202_0 = s201_0 in
- if ((string_startswith s202_0 "ustatus")) then
- (case ((string_drop s202_0 ((string_length "ustatus")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s202_0 "ft0")) then
+ (case ((string_drop s202_0 ((string_length "ft0")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
- ((csr_name_map_matches_prefix:string ->((12)words$word#int)option) arg_=
+ ((freg_name_abi_matches_prefix:string ->((5)words$word#int)option) arg_=
(let s203_0 = arg_ in
if ((case ((s200_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s200_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s204_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s204_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s208_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s208_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s212_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s212_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s216_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s216_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s220_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s220_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s224_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s224_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s228_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s228_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s232_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s232_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s236_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s236_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s240_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s240_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s244_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s244_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s248_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s248_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s252_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s252_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s256_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s256_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s260_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s260_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s264_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s264_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s268_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s268_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s272_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s272_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s276_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s276_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s280_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s280_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s284_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s284_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s288_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s288_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s292_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s292_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s296_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s296_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s300_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s300_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s304_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s304_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s308_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s308_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s312_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s312_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s316_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s316_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s320_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s320_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s324_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s324_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s328_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s328_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s332_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s332_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s336_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s336_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s340_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s340_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s344_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s344_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s348_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s348_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s352_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s352_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s356_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s356_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s360_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s360_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
- )
- else if ((case ((s364_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s364_ s203_0 of
+ else NONE))`;
+
+
+(*val freg_name_forwards : mword ty5 -> M string*)
+
+(*val freg_name_backwards : string -> M (mword ty5)*)
+
+(*val freg_name_forwards_matches : mword ty5 -> bool*)
+
+(*val freg_name_backwards_matches : string -> bool*)
+
+(*val freg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
+val _ = Define `
+ ((freg_name_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "ft0"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ft1"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "ft2"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "ft3"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "ft4"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "ft5"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "ft6"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "ft7"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fs0"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "fs1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "fa0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "fa1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "fa2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "fa3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "fa4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "fa5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "fa6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "fa7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "fs2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "fs3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "fs4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "fs5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "fs6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "fs7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "fs8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "fs9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "fs10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "fs11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "ft8"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "ft9"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "ft10"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "ft11"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ft1"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "ft2"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "ft3"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "ft4"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "ft5"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "ft6"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "ft7"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fs0"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "fs1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "fa0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "fa1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "fa2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "fa3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "fa4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "fa5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "fa6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "fa7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "fs2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "fs3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "fs4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "fs5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "fs6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "fs7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "fs8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "fs9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "fs10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "fs11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "ft8"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "ft9"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "ft10"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "ft11"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_forwards_matches:(5)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
+ else F))`;
+
+
+val _ = Define `
+ ((freg_name_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then T
+ else if (((p0_ = "ft1"))) then T
+ else if (((p0_ = "ft2"))) then T
+ else if (((p0_ = "ft3"))) then T
+ else if (((p0_ = "ft4"))) then T
+ else if (((p0_ = "ft5"))) then T
+ else if (((p0_ = "ft6"))) then T
+ else if (((p0_ = "ft7"))) then T
+ else if (((p0_ = "fs0"))) then T
+ else if (((p0_ = "fs1"))) then T
+ else if (((p0_ = "fa0"))) then T
+ else if (((p0_ = "fa1"))) then T
+ else if (((p0_ = "fa2"))) then T
+ else if (((p0_ = "fa3"))) then T
+ else if (((p0_ = "fa4"))) then T
+ else if (((p0_ = "fa5"))) then T
+ else if (((p0_ = "fa6"))) then T
+ else if (((p0_ = "fa7"))) then T
+ else if (((p0_ = "fs2"))) then T
+ else if (((p0_ = "fs3"))) then T
+ else if (((p0_ = "fs4"))) then T
+ else if (((p0_ = "fs5"))) then T
+ else if (((p0_ = "fs6"))) then T
+ else if (((p0_ = "fs7"))) then T
+ else if (((p0_ = "fs8"))) then T
+ else if (((p0_ = "fs9"))) then T
+ else if (((p0_ = "fs10"))) then T
+ else if (((p0_ = "fs11"))) then T
+ else if (((p0_ = "ft8"))) then T
+ else if (((p0_ = "ft9"))) then T
+ else if (((p0_ = "ft10"))) then T
+ else if (((p0_ = "ft11"))) then T
+ else F))`;
+
+
+(*val _s452_ : string -> maybe string*)
+
+val _ = Define `
+ ((s452_:string ->(string)option) s453_0=
+ (let s454_0 = s453_0 in
+ if ((string_startswith s454_0 "ft11")) then
+ (case ((string_drop s454_0 ((string_length "ft11")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s448_ : string -> maybe string*)
+
+val _ = Define `
+ ((s448_:string ->(string)option) s449_0=
+ (let s450_0 = s449_0 in
+ if ((string_startswith s450_0 "ft10")) then
+ (case ((string_drop s450_0 ((string_length "ft10")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s444_ : string -> maybe string*)
+
+val _ = Define `
+ ((s444_:string ->(string)option) s445_0=
+ (let s446_0 = s445_0 in
+ if ((string_startswith s446_0 "ft9")) then
+ (case ((string_drop s446_0 ((string_length "ft9")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s440_ : string -> maybe string*)
+
+val _ = Define `
+ ((s440_:string ->(string)option) s441_0=
+ (let s442_0 = s441_0 in
+ if ((string_startswith s442_0 "ft8")) then
+ (case ((string_drop s442_0 ((string_length "ft8")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s436_ : string -> maybe string*)
+
+val _ = Define `
+ ((s436_:string ->(string)option) s437_0=
+ (let s438_0 = s437_0 in
+ if ((string_startswith s438_0 "fs11")) then
+ (case ((string_drop s438_0 ((string_length "fs11")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s432_ : string -> maybe string*)
+
+val _ = Define `
+ ((s432_:string ->(string)option) s433_0=
+ (let s434_0 = s433_0 in
+ if ((string_startswith s434_0 "fs10")) then
+ (case ((string_drop s434_0 ((string_length "fs10")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s428_ : string -> maybe string*)
+
+val _ = Define `
+ ((s428_:string ->(string)option) s429_0=
+ (let s430_0 = s429_0 in
+ if ((string_startswith s430_0 "fs9")) then
+ (case ((string_drop s430_0 ((string_length "fs9")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s424_ : string -> maybe string*)
+
+val _ = Define `
+ ((s424_:string ->(string)option) s425_0=
+ (let s426_0 = s425_0 in
+ if ((string_startswith s426_0 "fs8")) then
+ (case ((string_drop s426_0 ((string_length "fs8")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s420_ : string -> maybe string*)
+
+val _ = Define `
+ ((s420_:string ->(string)option) s421_0=
+ (let s422_0 = s421_0 in
+ if ((string_startswith s422_0 "fs7")) then
+ (case ((string_drop s422_0 ((string_length "fs7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s416_ : string -> maybe string*)
+
+val _ = Define `
+ ((s416_:string ->(string)option) s417_0=
+ (let s418_0 = s417_0 in
+ if ((string_startswith s418_0 "fs6")) then
+ (case ((string_drop s418_0 ((string_length "fs6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s412_ : string -> maybe string*)
+
+val _ = Define `
+ ((s412_:string ->(string)option) s413_0=
+ (let s414_0 = s413_0 in
+ if ((string_startswith s414_0 "fs5")) then
+ (case ((string_drop s414_0 ((string_length "fs5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s408_ : string -> maybe string*)
+
+val _ = Define `
+ ((s408_:string ->(string)option) s409_0=
+ (let s410_0 = s409_0 in
+ if ((string_startswith s410_0 "fs4")) then
+ (case ((string_drop s410_0 ((string_length "fs4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s404_ : string -> maybe string*)
+
+val _ = Define `
+ ((s404_:string ->(string)option) s405_0=
+ (let s406_0 = s405_0 in
+ if ((string_startswith s406_0 "fs3")) then
+ (case ((string_drop s406_0 ((string_length "fs3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s400_ : string -> maybe string*)
+
+val _ = Define `
+ ((s400_:string ->(string)option) s401_0=
+ (let s402_0 = s401_0 in
+ if ((string_startswith s402_0 "fs2")) then
+ (case ((string_drop s402_0 ((string_length "fs2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s396_ : string -> maybe string*)
+
+val _ = Define `
+ ((s396_:string ->(string)option) s397_0=
+ (let s398_0 = s397_0 in
+ if ((string_startswith s398_0 "fa7")) then
+ (case ((string_drop s398_0 ((string_length "fa7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s392_ : string -> maybe string*)
+
+val _ = Define `
+ ((s392_:string ->(string)option) s393_0=
+ (let s394_0 = s393_0 in
+ if ((string_startswith s394_0 "fa6")) then
+ (case ((string_drop s394_0 ((string_length "fa6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s388_ : string -> maybe string*)
+
+val _ = Define `
+ ((s388_:string ->(string)option) s389_0=
+ (let s390_0 = s389_0 in
+ if ((string_startswith s390_0 "fa5")) then
+ (case ((string_drop s390_0 ((string_length "fa5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s384_ : string -> maybe string*)
+
+val _ = Define `
+ ((s384_:string ->(string)option) s385_0=
+ (let s386_0 = s385_0 in
+ if ((string_startswith s386_0 "fa4")) then
+ (case ((string_drop s386_0 ((string_length "fa4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s380_ : string -> maybe string*)
+
+val _ = Define `
+ ((s380_:string ->(string)option) s381_0=
+ (let s382_0 = s381_0 in
+ if ((string_startswith s382_0 "fa3")) then
+ (case ((string_drop s382_0 ((string_length "fa3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s376_ : string -> maybe string*)
+
+val _ = Define `
+ ((s376_:string ->(string)option) s377_0=
+ (let s378_0 = s377_0 in
+ if ((string_startswith s378_0 "fa2")) then
+ (case ((string_drop s378_0 ((string_length "fa2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s372_ : string -> maybe string*)
+
+val _ = Define `
+ ((s372_:string ->(string)option) s373_0=
+ (let s374_0 = s373_0 in
+ if ((string_startswith s374_0 "fa1")) then
+ (case ((string_drop s374_0 ((string_length "fa1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s368_ : string -> maybe string*)
+
+val _ = Define `
+ ((s368_:string ->(string)option) s369_0=
+ (let s370_0 = s369_0 in
+ if ((string_startswith s370_0 "fa0")) then
+ (case ((string_drop s370_0 ((string_length "fa0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s364_ : string -> maybe string*)
+
+val _ = Define `
+ ((s364_:string ->(string)option) s365_0=
+ (let s366_0 = s365_0 in
+ if ((string_startswith s366_0 "fs1")) then
+ (case ((string_drop s366_0 ((string_length "fs1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s360_ : string -> maybe string*)
+
+val _ = Define `
+ ((s360_:string ->(string)option) s361_0=
+ (let s362_0 = s361_0 in
+ if ((string_startswith s362_0 "fs0")) then
+ (case ((string_drop s362_0 ((string_length "fs0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s356_ : string -> maybe string*)
+
+val _ = Define `
+ ((s356_:string ->(string)option) s357_0=
+ (let s358_0 = s357_0 in
+ if ((string_startswith s358_0 "ft7")) then
+ (case ((string_drop s358_0 ((string_length "ft7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s352_ : string -> maybe string*)
+
+val _ = Define `
+ ((s352_:string ->(string)option) s353_0=
+ (let s354_0 = s353_0 in
+ if ((string_startswith s354_0 "ft6")) then
+ (case ((string_drop s354_0 ((string_length "ft6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s348_ : string -> maybe string*)
+
+val _ = Define `
+ ((s348_:string ->(string)option) s349_0=
+ (let s350_0 = s349_0 in
+ if ((string_startswith s350_0 "ft5")) then
+ (case ((string_drop s350_0 ((string_length "ft5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s344_ : string -> maybe string*)
+
+val _ = Define `
+ ((s344_:string ->(string)option) s345_0=
+ (let s346_0 = s345_0 in
+ if ((string_startswith s346_0 "ft4")) then
+ (case ((string_drop s346_0 ((string_length "ft4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s340_ : string -> maybe string*)
+
+val _ = Define `
+ ((s340_:string ->(string)option) s341_0=
+ (let s342_0 = s341_0 in
+ if ((string_startswith s342_0 "ft3")) then
+ (case ((string_drop s342_0 ((string_length "ft3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s336_ : string -> maybe string*)
+
+val _ = Define `
+ ((s336_:string ->(string)option) s337_0=
+ (let s338_0 = s337_0 in
+ if ((string_startswith s338_0 "ft2")) then
+ (case ((string_drop s338_0 ((string_length "ft2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s332_ : string -> maybe string*)
+
+val _ = Define `
+ ((s332_:string ->(string)option) s333_0=
+ (let s334_0 = s333_0 in
+ if ((string_startswith s334_0 "ft1")) then
+ (case ((string_drop s334_0 ((string_length "ft1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s328_ : string -> maybe string*)
+
+val _ = Define `
+ ((s328_:string ->(string)option) s329_0=
+ (let s330_0 = s329_0 in
+ if ((string_startswith s330_0 "ft0")) then
+ (case ((string_drop s330_0 ((string_length "ft0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((freg_name_matches_prefix:string ->((5)words$word#int)option) arg_=
+ (let s331_0 = arg_ in
+ if ((case ((s328_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s328_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s368_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s368_ s203_0 of
+ else if ((case ((s332_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s332_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s372_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s372_ s203_0 of
+ else if ((case ((s336_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s336_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s376_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s376_ s203_0 of
+ else if ((case ((s340_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s340_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s380_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s380_ s203_0 of
+ else if ((case ((s344_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s344_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s384_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s384_ s203_0 of
+ else if ((case ((s348_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s348_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s388_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s388_ s203_0 of
+ else if ((case ((s352_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s352_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s392_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s392_ s203_0 of
+ else if ((case ((s356_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s356_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s396_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s396_ s203_0 of
+ else if ((case ((s360_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s360_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s400_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s400_ s203_0 of
+ else if ((case ((s364_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s364_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s404_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s404_ s203_0 of
+ else if ((case ((s368_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s368_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s408_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s408_ s203_0 of
+ else if ((case ((s372_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s372_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s412_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s412_ s203_0 of
+ else if ((case ((s376_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s376_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s416_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s416_ s203_0 of
+ else if ((case ((s380_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s380_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s420_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s420_ s203_0 of
+ else if ((case ((s384_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s384_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s424_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s424_ s203_0 of
+ else if ((case ((s388_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s388_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s428_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s428_ s203_0 of
+ else if ((case ((s392_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s392_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s432_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s432_ s203_0 of
+ else if ((case ((s396_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s396_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s436_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s436_ s203_0 of
+ else if ((case ((s400_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s400_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s440_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s440_ s203_0 of
+ else if ((case ((s404_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s404_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s444_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s444_ s203_0 of
+ else if ((case ((s408_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s408_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s448_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s448_ s203_0 of
+ else if ((case ((s412_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s412_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s452_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s452_ s203_0 of
+ else if ((case ((s416_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s416_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s456_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s456_ s203_0 of
+ else if ((case ((s420_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s420_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s460_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s460_ s203_0 of
+ else if ((case ((s424_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s424_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s464_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s464_ s203_0 of
+ else if ((case ((s428_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s428_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s468_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s468_ s203_0 of
+ else if ((case ((s432_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s432_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s472_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s472_ s203_0 of
+ else if ((case ((s436_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s436_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s476_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s476_ s203_0 of
+ else if ((case ((s440_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s440_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s480_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s480_ s203_0 of
+ else if ((case ((s444_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s444_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s484_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s484_ s203_0 of
+ else if ((case ((s448_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s448_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s488_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s488_ s203_0 of
+ else if ((case ((s452_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s452_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
-(*val Mk_Ustatus : mword ty32 -> Ustatus*)
+(*val init_fdext_regs : unit -> M unit*)
val _ = Define `
- ((Mk_Ustatus:(32)words$word -> Ustatus) v=
- (<| Ustatus_Ustatus_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+ ((init_fdext_regs:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS f0_ref zero_freg)
+ (sail2_state_monad$write_regS f1_ref zero_freg))
+ (sail2_state_monad$write_regS f2_ref zero_freg))
+ (sail2_state_monad$write_regS f3_ref zero_freg))
+ (sail2_state_monad$write_regS f4_ref zero_freg))
+ (sail2_state_monad$write_regS f5_ref zero_freg))
+ (sail2_state_monad$write_regS f6_ref zero_freg))
+ (sail2_state_monad$write_regS f7_ref zero_freg))
+ (sail2_state_monad$write_regS f8_ref zero_freg))
+ (sail2_state_monad$write_regS f9_ref zero_freg))
+ (sail2_state_monad$write_regS f10_ref zero_freg))
+ (sail2_state_monad$write_regS f11_ref zero_freg))
+ (sail2_state_monad$write_regS f12_ref zero_freg))
+ (sail2_state_monad$write_regS f13_ref zero_freg))
+ (sail2_state_monad$write_regS f14_ref zero_freg))
+ (sail2_state_monad$write_regS f15_ref zero_freg))
+ (sail2_state_monad$write_regS f16_ref zero_freg))
+ (sail2_state_monad$write_regS f17_ref zero_freg))
+ (sail2_state_monad$write_regS f18_ref zero_freg))
+ (sail2_state_monad$write_regS f19_ref zero_freg))
+ (sail2_state_monad$write_regS f20_ref zero_freg))
+ (sail2_state_monad$write_regS f21_ref zero_freg))
+ (sail2_state_monad$write_regS f22_ref zero_freg))
+ (sail2_state_monad$write_regS f23_ref zero_freg))
+ (sail2_state_monad$write_regS f24_ref zero_freg))
+ (sail2_state_monad$write_regS f25_ref zero_freg))
+ (sail2_state_monad$write_regS f26_ref zero_freg))
+ (sail2_state_monad$write_regS f27_ref zero_freg))
+ (sail2_state_monad$write_regS f28_ref zero_freg))
+ (sail2_state_monad$write_regS f29_ref zero_freg)) (sail2_state_monad$write_regS f30_ref zero_freg)) (sail2_state_monad$write_regS f31_ref zero_freg)))`;
-(*val _get_Ustatus_bits : Ustatus -> mword ty32*)
+(*val Mk_Fcsr : mword ty32 -> Fcsr*)
val _ = Define `
- ((get_Ustatus_bits:Ustatus ->(32)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+ ((Mk_Fcsr:(32)words$word -> Fcsr) v= (<| Fcsr_Fcsr_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _set_Ustatus_bits : register_ref regstate register_value Ustatus -> mword ty32 -> M unit*)
+val _ = Define `
+ ((get_Fcsr_bits:Fcsr ->(32)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
val _ = Define `
- ((set_Ustatus_bits:((regstate),(register_value),(Ustatus))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ ((set_Fcsr_bits:((regstate),(register_value),(Fcsr))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Ustatus_bits : Ustatus -> mword ty32 -> Ustatus*)
-
val _ = Define `
- ((update_Ustatus_bits:Ustatus ->(32)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((update_Fcsr_bits:Fcsr ->(32)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _get_Fcsr_FRM : Fcsr -> mword ty3*)
+
val _ = Define `
- ((get_Ustatus_UPIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+ ((get_Fcsr_FRM:Fcsr ->(3)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii) : 3 words$word)))`;
+
+(*val _set_Fcsr_FRM : register_ref regstate register_value Fcsr -> mword ty3 -> M unit*)
val _ = Define `
- ((set_Ustatus_UPIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ ((set_Fcsr_FRM:((regstate),(register_value),(Fcsr))register_ref ->(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec v (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
+(*val _update_Fcsr_FRM : Fcsr -> mword ty3 -> Fcsr*)
+
val _ = Define `
- ((update_Ustatus_UPIE:Ustatus ->(1)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ ((update_Fcsr_FRM:Fcsr ->(3)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec x (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ : 32 words$word)) |>)))`;
+
+(*val _get_Fcsr_FFLAGS : Fcsr -> mword ty5*)
val _ = Define `
- ((get_Ustatus_UIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+ ((get_Fcsr_FFLAGS:Fcsr ->(5)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))`;
+
+(*val _set_Fcsr_FFLAGS : register_ref regstate register_value Fcsr -> mword ty5 -> M unit*)
val _ = Define `
- ((set_Ustatus_UIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ ((set_Fcsr_FFLAGS:((regstate),(register_value),(Fcsr))register_ref ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
+(*val _update_Fcsr_FFLAGS : Fcsr -> mword ty5 -> Fcsr*)
+
val _ = Define `
- ((update_Ustatus_UIE:Ustatus ->(1)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ ((update_Fcsr_FFLAGS:Fcsr ->(5)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
+ : 32 words$word)) |>)))`;
-(*val lower_sstatus : Sstatus -> Ustatus*)
+(*val ext_write_fcsr : mword ty3 -> mword ty5 -> M unit*)
val _ = Define `
- ((lower_sstatus:Sstatus -> Ustatus) s=
- (let u = (Mk_Ustatus ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
- let u = (update_Ustatus_UPIE u ((get_Sstatus_UPIE s : 1 words$word))) in
- update_Ustatus_UIE u ((get_Sstatus_UIE s : 1 words$word))))`;
+ ((ext_write_fcsr:(3)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) frm fflags= (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Fcsr_FRM fcsr_ref frm)
+ (set_Fcsr_FFLAGS fcsr_ref fflags)) (update_softfloat_fflags fflags)) (dirty_fd_context () )))`;
-(*val lift_ustatus : Sstatus -> Ustatus -> Sstatus*)
+(*val write_fflags : mword ty5 -> M unit*)
val _ = Define `
- ((lift_ustatus:Sstatus -> Ustatus -> Sstatus) (s : Sstatus) (u : Ustatus)=
- (let s = (update_Sstatus_UPIE s ((get_Ustatus_UPIE u : 1 words$word))) in
- update_Sstatus_UIE s ((get_Ustatus_UIE u : 1 words$word))))`;
+ ((write_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) fflags= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) . sail2_state_monad$seqS
+ (if (((((get_Fcsr_FFLAGS w__0 : 5 words$word)) <> fflags))) then dirty_fd_context ()
+ else sail2_state_monad$returnS () )
+ (set_Fcsr_FFLAGS fcsr_ref fflags))))`;
-(*val legalize_ustatus : Mstatus -> mword ty32 -> M Mstatus*)
+(*val accrue_fflags : mword ty5 -> M unit*)
val _ = Define `
- ((legalize_ustatus:Mstatus ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)=
- (let u = (Mk_Ustatus v) in
- let s = (lower_mstatus m) in
- let s = (lift_ustatus s u) in
- lift_sstatus m s))`;
+ ((accrue_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) flags= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) .
+ let f = ((or_vec ((get_Fcsr_FFLAGS w__0 : 5 words$word)) flags : 5 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__1 : Fcsr) .
+ if (((((get_Fcsr_FFLAGS w__1 : 5 words$word)) <> f))) then sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Fcsr_FFLAGS fcsr_ref f) (update_softfloat_fflags f)) (dirty_fd_context () )
+ else sail2_state_monad$returnS () ))))`;
-(*val Mk_Uinterrupts : mword ty32 -> Uinterrupts*)
+val _ = Define `
+ ((csr_name_map_forwards:(12)words$word -> string) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0x000w : 12 words$word)))) then "ustatus"
+ else if (((b__0 = (0x004w : 12 words$word)))) then "uie"
+ else if (((b__0 = (0x005w : 12 words$word)))) then "utvec"
+ else if (((b__0 = (0x040w : 12 words$word)))) then "uscratch"
+ else if (((b__0 = (0x041w : 12 words$word)))) then "uepc"
+ else if (((b__0 = (0x042w : 12 words$word)))) then "ucause"
+ else if (((b__0 = (0x043w : 12 words$word)))) then "utval"
+ else if (((b__0 = (0x044w : 12 words$word)))) then "uip"
+ else if (((b__0 = (0x001w : 12 words$word)))) then "fflags"
+ else if (((b__0 = (0x002w : 12 words$word)))) then "frm"
+ else if (((b__0 = (0x003w : 12 words$word)))) then "fcsr"
+ else if (((b__0 = (0xC00w : 12 words$word)))) then "cycle"
+ else if (((b__0 = (0xC01w : 12 words$word)))) then "time"
+ else if (((b__0 = (0xC02w : 12 words$word)))) then "instret"
+ else if (((b__0 = (0xC80w : 12 words$word)))) then "cycleh"
+ else if (((b__0 = (0xC81w : 12 words$word)))) then "timeh"
+ else if (((b__0 = (0xC82w : 12 words$word)))) then "instreth"
+ else if (((b__0 = (0x100w : 12 words$word)))) then "sstatus"
+ else if (((b__0 = (0x102w : 12 words$word)))) then "sedeleg"
+ else if (((b__0 = (0x103w : 12 words$word)))) then "sideleg"
+ else if (((b__0 = (0x104w : 12 words$word)))) then "sie"
+ else if (((b__0 = (0x105w : 12 words$word)))) then "stvec"
+ else if (((b__0 = (0x106w : 12 words$word)))) then "scounteren"
+ else if (((b__0 = (0x140w : 12 words$word)))) then "sscratch"
+ else if (((b__0 = (0x141w : 12 words$word)))) then "sepc"
+ else if (((b__0 = (0x142w : 12 words$word)))) then "scause"
+ else if (((b__0 = (0x143w : 12 words$word)))) then "stval"
+ else if (((b__0 = (0x144w : 12 words$word)))) then "sip"
+ else if (((b__0 = (0x180w : 12 words$word)))) then "satp"
+ else if (((b__0 = (0xF11w : 12 words$word)))) then "mvendorid"
+ else if (((b__0 = (0xF12w : 12 words$word)))) then "marchid"
+ else if (((b__0 = (0xF13w : 12 words$word)))) then "mimpid"
+ else if (((b__0 = (0xF14w : 12 words$word)))) then "mhartid"
+ else if (((b__0 = (0x300w : 12 words$word)))) then "mstatus"
+ else if (((b__0 = (0x301w : 12 words$word)))) then "misa"
+ else if (((b__0 = (0x302w : 12 words$word)))) then "medeleg"
+ else if (((b__0 = (0x303w : 12 words$word)))) then "mideleg"
+ else if (((b__0 = (0x304w : 12 words$word)))) then "mie"
+ else if (((b__0 = (0x305w : 12 words$word)))) then "mtvec"
+ else if (((b__0 = (0x306w : 12 words$word)))) then "mcounteren"
+ else if (((b__0 = (0x320w : 12 words$word)))) then "mcountinhibit"
+ else if (((b__0 = (0x340w : 12 words$word)))) then "mscratch"
+ else if (((b__0 = (0x341w : 12 words$word)))) then "mepc"
+ else if (((b__0 = (0x342w : 12 words$word)))) then "mcause"
+ else if (((b__0 = (0x343w : 12 words$word)))) then "mtval"
+ else if (((b__0 = (0x344w : 12 words$word)))) then "mip"
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then "pmpcfg0"
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then "pmpcfg1"
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then "pmpcfg2"
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then "pmpcfg3"
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then "pmpaddr0"
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then "pmpaddr1"
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then "pmpaddr2"
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then "pmpaddr3"
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then "pmpaddr4"
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then "pmpaddr5"
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then "pmpaddr6"
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then "pmpaddr7"
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then "pmpaddr8"
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then "pmpaddr9"
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then "pmpaddr10"
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then "pmpaddr11"
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then "pmpaddr12"
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then "pmpaddr13"
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then "pmpaddr14"
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then "pmpaddr15"
+ else if (((b__0 = (0xB00w : 12 words$word)))) then "mcycle"
+ else if (((b__0 = (0xB02w : 12 words$word)))) then "minstret"
+ else if (((b__0 = (0xB80w : 12 words$word)))) then "mcycleh"
+ else if (((b__0 = (0xB82w : 12 words$word)))) then "minstreth"
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then "tselect"
+ else if (((b__0 = (0x7A1w : 12 words$word)))) then "tdata1"
+ else if (((b__0 = (0x7A2w : 12 words$word)))) then "tdata2"
+ else if (((b__0 = (0x7A3w : 12 words$word)))) then "tdata3"
+ else decimal_string_of_bits b__0))`;
+
val _ = Define `
- ((Mk_Uinterrupts:(32)words$word -> Uinterrupts) v=
- (<| Uinterrupts_Uinterrupts_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+ ((csr_name_map_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ustatus"))) then sail2_state_monad$returnS (0x000w : 12 words$word)
+ else if (((p0_ = "uie"))) then sail2_state_monad$returnS (0x004w : 12 words$word)
+ else if (((p0_ = "utvec"))) then sail2_state_monad$returnS (0x005w : 12 words$word)
+ else if (((p0_ = "uscratch"))) then sail2_state_monad$returnS (0x040w : 12 words$word)
+ else if (((p0_ = "uepc"))) then sail2_state_monad$returnS (0x041w : 12 words$word)
+ else if (((p0_ = "ucause"))) then sail2_state_monad$returnS (0x042w : 12 words$word)
+ else if (((p0_ = "utval"))) then sail2_state_monad$returnS (0x043w : 12 words$word)
+ else if (((p0_ = "uip"))) then sail2_state_monad$returnS (0x044w : 12 words$word)
+ else if (((p0_ = "fflags"))) then sail2_state_monad$returnS (0x001w : 12 words$word)
+ else if (((p0_ = "frm"))) then sail2_state_monad$returnS (0x002w : 12 words$word)
+ else if (((p0_ = "fcsr"))) then sail2_state_monad$returnS (0x003w : 12 words$word)
+ else if (((p0_ = "cycle"))) then sail2_state_monad$returnS (0xC00w : 12 words$word)
+ else if (((p0_ = "time"))) then sail2_state_monad$returnS (0xC01w : 12 words$word)
+ else if (((p0_ = "instret"))) then sail2_state_monad$returnS (0xC02w : 12 words$word)
+ else if (((p0_ = "cycleh"))) then sail2_state_monad$returnS (0xC80w : 12 words$word)
+ else if (((p0_ = "timeh"))) then sail2_state_monad$returnS (0xC81w : 12 words$word)
+ else if (((p0_ = "instreth"))) then sail2_state_monad$returnS (0xC82w : 12 words$word)
+ else if (((p0_ = "sstatus"))) then sail2_state_monad$returnS (0x100w : 12 words$word)
+ else if (((p0_ = "sedeleg"))) then sail2_state_monad$returnS (0x102w : 12 words$word)
+ else if (((p0_ = "sideleg"))) then sail2_state_monad$returnS (0x103w : 12 words$word)
+ else if (((p0_ = "sie"))) then sail2_state_monad$returnS (0x104w : 12 words$word)
+ else if (((p0_ = "stvec"))) then sail2_state_monad$returnS (0x105w : 12 words$word)
+ else if (((p0_ = "scounteren"))) then sail2_state_monad$returnS (0x106w : 12 words$word)
+ else if (((p0_ = "sscratch"))) then sail2_state_monad$returnS (0x140w : 12 words$word)
+ else if (((p0_ = "sepc"))) then sail2_state_monad$returnS (0x141w : 12 words$word)
+ else if (((p0_ = "scause"))) then sail2_state_monad$returnS (0x142w : 12 words$word)
+ else if (((p0_ = "stval"))) then sail2_state_monad$returnS (0x143w : 12 words$word)
+ else if (((p0_ = "sip"))) then sail2_state_monad$returnS (0x144w : 12 words$word)
+ else if (((p0_ = "satp"))) then sail2_state_monad$returnS (0x180w : 12 words$word)
+ else if (((p0_ = "mvendorid"))) then sail2_state_monad$returnS (0xF11w : 12 words$word)
+ else if (((p0_ = "marchid"))) then sail2_state_monad$returnS (0xF12w : 12 words$word)
+ else if (((p0_ = "mimpid"))) then sail2_state_monad$returnS (0xF13w : 12 words$word)
+ else if (((p0_ = "mhartid"))) then sail2_state_monad$returnS (0xF14w : 12 words$word)
+ else if (((p0_ = "mstatus"))) then sail2_state_monad$returnS (0x300w : 12 words$word)
+ else if (((p0_ = "misa"))) then sail2_state_monad$returnS (0x301w : 12 words$word)
+ else if (((p0_ = "medeleg"))) then sail2_state_monad$returnS (0x302w : 12 words$word)
+ else if (((p0_ = "mideleg"))) then sail2_state_monad$returnS (0x303w : 12 words$word)
+ else if (((p0_ = "mie"))) then sail2_state_monad$returnS (0x304w : 12 words$word)
+ else if (((p0_ = "mtvec"))) then sail2_state_monad$returnS (0x305w : 12 words$word)
+ else if (((p0_ = "mcounteren"))) then sail2_state_monad$returnS (0x306w : 12 words$word)
+ else if (((p0_ = "mcountinhibit"))) then sail2_state_monad$returnS (0x320w : 12 words$word)
+ else if (((p0_ = "mscratch"))) then sail2_state_monad$returnS (0x340w : 12 words$word)
+ else if (((p0_ = "mepc"))) then sail2_state_monad$returnS (0x341w : 12 words$word)
+ else if (((p0_ = "mcause"))) then sail2_state_monad$returnS (0x342w : 12 words$word)
+ else if (((p0_ = "mtval"))) then sail2_state_monad$returnS (0x343w : 12 words$word)
+ else if (((p0_ = "mip"))) then sail2_state_monad$returnS (0x344w : 12 words$word)
+ else if (((p0_ = "pmpcfg0"))) then sail2_state_monad$returnS (0x3A0w : 12 words$word)
+ else if (((p0_ = "pmpcfg1"))) then sail2_state_monad$returnS (0x3A1w : 12 words$word)
+ else if (((p0_ = "pmpcfg2"))) then sail2_state_monad$returnS (0x3A2w : 12 words$word)
+ else if (((p0_ = "pmpcfg3"))) then sail2_state_monad$returnS (0x3A3w : 12 words$word)
+ else if (((p0_ = "pmpaddr0"))) then sail2_state_monad$returnS (0x3B0w : 12 words$word)
+ else if (((p0_ = "pmpaddr1"))) then sail2_state_monad$returnS (0x3B1w : 12 words$word)
+ else if (((p0_ = "pmpaddr2"))) then sail2_state_monad$returnS (0x3B2w : 12 words$word)
+ else if (((p0_ = "pmpaddr3"))) then sail2_state_monad$returnS (0x3B3w : 12 words$word)
+ else if (((p0_ = "pmpaddr4"))) then sail2_state_monad$returnS (0x3B4w : 12 words$word)
+ else if (((p0_ = "pmpaddr5"))) then sail2_state_monad$returnS (0x3B5w : 12 words$word)
+ else if (((p0_ = "pmpaddr6"))) then sail2_state_monad$returnS (0x3B6w : 12 words$word)
+ else if (((p0_ = "pmpaddr7"))) then sail2_state_monad$returnS (0x3B7w : 12 words$word)
+ else if (((p0_ = "pmpaddr8"))) then sail2_state_monad$returnS (0x3B8w : 12 words$word)
+ else if (((p0_ = "pmpaddr9"))) then sail2_state_monad$returnS (0x3B9w : 12 words$word)
+ else if (((p0_ = "pmpaddr10"))) then sail2_state_monad$returnS (0x3BAw : 12 words$word)
+ else if (((p0_ = "pmpaddr11"))) then sail2_state_monad$returnS (0x3BBw : 12 words$word)
+ else if (((p0_ = "pmpaddr12"))) then sail2_state_monad$returnS (0x3BCw : 12 words$word)
+ else if (((p0_ = "pmpaddr13"))) then sail2_state_monad$returnS (0x3BDw : 12 words$word)
+ else if (((p0_ = "pmpaddr14"))) then sail2_state_monad$returnS (0x3BEw : 12 words$word)
+ else if (((p0_ = "pmpaddr15"))) then sail2_state_monad$returnS (0x3BFw : 12 words$word)
+ else if (((p0_ = "mcycle"))) then sail2_state_monad$returnS (0xB00w : 12 words$word)
+ else if (((p0_ = "minstret"))) then sail2_state_monad$returnS (0xB02w : 12 words$word)
+ else if (((p0_ = "mcycleh"))) then sail2_state_monad$returnS (0xB80w : 12 words$word)
+ else if (((p0_ = "minstreth"))) then sail2_state_monad$returnS (0xB82w : 12 words$word)
+ else if (((p0_ = "tselect"))) then sail2_state_monad$returnS (0x7A0w : 12 words$word)
+ else if (((p0_ = "tdata1"))) then sail2_state_monad$returnS (0x7A1w : 12 words$word)
+ else if (((p0_ = "tdata2"))) then sail2_state_monad$returnS (0x7A2w : 12 words$word)
+ else if (((p0_ = "tdata3"))) then sail2_state_monad$returnS (0x7A3w : 12 words$word)
+ else if ((hex_bits_12_backwards_matches p0_)) then (hex_bits_12_backwards p0_ : ( 12 words$word) M)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val _get_Uinterrupts_bits : Uinterrupts -> mword ty32*)
+val _ = Define `
+ ((csr_name_map_forwards_matches:(12)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0x000w : 12 words$word)))) then T
+ else if (((b__0 = (0x004w : 12 words$word)))) then T
+ else if (((b__0 = (0x005w : 12 words$word)))) then T
+ else if (((b__0 = (0x040w : 12 words$word)))) then T
+ else if (((b__0 = (0x041w : 12 words$word)))) then T
+ else if (((b__0 = (0x042w : 12 words$word)))) then T
+ else if (((b__0 = (0x043w : 12 words$word)))) then T
+ else if (((b__0 = (0x044w : 12 words$word)))) then T
+ else if (((b__0 = (0x001w : 12 words$word)))) then T
+ else if (((b__0 = (0x002w : 12 words$word)))) then T
+ else if (((b__0 = (0x003w : 12 words$word)))) then T
+ else if (((b__0 = (0xC00w : 12 words$word)))) then T
+ else if (((b__0 = (0xC01w : 12 words$word)))) then T
+ else if (((b__0 = (0xC02w : 12 words$word)))) then T
+ else if (((b__0 = (0xC80w : 12 words$word)))) then T
+ else if (((b__0 = (0xC81w : 12 words$word)))) then T
+ else if (((b__0 = (0xC82w : 12 words$word)))) then T
+ else if (((b__0 = (0x100w : 12 words$word)))) then T
+ else if (((b__0 = (0x102w : 12 words$word)))) then T
+ else if (((b__0 = (0x103w : 12 words$word)))) then T
+ else if (((b__0 = (0x104w : 12 words$word)))) then T
+ else if (((b__0 = (0x105w : 12 words$word)))) then T
+ else if (((b__0 = (0x106w : 12 words$word)))) then T
+ else if (((b__0 = (0x140w : 12 words$word)))) then T
+ else if (((b__0 = (0x141w : 12 words$word)))) then T
+ else if (((b__0 = (0x142w : 12 words$word)))) then T
+ else if (((b__0 = (0x143w : 12 words$word)))) then T
+ else if (((b__0 = (0x144w : 12 words$word)))) then T
+ else if (((b__0 = (0x180w : 12 words$word)))) then T
+ else if (((b__0 = (0xF11w : 12 words$word)))) then T
+ else if (((b__0 = (0xF12w : 12 words$word)))) then T
+ else if (((b__0 = (0xF13w : 12 words$word)))) then T
+ else if (((b__0 = (0xF14w : 12 words$word)))) then T
+ else if (((b__0 = (0x300w : 12 words$word)))) then T
+ else if (((b__0 = (0x301w : 12 words$word)))) then T
+ else if (((b__0 = (0x302w : 12 words$word)))) then T
+ else if (((b__0 = (0x303w : 12 words$word)))) then T
+ else if (((b__0 = (0x304w : 12 words$word)))) then T
+ else if (((b__0 = (0x305w : 12 words$word)))) then T
+ else if (((b__0 = (0x306w : 12 words$word)))) then T
+ else if (((b__0 = (0x320w : 12 words$word)))) then T
+ else if (((b__0 = (0x340w : 12 words$word)))) then T
+ else if (((b__0 = (0x341w : 12 words$word)))) then T
+ else if (((b__0 = (0x342w : 12 words$word)))) then T
+ else if (((b__0 = (0x343w : 12 words$word)))) then T
+ else if (((b__0 = (0x344w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then T
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then T
+ else if (((b__0 = (0xB00w : 12 words$word)))) then T
+ else if (((b__0 = (0xB02w : 12 words$word)))) then T
+ else if (((b__0 = (0xB80w : 12 words$word)))) then T
+ else if (((b__0 = (0xB82w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A1w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A2w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A3w : 12 words$word)))) then T
+ else T))`;
+
val _ = Define `
- ((get_Uinterrupts_bits:Uinterrupts ->(32)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+ ((csr_name_map_backwards_matches:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ustatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "utvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "ucause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "utval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "fflags"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "frm"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "fcsr"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "cycle"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "time"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "instret"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "cycleh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "timeh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "instreth"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sstatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sedeleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sideleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "stvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "scounteren"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "scause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "stval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "satp"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mvendorid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "marchid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mimpid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mhartid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mstatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "misa"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "medeleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mideleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mtvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcounteren"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcountinhibit"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mtval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg0"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg3"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr0"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr3"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr4"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr5"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr6"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr7"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr8"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr9"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr10"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr11"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr12"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr13"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr14"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr15"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcycle"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "minstret"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcycleh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "minstreth"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tselect"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata3"))) then sail2_state_monad$returnS T
+ else if ((hex_bits_12_backwards_matches p0_)) then sail2_state_monad$bindS
+ (hex_bits_12_backwards p0_ : ( 12 words$word) M) (\ reg . sail2_state_monad$returnS T)
+ else sail2_state_monad$returnS F))`;
-(*val _set_Uinterrupts_bits : register_ref regstate register_value Uinterrupts -> mword ty32 -> M unit*)
+(*val _s752_ : string -> maybe ((mword ty12 * string))*)
val _ = Define `
- ((set_Uinterrupts_bits:((regstate),(register_value),(Uinterrupts))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s752_:string ->((12)words$word#string)option) s753_0=
+ ((case s753_0 of
+ s754_0 =>
+ (case ((hex_bits_12_matches_prefix0 s754_0 : (( 12 words$word # ii)) option)) of
+ SOME ((reg, s755_0)) =>
+ (case ((string_drop s754_0 s755_0)) of s_ => SOME (reg, s_) )
+ | _ => NONE
+ )
+ )))`;
-(*val _update_Uinterrupts_bits : Uinterrupts -> mword ty32 -> Uinterrupts*)
+(*val _s748_ : string -> maybe string*)
val _ = Define `
- ((update_Uinterrupts_bits:Uinterrupts ->(32)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ ((s748_:string ->(string)option) s749_0=
+ (let s750_0 = s749_0 in
+ if ((string_startswith s750_0 "tdata3")) then
+ (case ((string_drop s750_0 ((string_length "tdata3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+(*val _s744_ : string -> maybe string*)
val _ = Define `
- ((get_Uinterrupts_UEI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
+ ((s744_:string ->(string)option) s745_0=
+ (let s746_0 = s745_0 in
+ if ((string_startswith s746_0 "tdata2")) then
+ (case ((string_drop s746_0 ((string_length "tdata2")))) of s_ => SOME s_ )
+ else NONE))`;
+(*val _s740_ : string -> maybe string*)
+
val _ = Define `
- ((set_Uinterrupts_UEI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s740_:string ->(string)option) s741_0=
+ (let s742_0 = s741_0 in
+ if ((string_startswith s742_0 "tdata1")) then
+ (case ((string_drop s742_0 ((string_length "tdata1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+(*val _s736_ : string -> maybe string*)
val _ = Define `
- ((update_Uinterrupts_UEI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ ((s736_:string ->(string)option) s737_0=
+ (let s738_0 = s737_0 in
+ if ((string_startswith s738_0 "tselect")) then
+ (case ((string_drop s738_0 ((string_length "tselect")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s732_ : string -> maybe string*)
+
val _ = Define `
- ((get_Uinterrupts_UTI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+ ((s732_:string ->(string)option) s733_0=
+ (let s734_0 = s733_0 in
+ if ((string_startswith s734_0 "minstreth")) then
+ (case ((string_drop s734_0 ((string_length "minstreth")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+(*val _s728_ : string -> maybe string*)
val _ = Define `
- ((set_Uinterrupts_UTI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s728_:string ->(string)option) s729_0=
+ (let s730_0 = s729_0 in
+ if ((string_startswith s730_0 "mcycleh")) then
+ (case ((string_drop s730_0 ((string_length "mcycleh")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s724_ : string -> maybe string*)
+
val _ = Define `
- ((update_Uinterrupts_UTI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ ((s724_:string ->(string)option) s725_0=
+ (let s726_0 = s725_0 in
+ if ((string_startswith s726_0 "minstret")) then
+ (case ((string_drop s726_0 ((string_length "minstret")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s720_ : string -> maybe string*)
+
val _ = Define `
- ((get_Uinterrupts_USI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+ ((s720_:string ->(string)option) s721_0=
+ (let s722_0 = s721_0 in
+ if ((string_startswith s722_0 "mcycle")) then
+ (case ((string_drop s722_0 ((string_length "mcycle")))) of s_ => SOME s_ )
+ else NONE))`;
+
+(*val _s716_ : string -> maybe string*)
val _ = Define `
- ((set_Uinterrupts_USI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s716_:string ->(string)option) s717_0=
+ (let s718_0 = s717_0 in
+ if ((string_startswith s718_0 "pmpaddr15")) then
+ (case ((string_drop s718_0 ((string_length "pmpaddr15")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s712_ : string -> maybe string*)
+
val _ = Define `
- ((update_Uinterrupts_USI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ ((s712_:string ->(string)option) s713_0=
+ (let s714_0 = s713_0 in
+ if ((string_startswith s714_0 "pmpaddr14")) then
+ (case ((string_drop s714_0 ((string_length "pmpaddr14")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lower_sip : Sinterrupts -> Sinterrupts -> Uinterrupts*)
+(*val _s708_ : string -> maybe string*)
val _ = Define `
- ((lower_sip:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
- (let (u : Uinterrupts) =
- (Mk_Uinterrupts ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
- let u =
- (update_Uinterrupts_UEI u
- ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
- : 1 words$word))) in
- let u =
- (update_Uinterrupts_UTI u
- ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
- : 1 words$word))) in
- update_Uinterrupts_USI u
- ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
- : 1 words$word))))`;
+ ((s708_:string ->(string)option) s709_0=
+ (let s710_0 = s709_0 in
+ if ((string_startswith s710_0 "pmpaddr13")) then
+ (case ((string_drop s710_0 ((string_length "pmpaddr13")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lower_sie : Sinterrupts -> Sinterrupts -> Uinterrupts*)
+(*val _s704_ : string -> maybe string*)
val _ = Define `
- ((lower_sie:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
- (let (u : Uinterrupts) =
- (Mk_Uinterrupts ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))) in
- let u =
- (update_Uinterrupts_UEI u
- ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
- : 1 words$word))) in
- let u =
- (update_Uinterrupts_UTI u
- ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
- : 1 words$word))) in
- update_Uinterrupts_USI u
- ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
- : 1 words$word))))`;
+ ((s704_:string ->(string)option) s705_0=
+ (let s706_0 = s705_0 in
+ if ((string_startswith s706_0 "pmpaddr12")) then
+ (case ((string_drop s706_0 ((string_length "pmpaddr12")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lift_uip : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
+(*val _s700_ : string -> maybe string*)
val _ = Define `
- ((lift_uip:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
- (let (s : Sinterrupts) = o1 in
- if (((((get_Sinterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
- else s))`;
+ ((s700_:string ->(string)option) s701_0=
+ (let s702_0 = s701_0 in
+ if ((string_startswith s702_0 "pmpaddr11")) then
+ (case ((string_drop s702_0 ((string_length "pmpaddr11")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val legalize_uip : Sinterrupts -> Sinterrupts -> mword ty32 -> Sinterrupts*)
+(*val _s696_ : string -> maybe string*)
val _ = Define `
- ((legalize_uip:Sinterrupts -> Sinterrupts ->(32)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
- (lift_uip s d ((Mk_Uinterrupts v))))`;
+ ((s696_:string ->(string)option) s697_0=
+ (let s698_0 = s697_0 in
+ if ((string_startswith s698_0 "pmpaddr10")) then
+ (case ((string_drop s698_0 ((string_length "pmpaddr10")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lift_uie : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
+(*val _s692_ : string -> maybe string*)
val _ = Define `
- ((lift_uie:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
- (let (s : Sinterrupts) = o1 in
- let s =
- (if (((((get_Sinterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_UEI s ((get_Uinterrupts_UEI u : 1 words$word))
- else s) in
- let s =
- (if (((((get_Sinterrupts_UTI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_UTI s ((get_Uinterrupts_UTI u : 1 words$word))
- else s) in
- if (((((get_Sinterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
- else s))`;
+ ((s692_:string ->(string)option) s693_0=
+ (let s694_0 = s693_0 in
+ if ((string_startswith s694_0 "pmpaddr9")) then
+ (case ((string_drop s694_0 ((string_length "pmpaddr9")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val legalize_uie : Sinterrupts -> Sinterrupts -> mword ty32 -> Sinterrupts*)
+(*val _s688_ : string -> maybe string*)
val _ = Define `
- ((legalize_uie:Sinterrupts -> Sinterrupts ->(32)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
- (lift_uie s d ((Mk_Uinterrupts v))))`;
+ ((s688_:string ->(string)option) s689_0=
+ (let s690_0 = s689_0 in
+ if ((string_startswith s690_0 "pmpaddr8")) then
+ (case ((string_drop s690_0 ((string_length "pmpaddr8")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val handle_trap_extension : Privilege -> mword ty32 -> maybe unit -> unit*)
+(*val _s684_ : string -> maybe string*)
val _ = Define `
- ((handle_trap_extension:Privilege ->(32)words$word ->(unit)option -> unit) (p : Privilege) (pc : xlenbits) (u : unit option)= () )`;
+ ((s684_:string ->(string)option) s685_0=
+ (let s686_0 = s685_0 in
+ if ((string_startswith s686_0 "pmpaddr7")) then
+ (case ((string_drop s686_0 ((string_length "pmpaddr7")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val prepare_trap_vector : Privilege -> Mcause -> M (mword ty32)*)
+(*val _s680_ : string -> maybe string*)
val _ = Define `
- ((prepare_trap_vector:Privilege -> Mcause ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (p : Privilege) (cause : Mcause)= (sail2_state_monad$bindS
- (case p of
- Machine => sail2_state_monad$read_regS mtvec_ref
- | Supervisor => sail2_state_monad$read_regS stvec_ref
- | User => sail2_state_monad$read_regS utvec_ref
- ) (\ (tvec : Mtvec) .
- (case ((tvec_addr tvec cause : ( 32 words$word)option)) of
- SOME (epc) => sail2_state_monad$returnS epc
- | NONE => (internal_error "Invalid tvec mode" : ( 32 words$word) M)
- ))))`;
+ ((s680_:string ->(string)option) s681_0=
+ (let s682_0 = s681_0 in
+ if ((string_startswith s682_0 "pmpaddr6")) then
+ (case ((string_drop s682_0 ((string_length "pmpaddr6")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_xret_target : Privilege -> M (mword ty32)*)
+(*val _s676_ : string -> maybe string*)
val _ = Define `
- ((get_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
- ((case p of
- Machine => (sail2_state_monad$read_regS mepc_ref : ( 32 words$word) M)
- | Supervisor => (sail2_state_monad$read_regS sepc_ref : ( 32 words$word) M)
- | User => (sail2_state_monad$read_regS uepc_ref : ( 32 words$word) M)
- )))`;
+ ((s676_:string ->(string)option) s677_0=
+ (let s678_0 = s677_0 in
+ if ((string_startswith s678_0 "pmpaddr5")) then
+ (case ((string_drop s678_0 ((string_length "pmpaddr5")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val set_xret_target : Privilege -> mword ty32 -> M (mword ty32)*)
+(*val _s672_ : string -> maybe string*)
val _ = Define `
- ((set_xret_target:Privilege ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p value= (sail2_state_monad$bindS
- (legalize_xepc value : ( 32 words$word) M) (\ target . sail2_state_monad$seqS
- (case p of
- Machine => sail2_state_monad$write_regS mepc_ref target
- | Supervisor => sail2_state_monad$write_regS sepc_ref target
- | User => sail2_state_monad$write_regS uepc_ref target
- )
- (sail2_state_monad$returnS target))))`;
+ ((s672_:string ->(string)option) s673_0=
+ (let s674_0 = s673_0 in
+ if ((string_startswith s674_0 "pmpaddr4")) then
+ (case ((string_drop s674_0 ((string_length "pmpaddr4")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val prepare_xret_target : Privilege -> M (mword ty32)*)
+(*val _s668_ : string -> maybe string*)
val _ = Define `
- ((prepare_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p= ((get_xret_target p : ( 32 words$word) M)))`;
+ ((s668_:string ->(string)option) s669_0=
+ (let s670_0 = s669_0 in
+ if ((string_startswith s670_0 "pmpaddr3")) then
+ (case ((string_drop s670_0 ((string_length "pmpaddr3")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_mtvec : unit -> M (mword ty32)*)
+(*val _s664_ : string -> maybe string*)
val _ = Define `
- ((get_mtvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
+ ((s664_:string ->(string)option) s665_0=
+ (let s666_0 = s665_0 in
+ if ((string_startswith s666_0 "pmpaddr2")) then
+ (case ((string_drop s666_0 ((string_length "pmpaddr2")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_stvec : unit -> M (mword ty32)*)
+(*val _s660_ : string -> maybe string*)
val _ = Define `
- ((get_stvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
+ ((s660_:string ->(string)option) s661_0=
+ (let s662_0 = s661_0 in
+ if ((string_startswith s662_0 "pmpaddr1")) then
+ (case ((string_drop s662_0 ((string_length "pmpaddr1")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_utvec : unit -> M (mword ty32)*)
+(*val _s656_ : string -> maybe string*)
val _ = Define `
- ((get_utvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 32 words$word)))))`;
+ ((s656_:string ->(string)option) s657_0=
+ (let s658_0 = s657_0 in
+ if ((string_startswith s658_0 "pmpaddr0")) then
+ (case ((string_drop s658_0 ((string_length "pmpaddr0")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val set_mtvec : mword ty32 -> M (mword ty32)*)
+(*val _s652_ : string -> maybe string*)
val _ = Define `
- ((set_mtvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mtvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS mtvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
+ ((s652_:string ->(string)option) s653_0=
+ (let s654_0 = s653_0 in
+ if ((string_startswith s654_0 "pmpcfg3")) then
+ (case ((string_drop s654_0 ((string_length "pmpcfg3")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val set_stvec : mword ty32 -> M (mword ty32)*)
+(*val _s648_ : string -> maybe string*)
val _ = Define `
- ((set_stvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS stvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS stvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
+ ((s648_:string ->(string)option) s649_0=
+ (let s650_0 = s649_0 in
+ if ((string_startswith s650_0 "pmpcfg2")) then
+ (case ((string_drop s650_0 ((string_length "pmpcfg2")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val set_utvec : mword ty32 -> M (mword ty32)*)
+(*val _s644_ : string -> maybe string*)
val _ = Define `
- ((set_utvec:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS utvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS utvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 32 words$word))))))`;
+ ((s644_:string ->(string)option) s645_0=
+ (let s646_0 = s645_0 in
+ if ((string_startswith s646_0 "pmpcfg1")) then
+ (case ((string_drop s646_0 ((string_length "pmpcfg1")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val is_NExt_CSR_defined : mword ty12 -> Privilege -> M bool*)
+(*val _s640_ : string -> maybe string*)
val _ = Define `
- ((is_NExt_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : 12 bits) (p : Privilege)=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else sail2_state_monad$returnS F))`;
+ ((s640_:string ->(string)option) s641_0=
+ (let s642_0 = s641_0 in
+ if ((string_startswith s642_0 "pmpcfg0")) then
+ (case ((string_drop s642_0 ((string_length "pmpcfg0")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val read_NExt_CSR : mword ty12 -> M (maybe (mword ty32))*)
+(*val _s636_ : string -> maybe string*)
val _ = Define `
- ((read_NExt_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((32)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ ((s636_:string ->(string)option) s637_0=
+ (let s638_0 = s637_0 in
+ if ((string_startswith s638_0 "mip")) then
+ (case ((string_drop s638_0 ((string_length "mip")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s632_ : string -> maybe string*)
+
+val _ = Define `
+ ((s632_:string ->(string)option) s633_0=
+ (let s634_0 = s633_0 in
+ if ((string_startswith s634_0 "mtval")) then
+ (case ((string_drop s634_0 ((string_length "mtval")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s628_ : string -> maybe string*)
+
+val _ = Define `
+ ((s628_:string ->(string)option) s629_0=
+ (let s630_0 = s629_0 in
+ if ((string_startswith s630_0 "mcause")) then
+ (case ((string_drop s630_0 ((string_length "mcause")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s624_ : string -> maybe string*)
+
+val _ = Define `
+ ((s624_:string ->(string)option) s625_0=
+ (let s626_0 = s625_0 in
+ if ((string_startswith s626_0 "mepc")) then
+ (case ((string_drop s626_0 ((string_length "mepc")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s620_ : string -> maybe string*)
+
+val _ = Define `
+ ((s620_:string ->(string)option) s621_0=
+ (let s622_0 = s621_0 in
+ if ((string_startswith s622_0 "mscratch")) then
+ (case ((string_drop s622_0 ((string_length "mscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s616_ : string -> maybe string*)
+
+val _ = Define `
+ ((s616_:string ->(string)option) s617_0=
+ (let s618_0 = s617_0 in
+ if ((string_startswith s618_0 "mcountinhibit")) then
+ (case ((string_drop s618_0 ((string_length "mcountinhibit")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s612_ : string -> maybe string*)
+
+val _ = Define `
+ ((s612_:string ->(string)option) s613_0=
+ (let s614_0 = s613_0 in
+ if ((string_startswith s614_0 "mcounteren")) then
+ (case ((string_drop s614_0 ((string_length "mcounteren")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s608_ : string -> maybe string*)
+
+val _ = Define `
+ ((s608_:string ->(string)option) s609_0=
+ (let s610_0 = s609_0 in
+ if ((string_startswith s610_0 "mtvec")) then
+ (case ((string_drop s610_0 ((string_length "mtvec")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s604_ : string -> maybe string*)
+
+val _ = Define `
+ ((s604_:string ->(string)option) s605_0=
+ (let s606_0 = s605_0 in
+ if ((string_startswith s606_0 "mie")) then
+ (case ((string_drop s606_0 ((string_length "mie")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s600_ : string -> maybe string*)
+
+val _ = Define `
+ ((s600_:string ->(string)option) s601_0=
+ (let s602_0 = s601_0 in
+ if ((string_startswith s602_0 "mideleg")) then
+ (case ((string_drop s602_0 ((string_length "mideleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s596_ : string -> maybe string*)
+
+val _ = Define `
+ ((s596_:string ->(string)option) s597_0=
+ (let s598_0 = s597_0 in
+ if ((string_startswith s598_0 "medeleg")) then
+ (case ((string_drop s598_0 ((string_length "medeleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s592_ : string -> maybe string*)
+
+val _ = Define `
+ ((s592_:string ->(string)option) s593_0=
+ (let s594_0 = s593_0 in
+ if ((string_startswith s594_0 "misa")) then
+ (case ((string_drop s594_0 ((string_length "misa")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s588_ : string -> maybe string*)
+
+val _ = Define `
+ ((s588_:string ->(string)option) s589_0=
+ (let s590_0 = s589_0 in
+ if ((string_startswith s590_0 "mstatus")) then
+ (case ((string_drop s590_0 ((string_length "mstatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s584_ : string -> maybe string*)
+
+val _ = Define `
+ ((s584_:string ->(string)option) s585_0=
+ (let s586_0 = s585_0 in
+ if ((string_startswith s586_0 "mhartid")) then
+ (case ((string_drop s586_0 ((string_length "mhartid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s580_ : string -> maybe string*)
+
+val _ = Define `
+ ((s580_:string ->(string)option) s581_0=
+ (let s582_0 = s581_0 in
+ if ((string_startswith s582_0 "mimpid")) then
+ (case ((string_drop s582_0 ((string_length "mimpid")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s576_ : string -> maybe string*)
+
+val _ = Define `
+ ((s576_:string ->(string)option) s577_0=
+ (let s578_0 = s577_0 in
+ if ((string_startswith s578_0 "marchid")) then
+ (case ((string_drop s578_0 ((string_length "marchid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s572_ : string -> maybe string*)
+
+val _ = Define `
+ ((s572_:string ->(string)option) s573_0=
+ (let s574_0 = s573_0 in
+ if ((string_startswith s574_0 "mvendorid")) then
+ (case ((string_drop s574_0 ((string_length "mvendorid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s568_ : string -> maybe string*)
+
+val _ = Define `
+ ((s568_:string ->(string)option) s569_0=
+ (let s570_0 = s569_0 in
+ if ((string_startswith s570_0 "satp")) then
+ (case ((string_drop s570_0 ((string_length "satp")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s564_ : string -> maybe string*)
+
+val _ = Define `
+ ((s564_:string ->(string)option) s565_0=
+ (let s566_0 = s565_0 in
+ if ((string_startswith s566_0 "sip")) then
+ (case ((string_drop s566_0 ((string_length "sip")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s560_ : string -> maybe string*)
+
+val _ = Define `
+ ((s560_:string ->(string)option) s561_0=
+ (let s562_0 = s561_0 in
+ if ((string_startswith s562_0 "stval")) then
+ (case ((string_drop s562_0 ((string_length "stval")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s556_ : string -> maybe string*)
+
+val _ = Define `
+ ((s556_:string ->(string)option) s557_0=
+ (let s558_0 = s557_0 in
+ if ((string_startswith s558_0 "scause")) then
+ (case ((string_drop s558_0 ((string_length "scause")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s552_ : string -> maybe string*)
+
+val _ = Define `
+ ((s552_:string ->(string)option) s553_0=
+ (let s554_0 = s553_0 in
+ if ((string_startswith s554_0 "sepc")) then
+ (case ((string_drop s554_0 ((string_length "sepc")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s548_ : string -> maybe string*)
+
+val _ = Define `
+ ((s548_:string ->(string)option) s549_0=
+ (let s550_0 = s549_0 in
+ if ((string_startswith s550_0 "sscratch")) then
+ (case ((string_drop s550_0 ((string_length "sscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s544_ : string -> maybe string*)
+
+val _ = Define `
+ ((s544_:string ->(string)option) s545_0=
+ (let s546_0 = s545_0 in
+ if ((string_startswith s546_0 "scounteren")) then
+ (case ((string_drop s546_0 ((string_length "scounteren")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s540_ : string -> maybe string*)
+
+val _ = Define `
+ ((s540_:string ->(string)option) s541_0=
+ (let s542_0 = s541_0 in
+ if ((string_startswith s542_0 "stvec")) then
+ (case ((string_drop s542_0 ((string_length "stvec")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s536_ : string -> maybe string*)
+
+val _ = Define `
+ ((s536_:string ->(string)option) s537_0=
+ (let s538_0 = s537_0 in
+ if ((string_startswith s538_0 "sie")) then
+ (case ((string_drop s538_0 ((string_length "sie")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s532_ : string -> maybe string*)
+
+val _ = Define `
+ ((s532_:string ->(string)option) s533_0=
+ (let s534_0 = s533_0 in
+ if ((string_startswith s534_0 "sideleg")) then
+ (case ((string_drop s534_0 ((string_length "sideleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s528_ : string -> maybe string*)
+
+val _ = Define `
+ ((s528_:string ->(string)option) s529_0=
+ (let s530_0 = s529_0 in
+ if ((string_startswith s530_0 "sedeleg")) then
+ (case ((string_drop s530_0 ((string_length "sedeleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s524_ : string -> maybe string*)
+
+val _ = Define `
+ ((s524_:string ->(string)option) s525_0=
+ (let s526_0 = s525_0 in
+ if ((string_startswith s526_0 "sstatus")) then
+ (case ((string_drop s526_0 ((string_length "sstatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s520_ : string -> maybe string*)
+
+val _ = Define `
+ ((s520_:string ->(string)option) s521_0=
+ (let s522_0 = s521_0 in
+ if ((string_startswith s522_0 "instreth")) then
+ (case ((string_drop s522_0 ((string_length "instreth")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s516_ : string -> maybe string*)
+
+val _ = Define `
+ ((s516_:string ->(string)option) s517_0=
+ (let s518_0 = s517_0 in
+ if ((string_startswith s518_0 "timeh")) then
+ (case ((string_drop s518_0 ((string_length "timeh")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s512_ : string -> maybe string*)
+
+val _ = Define `
+ ((s512_:string ->(string)option) s513_0=
+ (let s514_0 = s513_0 in
+ if ((string_startswith s514_0 "cycleh")) then
+ (case ((string_drop s514_0 ((string_length "cycleh")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s508_ : string -> maybe string*)
+
+val _ = Define `
+ ((s508_:string ->(string)option) s509_0=
+ (let s510_0 = s509_0 in
+ if ((string_startswith s510_0 "instret")) then
+ (case ((string_drop s510_0 ((string_length "instret")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s504_ : string -> maybe string*)
+
+val _ = Define `
+ ((s504_:string ->(string)option) s505_0=
+ (let s506_0 = s505_0 in
+ if ((string_startswith s506_0 "time")) then
+ (case ((string_drop s506_0 ((string_length "time")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s500_ : string -> maybe string*)
+
+val _ = Define `
+ ((s500_:string ->(string)option) s501_0=
+ (let s502_0 = s501_0 in
+ if ((string_startswith s502_0 "cycle")) then
+ (case ((string_drop s502_0 ((string_length "cycle")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s496_ : string -> maybe string*)
+
+val _ = Define `
+ ((s496_:string ->(string)option) s497_0=
+ (let s498_0 = s497_0 in
+ if ((string_startswith s498_0 "fcsr")) then
+ (case ((string_drop s498_0 ((string_length "fcsr")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s492_ : string -> maybe string*)
+
+val _ = Define `
+ ((s492_:string ->(string)option) s493_0=
+ (let s494_0 = s493_0 in
+ if ((string_startswith s494_0 "frm")) then
+ (case ((string_drop s494_0 ((string_length "frm")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s488_ : string -> maybe string*)
+
+val _ = Define `
+ ((s488_:string ->(string)option) s489_0=
+ (let s490_0 = s489_0 in
+ if ((string_startswith s490_0 "fflags")) then
+ (case ((string_drop s490_0 ((string_length "fflags")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s484_ : string -> maybe string*)
+
+val _ = Define `
+ ((s484_:string ->(string)option) s485_0=
+ (let s486_0 = s485_0 in
+ if ((string_startswith s486_0 "uip")) then
+ (case ((string_drop s486_0 ((string_length "uip")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s480_ : string -> maybe string*)
+
+val _ = Define `
+ ((s480_:string ->(string)option) s481_0=
+ (let s482_0 = s481_0 in
+ if ((string_startswith s482_0 "utval")) then
+ (case ((string_drop s482_0 ((string_length "utval")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s476_ : string -> maybe string*)
+
+val _ = Define `
+ ((s476_:string ->(string)option) s477_0=
+ (let s478_0 = s477_0 in
+ if ((string_startswith s478_0 "ucause")) then
+ (case ((string_drop s478_0 ((string_length "ucause")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s472_ : string -> maybe string*)
+
+val _ = Define `
+ ((s472_:string ->(string)option) s473_0=
+ (let s474_0 = s473_0 in
+ if ((string_startswith s474_0 "uepc")) then
+ (case ((string_drop s474_0 ((string_length "uepc")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s468_ : string -> maybe string*)
+
+val _ = Define `
+ ((s468_:string ->(string)option) s469_0=
+ (let s470_0 = s469_0 in
+ if ((string_startswith s470_0 "uscratch")) then
+ (case ((string_drop s470_0 ((string_length "uscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s464_ : string -> maybe string*)
+
+val _ = Define `
+ ((s464_:string ->(string)option) s465_0=
+ (let s466_0 = s465_0 in
+ if ((string_startswith s466_0 "utvec")) then
+ (case ((string_drop s466_0 ((string_length "utvec")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s460_ : string -> maybe string*)
+
+val _ = Define `
+ ((s460_:string ->(string)option) s461_0=
+ (let s462_0 = s461_0 in
+ if ((string_startswith s462_0 "uie")) then
+ (case ((string_drop s462_0 ((string_length "uie")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s456_ : string -> maybe string*)
+
+val _ = Define `
+ ((s456_:string ->(string)option) s457_0=
+ (let s458_0 = s457_0 in
+ if ((string_startswith s458_0 "ustatus")) then
+ (case ((string_drop s458_0 ((string_length "ustatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((csr_name_map_matches_prefix:string ->((12)words$word#int)option) arg_=
+ (let s459_0 = arg_ in
+ if ((case ((s456_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s456_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x000w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s460_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s460_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x004w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s464_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s464_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x005w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s468_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s468_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x040w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s472_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s472_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x041w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s476_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s476_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x042w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s480_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s480_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x043w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s484_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s484_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x044w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s488_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s488_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x001w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s492_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s492_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x002w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s496_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s496_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x003w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s500_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s500_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC00w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s504_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s504_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC01w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s508_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s508_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC02w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s512_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s512_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC80w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s516_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s516_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC81w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s520_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s520_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC82w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s524_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s524_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x100w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s528_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s528_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x102w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s532_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s532_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x103w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s536_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s536_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x104w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s540_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s540_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x105w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s544_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s544_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x106w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s548_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s548_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x140w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s552_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s552_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x141w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s556_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s556_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x142w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s560_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s560_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x143w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s564_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s564_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x144w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s568_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s568_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x180w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s572_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s572_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF11w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s576_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s576_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF12w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s580_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s580_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF13w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s584_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s584_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF14w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s588_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s588_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x300w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s592_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s592_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x301w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s596_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s596_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x302w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s600_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s600_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x303w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s604_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s604_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x304w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s608_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s608_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x305w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s612_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s612_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x306w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s616_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s616_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x320w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s620_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s620_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x340w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s624_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s624_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x341w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s628_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s628_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x342w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s632_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s632_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x343w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s636_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s636_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x344w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s640_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s640_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s644_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s644_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s648_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s648_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s652_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s652_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s656_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s656_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s660_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s660_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s664_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s664_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s668_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s668_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s672_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s672_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B4w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s676_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s676_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B5w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s680_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s680_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B6w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s684_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s684_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B7w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s688_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s688_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B8w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s692_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s692_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B9w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s696_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s696_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BAw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s700_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s700_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BBw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s704_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s704_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BCw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s708_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s708_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BDw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s712_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s712_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BEw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s716_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s716_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BFw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s720_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s720_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB00w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s724_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s724_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB02w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s728_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s728_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB80w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s732_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s732_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB82w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s736_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s736_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s740_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s740_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s744_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s744_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s748_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s748_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s752_ s459_0 : (( 12 words$word # string))option)) of
+ SOME ((reg, s_)) => T
+ | _ => F
+ )) then (case (s752_ s459_0 : (( 12 words$word # string)) option) of
+ (SOME ((reg, s_))) =>
+ SOME (reg, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((csr_name:(12)words$word -> string) csr= (csr_name_map_forwards csr))`;
+
+
+val _ = Define `
+ ((ext_is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0 g__326=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else sail2_state_monad$returnS F))`;
+
+
+val _ = Define `
+ ((ext_read_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((32)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
sail2_state_monad$returnS (SOME ((get_Ustatus_bits ((lower_sstatus ((lower_mstatus w__0)))) : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__1 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__2 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS sideleg_ref) (\ (w__3 : Sinterrupts) .
sail2_state_monad$returnS (SOME ((get_Uinterrupts_bits ((lower_sie ((lower_mie w__1 w__2)) w__3)) : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state_monad$bindS
(get_utvec () : ( 32 words$word) M) (\ (w__4 : 32 words$word) . sail2_state_monad$returnS (SOME w__4))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS uscratch_ref : ( 32 words$word) M) (\ (w__5 : 32 words$word) . sail2_state_monad$returnS (SOME w__5))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state_monad$bindS
(get_xret_target User : ( 32 words$word) M) (\ (w__6 : 32 words$word) . sail2_state_monad$bindS
(pc_alignment_mask () : ( 32 words$word) M) (\ (w__7 : 32 words$word) .
sail2_state_monad$returnS (SOME ((and_vec w__6 w__7 : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS ucause_ref) (\ (w__8 : Mcause) .
sail2_state_monad$returnS (SOME ((get_Mcause_bits w__8 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS utval_ref : ( 32 words$word) M) (\ (w__9 : 32 words$word) . sail2_state_monad$returnS (SOME w__9))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mip_ref) (\ (w__10 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__11 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS sideleg_ref) (\ (w__12 : Sinterrupts) .
sail2_state_monad$returnS (SOME ((get_Uinterrupts_bits ((lower_sip ((lower_mip w__10 w__11)) w__12))
: 32 words$word))))))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__13 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_FFLAGS w__13 : 5 words$word)) : 32 words$word))))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__14 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_FRM w__14 : 3 words$word)) : 32 words$word))))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__15 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_bits w__15 : 32 words$word)) : 32 words$word))))
else sail2_state_monad$returnS NONE))`;
-(*val write_NExt_CSR : mword ty12 -> mword ty32 -> M bool*)
-
-val _ = Define `
- ((write_NExt_CSR:(12)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)=
- (let b__0 = csr in sail2_state_monad$bindS
- (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
- (legalize_ustatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mstatus_ref w__1)
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
- sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__3 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__4 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__5 : Sinterrupts) .
- let sie = (legalize_uie ((lower_mie w__3 w__4)) w__5 value) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) . sail2_state_monad$bindS
- (lift_sie w__6 w__7 sie) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mie_ref w__8)
- (sail2_state_monad$read_regS mie_ref)) (\ (w__9 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 32 words$word))))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_utvec value : ( 32 words$word) M) (\ (w__10 : 32 words$word) . sail2_state_monad$returnS (SOME w__10))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS uscratch_ref value)
- (sail2_state_monad$read_regS uscratch_ref : ( 32 words$word) M)) (\ (w__11 : 32 words$word) . sail2_state_monad$returnS (SOME w__11))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target User value : ( 32 words$word) M) (\ (w__12 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__12))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (set_Mcause_bits ucause_ref value)
- (sail2_state_monad$read_regS ucause_ref)) (\ (w__13 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__13 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS utval_ref value)
- (sail2_state_monad$read_regS utval_ref : ( 32 words$word) M)) (\ (w__14 : 32 words$word) . sail2_state_monad$returnS (SOME w__14))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__15 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__16 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__17 : Sinterrupts) .
- let sip = (legalize_uip ((lower_mip w__15 w__16)) w__17 value) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__18 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__19 : Minterrupts) . sail2_state_monad$bindS
- (lift_sip w__18 w__19 sip) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__20)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__21 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__21 : 32 words$word))))))))))
- else sail2_state_monad$returnS NONE) (\ (res : xlenbits option) .
- sail2_state_monad$returnS ((case res of
- SOME (v) =>
- let (_ : unit) =
- (if ((get_config_print_reg () )) then
- print_dbg
- ((STRCAT "CSR "
- ((STRCAT ((csr_name csr))
- ((STRCAT " <- "
- ((STRCAT ((string_of_bits v))
- ((STRCAT " (input: " ((STRCAT ((string_of_bits value)) ")"))))))))))))
- else () ) in
- T
- | NONE => F
- )))))`;
-
-
-(*val ext_is_CSR_defined : mword ty12 -> Privilege -> M bool*)
-
-val _ = Define `
- ((ext_is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)= (is_NExt_CSR_defined csr p))`;
-
-
-(*val ext_read_CSR : mword ty12 -> M (maybe (mword ty32))*)
-
val _ = Define `
- ((ext_read_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((32)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr= ((read_NExt_CSR csr : ( ( 32 words$word)option) M)))`;
-
-
-(*val ext_write_CSR : mword ty12 -> mword ty32 -> M bool*)
-
-val _ = Define `
- ((ext_write_CSR:(12)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)= (write_NExt_CSR csr value))`;
+ ((ext_write_CSR:(12)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((32)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0 value=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (legalize_ustatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mstatus_ref w__1)
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
+ sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 32 words$word))))))
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__3 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__4 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__5 : Sinterrupts) .
+ let sie = (legalize_uie ((lower_mie w__3 w__4)) w__5 value) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) . sail2_state_monad$bindS
+ (lift_sie w__6 w__7 sie) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mie_ref w__8)
+ (sail2_state_monad$read_regS mie_ref)) (\ (w__9 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 32 words$word))))))))))
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_utvec value : ( 32 words$word) M) (\ (w__10 : 32 words$word) . sail2_state_monad$returnS (SOME w__10))
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS uscratch_ref value)
+ (sail2_state_monad$read_regS uscratch_ref : ( 32 words$word) M)) (\ (w__11 : 32 words$word) . sail2_state_monad$returnS (SOME w__11))
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target User value : ( 32 words$word) M) (\ (w__12 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__12))
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (set_Mcause_bits ucause_ref value)
+ (sail2_state_monad$read_regS ucause_ref)) (\ (w__13 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__13 : 32 words$word))))
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS utval_ref value)
+ (sail2_state_monad$read_regS utval_ref : ( 32 words$word) M)) (\ (w__14 : 32 words$word) . sail2_state_monad$returnS (SOME w__14))
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__15 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__16 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__17 : Sinterrupts) .
+ let sip = (legalize_uip ((lower_mip w__15 w__16)) w__17 value) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__18 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__19 : Minterrupts) . sail2_state_monad$bindS
+ (lift_sip w__18 w__19 sip) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__20)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__21 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__21 : 32 words$word))))))))))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__22 : Fcsr) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((get_Fcsr_FRM w__22 : 3 words$word))
+ ((subrange_vec_dec value (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__23 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_FFLAGS w__23 : 5 words$word)) : 32 words$word)))))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__24 : Fcsr) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((subrange_vec_dec value (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ ((get_Fcsr_FFLAGS w__24 : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__25 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_FRM w__25 : 3 words$word)) : 32 words$word)))))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((subrange_vec_dec value (( 7 : int):ii) (( 5 : int):ii) : 3 words$word))
+ ((subrange_vec_dec value (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__26 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Fcsr_bits w__26 : 32 words$word)) : 32 words$word))))
+ else sail2_state_monad$returnS NONE))`;
(*val csrAccess : mword ty12 -> mword ty2*)
@@ -11846,136 +14091,92 @@ val _ = Define `
val _ = Define `
((is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)=
(let b__0 = csr in
- if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
+ if (((b__0 = (0xF11w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF12w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF13w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF14w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x302w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) (sail2_state$or_boolS ((haveSupMode () )) ((haveNExt () )))
+ else if (((b__0 = (0x303w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) (sail2_state$or_boolS ((haveSupMode () )) ((haveNExt () )))
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x305w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x306w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) ((haveUsrMode () ))
+ else if (((b__0 = (0x310w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x340w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x343w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB80w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0xB82w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x100w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x102w : 12 words$word)))) then
sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
+ (sail2_state$and_boolS ((haveNExt () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor))))))))
+ else if (((b__0 = (0x103w : 12 words$word)))) then
sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 32 : int):ii) = (( 32 : int):ii)))))))
+ (sail2_state$and_boolS ((haveNExt () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor))))))))
+ else if (((b__0 = (0x104w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x106w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x140w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x141w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x142w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x143w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x144w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0xC00w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC01w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC02w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC80w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii)))))
+ else if (((b__0 = (0xC81w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii)))))
+ else if (((b__0 = (0xC82w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii)))))
else ext_is_CSR_defined csr p))`;
@@ -11983,19 +14184,17 @@ val _ = Define `
val _ = Define `
((check_CSR_access:(2)words$word ->(2)words$word -> Privilege -> bool -> bool) csrrw csrpr p isWrite=
- (((~ ((((((isWrite = T))) /\ (((csrrw = (vec_of_bits [B1;B1] : 2 words$word))))))))) /\ ((zopz0zKzJ_u ((privLevel_to_bits p : 2 words$word)) csrpr))))`;
+ (((~ ((((((isWrite = T))) /\ (((csrrw = (0b11w : 2 words$word))))))))) /\ ((zopz0zKzJ_u ((privLevel_to_bits p : 2 words$word)) csrpr))))`;
(*val check_TVM_SATP : mword ty12 -> Privilege -> M bool*)
val _ = Define `
((check_TVM_SATP:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)= (sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((csr = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word))))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((csr = (0x180w : 12 words$word)))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((p = Supervisor))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_TVM w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ (w__2 :
+ sail2_state_monad$returnS (((((get_Mstatus_TVM w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ (w__2 :
bool) .
sail2_state_monad$returnS ((~ w__2)))))`;
@@ -12006,59 +14205,53 @@ val _ = Define `
((check_Counteren:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)=
((case (csr, p) of
(b__0, Supervisor) =>
- if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ if (((b__0 = (0xC00w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__0 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Counteren_CY w__0 : 1 words$word)) = (0b1w : 1 words$word)))))
+ else if (((b__0 = (0xC01w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__1 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__1 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Counteren_TM w__1 : 1 words$word)) = (0b1w : 1 words$word)))))
+ else if (((b__0 = (0xC02w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__2 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__2 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__2 : 1 words$word)) = (0b1w : 1 words$word)))))
else
sail2_state_monad$returnS ((case (b__0, Supervisor) of
(_, _) =>
- if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T
))
| (b__3, User) =>
- if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
+ if (((b__3 = (0xC00w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__6 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__6 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_CY w__6 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__7 : bool) . sail2_state_monad$returnS ((~ w__7))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__8 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__8 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- else if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
+ sail2_state_monad$returnS (((((get_Counteren_CY w__8 : 1 words$word)) = (0b1w : 1 words$word)))))))
+ else if (((b__3 = (0xC01w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__11 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__11 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_TM w__11 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__12 : bool) . sail2_state_monad$returnS ((~ w__12))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__13 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__13 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- else if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
+ sail2_state_monad$returnS (((((get_Counteren_TM w__13 : 1 words$word)) = (0b1w : 1 words$word)))))))
+ else if (((b__3 = (0xC02w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__16 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__16 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__16 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__17 : bool) . sail2_state_monad$returnS ((~ w__17))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__18 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__18 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__18 : 1 words$word)) = (0b1w : 1 words$word)))))))
else
sail2_state_monad$returnS ((case (b__3, User) of
(_, _) =>
- if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T
))
| (_, _) =>
- sail2_state_monad$returnS (if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ sail2_state_monad$returnS (if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T)
)))`;
@@ -12080,18 +14273,18 @@ val _ = Define `
((exception_delegatee:ExceptionType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (e : ExceptionType) (p : Privilege)=
(let idx = (num_of_ExceptionType e) in sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__0 : Medeleg) .
- let super = (access_vec_dec ((get_Medeleg_bits w__0 : 32 words$word)) idx) in sail2_state_monad$bindS
+ let super = (bit_to_bool ((access_vec_dec ((get_Medeleg_bits w__0 : 32 words$word)) idx))) in sail2_state_monad$bindS
(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$bindS
(if w__1 then
- sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool super)))
+ sail2_state$and_boolS (sail2_state_monad$returnS super)
(sail2_state$and_boolS ((haveNExt () ))
( sail2_state_monad$bindS(sail2_state_monad$read_regS sedeleg_ref) (\ (w__3 : Sedeleg) .
sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec ((get_Sedeleg_bits w__3 : 32 words$word)) idx)))))))
- else sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool super))) ((haveNExt () ))) (\ user . sail2_state_monad$bindS
+ else sail2_state$and_boolS (sail2_state_monad$returnS super) ((haveNExt () ))) (\ user . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS user)) (\ w__9 . sail2_state_monad$bindS
(if w__9 then sail2_state_monad$returnS User
else sail2_state_monad$bindS
- (sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((bit_to_bool super)))) (\ (w__11 : bool) .
+ (sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS super)) (\ w__11 .
sail2_state_monad$returnS (if w__11 then Supervisor
else Machine))) (\ deleg .
sail2_state_monad$returnS (if ((zopz0zI_u ((privLevel_to_bits deleg : 2 words$word))
@@ -12105,32 +14298,20 @@ val _ = Define `
val _ = Define `
((findPendingInterrupt:(32)words$word ->(InterruptType)option) ip=
(let ip = (Mk_Minterrupts ip) in
- if (((((get_Minterrupts_MEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- SOME I_M_External
- else if (((((get_Minterrupts_MSI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_MEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_M_External
+ else if (((((get_Minterrupts_MSI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_M_Software
- else if (((((get_Minterrupts_MTI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_M_Timer
- else if (((((get_Minterrupts_SEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_MTI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_M_Timer
+ else if (((((get_Minterrupts_SEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_S_External
- else if (((((get_Minterrupts_SSI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_SSI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_S_Software
- else if (((((get_Minterrupts_STI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_S_Timer
- else if (((((get_Minterrupts_UEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_STI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_S_Timer
+ else if (((((get_Minterrupts_UEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_U_External
- else if (((((get_Minterrupts_USI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_USI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_U_Software
- else if (((((get_Minterrupts_UTI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_U_Timer
+ else if (((((get_Minterrupts_UTI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_U_Timer
else NONE))`;
@@ -12144,11 +14325,9 @@ val _ = Define `
: 32 words$word))
: 32 words$word)) in
let effective_delg = ((and_vec ((get_Minterrupts_bits xip : 32 words$word)) xideleg : 32 words$word)) in
- if (((priv_enabled /\ (((effective_pend <> ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))))))
- then
+ if (((priv_enabled /\ (((effective_pend <> ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word)))))))) then
Ints_Pending effective_pend
- else if (((effective_delg <> ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word)))))
- then
+ else if (((effective_delg <> ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))) then
Ints_Delegated effective_delg
else Ints_Empty () ))`;
@@ -12165,28 +14344,22 @@ val _ = Define `
((and_vec ((get_Minterrupts_bits w__1 : 32 words$word))
((get_Minterrupts_bits w__2 : 32 words$word))
: 32 words$word)) in
- if (((effective_pending = ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word)))))
- then
+ if (((effective_pending = ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))) then
sail2_state_monad$returnS NONE
else sail2_state_monad$bindS
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) <> ((privLevel_to_bits Machine : 2 words$word))))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((priv <> Machine))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = Machine))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__3 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_MIE w__3 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ mIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_MIE w__3 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ mIE . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word))))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((priv = User))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = Supervisor))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__6 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_SIE w__6 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))))) (\ sIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_SIE w__6 : 1 words$word)) = (0b1w : 1 words$word))))))))) (\ sIE . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveNExt () ))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = User))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__10 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_UIE w__10 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ uIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_UIE w__10 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ uIE . sail2_state_monad$bindS
(sail2_state_monad$read_regS mip_ref) (\ (w__12 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__13 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__14 : Minterrupts) .
@@ -12228,7 +14401,7 @@ val _ = Define `
(sail2_state$and_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
( sail2_state_monad$bindS(haveNExt () ) (\ (w__2 : bool) . sail2_state_monad$returnS ((~ w__2)))))) (\ (w__4 : bool) .
if w__4 then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$assert_expS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) "invalid current privilege")
+ (sail2_state_monad$assert_expS (((priv = Machine))) "invalid current privilege")
(sail2_state_monad$read_regS mip_ref)) (\ (w__5 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) .
let enabled_pending =
@@ -12262,7 +14435,7 @@ val _ = Define `
((tval:((32)words$word)option ->(32)words$word) excinfo=
((case excinfo of
SOME (e) => e
- | NONE => (EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word)
+ | NONE => (EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word)
)))`;
@@ -12296,7 +14469,7 @@ val _ = Define `
(set_Mcause_Cause mcause_ref ((EXTZ (( 31 : int):ii) c : 31 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__0 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MPIE mstatus_ref ((get_Mstatus_MIE w__0 : 1 words$word)))
- (set_Mstatus_MIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_MIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__1 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MPP mstatus_ref ((privLevel_to_bits w__1 : 2 words$word)))
(sail2_state_monad$write_regS mtval_ref ((tval info : 32 words$word))))
@@ -12318,11 +14491,11 @@ val _ = Define `
(set_Mcause_Cause scause_ref ((EXTZ (( 31 : int):ii) c : 31 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__6 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_SPIE mstatus_ref ((get_Mstatus_SIE w__6 : 1 words$word)))
- (set_Mstatus_SIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_SIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__7 : Privilege) . sail2_state_monad$bindS
(case w__7 of
- User => sail2_state_monad$returnS ((bool_to_bits F : 1 words$word))
- | Supervisor => sail2_state_monad$returnS ((bool_to_bits T : 1 words$word))
+ User => sail2_state_monad$returnS (0b0w : 1 words$word)
+ | Supervisor => sail2_state_monad$returnS (0b1w : 1 words$word)
| Machine => (internal_error "invalid privilege for s-mode trap" : ( 1 words$word) M)
) (\ (w__9 : 1 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_SPP mstatus_ref w__9)
@@ -12345,7 +14518,7 @@ val _ = Define `
(set_Mcause_Cause ucause_ref ((EXTZ (( 31 : int):ii) c : 31 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__14 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_UPIE mstatus_ref ((get_Mstatus_UIE w__14 : 1 words$word)))
- (set_Mstatus_UIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_UIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$write_regS utval_ref ((tval info : 32 words$word))))
(sail2_state_monad$write_regS uepc_ref pc))
(sail2_state_monad$write_regS cur_privilege_ref del_priv))
@@ -12385,83 +14558,87 @@ val _ = Define `
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MIE mstatus_ref ((get_Mstatus_MPIE w__1 : 1 words$word)))
- (set_Mstatus_MPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
+ (set_Mstatus_MPIE mstatus_ref (0b1w : 1 words$word)))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) . sail2_state_monad$bindS
(privLevel_of_bits ((get_Mstatus_MPP w__2 : 2 words$word))) (\ (w__3 : Privilege) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS cur_privilege_ref w__3)
- (haveUsrMode () )) (\ (w__4 : bool) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (haveUsrMode () )) (\ (w__4 : bool) . sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mstatus_MPP mstatus_ref
((privLevel_to_bits (if w__4 then User else Machine) : 2 words$word)))
+ (sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__5 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((w__5 <> Machine))) then set_Mstatus_MPRV mstatus_ref (0b0w : 1 words$word)
+ else sail2_state_monad$returnS () )
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__5 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__6 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__5 : 32 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__6 : 32 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__6 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__7 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__6)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__7)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target Machine : ( 32 words$word) M) (\ (w__7 : 32 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 32 words$word) M) (\ (w__8 : 32 words$word) .
- sail2_state_monad$returnS ((and_vec w__7 w__8 : 32 words$word))))))))))
+ (prepare_xret_target Machine : ( 32 words$word) M) (\ (w__8 : 32 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 32 words$word) M) (\ (w__9 : 32 words$word) .
+ sail2_state_monad$returnS ((and_vec w__8 w__9 : 32 words$word)))))))))))
| (_, CTL_SRET (() )) => sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__9 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Mstatus_SIE mstatus_ref ((get_Mstatus_SPIE w__9 : 1 words$word)))
- (set_Mstatus_SPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__10 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__10 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Mstatus_SIE mstatus_ref ((get_Mstatus_SPIE w__10 : 1 words$word)))
+ (set_Mstatus_SPIE mstatus_ref (0b1w : 1 words$word)))
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__11 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
cur_privilege_ref
- (if (((((get_Mstatus_SPP w__10 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- Supervisor
+ (if (((((get_Mstatus_SPP w__11 : 1 words$word)) = (0b1w : 1 words$word)))) then Supervisor
else User))
- (set_Mstatus_SPP mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_SPP mstatus_ref (0b0w : 1 words$word)))
+ (sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__12 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((w__12 <> Machine))) then set_Mstatus_MPRV mstatus_ref (0b0w : 1 words$word)
+ else sail2_state_monad$returnS () )
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__11 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__13 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__11 : 32 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__13 : 32 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__12 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__14 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__12)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__14)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target Supervisor : ( 32 words$word) M) (\ (w__13 : 32 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 32 words$word) M) (\ (w__14 : 32 words$word) .
- sail2_state_monad$returnS ((and_vec w__13 w__14 : 32 words$word))))))))
+ (prepare_xret_target Supervisor : ( 32 words$word) M) (\ (w__15 : 32 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 32 words$word) M) (\ (w__16 : 32 words$word) .
+ sail2_state_monad$returnS ((and_vec w__15 w__16 : 32 words$word)))))))))
| (_, CTL_URET (() )) => sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__15 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Mstatus_UIE mstatus_ref ((get_Mstatus_UPIE w__15 : 1 words$word)))
- (set_Mstatus_UPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__17 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Mstatus_UIE mstatus_ref ((get_Mstatus_UPIE w__17 : 1 words$word)))
+ (set_Mstatus_UPIE mstatus_ref (0b1w : 1 words$word)))
(sail2_state_monad$write_regS cur_privilege_ref User))
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__16 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__18 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__16 : 32 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__18 : 32 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__17 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__19 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__17)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__19)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target User : ( 32 words$word) M) (\ (w__18 : 32 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 32 words$word) M) (\ (w__19 : 32 words$word) .
- sail2_state_monad$returnS ((and_vec w__18 w__19 : 32 words$word)))))))
+ (prepare_xret_target User : ( 32 words$word) M) (\ (w__20 : 32 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 32 words$word) M) (\ (w__21 : 32 words$word) .
+ sail2_state_monad$returnS ((and_vec w__20 w__21 : 32 words$word)))))))
)))`;
@@ -12479,6 +14656,20 @@ val _ = Define `
set_next_pc w__2)))))`;
+(*val handle_exception : ExceptionType -> M unit*)
+
+val _ = Define `
+ ((handle_exception:ExceptionType ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) e=
+ (let (t : sync_exception) =
+ (<| sync_exception_trap := e;
+ sync_exception_excinfo := NONE;
+ sync_exception_ext := NONE |>) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__1 : 32 words$word) . sail2_state_monad$bindS
+ (exception_handler w__0 (CTL_TRAP t) w__1 : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ set_next_pc w__2)))))`;
+
+
(*val handle_interrupt : InterruptType -> Privilege -> M unit*)
val _ = Define `
@@ -12492,36 +14683,39 @@ val _ = Define `
(*val init_sys : unit -> M unit*)
val _ = Define `
- ((init_sys:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ ((init_sys:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS cur_privilege_ref Machine)
- (sail2_state_monad$write_regS mhartid_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS mhartid_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
(set_Misa_MXL misa_ref ((arch_to_bits RV32 : 2 words$word))))
- (set_Misa_A misa_ref ((bool_to_bits T : 1 words$word))))
+ (set_Misa_A misa_ref (0b1w : 1 words$word)))
(set_Misa_C misa_ref ((bool_to_bits ((sys_enable_rvc () )) : 1 words$word))))
- (set_Misa_I misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_M misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_U misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_S misa_ref ((bool_to_bits T : 1 words$word))))
+ (set_Misa_I misa_ref (0b1w : 1 words$word)))
+ (set_Misa_M misa_ref (0b1w : 1 words$word)))
+ (set_Misa_U misa_ref (0b1w : 1 words$word)))
+ (set_Misa_S misa_ref (0b1w : 1 words$word)))
+ (set_Misa_F misa_ref ((bool_to_bits ((sys_enable_fdext () )) : 1 words$word))))
+ (set_Misa_D misa_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__1 : Misa) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref ((set_mstatus_SXL w__0 ((get_Misa_MXL w__1 : 2 words$word)))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref ((set_mstatus_UXL w__2 ((get_Misa_MXL w__3 : 2 words$word)))))
- (set_Mstatus_SD mstatus_ref ((bool_to_bits F : 1 words$word))))
- (set_Minterrupts_bits mip_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (set_Minterrupts_bits mie_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (set_Minterrupts_bits mideleg_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (set_Medeleg_bits medeleg_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (set_Mtvec_bits mtvec_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (set_Mcause_bits mcause_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS mepc_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS mtval_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS mscratch_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS mcycle_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mtime_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Counteren_bits mcounteren_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS minstret_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
+ (set_Mstatus_SD mstatus_ref (0b0w : 1 words$word)))
+ (set_Mstatush_bits mstatush_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Minterrupts_bits mip_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Minterrupts_bits mie_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Minterrupts_bits mideleg_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Medeleg_bits medeleg_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Mtvec_bits mtvec_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Mcause_bits mcause_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS mepc_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS mtval_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS mscratch_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS mcycle_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mtime_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Counteren_bits mcounteren_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS minstret_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
(sail2_state_monad$write_regS minstret_written_ref F))
(init_pmp () ))
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
@@ -12531,12 +14725,25 @@ val _ = Define `
((STRCAT ((string_of_bits ((get_Mstatus_bits w__4 : 32 words$word))))
((STRCAT " (input: "
((STRCAT
- ((string_of_bits
- ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
+ ((string_of_bits ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
")")))))))))))
else sail2_state_monad$returnS () )))))))`;
+(*val MemoryOpResult_add_meta : forall 't. MemoryOpResult 't -> unit -> MemoryOpResult (('t * unit))*)
+
+val _ = Define `
+ ((MemoryOpResult_add_meta:'t MemoryOpResult -> unit ->('t#unit)MemoryOpResult) r m=
+ ((case r of MemValue (v) => MemValue (v, m) | MemException (e) => MemException e )))`;
+
+
+(*val MemoryOpResult_drop_meta : forall 't. MemoryOpResult (('t * unit)) -> MemoryOpResult 't*)
+
+val _ = Define `
+ ((MemoryOpResult_drop_meta:('t#unit)MemoryOpResult -> 't MemoryOpResult) r=
+ ((case r of MemValue ((v, m)) => MemValue v | MemException (e) => MemException e )))`;
+
+
(*val elf_tohost : unit -> ii*)
(*val elf_entry : unit -> ii*)
@@ -12611,44 +14818,29 @@ val _ = Define `
val _ = Define `
-((MSIP_BASE:(32)words$word)=
- ((EXTZ (( 32 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 20 words$word)
- : 32 words$word)))`;
+((MSIP_BASE:(32)words$word)= ((0x00000000w : 32 words$word)))`;
val _ = Define `
-((MTIMECMP_BASE:(32)words$word)=
- ((EXTZ (( 32 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 20 words$word)
- : 32 words$word)))`;
+((MTIMECMP_BASE:(32)words$word)= ((0x00004000w : 32 words$word)))`;
val _ = Define `
-((MTIMECMP_BASE_HI:(32)words$word)=
- ((EXTZ (( 32 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 20 words$word)
- : 32 words$word)))`;
+((MTIMECMP_BASE_HI:(32)words$word)= ((0x00004004w : 32 words$word)))`;
val _ = Define `
-((MTIME_BASE:(32)words$word)=
- ((EXTZ (( 32 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B0;B0;B0] : 20 words$word)
- : 32 words$word)))`;
+((MTIME_BASE:(32)words$word)= ((0x0000BFF8w : 32 words$word)))`;
val _ = Define `
-((MTIME_BASE_HI:(32)words$word)=
- ((EXTZ (( 32 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B0;B0] : 20 words$word)
- : 32 words$word)))`;
+((MTIME_BASE_HI:(32)words$word)= ((0x0000BFFCw : 32 words$word)))`;
-(*val clint_load : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val clint_load : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
val _ = Define `
- ((clint_load:(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width=
+ ((clint_load:(unit)AccessType ->(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) t addr width=
(let addr = ((sub_vec addr ((plat_clint_base () : 32 words$word)) : 32 words$word)) in
if ((((((addr = MSIP_BASE))) /\ ((((((((id width)) = (( 8 : int):ii)))) \/ (((((id width)) = (( 4 : int):ii)))))))))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
@@ -12750,7 +14942,11 @@ val _ = Define `
print_dbg
((STRCAT "clint[" ((STRCAT ((string_of_bits addr)) "] -> <not-mapped>"))))
else () ) in
- sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
(*val clint_dispatch : unit -> M unit*)
@@ -12761,7 +14957,7 @@ val _ = Define `
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT "clint::tick mtime <- " ((string_of_bits w__0)))))))
else sail2_state_monad$returnS () )
- (set_Minterrupts_MTI mip_ref ((bool_to_bits F : 1 words$word))))
+ (set_Minterrupts_MTI mip_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS mtimecmp_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
if ((zopz0zIzJ_u w__1 w__2)) then sail2_state_monad$seqS
@@ -12769,7 +14965,7 @@ val _ = Define `
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT " clint timer pending at mtime " ((string_of_bits w__3)))))))
else sail2_state_monad$returnS () )
- (set_Minterrupts_MTI mip_ref ((bool_to_bits T : 1 words$word)))
+ (set_Minterrupts_MTI mip_ref (0b1w : 1 words$word))
else sail2_state_monad$returnS () ))))`;
@@ -12787,15 +14983,9 @@ val _ = Define `
((STRCAT "] <- "
((STRCAT ((string_of_bits data))
((STRCAT " (mip.MSI <- "
- ((STRCAT
- ((string_of_bits
- ((cast_unit_vec0 ((access_vec_dec data (( 0 : int):ii))) : 1 words$word))))
- ")"))))))))))))
+ ((STRCAT ((string_of_bit ((access_vec_dec data (( 0 : int):ii))))) ")"))))))))))))
else () ) in sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Minterrupts_MSI mip_ref
- ((bool_to_bits
- (((((cast_unit_vec0 ((access_vec_dec data (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B1] : 1 words$word))))
- : 1 words$word)))
+ (set_Minterrupts_MSI mip_ref (vec_of_bits [access_vec_dec data (( 0 : int):ii)] : 1 words$word))
(clint_dispatch () )) (sail2_state_monad$returnS (MemValue T))
else if ((((((addr = MTIMECMP_BASE))) /\ (((((id width)) = (( 8 : int):ii))))))) then
let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in
@@ -12846,17 +15036,20 @@ val _ = Define `
((STRCAT ((string_of_bits addr))
((STRCAT "] <- " ((STRCAT ((string_of_bits data)) " (<unmapped>)"))))))))
else () ) in
- sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
(*val tick_clock : unit -> M unit*)
val _ = Define `
((tick_clock:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mcycle_ref ((add_vec_int w__0 (( 1 : int):ii) : 64 words$word)))
- (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) . sail2_state_monad$seqS
- (sail2_state_monad$write_regS mtime_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word))) (clint_dispatch () )))))`;
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__0 : Counterin) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (if (((((get_Counterin_CY w__0 : 1 words$word)) = (0b0w : 1 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$write_regS mcycle_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word)))
+ else sail2_state_monad$returnS () )
+ (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M)) (\ (w__2 : 64 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mtime_ref ((add_vec_int w__2 (( 1 : int):ii) : 64 words$word))) (clint_dispatch () )))))`;
(*val Mk_htif_cmd : mword ty64 -> htif_cmd*)
@@ -12866,36 +15059,30 @@ val _ = Define `
(<| htif_cmd_htif_cmd_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_htif_cmd_bits : htif_cmd -> mword ty64*)
-
val _ = Define `
((get_htif_cmd_bits:htif_cmd ->(64)words$word) v=
((subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_htif_cmd_bits : register_ref regstate register_value htif_cmd -> mword ty64 -> M unit*)
-
val _ = Define `
((set_htif_cmd_bits:((regstate),(register_value),(htif_cmd))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_htif_cmd_bits : htif_cmd -> mword ty64 -> htif_cmd*)
-
val _ = Define `
((update_htif_cmd_bits:htif_cmd ->(64)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_device : htif_cmd -> mword ty8*)
@@ -12911,11 +15098,11 @@ val _ = Define `
((set_htif_cmd_device:((regstate),(register_value),(htif_cmd))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 56 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12923,11 +15110,11 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_device:htif_cmd ->(8)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 56 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_cmd : htif_cmd -> mword ty8*)
@@ -12943,11 +15130,11 @@ val _ = Define `
((set_htif_cmd_cmd:((regstate),(register_value),(htif_cmd))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 55 : int):ii) (( 48 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12955,11 +15142,11 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_cmd:htif_cmd ->(8)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 55 : int):ii) (( 48 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_payload : htif_cmd -> mword ty48*)
@@ -12975,11 +15162,11 @@ val _ = Define `
((set_htif_cmd_payload:((regstate),(register_value),(htif_cmd))register_ref ->(48)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12987,28 +15174,37 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_payload:htif_cmd ->(48)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+
+
+(*val reset_htif : unit -> M unit*)
+
+val _ = Define `
+ ((reset_htif:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_cmd_write_ref B0)
+ (sail2_state_monad$write_regS htif_payload_writes_ref (0x0w : 4 words$word)))
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))))`;
-(*val htif_load : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val htif_load : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
val _ = Define `
- ((htif_load:(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width= (sail2_state_monad$seqS
+ ((htif_load:(unit)AccessType ->(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) t paddr width= (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "htif["
- ((STRCAT ((string_of_bits addr))
+ ((STRCAT ((string_of_bits paddr))
((STRCAT "] -> " ((string_of_bits w__0)))))))))))
else sail2_state_monad$returnS () )
- (if ((((((width = (( 8 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 32 words$word)))))))) then sail2_state_monad$bindS
+ (if ((((((width = (( 8 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 32 words$word)))))))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w ((zero_extend w__1 (( 64 : int):ii) : 64 words$word)) : 'int8_times_n words$word))))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 32 words$word))))))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 32 words$word))))))))
then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w
@@ -13016,7 +15212,7 @@ val _ = Define `
(( 32 : int):ii)
: 32 words$word))
: 'int8_times_n words$word))))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((add_vec_int ((plat_htif_tohost () : 32 words$word)) (( 4 : int):ii) : 32 words$word))))))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((add_vec_int ((plat_htif_tohost () : 32 words$word)) (( 4 : int):ii) : 32 words$word))))))))
then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w
@@ -13024,80 +15220,110 @@ val _ = Define `
(( 32 : int):ii)
: 32 words$word))
: 'int8_times_n words$word))))
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault))))`;
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ )))))`;
(*val htif_store : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> M (MemoryOpResult bool)*)
val _ = Define `
- ((htif_store:(32)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width data=
+ ((htif_store:(32)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width data=
(let (_ : unit) =
(if ((get_config_print_platform () )) then
print_dbg
((STRCAT "htif["
- ((STRCAT ((string_of_bits addr)) ((STRCAT "] <- " ((string_of_bits data))))))))
+ ((STRCAT ((string_of_bits paddr))
+ ((STRCAT "] <- " ((string_of_bits data))))))))
else () ) in sail2_state_monad$bindS (sail2_state_monad$seqS
(if (((width = (( 8 : int):ii)))) then
- let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in
- sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 32 words$word))))))))
+ let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_cmd_write_ref B1)
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M)) (\ (w__0 : 4 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__0 (( 1 : int):ii) : 4 words$word)))
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 32 words$word))))))))
then
let (data : 32 words$word) = ((words$w2w data : 32 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
- sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) data : 64 words$word)))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((add_vec_int ((plat_htif_tohost () : 32 words$word)) (( 4 : int):ii) : 32 words$word))))))))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (if (((data = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__2 : 4 words$word) .
+ sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__2 (( 1 : int):ii) : 4 words$word)))
+ else sail2_state_monad$write_regS htif_payload_writes_ref (0x1w : 4 words$word))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__3 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__3 (( 31 : int):ii) (( 0 : int):ii) data : 64 words$word))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((add_vec_int ((plat_htif_tohost () : 32 words$word)) (( 4 : int):ii) : 32 words$word))))))))
then
let (data : 32 words$word) = ((words$w2w data : 32 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
- sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__1 (( 63 : int):ii) (( 32 : int):ii) data : 64 words$word)))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__4 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((((subrange_vec_dec data (( 15 : int):ii) (( 0 : int):ii) : 16 words$word)) = ((subrange_vec_dec w__4 (( 47 : int):ii) (( 32 : int):ii) : 16 words$word))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__5 : 4 words$word) .
+ sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__5 (( 1 : int):ii) : 4 words$word)))
+ else sail2_state_monad$write_regS htif_payload_writes_ref (0x1w : 4 words$word))
+ (sail2_state_monad$write_regS htif_cmd_write_ref B1))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__6 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__6 (( 63 : int):ii) (( 32 : int):ii) data : 64 words$word))))
else sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word)))
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__2 : 64 words$word) .
- let cmd = (Mk_htif_cmd w__2) in
- let b__0 = ((get_htif_cmd_device cmd : 8 words$word)) in sail2_state_monad$seqS
- (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
- let (_ : unit) =
- (if ((get_config_print_platform () )) then
- print_dbg
- ((STRCAT "htif-syscall-proxy cmd: "
- ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
- else () ) in
- if (((((cast_unit_vec0 ((access_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 0 : int):ii)))
- : 1 words$word)) = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$seqS
- (sail2_state_monad$write_regS htif_done_ref T)
- (sail2_state_monad$write_regS
- htif_exit_code_ref
- ((shiftr ((zero_extend ((get_htif_cmd_payload cmd : 48 words$word)) (( 64 : int):ii) : 64 words$word))
- (( 1 : int):ii)
- : 64 words$word)))
- else sail2_state_monad$returnS ()
- else
- sail2_state_monad$returnS (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)))) then
- let (_ : unit) =
- (if ((get_config_print_platform () )) then
- print_dbg
- ((STRCAT "htif-term cmd: "
- ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
- else () ) in
- let b__2 = ((get_htif_cmd_cmd cmd : 8 words$word)) in
- if (((b__2 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then ()
- else if (((b__2 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)))) then
- plat_term_write
- ((subrange_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 7 : int):ii) (( 0 : int):ii)
- : 8 words$word))
- else print_endline ((STRCAT "Unknown term cmd: " ((string_of_bits b__2))))
- else print_endline ((STRCAT "htif-???? cmd: " ((string_of_bits data))))))
+ (sail2_state$or_boolS
+ (sail2_state$and_boolS ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_cmd_write_ref) (\ (w__7 : bitU) . sail2_state_monad$returnS (((w__7 = B1)))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__8 : 4 words$word) .
+ sail2_state_monad$returnS ((((lem$w2ui w__8)) > (( 0 : int):ii))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__10 : 4 words$word) .
+ sail2_state_monad$returnS ((((lem$w2ui w__10)) > (( 2 : int):ii))))))) (\ (w__11 : bool) . sail2_state_monad$seqS
+ (if w__11 then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__12 : 64 words$word) .
+ let cmd = (Mk_htif_cmd w__12) in
+ let b__0 = ((get_htif_cmd_device cmd : 8 words$word)) in
+ if (((b__0 = (0x00w : 8 words$word)))) then
+ let (_ : unit) =
+ (if ((get_config_print_platform () )) then
+ print_dbg
+ ((STRCAT "htif-syscall-proxy cmd: "
+ ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
+ else () ) in
+ if (((((access_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 0 : int):ii))) = B1))) then sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_done_ref T)
+ (sail2_state_monad$write_regS
+ htif_exit_code_ref
+ ((shiftr
+ ((zero_extend ((get_htif_cmd_payload cmd : 48 words$word)) (( 64 : int):ii) : 64 words$word))
+ (( 1 : int):ii)
+ : 64 words$word)))
+ else sail2_state_monad$returnS ()
+ else if (((b__0 = (0x01w : 8 words$word)))) then
+ let (_ : unit) =
+ (if ((get_config_print_platform () )) then
+ print_dbg
+ ((STRCAT "htif-term cmd: "
+ ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
+ else () ) in
+ let b__2 = ((get_htif_cmd_cmd cmd : 8 words$word)) in
+ let (_ : unit) =
+ (if (((b__2 = (0x00w : 8 words$word)))) then ()
+ else if (((b__2 = (0x01w : 8 words$word)))) then
+ plat_term_write
+ ((subrange_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 7 : int):ii) (( 0 : int):ii)
+ : 8 words$word))
+ else print_endline ((STRCAT "Unknown term cmd: " ((string_of_bits b__2))))) in
+ reset_htif ()
+ else sail2_state_monad$returnS ((print_endline ((STRCAT "htif-???? cmd: " ((string_of_bits data)))))))
+ else sail2_state_monad$returnS () )
(sail2_state_monad$returnS (MemValue T)))))`;
(*val htif_tick : unit -> M unit*)
val _ = Define `
- ((htif_tick:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS
+ ((htif_tick:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT "htif::tick " ((string_of_bits w__0)))))))
else sail2_state_monad$returnS () )
- (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))`;
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref w__1)))`;
(*val within_mmio_readable : mword ty32 -> integer -> bool*)
@@ -13114,33 +15340,41 @@ val _ = Define `
(((within_clint addr width)) \/ (((((within_htif_writable addr width)) /\ ((((id width)) <= (( 8 : int):ii))))))))`;
-(*val mmio_read : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val mmio_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
val _ = Define `
- ((mmio_read:(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int)=
- (if ((within_clint addr width)) then (clint_load addr width )
- else if (((((within_htif_readable addr width)) /\ (((( 1 : int):ii) <= ((id width))))))) then
- (htif_load addr width )
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ ((mmio_read:(ext_access_type)AccessType ->(32)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int)=
+ (if ((within_clint paddr width)) then
+ (clint_load t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M)
+ else if (((((within_htif_readable paddr width)) /\ (((( 1 : int):ii) <= ((id width))))))) then
+ (htif_load t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M)
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
(*val mmio_write : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mmio_write:(32)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) data=
- (if ((within_clint addr width)) then clint_store addr width data
- else if (((((within_htif_writable addr width)) /\ ((((id width)) <= (( 8 : int):ii)))))) then
- htif_store addr width data
- else sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ ((mmio_write:(32)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (paddr : xlenbits) (width : int) (data : 'int8_times_n words$word)=
+ (if ((within_clint paddr width)) then clint_store paddr width data
+ else if (((((within_htif_writable paddr width)) /\ ((((id width)) <= (( 8 : int):ii)))))) then
+ htif_store paddr width data
+ else sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
(*val init_platform : unit -> M unit*)
val _ = Define `
- ((init_platform:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))
+ ((init_platform:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))
(sail2_state_monad$write_regS htif_done_ref F))
- (sail2_state_monad$write_regS htif_exit_code_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))`;
+ (sail2_state_monad$write_regS htif_exit_code_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS htif_cmd_write_ref B0))
+ (sail2_state_monad$write_regS htif_payload_writes_ref ((EXTZ (( 4 : int):ii) (0b0w : 1 words$word) : 4 words$word)))))`;
(*val tick_platform : unit -> M unit*)
@@ -13157,7 +15391,7 @@ val _ = Define `
(sail2_state_monad$read_regS instbits_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) . sail2_state_monad$returnS (SOME w__0))
else sail2_state_monad$returnS NONE) (\ info .
let (t : sync_exception) =
- (<| sync_exception_trap := E_Illegal_Instr;
+ (<| sync_exception_trap := (E_Illegal_Instr () );
sync_exception_excinfo := info;
sync_exception_ext := NONE |>) in sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
@@ -13188,113 +15422,157 @@ val _ = Define `
(((((lem$w2ui addr)) % width)) = (( 0 : int):ii)))`;
-(*val phys_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val read_kind_of_flags : bool -> bool -> bool -> maybe read_kind*)
+
+val _ = Define `
+ ((read_kind_of_flags:bool -> bool -> bool ->(read_kind)option) (aq : bool) (rl : bool) (res : bool)=
+ ((case (aq, rl, res) of
+ (F, F, F) => SOME Read_plain
+ | (T, F, F) => SOME Read_RISCV_acquire
+ | (T, T, F) => SOME Read_RISCV_strong_acquire
+ | (F, F, T) => SOME Read_RISCV_reserved
+ | (T, F, T) => SOME Read_RISCV_reserved_acquire
+ | (T, T, T) => SOME Read_RISCV_reserved_strong_acquire
+ | (F, T, F) => NONE
+ | (F, T, T) => NONE
+ )))`;
+
+
+(*val phys_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((phys_mem_read:AccessType ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)= (sail2_state_monad$bindS
- (case (aq, rl, res) of
- (F, F, F) => sail2_state_monad$bindS
- (read_ram Read_plain addr width : ( 'int8_times_n words$word) M) (\ (w__0 :
- 'int8_times_n words$word) .
+ ((phys_mem_read:(ext_access_type)AccessType ->(32)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int) (aq : bool) (rl :
+ bool) (res : bool) (meta : bool)= (sail2_state_monad$bindS
+ (case ((read_kind_of_flags aq rl res)) of
+ SOME (rk) => sail2_state_monad$bindS
+ (read_ram rk paddr width meta : (( 'int8_times_n words$word # unit)) M) (\ (w__0 :
+ ( 'int8_times_n words$word # unit)) .
sail2_state_monad$returnS (SOME w__0))
- | (T, F, F) => sail2_state_monad$bindS
- (read_ram Read_RISCV_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__1 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__1))
- | (T, T, F) => sail2_state_monad$bindS
- (read_ram Read_RISCV_strong_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__2 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__2))
- | (F, F, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved addr width : ( 'int8_times_n words$word) M) (\ (w__3 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__3))
- | (T, F, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__4 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__4))
- | (T, T, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved_strong_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__5 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__5))
- | (F, T, F) => sail2_state_monad$returnS NONE
- | (F, T, T) => sail2_state_monad$returnS NONE
- ) (\ w__6 .
- let result = w__6 in
+ | NONE => sail2_state_monad$returnS NONE
+ ) (\ (w__1 : (( 'int8_times_n words$word # unit))option) .
+ let result = w__1 in
sail2_state_monad$returnS ((case (t, result) of
- (Execute, NONE) => MemException E_Fetch_Access_Fault
- | (Read, NONE) => MemException E_Load_Access_Fault
- | (_, NONE) => MemException E_SAMO_Access_Fault
- | (_, SOME (v)) =>
+ (Execute (() ), NONE) => MemException (E_Fetch_Access_Fault () )
+ | (Read (Data1), NONE) => MemException (E_Load_Access_Fault () )
+ | (_, NONE) => MemException (E_SAMO_Access_Fault () )
+ | (_, SOME ((v, m))) =>
let (_ : unit) =
(if ((get_config_print_mem () )) then
print_dbg
((STRCAT "mem["
((STRCAT ((accessType_to_str t))
((STRCAT ","
- ((STRCAT ((string_of_bits addr))
+ ((STRCAT ((string_of_bits paddr))
((STRCAT "] -> " ((string_of_bits v))))))))))))
else () ) in
- MemValue v
+ MemValue (v, m)
)))))`;
-(*val checked_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val checked_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((checked_mem_read:AccessType ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)=
- (if ((within_mmio_readable addr width)) then (mmio_read addr width )
- else if ((within_phys_mem addr width)) then (phys_mem_read t addr width aq rl res )
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ ((checked_mem_read:(ext_access_type)AccessType ->(32)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int) (aq :
+ bool) (rl : bool) (res : bool) (meta : bool)=
+ (if ((within_mmio_readable paddr width)) then sail2_state_monad$bindS
+ (mmio_read t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M) (\ (w__0 : ( 'int8_times_n words$word)
+ MemoryOpResult) .
+ sail2_state_monad$returnS ((MemoryOpResult_add_meta w__0 default_meta
+ : (( 'int8_times_n words$word # unit)) MemoryOpResult)))
+ else if ((within_phys_mem paddr width)) then
+ (case ((ext_check_phys_mem_read t paddr width aq rl res meta)) of
+ Ext_PhysAddr_OK (() ) =>
+ (phys_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
+ | Ext_PhysAddr_Error (e) => sail2_state_monad$returnS (MemException e)
+ )
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
-(*val pmp_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val pmp_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((pmp_mem_read:AccessType ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)=
- (if ((~ ((plat_enable_pmp () )))) then (checked_mem_read t addr width aq rl res )
+ ((pmp_mem_read:(ext_access_type)AccessType -> Privilege ->(32)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (p : Privilege) (paddr : xlenbits) (width :
+ int) (aq : bool) (rl : bool) (res : bool) (meta : bool)=
+ (if ((~ ((plat_enable_pmp () )))) then
+ (checked_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
- (effectivePrivilege w__1 w__2) (\ (w__3 : Privilege) . sail2_state_monad$bindS
- (pmpCheck addr width t w__3) (\ (w__4 : ExceptionType option) .
- (case w__4 of
- NONE => (checked_mem_read t addr width aq rl res )
+ (pmpCheck paddr width t p) (\ (w__1 : ExceptionType option) .
+ (case w__1 of
+ NONE =>
+ (checked_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
| SOME (e) => sail2_state_monad$returnS (MemException e)
- )))))))`;
+ ))))`;
-(*val rvfi_read : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> MemoryOpResult (mword 'int8_times_n) -> unit*)
+(*val rvfi_read : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> MemoryOpResult ((mword 'int8_times_n * unit)) -> unit*)
val _ = Define `
- ((rvfi_read:(32)words$word -> int ->('int8_times_n words$word)MemoryOpResult -> unit) addr width value= () )`;
+ ((rvfi_read:(32)words$word -> int ->('int8_times_n words$word#unit)MemoryOpResult -> unit) addr width result= () )`;
-(*val mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+
+(*val mem_read_priv : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+
+(*val mem_read_meta : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
+
+(*val mem_read_priv_meta : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty32 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((mem_read:AccessType ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ addr width aq rl res= (sail2_state_monad$bindS
- (if ((((((aq \/ res))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_Load_Addr_Align)
+ ((mem_read_priv_meta:(unit)AccessType -> Privilege ->(32)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ priv paddr width aq rl res meta= (sail2_state_monad$bindS
+ (if ((((((aq \/ res))) /\ ((~ ((is_aligned_addr paddr width))))))) then
+ sail2_state_monad$returnS (MemException (E_Load_Addr_Align () ))
else
(case (aq, rl, res) of
(F, T, F) => sail2_state_monad$throwS (Error_not_implemented "load.rl")
| (F, T, T) => sail2_state_monad$throwS (Error_not_implemented "lr.rl")
- | (_, _, _) => (pmp_mem_read typ addr width aq rl res )
- )) (\ result .
- let (_ : unit) = (rvfi_read addr width result) in
+ | (_, _, _) =>
+ (pmp_mem_read typ priv paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
+ )) (\ (result : (( 'int8_times_n words$word # unit)) MemoryOpResult) .
+ let (_ : unit) = (rvfi_read paddr width result) in
sail2_state_monad$returnS result)))`;
+val _ = Define `
+ ((mem_read_meta:(unit)AccessType ->(32)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ paddr width aq rl res meta= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ (w__2 : Privilege) .
+ (mem_read_priv_meta typ w__2 paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M))))))`;
+
+
+val _ = Define `
+ ((mem_read_priv:(unit)AccessType -> Privilege ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ priv paddr width aq rl res= (sail2_state_monad$bindS
+ (mem_read_priv_meta typ priv paddr width aq rl res F
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M) (\ (w__0 : (( 'int8_times_n words$word # unit))
+ MemoryOpResult) .
+ sail2_state_monad$returnS ((MemoryOpResult_drop_meta w__0 : ( 'int8_times_n words$word) MemoryOpResult)))))`;
+
+
+val _ = Define `
+ ((mem_read:(unit)AccessType ->(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ paddr width aq rel res= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ (w__2 : Privilege) .
+ (mem_read_priv typ w__2 paddr width aq rel res : ( ( 'int8_times_n words$word)MemoryOpResult) M))))))`;
+
+
(*val mem_write_ea : mword ty32 -> integer -> bool -> bool -> bool -> M (MemoryOpResult unit)*)
val _ = Define `
((mem_write_ea:(32)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width aq rl con=
(if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_SAMO_Addr_Align)
+ sail2_state_monad$returnS (MemException (E_SAMO_Addr_Align () ))
else
(case (aq, rl, con) of
(F, F, F) => sail2_state_monad$seqS (write_ram_ea Write_plain addr width) (sail2_state_monad$returnS (MemValue () ))
@@ -13312,24 +15590,26 @@ val _ = Define `
)))`;
-(*val rvfi_write : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> unit*)
+(*val rvfi_write : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> unit -> unit*)
val _ = Define `
- ((rvfi_write:(32)words$word -> int -> 'int8_times_n words$word -> unit) addr width value= () )`;
+ ((rvfi_write:(32)words$word -> int -> 'int8_times_n words$word -> unit -> unit) addr width value meta= () )`;
(*val phys_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((phys_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (let (_ : unit) = (rvfi_write addr width data) in sail2_state_monad$bindS
- (write_ram wk addr width data meta) (\ (w__0 : bool) .
+ ((phys_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data :
+ 'int8_times_n words$word) (meta : mem_meta)=
+ (let (_ : unit) = (rvfi_write paddr width data meta) in sail2_state_monad$bindS
+ (write_ram wk paddr width data meta) (\ (w__0 : bool) .
let result = (MemValue w__0) in
let (_ : unit) =
(if ((get_config_print_mem () )) then
print_dbg
((STRCAT "mem["
- ((STRCAT ((string_of_bits addr)) ((STRCAT "] <- " ((string_of_bits data))))))))
+ ((STRCAT ((string_of_bits paddr))
+ ((STRCAT "] <- " ((string_of_bits data))))))))
else () ) in
sail2_state_monad$returnS result)))`;
@@ -13337,58 +15617,79 @@ val _ = Define `
(*val checked_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((checked_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (if ((within_mmio_writable addr width)) then mmio_write addr width data
- else if ((within_phys_mem addr width)) then phys_mem_write wk addr width data meta
- else sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ ((checked_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data :
+ 'int8_times_n words$word) (meta : mem_meta)=
+ (if ((within_mmio_writable paddr width)) then mmio_write paddr width data
+ else if ((within_phys_mem paddr width)) then
+ (case ((ext_check_phys_mem_write wk paddr width data meta)) of
+ Ext_PhysAddr_OK (() ) => phys_mem_write wk paddr width data meta
+ | Ext_PhysAddr_Error (e) => sail2_state_monad$returnS (MemException e)
+ )
+ else sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
-(*val pmp_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
+(*val pmp_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty32 -> integer -> mword 'int8_times_n -> AccessType unit -> Privilege -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((pmp_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (if ((~ ((plat_enable_pmp () )))) then checked_mem_write wk addr width data meta
+ ((pmp_mem_write:write_kind ->(32)words$word -> int -> 'int8_times_n words$word ->(ext_access_type)AccessType -> Privilege -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data : 'int8_times_n words$word) (typ : ext_access_type
+ AccessType) (priv : Privilege) (meta : mem_meta)=
+ (if ((~ ((plat_enable_pmp () )))) then checked_mem_write wk paddr width data meta
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
- (effectivePrivilege w__1 w__2) (\ (w__3 : Privilege) . sail2_state_monad$bindS
- (pmpCheck addr width Write w__3) (\ (w__4 : ExceptionType option) .
- (case w__4 of
- NONE => checked_mem_write wk addr width data meta
+ (pmpCheck paddr width typ priv) (\ (w__1 : ExceptionType option) .
+ (case w__1 of
+ NONE => checked_mem_write wk paddr width data meta
| SOME (e) => sail2_state_monad$returnS (MemException e)
- )))))))`;
+ ))))`;
-(*val mem_write_value_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+(*val mem_write_value_priv_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> AccessType unit -> Privilege -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mem_write_value_meta:(32)words$word -> int -> 'int8_times_n words$word -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width value meta aq rl con=
- (let (_ : unit) = (rvfi_write addr width value) in
- if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_SAMO_Addr_Align)
- else
+ ((mem_write_value_priv_meta:(32)words$word -> int -> 'int8_times_n words$word ->(unit)AccessType -> Privilege -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value typ priv meta aq rl con=
+ (let (_ : unit) = (rvfi_write paddr width value meta) in
+ if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr paddr width))))))) then
+ sail2_state_monad$returnS (MemException (E_SAMO_Addr_Align () ))
+ else sail2_state_monad$bindS
(case (aq, rl, con) of
- (F, F, F) => pmp_mem_write Write_plain addr width value meta
- | (F, T, F) => pmp_mem_write Write_RISCV_release addr width value meta
- | (F, F, T) => pmp_mem_write Write_RISCV_conditional addr width value meta
- | (F, T, T) => pmp_mem_write Write_RISCV_conditional_release addr width value meta
- | (T, T, F) => pmp_mem_write Write_RISCV_strong_release addr width value meta
- | (T, T, T) =>
- pmp_mem_write Write_RISCV_conditional_strong_release addr width value meta
+ (F, F, F) => sail2_state_monad$returnS Write_plain
+ | (F, T, F) => sail2_state_monad$returnS Write_RISCV_release
+ | (F, F, T) => sail2_state_monad$returnS Write_RISCV_conditional
+ | (F, T, T) => sail2_state_monad$returnS Write_RISCV_conditional_release
+ | (T, T, F) => sail2_state_monad$returnS Write_RISCV_strong_release
+ | (T, T, T) => sail2_state_monad$returnS Write_RISCV_conditional_strong_release
| (T, F, F) => sail2_state_monad$throwS (Error_not_implemented "store.aq")
| (T, F, T) => sail2_state_monad$throwS (Error_not_implemented "sc.aq")
- )))`;
+ ) (\ (wk : write_kind) .
+ pmp_mem_write wk paddr width value typ priv meta)))`;
+
+
+(*val mem_write_value_priv : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> Privilege -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+
+val _ = Define `
+ ((mem_write_value_priv:(32)words$word -> int -> 'int8_times_n words$word -> Privilege -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value priv aq rl con=
+ (mem_write_value_priv_meta paddr width value (Write default_write_acc) priv default_meta aq rl con))`;
+
+
+(*val mem_write_value_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> unit -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+
+val _ = Define `
+ ((mem_write_value_meta:(32)words$word -> int -> 'int8_times_n words$word -> unit -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value ext_acc meta aq rl con=
+ (let typ = (Write ext_acc) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ ep .
+ mem_write_value_priv_meta paddr width value typ ep meta aq rl con)))))`;
(*val mem_write_value : forall 'int8_times_n. Size 'int8_times_n => mword ty32 -> integer -> mword 'int8_times_n -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mem_write_value:(32)words$word -> int -> 'int8_times_n words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width value aq rl con=
- (mem_write_value_meta addr width value default_meta aq rl con))`;
+ ((mem_write_value:(32)words$word -> int -> 'int8_times_n words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value aq rl con=
+ (mem_write_value_meta paddr width value default_write_acc default_meta aq rl con))`;
val _ = Define `
- ((PAGESIZE_BITS:int)= ((( 12 : int):ii)))`;
+((default_sv32_ext_pte:(10)words$word)= ((0b0000000000w : 10 words$word)))`;
(*val Mk_PTE_Bits : mword ty8 -> PTE_Bits*)
@@ -13398,35 +15699,29 @@ val _ = Define `
(<| PTE_Bits_PTE_Bits_chunk_0 := ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) |>))`;
-(*val _get_PTE_Bits_bits : PTE_Bits -> mword ty8*)
-
val _ = Define `
((get_PTE_Bits_bits:PTE_Bits ->(8)words$word) v= ((subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_PTE_Bits_bits : register_ref regstate register_value PTE_Bits -> mword ty8 -> M unit*)
-
val _ = Define `
((set_PTE_Bits_bits:((regstate),(register_value),(PTE_Bits))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_PTE_Bits_bits : PTE_Bits -> mword ty8 -> PTE_Bits*)
-
val _ = Define `
((update_PTE_Bits_bits:PTE_Bits ->(8)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13437,21 +15732,21 @@ val _ = Define `
((set_PTE_Bits_D:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_D:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13462,21 +15757,21 @@ val _ = Define `
((set_PTE_Bits_A:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_A:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13487,21 +15782,21 @@ val _ = Define `
((set_PTE_Bits_G:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_G:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13512,21 +15807,21 @@ val _ = Define `
((set_PTE_Bits_U:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_U:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13537,21 +15832,21 @@ val _ = Define `
((set_PTE_Bits_X:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_X:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13562,21 +15857,21 @@ val _ = Define `
((set_PTE_Bits_W:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_W:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13587,21 +15882,21 @@ val _ = Define `
((set_PTE_Bits_R:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_R:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13612,164 +15907,169 @@ val _ = Define `
((set_PTE_Bits_V:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_V:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val isPTEPtr : mword ty8 -> bool*)
+(*val isPTEPtr : mword ty8 -> mword ty10 -> bool*)
val _ = Define `
- ((isPTEPtr:(8)words$word -> bool) p=
+ ((isPTEPtr:(8)words$word ->(10)words$word -> bool) (p : pteAttribs) (ext : extPte)=
(let a = (Mk_PTE_Bits p) in
- ((((((get_PTE_Bits_R a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ ((((((((get_PTE_Bits_W a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ (((((get_PTE_Bits_X a : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))))))))`;
+ ((((((get_PTE_Bits_R a : 1 words$word)) = (0b0w : 1 words$word)))) /\ ((((((((get_PTE_Bits_W a : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((get_PTE_Bits_X a : 1 words$word)) = (0b0w : 1 words$word))))))))))`;
-(*val isInvalidPTE : mword ty8 -> bool*)
+(*val isInvalidPTE : mword ty8 -> mword ty10 -> bool*)
val _ = Define `
- ((isInvalidPTE:(8)words$word -> bool) p=
+ ((isInvalidPTE:(8)words$word ->(10)words$word -> bool) (p : pteAttribs) (ext : extPte)=
(let a = (Mk_PTE_Bits p) in
- ((((((get_PTE_Bits_V a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ ((((((((get_PTE_Bits_W a : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_R a : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))))))))`;
+ ((((((get_PTE_Bits_V a : 1 words$word)) = (0b0w : 1 words$word)))) \/ ((((((((get_PTE_Bits_W a : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_R a : 1 words$word)) = (0b0w : 1 words$word))))))))))`;
-(*val checkPTEPermission : AccessType -> Privilege -> bool -> bool -> PTE_Bits -> M bool*)
+(*val to_pte_check : bool -> PTE_Check*)
val _ = Define `
- ((checkPTEPermission:AccessType -> Privilege -> bool -> bool -> PTE_Bits ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (ac : AccessType) (priv : Privilege) (mxr : bool) (do_sum : bool) (p :
- PTE_Bits)=
+ ((to_pte_check:bool -> PTE_Check) b= (if b then PTE_Check_Success () else PTE_Check_Failure (() , () )))`;
+
+
+(*val checkPTEPermission : AccessType unit -> Privilege -> bool -> bool -> PTE_Bits -> mword ty10 -> unit -> M PTE_Check*)
+
+val _ = Define `
+ ((checkPTEPermission:(ext_access_type)AccessType -> Privilege -> bool -> bool -> PTE_Bits ->(10)words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->(((PTE_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (ac : ext_access_type AccessType) (priv : Privilege) (mxr : bool) (do_sum :
+ bool) (p : PTE_Bits) (ext : extPte) (ext_ptw : ext_ptw)=
((case (ac, priv) of
- (Read, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr)))))))))
- | (Write, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (ReadWrite, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr))))))))))))
- | (Execute, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (Read, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr)))))))))
- | (Write, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (ReadWrite, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr))))))))))))
- | (Execute, Supervisor) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
+ (Read (_), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr)))))))))))
+ | (Write (_), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (ReadWrite ((_, _)), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr))))))))))))))
+ | (Execute (() ), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (Read (_), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr)))))))))))
+ | (Write (_), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (ReadWrite ((_, _)), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr))))))))))))))
+ | (Execute (() ), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))))))))
| (_, Machine) => internal_error "m-mode mem perm check"
)))`;
-(*val update_PTE_Bits : PTE_Bits -> AccessType -> maybe PTE_Bits*)
+(*val update_PTE_Bits : PTE_Bits -> AccessType unit -> mword ty10 -> maybe ((PTE_Bits * mword ty10))*)
val _ = Define `
- ((update_PTE_Bits:PTE_Bits -> AccessType ->(PTE_Bits)option) (p : PTE_Bits) (a : AccessType)=
+ ((update_PTE_Bits:PTE_Bits ->(ext_access_type)AccessType ->(10)words$word ->(PTE_Bits#(10)words$word)option) (p : PTE_Bits) (a : ext_access_type AccessType) (ext : extPte)=
(let update_d =
- (((((((a = Write))) \/ (((a = ReadWrite)))))) /\ (((((get_PTE_Bits_D p : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))) in
- let update_a = (((get_PTE_Bits_A p : 1 words$word)) = ((bool_to_bits F : 1 words$word))) in
+ ((((((get_PTE_Bits_D p : 1 words$word)) = (0b0w : 1 words$word)))) /\ ((case a of
+ Execute (() ) => F
+ | Read (() ) => F
+ | Write (_) => T
+ | ReadWrite ((_, _)) => T
+ ))) in
+ let update_a = (((get_PTE_Bits_A p : 1 words$word)) = (0b0w : 1 words$word)) in
if (((update_d \/ update_a))) then
- let np = (update_PTE_Bits_A p ((bool_to_bits T : 1 words$word))) in
- let np = (if update_d then update_PTE_Bits_D np ((bool_to_bits T : 1 words$word)) else np) in
- SOME np
+ let np = (update_PTE_Bits_A p (0b1w : 1 words$word)) in
+ let np = (if update_d then update_PTE_Bits_D np (0b1w : 1 words$word) else np) in
+ SOME (np, ext)
else NONE))`;
-(*val PTW_Error_of_num : integer -> PTW_Error*)
-
val _ = Define `
- ((PTW_Error_of_num:int -> PTW_Error) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PTW_Access
- else if (((p0_ = (( 1 : int):ii)))) then PTW_Invalid_PTE
- else if (((p0_ = (( 2 : int):ii)))) then PTW_No_Permission
- else if (((p0_ = (( 3 : int):ii)))) then PTW_Misaligned
- else PTW_PTE_Update))`;
+ ((ptw_error_to_str:PTW_Error -> string) e=
+ ((case e of
+ PTW_Invalid_Addr (() ) => "invalid-source-addr"
+ | PTW_Access (() ) => "mem-access-error"
+ | PTW_Invalid_PTE (() ) => "invalid-pte"
+ | PTW_No_Permission (() ) => "no-permission"
+ | PTW_Misaligned (() ) => "misaligned-superpage"
+ | PTW_PTE_Update (() ) => "pte-update-needed"
+ | PTW_Ext_Error (e) => "extension-error"
+ )))`;
-(*val num_of_PTW_Error : PTW_Error -> integer*)
+(*val ext_get_ptw_error : unit -> PTW_Error*)
val _ = Define `
- ((num_of_PTW_Error:PTW_Error -> int) arg_=
- ((case arg_ of
- PTW_Access => (( 0 : int):ii)
- | PTW_Invalid_PTE => (( 1 : int):ii)
- | PTW_No_Permission => (( 2 : int):ii)
- | PTW_Misaligned => (( 3 : int):ii)
- | PTW_PTE_Update => (( 4 : int):ii)
- )))`;
+ ((ext_get_ptw_error:unit -> PTW_Error) eptwf= (PTW_No_Permission () ))`;
-(*val ptw_error_to_str : PTW_Error -> string*)
+(*val translationException : AccessType unit -> PTW_Error -> ExceptionType*)
val _ = Define `
- ((ptw_error_to_str:PTW_Error -> string) e=
- ((case e of
- PTW_Access => "mem-access-error"
- | PTW_Invalid_PTE => "invalid-pte"
- | PTW_No_Permission => "no-permission"
- | PTW_Misaligned => "misaligned-superpage"
- | PTW_PTE_Update => "pte-update-needed"
+ ((translationException:(ext_access_type)AccessType -> PTW_Error -> ExceptionType) (a : ext_access_type AccessType) (f : PTW_Error)=
+ ((case (a, f) of
+ (_, PTW_Ext_Error (e)) => E_Extension ((ext_translate_exception e))
+ | (ReadWrite (_), PTW_Access (() )) => E_SAMO_Access_Fault ()
+ | (ReadWrite (_), _) => E_SAMO_Page_Fault ()
+ | (Read (_), PTW_Access (() )) => E_Load_Access_Fault ()
+ | (Read (_), _) => E_Load_Page_Fault ()
+ | (Write (_), PTW_Access (() )) => E_SAMO_Access_Fault ()
+ | (Write (_), _) => E_SAMO_Page_Fault ()
+ | (Execute (() ), PTW_Access (() )) => E_Fetch_Access_Fault ()
+ | (Execute (() ), _) => E_Fetch_Page_Fault ()
)))`;
-(*val translationException : AccessType -> PTW_Error -> ExceptionType*)
-
val _ = Define `
- ((translationException:AccessType -> PTW_Error -> ExceptionType) (a : AccessType) (f : PTW_Error)=
- ((case (a, f) of
- (ReadWrite, PTW_Access) => E_SAMO_Access_Fault
- | (ReadWrite, _) => E_SAMO_Page_Fault
- | (Read, PTW_Access) => E_Load_Access_Fault
- | (Read, _) => E_Load_Page_Fault
- | (Write, PTW_Access) => E_SAMO_Access_Fault
- | (Write, _) => E_SAMO_Page_Fault
- | (Fetch, PTW_Access) => E_Fetch_Access_Fault
- | (Fetch, _) => E_Fetch_Page_Fault
- )))`;
+((PAGESIZE_BITS:int)= ((( 12 : int):ii)))`;
(*val curAsid32 : mword ty32 -> mword ty9*)
val _ = Define `
- ((curAsid32:(32)words$word ->(9)words$word) satp1=
- (let s = (Mk_Satp32 satp1) in
+ ((curAsid32:(32)words$word ->(9)words$word) satp=
+ (let s = (Mk_Satp32 satp) in
(get_Satp32_Asid s : 9 words$word)))`;
(*val curPTB32 : mword ty32 -> mword ty34*)
val _ = Define `
- ((curPTB32:(32)words$word ->(34)words$word) satp1=
- (let (s : Satp32) = (Mk_Satp32 satp1) in
+ ((curPTB32:(32)words$word ->(34)words$word) satp=
+ (let (s : Satp32) = (Mk_Satp32 satp) in
(shiftl ((EXTZ (( 34 : int):ii) ((get_Satp32_PPN s : 22 words$word)) : 34 words$word)) PAGESIZE_BITS
: 34 words$word)))`;
val _ = Define `
- ((SV32_LEVEL_BITS:int)= ((( 10 : int):ii)))`;
+((SV32_LEVEL_BITS:int)= ((( 10 : int):ii)))`;
val _ = Define `
- ((SV32_LEVELS:int)= ((( 2 : int):ii)))`;
+((SV32_LEVELS:int)= ((( 2 : int):ii)))`;
val _ = Define `
- ((PTE32_LOG_SIZE:int)= ((( 2 : int):ii)))`;
+((PTE32_LOG_SIZE:int)= ((( 2 : int):ii)))`;
val _ = Define `
- ((PTE32_SIZE:int)= ((( 4 : int):ii)))`;
+((PTE32_SIZE:int)= ((( 4 : int):ii)))`;
(*val Mk_SV32_Vaddr : mword ty32 -> SV32_Vaddr*)
@@ -13779,36 +16079,30 @@ val _ = Define `
(<| SV32_Vaddr_SV32_Vaddr_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32*)
-
val _ = Define `
((get_SV32_Vaddr_bits:SV32_Vaddr ->(32)words$word) v=
((subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_SV32_Vaddr_bits : register_ref regstate register_value SV32_Vaddr -> mword ty32 -> M unit*)
-
val _ = Define `
((set_SV32_Vaddr_bits:((regstate),(register_value),(SV32_Vaddr))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32 -> SV32_Vaddr*)
-
val _ = Define `
((update_SV32_Vaddr_bits:SV32_Vaddr ->(32)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_SV32_Vaddr_VPNi : SV32_Vaddr -> mword ty20*)
@@ -13824,11 +16118,11 @@ val _ = Define `
((set_SV32_Vaddr_VPNi:((regstate),(register_value),(SV32_Vaddr))register_ref ->(20)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 19 : int):ii) (( 0 : int):ii) : 20 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13836,17 +16130,23 @@ val _ = Define `
val _ = Define `
((update_SV32_Vaddr_VPNi:SV32_Vaddr ->(20)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 19 : int):ii) (( 0 : int):ii) : 20 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27 -> SV39_Vaddr*)
(*val _update_SV48_Vaddr_VPNi : SV48_Vaddr -> mword ty27 -> SV48_Vaddr*)
+(*val _get_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27*)
+
(*val _get_SV48_Vaddr_VPNi : SV48_Vaddr -> mword ty27*)
+(*val _set_SV39_Vaddr_VPNi : register_ref regstate register_value SV39_Vaddr -> mword ty27 -> M unit*)
+
(*val _set_SV48_Vaddr_VPNi : register_ref regstate register_value SV48_Vaddr -> mword ty27 -> M unit*)
(*val _get_SV32_Vaddr_PgOfs : SV32_Vaddr -> mword ty12*)
@@ -13862,11 +16162,11 @@ val _ = Define `
((set_SV32_Vaddr_PgOfs:((regstate),(register_value),(SV32_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13874,19 +16174,43 @@ val _ = Define `
val _ = Define `
((update_SV32_Vaddr_PgOfs:SV32_Vaddr ->(12)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12 -> SV32_Paddr*)
+
+(*val _update_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12 -> SV39_Paddr*)
+
+(*val _update_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12 -> SV39_Vaddr*)
+
(*val _update_SV48_Paddr_PgOfs : SV48_Paddr -> mword ty12 -> SV48_Paddr*)
+(*val _update_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12 -> SV48_Vaddr*)
+
+(*val _get_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12*)
+
+(*val _get_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12*)
+
+(*val _get_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12*)
+
(*val _get_SV48_Paddr_PgOfs : SV48_Paddr -> mword ty12*)
+(*val _get_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12*)
+
+(*val _set_SV32_Paddr_PgOfs : register_ref regstate register_value SV32_Paddr -> mword ty12 -> M unit*)
+
+(*val _set_SV39_Paddr_PgOfs : register_ref regstate register_value SV39_Paddr -> mword ty12 -> M unit*)
+
+(*val _set_SV39_Vaddr_PgOfs : register_ref regstate register_value SV39_Vaddr -> mword ty12 -> M unit*)
+
(*val _set_SV48_Paddr_PgOfs : register_ref regstate register_value SV48_Paddr -> mword ty12 -> M unit*)
+(*val _set_SV48_Vaddr_PgOfs : register_ref regstate register_value SV48_Vaddr -> mword ty12 -> M unit*)
+
(*val Mk_SV32_Paddr : mword ty34 -> SV32_Paddr*)
val _ = Define `
@@ -13894,36 +16218,30 @@ val _ = Define `
(<| SV32_Paddr_SV32_Paddr_chunk_0 := ((subrange_vec_dec v (( 33 : int):ii) (( 0 : int):ii) : 34 words$word)) |>))`;
-(*val _get_SV32_Paddr_bits : SV32_Paddr -> mword ty34*)
-
val _ = Define `
((get_SV32_Paddr_bits:SV32_Paddr ->(34)words$word) v=
((subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii) : 34 words$word)))`;
-(*val _set_SV32_Paddr_bits : register_ref regstate register_value SV32_Paddr -> mword ty34 -> M unit*)
-
val _ = Define `
((set_SV32_Paddr_bits:((regstate),(register_value),(SV32_Paddr))register_ref ->(34)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 33 : int):ii) (( 0 : int):ii) : 34 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Paddr_bits : SV32_Paddr -> mword ty34 -> SV32_Paddr*)
-
val _ = Define `
((update_SV32_Paddr_bits:SV32_Paddr ->(34)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 33 : int):ii) (( 0 : int):ii) : 34 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
(*val _get_SV32_Paddr_PPNi : SV32_Paddr -> mword ty22*)
@@ -13939,11 +16257,11 @@ val _ = Define `
((set_SV32_Paddr_PPNi:((regstate),(register_value),(SV32_Paddr))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13951,49 +16269,67 @@ val _ = Define `
val _ = Define `
((update_SV32_Paddr_PPNi:SV32_Paddr ->(22)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
+(*val _update_SV32_PTE_PPNi : SV32_PTE -> mword ty22 -> SV32_PTE*)
+
+(*val _update_SV39_PTE_PPNi : SV39_PTE -> mword ty44 -> SV39_PTE*)
+
+(*val _update_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44 -> SV39_Paddr*)
+
(*val _update_SV48_PTE_PPNi : SV48_PTE -> mword ty44 -> SV48_PTE*)
+(*val _update_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44 -> SV48_Paddr*)
+
+(*val _get_SV32_PTE_PPNi : SV32_PTE -> mword ty22*)
+
+(*val _get_SV39_PTE_PPNi : SV39_PTE -> mword ty44*)
+
+(*val _get_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44*)
+
(*val _get_SV48_PTE_PPNi : SV48_PTE -> mword ty44*)
+(*val _get_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44*)
+
+(*val _set_SV32_PTE_PPNi : register_ref regstate register_value SV32_PTE -> mword ty22 -> M unit*)
+
+(*val _set_SV39_PTE_PPNi : register_ref regstate register_value SV39_PTE -> mword ty44 -> M unit*)
+
+(*val _set_SV39_Paddr_PPNi : register_ref regstate register_value SV39_Paddr -> mword ty44 -> M unit*)
+
(*val _set_SV48_PTE_PPNi : register_ref regstate register_value SV48_PTE -> mword ty44 -> M unit*)
-(*val _get_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12*)
+(*val _set_SV48_Paddr_PPNi : register_ref regstate register_value SV48_Paddr -> mword ty44 -> M unit*)
val _ = Define `
((get_SV32_Paddr_PgOfs:SV32_Paddr ->(12)words$word) v=
((subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV32_Paddr_PgOfs : register_ref regstate register_value SV32_Paddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV32_Paddr_PgOfs:((regstate),(register_value),(SV32_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12 -> SV32_Paddr*)
-
val _ = Define `
((update_SV32_Paddr_PgOfs:SV32_Paddr ->(12)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
(*val Mk_SV32_PTE : mword ty32 -> SV32_PTE*)
@@ -14003,68 +16339,56 @@ val _ = Define `
(<| SV32_PTE_SV32_PTE_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_SV32_PTE_bits : SV32_PTE -> mword ty32*)
-
val _ = Define `
((get_SV32_PTE_bits:SV32_PTE ->(32)words$word) v=
((subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_SV32_PTE_bits : register_ref regstate register_value SV32_PTE -> mword ty32 -> M unit*)
-
val _ = Define `
((set_SV32_PTE_bits:((regstate),(register_value),(SV32_PTE))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_PTE_bits : SV32_PTE -> mword ty32 -> SV32_PTE*)
-
val _ = Define `
((update_SV32_PTE_bits:SV32_PTE ->(32)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_SV32_PTE_PPNi : SV32_PTE -> mword ty22*)
-
val _ = Define `
((get_SV32_PTE_PPNi:SV32_PTE ->(22)words$word) v=
((subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii) : 22 words$word)))`;
-(*val _set_SV32_PTE_PPNi : register_ref regstate register_value SV32_PTE -> mword ty22 -> M unit*)
-
val _ = Define `
((set_SV32_PTE_PPNi:((regstate),(register_value),(SV32_PTE))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_PTE_PPNi : SV32_PTE -> mword ty22 -> SV32_PTE*)
-
val _ = Define `
((update_SV32_PTE_PPNi:SV32_PTE ->(22)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_SV32_PTE_RSW : SV32_PTE -> mword ty2*)
@@ -14079,11 +16403,11 @@ val _ = Define `
((set_SV32_PTE_RSW:((regstate),(register_value),(SV32_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -14091,17 +16415,23 @@ val _ = Define `
val _ = Define `
((update_SV32_PTE_RSW:SV32_PTE ->(2)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_SV39_PTE_RSW : SV39_PTE -> mword ty2 -> SV39_PTE*)
(*val _update_SV48_PTE_RSW : SV48_PTE -> mword ty2 -> SV48_PTE*)
+(*val _get_SV39_PTE_RSW : SV39_PTE -> mword ty2*)
+
(*val _get_SV48_PTE_RSW : SV48_PTE -> mword ty2*)
+(*val _set_SV39_PTE_RSW : register_ref regstate register_value SV39_PTE -> mword ty2 -> M unit*)
+
(*val _set_SV48_PTE_RSW : register_ref regstate register_value SV48_PTE -> mword ty2 -> M unit*)
(*val _get_SV32_PTE_BITS : SV32_PTE -> mword ty8*)
@@ -14116,11 +16446,11 @@ val _ = Define `
((set_SV32_PTE_BITS:((regstate),(register_value),(SV32_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -14128,50 +16458,56 @@ val _ = Define `
val _ = Define `
((update_SV32_PTE_BITS:SV32_PTE ->(8)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_SV39_PTE_BITS : SV39_PTE -> mword ty8 -> SV39_PTE*)
+
(*val _update_SV48_PTE_BITS : SV48_PTE -> mword ty8 -> SV48_PTE*)
+(*val _get_SV39_PTE_BITS : SV39_PTE -> mword ty8*)
+
(*val _get_SV48_PTE_BITS : SV48_PTE -> mword ty8*)
+(*val _set_SV39_PTE_BITS : register_ref regstate register_value SV39_PTE -> mword ty8 -> M unit*)
+
(*val _set_SV48_PTE_BITS : register_ref regstate register_value SV48_PTE -> mword ty8 -> M unit*)
(*val curAsid64 : mword ty64 -> mword ty16*)
val _ = Define `
- ((curAsid64:(64)words$word ->(16)words$word) satp1=
- (let s = (Mk_Satp64 satp1) in
+ ((curAsid64:(64)words$word ->(16)words$word) satp=
+ (let s = (Mk_Satp64 satp) in
(get_Satp64_Asid s : 16 words$word)))`;
(*val curPTB64 : mword ty64 -> mword ty56*)
val _ = Define `
- ((curPTB64:(64)words$word ->(56)words$word) satp1=
- (let s = (Mk_Satp64 satp1) in
+ ((curPTB64:(64)words$word ->(56)words$word) satp=
+ (let s = (Mk_Satp64 satp) in
(shiftl ((EXTZ (( 56 : int):ii) ((get_Satp64_PPN s : 44 words$word)) : 56 words$word)) PAGESIZE_BITS
: 56 words$word)))`;
val _ = Define `
- ((SV39_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
+((SV39_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
val _ = Define `
- ((SV39_LEVELS:int)= ((( 3 : int):ii)))`;
+((SV39_LEVELS:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE39_LOG_SIZE:int)= ((( 3 : int):ii)))`;
+((PTE39_LOG_SIZE:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE39_SIZE:int)= ((( 8 : int):ii)))`;
+((PTE39_SIZE:int)= ((( 8 : int):ii)))`;
(*val Mk_SV39_Vaddr : mword ty39 -> SV39_Vaddr*)
@@ -14181,100 +16517,82 @@ val _ = Define `
(<| SV39_Vaddr_SV39_Vaddr_chunk_0 := ((subrange_vec_dec v (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)) |>))`;
-(*val _get_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39*)
-
val _ = Define `
((get_SV39_Vaddr_bits:SV39_Vaddr ->(39)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)))`;
-(*val _set_SV39_Vaddr_bits : register_ref regstate register_value SV39_Vaddr -> mword ty39 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_bits:((regstate),(register_value),(SV39_Vaddr))register_ref ->(39)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 38 : int):ii) (( 0 : int):ii) : 39 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_bits:SV39_Vaddr ->(39)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 38 : int):ii) (( 0 : int):ii) : 39 words$word))
- : 39 words$word))|>)))`;
-
+ : 39 words$word)) |>)))`;
-(*val _get_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27*)
val _ = Define `
((get_SV39_Vaddr_VPNi:SV39_Vaddr ->(27)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii) : 27 words$word)))`;
-(*val _set_SV39_Vaddr_VPNi : register_ref regstate register_value SV39_Vaddr -> mword ty27 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_VPNi:((regstate),(register_value),(SV39_Vaddr))register_ref ->(27)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_VPNi:SV39_Vaddr ->(27)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 39 words$word))|>)))`;
+ : 39 words$word)) |>)))`;
-(*val _get_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12*)
-
val _ = Define `
((get_SV39_Vaddr_PgOfs:SV39_Vaddr ->(12)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV39_Vaddr_PgOfs : register_ref regstate register_value SV39_Vaddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_PgOfs:((regstate),(register_value),(SV39_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_PgOfs:SV39_Vaddr ->(12)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 39 words$word))|>)))`;
+ : 39 words$word)) |>)))`;
(*val Mk_SV39_Paddr : mword ty56 -> SV39_Paddr*)
@@ -14284,100 +16602,82 @@ val _ = Define `
(<| SV39_Paddr_SV39_Paddr_chunk_0 := ((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)) |>))`;
-(*val _get_SV39_Paddr_bits : SV39_Paddr -> mword ty56*)
-
val _ = Define `
((get_SV39_Paddr_bits:SV39_Paddr ->(56)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)))`;
-(*val _set_SV39_Paddr_bits : register_ref regstate register_value SV39_Paddr -> mword ty56 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_bits:((regstate),(register_value),(SV39_Paddr))register_ref ->(56)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_bits : SV39_Paddr -> mword ty56 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_bits:SV39_Paddr ->(56)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
-(*val _get_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44*)
-
val _ = Define `
((get_SV39_Paddr_PPNi:SV39_Paddr ->(44)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii) : 44 words$word)))`;
-(*val _set_SV39_Paddr_PPNi : register_ref regstate register_value SV39_Paddr -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_PPNi:((regstate),(register_value),(SV39_Paddr))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_PPNi:SV39_Paddr ->(44)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
-(*val _get_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12*)
-
val _ = Define `
((get_SV39_Paddr_PgOfs:SV39_Paddr ->(12)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV39_Paddr_PgOfs : register_ref regstate register_value SV39_Paddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_PgOfs:((regstate),(register_value),(SV39_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_PgOfs:SV39_Paddr ->(12)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
(*val Mk_SV39_PTE : mword ty64 -> SV39_PTE*)
@@ -14387,146 +16687,160 @@ val _ = Define `
(<| SV39_PTE_SV39_PTE_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_SV39_PTE_bits : SV39_PTE -> mword ty64*)
-
val _ = Define `
((get_SV39_PTE_bits:SV39_PTE ->(64)words$word) v=
((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_SV39_PTE_bits : register_ref regstate register_value SV39_PTE -> mword ty64 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_bits:((regstate),(register_value),(SV39_PTE))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_bits : SV39_PTE -> mword ty64 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_bits:SV39_PTE ->(64)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_PPNi : SV39_PTE -> mword ty44*)
+(*val _get_SV39_PTE_Ext : SV39_PTE -> mword ty10*)
+
+val _ = Define `
+ ((get_SV39_PTE_Ext:SV39_PTE ->(10)words$word) v=
+ ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii) : 10 words$word)))`;
+
+
+(*val _set_SV39_PTE_Ext : register_ref regstate register_value SV39_PTE -> mword ty10 -> M unit*)
+
+val _ = Define `
+ ((set_SV39_PTE_Ext:((regstate),(register_value),(SV39_PTE))register_ref ->(10)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ SV39_PTE_SV39_PTE_chunk_0 :=
+ ((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec v (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_SV39_PTE_Ext : SV39_PTE -> mword ty10 -> SV39_PTE*)
+
+val _ = Define `
+ ((update_SV39_PTE_Ext:SV39_PTE ->(10)words$word -> SV39_PTE) v x=
+ (( v with<|
+ SV39_PTE_SV39_PTE_chunk_0 :=
+ ((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec x (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)))`;
+
+
+(*val _update_SV48_PTE_Ext : SV48_PTE -> mword ty10 -> SV48_PTE*)
+
+(*val _get_SV48_PTE_Ext : SV48_PTE -> mword ty10*)
+
+(*val _set_SV48_PTE_Ext : register_ref regstate register_value SV48_PTE -> mword ty10 -> M unit*)
val _ = Define `
((get_SV39_PTE_PPNi:SV39_PTE ->(44)words$word) v=
((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii) : 44 words$word)))`;
-(*val _set_SV39_PTE_PPNi : register_ref regstate register_value SV39_PTE -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_PPNi:((regstate),(register_value),(SV39_PTE))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_PPNi : SV39_PTE -> mword ty44 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_PPNi:SV39_PTE ->(44)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_RSW : SV39_PTE -> mword ty2*)
val _ = Define `
((get_SV39_PTE_RSW:SV39_PTE ->(2)words$word) v= ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii) : 2 words$word)))`;
-(*val _set_SV39_PTE_RSW : register_ref regstate register_value SV39_PTE -> mword ty2 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_RSW:((regstate),(register_value),(SV39_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_RSW : SV39_PTE -> mword ty2 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_RSW:SV39_PTE ->(2)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_BITS : SV39_PTE -> mword ty8*)
-
val _ = Define `
((get_SV39_PTE_BITS:SV39_PTE ->(8)words$word) v= ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_SV39_PTE_BITS : register_ref regstate register_value SV39_PTE -> mword ty8 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_BITS:((regstate),(register_value),(SV39_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_BITS : SV39_PTE -> mword ty8 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_BITS:SV39_PTE ->(8)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
- ((SV48_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
+((SV48_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
val _ = Define `
- ((SV48_LEVELS:int)= ((( 4 : int):ii)))`;
+((SV48_LEVELS:int)= ((( 4 : int):ii)))`;
val _ = Define `
- ((PTE48_LOG_SIZE:int)= ((( 3 : int):ii)))`;
+((PTE48_LOG_SIZE:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE48_SIZE:int)= ((( 8 : int):ii)))`;
+((PTE48_SIZE:int)= ((( 8 : int):ii)))`;
(*val Mk_SV48_Vaddr : mword ty48 -> SV48_Vaddr*)
@@ -14536,36 +16850,30 @@ val _ = Define `
(<| SV48_Vaddr_SV48_Vaddr_chunk_0 := ((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)) |>))`;
-(*val _get_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48*)
-
val _ = Define `
((get_SV48_Vaddr_bits:SV48_Vaddr ->(48)words$word) v=
((subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)))`;
-(*val _set_SV48_Vaddr_bits : register_ref regstate register_value SV48_Vaddr -> mword ty48 -> M unit*)
-
val _ = Define `
((set_SV48_Vaddr_bits:((regstate),(register_value),(SV48_Vaddr))register_ref ->(48)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48 -> SV48_Vaddr*)
-
val _ = Define `
((update_SV48_Vaddr_bits:SV48_Vaddr ->(48)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
val _ = Define `
@@ -14577,53 +16885,47 @@ val _ = Define `
((set_SV48_Vaddr_VPNi:((regstate),(register_value),(SV48_Vaddr))register_ref ->(27)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_Vaddr_VPNi:SV48_Vaddr ->(27)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
-(*val _get_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12*)
-
val _ = Define `
((get_SV48_Vaddr_PgOfs:SV48_Vaddr ->(12)words$word) v=
((subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV48_Vaddr_PgOfs : register_ref regstate register_value SV48_Vaddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV48_Vaddr_PgOfs:((regstate),(register_value),(SV48_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12 -> SV48_Vaddr*)
-
val _ = Define `
((update_SV48_Vaddr_PgOfs:SV48_Vaddr ->(12)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
(*val Mk_SV48_Paddr : mword ty56 -> SV48_Paddr*)
@@ -14633,68 +16935,56 @@ val _ = Define `
(<| SV48_Paddr_SV48_Paddr_chunk_0 := ((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)) |>))`;
-(*val _get_SV48_Paddr_bits : SV48_Paddr -> mword ty56*)
-
val _ = Define `
((get_SV48_Paddr_bits:SV48_Paddr ->(56)words$word) v=
((subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)))`;
-(*val _set_SV48_Paddr_bits : register_ref regstate register_value SV48_Paddr -> mword ty56 -> M unit*)
-
val _ = Define `
((set_SV48_Paddr_bits:((regstate),(register_value),(SV48_Paddr))register_ref ->(56)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Paddr_bits : SV48_Paddr -> mword ty56 -> SV48_Paddr*)
-
val _ = Define `
((update_SV48_Paddr_bits:SV48_Paddr ->(56)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)))`;
-
+ : 56 words$word)) |>)))`;
-(*val _get_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44*)
val _ = Define `
((get_SV48_Paddr_PPNi:SV48_Paddr ->(44)words$word) v=
((subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii) : 44 words$word)))`;
-(*val _set_SV48_Paddr_PPNi : register_ref regstate register_value SV48_Paddr -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV48_Paddr_PPNi:((regstate),(register_value),(SV48_Paddr))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44 -> SV48_Paddr*)
-
val _ = Define `
((update_SV48_Paddr_PPNi:SV48_Paddr ->(44)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
val _ = Define `
@@ -14706,21 +16996,21 @@ val _ = Define `
((set_SV48_Paddr_PgOfs:((regstate),(register_value),(SV48_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_Paddr_PgOfs:SV48_Paddr ->(12)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
(*val Mk_SV48_PTE : mword ty64 -> SV48_PTE*)
@@ -14739,21 +17029,47 @@ val _ = Define `
((set_SV48_PTE_bits:((regstate),(register_value),(SV48_PTE))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_bits:SV48_PTE ->(64)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_SV48_PTE_Ext:SV48_PTE ->(10)words$word) v=
+ ((subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii) : 10 words$word)))`;
+
+
+val _ = Define `
+ ((set_SV48_PTE_Ext:((regstate),(register_value),(SV48_PTE))register_ref ->(10)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ SV48_PTE_SV48_PTE_chunk_0 :=
+ ((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec v (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_SV48_PTE_Ext:SV48_PTE ->(10)words$word -> SV48_PTE) v x=
+ (( v with<|
+ SV48_PTE_SV48_PTE_chunk_0 :=
+ ((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec x (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14765,21 +17081,21 @@ val _ = Define `
((set_SV48_PTE_PPNi:((regstate),(register_value),(SV48_PTE))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_PPNi:SV48_PTE ->(44)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14790,21 +17106,21 @@ val _ = Define `
((set_SV48_PTE_RSW:((regstate),(register_value),(SV48_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_RSW:SV48_PTE ->(2)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14815,21 +17131,21 @@ val _ = Define `
((set_SV48_PTE_BITS:((regstate),(register_value),(SV48_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_BITS:SV48_PTE ->(8)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val make_TLB_Entry : forall 'asidlen 'palen 'ptelen 'valen. Size 'asidlen, Size 'palen, Size 'ptelen, Size 'valen => mword 'asidlen -> bool -> mword 'valen -> mword 'palen -> mword 'ptelen -> ii -> mword 'palen -> ii -> M (TLB_Entry 'asidlen 'valen 'palen 'ptelen)*)
@@ -14837,17 +17153,16 @@ val _ = Define `
val _ = Define `
((make_TLB_Entry:'asidlen words$word -> bool -> 'valen words$word -> 'palen words$word -> 'ptelen words$word -> int -> 'palen words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('asidlen,'valen,'palen,'ptelen)TLB_Entry),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid global vAddr pAddr pte level pteAddr levelBitSize=
(let (shift : ii) = (PAGESIZE_BITS + ((level * levelBitSize))) in
- let vAddrMask =
+ let (vAddrMask : 'valen words$word) =
((sub_vec_int
((shiftl
((xor_vec vAddr
- ((xor_vec vAddr
- ((EXTZ ((int_of_num (words$word_len vAddr))) (vec_of_bits [B1] : 1 words$word) : 'valen words$word))
+ ((xor_vec vAddr ((EXTZ ((int_of_num (words$word_len vAddr))) (0b1w : 1 words$word) : 'valen words$word))
: 'valen words$word))
: 'valen words$word)) shift
: 'valen words$word)) (( 1 : int):ii)
: 'valen words$word)) in
- let vMatchMask = ((not_vec vAddrMask : 'valen words$word)) in sail2_state_monad$bindS
+ let (vMatchMask : 'valen words$word) = ((not_vec vAddrMask : 'valen words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS (<| TLB_Entry_asid := asid;
TLB_Entry_global := global;
@@ -14888,10 +17203,10 @@ val _ = Define `
((to_phys_addr:(34)words$word ->(32)words$word) a= ((subrange_vec_dec a (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val walk32 : mword ty32 -> AccessType -> Privilege -> bool -> bool -> mword ty34 -> ii -> bool -> M (PTW_Result (mword ty34) SV32_PTE)*)
+(*val walk32 : mword ty32 -> AccessType unit -> Privilege -> bool -> bool -> mword ty34 -> ii -> bool -> unit -> M (PTW_Result (mword ty34) SV32_PTE)*)
val walk32_defn = Hol_defn "walk32" `
- ((walk32:(32)words$word -> AccessType -> Privilege -> bool -> bool ->(34)words$word -> int -> bool ->(regstate)sail2_state_monad$sequential_state ->((((((34)words$word),(SV32_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global=
+ ((walk32:(32)words$word ->(unit)AccessType -> Privilege -> bool -> bool ->(34)words$word -> int -> bool -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((34)words$word),(SV32_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global ext_ptw=
(let va = (Mk_SV32_Vaddr vaddr) in
let (pt_ofs : paddr32) =
((shiftl
@@ -14904,63 +17219,70 @@ val _ = Define `
: 34 words$word)) PTE32_LOG_SIZE
: 34 words$word)) in
let pte_addr = ((add_vec ptb pt_ofs : 34 words$word)) in sail2_state_monad$bindS
- (mem_read ac ((to_phys_addr pte_addr : 32 words$word)) (( 4 : int):ii) F F F
+ (mem_read_priv (Read Data) Supervisor ((to_phys_addr pte_addr : 32 words$word)) (( 4 : int):ii) F F
+ F
: ( ( 32 words$word)MemoryOpResult) M) (\ (w__0 : ( 32 words$word) MemoryOpResult) .
(case w__0 of
- MemException (_) => sail2_state_monad$returnS (PTW_Failure PTW_Access)
+ MemException (_) => sail2_state_monad$returnS (PTW_Failure (PTW_Access () , ext_ptw))
| MemValue (v) =>
let pte = (Mk_SV32_PTE v) in
let pbits = ((get_SV32_PTE_BITS pte : 8 words$word)) in
+ let (ext_pte : extPte) = default_sv32_ext_pte in
let pattr = (Mk_PTE_Bits pbits) in
let is_global =
- (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))) in
- if ((isInvalidPTE pbits)) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else if ((isPTEPtr pbits)) then
- if (((level = (( 0 : int):ii)))) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else
+ (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = (0b1w : 1 words$word))))) in
+ if ((isInvalidPTE pbits ext_pte)) then sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
+ else if ((isPTEPtr pbits ext_pte)) then
+ if ((level > (( 0 : int):ii))) then
(walk32 vaddr ac priv mxr do_sum
((shiftl ((EXTZ (( 34 : int):ii) ((get_SV32_PTE_PPNi pte : 22 words$word)) : 34 words$word))
PAGESIZE_BITS
- : 34 words$word)) ((level - (( 1 : int):ii))) is_global
+ : 34 words$word)) ((level - (( 1 : int):ii))) is_global ext_ptw
: ( (( 34 words$word), SV32_PTE)PTW_Result) M)
+ else sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
else sail2_state_monad$bindS
- (checkPTEPermission ac priv mxr do_sum pattr) (\ (w__3 : bool) .
- sail2_state_monad$returnS (if ((~ w__3)) then PTW_Failure PTW_No_Permission
- else if ((level > (( 0 : int):ii))) then
- let mask =
- ((sub_vec_int
- ((shiftl
- ((xor_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
- ((xor_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
- ((EXTZ (( 22 : int):ii) (vec_of_bits [B1] : 1 words$word) : 22 words$word))
- : 22 words$word))
- : 22 words$word)) ((level * SV32_LEVEL_BITS))
- : 22 words$word)) (( 1 : int):ii)
- : 22 words$word)) in
- if (((((and_vec ((get_SV32_PTE_PPNi pte : 22 words$word)) mask : 22 words$word)) <> ((EXTZ (( 22 : int):ii) (vec_of_bits [B0] : 1 words$word) : 22 words$word))))) then
- PTW_Failure PTW_Misaligned
- else
- let ppn =
- ((or_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
- ((and_vec
- ((EXTZ (( 22 : int):ii) ((get_SV32_Vaddr_VPNi va : 20 words$word)) : 22 words$word))
- mask
- : 22 words$word))
- : 22 words$word)) in
- PTW_Success ((concat_vec ppn ((get_SV32_Vaddr_PgOfs va : 12 words$word))
- : 34 words$word),
- pte,
- pte_addr,
- level,
- is_global)
- else
- PTW_Success ((concat_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
- ((get_SV32_Vaddr_PgOfs va : 12 words$word))
- : 34 words$word),
- pte,
- pte_addr,
- level,
- is_global)))
+ (checkPTEPermission ac priv mxr do_sum pattr ext_pte ext_ptw) (\ (w__3 : PTE_Check) .
+ sail2_state_monad$returnS ((case w__3 of
+ PTE_Check_Failure ((ext_ptw, ext_ptw_fail)) =>
+ PTW_Failure (ext_get_ptw_error ext_ptw_fail, ext_ptw)
+ | PTE_Check_Success (ext_ptw) =>
+ if ((level > (( 0 : int):ii))) then
+ let mask =
+ ((sub_vec_int
+ ((shiftl
+ ((xor_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
+ ((xor_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
+ ((EXTZ (( 22 : int):ii) (0b1w : 1 words$word) : 22 words$word))
+ : 22 words$word))
+ : 22 words$word)) ((level * SV32_LEVEL_BITS))
+ : 22 words$word)) (( 1 : int):ii)
+ : 22 words$word)) in
+ if (((((and_vec ((get_SV32_PTE_PPNi pte : 22 words$word)) mask : 22 words$word)) <> ((EXTZ (( 22 : int):ii) (0b0w : 1 words$word) : 22 words$word))))) then
+ PTW_Failure (PTW_Misaligned () , ext_ptw)
+ else
+ let ppn =
+ ((or_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
+ ((and_vec
+ ((EXTZ (( 22 : int):ii) ((get_SV32_Vaddr_VPNi va : 20 words$word)) : 22 words$word))
+ mask
+ : 22 words$word))
+ : 22 words$word)) in
+ PTW_Success ((concat_vec ppn ((get_SV32_Vaddr_PgOfs va : 12 words$word)) : 34 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ else
+ PTW_Success ((concat_vec ((get_SV32_PTE_PPNi pte : 22 words$word))
+ ((get_SV32_Vaddr_PgOfs va : 12 words$word))
+ : 34 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ )))
))))`;
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn walk32_defn;
@@ -15002,68 +17324,80 @@ val _ = Define `
))))`;
-(*val translate32 : mword ty9 -> mword ty34 -> mword ty32 -> AccessType -> Privilege -> bool -> bool -> ii -> M (TR_Result (mword ty34) PTW_Error)*)
+(*val translate32 : mword ty9 -> mword ty34 -> mword ty32 -> AccessType unit -> Privilege -> bool -> bool -> ii -> unit -> M (TR_Result (mword ty34) PTW_Error)*)
val _ = Define `
- ((translate32:(9)words$word ->(34)words$word ->(32)words$word -> AccessType -> Privilege -> bool -> bool -> int ->(regstate)sail2_state_monad$sequential_state ->((((((34)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level= (sail2_state_monad$bindS
+ ((translate32:(9)words$word ->(34)words$word ->(32)words$word ->(unit)AccessType -> Privilege -> bool -> bool -> int -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((34)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level ext_ptw= (sail2_state_monad$bindS
(lookup_TLB32 asid vAddr) (\ (w__0 : ((ii # (9, 32, 34, 32) TLB_Entry))option) .
(case w__0 of
SOME ((idx, ent)) =>
let pte = (Mk_SV32_PTE ent.TLB_Entry_pte) in
+ let (ext_pte : extPte) = ((zeros_implicit (( 10 : int):ii) : 10 words$word)) in
let pteBits = (Mk_PTE_Bits ((get_SV32_PTE_BITS pte : 8 words$word))) in sail2_state_monad$bindS
- (checkPTEPermission ac priv mxr do_sum pteBits) (\ (w__1 : bool) .
- if ((~ w__1)) then sail2_state_monad$returnS (TR_Failure PTW_No_Permission)
- else
- (case ((update_PTE_Bits pteBits ac)) of
- NONE =>
- sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
- ((EXTZ (( 34 : int):ii)
- ((and_vec vAddr ent.TLB_Entry_vAddrMask : 32 words$word))
- : 34 words$word))
- : 34 words$word)))
- | SOME (pbits) =>
- if ((~ ((plat_enable_dirty_update () )))) then sail2_state_monad$returnS (TR_Failure PTW_PTE_Update)
- else
- let n_pte = (update_SV32_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
- let (n_ent : TLB32_Entry) = ent in
- let n_ent = ((n_ent with<| TLB_Entry_pte := ((get_SV32_PTE_bits n_pte : 32 words$word))|>)) in sail2_state_monad$bindS (sail2_state_monad$seqS
- (write_TLB32 idx n_ent)
- (mem_write_value
- ((to_phys_addr ((EXTZ (( 34 : int):ii) ent.TLB_Entry_pteAddr : 34 words$word)) : 32 words$word))
- (( 4 : int):ii) ((get_SV32_PTE_bits n_pte : 32 words$word)) F F F)) (\ (w__2 : bool
- MemoryOpResult) . sail2_state_monad$seqS
- (case w__2 of
- MemValue (_) => sail2_state_monad$returnS ()
- | MemException (e) => internal_error "invalid physical address in TLB"
- )
- (sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
- ((EXTZ (( 34 : int):ii)
- ((and_vec vAddr ent.TLB_Entry_vAddrMask : 32 words$word))
- : 34 words$word))
- : 34 words$word)))))
- ))
+ (checkPTEPermission ac priv mxr do_sum pteBits ext_pte ext_ptw) (\ (w__1 : PTE_Check) .
+ (case w__1 of
+ PTE_Check_Failure ((ext_ptw, ext_ptw_fail)) =>
+ sail2_state_monad$returnS (TR_Failure (ext_get_ptw_error ext_ptw_fail, ext_ptw))
+ | PTE_Check_Success (ext_ptw) =>
+ (case ((update_PTE_Bits pteBits ac ext_pte : ((PTE_Bits # 10 words$word))option)) of
+ NONE =>
+ sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
+ ((EXTZ (( 34 : int):ii)
+ ((and_vec vAddr ent.TLB_Entry_vAddrMask : 32 words$word))
+ : 34 words$word))
+ : 34 words$word),
+ ext_ptw))
+ | SOME ((pbits, ext)) =>
+ if ((~ ((plat_enable_dirty_update () )))) then
+ sail2_state_monad$returnS (TR_Failure (PTW_PTE_Update () , ext_ptw))
+ else
+ let n_pte = (update_SV32_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
+ let (n_ent : TLB32_Entry) = ent in
+ let n_ent =
+ (( n_ent with<| TLB_Entry_pte := ((get_SV32_PTE_bits n_pte : 32 words$word)) |>)) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ (write_TLB32 idx n_ent)
+ (mem_write_value_priv
+ ((to_phys_addr ((EXTZ (( 34 : int):ii) ent.TLB_Entry_pteAddr : 34 words$word)) : 32 words$word))
+ (( 4 : int):ii) ((get_SV32_PTE_bits n_pte : 32 words$word)) Supervisor F F F)) (\ (w__2 : bool
+ MemoryOpResult) . sail2_state_monad$seqS
+ (case w__2 of
+ MemValue (_) => sail2_state_monad$returnS ()
+ | MemException (e) => internal_error "invalid physical address in TLB"
+ )
+ (sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
+ ((EXTZ (( 34 : int):ii)
+ ((and_vec vAddr ent.TLB_Entry_vAddrMask : 32 words$word))
+ : 34 words$word))
+ : 34 words$word),
+ ext_ptw))))
+ )
+ ))
| NONE => sail2_state_monad$bindS
- (walk32 vAddr ac priv mxr do_sum ptb level F : ( (( 34 words$word), SV32_PTE)PTW_Result) M) (\ (w__6 : (( 34 words$word), SV32_PTE)
- PTW_Result) .
+ (walk32 vAddr ac priv mxr do_sum ptb level F ext_ptw
+ : ( (( 34 words$word), SV32_PTE)PTW_Result) M) (\ (w__6 : (( 34 words$word), SV32_PTE) PTW_Result) .
(case w__6 of
- PTW_Failure (f) => sail2_state_monad$returnS (TR_Failure f)
- | PTW_Success ((pAddr, pte, pteAddr, level, global)) =>
- (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV32_PTE_BITS pte : 8 words$word)))) ac)) of
+ PTW_Failure ((f, ext_ptw)) => sail2_state_monad$returnS (TR_Failure (f, ext_ptw))
+ | PTW_Success ((pAddr, pte, pteAddr, level, global, ext_ptw)) =>
+ (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV32_PTE_BITS pte : 8 words$word)))) ac
+ ((zeros_implicit (( 10 : int):ii) : 10 words$word))
+ : ((PTE_Bits # 10 words$word))option)) of
NONE => sail2_state_monad$seqS
- (add_to_TLB32 asid vAddr pAddr pte pteAddr level global) (sail2_state_monad$returnS (TR_Address pAddr))
- | SOME (pbits) =>
- if ((~ ((plat_enable_dirty_update () )))) then sail2_state_monad$returnS (TR_Failure PTW_PTE_Update)
+ (add_to_TLB32 asid vAddr pAddr pte pteAddr level global)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | SOME ((pbits, ext)) =>
+ if ((~ ((plat_enable_dirty_update () )))) then
+ sail2_state_monad$returnS (TR_Failure (PTW_PTE_Update () , ext_ptw))
else
let (w_pte : SV32_PTE) =
(update_SV32_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in sail2_state_monad$bindS
- (mem_write_value ((to_phys_addr pteAddr : 32 words$word)) (( 4 : int):ii)
- ((get_SV32_PTE_bits w_pte : 32 words$word)) F F F) (\ (w__7 : bool
+ (mem_write_value_priv ((to_phys_addr pteAddr : 32 words$word)) (( 4 : int):ii)
+ ((get_SV32_PTE_bits w_pte : 32 words$word)) Supervisor F F F) (\ (w__7 : bool
MemoryOpResult) .
(case w__7 of
MemValue (_) => sail2_state_monad$seqS
(add_to_TLB32 asid vAddr pAddr w_pte pteAddr level global)
- (sail2_state_monad$returnS (TR_Address pAddr))
- | MemException (e) => sail2_state_monad$returnS (TR_Failure PTW_Access)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | MemException (e) => sail2_state_monad$returnS (TR_Failure (PTW_Access () , ext_ptw))
))
)
))
@@ -15087,9 +17421,7 @@ val _ = Define `
val _ = Define `
((translationMode:Privilege ->(regstate)sail2_state_monad$sequential_state ->(((SATPMode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) priv=
- (if (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- then
- sail2_state_monad$returnS Sbare
+ (if (((priv = Machine))) then sail2_state_monad$returnS Sbare
else sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
let arch = (architecture ((get_mstatus_SXL w__0 : 2 words$word))) in
@@ -15097,48 +17429,49 @@ val _ = Define `
SOME (RV32) => sail2_state_monad$bindS
(sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
let s = (Mk_Satp32 ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))) in
- sail2_state_monad$returnS (if (((((get_Satp32_Mode s : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))
- then
- Sbare
+ sail2_state_monad$returnS (if (((((get_Satp32_Mode s : 1 words$word)) = (0b0w : 1 words$word)))) then Sbare
else Sv32))
| _ => internal_error "unsupported address translation arch"
))))`;
-(*val translateAddr : mword ty32 -> AccessType -> M (TR_Result (mword ty32) ExceptionType)*)
+(*val translateAddr_priv : mword ty32 -> AccessType unit -> Privilege -> M (TR_Result (mword ty32) ExceptionType)*)
val _ = Define `
- ((translateAddr:(32)words$word -> AccessType ->(regstate)sail2_state_monad$sequential_state ->((((((32)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac= (sail2_state_monad$bindS
- (case ac of
- Execute => sail2_state_monad$read_regS cur_privilege_ref
- | _ => sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . effectivePrivilege w__1 w__2))
- ) (\ (effPriv : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
- let (mxr : bool) =
- (((get_Mstatus_MXR w__4 : 1 words$word)) = ((bool_to_bits T : 1 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__5 : Mstatus) .
- let (do_sum : bool) =
- (((get_Mstatus_SUM w__5 : 1 words$word)) = ((bool_to_bits T : 1 words$word))) in sail2_state_monad$bindS
+ ((translateAddr_priv:(32)words$word ->(unit)AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((((32)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac effPriv= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
+ let (mxr : bool) = (((get_Mstatus_MXR w__0 : 1 words$word)) = (0b1w : 1 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ let (do_sum : bool) = (((get_Mstatus_SUM w__1 : 1 words$word)) = (0b1w : 1 words$word)) in sail2_state_monad$bindS
(translationMode effPriv) (\ (mode : SATPMode) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__6 : 32 words$word) .
- let asid = ((curAsid32 w__6 : 9 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__7 : 32 words$word) .
- let ptb = ((curPTB32 w__7 : 34 words$word)) in
+ (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ let asid = ((curAsid32 w__2 : 9 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__3 : 32 words$word) .
+ let ptb = ((curPTB32 w__3 : 34 words$word)) in
+ let (ext_ptw : ext_ptw) = init_ext_ptw in
(case mode of
- Sbare => sail2_state_monad$returnS (TR_Address vAddr)
+ Sbare => sail2_state_monad$returnS (TR_Address (vAddr, ext_ptw))
| Sv32 => sail2_state_monad$bindS
- (translate32 asid ptb vAddr ac effPriv mxr do_sum ((SV32_LEVELS - (( 1 : int):ii)))
- : ( (( 34 words$word), PTW_Error)TR_Result) M) (\ (w__8 : (( 34 words$word), PTW_Error) TR_Result) .
- sail2_state_monad$returnS ((case w__8 of
- TR_Address (pa) => TR_Address ((to_phys_addr pa : 32 words$word))
- | TR_Failure (f) => TR_Failure ((translationException ac f))
+ (translate32 asid ptb vAddr ac effPriv mxr do_sum ((SV32_LEVELS - (( 1 : int):ii))) ext_ptw
+ : ( (( 34 words$word), PTW_Error)TR_Result) M) (\ (w__4 : (( 34 words$word), PTW_Error) TR_Result) .
+ sail2_state_monad$returnS ((case w__4 of
+ TR_Address ((pa, ext_ptw)) => TR_Address ((to_phys_addr pa : 32 words$word), ext_ptw)
+ | TR_Failure ((f, ext_ptw)) => TR_Failure (translationException ac f, ext_ptw)
)))
| _ =>
(internal_error "unsupported address translation scheme"
: ( (( 32 words$word), ExceptionType)TR_Result) M)
- )))))))))`;
+ ))))))))`;
+
+
+(*val translateAddr : mword ty32 -> AccessType unit -> M (TR_Result (mword ty32) ExceptionType)*)
+
+val _ = Define `
+ ((translateAddr:(32)words$word ->(unit)AccessType ->(regstate)sail2_state_monad$sequential_state ->((((((32)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege ac w__0 w__1) (\ (w__2 : Privilege) .
+ (translateAddr_priv vAddr ac w__2 : ( (( 32 words$word), ExceptionType)TR_Result) M))))))`;
(*val flush_TLB : maybe (mword ty32) -> maybe (mword ty32) -> M unit*)
@@ -15161,51 +17494,83 @@ val _ = Define `
(*val execute : ast -> M Retired*)
+(*val assembly_forwards : ast -> M string*)
+
+(*val assembly_backwards : string -> M ast*)
+
+(*val assembly_forwards_matches : ast -> bool*)
+
+(*val assembly_backwards_matches : string -> bool*)
+
+(*val assembly_matches_prefix : string -> maybe ((ast * ii))*)
+
+(*val encdec_forwards : ast -> M (mword ty32)*)
+
+(*val encdec_backwards : mword ty32 -> M ast*)
+
+(*val encdec_forwards_matches : ast -> M bool*)
+
+(*val encdec_backwards_matches : mword ty32 -> M bool*)
+
+(*val encdec_compressed_forwards : ast -> M (mword ty16)*)
+
+(*val encdec_compressed_backwards : mword ty16 -> M ast*)
+
+(*val encdec_compressed_forwards_matches : ast -> M bool*)
+
+(*val encdec_compressed_backwards_matches : mword ty16 -> M bool*)
+
(*val encdec_uop_forwards : uop -> mword ty7*)
+(*val encdec_uop_backwards : mword ty7 -> M uop*)
+
+(*val encdec_uop_forwards_matches : uop -> bool*)
+
+(*val encdec_uop_backwards_matches : mword ty7 -> bool*)
+
val _ = Define `
((encdec_uop_forwards:uop ->(7)words$word) arg_=
((case arg_ of
- RISCV_LUI => (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)
- | RISCV_AUIPC => (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)
+ RISCV_LUI => (0b0110111w : 7 words$word)
+ | RISCV_AUIPC => (0b0010111w : 7 words$word)
)))`;
-(*val encdec_uop_backwards : mword ty7 -> M uop*)
-
val _ = Define `
((encdec_uop_backwards:(7)words$word ->(regstate)sail2_state_monad$sequential_state ->(((uop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)))) then sail2_state_monad$returnS RISCV_LUI
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)))) then sail2_state_monad$returnS RISCV_AUIPC
+ if (((b__0 = (0b0110111w : 7 words$word)))) then sail2_state_monad$returnS RISCV_LUI
+ else if (((b__0 = (0b0010111w : 7 words$word)))) then sail2_state_monad$returnS RISCV_AUIPC
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_uop_forwards_matches : uop -> bool*)
-
val _ = Define `
((encdec_uop_forwards_matches:uop -> bool) arg_=
((case arg_ of RISCV_LUI => T | RISCV_AUIPC => T )))`;
-(*val encdec_uop_backwards_matches : mword ty7 -> bool*)
-
val _ = Define `
((encdec_uop_backwards_matches:(7)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)))) then T
+ if (((b__0 = (0b0110111w : 7 words$word)))) then T
+ else if (((b__0 = (0b0010111w : 7 words$word)))) then T
else F))`;
(*val utype_mnemonic_forwards : uop -> string*)
+(*val utype_mnemonic_backwards : string -> M uop*)
+
+(*val utype_mnemonic_forwards_matches : uop -> bool*)
+
+(*val utype_mnemonic_backwards_matches : string -> bool*)
+
+(*val utype_mnemonic_matches_prefix : string -> maybe ((uop * ii))*)
+
val _ = Define `
((utype_mnemonic_forwards:uop -> string) arg_= ((case arg_ of RISCV_LUI => "lui" | RISCV_AUIPC => "auipc" )))`;
-(*val utype_mnemonic_backwards : string -> M uop*)
-
val _ = Define `
((utype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((uop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15214,15 +17579,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val utype_mnemonic_forwards_matches : uop -> bool*)
-
val _ = Define `
((utype_mnemonic_forwards_matches:uop -> bool) arg_=
((case arg_ of RISCV_LUI => T | RISCV_AUIPC => T )))`;
-(*val utype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((utype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15231,38 +17592,36 @@ val _ = Define `
else F))`;
-(*val utype_mnemonic_matches_prefix : string -> maybe ((uop * ii))*)
-
-(*val _s496_ : string -> maybe string*)
+(*val _s761_ : string -> maybe string*)
val _ = Define `
- ((s496_:string ->(string)option) s497_0=
- (let s498_0 = s497_0 in
- if ((string_startswith s498_0 "auipc")) then
- (case ((string_drop s498_0 ((string_length "auipc")))) of s_ => SOME s_ )
+ ((s761_:string ->(string)option) s762_0=
+ (let s763_0 = s762_0 in
+ if ((string_startswith s763_0 "auipc")) then
+ (case ((string_drop s763_0 ((string_length "auipc")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s492_ : string -> maybe string*)
+(*val _s757_ : string -> maybe string*)
val _ = Define `
- ((s492_:string ->(string)option) s493_0=
- (let s494_0 = s493_0 in
- if ((string_startswith s494_0 "lui")) then
- (case ((string_drop s494_0 ((string_length "lui")))) of s_ => SOME s_ )
+ ((s757_:string ->(string)option) s758_0=
+ (let s759_0 = s758_0 in
+ if ((string_startswith s759_0 "lui")) then
+ (case ((string_drop s759_0 ((string_length "lui")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((utype_mnemonic_matches_prefix:string ->(uop#int)option) arg_=
- (let s495_0 = arg_ in
- if ((case ((s492_ s495_0)) of SOME (s_) => T | _ => F )) then
- (case s492_ s495_0 of
+ (let s760_0 = arg_ in
+ if ((case ((s757_ s760_0)) of SOME (s_) => T | _ => F )) then
+ (case s757_ s760_0 of
(SOME (s_)) =>
SOME (RISCV_LUI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s496_ s495_0)) of SOME (s_) => T | _ => F )) then
- (case s496_ s495_0 of
+ else if ((case ((s761_ s760_0)) of SOME (s_) => T | _ => F )) then
+ (case s761_ s760_0 of
(SOME (s_)) =>
SOME (RISCV_AUIPC, ((string_length arg_)) - ((string_length s_)))
)
@@ -15271,34 +17630,36 @@ val _ = Define `
(*val encdec_bop_forwards : bop -> mword ty3*)
+(*val encdec_bop_backwards : mword ty3 -> M bop*)
+
+(*val encdec_bop_forwards_matches : bop -> bool*)
+
+(*val encdec_bop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_bop_forwards:bop ->(3)words$word) arg_=
((case arg_ of
- RISCV_BEQ => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | RISCV_BNE => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | RISCV_BLT => (vec_of_bits [B1;B0;B0] : 3 words$word)
- | RISCV_BGE => (vec_of_bits [B1;B0;B1] : 3 words$word)
- | RISCV_BLTU => (vec_of_bits [B1;B1;B0] : 3 words$word)
- | RISCV_BGEU => (vec_of_bits [B1;B1;B1] : 3 words$word)
+ RISCV_BEQ => (0b000w : 3 words$word)
+ | RISCV_BNE => (0b001w : 3 words$word)
+ | RISCV_BLT => (0b100w : 3 words$word)
+ | RISCV_BGE => (0b101w : 3 words$word)
+ | RISCV_BLTU => (0b110w : 3 words$word)
+ | RISCV_BGEU => (0b111w : 3 words$word)
)))`;
-(*val encdec_bop_backwards : mword ty3 -> M bop*)
-
val _ = Define `
((encdec_bop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BEQ
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BNE
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLT
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGE
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLTU
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGEU
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BEQ
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BNE
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLT
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGE
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLTU
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGEU
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_bop_forwards_matches : bop -> bool*)
-
val _ = Define `
((encdec_bop_forwards_matches:bop -> bool) arg_=
((case arg_ of
@@ -15311,22 +17672,28 @@ val _ = Define `
)))`;
-(*val encdec_bop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_bop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
else F))`;
(*val btype_mnemonic_forwards : bop -> string*)
+(*val btype_mnemonic_backwards : string -> M bop*)
+
+(*val btype_mnemonic_forwards_matches : bop -> bool*)
+
+(*val btype_mnemonic_backwards_matches : string -> bool*)
+
+(*val btype_mnemonic_matches_prefix : string -> maybe ((bop * ii))*)
+
val _ = Define `
((btype_mnemonic_forwards:bop -> string) arg_=
((case arg_ of
@@ -15339,8 +17706,6 @@ val _ = Define `
)))`;
-(*val btype_mnemonic_backwards : string -> M bop*)
-
val _ = Define `
((btype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15353,8 +17718,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val btype_mnemonic_forwards_matches : bop -> bool*)
-
val _ = Define `
((btype_mnemonic_forwards_matches:bop -> bool) arg_=
((case arg_ of
@@ -15367,8 +17730,6 @@ val _ = Define `
)))`;
-(*val btype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((btype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15381,98 +17742,96 @@ val _ = Define `
else F))`;
-(*val btype_mnemonic_matches_prefix : string -> maybe ((bop * ii))*)
-
-(*val _s520_ : string -> maybe string*)
+(*val _s785_ : string -> maybe string*)
val _ = Define `
- ((s520_:string ->(string)option) s521_0=
- (let s522_0 = s521_0 in
- if ((string_startswith s522_0 "bgeu")) then
- (case ((string_drop s522_0 ((string_length "bgeu")))) of s_ => SOME s_ )
+ ((s785_:string ->(string)option) s786_0=
+ (let s787_0 = s786_0 in
+ if ((string_startswith s787_0 "bgeu")) then
+ (case ((string_drop s787_0 ((string_length "bgeu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s516_ : string -> maybe string*)
+(*val _s781_ : string -> maybe string*)
val _ = Define `
- ((s516_:string ->(string)option) s517_0=
- (let s518_0 = s517_0 in
- if ((string_startswith s518_0 "bltu")) then
- (case ((string_drop s518_0 ((string_length "bltu")))) of s_ => SOME s_ )
+ ((s781_:string ->(string)option) s782_0=
+ (let s783_0 = s782_0 in
+ if ((string_startswith s783_0 "bltu")) then
+ (case ((string_drop s783_0 ((string_length "bltu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s512_ : string -> maybe string*)
+(*val _s777_ : string -> maybe string*)
val _ = Define `
- ((s512_:string ->(string)option) s513_0=
- (let s514_0 = s513_0 in
- if ((string_startswith s514_0 "bge")) then
- (case ((string_drop s514_0 ((string_length "bge")))) of s_ => SOME s_ )
+ ((s777_:string ->(string)option) s778_0=
+ (let s779_0 = s778_0 in
+ if ((string_startswith s779_0 "bge")) then
+ (case ((string_drop s779_0 ((string_length "bge")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s508_ : string -> maybe string*)
+(*val _s773_ : string -> maybe string*)
val _ = Define `
- ((s508_:string ->(string)option) s509_0=
- (let s510_0 = s509_0 in
- if ((string_startswith s510_0 "blt")) then
- (case ((string_drop s510_0 ((string_length "blt")))) of s_ => SOME s_ )
+ ((s773_:string ->(string)option) s774_0=
+ (let s775_0 = s774_0 in
+ if ((string_startswith s775_0 "blt")) then
+ (case ((string_drop s775_0 ((string_length "blt")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s504_ : string -> maybe string*)
+(*val _s769_ : string -> maybe string*)
val _ = Define `
- ((s504_:string ->(string)option) s505_0=
- (let s506_0 = s505_0 in
- if ((string_startswith s506_0 "bne")) then
- (case ((string_drop s506_0 ((string_length "bne")))) of s_ => SOME s_ )
+ ((s769_:string ->(string)option) s770_0=
+ (let s771_0 = s770_0 in
+ if ((string_startswith s771_0 "bne")) then
+ (case ((string_drop s771_0 ((string_length "bne")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s500_ : string -> maybe string*)
+(*val _s765_ : string -> maybe string*)
val _ = Define `
- ((s500_:string ->(string)option) s501_0=
- (let s502_0 = s501_0 in
- if ((string_startswith s502_0 "beq")) then
- (case ((string_drop s502_0 ((string_length "beq")))) of s_ => SOME s_ )
+ ((s765_:string ->(string)option) s766_0=
+ (let s767_0 = s766_0 in
+ if ((string_startswith s767_0 "beq")) then
+ (case ((string_drop s767_0 ((string_length "beq")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((btype_mnemonic_matches_prefix:string ->(bop#int)option) arg_=
- (let s503_0 = arg_ in
- if ((case ((s500_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s500_ s503_0 of
+ (let s768_0 = arg_ in
+ if ((case ((s765_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s765_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BEQ, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s504_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s504_ s503_0 of
+ else if ((case ((s769_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s769_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BNE, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s508_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s508_ s503_0 of
+ else if ((case ((s773_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s773_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BLT, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s512_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s512_ s503_0 of
+ else if ((case ((s777_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s777_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BGE, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s516_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s516_ s503_0 of
+ else if ((case ((s781_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s781_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BLTU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s520_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s520_ s503_0 of
+ else if ((case ((s785_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s785_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BGEU, ((string_length arg_)) - ((string_length s_)))
)
@@ -15481,34 +17840,36 @@ val _ = Define `
(*val encdec_iop_forwards : iop -> mword ty3*)
+(*val encdec_iop_backwards : mword ty3 -> M iop*)
+
+(*val encdec_iop_forwards_matches : iop -> bool*)
+
+(*val encdec_iop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_iop_forwards:iop ->(3)words$word) arg_=
((case arg_ of
- RISCV_ADDI => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | RISCV_SLTI => (vec_of_bits [B0;B1;B0] : 3 words$word)
- | RISCV_SLTIU => (vec_of_bits [B0;B1;B1] : 3 words$word)
- | RISCV_ANDI => (vec_of_bits [B1;B1;B1] : 3 words$word)
- | RISCV_ORI => (vec_of_bits [B1;B1;B0] : 3 words$word)
- | RISCV_XORI => (vec_of_bits [B1;B0;B0] : 3 words$word)
+ RISCV_ADDI => (0b000w : 3 words$word)
+ | RISCV_SLTI => (0b010w : 3 words$word)
+ | RISCV_SLTIU => (0b011w : 3 words$word)
+ | RISCV_ANDI => (0b111w : 3 words$word)
+ | RISCV_ORI => (0b110w : 3 words$word)
+ | RISCV_XORI => (0b100w : 3 words$word)
)))`;
-(*val encdec_iop_backwards : mword ty3 -> M iop*)
-
val _ = Define `
((encdec_iop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((iop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ADDI
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTI
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTIU
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ANDI
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ORI
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_XORI
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ADDI
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTI
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTIU
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ANDI
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ORI
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RISCV_XORI
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_iop_forwards_matches : iop -> bool*)
-
val _ = Define `
((encdec_iop_forwards_matches:iop -> bool) arg_=
((case arg_ of
@@ -15521,22 +17882,28 @@ val _ = Define `
)))`;
-(*val encdec_iop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_iop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
else F))`;
(*val itype_mnemonic_forwards : iop -> string*)
+(*val itype_mnemonic_backwards : string -> M iop*)
+
+(*val itype_mnemonic_forwards_matches : iop -> bool*)
+
+(*val itype_mnemonic_backwards_matches : string -> bool*)
+
+(*val itype_mnemonic_matches_prefix : string -> maybe ((iop * ii))*)
+
val _ = Define `
((itype_mnemonic_forwards:iop -> string) arg_=
((case arg_ of
@@ -15549,8 +17916,6 @@ val _ = Define `
)))`;
-(*val itype_mnemonic_backwards : string -> M iop*)
-
val _ = Define `
((itype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((iop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15563,8 +17928,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val itype_mnemonic_forwards_matches : iop -> bool*)
-
val _ = Define `
((itype_mnemonic_forwards_matches:iop -> bool) arg_=
((case arg_ of
@@ -15577,8 +17940,6 @@ val _ = Define `
)))`;
-(*val itype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((itype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15591,98 +17952,96 @@ val _ = Define `
else F))`;
-(*val itype_mnemonic_matches_prefix : string -> maybe ((iop * ii))*)
-
-(*val _s544_ : string -> maybe string*)
+(*val _s809_ : string -> maybe string*)
val _ = Define `
- ((s544_:string ->(string)option) s545_0=
- (let s546_0 = s545_0 in
- if ((string_startswith s546_0 "andi")) then
- (case ((string_drop s546_0 ((string_length "andi")))) of s_ => SOME s_ )
+ ((s809_:string ->(string)option) s810_0=
+ (let s811_0 = s810_0 in
+ if ((string_startswith s811_0 "andi")) then
+ (case ((string_drop s811_0 ((string_length "andi")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s540_ : string -> maybe string*)
+(*val _s805_ : string -> maybe string*)
val _ = Define `
- ((s540_:string ->(string)option) s541_0=
- (let s542_0 = s541_0 in
- if ((string_startswith s542_0 "ori")) then
- (case ((string_drop s542_0 ((string_length "ori")))) of s_ => SOME s_ )
+ ((s805_:string ->(string)option) s806_0=
+ (let s807_0 = s806_0 in
+ if ((string_startswith s807_0 "ori")) then
+ (case ((string_drop s807_0 ((string_length "ori")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s536_ : string -> maybe string*)
+(*val _s801_ : string -> maybe string*)
val _ = Define `
- ((s536_:string ->(string)option) s537_0=
- (let s538_0 = s537_0 in
- if ((string_startswith s538_0 "xori")) then
- (case ((string_drop s538_0 ((string_length "xori")))) of s_ => SOME s_ )
+ ((s801_:string ->(string)option) s802_0=
+ (let s803_0 = s802_0 in
+ if ((string_startswith s803_0 "xori")) then
+ (case ((string_drop s803_0 ((string_length "xori")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s532_ : string -> maybe string*)
+(*val _s797_ : string -> maybe string*)
val _ = Define `
- ((s532_:string ->(string)option) s533_0=
- (let s534_0 = s533_0 in
- if ((string_startswith s534_0 "sltiu")) then
- (case ((string_drop s534_0 ((string_length "sltiu")))) of s_ => SOME s_ )
+ ((s797_:string ->(string)option) s798_0=
+ (let s799_0 = s798_0 in
+ if ((string_startswith s799_0 "sltiu")) then
+ (case ((string_drop s799_0 ((string_length "sltiu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s528_ : string -> maybe string*)
+(*val _s793_ : string -> maybe string*)
val _ = Define `
- ((s528_:string ->(string)option) s529_0=
- (let s530_0 = s529_0 in
- if ((string_startswith s530_0 "slti")) then
- (case ((string_drop s530_0 ((string_length "slti")))) of s_ => SOME s_ )
+ ((s793_:string ->(string)option) s794_0=
+ (let s795_0 = s794_0 in
+ if ((string_startswith s795_0 "slti")) then
+ (case ((string_drop s795_0 ((string_length "slti")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s524_ : string -> maybe string*)
+(*val _s789_ : string -> maybe string*)
val _ = Define `
- ((s524_:string ->(string)option) s525_0=
- (let s526_0 = s525_0 in
- if ((string_startswith s526_0 "addi")) then
- (case ((string_drop s526_0 ((string_length "addi")))) of s_ => SOME s_ )
+ ((s789_:string ->(string)option) s790_0=
+ (let s791_0 = s790_0 in
+ if ((string_startswith s791_0 "addi")) then
+ (case ((string_drop s791_0 ((string_length "addi")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((itype_mnemonic_matches_prefix:string ->(iop#int)option) arg_=
- (let s527_0 = arg_ in
- if ((case ((s524_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s524_ s527_0 of
+ (let s792_0 = arg_ in
+ if ((case ((s789_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s789_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ADDI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s528_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s528_ s527_0 of
+ else if ((case ((s793_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s793_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_SLTI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s532_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s532_ s527_0 of
+ else if ((case ((s797_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s797_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_SLTIU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s536_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s536_ s527_0 of
+ else if ((case ((s801_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s801_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_XORI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s540_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s540_ s527_0 of
+ else if ((case ((s805_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s805_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ORI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s544_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s544_ s527_0 of
+ else if ((case ((s809_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s809_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ANDI, ((string_length arg_)) - ((string_length s_)))
)
@@ -15691,53 +18050,59 @@ val _ = Define `
(*val encdec_sop_forwards : sop -> mword ty3*)
+(*val encdec_sop_backwards : mword ty3 -> M sop*)
+
+(*val encdec_sop_forwards_matches : sop -> bool*)
+
+(*val encdec_sop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_sop_forwards:sop ->(3)words$word) arg_=
((case arg_ of
- RISCV_SLLI => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | RISCV_SRLI => (vec_of_bits [B1;B0;B1] : 3 words$word)
- | RISCV_SRAI => (vec_of_bits [B1;B0;B1] : 3 words$word)
+ RISCV_SLLI => (0b001w : 3 words$word)
+ | RISCV_SRLI => (0b101w : 3 words$word)
+ | RISCV_SRAI => (0b101w : 3 words$word)
)))`;
-(*val encdec_sop_backwards : mword ty3 -> M sop*)
-
val _ = Define `
((encdec_sop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLLI
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRLI
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRAI
+ if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLLI
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRLI
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRAI
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_sop_forwards_matches : sop -> bool*)
-
val _ = Define `
((encdec_sop_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val encdec_sop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_sop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
else F))`;
(*val shiftiop_mnemonic_forwards : sop -> string*)
+(*val shiftiop_mnemonic_backwards : string -> M sop*)
+
+(*val shiftiop_mnemonic_forwards_matches : sop -> bool*)
+
+(*val shiftiop_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftiop_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
+
val _ = Define `
((shiftiop_mnemonic_forwards:sop -> string) arg_=
((case arg_ of RISCV_SLLI => "slli" | RISCV_SRLI => "srli" | RISCV_SRAI => "srai" )))`;
-(*val shiftiop_mnemonic_backwards : string -> M sop*)
-
val _ = Define `
((shiftiop_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15747,15 +18112,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftiop_mnemonic_forwards_matches : sop -> bool*)
-
val _ = Define `
((shiftiop_mnemonic_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val shiftiop_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftiop_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15765,53 +18126,51 @@ val _ = Define `
else F))`;
-(*val shiftiop_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
-
-(*val _s556_ : string -> maybe string*)
+(*val _s821_ : string -> maybe string*)
val _ = Define `
- ((s556_:string ->(string)option) s557_0=
- (let s558_0 = s557_0 in
- if ((string_startswith s558_0 "srai")) then
- (case ((string_drop s558_0 ((string_length "srai")))) of s_ => SOME s_ )
+ ((s821_:string ->(string)option) s822_0=
+ (let s823_0 = s822_0 in
+ if ((string_startswith s823_0 "srai")) then
+ (case ((string_drop s823_0 ((string_length "srai")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s552_ : string -> maybe string*)
+(*val _s817_ : string -> maybe string*)
val _ = Define `
- ((s552_:string ->(string)option) s553_0=
- (let s554_0 = s553_0 in
- if ((string_startswith s554_0 "srli")) then
- (case ((string_drop s554_0 ((string_length "srli")))) of s_ => SOME s_ )
+ ((s817_:string ->(string)option) s818_0=
+ (let s819_0 = s818_0 in
+ if ((string_startswith s819_0 "srli")) then
+ (case ((string_drop s819_0 ((string_length "srli")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s548_ : string -> maybe string*)
+(*val _s813_ : string -> maybe string*)
val _ = Define `
- ((s548_:string ->(string)option) s549_0=
- (let s550_0 = s549_0 in
- if ((string_startswith s550_0 "slli")) then
- (case ((string_drop s550_0 ((string_length "slli")))) of s_ => SOME s_ )
+ ((s813_:string ->(string)option) s814_0=
+ (let s815_0 = s814_0 in
+ if ((string_startswith s815_0 "slli")) then
+ (case ((string_drop s815_0 ((string_length "slli")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftiop_mnemonic_matches_prefix:string ->(sop#int)option) arg_=
- (let s551_0 = arg_ in
- if ((case ((s548_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s548_ s551_0 of
+ (let s816_0 = arg_ in
+ if ((case ((s813_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s813_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SLLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s552_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s552_ s551_0 of
+ else if ((case ((s817_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s817_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SRLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s556_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s556_ s551_0 of
+ else if ((case ((s821_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s821_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SRAI, ((string_length arg_)) - ((string_length s_)))
)
@@ -15820,6 +18179,14 @@ val _ = Define `
(*val rtype_mnemonic_forwards : rop -> string*)
+(*val rtype_mnemonic_backwards : string -> M rop*)
+
+(*val rtype_mnemonic_forwards_matches : rop -> bool*)
+
+(*val rtype_mnemonic_backwards_matches : string -> bool*)
+
+(*val rtype_mnemonic_matches_prefix : string -> maybe ((rop * ii))*)
+
val _ = Define `
((rtype_mnemonic_forwards:rop -> string) arg_=
((case arg_ of
@@ -15836,8 +18203,6 @@ val _ = Define `
)))`;
-(*val rtype_mnemonic_backwards : string -> M rop*)
-
val _ = Define `
((rtype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((rop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15854,8 +18219,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val rtype_mnemonic_forwards_matches : rop -> bool*)
-
val _ = Define `
((rtype_mnemonic_forwards_matches:rop -> bool) arg_=
((case arg_ of
@@ -15872,8 +18235,6 @@ val _ = Define `
)))`;
-(*val rtype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((rtype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15890,158 +18251,156 @@ val _ = Define `
else F))`;
-(*val rtype_mnemonic_matches_prefix : string -> maybe ((rop * ii))*)
-
-(*val _s596_ : string -> maybe string*)
+(*val _s861_ : string -> maybe string*)
val _ = Define `
- ((s596_:string ->(string)option) s597_0=
- (let s598_0 = s597_0 in
- if ((string_startswith s598_0 "sra")) then
- (case ((string_drop s598_0 ((string_length "sra")))) of s_ => SOME s_ )
+ ((s861_:string ->(string)option) s862_0=
+ (let s863_0 = s862_0 in
+ if ((string_startswith s863_0 "sra")) then
+ (case ((string_drop s863_0 ((string_length "sra")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s592_ : string -> maybe string*)
+(*val _s857_ : string -> maybe string*)
val _ = Define `
- ((s592_:string ->(string)option) s593_0=
- (let s594_0 = s593_0 in
- if ((string_startswith s594_0 "sub")) then
- (case ((string_drop s594_0 ((string_length "sub")))) of s_ => SOME s_ )
+ ((s857_:string ->(string)option) s858_0=
+ (let s859_0 = s858_0 in
+ if ((string_startswith s859_0 "sub")) then
+ (case ((string_drop s859_0 ((string_length "sub")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s588_ : string -> maybe string*)
+(*val _s853_ : string -> maybe string*)
val _ = Define `
- ((s588_:string ->(string)option) s589_0=
- (let s590_0 = s589_0 in
- if ((string_startswith s590_0 "srl")) then
- (case ((string_drop s590_0 ((string_length "srl")))) of s_ => SOME s_ )
+ ((s853_:string ->(string)option) s854_0=
+ (let s855_0 = s854_0 in
+ if ((string_startswith s855_0 "srl")) then
+ (case ((string_drop s855_0 ((string_length "srl")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s584_ : string -> maybe string*)
+(*val _s849_ : string -> maybe string*)
val _ = Define `
- ((s584_:string ->(string)option) s585_0=
- (let s586_0 = s585_0 in
- if ((string_startswith s586_0 "sll")) then
- (case ((string_drop s586_0 ((string_length "sll")))) of s_ => SOME s_ )
+ ((s849_:string ->(string)option) s850_0=
+ (let s851_0 = s850_0 in
+ if ((string_startswith s851_0 "sll")) then
+ (case ((string_drop s851_0 ((string_length "sll")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s580_ : string -> maybe string*)
+(*val _s845_ : string -> maybe string*)
val _ = Define `
- ((s580_:string ->(string)option) s581_0=
- (let s582_0 = s581_0 in
- if ((string_startswith s582_0 "xor")) then
- (case ((string_drop s582_0 ((string_length "xor")))) of s_ => SOME s_ )
+ ((s845_:string ->(string)option) s846_0=
+ (let s847_0 = s846_0 in
+ if ((string_startswith s847_0 "xor")) then
+ (case ((string_drop s847_0 ((string_length "xor")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s576_ : string -> maybe string*)
+(*val _s841_ : string -> maybe string*)
val _ = Define `
- ((s576_:string ->(string)option) s577_0=
- (let s578_0 = s577_0 in
- if ((string_startswith s578_0 "or")) then
- (case ((string_drop s578_0 ((string_length "or")))) of s_ => SOME s_ )
+ ((s841_:string ->(string)option) s842_0=
+ (let s843_0 = s842_0 in
+ if ((string_startswith s843_0 "or")) then
+ (case ((string_drop s843_0 ((string_length "or")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s572_ : string -> maybe string*)
+(*val _s837_ : string -> maybe string*)
val _ = Define `
- ((s572_:string ->(string)option) s573_0=
- (let s574_0 = s573_0 in
- if ((string_startswith s574_0 "and")) then
- (case ((string_drop s574_0 ((string_length "and")))) of s_ => SOME s_ )
+ ((s837_:string ->(string)option) s838_0=
+ (let s839_0 = s838_0 in
+ if ((string_startswith s839_0 "and")) then
+ (case ((string_drop s839_0 ((string_length "and")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s568_ : string -> maybe string*)
+(*val _s833_ : string -> maybe string*)
val _ = Define `
- ((s568_:string ->(string)option) s569_0=
- (let s570_0 = s569_0 in
- if ((string_startswith s570_0 "sltu")) then
- (case ((string_drop s570_0 ((string_length "sltu")))) of s_ => SOME s_ )
+ ((s833_:string ->(string)option) s834_0=
+ (let s835_0 = s834_0 in
+ if ((string_startswith s835_0 "sltu")) then
+ (case ((string_drop s835_0 ((string_length "sltu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s564_ : string -> maybe string*)
+(*val _s829_ : string -> maybe string*)
val _ = Define `
- ((s564_:string ->(string)option) s565_0=
- (let s566_0 = s565_0 in
- if ((string_startswith s566_0 "slt")) then
- (case ((string_drop s566_0 ((string_length "slt")))) of s_ => SOME s_ )
+ ((s829_:string ->(string)option) s830_0=
+ (let s831_0 = s830_0 in
+ if ((string_startswith s831_0 "slt")) then
+ (case ((string_drop s831_0 ((string_length "slt")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s560_ : string -> maybe string*)
+(*val _s825_ : string -> maybe string*)
val _ = Define `
- ((s560_:string ->(string)option) s561_0=
- (let s562_0 = s561_0 in
- if ((string_startswith s562_0 "add")) then
- (case ((string_drop s562_0 ((string_length "add")))) of s_ => SOME s_ )
+ ((s825_:string ->(string)option) s826_0=
+ (let s827_0 = s826_0 in
+ if ((string_startswith s827_0 "add")) then
+ (case ((string_drop s827_0 ((string_length "add")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((rtype_mnemonic_matches_prefix:string ->(rop#int)option) arg_=
- (let s563_0 = arg_ in
- if ((case ((s560_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s560_ s563_0 of
+ (let s828_0 = arg_ in
+ if ((case ((s825_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s825_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_ADD, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s564_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s564_ s563_0 of
+ else if ((case ((s829_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s829_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLT, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s568_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s568_ s563_0 of
+ else if ((case ((s833_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s833_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLTU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s572_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s572_ s563_0 of
+ else if ((case ((s837_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s837_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_AND, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s576_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s576_ s563_0 of
+ else if ((case ((s841_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s841_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_OR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s580_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s580_ s563_0 of
+ else if ((case ((s845_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s845_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_XOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s584_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s584_ s563_0 of
+ else if ((case ((s849_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s849_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLL, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s588_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s588_ s563_0 of
+ else if ((case ((s853_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s853_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SRL, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s592_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s592_ s563_0 of
+ else if ((case ((s857_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s857_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SUB, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s596_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s596_ s563_0 of
+ else if ((case ((s861_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s861_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SRA, ((string_length arg_)) - ((string_length s_)))
)
@@ -16063,10 +18422,10 @@ val _ = Define `
(*val process_load : forall 'int8_times_n. Size 'int8_times_n => mword ty5 -> mword ty32 -> MemoryOpResult (mword 'int8_times_n) -> bool -> M Retired*)
val _ = Define `
- ((process_load:(5)words$word ->(32)words$word ->('int8_times_n words$word)MemoryOpResult -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value is_unsigned=
+ ((process_load:(5)words$word ->(32)words$word ->('int8_times_n words$word)MemoryOpResult -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd vaddr value is_unsigned=
((case ((extend_value is_unsigned value : ( 32 words$word) MemoryOpResult)) of
- MemValue (result) => sail2_state_monad$seqS (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)
- | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ MemValue (result) => sail2_state_monad$seqS (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))`;
@@ -16078,22 +18437,28 @@ val _ = Define `
else
(case width of
BYTE => F
- | HALF => (((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T)
+ | HALF => (((access_vec_dec vaddr (( 0 : int):ii))) = B1)
| WORD =>
- ((((((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T))) \/ (((((bit_to_bool ((access_vec_dec vaddr (( 1 : int):ii))))) = T))))
+ ((((((access_vec_dec vaddr (( 0 : int):ii))) = B1))) \/ (((((access_vec_dec vaddr (( 1 : int):ii))) = B1))))
| DOUBLE =>
- ((((((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T))) \/ ((((((((bit_to_bool ((access_vec_dec vaddr (( 1 : int):ii))))) = T))) \/ (((((bit_to_bool ((access_vec_dec vaddr (( 2 : int):ii))))) = T)))))))
+ ((((((access_vec_dec vaddr (( 0 : int):ii))) = B1))) \/ ((((((((access_vec_dec vaddr (( 1 : int):ii))) = B1))) \/ (((((access_vec_dec vaddr (( 2 : int):ii))) = B1)))))))
)))`;
(*val maybe_aq_forwards : bool -> string*)
+(*val maybe_aq_backwards : string -> M bool*)
+
+(*val maybe_aq_forwards_matches : bool -> bool*)
+
+(*val maybe_aq_backwards_matches : string -> bool*)
+
+(*val maybe_aq_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_aq_forwards:bool -> string) arg_= ((case arg_ of T => ".aq" | F => "" )))`;
-(*val maybe_aq_backwards : string -> M bool*)
-
val _ = Define `
((maybe_aq_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16102,15 +18467,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_aq_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_aq_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_aq_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_aq_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16119,38 +18480,36 @@ val _ = Define `
else F))`;
-(*val maybe_aq_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s604_ : string -> maybe string*)
+(*val _s869_ : string -> maybe string*)
val _ = Define `
- ((s604_:string ->(string)option) s605_0=
- (let s606_0 = s605_0 in
- if ((string_startswith s606_0 "")) then
- (case ((string_drop s606_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s869_:string ->(string)option) s870_0=
+ (let s871_0 = s870_0 in
+ if ((string_startswith s871_0 "")) then
+ (case ((string_drop s871_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s600_ : string -> maybe string*)
+(*val _s865_ : string -> maybe string*)
val _ = Define `
- ((s600_:string ->(string)option) s601_0=
- (let s602_0 = s601_0 in
- if ((string_startswith s602_0 ".aq")) then
- (case ((string_drop s602_0 ((string_length ".aq")))) of s_ => SOME s_ )
+ ((s865_:string ->(string)option) s866_0=
+ (let s867_0 = s866_0 in
+ if ((string_startswith s867_0 ".aq")) then
+ (case ((string_drop s867_0 ((string_length ".aq")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_aq_matches_prefix:string ->(bool#int)option) arg_=
- (let s603_0 = arg_ in
- if ((case ((s600_ s603_0)) of SOME (s_) => T | _ => F )) then
- (case s600_ s603_0 of
+ (let s868_0 = arg_ in
+ if ((case ((s865_ s868_0)) of SOME (s_) => T | _ => F )) then
+ (case s865_ s868_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s604_ s603_0)) of SOME (s_) => T | _ => F )) then
- (case s604_ s603_0 of
+ else if ((case ((s869_ s868_0)) of SOME (s_) => T | _ => F )) then
+ (case s869_ s868_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16159,12 +18518,18 @@ val _ = Define `
(*val maybe_rl_forwards : bool -> string*)
+(*val maybe_rl_backwards : string -> M bool*)
+
+(*val maybe_rl_forwards_matches : bool -> bool*)
+
+(*val maybe_rl_backwards_matches : string -> bool*)
+
+(*val maybe_rl_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_rl_forwards:bool -> string) arg_= ((case arg_ of T => ".rl" | F => "" )))`;
-(*val maybe_rl_backwards : string -> M bool*)
-
val _ = Define `
((maybe_rl_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16173,15 +18538,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_rl_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_rl_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_rl_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_rl_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16190,38 +18551,36 @@ val _ = Define `
else F))`;
-(*val maybe_rl_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s612_ : string -> maybe string*)
+(*val _s877_ : string -> maybe string*)
val _ = Define `
- ((s612_:string ->(string)option) s613_0=
- (let s614_0 = s613_0 in
- if ((string_startswith s614_0 "")) then
- (case ((string_drop s614_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s877_:string ->(string)option) s878_0=
+ (let s879_0 = s878_0 in
+ if ((string_startswith s879_0 "")) then
+ (case ((string_drop s879_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s608_ : string -> maybe string*)
+(*val _s873_ : string -> maybe string*)
val _ = Define `
- ((s608_:string ->(string)option) s609_0=
- (let s610_0 = s609_0 in
- if ((string_startswith s610_0 ".rl")) then
- (case ((string_drop s610_0 ((string_length ".rl")))) of s_ => SOME s_ )
+ ((s873_:string ->(string)option) s874_0=
+ (let s875_0 = s874_0 in
+ if ((string_startswith s875_0 ".rl")) then
+ (case ((string_drop s875_0 ((string_length ".rl")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_rl_matches_prefix:string ->(bool#int)option) arg_=
- (let s611_0 = arg_ in
- if ((case ((s608_ s611_0)) of SOME (s_) => T | _ => F )) then
- (case s608_ s611_0 of
+ (let s876_0 = arg_ in
+ if ((case ((s873_ s876_0)) of SOME (s_) => T | _ => F )) then
+ (case s873_ s876_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s612_ s611_0)) of SOME (s_) => T | _ => F )) then
- (case s612_ s611_0 of
+ else if ((case ((s877_ s876_0)) of SOME (s_) => T | _ => F )) then
+ (case s877_ s876_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16230,12 +18589,18 @@ val _ = Define `
(*val maybe_u_forwards : bool -> string*)
+(*val maybe_u_backwards : string -> M bool*)
+
+(*val maybe_u_forwards_matches : bool -> bool*)
+
+(*val maybe_u_backwards_matches : string -> bool*)
+
+(*val maybe_u_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_u_forwards:bool -> string) arg_= ((case arg_ of T => "u" | F => "" )))`;
-(*val maybe_u_backwards : string -> M bool*)
-
val _ = Define `
((maybe_u_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16244,15 +18609,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_u_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_u_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_u_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_u_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16261,38 +18622,36 @@ val _ = Define `
else F))`;
-(*val maybe_u_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s620_ : string -> maybe string*)
+(*val _s885_ : string -> maybe string*)
val _ = Define `
- ((s620_:string ->(string)option) s621_0=
- (let s622_0 = s621_0 in
- if ((string_startswith s622_0 "")) then
- (case ((string_drop s622_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s885_:string ->(string)option) s886_0=
+ (let s887_0 = s886_0 in
+ if ((string_startswith s887_0 "")) then
+ (case ((string_drop s887_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s616_ : string -> maybe string*)
+(*val _s881_ : string -> maybe string*)
val _ = Define `
- ((s616_:string ->(string)option) s617_0=
- (let s618_0 = s617_0 in
- if ((string_startswith s618_0 "u")) then
- (case ((string_drop s618_0 ((string_length "u")))) of s_ => SOME s_ )
+ ((s881_:string ->(string)option) s882_0=
+ (let s883_0 = s882_0 in
+ if ((string_startswith s883_0 "u")) then
+ (case ((string_drop s883_0 ((string_length "u")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_u_matches_prefix:string ->(bool#int)option) arg_=
- (let s619_0 = arg_ in
- if ((case ((s616_ s619_0)) of SOME (s_) => T | _ => F )) then
- (case s616_ s619_0 of
+ (let s884_0 = arg_ in
+ if ((case ((s881_ s884_0)) of SOME (s_) => T | _ => F )) then
+ (case s881_ s884_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s620_ s619_0)) of SOME (s_) => T | _ => F )) then
- (case s620_ s619_0 of
+ else if ((case ((s885_ s884_0)) of SOME (s_) => T | _ => F )) then
+ (case s885_ s884_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16301,13 +18660,19 @@ val _ = Define `
(*val shiftw_mnemonic_forwards : sop -> string*)
+(*val shiftw_mnemonic_backwards : string -> M sop*)
+
+(*val shiftw_mnemonic_forwards_matches : sop -> bool*)
+
+(*val shiftw_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftw_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
+
val _ = Define `
((shiftw_mnemonic_forwards:sop -> string) arg_=
((case arg_ of RISCV_SLLI => "slli" | RISCV_SRLI => "srli" | RISCV_SRAI => "srai" )))`;
-(*val shiftw_mnemonic_backwards : string -> M sop*)
-
val _ = Define `
((shiftw_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16317,15 +18682,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftw_mnemonic_forwards_matches : sop -> bool*)
-
val _ = Define `
((shiftw_mnemonic_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val shiftw_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftw_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16335,53 +18696,51 @@ val _ = Define `
else F))`;
-(*val shiftw_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
-
-(*val _s632_ : string -> maybe string*)
+(*val _s897_ : string -> maybe string*)
val _ = Define `
- ((s632_:string ->(string)option) s633_0=
- (let s634_0 = s633_0 in
- if ((string_startswith s634_0 "srai")) then
- (case ((string_drop s634_0 ((string_length "srai")))) of s_ => SOME s_ )
+ ((s897_:string ->(string)option) s898_0=
+ (let s899_0 = s898_0 in
+ if ((string_startswith s899_0 "srai")) then
+ (case ((string_drop s899_0 ((string_length "srai")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s628_ : string -> maybe string*)
+(*val _s893_ : string -> maybe string*)
val _ = Define `
- ((s628_:string ->(string)option) s629_0=
- (let s630_0 = s629_0 in
- if ((string_startswith s630_0 "srli")) then
- (case ((string_drop s630_0 ((string_length "srli")))) of s_ => SOME s_ )
+ ((s893_:string ->(string)option) s894_0=
+ (let s895_0 = s894_0 in
+ if ((string_startswith s895_0 "srli")) then
+ (case ((string_drop s895_0 ((string_length "srli")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s624_ : string -> maybe string*)
+(*val _s889_ : string -> maybe string*)
val _ = Define `
- ((s624_:string ->(string)option) s625_0=
- (let s626_0 = s625_0 in
- if ((string_startswith s626_0 "slli")) then
- (case ((string_drop s626_0 ((string_length "slli")))) of s_ => SOME s_ )
+ ((s889_:string ->(string)option) s890_0=
+ (let s891_0 = s890_0 in
+ if ((string_startswith s891_0 "slli")) then
+ (case ((string_drop s891_0 ((string_length "slli")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftw_mnemonic_matches_prefix:string ->(sop#int)option) arg_=
- (let s627_0 = arg_ in
- if ((case ((s624_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s624_ s627_0 of
+ (let s892_0 = arg_ in
+ if ((case ((s889_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s889_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SLLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s628_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s628_ s627_0 of
+ else if ((case ((s893_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s893_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SRLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s632_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s632_ s627_0 of
+ else if ((case ((s897_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s897_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SRAI, ((string_length arg_)) - ((string_length s_)))
)
@@ -16390,6 +18749,14 @@ val _ = Define `
(*val rtypew_mnemonic_forwards : ropw -> string*)
+(*val rtypew_mnemonic_backwards : string -> M ropw*)
+
+(*val rtypew_mnemonic_forwards_matches : ropw -> bool*)
+
+(*val rtypew_mnemonic_backwards_matches : string -> bool*)
+
+(*val rtypew_mnemonic_matches_prefix : string -> maybe ((ropw * ii))*)
+
val _ = Define `
((rtypew_mnemonic_forwards:ropw -> string) arg_=
((case arg_ of
@@ -16401,8 +18768,6 @@ val _ = Define `
)))`;
-(*val rtypew_mnemonic_backwards : string -> M ropw*)
-
val _ = Define `
((rtypew_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((ropw),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16414,8 +18779,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val rtypew_mnemonic_forwards_matches : ropw -> bool*)
-
val _ = Define `
((rtypew_mnemonic_forwards_matches:ropw -> bool) arg_=
((case arg_ of
@@ -16427,8 +18790,6 @@ val _ = Define `
)))`;
-(*val rtypew_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((rtypew_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16440,83 +18801,81 @@ val _ = Define `
else F))`;
-(*val rtypew_mnemonic_matches_prefix : string -> maybe ((ropw * ii))*)
-
-(*val _s652_ : string -> maybe string*)
+(*val _s917_ : string -> maybe string*)
val _ = Define `
- ((s652_:string ->(string)option) s653_0=
- (let s654_0 = s653_0 in
- if ((string_startswith s654_0 "sraw")) then
- (case ((string_drop s654_0 ((string_length "sraw")))) of s_ => SOME s_ )
+ ((s917_:string ->(string)option) s918_0=
+ (let s919_0 = s918_0 in
+ if ((string_startswith s919_0 "sraw")) then
+ (case ((string_drop s919_0 ((string_length "sraw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s648_ : string -> maybe string*)
+(*val _s913_ : string -> maybe string*)
val _ = Define `
- ((s648_:string ->(string)option) s649_0=
- (let s650_0 = s649_0 in
- if ((string_startswith s650_0 "srlw")) then
- (case ((string_drop s650_0 ((string_length "srlw")))) of s_ => SOME s_ )
+ ((s913_:string ->(string)option) s914_0=
+ (let s915_0 = s914_0 in
+ if ((string_startswith s915_0 "srlw")) then
+ (case ((string_drop s915_0 ((string_length "srlw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s644_ : string -> maybe string*)
+(*val _s909_ : string -> maybe string*)
val _ = Define `
- ((s644_:string ->(string)option) s645_0=
- (let s646_0 = s645_0 in
- if ((string_startswith s646_0 "sllw")) then
- (case ((string_drop s646_0 ((string_length "sllw")))) of s_ => SOME s_ )
+ ((s909_:string ->(string)option) s910_0=
+ (let s911_0 = s910_0 in
+ if ((string_startswith s911_0 "sllw")) then
+ (case ((string_drop s911_0 ((string_length "sllw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s640_ : string -> maybe string*)
+(*val _s905_ : string -> maybe string*)
val _ = Define `
- ((s640_:string ->(string)option) s641_0=
- (let s642_0 = s641_0 in
- if ((string_startswith s642_0 "subw")) then
- (case ((string_drop s642_0 ((string_length "subw")))) of s_ => SOME s_ )
+ ((s905_:string ->(string)option) s906_0=
+ (let s907_0 = s906_0 in
+ if ((string_startswith s907_0 "subw")) then
+ (case ((string_drop s907_0 ((string_length "subw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s636_ : string -> maybe string*)
+(*val _s901_ : string -> maybe string*)
val _ = Define `
- ((s636_:string ->(string)option) s637_0=
- (let s638_0 = s637_0 in
- if ((string_startswith s638_0 "addw")) then
- (case ((string_drop s638_0 ((string_length "addw")))) of s_ => SOME s_ )
+ ((s901_:string ->(string)option) s902_0=
+ (let s903_0 = s902_0 in
+ if ((string_startswith s903_0 "addw")) then
+ (case ((string_drop s903_0 ((string_length "addw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((rtypew_mnemonic_matches_prefix:string ->(ropw#int)option) arg_=
- (let s639_0 = arg_ in
- if ((case ((s636_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s636_ s639_0 of
+ (let s904_0 = arg_ in
+ if ((case ((s901_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s901_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_ADDW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s640_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s640_ s639_0 of
+ else if ((case ((s905_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s905_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SUBW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s644_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s644_ s639_0 of
+ else if ((case ((s909_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s909_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SLLW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s648_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s648_ s639_0 of
+ else if ((case ((s913_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s913_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SRLW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s652_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s652_ s639_0 of
+ else if ((case ((s917_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s917_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SRAW, ((string_length arg_)) - ((string_length s_)))
)
@@ -16525,13 +18884,19 @@ val _ = Define `
(*val shiftiwop_mnemonic_forwards : sopw -> string*)
+(*val shiftiwop_mnemonic_backwards : string -> M sopw*)
+
+(*val shiftiwop_mnemonic_forwards_matches : sopw -> bool*)
+
+(*val shiftiwop_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftiwop_mnemonic_matches_prefix : string -> maybe ((sopw * ii))*)
+
val _ = Define `
((shiftiwop_mnemonic_forwards:sopw -> string) arg_=
((case arg_ of RISCV_SLLIW => "slliw" | RISCV_SRLIW => "srliw" | RISCV_SRAIW => "sraiw" )))`;
-(*val shiftiwop_mnemonic_backwards : string -> M sopw*)
-
val _ = Define `
((shiftiwop_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sopw),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16541,15 +18906,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftiwop_mnemonic_forwards_matches : sopw -> bool*)
-
val _ = Define `
((shiftiwop_mnemonic_forwards_matches:sopw -> bool) arg_=
((case arg_ of RISCV_SLLIW => T | RISCV_SRLIW => T | RISCV_SRAIW => T )))`;
-(*val shiftiwop_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftiwop_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16559,53 +18920,51 @@ val _ = Define `
else F))`;
-(*val shiftiwop_mnemonic_matches_prefix : string -> maybe ((sopw * ii))*)
-
-(*val _s664_ : string -> maybe string*)
+(*val _s929_ : string -> maybe string*)
val _ = Define `
- ((s664_:string ->(string)option) s665_0=
- (let s666_0 = s665_0 in
- if ((string_startswith s666_0 "sraiw")) then
- (case ((string_drop s666_0 ((string_length "sraiw")))) of s_ => SOME s_ )
+ ((s929_:string ->(string)option) s930_0=
+ (let s931_0 = s930_0 in
+ if ((string_startswith s931_0 "sraiw")) then
+ (case ((string_drop s931_0 ((string_length "sraiw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s660_ : string -> maybe string*)
+(*val _s925_ : string -> maybe string*)
val _ = Define `
- ((s660_:string ->(string)option) s661_0=
- (let s662_0 = s661_0 in
- if ((string_startswith s662_0 "srliw")) then
- (case ((string_drop s662_0 ((string_length "srliw")))) of s_ => SOME s_ )
+ ((s925_:string ->(string)option) s926_0=
+ (let s927_0 = s926_0 in
+ if ((string_startswith s927_0 "srliw")) then
+ (case ((string_drop s927_0 ((string_length "srliw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s656_ : string -> maybe string*)
+(*val _s921_ : string -> maybe string*)
val _ = Define `
- ((s656_:string ->(string)option) s657_0=
- (let s658_0 = s657_0 in
- if ((string_startswith s658_0 "slliw")) then
- (case ((string_drop s658_0 ((string_length "slliw")))) of s_ => SOME s_ )
+ ((s921_:string ->(string)option) s922_0=
+ (let s923_0 = s922_0 in
+ if ((string_startswith s923_0 "slliw")) then
+ (case ((string_drop s923_0 ((string_length "slliw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftiwop_mnemonic_matches_prefix:string ->(sopw#int)option) arg_=
- (let s659_0 = arg_ in
- if ((case ((s656_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s656_ s659_0 of
+ (let s924_0 = arg_ in
+ if ((case ((s921_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s921_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SLLIW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s660_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s660_ s659_0 of
+ else if ((case ((s925_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s925_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SRLIW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s664_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s664_ s659_0 of
+ else if ((case ((s929_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s929_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SRAIW, ((string_length arg_)) - ((string_length s_)))
)
@@ -16614,36 +18973,38 @@ val _ = Define `
(*val bit_maybe_r_forwards : mword ty1 -> M string*)
+(*val bit_maybe_r_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_r_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_r_backwards_matches : string -> bool*)
+
+(*val bit_maybe_r_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_r_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "r"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "r"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_r_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_r_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "r"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "r"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_r_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_r_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_r_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_r_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16652,80 +19013,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_r_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s672_ : string -> maybe string*)
+(*val _s937_ : string -> maybe string*)
val _ = Define `
- ((s672_:string ->(string)option) s673_0=
- (let s674_0 = s673_0 in
- if ((string_startswith s674_0 "")) then
- (case ((string_drop s674_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s937_:string ->(string)option) s938_0=
+ (let s939_0 = s938_0 in
+ if ((string_startswith s939_0 "")) then
+ (case ((string_drop s939_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s668_ : string -> maybe string*)
+(*val _s933_ : string -> maybe string*)
val _ = Define `
- ((s668_:string ->(string)option) s669_0=
- (let s670_0 = s669_0 in
- if ((string_startswith s670_0 "r")) then
- (case ((string_drop s670_0 ((string_length "r")))) of s_ => SOME s_ )
+ ((s933_:string ->(string)option) s934_0=
+ (let s935_0 = s934_0 in
+ if ((string_startswith s935_0 "r")) then
+ (case ((string_drop s935_0 ((string_length "r")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_r_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s671_0 = arg_ in
- if ((case ((s668_ s671_0)) of SOME (s_) => T | _ => F )) then
- (case s668_ s671_0 of
+ (let s936_0 = arg_ in
+ if ((case ((s933_ s936_0)) of SOME (s_) => T | _ => F )) then
+ (case s933_ s936_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s672_ s671_0)) of SOME (s_) => T | _ => F )) then
- (case s672_ s671_0 of
+ else if ((case ((s937_ s936_0)) of SOME (s_) => T | _ => F )) then
+ (case s937_ s936_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_w_forwards : mword ty1 -> M string*)
+(*val bit_maybe_w_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_w_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_w_backwards_matches : string -> bool*)
+
+(*val bit_maybe_w_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_w_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "w"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "w"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_w_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_w_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "w"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "w"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_w_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_w_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_w_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_w_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16734,80 +19091,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_w_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s680_ : string -> maybe string*)
+(*val _s945_ : string -> maybe string*)
val _ = Define `
- ((s680_:string ->(string)option) s681_0=
- (let s682_0 = s681_0 in
- if ((string_startswith s682_0 "")) then
- (case ((string_drop s682_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s945_:string ->(string)option) s946_0=
+ (let s947_0 = s946_0 in
+ if ((string_startswith s947_0 "")) then
+ (case ((string_drop s947_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s676_ : string -> maybe string*)
+(*val _s941_ : string -> maybe string*)
val _ = Define `
- ((s676_:string ->(string)option) s677_0=
- (let s678_0 = s677_0 in
- if ((string_startswith s678_0 "w")) then
- (case ((string_drop s678_0 ((string_length "w")))) of s_ => SOME s_ )
+ ((s941_:string ->(string)option) s942_0=
+ (let s943_0 = s942_0 in
+ if ((string_startswith s943_0 "w")) then
+ (case ((string_drop s943_0 ((string_length "w")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_w_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s679_0 = arg_ in
- if ((case ((s676_ s679_0)) of SOME (s_) => T | _ => F )) then
- (case s676_ s679_0 of
+ (let s944_0 = arg_ in
+ if ((case ((s941_ s944_0)) of SOME (s_) => T | _ => F )) then
+ (case s941_ s944_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s680_ s679_0)) of SOME (s_) => T | _ => F )) then
- (case s680_ s679_0 of
+ else if ((case ((s945_ s944_0)) of SOME (s_) => T | _ => F )) then
+ (case s945_ s944_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_i_forwards : mword ty1 -> M string*)
+(*val bit_maybe_i_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_i_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_i_backwards_matches : string -> bool*)
+
+(*val bit_maybe_i_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_i_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "i"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "i"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_i_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_i_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "i"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "i"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_i_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_i_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_i_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_i_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16816,80 +19169,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_i_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s688_ : string -> maybe string*)
+(*val _s953_ : string -> maybe string*)
val _ = Define `
- ((s688_:string ->(string)option) s689_0=
- (let s690_0 = s689_0 in
- if ((string_startswith s690_0 "")) then
- (case ((string_drop s690_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s953_:string ->(string)option) s954_0=
+ (let s955_0 = s954_0 in
+ if ((string_startswith s955_0 "")) then
+ (case ((string_drop s955_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s684_ : string -> maybe string*)
+(*val _s949_ : string -> maybe string*)
val _ = Define `
- ((s684_:string ->(string)option) s685_0=
- (let s686_0 = s685_0 in
- if ((string_startswith s686_0 "i")) then
- (case ((string_drop s686_0 ((string_length "i")))) of s_ => SOME s_ )
+ ((s949_:string ->(string)option) s950_0=
+ (let s951_0 = s950_0 in
+ if ((string_startswith s951_0 "i")) then
+ (case ((string_drop s951_0 ((string_length "i")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_i_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s687_0 = arg_ in
- if ((case ((s684_ s687_0)) of SOME (s_) => T | _ => F )) then
- (case s684_ s687_0 of
+ (let s952_0 = arg_ in
+ if ((case ((s949_ s952_0)) of SOME (s_) => T | _ => F )) then
+ (case s949_ s952_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s688_ s687_0)) of SOME (s_) => T | _ => F )) then
- (case s688_ s687_0 of
+ else if ((case ((s953_ s952_0)) of SOME (s_) => T | _ => F )) then
+ (case s953_ s952_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_o_forwards : mword ty1 -> M string*)
+(*val bit_maybe_o_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_o_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_o_backwards_matches : string -> bool*)
+
+(*val bit_maybe_o_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_o_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "o"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "o"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_o_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_o_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "o"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "o"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_o_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_o_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_o_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_o_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16898,50 +19247,52 @@ val _ = Define `
else F))`;
-(*val bit_maybe_o_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s696_ : string -> maybe string*)
+(*val _s961_ : string -> maybe string*)
val _ = Define `
- ((s696_:string ->(string)option) s697_0=
- (let s698_0 = s697_0 in
- if ((string_startswith s698_0 "")) then
- (case ((string_drop s698_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s961_:string ->(string)option) s962_0=
+ (let s963_0 = s962_0 in
+ if ((string_startswith s963_0 "")) then
+ (case ((string_drop s963_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s692_ : string -> maybe string*)
+(*val _s957_ : string -> maybe string*)
val _ = Define `
- ((s692_:string ->(string)option) s693_0=
- (let s694_0 = s693_0 in
- if ((string_startswith s694_0 "o")) then
- (case ((string_drop s694_0 ((string_length "o")))) of s_ => SOME s_ )
+ ((s957_:string ->(string)option) s958_0=
+ (let s959_0 = s958_0 in
+ if ((string_startswith s959_0 "o")) then
+ (case ((string_drop s959_0 ((string_length "o")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_o_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s695_0 = arg_ in
- if ((case ((s692_ s695_0)) of SOME (s_) => T | _ => F )) then
- (case s692_ s695_0 of
+ (let s960_0 = arg_ in
+ if ((case ((s957_ s960_0)) of SOME (s_) => T | _ => F )) then
+ (case s957_ s960_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s696_ s695_0)) of SOME (s_) => T | _ => F )) then
- (case s696_ s695_0 of
+ else if ((case ((s961_ s960_0)) of SOME (s_) => T | _ => F )) then
+ (case s961_ s960_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val fence_bits_forwards : mword ty4 -> M string*)
+(*val fence_bits_backwards : string -> M (mword ty4)*)
+
+(*val fence_bits_forwards_matches : mword ty4 -> bool*)
+
+(*val fence_bits_backwards_matches : string -> bool*)
+
+(*val fence_bits_matches_prefix : string -> maybe ((mword ty4 * ii))*)
+
val _ = Define `
((fence_bits_forwards:(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
@@ -16960,29 +19311,27 @@ val _ = Define `
)))`;
-(*val fence_bits_backwards : string -> M (mword ty4)*)
-
-(*val _s700_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
-
-val _ = Define `
- ((s700_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s701_0=
- ((case s701_0 of
- s702_0 =>
- (case ((bit_maybe_i_matches_prefix s702_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s703_0)) =>
- (case ((string_drop s702_0 s703_0)) of
- s704_0 =>
- (case ((bit_maybe_o_matches_prefix s704_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s705_0)) =>
- (case ((string_drop s704_0 s705_0)) of
- s706_0 =>
- (case ((bit_maybe_r_matches_prefix s706_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s707_0)) =>
- (case ((string_drop s706_0 s707_0)) of
- s708_0 =>
- (case ((bit_maybe_w_matches_prefix s708_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s709_0)) =>
- let p0_ = (string_drop s708_0 s709_0) in
+(*val _s965_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
+
+val _ = Define `
+ ((s965_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s966_0=
+ ((case s966_0 of
+ s967_0 =>
+ (case ((bit_maybe_i_matches_prefix s967_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s968_0)) =>
+ (case ((string_drop s967_0 s968_0)) of
+ s969_0 =>
+ (case ((bit_maybe_o_matches_prefix s969_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s970_0)) =>
+ (case ((string_drop s969_0 s970_0)) of
+ s971_0 =>
+ (case ((bit_maybe_r_matches_prefix s971_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s972_0)) =>
+ (case ((string_drop s971_0 s972_0)) of
+ s973_0 =>
+ (case ((bit_maybe_w_matches_prefix s973_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s974_0)) =>
+ let p0_ = (string_drop s973_0 s974_0) in
if (((p0_ = ""))) then SOME (i, o1, r, w) else NONE
| _ => NONE
)
@@ -17000,12 +19349,12 @@ val _ = Define `
val _ = Define `
((fence_bits_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((4)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let s710_0 = arg_ in
- if ((case ((s700_ s710_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
+ (let s975_0 = arg_ in
+ if ((case ((s965_ s975_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
SOME ((i, o1, r, w)) => T
| _ => F
)) then (case
- (s700_ s710_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
+ (s965_ s975_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
(SOME ((i, o1, r, w))) =>
sail2_state_monad$returnS
((concat_vec i
@@ -17015,36 +19364,32 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val fence_bits_forwards_matches : mword ty4 -> bool*)
-
val _ = Define `
((fence_bits_forwards_matches:(4)words$word -> bool) arg_=
((case arg_ of v__1 => T )))`;
-(*val fence_bits_backwards_matches : string -> bool*)
-
-(*val _s711_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
-
-val _ = Define `
- ((s711_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s712_0=
- ((case s712_0 of
- s713_0 =>
- (case ((bit_maybe_i_matches_prefix s713_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s714_0)) =>
- (case ((string_drop s713_0 s714_0)) of
- s715_0 =>
- (case ((bit_maybe_o_matches_prefix s715_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s716_0)) =>
- (case ((string_drop s715_0 s716_0)) of
- s717_0 =>
- (case ((bit_maybe_r_matches_prefix s717_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s718_0)) =>
- (case ((string_drop s717_0 s718_0)) of
- s719_0 =>
- (case ((bit_maybe_w_matches_prefix s719_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s720_0)) =>
- let p0_ = (string_drop s719_0 s720_0) in
+(*val _s976_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
+
+val _ = Define `
+ ((s976_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s977_0=
+ ((case s977_0 of
+ s978_0 =>
+ (case ((bit_maybe_i_matches_prefix s978_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s979_0)) =>
+ (case ((string_drop s978_0 s979_0)) of
+ s980_0 =>
+ (case ((bit_maybe_o_matches_prefix s980_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s981_0)) =>
+ (case ((string_drop s980_0 s981_0)) of
+ s982_0 =>
+ (case ((bit_maybe_r_matches_prefix s982_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s983_0)) =>
+ (case ((string_drop s982_0 s983_0)) of
+ s984_0 =>
+ (case ((bit_maybe_w_matches_prefix s984_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s985_0)) =>
+ let p0_ = (string_drop s984_0 s985_0) in
if (((p0_ = ""))) then SOME (i, o1, r, w) else NONE
| _ => NONE
)
@@ -17062,41 +19407,39 @@ val _ = Define `
val _ = Define `
((fence_bits_backwards_matches:string -> bool) arg_=
- (let s721_0 = arg_ in
- if ((case ((s711_ s721_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
+ (let s986_0 = arg_ in
+ if ((case ((s976_ s986_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
SOME ((i, o1, r, w)) => T
| _ => F
)) then (case
- (s711_ s721_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
+ (s976_ s986_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
(SOME ((i, o1, r, w))) =>
T
)
else F))`;
-(*val fence_bits_matches_prefix : string -> maybe ((mword ty4 * ii))*)
-
-(*val _s722_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1 * string))*)
-
-val _ = Define `
- ((s722_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word#string)option) s723_0=
- ((case s723_0 of
- s724_0 =>
- (case ((bit_maybe_i_matches_prefix s724_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s725_0)) =>
- (case ((string_drop s724_0 s725_0)) of
- s726_0 =>
- (case ((bit_maybe_o_matches_prefix s726_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s727_0)) =>
- (case ((string_drop s726_0 s727_0)) of
- s728_0 =>
- (case ((bit_maybe_r_matches_prefix s728_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s729_0)) =>
- (case ((string_drop s728_0 s729_0)) of
- s730_0 =>
- (case ((bit_maybe_w_matches_prefix s730_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s731_0)) =>
- (case ((string_drop s730_0 s731_0)) of s_ => SOME (i, o1, r, w, s_) )
+(*val _s987_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1 * string))*)
+
+val _ = Define `
+ ((s987_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word#string)option) s988_0=
+ ((case s988_0 of
+ s989_0 =>
+ (case ((bit_maybe_i_matches_prefix s989_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s990_0)) =>
+ (case ((string_drop s989_0 s990_0)) of
+ s991_0 =>
+ (case ((bit_maybe_o_matches_prefix s991_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s992_0)) =>
+ (case ((string_drop s991_0 s992_0)) of
+ s993_0 =>
+ (case ((bit_maybe_r_matches_prefix s993_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s994_0)) =>
+ (case ((string_drop s993_0 s994_0)) of
+ s995_0 =>
+ (case ((bit_maybe_w_matches_prefix s995_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s996_0)) =>
+ (case ((string_drop s995_0 s996_0)) of s_ => SOME (i, o1, r, w, s_) )
| _ => NONE
)
)
@@ -17113,12 +19456,12 @@ val _ = Define `
val _ = Define `
((fence_bits_matches_prefix:string ->((4)words$word#int)option) arg_=
- (let s732_0 = arg_ in
- if ((case ((s722_ s732_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string))option)) of
+ (let s997_0 = arg_ in
+ if ((case ((s987_ s997_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string))option)) of
SOME ((i, o1, r, w, s_)) => T
| _ => F
)) then (case
- (s722_ s732_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string)) option) of
+ (s987_ s997_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string)) option) of
(SOME ((i, o1, r, w, s_))) =>
SOME
((concat_vec i
@@ -17147,6 +19490,13 @@ val _ = Define `
((case width of BYTE => ".b" | HALF => ".h" | WORD => ".w" | DOUBLE => ".d" )))`;
+(*val amo_width_valid : word_width -> bool*)
+
+val _ = Define `
+ ((amo_width_valid:word_width -> bool) size1=
+ ((case size1 of WORD => T | DOUBLE => (( 32 : int):ii) >= (( 64 : int):ii) | _ => F )))`;
+
+
(*val process_loadres : forall 'int8_times_n. Size 'int8_times_n => mword ty5 -> mword ty32 -> MemoryOpResult (mword 'int8_times_n) -> bool -> M Retired*)
val _ = Define `
@@ -17154,57 +19504,49 @@ val _ = Define `
((case ((extend_value is_unsigned value : ( 32 words$word) MemoryOpResult)) of
MemValue (result) =>
let (_ : unit) = (load_reservation addr) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))`;
(*val encdec_amoop_forwards : amoop -> mword ty5*)
+(*val encdec_amoop_backwards : mword ty5 -> M amoop*)
+
+(*val encdec_amoop_forwards_matches : amoop -> bool*)
+
+(*val encdec_amoop_backwards_matches : mword ty5 -> bool*)
+
val _ = Define `
((encdec_amoop_forwards:amoop ->(5)words$word) arg_=
((case arg_ of
- AMOSWAP => (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)
- | AMOADD => (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- | AMOXOR => (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)
- | AMOAND => (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)
- | AMOOR => (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)
- | AMOMIN => (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)
- | AMOMAX => (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)
- | AMOMINU => (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)
- | AMOMAXU => (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)
+ AMOSWAP => (0b00001w : 5 words$word)
+ | AMOADD => (0b00000w : 5 words$word)
+ | AMOXOR => (0b00100w : 5 words$word)
+ | AMOAND => (0b01100w : 5 words$word)
+ | AMOOR => (0b01000w : 5 words$word)
+ | AMOMIN => (0b10000w : 5 words$word)
+ | AMOMAX => (0b10100w : 5 words$word)
+ | AMOMINU => (0b11000w : 5 words$word)
+ | AMOMAXU => (0b11100w : 5 words$word)
)))`;
-(*val encdec_amoop_backwards : mword ty5 -> M amoop*)
-
val _ = Define `
((encdec_amoop_backwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((amoop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word))))))
- then
- sail2_state_monad$returnS AMOSWAP
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOADD
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOXOR
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOAND
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOOR
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMIN
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMAX
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMINU
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMAXU
+ if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS AMOSWAP
+ else if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS AMOADD
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS AMOXOR
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS AMOAND
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS AMOOR
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS AMOMIN
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS AMOMAX
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS AMOMINU
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS AMOMAXU
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_amoop_forwards_matches : amoop -> bool*)
-
val _ = Define `
((encdec_amoop_forwards_matches:amoop -> bool) arg_=
((case arg_ of
@@ -17220,35 +19562,31 @@ val _ = Define `
)))`;
-(*val encdec_amoop_backwards_matches : mword ty5 -> bool*)
-
val _ = Define `
((encdec_amoop_backwards_matches:(5)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word))))))
- then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- T
+ if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
else F))`;
(*val amo_mnemonic_forwards : amoop -> string*)
+(*val amo_mnemonic_backwards : string -> M amoop*)
+
+(*val amo_mnemonic_forwards_matches : amoop -> bool*)
+
+(*val amo_mnemonic_backwards_matches : string -> bool*)
+
+(*val amo_mnemonic_matches_prefix : string -> maybe ((amoop * ii))*)
+
val _ = Define `
((amo_mnemonic_forwards:amoop -> string) arg_=
((case arg_ of
@@ -17264,8 +19602,6 @@ val _ = Define `
)))`;
-(*val amo_mnemonic_backwards : string -> M amoop*)
-
val _ = Define `
((amo_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((amoop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17281,8 +19617,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val amo_mnemonic_forwards_matches : amoop -> bool*)
-
val _ = Define `
((amo_mnemonic_forwards_matches:amoop -> bool) arg_=
((case arg_ of
@@ -17298,8 +19632,6 @@ val _ = Define `
)))`;
-(*val amo_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((amo_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17315,99 +19647,107 @@ val _ = Define `
else F))`;
-(*val amo_mnemonic_matches_prefix : string -> maybe ((amoop * ii))*)
-
-(*val _s765_ : string -> maybe string*)
+(*val _s1030_ : string -> maybe string*)
val _ = Define `
- ((s765_:string ->(string)option) s766_0=
- (let s767_0 = s766_0 in
- if ((string_startswith s767_0 "amomaxu")) then
- (case ((string_drop s767_0 ((string_length "amomaxu")))) of
+ ((s1030_:string ->(string)option) s1031_0=
+ (let s1032_0 = s1031_0 in
+ if ((string_startswith s1032_0 "amomaxu")) then
+ (case ((string_drop s1032_0 ((string_length "amomaxu")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s761_ : string -> maybe string*)
+(*val _s1026_ : string -> maybe string*)
val _ = Define `
- ((s761_:string ->(string)option) s762_0=
- (let s763_0 = s762_0 in
- if ((string_startswith s763_0 "amominu")) then
- (case ((string_drop s763_0 ((string_length "amominu")))) of
+ ((s1026_:string ->(string)option) s1027_0=
+ (let s1028_0 = s1027_0 in
+ if ((string_startswith s1028_0 "amominu")) then
+ (case ((string_drop s1028_0 ((string_length "amominu")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s757_ : string -> maybe string*)
+(*val _s1022_ : string -> maybe string*)
val _ = Define `
- ((s757_:string ->(string)option) s758_0=
- (let s759_0 = s758_0 in
- if ((string_startswith s759_0 "amomax")) then
- (case ((string_drop s759_0 ((string_length "amomax")))) of s_ => SOME s_ )
+ ((s1022_:string ->(string)option) s1023_0=
+ (let s1024_0 = s1023_0 in
+ if ((string_startswith s1024_0 "amomax")) then
+ (case ((string_drop s1024_0 ((string_length "amomax")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s753_ : string -> maybe string*)
+(*val _s1018_ : string -> maybe string*)
val _ = Define `
- ((s753_:string ->(string)option) s754_0=
- (let s755_0 = s754_0 in
- if ((string_startswith s755_0 "amomin")) then
- (case ((string_drop s755_0 ((string_length "amomin")))) of s_ => SOME s_ )
+ ((s1018_:string ->(string)option) s1019_0=
+ (let s1020_0 = s1019_0 in
+ if ((string_startswith s1020_0 "amomin")) then
+ (case ((string_drop s1020_0 ((string_length "amomin")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s749_ : string -> maybe string*)
+(*val _s1014_ : string -> maybe string*)
val _ = Define `
- ((s749_:string ->(string)option) s750_0=
- (let s751_0 = s750_0 in
- if ((string_startswith s751_0 "amoor")) then
- (case ((string_drop s751_0 ((string_length "amoor")))) of s_ => SOME s_ )
+ ((s1014_:string ->(string)option) s1015_0=
+ (let s1016_0 = s1015_0 in
+ if ((string_startswith s1016_0 "amoor")) then
+ (case ((string_drop s1016_0 ((string_length "amoor")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s745_ : string -> maybe string*)
+(*val _s1010_ : string -> maybe string*)
val _ = Define `
- ((s745_:string ->(string)option) s746_0=
- (let s747_0 = s746_0 in
- if ((string_startswith s747_0 "amoand")) then
- (case ((string_drop s747_0 ((string_length "amoand")))) of s_ => SOME s_ )
+ ((s1010_:string ->(string)option) s1011_0=
+ (let s1012_0 = s1011_0 in
+ if ((string_startswith s1012_0 "amoand")) then
+ (case ((string_drop s1012_0 ((string_length "amoand")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s741_ : string -> maybe string*)
+(*val _s1006_ : string -> maybe string*)
val _ = Define `
- ((s741_:string ->(string)option) s742_0=
- (let s743_0 = s742_0 in
- if ((string_startswith s743_0 "amoxor")) then
- (case ((string_drop s743_0 ((string_length "amoxor")))) of s_ => SOME s_ )
+ ((s1006_:string ->(string)option) s1007_0=
+ (let s1008_0 = s1007_0 in
+ if ((string_startswith s1008_0 "amoxor")) then
+ (case ((string_drop s1008_0 ((string_length "amoxor")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s737_ : string -> maybe string*)
+(*val _s1002_ : string -> maybe string*)
val _ = Define `
- ((s737_:string ->(string)option) s738_0=
- (let s739_0 = s738_0 in
- if ((string_startswith s739_0 "amoadd")) then
- (case ((string_drop s739_0 ((string_length "amoadd")))) of s_ => SOME s_ )
+ ((s1002_:string ->(string)option) s1003_0=
+ (let s1004_0 = s1003_0 in
+ if ((string_startswith s1004_0 "amoadd")) then
+ (case ((string_drop s1004_0 ((string_length "amoadd")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s733_ : string -> maybe string*)
+(*val _s998_ : string -> maybe string*)
val _ = Define `
- ((s733_:string ->(string)option) s734_0=
- (let s735_0 = s734_0 in
- if ((string_startswith s735_0 "amoswap")) then
- (case ((string_drop s735_0 ((string_length "amoswap")))) of
+ ((s998_:string ->(string)option) s999_0=
+ (let s1000_0 = s999_0 in
+ if ((string_startswith s1000_0 "amoswap")) then
+ (case ((string_drop s1000_0 ((string_length "amoswap")))) of
s_ => SOME s_
)
else NONE))`;
@@ -17415,49 +19755,49 @@ val _ = Define `
val _ = Define `
((amo_mnemonic_matches_prefix:string ->(amoop#int)option) arg_=
- (let s736_0 = arg_ in
- if ((case ((s733_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s733_ s736_0 of
+ (let s1001_0 = arg_ in
+ if ((case ((s998_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s998_ s1001_0 of
(SOME (s_)) =>
SOME (AMOSWAP, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s737_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s737_ s736_0 of
+ else if ((case ((s1002_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1002_ s1001_0 of
(SOME (s_)) =>
SOME (AMOADD, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s741_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s741_ s736_0 of
+ else if ((case ((s1006_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1006_ s1001_0 of
(SOME (s_)) =>
SOME (AMOXOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s745_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s745_ s736_0 of
+ else if ((case ((s1010_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1010_ s1001_0 of
(SOME (s_)) =>
SOME (AMOAND, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s749_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s749_ s736_0 of
+ else if ((case ((s1014_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1014_ s1001_0 of
(SOME (s_)) =>
SOME (AMOOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s753_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s753_ s736_0 of
+ else if ((case ((s1018_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1018_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMIN, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s757_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s757_ s736_0 of
+ else if ((case ((s1022_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1022_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMAX, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s761_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s761_ s736_0 of
+ else if ((case ((s1026_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1026_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMINU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s765_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s765_ s736_0 of
+ else if ((case ((s1030_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1030_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMAXU, ((string_length arg_)) - ((string_length s_)))
)
@@ -17466,30 +19806,32 @@ val _ = Define `
(*val encdec_mul_op_forwards : (bool * bool * bool) -> mword ty3*)
+(*val encdec_mul_op_backwards : mword ty3 -> M (bool * bool * bool)*)
+
+(*val encdec_mul_op_forwards_matches : (bool * bool * bool) -> bool*)
+
+(*val encdec_mul_op_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_mul_op_forwards:bool#bool#bool ->(3)words$word) arg_=
((case arg_ of
- (F, T, T) => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | (T, T, T) => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | (T, T, F) => (vec_of_bits [B0;B1;B0] : 3 words$word)
- | (T, F, F) => (vec_of_bits [B0;B1;B1] : 3 words$word)
+ (F, T, T) => (0b000w : 3 words$word)
+ | (T, T, T) => (0b001w : 3 words$word)
+ | (T, T, F) => (0b010w : 3 words$word)
+ | (T, F, F) => (0b011w : 3 words$word)
)))`;
-(*val encdec_mul_op_backwards : mword ty3 -> M (bool * bool * bool)*)
-
val _ = Define `
((encdec_mul_op_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool#bool#bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS (F, T, T)
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS (T, T, T)
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS (T, T, F)
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS (T, F, F)
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS (F, T, T)
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS (T, T, T)
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS (T, T, F)
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS (T, F, F)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_mul_op_forwards_matches : (bool * bool * bool) -> bool*)
-
val _ = Define `
((encdec_mul_op_forwards_matches:bool#bool#bool -> bool) arg_=
((case arg_ of
@@ -17501,20 +19843,26 @@ val _ = Define `
)))`;
-(*val encdec_mul_op_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_mul_op_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
else F))`;
(*val mul_mnemonic_forwards : (bool * bool * bool) -> string*)
+(*val mul_mnemonic_backwards : string -> M (bool * bool * bool)*)
+
+(*val mul_mnemonic_forwards_matches : (bool * bool * bool) -> bool*)
+
+(*val mul_mnemonic_backwards_matches : string -> bool*)
+
+(*val mul_mnemonic_matches_prefix : string -> maybe (((bool * bool * bool) * ii))*)
+
val _ = Define `
((mul_mnemonic_forwards:bool#bool#bool -> string) arg_=
((case arg_ of
@@ -17525,8 +19873,6 @@ val _ = Define `
)))`;
-(*val mul_mnemonic_backwards : string -> M (bool * bool * bool)*)
-
val _ = Define `
((mul_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool#bool#bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17537,8 +19883,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val mul_mnemonic_forwards_matches : (bool * bool * bool) -> bool*)
-
val _ = Define `
((mul_mnemonic_forwards_matches:bool#bool#bool -> bool) arg_=
((case arg_ of
@@ -17550,8 +19894,6 @@ val _ = Define `
)))`;
-(*val mul_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((mul_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17562,68 +19904,68 @@ val _ = Define `
else F))`;
-(*val mul_mnemonic_matches_prefix : string -> maybe (((bool * bool * bool) * ii))*)
-
-(*val _s781_ : string -> maybe string*)
+(*val _s1046_ : string -> maybe string*)
val _ = Define `
- ((s781_:string ->(string)option) s782_0=
- (let s783_0 = s782_0 in
- if ((string_startswith s783_0 "mulhu")) then
- (case ((string_drop s783_0 ((string_length "mulhu")))) of s_ => SOME s_ )
+ ((s1046_:string ->(string)option) s1047_0=
+ (let s1048_0 = s1047_0 in
+ if ((string_startswith s1048_0 "mulhu")) then
+ (case ((string_drop s1048_0 ((string_length "mulhu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s777_ : string -> maybe string*)
+(*val _s1042_ : string -> maybe string*)
val _ = Define `
- ((s777_:string ->(string)option) s778_0=
- (let s779_0 = s778_0 in
- if ((string_startswith s779_0 "mulhsu")) then
- (case ((string_drop s779_0 ((string_length "mulhsu")))) of s_ => SOME s_ )
+ ((s1042_:string ->(string)option) s1043_0=
+ (let s1044_0 = s1043_0 in
+ if ((string_startswith s1044_0 "mulhsu")) then
+ (case ((string_drop s1044_0 ((string_length "mulhsu")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s773_ : string -> maybe string*)
+(*val _s1038_ : string -> maybe string*)
val _ = Define `
- ((s773_:string ->(string)option) s774_0=
- (let s775_0 = s774_0 in
- if ((string_startswith s775_0 "mulh")) then
- (case ((string_drop s775_0 ((string_length "mulh")))) of s_ => SOME s_ )
+ ((s1038_:string ->(string)option) s1039_0=
+ (let s1040_0 = s1039_0 in
+ if ((string_startswith s1040_0 "mulh")) then
+ (case ((string_drop s1040_0 ((string_length "mulh")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s769_ : string -> maybe string*)
+(*val _s1034_ : string -> maybe string*)
val _ = Define `
- ((s769_:string ->(string)option) s770_0=
- (let s771_0 = s770_0 in
- if ((string_startswith s771_0 "mul")) then
- (case ((string_drop s771_0 ((string_length "mul")))) of s_ => SOME s_ )
+ ((s1034_:string ->(string)option) s1035_0=
+ (let s1036_0 = s1035_0 in
+ if ((string_startswith s1036_0 "mul")) then
+ (case ((string_drop s1036_0 ((string_length "mul")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((mul_mnemonic_matches_prefix:string ->((bool#bool#bool)#int)option) arg_=
- (let s772_0 = arg_ in
- if ((case ((s769_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s769_ s772_0 of
+ (let s1037_0 = arg_ in
+ if ((case ((s1034_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1034_ s1037_0 of
(SOME (s_)) =>
SOME ((F, T, T), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s773_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s773_ s772_0 of
+ else if ((case ((s1038_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1038_ s1037_0 of
(SOME (s_)) =>
SOME ((T, T, T), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s777_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s777_ s772_0 of
+ else if ((case ((s1042_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1042_ s1037_0 of
(SOME (s_)) =>
SOME ((T, T, F), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s781_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s781_ s772_0 of
+ else if ((case ((s1046_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1046_ s1037_0 of
(SOME (s_)) =>
SOME ((T, F, F), ((string_length arg_)) - ((string_length s_)))
)
@@ -17632,12 +19974,18 @@ val _ = Define `
(*val maybe_not_u_forwards : bool -> string*)
+(*val maybe_not_u_backwards : string -> M bool*)
+
+(*val maybe_not_u_forwards_matches : bool -> bool*)
+
+(*val maybe_not_u_backwards_matches : string -> bool*)
+
+(*val maybe_not_u_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_not_u_forwards:bool -> string) arg_= ((case arg_ of F => "u" | T => "" )))`;
-(*val maybe_not_u_backwards : string -> M bool*)
-
val _ = Define `
((maybe_not_u_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17646,15 +19994,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_not_u_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_not_u_forwards_matches:bool -> bool) arg_=
((case arg_ of F => T | T => T )))`;
-(*val maybe_not_u_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_not_u_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17663,38 +20007,36 @@ val _ = Define `
else F))`;
-(*val maybe_not_u_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s789_ : string -> maybe string*)
+(*val _s1054_ : string -> maybe string*)
val _ = Define `
- ((s789_:string ->(string)option) s790_0=
- (let s791_0 = s790_0 in
- if ((string_startswith s791_0 "")) then
- (case ((string_drop s791_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s1054_:string ->(string)option) s1055_0=
+ (let s1056_0 = s1055_0 in
+ if ((string_startswith s1056_0 "")) then
+ (case ((string_drop s1056_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s785_ : string -> maybe string*)
+(*val _s1050_ : string -> maybe string*)
val _ = Define `
- ((s785_:string ->(string)option) s786_0=
- (let s787_0 = s786_0 in
- if ((string_startswith s787_0 "u")) then
- (case ((string_drop s787_0 ((string_length "u")))) of s_ => SOME s_ )
+ ((s1050_:string ->(string)option) s1051_0=
+ (let s1052_0 = s1051_0 in
+ if ((string_startswith s1052_0 "u")) then
+ (case ((string_drop s1052_0 ((string_length "u")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_not_u_matches_prefix:string ->(bool#int)option) arg_=
- (let s788_0 = arg_ in
- if ((case ((s785_ s788_0)) of SOME (s_) => T | _ => F )) then
- (case s785_ s788_0 of
+ (let s1053_0 = arg_ in
+ if ((case ((s1050_ s1053_0)) of SOME (s_) => T | _ => F )) then
+ (case s1050_ s1053_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s789_ s788_0)) of SOME (s_) => T | _ => F )) then
- (case s789_ s788_0 of
+ else if ((case ((s1054_ s1053_0)) of SOME (s_) => T | _ => F )) then
+ (case s1054_ s1053_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
@@ -17703,41 +20045,41 @@ val _ = Define `
(*val encdec_csrop_forwards : csrop -> mword ty2*)
+(*val encdec_csrop_backwards : mword ty2 -> M csrop*)
+
+(*val encdec_csrop_forwards_matches : csrop -> bool*)
+
+(*val encdec_csrop_backwards_matches : mword ty2 -> bool*)
+
val _ = Define `
((encdec_csrop_forwards:csrop ->(2)words$word) arg_=
((case arg_ of
- CSRRW => (vec_of_bits [B0;B1] : 2 words$word)
- | CSRRS => (vec_of_bits [B1;B0] : 2 words$word)
- | CSRRC => (vec_of_bits [B1;B1] : 2 words$word)
+ CSRRW => (0b01w : 2 words$word)
+ | CSRRS => (0b10w : 2 words$word)
+ | CSRRC => (0b11w : 2 words$word)
)))`;
-(*val encdec_csrop_backwards : mword ty2 -> M csrop*)
-
val _ = Define `
((encdec_csrop_backwards:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((csrop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS CSRRW
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS CSRRS
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS CSRRC
+ if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS CSRRW
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS CSRRS
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS CSRRC
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_csrop_forwards_matches : csrop -> bool*)
-
val _ = Define `
((encdec_csrop_forwards_matches:csrop -> bool) arg_=
((case arg_ of CSRRW => T | CSRRS => T | CSRRC => T )))`;
-(*val encdec_csrop_backwards_matches : mword ty2 -> bool*)
-
val _ = Define `
((encdec_csrop_backwards_matches:(2)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then T
+ if (((b__0 = (0b01w : 2 words$word)))) then T
+ else if (((b__0 = (0b10w : 2 words$word)))) then T
+ else if (((b__0 = (0b11w : 2 words$word)))) then T
else F))`;
@@ -17746,171 +20088,142 @@ val _ = Define `
val _ = Define `
((readCSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr= (sail2_state_monad$bindS
(case (csr, (( 32 : int):ii)) of
- (b__0, g__3) =>
- if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ (b__0, g__325) =>
+ if (((b__0 = (0xF11w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mvendorid_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) w__0 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS marchid_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS mimpid_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS mhartid_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0xF12w : 12 words$word)))) then (sail2_state_monad$read_regS marchid_ref : ( 32 words$word) M)
+ else if (((b__0 = (0xF13w : 12 words$word)))) then (sail2_state_monad$read_regS mimpid_ref : ( 32 words$word) M)
+ else if (((b__0 = (0xF14w : 12 words$word)))) then (sail2_state_monad$read_regS mhartid_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
sail2_state_monad$returnS ((get_Mstatus_bits w__4 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__5 : Misa) . sail2_state_monad$returnS ((get_Misa_bits w__5 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x302w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__6 : Medeleg) .
sail2_state_monad$returnS ((get_Medeleg_bits w__6 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x303w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) .
sail2_state_monad$returnS ((get_Minterrupts_bits w__7 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__8 : Minterrupts) .
sail2_state_monad$returnS ((get_Minterrupts_bits w__8 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- (get_mtvec () : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x305w : 12 words$word)))) then (get_mtvec () : ( 32 words$word) M)
+ else if (((b__0 = (0x306w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__10 : Counteren) .
sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__10 : 32 words$word)) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS mscratch_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (get_xret_target Machine : ( 32 words$word) M) (\ (w__12 : 32 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 32 words$word) M) (\ (w__13 : 32 words$word) .
- sail2_state_monad$returnS ((and_vec w__12 w__13 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcause_ref) (\ (w__14 : Mcause) .
- sail2_state_monad$returnS ((get_Mcause_bits w__14 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS mtval_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__16 : Minterrupts) .
- sail2_state_monad$returnS ((get_Minterrupts_bits w__16 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (pmpReadCfgReg (( 0 : int):ii) : ( 32 words$word) M)
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))))))
- then
+ else if ((((((b__0 = (0x310w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatush_ref) (\ (w__11 : Mstatush) .
+ sail2_state_monad$returnS ((get_Mstatush_bits w__11 : 32 words$word)))
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__12 : Counterin) .
+ sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((get_Counterin_bits w__12 : 32 words$word)) : 32 words$word)))
+ else if (((b__0 = (0x340w : 12 words$word)))) then (sail2_state_monad$read_regS mscratch_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$bindS
+ (get_xret_target Machine : ( 32 words$word) M) (\ (w__14 : 32 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 32 words$word) M) (\ (w__15 : 32 words$word) .
+ sail2_state_monad$returnS ((and_vec w__14 w__15 : 32 words$word))))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcause_ref) (\ (w__16 : Mcause) .
+ sail2_state_monad$returnS ((get_Mcause_bits w__16 : 32 words$word)))
+ else if (((b__0 = (0x343w : 12 words$word)))) then (sail2_state_monad$read_regS mtval_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__18 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Minterrupts_bits w__18 : 32 words$word)))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then (pmpReadCfgReg (( 0 : int):ii) : ( 32 words$word) M)
+ else if ((((((b__0 = (0x3A1w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then
(pmpReadCfgReg (( 1 : int):ii) : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- (pmpReadCfgReg (( 2 : int):ii) : ( 32 words$word) M)
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))))))
- then
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then (pmpReadCfgReg (( 2 : int):ii) : ( 32 words$word) M)
+ else if ((((((b__0 = (0x3A3w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then
(pmpReadCfgReg (( 3 : int):ii) : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__37 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__37 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__38 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__38 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M)
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__39 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__39 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
+ sail2_state_monad$returnS ((subrange_vec_dec w__39 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__40 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__40 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS tselect_ref : ( 32 words$word) M) (\ (w__41 : 32 words$word) .
- sail2_state_monad$returnS ((not_vec w__41 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__42 : Mstatus) .
- sail2_state_monad$returnS ((get_Sstatus_bits ((lower_mstatus w__42)) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sedeleg_ref) (\ (w__43 : Sedeleg) .
- sail2_state_monad$returnS ((get_Sedeleg_bits w__43 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__44 : Sinterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits w__44 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__45 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__46 : Minterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mie w__45 w__46)) : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- (get_stvec () : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scounteren_ref) (\ (w__48 : Counteren) .
- sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__48 : 32 words$word)) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS sscratch_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (get_xret_target Supervisor : ( 32 words$word) M) (\ (w__50 : 32 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 32 words$word) M) (\ (w__51 : 32 words$word) .
- sail2_state_monad$returnS ((and_vec w__50 w__51 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scause_ref) (\ (w__52 : Mcause) .
- sail2_state_monad$returnS ((get_Mcause_bits w__52 : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS stval_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__54 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__55 : Minterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mip w__54 w__55)) : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__57 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__57 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__58 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__58 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__59 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__40 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
+ else if ((((((b__0 = (0xB80w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__41 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__41 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
+ else if ((((((b__0 = (0xB82w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__42 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__42 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS tselect_ref : ( 32 words$word) M) (\ (w__43 : 32 words$word) .
+ sail2_state_monad$returnS ((not_vec w__43 : 32 words$word)))
+ else if (((b__0 = (0x100w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__44 : Mstatus) .
+ sail2_state_monad$returnS ((get_Sstatus_bits ((lower_mstatus w__44)) : 32 words$word)))
+ else if (((b__0 = (0x102w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sedeleg_ref) (\ (w__45 : Sedeleg) .
+ sail2_state_monad$returnS ((get_Sedeleg_bits w__45 : 32 words$word)))
+ else if (((b__0 = (0x103w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__46 : Sinterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits w__46 : 32 words$word)))
+ else if (((b__0 = (0x104w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__47 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__48 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mie w__47 w__48)) : 32 words$word))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then (get_stvec () : ( 32 words$word) M)
+ else if (((b__0 = (0x106w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scounteren_ref) (\ (w__50 : Counteren) .
+ sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__50 : 32 words$word)) : 32 words$word)))
+ else if (((b__0 = (0x140w : 12 words$word)))) then (sail2_state_monad$read_regS sscratch_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x141w : 12 words$word)))) then sail2_state_monad$bindS
+ (get_xret_target Supervisor : ( 32 words$word) M) (\ (w__52 : 32 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 32 words$word) M) (\ (w__53 : 32 words$word) .
+ sail2_state_monad$returnS ((and_vec w__52 w__53 : 32 words$word))))
+ else if (((b__0 = (0x142w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scause_ref) (\ (w__54 : Mcause) .
+ sail2_state_monad$returnS ((get_Mcause_bits w__54 : 32 words$word)))
+ else if (((b__0 = (0x143w : 12 words$word)))) then (sail2_state_monad$read_regS stval_ref : ( 32 words$word) M)
+ else if (((b__0 = (0x144w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__56 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__57 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mip w__56 w__57)) : 32 words$word))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M)
+ else if (((b__0 = (0xC00w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__59 : 64 words$word) .
sail2_state_monad$returnS ((subrange_vec_dec w__59 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__60 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__60 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__61 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__61 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
- else if ((((((g__3 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__62 : 64 words$word) .
+ else if (((b__0 = (0xC01w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__60 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__60 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
+ else if (((b__0 = (0xC02w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__61 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__61 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)))
+ else if ((((((b__0 = (0xC80w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__62 : 64 words$word) .
sail2_state_monad$returnS ((subrange_vec_dec w__62 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
+ else if ((((((b__0 = (0xC81w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__63 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__63 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
+ else if ((((((b__0 = (0xC82w : 12 words$word)))) /\ (((g__325 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__64 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__64 (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)))
else sail2_state_monad$bindS
- (ext_read_CSR csr : ( ( 32 words$word)option) M) (\ (w__63 : ( 32 words$word)option) .
- sail2_state_monad$returnS ((case w__63 of
+ (ext_read_CSR csr : ( ( 32 words$word)option) M) (\ (w__65 : ( 32 words$word)option) .
+ sail2_state_monad$returnS ((case w__65 of
SOME (res) => res
| NONE =>
let (_ : unit) = (print_bits0 "unhandled read to CSR " csr) in
- (EXTZ (( 32 : int):ii) (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 32 words$word)
+ (EXTZ (( 32 : int):ii) (0x0w : 4 words$word) : 32 words$word)
)))
) (\ (res : xlenbits) .
let (_ : unit) =
@@ -17927,276 +20240,325 @@ val _ = Define `
val _ = Define `
((writeCSR:(12)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)= (sail2_state_monad$bindS
(case (csr, (( 32 : int):ii)) of
- (b__0, g__2) =>
- if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ (b__0, g__324) =>
+ if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
(legalize_mstatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref w__1)
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$bindS
(legalize_misa w__3 value) (\ (w__4 : Misa) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS misa_ref w__4)
(sail2_state_monad$read_regS misa_ref)) (\ (w__5 : Misa) .
sail2_state_monad$returnS (SOME ((get_Misa_bits w__5 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x302w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__6 : Medeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS medeleg_ref ((legalize_medeleg w__6 value)))
(sail2_state_monad$read_regS medeleg_ref)) (\ (w__7 : Medeleg) .
sail2_state_monad$returnS (SOME ((get_Medeleg_bits w__7 : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x303w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mideleg_ref ((legalize_mideleg w__8 value)))
(sail2_state_monad$read_regS mideleg_ref)) (\ (w__9 : Minterrupts) .
sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__10 : Minterrupts) . sail2_state_monad$bindS
(legalize_mie w__10 value) (\ (w__11 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mie_ref w__11)
(sail2_state_monad$read_regS mie_ref)) (\ (w__12 : Minterrupts) .
sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__12 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x305w : 12 words$word)))) then sail2_state_monad$bindS
(set_mtvec value : ( 32 words$word) M) (\ (w__13 : 32 words$word) . sail2_state_monad$returnS (SOME w__13))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x306w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__14 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mcounteren_ref ((legalize_mcounteren w__14 value)))
(sail2_state_monad$read_regS mcounteren_ref)) (\ (w__15 : Counteren) .
sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__15 : 32 words$word)) : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if ((((((b__0 = (0x310w : 12 words$word)))) /\ (((g__324 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatush_ref) (\ (w__16 : Mstatush) .
+ sail2_state_monad$returnS (SOME ((get_Mstatush_bits w__16 : 32 words$word))))
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__17 : Counterin) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mcountinhibit_ref ((legalize_mcountinhibit w__17 value)))
+ (sail2_state_monad$read_regS mcountinhibit_ref)) (\ (w__18 : Counterin) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Counterin_bits w__18 : 32 words$word)) : 32 words$word)))))
+ else if (((b__0 = (0x340w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mscratch_ref value)
- (sail2_state_monad$read_regS mscratch_ref : ( 32 words$word) M)) (\ (w__16 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__16))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target Machine value : ( 32 words$word) M) (\ (w__17 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__17))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mscratch_ref : ( 32 words$word) M)) (\ (w__19 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__19))
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target Machine value : ( 32 words$word) M) (\ (w__20 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__20))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mcause_bits mcause_ref value)
- (sail2_state_monad$read_regS mcause_ref)) (\ (w__18 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__18 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mcause_ref)) (\ (w__21 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__21 : 32 words$word))))
+ else if (((b__0 = (0x343w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mtval_ref value)
- (sail2_state_monad$read_regS mtval_ref : ( 32 words$word) M)) (\ (w__19 : 32 words$word) . sail2_state_monad$returnS (SOME w__19))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS
- (legalize_mip w__20 value) (\ (w__21 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__21)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__22 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__22 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 0 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if ((((((g__2 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))))))
- then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 1 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 2 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if ((((((g__2 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))))))
- then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 3 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__23 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M) (\ (w__24 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr0_ref ((pmpWriteAddr w__23 w__24 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M)) (\ (w__25 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__25))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__26 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M) (\ (w__27 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr1_ref ((pmpWriteAddr w__26 w__27 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M)) (\ (w__28 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__28))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__29 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M) (\ (w__30 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr2_ref ((pmpWriteAddr w__29 w__30 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M)) (\ (w__31 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__31))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__32 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M) (\ (w__33 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr3_ref ((pmpWriteAddr w__32 w__33 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M)) (\ (w__34 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__34))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__35 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M) (\ (w__36 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr4_ref ((pmpWriteAddr w__35 w__36 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M)) (\ (w__37 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__37))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__38 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M) (\ (w__39 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr5_ref ((pmpWriteAddr w__38 w__39 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M)) (\ (w__40 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__40))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__41 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M) (\ (w__42 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr6_ref ((pmpWriteAddr w__41 w__42 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M)) (\ (w__43 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__43))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__44 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M) (\ (w__45 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr7_ref ((pmpWriteAddr w__44 w__45 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M)) (\ (w__46 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__46))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__47 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M) (\ (w__48 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr8_ref ((pmpWriteAddr w__47 w__48 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M)) (\ (w__49 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__49))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__50 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M) (\ (w__51 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr9_ref ((pmpWriteAddr w__50 w__51 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M)) (\ (w__52 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__52))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__53 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M) (\ (w__54 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr10_ref ((pmpWriteAddr w__53 w__54 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M)) (\ (w__55 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__55))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__56 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M) (\ (w__57 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr11_ref ((pmpWriteAddr w__56 w__57 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M)) (\ (w__58 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__58))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__59 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M) (\ (w__60 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr12_ref ((pmpWriteAddr w__59 w__60 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M)) (\ (w__61 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__61))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__62 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M) (\ (w__63 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr13_ref ((pmpWriteAddr w__62 w__63 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M)) (\ (w__64 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__64))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__65 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M) (\ (w__66 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr14_ref ((pmpWriteAddr w__65 w__66 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M)) (\ (w__67 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__67))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__68 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M) (\ (w__69 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr15_ref ((pmpWriteAddr w__68 w__69 value : 32 words$word)))
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M)) (\ (w__70 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__70))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__71 : 64 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mtval_ref : ( 32 words$word) M)) (\ (w__22 : 32 words$word) . sail2_state_monad$returnS (SOME w__22))
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__23 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_mip w__23 value) (\ (w__24 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__24)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__25 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__25 : 32 words$word))))))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 0 : int):ii) value)
+ (pmpReadCfgReg (( 0 : int):ii) : ( 32 words$word) M)) (\ (w__26 : 32 words$word) . sail2_state_monad$returnS (SOME w__26))
+ else if ((((((b__0 = (0x3A1w : 12 words$word)))) /\ (((g__324 = (( 32 : int):ii))))))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 1 : int):ii) value)
+ (pmpReadCfgReg (( 1 : int):ii) : ( 32 words$word) M)) (\ (w__27 : 32 words$word) . sail2_state_monad$returnS (SOME w__27))
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 2 : int):ii) value)
+ (pmpReadCfgReg (( 2 : int):ii) : ( 32 words$word) M)) (\ (w__28 : 32 words$word) . sail2_state_monad$returnS (SOME w__28))
+ else if ((((((b__0 = (0x3A3w : 12 words$word)))) /\ (((g__324 = (( 32 : int):ii))))))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 3 : int):ii) value)
+ (pmpReadCfgReg (( 3 : int):ii) : ( 32 words$word) M)) (\ (w__29 : 32 words$word) . sail2_state_monad$returnS (SOME w__29))
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__30 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__31 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__31) (\ (w__32 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M) (\ (w__33 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr0_ref ((pmpWriteAddr ((pmpLocked w__30)) w__32 w__33 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr0_ref : ( 32 words$word) M)) (\ (w__34 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__34))))))
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__35 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__36 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__36) (\ (w__37 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M) (\ (w__38 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr1_ref ((pmpWriteAddr ((pmpLocked w__35)) w__37 w__38 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr1_ref : ( 32 words$word) M)) (\ (w__39 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__39))))))
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__40 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__41 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__41) (\ (w__42 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M) (\ (w__43 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr2_ref ((pmpWriteAddr ((pmpLocked w__40)) w__42 w__43 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr2_ref : ( 32 words$word) M)) (\ (w__44 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__44))))))
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__45 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__46 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__46) (\ (w__47 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M) (\ (w__48 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr3_ref ((pmpWriteAddr ((pmpLocked w__45)) w__47 w__48 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr3_ref : ( 32 words$word) M)) (\ (w__49 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__49))))))
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__50 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__51 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__51) (\ (w__52 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M) (\ (w__53 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr4_ref ((pmpWriteAddr ((pmpLocked w__50)) w__52 w__53 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr4_ref : ( 32 words$word) M)) (\ (w__54 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__54))))))
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__55 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__56 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__56) (\ (w__57 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M) (\ (w__58 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr5_ref ((pmpWriteAddr ((pmpLocked w__55)) w__57 w__58 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr5_ref : ( 32 words$word) M)) (\ (w__59 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__59))))))
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__60 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__61 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__61) (\ (w__62 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M) (\ (w__63 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr6_ref ((pmpWriteAddr ((pmpLocked w__60)) w__62 w__63 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr6_ref : ( 32 words$word) M)) (\ (w__64 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__64))))))
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__65 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__66 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__66) (\ (w__67 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M) (\ (w__68 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr7_ref ((pmpWriteAddr ((pmpLocked w__65)) w__67 w__68 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr7_ref : ( 32 words$word) M)) (\ (w__69 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__69))))))
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__70 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__71 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__71) (\ (w__72 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M) (\ (w__73 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr8_ref ((pmpWriteAddr ((pmpLocked w__70)) w__72 w__73 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr8_ref : ( 32 words$word) M)) (\ (w__74 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__74))))))
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__75 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__76 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__76) (\ (w__77 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M) (\ (w__78 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr9_ref ((pmpWriteAddr ((pmpLocked w__75)) w__77 w__78 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr9_ref : ( 32 words$word) M)) (\ (w__79 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__79))))))
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__80 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__81 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__81) (\ (w__82 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M) (\ (w__83 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr10_ref ((pmpWriteAddr ((pmpLocked w__80)) w__82 w__83 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr10_ref : ( 32 words$word) M)) (\ (w__84 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__84))))))
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__85 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__86 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__86) (\ (w__87 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M) (\ (w__88 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr11_ref ((pmpWriteAddr ((pmpLocked w__85)) w__87 w__88 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr11_ref : ( 32 words$word) M)) (\ (w__89 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__89))))))
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__90 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__91 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__91) (\ (w__92 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M) (\ (w__93 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr12_ref ((pmpWriteAddr ((pmpLocked w__90)) w__92 w__93 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr12_ref : ( 32 words$word) M)) (\ (w__94 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__94))))))
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__95 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__96 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__96) (\ (w__97 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M) (\ (w__98 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr13_ref ((pmpWriteAddr ((pmpLocked w__95)) w__97 w__98 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr13_ref : ( 32 words$word) M)) (\ (w__99 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__99))))))
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__100 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__101 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__101) (\ (w__102 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M) (\ (w__103 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ pmpaddr14_ref
+ ((pmpWriteAddr ((pmpLocked w__100)) w__102 w__103 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr14_ref : ( 32 words$word) M)) (\ (w__104 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__104))))))
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__105 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M) (\ (w__106 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ pmpaddr15_ref
+ ((pmpWriteAddr ((pmpLocked w__105)) F w__106 value : 32 words$word)))
+ (sail2_state_monad$read_regS pmpaddr15_ref : ( 32 words$word) M)) (\ (w__107 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__107))))
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__108 : 64 words$word) . sail2_state_monad$seqS
(sail2_state_monad$write_regS
mcycle_ref
- ((update_subrange_vec_dec w__71 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value : 64 words$word)))
+ ((update_subrange_vec_dec w__108 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value
+ : 64 words$word)))
(sail2_state_monad$returnS (SOME value)))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__72 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__109 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
minstret_ref
- ((update_subrange_vec_dec w__72 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value : 64 words$word)))
+ ((update_subrange_vec_dec w__109 (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value
+ : 64 words$word)))
(sail2_state_monad$write_regS minstret_written_ref T)) (sail2_state_monad$returnS (SOME value)))
- else if ((((((g__2 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__73 : 64 words$word) . sail2_state_monad$seqS
- (sail2_state_monad$write_regS mcycle_ref ((update_subrange_vec_dec w__73 (( 63 : int):ii) (( 32 : int):ii) value : 64 words$word)))
+ else if ((((((b__0 = (0xB80w : 12 words$word)))) /\ (((g__324 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__110 : 64 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mcycle_ref ((update_subrange_vec_dec w__110 (( 63 : int):ii) (( 32 : int):ii) value : 64 words$word)))
(sail2_state_monad$returnS (SOME value)))
- else if ((((((g__2 = (( 32 : int):ii)))) /\ (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__74 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS minstret_ref ((update_subrange_vec_dec w__74 (( 63 : int):ii) (( 32 : int):ii) value : 64 words$word)))
+ else if ((((((b__0 = (0xB82w : 12 words$word)))) /\ (((g__324 = (( 32 : int):ii))))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__111 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ minstret_ref
+ ((update_subrange_vec_dec w__111 (( 63 : int):ii) (( 32 : int):ii) value : 64 words$word)))
(sail2_state_monad$write_regS minstret_written_ref T)) (sail2_state_monad$returnS (SOME value)))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS tselect_ref value)
- (sail2_state_monad$read_regS tselect_ref : ( 32 words$word) M)) (\ (w__75 : 32 words$word) . sail2_state_monad$returnS (SOME w__75))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__76 : Mstatus) . sail2_state_monad$bindS
- (legalize_sstatus w__76 value) (\ (w__77 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mstatus_ref w__77)
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__78 : Mstatus) .
- sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__78 : 32 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sedeleg_ref) (\ (w__79 : Sedeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS sedeleg_ref ((legalize_sedeleg w__79 value)))
- (sail2_state_monad$read_regS sedeleg_ref)) (\ (w__80 : Sedeleg) .
- sail2_state_monad$returnS (SOME ((get_Sedeleg_bits w__80 : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS tselect_ref : ( 32 words$word) M)) (\ (w__112 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__112))
+ else if (((b__0 = (0x100w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__113 : Mstatus) . sail2_state_monad$bindS
+ (legalize_sstatus w__113 value) (\ (w__114 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mstatus_ref w__114)
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__115 : Mstatus) .
+ sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__115 : 32 words$word))))))
+ else if (((b__0 = (0x102w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sedeleg_ref) (\ (w__116 : Sedeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS sedeleg_ref ((legalize_sedeleg w__116 value)))
+ (sail2_state_monad$read_regS sedeleg_ref)) (\ (w__117 : Sedeleg) .
+ sail2_state_monad$returnS (SOME ((get_Sedeleg_bits w__117 : 32 words$word)))))
+ else if (((b__0 = (0x103w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Sinterrupts_bits sideleg_ref value)
- (sail2_state_monad$read_regS sideleg_ref)) (\ (w__81 : Sinterrupts) .
- sail2_state_monad$returnS (SOME ((get_Sinterrupts_bits w__81 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__82 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__83 : Minterrupts) . sail2_state_monad$bindS
- (legalize_sie w__82 w__83 value) (\ (w__84 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mie_ref w__84)
- (sail2_state_monad$read_regS mie_ref)) (\ (w__85 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__85 : 32 words$word)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_stvec value : ( 32 words$word) M) (\ (w__86 : 32 words$word) . sail2_state_monad$returnS (SOME w__86))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scounteren_ref) (\ (w__87 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS scounteren_ref ((legalize_scounteren w__87 value)))
- (sail2_state_monad$read_regS scounteren_ref)) (\ (w__88 : Counteren) .
- sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__88 : 32 words$word)) : 32 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS sideleg_ref)) (\ (w__118 : Sinterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Sinterrupts_bits w__118 : 32 words$word))))
+ else if (((b__0 = (0x104w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__119 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__120 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_sie w__119 w__120 value) (\ (w__121 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mie_ref w__121)
+ (sail2_state_monad$read_regS mie_ref)) (\ (w__122 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__122 : 32 words$word)))))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_stvec value : ( 32 words$word) M) (\ (w__123 : 32 words$word) . sail2_state_monad$returnS (SOME w__123))
+ else if (((b__0 = (0x106w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scounteren_ref) (\ (w__124 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS scounteren_ref ((legalize_scounteren w__124 value)))
+ (sail2_state_monad$read_regS scounteren_ref)) (\ (w__125 : Counteren) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 32 : int):ii) ((get_Counteren_bits w__125 : 32 words$word)) : 32 words$word)))))
+ else if (((b__0 = (0x140w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS sscratch_ref value)
- (sail2_state_monad$read_regS sscratch_ref : ( 32 words$word) M)) (\ (w__89 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__89))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target Supervisor value : ( 32 words$word) M) (\ (w__90 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__90))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS sscratch_ref : ( 32 words$word) M)) (\ (w__126 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__126))
+ else if (((b__0 = (0x141w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target Supervisor value : ( 32 words$word) M) (\ (w__127 : 32 words$word) .
+ sail2_state_monad$returnS (SOME w__127))
+ else if (((b__0 = (0x142w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mcause_bits scause_ref value)
- (sail2_state_monad$read_regS scause_ref)) (\ (w__91 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__91 : 32 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS scause_ref)) (\ (w__128 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__128 : 32 words$word))))
+ else if (((b__0 = (0x143w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS stval_ref value)
- (sail2_state_monad$read_regS stval_ref : ( 32 words$word) M)) (\ (w__92 : 32 words$word) . sail2_state_monad$returnS (SOME w__92))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__93 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__94 : Minterrupts) . sail2_state_monad$bindS
- (legalize_sip w__93 w__94 value) (\ (w__95 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__95)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__96 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__96 : 32 words$word)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (cur_Architecture () ) (\ (w__97 : Architecture) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__98 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS satp_ref ((legalize_satp w__97 w__98 value : 32 words$word)))
- (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M)) (\ (w__99 : 32 words$word) . sail2_state_monad$returnS (SOME w__99))))
- else sail2_state_monad$returnS NONE
+ (sail2_state_monad$read_regS stval_ref : ( 32 words$word) M)) (\ (w__129 : 32 words$word) . sail2_state_monad$returnS (SOME w__129))
+ else if (((b__0 = (0x144w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__130 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__131 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_sip w__130 w__131 value) (\ (w__132 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__132)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__133 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__133 : 32 words$word)))))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then sail2_state_monad$bindS
+ (cur_Architecture () ) (\ (w__134 : Architecture) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M) (\ (w__135 : 32 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS satp_ref ((legalize_satp w__134 w__135 value : 32 words$word)))
+ (sail2_state_monad$read_regS satp_ref : ( 32 words$word) M)) (\ (w__136 : 32 words$word) . sail2_state_monad$returnS (SOME w__136))))
+ else (ext_write_CSR csr value : ( ( 32 words$word)option) M)
) (\ (res : xlenbits option) .
- (case res of
+ sail2_state_monad$returnS ((case res of
SOME (v) =>
- sail2_state_monad$returnS (if ((get_config_print_reg () )) then
- print_dbg
- ((STRCAT "CSR "
- ((STRCAT ((csr_name csr))
- ((STRCAT " <- "
- ((STRCAT ((string_of_bits v))
- ((STRCAT " (input: "
- ((STRCAT ((string_of_bits value)) ")"))))))))))))
- else () )
- | NONE => sail2_state_monad$bindS
- (ext_write_CSR csr value) (\ (w__149 : bool) .
- sail2_state_monad$returnS (if w__149 then ()
- else print_bits0 "unhandled write to CSR " csr))
- ))))`;
+ if ((get_config_print_reg () )) then
+ print_dbg
+ ((STRCAT "CSR "
+ ((STRCAT ((csr_name csr))
+ ((STRCAT " <- "
+ ((STRCAT ((string_of_bits v))
+ ((STRCAT " (input: " ((STRCAT ((string_of_bits value)) ")"))))))))))))
+ else ()
+ | NONE => print_bits0 "unhandled write to CSR " csr
+ )))))`;
(*val maybe_i_forwards : bool -> string*)
+(*val maybe_i_backwards : string -> M bool*)
+
+(*val maybe_i_forwards_matches : bool -> bool*)
+
+(*val maybe_i_backwards_matches : string -> bool*)
+
+(*val maybe_i_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_i_forwards:bool -> string) arg_= ((case arg_ of T => "i" | F => "" )))`;
-(*val maybe_i_backwards : string -> M bool*)
-
val _ = Define `
((maybe_i_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -18205,15 +20567,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_i_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_i_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_i_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_i_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -18222,38 +20580,36 @@ val _ = Define `
else F))`;
-(*val maybe_i_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s797_ : string -> maybe string*)
+(*val _s1062_ : string -> maybe string*)
val _ = Define `
- ((s797_:string ->(string)option) s798_0=
- (let s799_0 = s798_0 in
- if ((string_startswith s799_0 "")) then
- (case ((string_drop s799_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s1062_:string ->(string)option) s1063_0=
+ (let s1064_0 = s1063_0 in
+ if ((string_startswith s1064_0 "")) then
+ (case ((string_drop s1064_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s793_ : string -> maybe string*)
+(*val _s1058_ : string -> maybe string*)
val _ = Define `
- ((s793_:string ->(string)option) s794_0=
- (let s795_0 = s794_0 in
- if ((string_startswith s795_0 "i")) then
- (case ((string_drop s795_0 ((string_length "i")))) of s_ => SOME s_ )
+ ((s1058_:string ->(string)option) s1059_0=
+ (let s1060_0 = s1059_0 in
+ if ((string_startswith s1060_0 "i")) then
+ (case ((string_drop s1060_0 ((string_length "i")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_i_matches_prefix:string ->(bool#int)option) arg_=
- (let s796_0 = arg_ in
- if ((case ((s793_ s796_0)) of SOME (s_) => T | _ => F )) then
- (case s793_ s796_0 of
+ (let s1061_0 = arg_ in
+ if ((case ((s1058_ s1061_0)) of SOME (s_) => T | _ => F )) then
+ (case s1058_ s1061_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s797_ s796_0)) of SOME (s_) => T | _ => F )) then
- (case s797_ s796_0 of
+ else if ((case ((s1062_ s1061_0)) of SOME (s_) => T | _ => F )) then
+ (case s1062_ s1061_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -18262,13 +20618,19 @@ val _ = Define `
(*val csr_mnemonic_forwards : csrop -> string*)
+(*val csr_mnemonic_backwards : string -> M csrop*)
+
+(*val csr_mnemonic_forwards_matches : csrop -> bool*)
+
+(*val csr_mnemonic_backwards_matches : string -> bool*)
+
+(*val csr_mnemonic_matches_prefix : string -> maybe ((csrop * ii))*)
+
val _ = Define `
((csr_mnemonic_forwards:csrop -> string) arg_=
((case arg_ of CSRRW => "csrrw" | CSRRS => "csrrs" | CSRRC => "csrrc" )))`;
-(*val csr_mnemonic_backwards : string -> M csrop*)
-
val _ = Define `
((csr_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((csrop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -18278,15 +20640,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val csr_mnemonic_forwards_matches : csrop -> bool*)
-
val _ = Define `
((csr_mnemonic_forwards_matches:csrop -> bool) arg_=
((case arg_ of CSRRW => T | CSRRS => T | CSRRC => T )))`;
-(*val csr_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((csr_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -18296,60 +20654,1322 @@ val _ = Define `
else F))`;
-(*val csr_mnemonic_matches_prefix : string -> maybe ((csrop * ii))*)
-
-(*val _s809_ : string -> maybe string*)
+(*val _s1074_ : string -> maybe string*)
val _ = Define `
- ((s809_:string ->(string)option) s810_0=
- (let s811_0 = s810_0 in
- if ((string_startswith s811_0 "csrrc")) then
- (case ((string_drop s811_0 ((string_length "csrrc")))) of s_ => SOME s_ )
+ ((s1074_:string ->(string)option) s1075_0=
+ (let s1076_0 = s1075_0 in
+ if ((string_startswith s1076_0 "csrrc")) then
+ (case ((string_drop s1076_0 ((string_length "csrrc")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s805_ : string -> maybe string*)
+(*val _s1070_ : string -> maybe string*)
val _ = Define `
- ((s805_:string ->(string)option) s806_0=
- (let s807_0 = s806_0 in
- if ((string_startswith s807_0 "csrrs")) then
- (case ((string_drop s807_0 ((string_length "csrrs")))) of s_ => SOME s_ )
+ ((s1070_:string ->(string)option) s1071_0=
+ (let s1072_0 = s1071_0 in
+ if ((string_startswith s1072_0 "csrrs")) then
+ (case ((string_drop s1072_0 ((string_length "csrrs")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s801_ : string -> maybe string*)
+(*val _s1066_ : string -> maybe string*)
val _ = Define `
- ((s801_:string ->(string)option) s802_0=
- (let s803_0 = s802_0 in
- if ((string_startswith s803_0 "csrrw")) then
- (case ((string_drop s803_0 ((string_length "csrrw")))) of s_ => SOME s_ )
+ ((s1066_:string ->(string)option) s1067_0=
+ (let s1068_0 = s1067_0 in
+ if ((string_startswith s1068_0 "csrrw")) then
+ (case ((string_drop s1068_0 ((string_length "csrrw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((csr_mnemonic_matches_prefix:string ->(csrop#int)option) arg_=
- (let s804_0 = arg_ in
- if ((case ((s801_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s801_ s804_0 of
+ (let s1069_0 = arg_ in
+ if ((case ((s1066_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1066_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s805_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s805_ s804_0 of
+ else if ((case ((s1070_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1070_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRS, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s809_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s809_ s804_0 of
+ else if ((case ((s1074_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1074_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRC, ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
-(*val encdec_forwards : ast -> M (mword ty32)*)
+(*val encdec_rounding_mode_forwards : rounding_mode -> mword ty3*)
+
+(*val encdec_rounding_mode_backwards : mword ty3 -> M rounding_mode*)
+
+(*val encdec_rounding_mode_forwards_matches : rounding_mode -> bool*)
+
+(*val encdec_rounding_mode_backwards_matches : mword ty3 -> bool*)
+
+val _ = Define `
+ ((encdec_rounding_mode_forwards:rounding_mode ->(3)words$word) arg_=
+ ((case arg_ of
+ RM_RNE => (0b000w : 3 words$word)
+ | RM_RTZ => (0b001w : 3 words$word)
+ | RM_RDN => (0b010w : 3 words$word)
+ | RM_RUP => (0b011w : 3 words$word)
+ | RM_RMM => (0b100w : 3 words$word)
+ | RM_DYN => (0b111w : 3 words$word)
+ )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RM_RNE
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RM_RTZ
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS RM_RDN
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS RM_RUP
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RM_RMM
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RM_DYN
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_forwards_matches:rounding_mode -> bool) arg_=
+ ((case arg_ of
+ RM_RNE => T
+ | RM_RTZ => T
+ | RM_RDN => T
+ | RM_RUP => T
+ | RM_RMM => T
+ | RM_DYN => T
+ )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_backwards_matches:(3)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
+ else F))`;
+
+
+(*val frm_mnemonic_forwards : rounding_mode -> string*)
+
+(*val frm_mnemonic_backwards : string -> M rounding_mode*)
+
+(*val frm_mnemonic_forwards_matches : rounding_mode -> bool*)
+
+(*val frm_mnemonic_backwards_matches : string -> bool*)
+
+(*val frm_mnemonic_matches_prefix : string -> maybe ((rounding_mode * ii))*)
+
+val _ = Define `
+ ((frm_mnemonic_forwards:rounding_mode -> string) arg_=
+ ((case arg_ of
+ RM_RNE => "rne"
+ | RM_RTZ => "rtz"
+ | RM_RDN => "rdn"
+ | RM_RUP => "rup"
+ | RM_RMM => "rmm"
+ | RM_DYN => "dyn"
+ )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "rne"))) then sail2_state_monad$returnS RM_RNE
+ else if (((p0_ = "rtz"))) then sail2_state_monad$returnS RM_RTZ
+ else if (((p0_ = "rdn"))) then sail2_state_monad$returnS RM_RDN
+ else if (((p0_ = "rup"))) then sail2_state_monad$returnS RM_RUP
+ else if (((p0_ = "rmm"))) then sail2_state_monad$returnS RM_RMM
+ else if (((p0_ = "dyn"))) then sail2_state_monad$returnS RM_DYN
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_forwards_matches:rounding_mode -> bool) arg_=
+ ((case arg_ of
+ RM_RNE => T
+ | RM_RTZ => T
+ | RM_RDN => T
+ | RM_RUP => T
+ | RM_RMM => T
+ | RM_DYN => T
+ )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "rne"))) then T
+ else if (((p0_ = "rtz"))) then T
+ else if (((p0_ = "rdn"))) then T
+ else if (((p0_ = "rup"))) then T
+ else if (((p0_ = "rmm"))) then T
+ else if (((p0_ = "dyn"))) then T
+ else F))`;
+
+
+(*val _s1098_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1098_:string ->(string)option) s1099_0=
+ (let s1100_0 = s1099_0 in
+ if ((string_startswith s1100_0 "dyn")) then
+ (case ((string_drop s1100_0 ((string_length "dyn")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1094_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1094_:string ->(string)option) s1095_0=
+ (let s1096_0 = s1095_0 in
+ if ((string_startswith s1096_0 "rmm")) then
+ (case ((string_drop s1096_0 ((string_length "rmm")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1090_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1090_:string ->(string)option) s1091_0=
+ (let s1092_0 = s1091_0 in
+ if ((string_startswith s1092_0 "rup")) then
+ (case ((string_drop s1092_0 ((string_length "rup")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1086_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1086_:string ->(string)option) s1087_0=
+ (let s1088_0 = s1087_0 in
+ if ((string_startswith s1088_0 "rdn")) then
+ (case ((string_drop s1088_0 ((string_length "rdn")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1082_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1082_:string ->(string)option) s1083_0=
+ (let s1084_0 = s1083_0 in
+ if ((string_startswith s1084_0 "rtz")) then
+ (case ((string_drop s1084_0 ((string_length "rtz")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1078_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1078_:string ->(string)option) s1079_0=
+ (let s1080_0 = s1079_0 in
+ if ((string_startswith s1080_0 "rne")) then
+ (case ((string_drop s1080_0 ((string_length "rne")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_matches_prefix:string ->(rounding_mode#int)option) arg_=
+ (let s1081_0 = arg_ in
+ if ((case ((s1078_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1078_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RNE, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1082_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1082_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RTZ, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1086_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1086_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RDN, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1090_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1090_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RUP, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1094_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1094_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RMM, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1098_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1098_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_DYN, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val select_instr_or_fcsr_rm : rounding_mode -> M rounding_mode*)
+
+val _ = Define `
+ ((select_instr_or_fcsr_rm:rounding_mode ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) instr_rm=
+ (if (((instr_rm = RM_DYN))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) .
+ encdec_rounding_mode_backwards ((get_Fcsr_FRM w__0 : 3 words$word)))
+ else sail2_state_monad$returnS instr_rm))`;
+
+
+(*val nxFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((nxFlag:unit ->(5)words$word) () = ((0b00001w : 5 words$word)))`;
+
+
+(*val ufFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((ufFlag:unit ->(5)words$word) () = ((0b00010w : 5 words$word)))`;
+
+
+(*val ofFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((ofFlag:unit ->(5)words$word) () = ((0b00100w : 5 words$word)))`;
+
+
+(*val dzFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((dzFlag:unit ->(5)words$word) () = ((0b01000w : 5 words$word)))`;
+
+
+(*val nvFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((nvFlag:unit ->(5)words$word) () = ((0b10000w : 5 words$word)))`;
+
+
+(*val fsplit_S : mword ty32 -> (mword ty1 * mword ty8 * mword ty23)*)
+
+val _ = Define `
+ ((fsplit_S:(32)words$word ->(1)words$word#(8)words$word#(23)words$word) x32=
+ ((subrange_vec_dec x32 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word),
+ (subrange_vec_dec x32 (( 30 : int):ii) (( 23 : int):ii) : 8 words$word),
+ (subrange_vec_dec x32 (( 22 : int):ii) (( 0 : int):ii) : 23 words$word)))`;
+
+
+(*val fmake_S : mword ty1 -> mword ty8 -> mword ty23 -> mword ty32*)
+
+val _ = Define `
+ ((fmake_S:(1)words$word ->(8)words$word ->(23)words$word ->(32)words$word) sign exp mant= ((concat_vec sign ((concat_vec exp mant : 31 words$word)) : 32 words$word)))`;
+
+
+(*val canonical_NaN_S : unit -> mword ty32*)
+
+val _ = Define `
+ ((canonical_NaN_S:unit ->(32)words$word) () = ((0x7FC00000w : 32 words$word)))`;
+
+
+(*val f_is_neg_inf_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_inf_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_neg_norm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_norm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp <> ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((exp <> ((ones (( 8 : int):ii) : 8 words$word)))))))))))`;
+
+
+(*val f_is_neg_subnorm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_subnorm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_neg_zero_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_zero_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((ones (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_zero_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_zero_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_subnorm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_subnorm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_norm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_norm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp <> ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((exp <> ((ones (( 8 : int):ii) : 8 words$word)))))))))))`;
+
+
+(*val f_is_pos_inf_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_inf_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_SNaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_SNaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ ((((((((access_vec_dec mant (( 22 : int):ii))) = B0))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_QNaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_QNaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((((access_vec_dec mant (( 22 : int):ii))) = B1))))))`;
+
+
+(*val f_is_NaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_NaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word))))))))`;
+
+
+(*val negate_S : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((negate_S:(32)words$word ->(32)words$word) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let new_sign = (if (((sign = (0b0w : 1 words$word)))) then (0b1w : 1 words$word) else (0b0w : 1 words$word)) in
+ (fmake_S new_sign exp mant : 32 words$word)))`;
+
+
+(*val feq_quiet_S : mword ty32 -> mword ty32 -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((feq_quiet_S:(32)words$word ->(32)words$word -> bool#(5)words$word) v1 v2=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_S v1)) \/ ((f_is_pos_zero_S v1))) in
+ let v2Is0 = (((f_is_neg_zero_S v2)) \/ ((f_is_pos_zero_S v2))) in
+ let result = ((((v1 = v2))) \/ (((v1Is0 /\ v2Is0)))) in
+ let fflags =
+ (if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val flt_S : mword ty32 -> mword ty32 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((flt_S:(32)words$word ->(32)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) < ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then F
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) > ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_S v1)) \/ ((f_is_NaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val fle_S : mword ty32 -> mword ty32 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((fle_S:(32)words$word ->(32)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_S v1)) \/ ((f_is_pos_zero_S v1))) in
+ let v2Is0 = (((f_is_neg_zero_S v2)) \/ ((f_is_pos_zero_S v2))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) <= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then
+ (v1Is0 /\ v2Is0)
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) >= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_S v1)) \/ ((f_is_NaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val nan_box : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((nan_box:(32)words$word ->(32)words$word) val_32b= val_32b)`;
+
+
+(*val nan_unbox : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((nan_unbox:(32)words$word ->(32)words$word) regval= regval)`;
+
+
+(*val is_RV32F_or_RV64F : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV32F_or_RV64F:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS ((haveFExt () )) (sail2_state_monad$returnS (((((((( 32 : int):ii) = (( 32 : int):ii)))) \/ ((((( 32 : int):ii) = (( 64 : int):ii))))))))))`;
+
+
+(*val is_RV64F : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV64F:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state$and_boolS ((haveFExt () )) (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))))`;
+
+
+(*val is_RV32D_or_RV64D : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV32D_or_RV64D:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS ((haveDExt () )) (sail2_state_monad$returnS (((((((( 32 : int):ii) = (( 32 : int):ii)))) \/ ((((( 32 : int):ii) = (( 64 : int):ii))))))))))`;
+
+
+(*val is_RV64D : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV64D:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state$and_boolS ((haveDExt () )) (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))))`;
+
+
+(*val process_fload64 : mword ty5 -> mword ty32 -> MemoryOpResult (mword ty64) -> M Retired*)
+
+val _ = Define `
+ ((process_fload64:(5)words$word ->(32)words$word ->((64)words$word)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value= (sail2_state_monad$returnS RETIRE_FAIL))`;
+
+
+(*val process_fload32 : mword ty5 -> mword ty32 -> MemoryOpResult (mword ty32) -> M Retired*)
+
+val _ = Define `
+ ((process_fload32:(5)words$word ->(32)words$word ->((32)words$word)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value=
+ ((case value of
+ MemValue (result) => sail2_state_monad$seqS (wF_bits rd ((nan_box result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ )))`;
+
+
+(*val process_fstore : mword ty32 -> MemoryOpResult bool -> M Retired*)
+
+val _ = Define `
+ ((process_fstore:(32)words$word ->(bool)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr value=
+ ((case value of
+ MemValue (T) => sail2_state_monad$returnS RETIRE_SUCCESS
+ | MemValue (F) => internal_error "store got false from mem_write_value"
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ )))`;
+
+
+(*val f_madd_type_mnemonic_S_forwards : f_madd_op_S -> string*)
+
+(*val f_madd_type_mnemonic_S_backwards : string -> M f_madd_op_S*)
+
+(*val f_madd_type_mnemonic_S_forwards_matches : f_madd_op_S -> bool*)
+
+(*val f_madd_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_madd_type_mnemonic_S_matches_prefix : string -> maybe ((f_madd_op_S * ii))*)
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_forwards:f_madd_op_S -> string) arg_=
+ ((case arg_ of
+ FMADD_S => "fmadd.s"
+ | FMSUB_S => "fmsub.s"
+ | FNMSUB_S => "fnmsub.s"
+ | FNMADD_S => "fnmadd.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_madd_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.s"))) then sail2_state_monad$returnS FMADD_S
+ else if (((p0_ = "fmsub.s"))) then sail2_state_monad$returnS FMSUB_S
+ else if (((p0_ = "fnmsub.s"))) then sail2_state_monad$returnS FNMSUB_S
+ else if (((p0_ = "fnmadd.s"))) then sail2_state_monad$returnS FNMADD_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_forwards_matches:f_madd_op_S -> bool) arg_=
+ ((case arg_ of
+ FMADD_S => T
+ | FMSUB_S => T
+ | FNMSUB_S => T
+ | FNMADD_S => T
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.s"))) then T
+ else if (((p0_ = "fmsub.s"))) then T
+ else if (((p0_ = "fnmsub.s"))) then T
+ else if (((p0_ = "fnmadd.s"))) then T
+ else F))`;
+
+
+(*val _s1114_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1114_:string ->(string)option) s1115_0=
+ (let s1116_0 = s1115_0 in
+ if ((string_startswith s1116_0 "fnmadd.s")) then
+ (case ((string_drop s1116_0 ((string_length "fnmadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1110_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1110_:string ->(string)option) s1111_0=
+ (let s1112_0 = s1111_0 in
+ if ((string_startswith s1112_0 "fnmsub.s")) then
+ (case ((string_drop s1112_0 ((string_length "fnmsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1106_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1106_:string ->(string)option) s1107_0=
+ (let s1108_0 = s1107_0 in
+ if ((string_startswith s1108_0 "fmsub.s")) then
+ (case ((string_drop s1108_0 ((string_length "fmsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1102_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1102_:string ->(string)option) s1103_0=
+ (let s1104_0 = s1103_0 in
+ if ((string_startswith s1104_0 "fmadd.s")) then
+ (case ((string_drop s1104_0 ((string_length "fmadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_matches_prefix:string ->(f_madd_op_S#int)option) arg_=
+ (let s1105_0 = arg_ in
+ if ((case ((s1102_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1102_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FMADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1106_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1106_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FMSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1110_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1110_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FNMSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1114_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1114_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FNMADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_rm_type_mnemonic_S_forwards : f_bin_rm_op_S -> string*)
+
+(*val f_bin_rm_type_mnemonic_S_backwards : string -> M f_bin_rm_op_S*)
+
+(*val f_bin_rm_type_mnemonic_S_forwards_matches : f_bin_rm_op_S -> bool*)
+
+(*val f_bin_rm_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_bin_rm_type_mnemonic_S_matches_prefix : string -> maybe ((f_bin_rm_op_S * ii))*)
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_forwards:f_bin_rm_op_S -> string) arg_=
+ ((case arg_ of
+ FADD_S => "fadd.s"
+ | FSUB_S => "fsub.s"
+ | FMUL_S => "fmul.s"
+ | FDIV_S => "fdiv.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_rm_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.s"))) then sail2_state_monad$returnS FADD_S
+ else if (((p0_ = "fsub.s"))) then sail2_state_monad$returnS FSUB_S
+ else if (((p0_ = "fmul.s"))) then sail2_state_monad$returnS FMUL_S
+ else if (((p0_ = "fdiv.s"))) then sail2_state_monad$returnS FDIV_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_forwards_matches:f_bin_rm_op_S -> bool) arg_=
+ ((case arg_ of FADD_S => T | FSUB_S => T | FMUL_S => T | FDIV_S => T )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.s"))) then T
+ else if (((p0_ = "fsub.s"))) then T
+ else if (((p0_ = "fmul.s"))) then T
+ else if (((p0_ = "fdiv.s"))) then T
+ else F))`;
+
+
+(*val _s1130_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1130_:string ->(string)option) s1131_0=
+ (let s1132_0 = s1131_0 in
+ if ((string_startswith s1132_0 "fdiv.s")) then
+ (case ((string_drop s1132_0 ((string_length "fdiv.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1126_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1126_:string ->(string)option) s1127_0=
+ (let s1128_0 = s1127_0 in
+ if ((string_startswith s1128_0 "fmul.s")) then
+ (case ((string_drop s1128_0 ((string_length "fmul.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1122_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1122_:string ->(string)option) s1123_0=
+ (let s1124_0 = s1123_0 in
+ if ((string_startswith s1124_0 "fsub.s")) then
+ (case ((string_drop s1124_0 ((string_length "fsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1118_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1118_:string ->(string)option) s1119_0=
+ (let s1120_0 = s1119_0 in
+ if ((string_startswith s1120_0 "fadd.s")) then
+ (case ((string_drop s1120_0 ((string_length "fadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_matches_prefix:string ->(f_bin_rm_op_S#int)option) arg_=
+ (let s1121_0 = arg_ in
+ if ((case ((s1118_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1118_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1122_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1122_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1126_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1126_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FMUL_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1130_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1130_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FDIV_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_rm_type_mnemonic_S_forwards : f_un_rm_op_S -> string*)
+
+(*val f_un_rm_type_mnemonic_S_backwards : string -> M f_un_rm_op_S*)
+
+(*val f_un_rm_type_mnemonic_S_forwards_matches : f_un_rm_op_S -> bool*)
+
+(*val f_un_rm_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_un_rm_type_mnemonic_S_matches_prefix : string -> maybe ((f_un_rm_op_S * ii))*)
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_forwards:f_un_rm_op_S -> string) arg_=
+ ((case arg_ of
+ FSQRT_S => "fsqrt.s"
+ | FCVT_W_S => "fcvt.w.s"
+ | FCVT_WU_S => "fcvt.wu.s"
+ | FCVT_S_W => "fcvt.s.w"
+ | FCVT_S_WU => "fcvt.s.wu"
+ | FCVT_L_S => "fcvt.l.s"
+ | FCVT_LU_S => "fcvt.lu.s"
+ | FCVT_S_L => "fcvt.s.l"
+ | FCVT_S_LU => "fcvt.s.lu"
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_rm_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.s"))) then sail2_state_monad$returnS FSQRT_S
+ else if (((p0_ = "fcvt.w.s"))) then sail2_state_monad$returnS FCVT_W_S
+ else if (((p0_ = "fcvt.wu.s"))) then sail2_state_monad$returnS FCVT_WU_S
+ else if (((p0_ = "fcvt.s.w"))) then sail2_state_monad$returnS FCVT_S_W
+ else if (((p0_ = "fcvt.s.wu"))) then sail2_state_monad$returnS FCVT_S_WU
+ else if (((p0_ = "fcvt.l.s"))) then sail2_state_monad$returnS FCVT_L_S
+ else if (((p0_ = "fcvt.lu.s"))) then sail2_state_monad$returnS FCVT_LU_S
+ else if (((p0_ = "fcvt.s.l"))) then sail2_state_monad$returnS FCVT_S_L
+ else if (((p0_ = "fcvt.s.lu"))) then sail2_state_monad$returnS FCVT_S_LU
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_forwards_matches:f_un_rm_op_S -> bool) arg_=
+ ((case arg_ of
+ FSQRT_S => T
+ | FCVT_W_S => T
+ | FCVT_WU_S => T
+ | FCVT_S_W => T
+ | FCVT_S_WU => T
+ | FCVT_L_S => T
+ | FCVT_LU_S => T
+ | FCVT_S_L => T
+ | FCVT_S_LU => T
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.s"))) then T
+ else if (((p0_ = "fcvt.w.s"))) then T
+ else if (((p0_ = "fcvt.wu.s"))) then T
+ else if (((p0_ = "fcvt.s.w"))) then T
+ else if (((p0_ = "fcvt.s.wu"))) then T
+ else if (((p0_ = "fcvt.l.s"))) then T
+ else if (((p0_ = "fcvt.lu.s"))) then T
+ else if (((p0_ = "fcvt.s.l"))) then T
+ else if (((p0_ = "fcvt.s.lu"))) then T
+ else F))`;
+
+
+(*val _s1166_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1166_:string ->(string)option) s1167_0=
+ (let s1168_0 = s1167_0 in
+ if ((string_startswith s1168_0 "fcvt.s.lu")) then
+ (case ((string_drop s1168_0 ((string_length "fcvt.s.lu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1162_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1162_:string ->(string)option) s1163_0=
+ (let s1164_0 = s1163_0 in
+ if ((string_startswith s1164_0 "fcvt.s.l")) then
+ (case ((string_drop s1164_0 ((string_length "fcvt.s.l")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1158_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1158_:string ->(string)option) s1159_0=
+ (let s1160_0 = s1159_0 in
+ if ((string_startswith s1160_0 "fcvt.lu.s")) then
+ (case ((string_drop s1160_0 ((string_length "fcvt.lu.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1154_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1154_:string ->(string)option) s1155_0=
+ (let s1156_0 = s1155_0 in
+ if ((string_startswith s1156_0 "fcvt.l.s")) then
+ (case ((string_drop s1156_0 ((string_length "fcvt.l.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1150_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1150_:string ->(string)option) s1151_0=
+ (let s1152_0 = s1151_0 in
+ if ((string_startswith s1152_0 "fcvt.s.wu")) then
+ (case ((string_drop s1152_0 ((string_length "fcvt.s.wu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1146_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1146_:string ->(string)option) s1147_0=
+ (let s1148_0 = s1147_0 in
+ if ((string_startswith s1148_0 "fcvt.s.w")) then
+ (case ((string_drop s1148_0 ((string_length "fcvt.s.w")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1142_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1142_:string ->(string)option) s1143_0=
+ (let s1144_0 = s1143_0 in
+ if ((string_startswith s1144_0 "fcvt.wu.s")) then
+ (case ((string_drop s1144_0 ((string_length "fcvt.wu.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1138_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1138_:string ->(string)option) s1139_0=
+ (let s1140_0 = s1139_0 in
+ if ((string_startswith s1140_0 "fcvt.w.s")) then
+ (case ((string_drop s1140_0 ((string_length "fcvt.w.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1134_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1134_:string ->(string)option) s1135_0=
+ (let s1136_0 = s1135_0 in
+ if ((string_startswith s1136_0 "fsqrt.s")) then
+ (case ((string_drop s1136_0 ((string_length "fsqrt.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_matches_prefix:string ->(f_un_rm_op_S#int)option) arg_=
+ (let s1137_0 = arg_ in
+ if ((case ((s1134_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1134_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FSQRT_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1138_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1138_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_W_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1142_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1142_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_WU_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1146_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1146_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_W, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1150_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1150_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_WU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1154_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1154_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_L_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1158_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1158_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_LU_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1162_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1162_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_L, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1166_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1166_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_LU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_type_mnemonic_S_forwards : f_bin_op_S -> string*)
+
+(*val f_bin_type_mnemonic_S_backwards : string -> M f_bin_op_S*)
+
+(*val f_bin_type_mnemonic_S_forwards_matches : f_bin_op_S -> bool*)
+
+(*val f_bin_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_bin_type_mnemonic_S_matches_prefix : string -> maybe ((f_bin_op_S * ii))*)
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_forwards:f_bin_op_S -> string) arg_=
+ ((case arg_ of
+ FSGNJ_S => "fsgnj.s"
+ | FSGNJN_S => "fsgnjn.s"
+ | FSGNJX_S => "fsgnjx.s"
+ | FMIN_S => "fmin.s"
+ | FMAX_S => "fmax.s"
+ | FEQ_S => "feq.s"
+ | FLT_S => "flt.s"
+ | FLE_S => "fle.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.s"))) then sail2_state_monad$returnS FSGNJ_S
+ else if (((p0_ = "fsgnjn.s"))) then sail2_state_monad$returnS FSGNJN_S
+ else if (((p0_ = "fsgnjx.s"))) then sail2_state_monad$returnS FSGNJX_S
+ else if (((p0_ = "fmin.s"))) then sail2_state_monad$returnS FMIN_S
+ else if (((p0_ = "fmax.s"))) then sail2_state_monad$returnS FMAX_S
+ else if (((p0_ = "feq.s"))) then sail2_state_monad$returnS FEQ_S
+ else if (((p0_ = "flt.s"))) then sail2_state_monad$returnS FLT_S
+ else if (((p0_ = "fle.s"))) then sail2_state_monad$returnS FLE_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_forwards_matches:f_bin_op_S -> bool) arg_=
+ ((case arg_ of
+ FSGNJ_S => T
+ | FSGNJN_S => T
+ | FSGNJX_S => T
+ | FMIN_S => T
+ | FMAX_S => T
+ | FEQ_S => T
+ | FLT_S => T
+ | FLE_S => T
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.s"))) then T
+ else if (((p0_ = "fsgnjn.s"))) then T
+ else if (((p0_ = "fsgnjx.s"))) then T
+ else if (((p0_ = "fmin.s"))) then T
+ else if (((p0_ = "fmax.s"))) then T
+ else if (((p0_ = "feq.s"))) then T
+ else if (((p0_ = "flt.s"))) then T
+ else if (((p0_ = "fle.s"))) then T
+ else F))`;
+
+
+(*val _s1198_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1198_:string ->(string)option) s1199_0=
+ (let s1200_0 = s1199_0 in
+ if ((string_startswith s1200_0 "fle.s")) then
+ (case ((string_drop s1200_0 ((string_length "fle.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1194_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1194_:string ->(string)option) s1195_0=
+ (let s1196_0 = s1195_0 in
+ if ((string_startswith s1196_0 "flt.s")) then
+ (case ((string_drop s1196_0 ((string_length "flt.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1190_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1190_:string ->(string)option) s1191_0=
+ (let s1192_0 = s1191_0 in
+ if ((string_startswith s1192_0 "feq.s")) then
+ (case ((string_drop s1192_0 ((string_length "feq.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1186_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1186_:string ->(string)option) s1187_0=
+ (let s1188_0 = s1187_0 in
+ if ((string_startswith s1188_0 "fmax.s")) then
+ (case ((string_drop s1188_0 ((string_length "fmax.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1182_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1182_:string ->(string)option) s1183_0=
+ (let s1184_0 = s1183_0 in
+ if ((string_startswith s1184_0 "fmin.s")) then
+ (case ((string_drop s1184_0 ((string_length "fmin.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1178_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1178_:string ->(string)option) s1179_0=
+ (let s1180_0 = s1179_0 in
+ if ((string_startswith s1180_0 "fsgnjx.s")) then
+ (case ((string_drop s1180_0 ((string_length "fsgnjx.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1174_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1174_:string ->(string)option) s1175_0=
+ (let s1176_0 = s1175_0 in
+ if ((string_startswith s1176_0 "fsgnjn.s")) then
+ (case ((string_drop s1176_0 ((string_length "fsgnjn.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1170_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1170_:string ->(string)option) s1171_0=
+ (let s1172_0 = s1171_0 in
+ if ((string_startswith s1172_0 "fsgnj.s")) then
+ (case ((string_drop s1172_0 ((string_length "fsgnj.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_matches_prefix:string ->(f_bin_op_S#int)option) arg_=
+ (let s1173_0 = arg_ in
+ if ((case ((s1170_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1170_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJ_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1174_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1174_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJN_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1178_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1178_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJX_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1182_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1182_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FMIN_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1186_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1186_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FMAX_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1190_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1190_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FEQ_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1194_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1194_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FLT_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1198_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1198_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FLE_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_type_mnemonic_S_forwards : f_un_op_S -> string*)
+
+(*val f_un_type_mnemonic_S_backwards : string -> M f_un_op_S*)
+
+(*val f_un_type_mnemonic_S_forwards_matches : f_un_op_S -> bool*)
+
+(*val f_un_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_un_type_mnemonic_S_matches_prefix : string -> maybe ((f_un_op_S * ii))*)
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_forwards:f_un_op_S -> string) arg_=
+ ((case arg_ of FMV_X_W => "fmv.x.w" | FCLASS_S => "fclass.s" | FMV_W_X => "fmv.w.x" )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.w"))) then sail2_state_monad$returnS FMV_X_W
+ else if (((p0_ = "fclass.s"))) then sail2_state_monad$returnS FCLASS_S
+ else if (((p0_ = "fmv.w.x"))) then sail2_state_monad$returnS FMV_W_X
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_forwards_matches:f_un_op_S -> bool) arg_=
+ ((case arg_ of FMV_X_W => T | FCLASS_S => T | FMV_W_X => T )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.w"))) then T
+ else if (((p0_ = "fclass.s"))) then T
+ else if (((p0_ = "fmv.w.x"))) then T
+ else F))`;
+
+
+(*val _s1210_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1210_:string ->(string)option) s1211_0=
+ (let s1212_0 = s1211_0 in
+ if ((string_startswith s1212_0 "fmv.w.x")) then
+ (case ((string_drop s1212_0 ((string_length "fmv.w.x")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1206_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1206_:string ->(string)option) s1207_0=
+ (let s1208_0 = s1207_0 in
+ if ((string_startswith s1208_0 "fclass.s")) then
+ (case ((string_drop s1208_0 ((string_length "fclass.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1202_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1202_:string ->(string)option) s1203_0=
+ (let s1204_0 = s1203_0 in
+ if ((string_startswith s1204_0 "fmv.x.w")) then
+ (case ((string_drop s1204_0 ((string_length "fmv.x.w")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_matches_prefix:string ->(f_un_op_S#int)option) arg_=
+ (let s1205_0 = arg_ in
+ if ((case ((s1202_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1202_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FMV_X_W, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1206_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1206_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FCLASS_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1210_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1210_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FMV_W_X, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
val _ = Define `
((encdec_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
@@ -18359,7 +21979,7 @@ val _ = Define `
((concat_vec rd ((encdec_uop_forwards op : 7 words$word)) : 12 words$word))
: 32 words$word))
| RISCV_JAL ((v__2, rd)) =>
- if (((((subrange_vec_dec v__2 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
+ if (((((subrange_vec_dec v__2 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) then
let (imm_19 : 1 bits) = ((subrange_vec_dec v__2 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
let (imm_8 : 1 bits) = ((subrange_vec_dec v__2 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__2 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
@@ -18371,8 +21991,7 @@ val _ = Define `
((concat_vec imm_12_9
((concat_vec imm_8
((concat_vec imm_7_0
- ((concat_vec rd (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b1101111w : 7 words$word) : 12 words$word))
: 20 words$word))
: 21 words$word))
: 25 words$word))
@@ -18382,14 +22001,13 @@ val _ = Define `
| RISCV_JALR ((imm, rs1, rd)) =>
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1100111w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| BTYPE ((v__4, rs2, rs1, op)) =>
- if (((((subrange_vec_dec v__4 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
+ if (((((subrange_vec_dec v__4 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) then
let (imm7_6 : 1 bits) = ((subrange_vec_dec v__4 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
let (imm7_6 : 1 bits) = ((subrange_vec_dec v__4 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__4 (( 10 : int):ii) (( 5 : int):ii) : 6 words$word)) in
@@ -18401,9 +22019,7 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((encdec_bop_forwards op : 3 words$word))
((concat_vec imm5_4_1
- ((concat_vec imm5_0
- (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)
- : 8 words$word))
+ ((concat_vec imm5_0 (0b1100011w : 7 words$word) : 8 words$word))
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18415,150 +22031,136 @@ val _ = Define `
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
((concat_vec ((encdec_iop_forwards op : 3 words$word))
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b000000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b000000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b010000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_ADD)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLT)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLTU)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_AND)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_OR)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b110w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_XOR)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLL)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SRL)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SUB)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SRA)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18569,8 +22171,7 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((bool_bits_forwards is_unsigned : 1 words$word))
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0000011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18584,11 +22185,9 @@ val _ = Define `
sail2_state_monad$returnS ((concat_vec imm7
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec imm5
- (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec imm5 (0b0100011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18599,21 +22198,19 @@ val _ = Define `
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18621,12 +22218,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18634,12 +22230,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18647,12 +22242,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18660,12 +22254,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18673,12 +22266,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18686,12 +22278,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18699,12 +22290,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18712,12 +22302,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18725,12 +22314,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18738,25 +22326,23 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| FENCE ((pred, succ)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0] : 4 words$word)
+ sail2_state_monad$returnS ((concat_vec (0x0w : 4 words$word)
((concat_vec pred
((concat_vec succ
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18764,13 +22350,12 @@ val _ = Define `
: 28 words$word))
: 32 words$word))
| FENCE_TSO ((pred, succ)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0;B0] : 4 words$word)
+ sail2_state_monad$returnS ((concat_vec (0x8w : 4 words$word)
((concat_vec pred
((concat_vec succ
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18778,93 +22363,80 @@ val _ = Define `
: 28 words$word))
: 32 words$word))
| FENCEI (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x000w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| ECALL (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x000w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| MRET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1;B1;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0011000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| SRET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0001000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| EBREAK (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x001w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| WFI (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x105w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| SFENCE_VMA ((rs1, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0001001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| LOADRES ((aq, rl, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
+ if ((amo_width_valid size1)) then
+ sail2_state_monad$returnS ((concat_vec (0b00010w : 5 words$word)
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18874,17 +22446,15 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| STORECON ((aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)
+ if ((amo_width_valid size1)) then
+ sail2_state_monad$returnS ((concat_vec (0b00011w : 5 words$word)
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18894,17 +22464,15 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| AMO ((op, aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then
+ if ((amo_width_valid size1)) then
sail2_state_monad$returnS ((concat_vec ((encdec_amoop_forwards op : 5 words$word))
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18914,38 +22482,35 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| MUL ((rs2, rs1, rd, high, signed1, signed2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
((concat_vec
((encdec_mul_op_forwards (high, signed1, signed2) : 3 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| DIV0 ((rs2, rs1, rd, s)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
+ ((concat_vec (0b10w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| REM ((rs2, rs1, rd, s)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -18953,12 +22518,11 @@ val _ = Define `
: 32 words$word))
| MULW ((rs2, rs1, rd)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18966,13 +22530,12 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| DIVW ((rs2, rs1, rd, s)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
+ ((concat_vec (0b10w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -18981,13 +22544,12 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| REMW ((rs2, rs1, rd, s)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -18999,1241 +22561,3061 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((bool_bits_forwards is_imm : 1 words$word))
((concat_vec ((encdec_csrop_forwards op : 2 words$word))
- ((concat_vec rd (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b1110011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| URET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))))
+ then
+ sail2_state_monad$returnS ((concat_vec fm
+ ((concat_vec pred
+ ((concat_vec succ
+ ((concat_vec rs
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 24 words$word))
+ : 28 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | LOAD_FP ((imm, rs1, rd, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__48 : bool) .
+ if w__48 then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b0000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | LOAD_FP ((imm, rs1, rd, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__51 : bool) .
+ if w__51 then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs1
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec rd (0b0000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | STORE_FP ((v__7, rs2, rs1, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__54 : bool) .
+ if w__54 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__7 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec imm7
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec imm5 (0b0100111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | STORE_FP ((v__8, rs2, rs1, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__57 : bool) .
+ if w__57 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__8 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__8 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__8 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec imm7
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec imm5 (0b0100111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__60 : bool) .
+ if w__60 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__63 : bool) .
+ if w__63 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__66 : bool) .
+ if w__66 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__69 : bool) .
+ if w__69 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__72 : bool) .
+ if w__72 then
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__75 : bool) .
+ if w__75 then
+ sail2_state_monad$returnS ((concat_vec (0b0000100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FMUL_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__78 : bool) .
+ if w__78 then
+ sail2_state_monad$returnS ((concat_vec (0b0001000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FDIV_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__81 : bool) .
+ if w__81 then
+ sail2_state_monad$returnS ((concat_vec (0b0001100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__84 : bool) .
+ if w__84 then
+ sail2_state_monad$returnS ((concat_vec (0b0101100w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__87 : bool) .
+ if w__87 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__90 : bool) .
+ if w__90 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__93 : bool) .
+ if w__93 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__96 : bool) .
+ if w__96 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__99 : bool) .
+ if w__99 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__102 : bool) .
+ if w__102 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__105 : bool) .
+ if w__105 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__108 : bool) .
+ if w__108 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__111 : bool) .
+ if w__111 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__114 : bool) .
+ if w__114 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__117 : bool) .
+ if w__117 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__120 : bool) .
+ if w__120 then
+ sail2_state_monad$returnS ((concat_vec (0b0010100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__123 : bool) .
+ if w__123 then
+ sail2_state_monad$returnS ((concat_vec (0b0010100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__126 : bool) .
+ if w__126 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__129 : bool) .
+ if w__129 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__132 : bool) .
+ if w__132 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__135 : bool) .
+ if w__135 then
+ sail2_state_monad$returnS ((concat_vec (0b1110000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__138 : bool) .
+ if w__138 then
+ sail2_state_monad$returnS ((concat_vec (0b1110000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__141 : bool) .
+ if w__141 then
+ sail2_state_monad$returnS ((concat_vec (0b1111000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
| ILLEGAL (s) => sail2_state_monad$returnS s
| _ => sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
)))`;
-(*val encdec_backwards : mword ty32 -> M ast*)
-
val _ = Define `
((encdec_backwards:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let v__7 = arg_ in
- let (mappingpatterns_23_0 : 7 words$word) = ((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_uop_backwards_matches mappingpatterns_23_0)))
- (if ((encdec_uop_backwards_matches mappingpatterns_23_0)) then sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_23_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__1 : bool) .
- if w__1 then
- let (imm : 20 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 20 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
- let (mappingpatterns_23_0 : 7 words$word) = ((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_23_0) (\ op . sail2_state_monad$returnS (UTYPE (imm, rd, op)))
- else if (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)))) then
- let (imm_19 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm_8 : 1 bits) = ((subrange_vec_dec v__7 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
- let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
- let (imm_19 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (imm_18_13 : 6 bits) = ((subrange_vec_dec v__7 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
- let (imm_12_9 : 4 bits) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 21 : int):ii) : 4 words$word)) in
+ (let v__9 = arg_ in
+ if (let (mappingpatterns_40_0 : 7 words$word) = ((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in
+ encdec_uop_backwards_matches mappingpatterns_40_0) then
+ let (imm : 20 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 20 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
+ let (mappingpatterns_40_0 : 7 words$word) = ((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
+ (encdec_uop_backwards mappingpatterns_40_0) (\ op . sail2_state_monad$returnS (UTYPE (imm, rd, op)))
+ else if (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1101111w : 7 words$word))))
+ then
+ let (imm_19 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm_8 : 1 bits) = ((subrange_vec_dec v__9 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
+ let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
+ let (imm_19 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (imm_18_13 : 6 bits) = ((subrange_vec_dec v__9 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
+ let (imm_12_9 : 4 bits) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 21 : int):ii) : 4 words$word)) in
sail2_state_monad$returnS (RISCV_JAL ((concat_vec imm_19
((concat_vec imm_7_0
((concat_vec imm_8
((concat_vec imm_18_13
- ((concat_vec imm_12_9 (vec_of_bits [B0] : 1 words$word)
- : 5 words$word))
+ ((concat_vec imm_12_9 (0b0w : 1 words$word) : 5 words$word))
: 11 words$word))
: 12 words$word))
: 20 words$word))
: 21 words$word),
rd))
- else if ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word))))))) then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ else if ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100111w : 7 words$word)))))))
+ then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
sail2_state_monad$returnS (RISCV_JALR (imm, rs1, rd))
+ else if ((((let (mappingpatterns_41_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_bop_backwards_matches mappingpatterns_41_0) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100011w : 7 words$word)))))))
+ then
+ let (imm7_6 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7_6 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__9 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
+ let (imm5_4_1 : 4 bits) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 8 : int):ii) : 4 words$word)) in
+ let (imm5_0 : 1 bits) = ((subrange_vec_dec v__9 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_41_0 : 3 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_bop_backwards mappingpatterns_41_0) (\ op .
+ sail2_state_monad$returnS (BTYPE ((concat_vec imm7_6
+ ((concat_vec imm5_0
+ ((concat_vec imm7_5_0
+ ((concat_vec imm5_4_1 (0b0w : 1 words$word) : 5 words$word))
+ : 11 words$word))
+ : 12 words$word))
+ : 13 words$word),
+ rs2,
+ rs1,
+ op)))
+ else if ((((let (mappingpatterns_42_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_iop_backwards_matches mappingpatterns_42_0) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word)))))))
+ then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_42_0 : 3 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_iop_backwards mappingpatterns_42_0) (\ op . sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op)))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SLLI))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRLI))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b010000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRAI))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_ADD))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLT))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLTU))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_AND))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_OR))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_XOR))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLL))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRL))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SUB))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRA))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_24_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_bop_backwards_matches mappingpatterns_24_0)))
- (if ((encdec_bop_backwards_matches mappingpatterns_24_0)) then sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_24_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__4 : bool) .
- if w__4 then
- let (imm7_6 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (imm7_6 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__7 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
- let (imm5_4_1 : 4 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 8 : int):ii) : 4 words$word)) in
- let (imm5_0 : 1 bits) = ((subrange_vec_dec v__7 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (mappingpatterns_24_0 : 3 words$word) = ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_24_0) (\ op .
- sail2_state_monad$returnS (BTYPE ((concat_vec imm7_6
- ((concat_vec imm5_0
- ((concat_vec imm7_5_0
- ((concat_vec imm5_4_1 (vec_of_bits [B0] : 1 words$word) : 5 words$word))
- : 11 words$word))
- : 12 words$word))
- : 13 words$word),
- rs2,
- rs1,
- op)))
+ (let (mappingpatterns_44_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_43_0 : 1 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_44_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_44_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_43_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_43_0) (\ is_unsigned .
+ sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii))))))))))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000011w : 7 words$word)))))) (\ (w__2 :
+ bool) .
+ if w__2 then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_44_0 : 2 words$word) = ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_43_0 : 1 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_44_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_43_0) (\ is_unsigned .
+ sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, F, F))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_25_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_iop_backwards_matches mappingpatterns_25_0)))
- (if ((encdec_iop_backwards_matches mappingpatterns_25_0)) then sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_25_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__7 : bool) .
- if w__7 then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_25_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_25_0) (\ op . sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op)))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SLLI))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRLI))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRAI))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_ADD))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLT))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLTU))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_AND))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_OR))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_XOR))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLL))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRL))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SUB))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRA))
+ (let (mappingpatterns_45_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_45_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_45_0) (\ size1 .
+ sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100011w : 7 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_45_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_45_0) (\ size1 .
+ sail2_state_monad$returnS (STORE ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, size1, F, F)))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word)))))))))) then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SLLI))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRLI))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRAI))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_ADDW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SUBW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SLLW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRLW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRAW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SLLIW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRLIW))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRAIW))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__9 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
+ let (succ : 4 words$word) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (pred : 4 words$word) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE (pred, succ))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__9 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
+ let (succ : 4 words$word) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (pred : 4 words$word) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE_TSO (pred, succ))
+ else if (((v__9 = (0x0000100Fw : 32 words$word)))) then sail2_state_monad$returnS (FENCEI () )
+ else if (((v__9 = (0x00000073w : 32 words$word)))) then sail2_state_monad$returnS (ECALL () )
+ else if (((v__9 = (0x30200073w : 32 words$word)))) then sail2_state_monad$returnS (MRET () )
+ else if (((v__9 = (0x10200073w : 32 words$word)))) then sail2_state_monad$returnS (SRET () )
+ else if (((v__9 = (0x00100073w : 32 words$word)))) then sail2_state_monad$returnS (EBREAK () )
+ else if (((v__9 = (0x10500073w : 32 words$word)))) then sail2_state_monad$returnS (WFI () )
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (0b000000001110011w : 15 words$word))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_27_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_26_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_27_0)))
- (if ((size_bits_backwards_matches mappingpatterns_27_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_27_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_26_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_26_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_26_0) (\ is_unsigned .
- sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii))))))))))
- else sail2_state_monad$returnS F)) (\ (w__9 : bool) .
- sail2_state_monad$returnS w__9))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__12 : bool) .
- if w__12 then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_27_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_26_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_27_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_26_0) (\ is_unsigned .
- sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, F, F))))
+ (let (mappingpatterns_48_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_47_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_46_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_48_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_48_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_47_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_47_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_46_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_46_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))))))))) (\ (w__8 : bool) .
+ if w__8 then
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_48_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_47_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_46_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_48_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_47_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_46_0) (\ aq .
+ sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd)))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_28_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_28_0)))
- (if ((size_bits_backwards_matches mappingpatterns_28_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_28_0) (\ size1 .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__15 :
- bool) .
- if w__15 then
- let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
- let (imm5 : 5 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_28_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_28_0) (\ size1 .
- sail2_state_monad$returnS (STORE ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, size1, F, F)))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)))))))))) then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SLLI))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRLI))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRAI))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_ADDW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SUBW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SLLW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRLW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRAW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SLLIW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRLIW))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRAIW))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__7 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- let (succ : 4 words$word) = ((subrange_vec_dec v__7 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
- let (pred : 4 words$word) = ((subrange_vec_dec v__7 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS (FENCE (pred, succ))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__7 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- let (succ : 4 words$word) = ((subrange_vec_dec v__7 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
- let (pred : 4 words$word) = ((subrange_vec_dec v__7 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS (FENCE_TSO (pred, succ))
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;
- B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (FENCEI () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (ECALL () )
- else if (((v__7 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (MRET () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (SRET () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (EBREAK () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (WFI () )
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__7 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1] : 15 words$word)))))))
- then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
+ (let (mappingpatterns_51_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_50_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_49_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_51_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_51_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_50_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_50_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_49_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_49_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00011w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word)))))))))))) (\ (w__12 : bool) .
+ if w__12 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_51_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_50_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_49_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_51_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_50_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_49_0) (\ aq .
+ sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd)))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_31_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_30_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_29_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_31_0)))
- (if ((size_bits_backwards_matches mappingpatterns_31_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_31_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_30_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_30_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_30_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_29_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_29_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_29_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__17 : bool) .
- sail2_state_monad$returnS w__17))
- else sail2_state_monad$returnS F)) (\ (w__19 : bool) .
- sail2_state_monad$returnS w__19))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))))))))) (\ (w__22 :
- bool) .
- if w__22 then
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_31_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_30_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_29_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_31_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_30_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_29_0) (\ aq .
- sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd)))))
+ (let (mappingpatterns_52_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_55_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_54_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_53_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_52_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_55_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_55_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_54_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_54_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_53_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_53_0) (\ aq .
+ if ((encdec_amoop_backwards_matches mappingpatterns_52_0)) then sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_52_0) (\ op .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))) (\ (w__17 : bool) .
+ if w__17 then
+ let (mappingpatterns_52_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_55_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_54_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_53_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_52_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_55_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_54_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_53_0) (\ aq . sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_52_0) (\ op .
+ sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, size1, rd))))))
+ else if ((((let (mappingpatterns_56_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_mul_op_backwards_matches mappingpatterns_56_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_56_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_mul_op_backwards mappingpatterns_56_0) (\ varstup . let (high, signed1, signed2) = varstup in
+ sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2)))
+ else if ((((let (mappingpatterns_57_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_57_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_57_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_57_0) (\ s .
+ sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s)))
+ else if ((((let (mappingpatterns_58_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_58_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_58_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_58_0) (\ s .
+ sail2_state_monad$returnS (REM (rs2, rs1, rd, s)))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (MULW (rs2, rs1, rd))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_34_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_33_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_32_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_34_0)))
- (if ((size_bits_backwards_matches mappingpatterns_34_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_34_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_33_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_33_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_33_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_32_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_32_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_32_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__24 : bool) .
- sail2_state_monad$returnS w__24))
- else sail2_state_monad$returnS F)) (\ (w__26 : bool) .
- sail2_state_monad$returnS w__26))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)))))))))))) (\ (w__29 :
- bool) .
- if w__29 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_34_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_33_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_32_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_34_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_33_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_32_0) (\ aq .
- sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd)))))
+ (let (mappingpatterns_59_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_59_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_59_0) (\ s .
+ sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__19 : bool) .
+ if w__19 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_59_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_59_0) (\ s .
+ sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_38_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_37_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_36_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_38_0)))
- (if ((size_bits_backwards_matches mappingpatterns_38_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_38_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_37_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_37_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_37_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_36_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_36_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_36_0) (\ aq . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_amoop_backwards_matches mappingpatterns_35_0)))
- (if ((encdec_amoop_backwards_matches mappingpatterns_35_0)) then sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_35_0) (\ op .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__31 : bool) .
- sail2_state_monad$returnS w__31))
- else sail2_state_monad$returnS F)) (\ (w__33 : bool) .
- sail2_state_monad$returnS w__33))
- else sail2_state_monad$returnS F)) (\ (w__35 : bool) .
- sail2_state_monad$returnS w__35))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))) (\ (w__38 :
- bool) .
- if w__38 then
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_38_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_37_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_36_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_38_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_37_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_36_0) (\ aq . sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_35_0) (\ op .
- sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, size1, rd))))))
+ (let (mappingpatterns_60_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_60_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_60_0) (\ s .
+ sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__21 : bool) .
+ if w__21 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_60_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_60_0) (\ s .
+ sail2_state_monad$returnS (REMW (rs2, rs1, rd, s)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_39_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_mul_op_backwards_matches mappingpatterns_39_0)))
- (if ((encdec_mul_op_backwards_matches mappingpatterns_39_0)) then sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_39_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__41 :
- bool) .
- if w__41 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_39_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_39_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2)))
+ (let (mappingpatterns_62_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_61_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((encdec_csrop_backwards_matches mappingpatterns_62_0)) then sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_62_0) (\ op .
+ sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_61_0)))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1110011w : 7 words$word)))))) (\ (w__23 : bool) .
+ if w__23 then
+ let (csr : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (csr : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_62_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_61_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_62_0) (\ op . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_61_0) (\ is_imm .
+ sail2_state_monad$returnS (CSR (csr, rs1, rd, is_imm, op))))
+ else if (((v__9 = (0x00200073w : 32 words$word)))) then sail2_state_monad$returnS (URET () )
+ else if ((((let (fm : 4 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (fm : 4 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ let (fm : 4 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (succ : 4 bits) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (rs : regidx) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (pred : 4 bits) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ let (fm : 4 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE_RESERVED (fm, pred, succ, rs, rd))
+ else if ((((let (imm : 12 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ let (imm : 12 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (FENCEI_RESERVED (imm, rs, rd))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_40_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_40_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_40_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_40_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__44 :
- bool) .
- if w__44 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_40_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_40_0) (\ s .
- sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s)))
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__25 : bool) .
+ if w__25 then
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, WORD))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_41_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_41_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_41_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_41_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__47 :
- bool) .
- if w__47 then
- let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__27 : bool) .
+ if w__27 then
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_41_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_41_0) (\ s .
- sail2_state_monad$returnS (REM (rs2, rs1, rd, s)))
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))))
- then
- let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (MULW (rs2, rs1, rd))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, DOUBLE))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_42_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_42_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_42_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_42_0) (\ s .
- sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__50 :
- bool) .
- if w__50 then
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_42_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_42_0) (\ s .
- sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s)))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (STORE_FP ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, WORD))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_43_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_43_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_43_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_43_0) (\ s .
- sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__53 :
- bool) .
- if w__53 then
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__31 : bool) .
+ if w__31 then
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_43_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_43_0) (\ s .
- sail2_state_monad$returnS (REMW (rs2, rs1, rd, s)))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (STORE_FP ((concat_vec imm7 imm5 : 12 words$word),
+ rs2,
+ rs1,
+ DOUBLE))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_45_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_44_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_csrop_backwards_matches mappingpatterns_45_0)))
- (if ((encdec_csrop_backwards_matches mappingpatterns_45_0)) then sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_45_0) (\ op . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_44_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_44_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_44_0) (\ is_imm .
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__55 : bool) .
- sail2_state_monad$returnS w__55))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__58 :
- bool) .
- if w__58 then
- let (csr : 12 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ (let (mappingpatterns_63_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_63_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_63_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (csr : 12 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_45_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_44_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_45_0) (\ op . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_44_0) (\ is_imm .
- sail2_state_monad$returnS (CSR (csr, rs1, rd, is_imm, op))))
- else
- sail2_state_monad$returnS (if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;
- B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;
- B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- URET ()
- else ILLEGAL v__7)))))))))))))))))`;
-
-
-(*val encdec_forwards_matches : ast -> bool*)
-
-val _ = Define `
- ((encdec_forwards_matches:ast -> bool) arg_=
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_63_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_63_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FMADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_64_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_64_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_64_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__37 : bool) .
+ if w__37 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_64_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_64_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FMSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_65_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_65_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_65_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__40 :
+ bool) .
+ if w__40 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_65_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_65_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FNMSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_66_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_66_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_66_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__43 :
+ bool) .
+ if w__43 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_66_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_66_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FNMADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_67_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_67_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_67_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__46 :
+ bool) .
+ if w__46 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_67_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_67_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_68_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_68_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_68_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000100w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__49 :
+ bool) .
+ if w__49 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_68_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_68_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_69_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_69_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_69_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001000w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__52 :
+ bool) .
+ if w__52 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_69_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_69_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FMUL_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_70_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_70_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_70_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001100w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__55 :
+ bool) .
+ if w__55 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_70_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_70_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FDIV_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_71_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_71_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_71_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x580w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__58 :
+ bool) .
+ if w__58 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_71_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_71_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_72_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_72_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_72_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC00w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__61 :
+ bool) .
+ if w__61 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_72_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_72_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_73_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_73_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_73_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC01w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__64 :
+ bool) .
+ if w__64 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_73_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_73_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_74_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_74_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_74_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD00w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__67 :
+ bool) .
+ if w__67 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_74_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_74_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_75_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_75_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_75_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD01w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__70 :
+ bool) .
+ if w__70 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_75_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_75_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_WU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_76_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_76_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_76_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC02w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__73 :
+ bool) .
+ if w__73 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_76_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_76_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_L_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_77_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_77_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_77_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC03w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__76 :
+ bool) .
+ if w__76 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_77_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_77_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_LU_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_78_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_78_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_78_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD02w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__79 :
+ bool) .
+ if w__79 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_78_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_78_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_L)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_79_0 :
+ 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_79_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_79_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD03w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__82 :
+ bool) .
+ if w__82 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_79_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_79_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_LU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__84 :
+ bool) .
+ if w__84 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJ_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__86 :
+ bool) .
+ if w__86 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJN_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__88 :
+ bool) .
+ if w__88 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJX_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__90 :
+ bool) .
+ if w__90 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FMIN_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__92 :
+ bool) .
+ if w__92 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FMAX_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__94 :
+ bool) .
+ if w__94 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FEQ_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__96 :
+ bool) .
+ if w__96 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FLT_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__98 :
+ bool) .
+ if w__98 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FLE_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__100 :
+ bool) .
+ if w__100 then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1,
+ rd,
+ FCLASS_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__102 :
+ bool) .
+ if w__102 then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1,
+ rd,
+ FMV_X_W))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__104 :
+ bool) .
+ sail2_state_monad$returnS (if w__104
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ F_UN_TYPE_S (rs1,
+ rd,
+ FMV_W_X)
+ else
+ ILLEGAL v__9)))))))))))))))))))))))))))))))))))))))))))`;
+
+
+val _ = Define `
+ ((encdec_forwards_matches:ast ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
- UTYPE ((imm, rd, op)) => T
- | RISCV_JAL ((v__220, rd)) =>
- if (((((subrange_vec_dec v__220 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
- T
- else F
- | RISCV_JALR ((imm, rs1, rd)) => T
- | BTYPE ((v__222, rs2, rs1, op)) =>
- if (((((subrange_vec_dec v__222 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
- T
- else F
- | ITYPE ((imm, rs1, rd, op)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_ADD)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLT)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLTU)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_AND)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_OR)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_XOR)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLL)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SRL)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SUB)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SRA)) => T
+ UTYPE ((imm, rd, op)) => sail2_state_monad$returnS T
+ | RISCV_JAL ((v__347, rd)) =>
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__347 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))))
+ then
+ T
+ else F)
+ | RISCV_JALR ((imm, rs1, rd)) => sail2_state_monad$returnS T
+ | BTYPE ((v__349, rs2, rs1, op)) =>
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__349 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))))
+ then
+ T
+ else F)
+ | ITYPE ((imm, rs1, rd, op)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_ADD)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLT)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLTU)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_AND)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_OR)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_XOR)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLL)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SRL)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SUB)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SRA)) => sail2_state_monad$returnS T
| LOAD ((imm, rs1, rd, is_unsigned, size1, F, F)) =>
- if (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii))))))))) then
- T
- else F
- | STORE ((v__224, rs2, rs1, size1, F, F)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then T else F
- | ADDIW ((imm, rs1, rd)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | FENCE ((pred, succ)) => T
- | FENCE_TSO ((pred, succ)) => T
- | FENCEI (() ) => T
- | ECALL (() ) => T
- | MRET (() ) => T
- | SRET (() ) => T
- | EBREAK (() ) => T
- | WFI (() ) => T
- | SFENCE_VMA ((rs1, rs2)) => T
- | LOADRES ((aq, rl, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then T else F
+ sail2_state_monad$returnS (if (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii)))))))))
+ then
+ T
+ else F)
+ | STORE ((v__351, rs2, rs1, size1, F, F)) =>
+ sail2_state_monad$returnS (if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then T else F)
+ | ADDIW ((imm, rs1, rd)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) =>
+ sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | FENCE ((pred, succ)) => sail2_state_monad$returnS T
+ | FENCE_TSO ((pred, succ)) => sail2_state_monad$returnS T
+ | FENCEI (() ) => sail2_state_monad$returnS T
+ | ECALL (() ) => sail2_state_monad$returnS T
+ | MRET (() ) => sail2_state_monad$returnS T
+ | SRET (() ) => sail2_state_monad$returnS T
+ | EBREAK (() ) => sail2_state_monad$returnS T
+ | WFI (() ) => sail2_state_monad$returnS T
+ | SFENCE_VMA ((rs1, rs2)) => sail2_state_monad$returnS T
+ | LOADRES ((aq, rl, rs1, size1, rd)) => sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
| STORECON ((aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then T else F
+ sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
| AMO ((op, aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 4 : int):ii))) then T else F
- | MUL ((rs2, rs1, rd, high, signed1, signed2)) => T
- | DIV0 ((rs2, rs1, rd, s)) => T
- | REM ((rs2, rs1, rd, s)) => T
- | MULW ((rs2, rs1, rd)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | DIVW ((rs2, rs1, rd, s)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | REMW ((rs2, rs1, rd, s)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | CSR ((csr, rs1, rd, is_imm, op)) => T
- | URET (() ) => T
- | ILLEGAL (s) => T
- | _ => F
+ sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
+ | MUL ((rs2, rs1, rd, high, signed1, signed2)) => sail2_state_monad$returnS T
+ | DIV0 ((rs2, rs1, rd, s)) => sail2_state_monad$returnS T
+ | REM ((rs2, rs1, rd, s)) => sail2_state_monad$returnS T
+ | MULW ((rs2, rs1, rd)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | DIVW ((rs2, rs1, rd, s)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | REMW ((rs2, rs1, rd, s)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | CSR ((csr, rs1, rd, is_imm, op)) => sail2_state_monad$returnS T
+ | URET (() ) => sail2_state_monad$returnS T
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ sail2_state_monad$returnS (if (((((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word)))))))))) then
+ T
+ else F)
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ sail2_state_monad$returnS (if ((((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ T
+ else F)
+ | LOAD_FP ((imm, rs1, rd, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__0 : bool) . sail2_state_monad$returnS (if w__0 then T else F))
+ | LOAD_FP ((imm, rs1, rd, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__1 : bool) . sail2_state_monad$returnS (if w__1 then T else F))
+ | STORE_FP ((v__352, rs2, rs1, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__2 : bool) . sail2_state_monad$returnS (if w__2 then T else F))
+ | STORE_FP ((v__353, rs2, rs1, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__3 : bool) . sail2_state_monad$returnS (if w__3 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__4 : bool) . sail2_state_monad$returnS (if w__4 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__5 : bool) . sail2_state_monad$returnS (if w__5 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__6 : bool) . sail2_state_monad$returnS (if w__6 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__7 : bool) . sail2_state_monad$returnS (if w__7 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__8 : bool) . sail2_state_monad$returnS (if w__8 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__9 : bool) . sail2_state_monad$returnS (if w__9 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FMUL_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__10 : bool) . sail2_state_monad$returnS (if w__10 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FDIV_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__11 : bool) . sail2_state_monad$returnS (if w__11 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__12 : bool) . sail2_state_monad$returnS (if w__12 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__13 : bool) . sail2_state_monad$returnS (if w__13 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__14 : bool) . sail2_state_monad$returnS (if w__14 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__15 : bool) . sail2_state_monad$returnS (if w__15 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__16 : bool) . sail2_state_monad$returnS (if w__16 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__17 : bool) . sail2_state_monad$returnS (if w__17 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__18 : bool) . sail2_state_monad$returnS (if w__18 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__19 : bool) . sail2_state_monad$returnS (if w__19 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__20 : bool) . sail2_state_monad$returnS (if w__20 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__21 : bool) . sail2_state_monad$returnS (if w__21 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__22 : bool) . sail2_state_monad$returnS (if w__22 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__23 : bool) . sail2_state_monad$returnS (if w__23 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__24 : bool) . sail2_state_monad$returnS (if w__24 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__25 : bool) . sail2_state_monad$returnS (if w__25 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__26 : bool) . sail2_state_monad$returnS (if w__26 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__27 : bool) . sail2_state_monad$returnS (if w__27 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__28 : bool) . sail2_state_monad$returnS (if w__28 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__29 : bool) . sail2_state_monad$returnS (if w__29 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__30 : bool) . sail2_state_monad$returnS (if w__30 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__31 : bool) . sail2_state_monad$returnS (if w__31 then T else F))
+ | ILLEGAL (s) => sail2_state_monad$returnS T
+ | _ => sail2_state_monad$returnS F
)))`;
-(*val encdec_backwards_matches : mword ty32 -> M bool*)
-
val _ = Define `
((encdec_backwards_matches:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let v__225 = arg_ in
- let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_uop_backwards_matches mappingpatterns_0_0)))
- (if ((encdec_uop_backwards_matches mappingpatterns_0_0)) then sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_0_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__1 : bool) .
- if w__1 then
- let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
+ (let v__354 = arg_ in
+ if (let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in
+ encdec_uop_backwards_matches mappingpatterns_0_0) then
+ let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
(encdec_uop_backwards mappingpatterns_0_0) (\ op . sail2_state_monad$returnS T)
- else if (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)))) then
+ else if (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1101111w : 7 words$word))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100111w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (mappingpatterns_1_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_bop_backwards_matches mappingpatterns_1_0) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100011w : 7 words$word))))))) then
+ let (mappingpatterns_1_0 : 3 words$word) = ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_2_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_iop_backwards_matches mappingpatterns_2_0) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))) then
+ let (mappingpatterns_2_0 : 3 words$word) = ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__354 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__354 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__354 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b010000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word))))))) then
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_1_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_bop_backwards_matches mappingpatterns_1_0)))
- (if ((encdec_bop_backwards_matches mappingpatterns_1_0)) then sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__4 : bool) .
- if w__4 then
- let (mappingpatterns_1_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
+ (let (mappingpatterns_4_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_3_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_4_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_4_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_3_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned .
+ sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii))))))))))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000011w : 7 words$word)))))) (\ (w__2 : bool) .
+ if w__2 then
+ let (mappingpatterns_4_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_3_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned . sail2_state_monad$returnS T))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_2_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_iop_backwards_matches mappingpatterns_2_0)))
- (if ((encdec_iop_backwards_matches mappingpatterns_2_0)) then sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__7 : bool) .
- if w__7 then
- let (mappingpatterns_2_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ (let (mappingpatterns_5_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_5_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_5_0) (\ size1 .
+ sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100011w : 7 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (mappingpatterns_5_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_5_0) (\ size1 . sail2_state_monad$returnS T)
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__354 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__354 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((v__354 = (0x0000100Fw : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__354 = (0x00000073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__354 = (0x30200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__354 = (0x10200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__354 = (0x00100073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__354 = (0x10500073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (0b000000001110011w : 15 words$word))))))) then
sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_4_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_3_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_4_0)))
- (if ((size_bits_backwards_matches mappingpatterns_4_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_3_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_3_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned .
- sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 4 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 4 : int):ii))))))))))
- else sail2_state_monad$returnS F)) (\ (w__9 : bool) .
- sail2_state_monad$returnS w__9))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__12 : bool) .
- if w__12 then
- let (mappingpatterns_4_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_3_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned . sail2_state_monad$returnS T))
+ (let (mappingpatterns_8_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_7_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_6_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_8_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_8_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_7_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_7_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_6_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_6_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))))))))) (\ (w__8 : bool) .
+ if w__8 then
+ let (mappingpatterns_8_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_7_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_6_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_6_0) (\ aq . sail2_state_monad$returnS T)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_5_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_5_0)))
- (if ((size_bits_backwards_matches mappingpatterns_5_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_5_0) (\ size1 .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__15 :
- bool) .
- if w__15 then
- let (mappingpatterns_5_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_5_0) (\ size1 . sail2_state_monad$returnS T)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__225 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__225 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;
- B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__225 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1] : 15 words$word)))))))
- then
- sail2_state_monad$returnS T
+ (let (mappingpatterns_9_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_11_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_10_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_11_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_11_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_10_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_10_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_9_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_9_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00011w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word)))))))))))) (\ (w__12 : bool) .
+ if w__12 then
+ let (mappingpatterns_9_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_11_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_10_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_9_0) (\ aq . sail2_state_monad$returnS T)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_8_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_7_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_6_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_8_0)))
- (if ((size_bits_backwards_matches mappingpatterns_8_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_7_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_7_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_6_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_6_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_6_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__17 : bool) .
- sail2_state_monad$returnS w__17))
- else sail2_state_monad$returnS F)) (\ (w__19 : bool) .
- sail2_state_monad$returnS w__19))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))))))))) (\ (w__22 :
- bool) .
- if w__22 then
- let (mappingpatterns_8_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_7_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_6_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_6_0) (\ aq . sail2_state_monad$returnS T)))
+ (let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_15_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_14_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_13_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_15_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_15_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_14_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_14_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_13_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_13_0) (\ aq .
+ if ((encdec_amoop_backwards_matches mappingpatterns_12_0)) then sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_12_0) (\ op .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))) (\ (w__17 : bool) .
+ if w__17 then
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_15_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_14_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_13_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_12_0) (\ op . sail2_state_monad$returnS T))))
+ else if ((((let (mappingpatterns_16_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_mul_op_backwards_matches mappingpatterns_16_0) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (mappingpatterns_16_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
+ sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_17_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_17_0) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (mappingpatterns_17_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_18_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_18_0) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (mappingpatterns_18_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_9_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_11_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_10_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_11_0)))
- (if ((size_bits_backwards_matches mappingpatterns_11_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_10_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_10_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_9_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_9_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_9_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__24 : bool) .
- sail2_state_monad$returnS w__24))
- else sail2_state_monad$returnS F)) (\ (w__26 : bool) .
- sail2_state_monad$returnS w__26))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)))))))))))) (\ (w__29 :
- bool) .
- if w__29 then
- let (mappingpatterns_9_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_11_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_10_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_9_0) (\ aq . sail2_state_monad$returnS T)))
+ (let (mappingpatterns_19_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_19_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_19_0) (\ s .
+ sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__19 : bool) .
+ if w__19 then
+ let (mappingpatterns_19_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_19_0) (\ s . sail2_state_monad$returnS T)
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_15_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_14_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_13_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_15_0)))
- (if ((size_bits_backwards_matches mappingpatterns_15_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_14_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_14_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_13_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_13_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_amoop_backwards_matches mappingpatterns_12_0)))
- (if ((encdec_amoop_backwards_matches mappingpatterns_12_0)) then sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_12_0) (\ op .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 4 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__31 : bool) .
- sail2_state_monad$returnS w__31))
- else sail2_state_monad$returnS F)) (\ (w__33 : bool) .
- sail2_state_monad$returnS w__33))
- else sail2_state_monad$returnS F)) (\ (w__35 : bool) .
- sail2_state_monad$returnS w__35))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))) (\ (w__38 :
- bool) .
- if w__38 then
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_15_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_14_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_13_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_12_0) (\ op . sail2_state_monad$returnS T))))
+ (let (mappingpatterns_20_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_20_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_20_0) (\ s .
+ sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__21 : bool) .
+ if w__21 then
+ let (mappingpatterns_20_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_20_0) (\ s . sail2_state_monad$returnS T)
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_16_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_mul_op_backwards_matches mappingpatterns_16_0)))
- (if ((encdec_mul_op_backwards_matches mappingpatterns_16_0)) then sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__41 :
- bool) .
- if w__41 then
- let (mappingpatterns_16_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
+ (let (mappingpatterns_22_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_21_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((encdec_csrop_backwards_matches mappingpatterns_22_0)) then sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_22_0) (\ op .
+ sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_21_0)))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1110011w : 7 words$word)))))) (\ (w__23 : bool) .
+ if w__23 then
+ let (mappingpatterns_22_0 : 2 words$word) =
+ ((subrange_vec_dec v__354 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_21_0 : 1 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_21_0) (\ is_imm . sail2_state_monad$returnS T))
+ else if (((v__354 = (0x00200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (fm : 4 bits) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__354 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__354 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (fm : 4 bits) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (imm : 12 bits) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__354 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__354 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) =
+ ((subrange_vec_dec v__354 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))) /\ ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_17_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_17_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_17_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__44 :
- bool) .
- if w__44 then
- let (mappingpatterns_17_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__25 : bool) .
+ if w__25 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_18_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_18_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_18_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__47 :
- bool) .
- if w__47 then
- let (mappingpatterns_18_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii)
- : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))))
- then
- sail2_state_monad$returnS T
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__27 : bool) .
+ if w__27 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_19_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_19_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_19_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_19_0) (\ s .
- sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__50 :
- bool) .
- if w__50 then
- let (mappingpatterns_19_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_19_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_20_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_20_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_20_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_20_0) (\ s .
- sail2_state_monad$returnS ((((( 32 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii)
- : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__53 :
- bool) .
- if w__53 then
- let (mappingpatterns_20_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_20_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__31 : bool) .
+ if w__31 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_22_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_21_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_csrop_backwards_matches mappingpatterns_22_0)))
- (if ((encdec_csrop_backwards_matches mappingpatterns_22_0)) then sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_21_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_21_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_21_0) (\ is_imm .
+ (let (mappingpatterns_23_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_23_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_23_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then
+ let (mappingpatterns_23_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_23_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_24_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_24_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_24_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__37 :
+ bool) .
+ if w__37 then
+ let (mappingpatterns_24_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_24_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_25_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_25_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_25_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__40 :
+ bool) .
+ if w__40 then
+ let (mappingpatterns_25_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_25_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_26_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_26_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_26_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__43 :
+ bool) .
+ if w__43 then
+ let (mappingpatterns_26_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_26_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_27_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_27_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_27_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__46 :
+ bool) .
+ if w__46 then
+ let (mappingpatterns_27_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_27_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_28_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_28_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_28_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000100w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__49 :
+ bool) .
+ if w__49 then
+ let (mappingpatterns_28_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_28_0) (\ rm .
sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__55 : bool) .
- sail2_state_monad$returnS w__55))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__58 :
- bool) .
- if w__58 then
- let (mappingpatterns_22_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_21_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_21_0) (\ is_imm .
- sail2_state_monad$returnS T))
- else
- sail2_state_monad$returnS (if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;
- B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;
- B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- T
- else T)))))))))))))))))`;
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_29_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_29_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_29_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001000w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__52 :
+ bool) .
+ if w__52 then
+ let (mappingpatterns_29_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_29_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_30_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_30_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_30_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001100w : 7 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__55 :
+ bool) .
+ if w__55 then
+ let (mappingpatterns_30_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_30_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_31_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_31_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_31_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x580w : 12 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__58 :
+ bool) .
+ if w__58 then
+ let (mappingpatterns_31_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_31_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_32_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_32_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_32_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC00w : 12 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__61 :
+ bool) .
+ if w__61 then
+ let (mappingpatterns_32_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_32_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_33_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_33_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_33_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC01w : 12 words$word)))) /\ (((((subrange_vec_dec v__354 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__64 :
+ bool) .
+ if w__64 then
+ let (mappingpatterns_33_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_33_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_34_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_34_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_34_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD00w : 12 words$word)))) /\ (((((subrange_vec_dec v__354
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__67 :
+ bool) .
+ if w__67 then
+ let (mappingpatterns_34_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_34_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_35_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_35_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_35_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD01w : 12 words$word)))) /\ (((((subrange_vec_dec v__354
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__70 :
+ bool) .
+ if w__70 then
+ let (mappingpatterns_35_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_35_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_36_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_36_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_36_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC02w : 12 words$word)))) /\ (((((subrange_vec_dec v__354
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__73 :
+ bool) .
+ if w__73 then
+ let (mappingpatterns_36_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_36_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_37_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_37_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_37_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__354
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC03w : 12 words$word)))) /\ (((((subrange_vec_dec v__354
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__76 :
+ bool) .
+ if w__76 then
+ let (mappingpatterns_37_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_37_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_38_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_38_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_38_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD02w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__354 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__79 :
+ bool) .
+ if w__79 then
+ let (mappingpatterns_38_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_38_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_39_0 :
+ 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_39_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_39_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD03w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__354 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__82 :
+ bool) .
+ if w__82 then
+ let (mappingpatterns_39_0 : 3 words$word) =
+ ((subrange_vec_dec v__354 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_39_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__84 :
+ bool) .
+ if w__84 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__86 :
+ bool) .
+ if w__86 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__88 :
+ bool) .
+ if w__88 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__90 :
+ bool) .
+ if w__90 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__92 :
+ bool) .
+ if w__92 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__94 :
+ bool) .
+ if w__94 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__96 :
+ bool) .
+ if w__96 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__98 :
+ bool) .
+ if w__98 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__100 :
+ bool) .
+ if w__100 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__102 :
+ bool) .
+ if w__102 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__354
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__354
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__354
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__104 :
+ bool) .
+ sail2_state_monad$returnS (if w__104
+ then
+ T
+ else T)))))))))))))))))))))))))))))))))))))))))))`;
-(*val encdec_compressed_forwards : ast -> M (mword ty16)*)
-
val _ = Define `
((encdec_compressed_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->((((16)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
C_NOP (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B1] : 2 words$word)
- : 7 words$word))
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_ADDI4SPN ((rd, v__438)) =>
- if (let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__438 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__438 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__438 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ | C_ADDI4SPN ((rd, v__692)) =>
+ if (let (nz96 : 4 bits) = ((subrange_vec_dec v__692 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__692 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__692 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__692 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__692 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
(((concat_vec nz96 ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) then
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__438 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__438 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__438 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ : 8 words$word)) <> (0x00w : 8 words$word))) then
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__692 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__692 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__692 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__692 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__692 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nz54
((concat_vec nz96
((concat_vec nz2
- ((concat_vec nz3
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec nz3 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 11 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LW ((v__439, rs1, rd)) =>
- let (ui6 : 1 bits) = ((subrange_vec_dec v__439 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui6 : 1 bits) = ((subrange_vec_dec v__439 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__439 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__439 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LW ((v__693, rs1, rd)) =>
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__693 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__693 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__693 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__693 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
((concat_vec ui2
- ((concat_vec ui6
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui6 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
- | C_LD ((v__440, rs1, rd)) =>
+ | C_LD ((v__694, rs1, rd)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__440 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__440 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__440 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__694 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__694 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__694 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
- ((concat_vec ui76
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui76 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SW ((v__441, rs1, rs2)) =>
- let (ui6 : 1 bits) = ((subrange_vec_dec v__441 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui6 : 1 bits) = ((subrange_vec_dec v__441 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__441 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__441 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_SW ((v__695, rs1, rs2)) =>
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__695 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__695 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__695 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__695 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
((concat_vec ui2
- ((concat_vec ui6
- ((concat_vec rs2 (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui6 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
- | C_SD ((v__442, rs1, rs2)) =>
+ | C_SD ((v__696, rs1, rs2)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__442 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__442 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__442 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__696 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__696 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__696 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
- ((concat_vec ui76
- ((concat_vec rs2 (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui76 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDI ((v__443, rsd)) =>
- if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__443 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) then
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__443 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ | C_ADDI ((v__697, rsd)) =>
+ if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__697 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__697 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__697 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) then
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__697 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__697 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__697 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nzi5
- ((concat_vec rsd
- ((concat_vec nzi40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec nzi40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_JAL (v__444) =>
+ | C_JAL (v__698) =>
if ((((( 32 : int):ii) = (( 32 : int):ii)))) then
- let (i11 : 1 bits) = ((subrange_vec_dec v__444 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i98 : 2 bits) = ((subrange_vec_dec v__444 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__444 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__444 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__444 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__444 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__444 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__444 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__444 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
+ let (i11 : 1 bits) = ((subrange_vec_dec v__698 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i98 : 2 bits) = ((subrange_vec_dec v__698 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__698 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__698 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__698 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__698 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__698 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__698 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__698 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
((concat_vec i11
((concat_vec i4
((concat_vec i98
@@ -20241,8 +25623,7 @@ val _ = Define `
((concat_vec i6
((concat_vec i7
((concat_vec i31
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 6 words$word))
: 7 words$word))
: 8 words$word))
@@ -20252,59 +25633,55 @@ val _ = Define `
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDIW ((v__445, rsd)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))))
- then
- let (imm5 : 1 bits) = ((subrange_vec_dec v__445 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__445 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__445 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
+ | C_ADDIW ((v__699, rsd)) =>
+ if ((((((rsd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii))))))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__699 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__699 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__699 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
((concat_vec imm5
- ((concat_vec rsd
- ((concat_vec imm40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LI ((v__446, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
- let (imm5 : 1 bits) = ((subrange_vec_dec v__446 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__446 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__446 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LI ((v__700, rd)) =>
+ if (((rd <> zreg))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__700 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__700 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__700 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec imm5
- ((concat_vec rd
- ((concat_vec imm40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rd ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDI16SP (v__447) =>
- if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__447 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__447 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__447 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__447 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ | C_ADDI16SP (v__701) =>
+ if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__701 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__701 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__701 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__701 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__701 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__701 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__447 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__447 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__447 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__447 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__701 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__701 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__701 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__701 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__701 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__701 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec nzi9
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
((concat_vec nzi4
((concat_vec nzi6
((concat_vec nzi87
- ((concat_vec nzi5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec nzi5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 6 words$word))
: 7 words$word))
@@ -20312,114 +25689,110 @@ val _ = Define `
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LUI ((v__448, rd)) =>
- if (let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__448 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) then
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__448 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ | C_LUI ((v__702, rd)) =>
+ if (let (imm17 : 1 bits) = ((subrange_vec_dec v__702 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__702 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__702 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__702 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__702 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__702 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec imm17
- ((concat_vec rd
- ((concat_vec imm1612 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rd ((concat_vec imm1612 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SRLI ((v__449, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__449 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__449 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_SRLI ((v__703, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__703 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__703 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__703 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__703 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__703 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__703 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec nzui5
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rsd ((concat_vec nzui40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SRAI ((v__450, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__450 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__450 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_SRAI ((v__704, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__704 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__704 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__704 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__704 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__704 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__704 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec nzui5
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rsd ((concat_vec nzui40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ANDI ((v__451, rsd)) =>
- let (i5 : 1 bits) = ((subrange_vec_dec v__451 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__451 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i40 : 5 bits) = ((subrange_vec_dec v__451 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_ANDI ((v__705, rsd)) =>
+ let (i5 : 1 bits) = ((subrange_vec_dec v__705 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__705 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i40 : 5 bits) = ((subrange_vec_dec v__705 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec i5
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec i40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b10w : 2 words$word)
+ ((concat_vec rsd ((concat_vec i40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_SUB ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_XOR ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_OR ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b10w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_AND ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b11w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
@@ -20427,12 +25800,12 @@ val _ = Define `
: 16 words$word))
| C_SUBW ((rsd, rs2)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
@@ -20441,29 +25814,29 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_ADDW ((rsd, rs2)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_J (v__452) =>
- let (i11 : 1 bits) = ((subrange_vec_dec v__452 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i98 : 2 bits) = ((subrange_vec_dec v__452 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__452 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__452 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__452 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__452 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__452 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__452 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__452 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
+ | C_J (v__706) =>
+ let (i11 : 1 bits) = ((subrange_vec_dec v__706 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i98 : 2 bits) = ((subrange_vec_dec v__706 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__706 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__706 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__706 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__706 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__706 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__706 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__706 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b101w : 3 words$word)
((concat_vec i11
((concat_vec i4
((concat_vec i98
@@ -20471,8 +25844,7 @@ val _ = Define `
((concat_vec i6
((concat_vec i7
((concat_vec i31
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 6 words$word))
: 7 words$word))
: 8 words$word))
@@ -20481,668 +25853,1001 @@ val _ = Define `
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_BEQZ ((v__453, rs)) =>
- let (i8 : 1 bits) = ((subrange_vec_dec v__453 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__453 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__453 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__453 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__453 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__453 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_BEQZ ((v__707, rs)) =>
+ let (i8 : 1 bits) = ((subrange_vec_dec v__707 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__707 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__707 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__707 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__707 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__707 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec i8
((concat_vec i43
((concat_vec rs
((concat_vec i76
- ((concat_vec i21
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word) : 3 words$word))
+ ((concat_vec i21 ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_BNEZ ((v__454, rs)) =>
- let (i8 : 1 bits) = ((subrange_vec_dec v__454 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__454 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__454 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__454 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__454 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__454 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ | C_BNEZ ((v__708, rs)) =>
+ let (i8 : 1 bits) = ((subrange_vec_dec v__708 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__708 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__708 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__708 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__708 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__708 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec i8
((concat_vec i43
((concat_vec rs
((concat_vec i76
- ((concat_vec i21
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word) : 3 words$word))
+ ((concat_vec i21 ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_SLLI ((v__455, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__455 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word)))))))))))))
- then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__455 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ | C_SLLI ((v__709, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__709 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__709 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__709 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__709 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__709 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__709 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nzui5
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec nzui40 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LWSP ((v__456, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__456 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__456 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__456 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (ui42 : 3 bits) = ((subrange_vec_dec v__456 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LWSP ((v__710, rd)) =>
+ if (((rd <> zreg))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__710 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__710 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__710 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__710 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec ui5
((concat_vec rd
- ((concat_vec ui42
- ((concat_vec ui76 (vec_of_bits [B1;B0] : 2 words$word) : 4 words$word))
+ ((concat_vec ui42 ((concat_vec ui76 (0b10w : 2 words$word) : 4 words$word))
: 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LDSP ((v__457, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))))
- then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__457 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui86 : 3 bits) = ((subrange_vec_dec v__457 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__457 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (ui43 : 2 bits) = ((subrange_vec_dec v__457 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ | C_LDSP ((v__711, rd)) =>
+ if ((((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__711 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__711 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__711 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__711 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec ui5
((concat_vec rd
- ((concat_vec ui43
- ((concat_vec ui86 (vec_of_bits [B1;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui43 ((concat_vec ui86 (0b10w : 2 words$word) : 5 words$word))
: 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SWSP ((v__458, rs2)) =>
- let (ui76 : 2 bits) = ((subrange_vec_dec v__458 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__458 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui52 : 4 bits) = ((subrange_vec_dec v__458 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_SWSP ((v__712, rs2)) =>
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__712 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__712 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__712 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec ui52
- ((concat_vec ui76
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec ui76 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 9 words$word))
: 13 words$word))
: 16 words$word))
- | C_SDSP ((v__459, rs2)) =>
+ | C_SDSP ((v__713, rs2)) =>
if ((((( 32 : int):ii) = (( 64 : int):ii)))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__459 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui86 : 3 bits) = ((subrange_vec_dec v__459 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__459 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__713 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__713 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__713 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec ui53
- ((concat_vec ui86
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec ui86 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ if (((rs1 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
+ if (((rs1 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec rd
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec rd ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_EBREAK (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec rsd ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_NOP_HINT (v__714) =>
+ if (let (im5 : 1 bits) = ((subrange_vec_dec v__714 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__714 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__714 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (im5 : 1 bits) = ((subrange_vec_dec v__714 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__714 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__714 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec im5
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec im40 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec rsd
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_LI_HINT (v__715) =>
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__715 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__715 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__715 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec imm5
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_LUI_HINT (v__716) =>
+ if (let (imm17 : 1 bits) = ((subrange_vec_dec v__716 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__716 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__716 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__716 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__716 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__716 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec imm17
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec imm1612 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_SLLI_HINT ((v__717, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__717 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__717 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__717 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__717 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__717 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__717 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec nzui5
+ ((concat_vec rsd ((concat_vec nzui40 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_SRLI_HINT (rsd) =>
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rsd
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 10 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_SRAI_HINT (rsd) =>
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rsd
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 10 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_FLWSP ((v__718, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__57 :
+ bool) .
+ if w__57 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__718 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__718 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__718 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__718 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec ui5
+ ((concat_vec rd
+ ((concat_vec ui42 ((concat_vec ui76 (0b10w : 2 words$word) : 4 words$word))
+ : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSWSP ((v__719, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__63 :
+ bool) .
+ if w__63 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__719 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__719 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__719 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec ui52
+ ((concat_vec ui76 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 9 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FLW ((v__720, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__69 :
+ bool) .
+ if w__69 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__720 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__720 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__720 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__720 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui2
+ ((concat_vec ui6 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSW ((v__721, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__75 :
+ bool) .
+ if w__75 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__721 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__721 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__721 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__721 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui2
+ ((concat_vec ui6 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
| C_ILLEGAL (s) => sail2_state_monad$returnS s
| _ => sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
)))`;
-(*val encdec_compressed_backwards : mword ty16 -> ast*)
-
val _ = Define `
- ((encdec_compressed_backwards:(16)words$word -> ast) arg_=
- (let v__460 = arg_ in
- if (((v__460 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 16 words$word))))
- then
- C_NOP ()
- else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ ((encdec_compressed_backwards:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let v__722 = arg_ in
+ if (((v__722 = (0x0001w : 16 words$word)))) then sail2_state_monad$returnS (C_NOP () )
+ else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__722 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nz96
((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- C_ADDI4SPN (rd,
- (concat_vec nz96
- ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word))
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- let (ui6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_LW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rd)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_LD ((concat_vec ui76 ui53 : 5 words$word), rs1, rd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- let (ui6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- C_SW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rs2)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs2 : 3 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (rs1 : 3 bits) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- C_SD ((concat_vec ui76 ui53 : 5 words$word), rs1, rs2)
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADDI ((concat_vec nzi5 nzi40 : 6 words$word), rsd)
- else if (((((((( 32 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (i98 : 2 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__460 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
- C_JAL ((concat_vec i11
- ((concat_vec i10
- ((concat_vec i98
- ((concat_vec i7
- ((concat_vec i6
- ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
- : 6 words$word))
- : 7 words$word))
- : 9 words$word))
- : 10 words$word))
- : 11 words$word))
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADDIW ((concat_vec imm5 imm40 : 6 words$word), rsd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_LI ((concat_vec imm5 imm40 : 6 words$word), rd)
- else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ : 8 words$word)) <> (0x00w : 8 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (rd : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__722 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_ADDI4SPN (rd,
+ (concat_vec nz96
+ ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
+ : 8 words$word)))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_LW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rd))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_LD ((concat_vec ui76 ui53 : 5 words$word), rs1, rd))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rs2))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : 3 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : 3 bits) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SD ((concat_vec ui76 ui53 : 5 words$word), rs1, rs2))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDI ((concat_vec nzi5 nzi40 : 6 words$word), rsd))
+ else if (((((((( 32 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (i98 : 2 bits) = ((subrange_vec_dec v__722 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__722 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__722 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_JAL ((concat_vec i11
+ ((concat_vec i10
+ ((concat_vec i98
+ ((concat_vec i7
+ ((concat_vec i6
+ ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word))
+ : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 10 words$word))
+ : 11 words$word)))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDIW ((concat_vec imm5 imm40 : 6 words$word), rsd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LI ((concat_vec imm5 imm40 : 6 words$word), rd))
+ else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ ((((((((regidx_to_regno ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- C_ADDI16SP ((concat_vec nzi9
- ((concat_vec nzi87
- ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
- : 5 words$word))
- : 6 words$word))
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_LUI ((concat_vec imm17 imm1612 : 6 words$word), rd)
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SRLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SRAI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ANDI ((concat_vec i5 i40 : 6 words$word), rsd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_SUB (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_XOR (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_OR (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_AND (rsd, rs2)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_SUBW (rsd, rs2)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_ADDW (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (i98 : 2 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__460 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
- C_J ((concat_vec i11
- ((concat_vec i10
- ((concat_vec i98
- ((concat_vec i7
- ((concat_vec i6
- ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
- : 6 words$word))
- : 7 words$word))
- : 9 words$word))
- : 10 words$word))
- : 11 words$word))
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (rs : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- C_BEQZ ((concat_vec i8
- ((concat_vec i76 ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
- : 7 words$word))
- : 8 words$word),
- rs)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (rs : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- C_BNEZ ((concat_vec i8
- ((concat_vec i76 ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
- : 7 words$word))
- : 8 words$word),
- rs)
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word))))))))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SLLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (ui42 : 3 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_LWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (ui43 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_LDSP ((concat_vec ui86 ((concat_vec ui5 ui43 : 3 words$word)) : 6 words$word), rd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (ui52 : 4 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SWSP ((concat_vec ui76 ui52 : 6 words$word), rs2)
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SDSP ((concat_vec ui86 ui53 : 6 words$word), rs2)
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_JR rs1
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_JALR rs1
- else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_MV (rd, rs2)
- else if (((v__460 = (vec_of_bits [B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 16 words$word)))) then
- C_EBREAK ()
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADD (rsd, rs2)
- else C_ILLEGAL v__460))`;
-
-
-(*val encdec_compressed_forwards_matches : ast -> bool*)
-
-val _ = Define `
- ((encdec_compressed_forwards_matches:ast -> bool) arg_=
+ : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_ADDI16SP ((concat_vec nzi9
+ ((concat_vec nzi87
+ ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
+ : 5 words$word))
+ : 6 words$word)))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LUI ((concat_vec imm17 imm1612 : 6 words$word), rd))
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SRLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SRAI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ANDI ((concat_vec i5 i40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SUB (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_XOR (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_OR (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_AND (rsd, rs2))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SUBW (rsd, rs2))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_ADDW (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (i98 : 2 bits) = ((subrange_vec_dec v__722 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__722 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__722 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_J ((concat_vec i11
+ ((concat_vec i10
+ ((concat_vec i98
+ ((concat_vec i7
+ ((concat_vec i6
+ ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 10 words$word))
+ : 11 words$word)))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (rs : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS (C_BEQZ ((concat_vec i8
+ ((concat_vec i76
+ ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
+ : 7 words$word))
+ : 8 words$word),
+ rs))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (rs : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__722 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS (C_BNEZ ((concat_vec i8
+ ((concat_vec i76
+ ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
+ : 7 words$word))
+ : 8 words$word),
+ rs))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SLLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LDSP ((concat_vec ui86 ((concat_vec ui5 ui43 : 3 words$word)) : 6 words$word), rd))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))
+ then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SWSP ((concat_vec ui76 ui52 : 6 words$word), rs2))
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SDSP ((concat_vec ui86 ui53 : 6 words$word), rs2))
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__722 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ let (rs1 : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_JR rs1)
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__722 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ let (rs1 : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_JALR rs1)
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_MV (rd, rs2))
+ else if (((v__722 = (0x9002w : 16 words$word)))) then sail2_state_monad$returnS (C_EBREAK () )
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADD (rsd, rs2))
+ else if ((((let (im5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (im5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_NOP_HINT ((concat_vec im5 im40 : 6 words$word)))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rsd <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__722 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDI_HINT rsd)
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LI_HINT ((concat_vec imm5 imm40 : 6 words$word)))
+ else if ((((let (imm17 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LUI_HINT ((concat_vec imm17 imm1612 : 6 words$word)))
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100000000w : 9 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_MV_HINT rs2)
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100100000w : 9 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADD_HINT rs2)
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) /\ ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SLLI_HINT ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100000w : 6 words$word)))) /\ (((((subrange_vec_dec v__722 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SRLI_HINT rsd)
+ else if ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100001w : 6 words$word)))) /\ (((((subrange_vec_dec v__722 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SRAI_HINT rsd)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__722 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FLWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__9 : bool) .
+ if w__9 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__722 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FSWSP ((concat_vec ui76 ui52 : 6 words$word), rs2))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__14 : bool) .
+ if w__14 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_FLW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word),
+ rs1,
+ rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__722 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__722 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__19 : bool) .
+ sail2_state_monad$returnS (if w__19 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__722 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__722 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__722 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__722 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__722 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ C_FSW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word),
+ rs1,
+ rs2)
+ else C_ILLEGAL v__722)))))))`;
+
+
+val _ = Define `
+ ((encdec_compressed_forwards_matches:ast ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
- C_NOP (() ) => T
- | C_ADDI4SPN ((rd, v__596)) =>
- if (let (nz96 : 4 bits) = ((subrange_vec_dec v__596 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__596 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__596 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__596 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__596 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- (((concat_vec nz96 ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) then
- T
- else F
- | C_LW ((v__597, rs1, rd)) => T
- | C_LD ((v__598, rs1, rd)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_SW ((v__599, rs1, rs2)) => T
- | C_SD ((v__600, rs1, rs2)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_ADDI ((v__601, rsd)) =>
- if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__601 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__601 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__601 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) then
- T
- else F
- | C_JAL (v__602) => if ((((( 32 : int):ii) = (( 32 : int):ii)))) then T else F
- | C_ADDIW ((v__603, rsd)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))))
- then
- T
- else F
- | C_LI ((v__604, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
- | C_ADDI16SP (v__605) =>
- if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__605 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__605 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__605 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__605 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__605 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__605 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- (((concat_vec nzi9
- ((concat_vec nzi87
- ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
- : 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_LUI ((v__606, rd)) =>
- if (let (imm17 : 1 bits) = ((subrange_vec_dec v__606 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__606 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__606 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) then
- T
- else F
- | C_SRLI ((v__607, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__607 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__607 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__607 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_SRAI ((v__608, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__608 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__608 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__608 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_ANDI ((v__609, rsd)) => T
- | C_SUB ((rsd, rs2)) => T
- | C_XOR ((rsd, rs2)) => T
- | C_OR ((rsd, rs2)) => T
- | C_AND ((rsd, rs2)) => T
- | C_SUBW ((rsd, rs2)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_ADDW ((rsd, rs2)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_J (v__610) => T
- | C_BEQZ ((v__611, rs)) => T
- | C_BNEZ ((v__612, rs)) => T
- | C_SLLI ((v__613, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__613 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__613 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__613 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word)))))))))))))
- then
- T
- else F
- | C_LWSP ((v__614, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
- | C_LDSP ((v__615, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))))
- then
- T
- else F
- | C_SWSP ((v__616, rs2)) => T
- | C_SDSP ((v__617, rs2)) => if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_JR (rs1) => if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
- | C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ C_NOP (() ) => sail2_state_monad$returnS T
+ | C_ADDI4SPN ((rd, v__912)) =>
+ sail2_state_monad$returnS (if (let (nz96 : 4 bits) = ((subrange_vec_dec v__912 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__912 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__912 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__912 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__912 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ (((concat_vec nz96
+ ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
+ : 8 words$word)) <> (0x00w : 8 words$word))) then
+ T
+ else F)
+ | C_LW ((v__913, rs1, rd)) => sail2_state_monad$returnS T
+ | C_LD ((v__914, rs1, rd)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_SW ((v__915, rs1, rs2)) => sail2_state_monad$returnS T
+ | C_SD ((v__916, rs1, rs2)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_ADDI ((v__917, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__917 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__917 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__917 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) then
+ T
+ else F)
+ | C_JAL (v__918) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 32 : int):ii)))) then T else F)
+ | C_ADDIW ((v__919, rsd)) =>
+ sail2_state_monad$returnS (if ((((((rsd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii))))))) then T else F)
+ | C_LI ((v__920, rd)) => sail2_state_monad$returnS (if (((rd <> zreg))) then T else F)
+ | C_ADDI16SP (v__921) =>
+ sail2_state_monad$returnS (if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__921 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__921 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__921 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__921 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__921 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__921 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ (((concat_vec nzi9
+ ((concat_vec nzi87
+ ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
+ : 5 words$word))
+ : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_LUI ((v__922, rd)) =>
+ sail2_state_monad$returnS (if (let (imm17 : 1 bits) = ((subrange_vec_dec v__922 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__922 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__922 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word)))))))))
+ then
+ T
+ else F)
+ | C_SRLI ((v__923, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__923 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__923 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__923 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_SRAI ((v__924, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__924 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__924 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__924 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_ANDI ((v__925, rsd)) => sail2_state_monad$returnS T
+ | C_SUB ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_XOR ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_OR ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_AND ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_SUBW ((rsd, rs2)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_ADDW ((rsd, rs2)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_J (v__926) => sail2_state_monad$returnS T
+ | C_BEQZ ((v__927, rs)) => sail2_state_monad$returnS T
+ | C_BNEZ ((v__928, rs)) => sail2_state_monad$returnS T
+ | C_SLLI ((v__929, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__929 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__929 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__929 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) then
+ T
+ else F)
+ | C_LWSP ((v__930, rd)) => sail2_state_monad$returnS (if (((rd <> zreg))) then T else F)
+ | C_LDSP ((v__931, rd)) =>
+ sail2_state_monad$returnS (if ((((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii))))))) then T else F)
+ | C_SWSP ((v__932, rs2)) => sail2_state_monad$returnS T
+ | C_SDSP ((v__933, rs2)) => sail2_state_monad$returnS (if ((((( 32 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_JR (rs1) => sail2_state_monad$returnS (if (((rs1 <> zreg))) then T else F)
+ | C_JALR (rs1) => sail2_state_monad$returnS (if (((rs1 <> zreg))) then T else F)
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T
- else F
- | C_EBREAK (() ) => T
+ sail2_state_monad$returnS (if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F)
+ | C_EBREAK (() ) => sail2_state_monad$returnS T
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T
- else F
- | C_ILLEGAL (s) => T
- | _ => F
+ sail2_state_monad$returnS (if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F)
+ | C_NOP_HINT (v__934) =>
+ sail2_state_monad$returnS (if (let (im5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__934 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_ADDI_HINT (rsd) => sail2_state_monad$returnS (if (((rsd <> zreg))) then T else F)
+ | C_LI_HINT (v__935) => sail2_state_monad$returnS T
+ | C_LUI_HINT (v__936) =>
+ sail2_state_monad$returnS (if (let (imm17 : 1 bits) = ((subrange_vec_dec v__936 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__936 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__936 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_MV_HINT (rs2) => sail2_state_monad$returnS (if (((rs2 <> zreg))) then T else F)
+ | C_ADD_HINT (rs2) => sail2_state_monad$returnS (if (((rs2 <> zreg))) then T else F)
+ | C_SLLI_HINT ((v__937, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__937 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__937 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__937 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) then
+ T
+ else F)
+ | C_SRLI_HINT (rsd) => sail2_state_monad$returnS T
+ | C_SRAI_HINT (rsd) => sail2_state_monad$returnS T
+ | C_FLWSP ((v__938, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__3 :
+ bool) .
+ sail2_state_monad$returnS (if w__3 then T
+ else F))
+ | C_FSWSP ((v__939, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__7 :
+ bool) .
+ sail2_state_monad$returnS (if w__7 then T
+ else F))
+ | C_FLW ((v__940, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__11 :
+ bool) .
+ sail2_state_monad$returnS (if w__11 then T
+ else F))
+ | C_FSW ((v__941, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__15 :
+ bool) .
+ sail2_state_monad$returnS (if w__15 then T
+ else F))
+ | C_ILLEGAL (s) => sail2_state_monad$returnS T
+ | _ => sail2_state_monad$returnS F
)))`;
-(*val encdec_compressed_backwards_matches : mword ty16 -> bool*)
-
val _ = Define `
- ((encdec_compressed_backwards_matches:(16)words$word -> bool) arg_=
- (let v__618 = arg_ in
- if (((v__618 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 16 words$word))))
- then
- T
- else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__618 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__618 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ ((encdec_compressed_backwards_matches:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let v__942 = arg_ in
+ if (((v__942 = (0x0001w : 16 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__942 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__942 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nz96
((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__618 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__618 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__618 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ : 8 words$word)) <> (0x00w : 8 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__942 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__942 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__942 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ ((((((((regidx_to_regno ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word))))))))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- T
- else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- T
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- T
- else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if (((v__618 = (vec_of_bits [B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 16 words$word)))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else T))`;
+ : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 32 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__942 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__942 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((v__942 = (0x9002w : 16 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (im5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rsd <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__942 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (imm17 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100000000w : 9 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100100000w : 9 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__942 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__942 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__942 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 32 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) /\ ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100000w : 6 words$word)))) /\ (((((subrange_vec_dec v__942 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100001w : 6 words$word)))) /\ (((((subrange_vec_dec v__942 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__9 : bool) .
+ if w__9 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__14 : bool) .
+ if w__14 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 32 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__942 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__942 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__19 : bool) .
+ sail2_state_monad$returnS (if w__19 then T
+ else T)))))))`;
(*val execute_WFI : unit -> M Retired*)
@@ -21154,7 +26859,7 @@ val _ = Define `
Machine => sail2_state_monad$seqS (platform_wfi () ) (sail2_state_monad$returnS RETIRE_SUCCESS)
| Supervisor => sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
- if (((((get_Mstatus_TW w__1 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$seqS
+ if (((((get_Mstatus_TW w__1 : 1 words$word)) = (0b1w : 1 words$word)))) then sail2_state_monad$seqS
(handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$seqS (platform_wfi () ) (sail2_state_monad$returnS RETIRE_SUCCESS))
| User => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
@@ -21166,45 +26871,90 @@ val _ = Define `
val _ = Define `
((execute_UTYPE:(20)words$word ->(5)words$word -> uop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rd op=
(let (off : xlenbits) =
- ((EXTS (( 32 : int):ii)
- ((concat_vec imm (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- : 32 words$word))
- : 32 words$word)) in sail2_state_monad$bindS
+ ((EXTS (( 32 : int):ii) ((concat_vec imm (0x000w : 12 words$word) : 32 words$word)) : 32 words$word)) in sail2_state_monad$bindS
(case op of
RISCV_LUI => sail2_state_monad$returnS off
| RISCV_AUIPC => sail2_state_monad$bindS
(get_arch_pc () : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
sail2_state_monad$returnS ((add_vec w__0 off : 32 words$word)))
) (\ (ret : xlenbits) . sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ret) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ret) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_URET : unit -> M Retired*)
val _ = Define `
((execute_URET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) . sail2_state_monad$seqS
- (if ((~ w__0)) then handle_illegal ()
+ (sail2_state$or_boolS ( sail2_state_monad$bindS(haveUsrMode () ) (\ (w__0 : bool) . sail2_state_monad$returnS ((~ w__0))))
+ (sail2_state_monad$returnS ((~ ((sys_enable_next () )))))) (\ (w__1 : bool) . sail2_state_monad$seqS
+ (if w__1 then handle_illegal ()
+ else if ((~ ((ext_check_xret_priv User)))) then sail2_state_monad$returnS ((ext_fail_xret_priv () ))
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__2 : 32 words$word) . sail2_state_monad$bindS
- (exception_handler w__1 (CTL_URET () ) w__2 : ( 32 words$word) M) (\ (w__3 : 32 words$word) .
- set_next_pc w__3))))
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__3 : 32 words$word) . sail2_state_monad$bindS
+ (exception_handler w__2 (CTL_URET () ) w__3 : ( 32 words$word) M) (\ (w__4 : 32 words$word) .
+ set_next_pc w__4))))
(sail2_state_monad$returnS RETIRE_FAIL))))`;
+(*val execute_STORE_FP : mword ty12 -> mword ty5 -> mword ty5 -> word_width -> M Retired*)
+
+val _ = Define `
+ ((execute_STORE_FP:(12)words$word ->(5)words$word ->(5)words$word -> word_width ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 width=
+ (let (offset : xlenbits) = ((EXTS (( 32 : int):ii) imm : 32 words$word)) in
+ let (aq, rl, con) = (F, F, F) in sail2_state_monad$bindS
+ (ext_data_get_addr rs1 offset (Write Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (case w__0 of
+ Ext_DataAddr_Error (e) =>
+ let (_ : unit) = (ext_handle_data_check_error e) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ | Ext_DataAddr_OK (vaddr) =>
+ if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
+ else sail2_state_monad$bindS
+ (translateAddr vaddr (Write Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
+ TR_Result) .
+ (case w__1 of
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
+ (case width of
+ BYTE => sail2_state_monad$returnS (MemValue () )
+ | HALF => sail2_state_monad$returnS (MemValue () )
+ | WORD => mem_write_ea addr (( 4 : int):ii) aq rl F
+ | DOUBLE => mem_write_ea addr (( 8 : int):ii) aq rl F
+ ) (\ (eares : unit MemoryOpResult) .
+ (case eares of
+ MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | MemValue (_) => sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ rs2_val .
+ (case (width, (( 32 : int):ii)) of
+ (BYTE, g__321) => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ | (HALF, g__322) => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ | (WORD, g__323) => sail2_state_monad$bindS
+ (mem_write_value addr (( 4 : int):ii)
+ ((subrange_vec_dec rs2_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) aq rl con) (\ (w__4 : bool
+ MemoryOpResult) .
+ process_fstore vaddr w__4)
+ | _ => sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_insts_fext.sail 401:14 - 406:15")
+ (sail2_state_monad$exitS () )
+ ))
+ ))
+ ))
+ ))))`;
+
+
(*val execute_STORECON : bool -> bool -> mword ty5 -> mword ty5 -> word_width -> mword ty5 -> M Retired*)
val _ = Define `
((execute_STORECON:bool -> bool ->(5)words$word ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) aq rl rs2 rs1 width rd= (sail2_state_monad$bindS
(speculate_conditional_success () ) (\ (w__0 : bool) .
if (((w__0 = F))) then sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTZ (( 32 : int):ii) (vec_of_bits [B1] : 1 words$word) : 32 words$word)))
- (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (wX_bits rd ((EXTZ (( 32 : int):ii) (0b1w : 1 words$word) : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)
else sail2_state_monad$bindS
(haveAtomics () ) (\ (w__1 : bool) .
if w__1 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) Write width) (\ (w__2 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) (Write Data) width) (\ (w__2 : unit
Ext_DataAddr_Check) .
(case w__2 of
Ext_DataAddr_Error (e) =>
@@ -21214,47 +26964,56 @@ val _ = Define `
let (aligned : bool) =
((case width of
BYTE => T
- | HALF =>
- (((cast_unit_vec0 ((access_vec_dec vaddr (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word))
+ | HALF => (((subrange_vec_dec vaddr (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))
| WORD =>
- (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))
+ (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))
| DOUBLE =>
- (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word))
+ (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (0b000w : 3 words$word))
)) in
- if ((~ aligned)) then sail2_state_monad$seqS (handle_mem_exception vaddr E_SAMO_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if ((~ aligned)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else if (((((match_reservation vaddr)) = F))) then sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTZ (( 32 : int):ii) (vec_of_bits [B1] : 1 words$word) : 32 words$word)))
+ (wX_bits rd ((EXTZ (( 32 : int):ii) (0b1w : 1 words$word) : 32 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
else sail2_state_monad$bindS
- (translateAddr vaddr Write : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__3 : (( 32 words$word), ExceptionType)
+ (translateAddr vaddr (Write Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__3 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__3 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (WORD, _) => mem_write_ea addr (( 4 : int):ii) aq rl T
+ (BYTE, _) => mem_write_ea addr (( 1 : int):ii) (((aq /\ rl))) rl T
+ | (HALF, _) => mem_write_ea addr (( 2 : int):ii) (((aq /\ rl))) rl T
+ | (WORD, _) => mem_write_ea addr (( 4 : int):ii) (((aq /\ rl))) rl T
| _ => internal_error "STORECON expected word or double"
) (\ (eares : unit MemoryOpResult) .
(case eares of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (_) => sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val . sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (WORD, _) =>
+ (BYTE, _) =>
+ mem_write_value addr (( 1 : int):ii)
+ ((subrange_vec_dec rs2_val (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) (((aq /\ rl))) rl
+ T
+ | (HALF, _) =>
+ mem_write_value addr (( 2 : int):ii)
+ ((subrange_vec_dec rs2_val (( 15 : int):ii) (( 0 : int):ii) : 16 words$word)) (((aq /\ rl)))
+ rl T
+ | (WORD, _) =>
mem_write_value addr (( 4 : int):ii)
- ((subrange_vec_dec rs2_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) aq rl T
+ ((subrange_vec_dec rs2_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) (((aq /\ rl)))
+ rl T
| _ => internal_error "STORECON expected word or double"
) (\ (res : bool MemoryOpResult) .
(case res of
MemValue (T) => sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
- ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word)))
+ (wX_bits rd ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
| MemValue (F) => sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
- ((EXTZ (( 32 : int):ii) (vec_of_bits [B1] : 1 words$word) : 32 words$word)))
+ (wX_bits rd ((EXTZ (( 32 : int):ii) (0b1w : 1 words$word) : 32 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
@@ -21270,45 +27029,48 @@ val _ = Define `
val _ = Define `
((execute_STORE:(12)words$word ->(5)words$word ->(5)words$word -> word_width -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 width aq rl=
(let (offset : xlenbits) = ((EXTS (( 32 : int):ii) imm : 32 words$word)) in sail2_state_monad$bindS
- (ext_data_get_addr rs1 offset Write width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (ext_data_get_addr rs1 offset (Write Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
(case w__0 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) =>
if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
- (handle_mem_exception vaddr E_SAMO_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Write : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
+ (translateAddr vaddr (Write Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__1 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((paddr, _)) => sail2_state_monad$bindS
(case width of
- BYTE => mem_write_ea addr (( 1 : int):ii) aq rl F
- | HALF => mem_write_ea addr (( 2 : int):ii) aq rl F
- | WORD => mem_write_ea addr (( 4 : int):ii) aq rl F
- | DOUBLE => mem_write_ea addr (( 8 : int):ii) aq rl F
+ BYTE => mem_write_ea paddr (( 1 : int):ii) aq rl F
+ | HALF => mem_write_ea paddr (( 2 : int):ii) aq rl F
+ | WORD => mem_write_ea paddr (( 4 : int):ii) aq rl F
+ | DOUBLE => mem_write_ea paddr (( 8 : int):ii) aq rl F
) (\ (eares : unit MemoryOpResult) .
(case eares of
- MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (_) => sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val . sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (BYTE, _) =>
- mem_write_value addr (( 1 : int):ii) ((subrange_vec_dec rs2_val (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- aq rl F
- | (HALF, _) =>
- mem_write_value addr (( 2 : int):ii)
+ (BYTE, g__313) =>
+ mem_write_value paddr (( 1 : int):ii)
+ ((subrange_vec_dec rs2_val (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) aq rl F
+ | (HALF, g__314) =>
+ mem_write_value paddr (( 2 : int):ii)
((subrange_vec_dec rs2_val (( 15 : int):ii) (( 0 : int):ii) : 16 words$word)) aq rl F
- | (WORD, _) =>
- mem_write_value addr (( 4 : int):ii)
+ | (WORD, g__315) =>
+ mem_write_value paddr (( 4 : int):ii)
((subrange_vec_dec rs2_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) aq rl F
+ | _ => sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_insts_base.sail 394:47 - 399:15")
+ (sail2_state_monad$exitS () )
) (\ (res : bool MemoryOpResult) .
(case res of
MemValue (T) => sail2_state_monad$returnS RETIRE_SUCCESS
| MemValue (F) => internal_error "store got false from mem_write_value"
- | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))
))
))
@@ -21319,37 +27081,31 @@ val _ = Define `
val _ = Define `
((execute_SRET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$seqS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$bindS
(case w__0 of
- User => handle_illegal ()
- | Supervisor => sail2_state_monad$bindS
- (sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
+ User => sail2_state_monad$returnS T
+ | Supervisor =>
+ sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__2 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_TSR w__2 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))) (\ (w__3 :
- bool) .
- if w__3 then handle_illegal ()
- else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__4 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__5 : 32 words$word) . sail2_state_monad$bindS
- (exception_handler w__4 (CTL_SRET () ) w__5 : ( 32 words$word) M) (\ (w__6 : 32 words$word) .
- set_next_pc w__6))))
- | Machine => sail2_state_monad$bindS
- (haveSupMode () ) (\ (w__7 : bool) .
- if ((~ w__7)) then handle_illegal ()
- else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__8 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__9 : 32 words$word) . sail2_state_monad$bindS
- (exception_handler w__8 (CTL_SRET () ) w__9 : ( 32 words$word) M) (\ (w__10 : 32 words$word) .
- set_next_pc w__10))))
- )
- (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ sail2_state_monad$returnS (((((get_Mstatus_TSR w__2 : 1 words$word)) = (0b1w : 1 words$word))))))
+ | Machine => sail2_state_monad$bindS (haveSupMode () ) (\ (w__4 : bool) . sail2_state_monad$returnS ((~ w__4)))
+ ) (\ (sret_illegal : bool) .
+ if sret_illegal then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if ((~ ((ext_check_xret_priv Supervisor)))) then
+ let (_ : unit) = (ext_fail_xret_priv () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__5 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__6 : 32 words$word) . sail2_state_monad$bindS
+ (exception_handler w__5 (CTL_SRET () ) w__6 : ( 32 words$word) M) (\ (w__7 : 32 words$word) . sail2_state_monad$seqS
+ (set_next_pc w__7) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
(*val execute_SHIFTW : mword ty5 -> mword ty5 -> mword ty5 -> sop -> M Retired*)
val _ = Define `
((execute_SHIFTW:(5)words$word ->(5)words$word ->(5)words$word -> sop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
let rs1_val = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (result : 32 bits) =
((case op of
@@ -21357,14 +27113,14 @@ val _ = Define `
| RISCV_SRLI => (shift_bits_right rs1_val shamt : 32 words$word)
| RISCV_SRAI => (shift_right_arith32 rs1_val shamt : 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SHIFTIWOP : mword ty5 -> mword ty5 -> mword ty5 -> sopw -> M Retired*)
val _ = Define `
((execute_SHIFTIWOP:(5)words$word ->(5)words$word ->(5)words$word -> sopw ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val .
let (result : 32 bits) =
((case op of
RISCV_SLLIW =>
@@ -21377,14 +27133,14 @@ val _ = Define `
(shift_right_arith32 ((subrange_vec_dec rs1_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) shamt
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SHIFTIOP : mword ty6 -> mword ty5 -> mword ty5 -> sop -> M Retired*)
val _ = Define `
((execute_SHIFTIOP:(6)words$word ->(5)words$word ->(5)words$word -> sop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val .
let (result : xlenbits) =
((case op of
RISCV_SLLI =>
@@ -21396,37 +27152,33 @@ val _ = Define `
(shift_right_arith32 rs1_val ((subrange_vec_dec shamt (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SFENCE_VMA : mword ty5 -> mword ty5 -> M Retired*)
val _ = Define `
((execute_SFENCE_VMA:(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs1 rs2= (sail2_state_monad$bindS
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then sail2_state_monad$returnS NONE
- else sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__0))) (\ (addr : xlenbits option) . sail2_state_monad$bindS
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then sail2_state_monad$returnS NONE
- else sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
- sail2_state_monad$returnS (SOME w__1))) (\ (asid : xlenbits option) . sail2_state_monad$bindS
+ (if (((rs1 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS NONE
+ else sail2_state_monad$bindS (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) . sail2_state_monad$returnS (SOME w__0))) (\ (addr :
+ xlenbits option) . sail2_state_monad$bindS
+ (if (((rs2 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS NONE
+ else sail2_state_monad$bindS (rX_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) . sail2_state_monad$returnS (SOME w__1))) (\ (asid :
+ xlenbits option) . sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) .
(case w__2 of
User => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
| Supervisor => sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__3 : Mstatus) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
- let p__1 =
+ let p__317 =
(architecture ((get_mstatus_SXL w__3 : 2 words$word)), (get_Mstatus_TVM w__4 : 1 words$word)) in
- (case p__1 of
- (SOME (g__0), v_0) =>
- if (((v_0 = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$seqS
- (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
- else if (((v_0 = ((bool_to_bits F : 1 words$word))))) then sail2_state_monad$seqS
- (flush_TLB asid addr) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (case p__317 of
+ (SOME (g__316), b__0) =>
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$seqS (flush_TLB asid addr) (sail2_state_monad$returnS RETIRE_SUCCESS)
else
- (case (SOME g__0, v_0) of
+ (case (SOME g__316, b__0) of
(_, _) => internal_error "unimplemented sfence architecture"
)
| (_, _) => internal_error "unimplemented sfence architecture"
@@ -21439,9 +27191,9 @@ val _ = Define `
val _ = Define `
((execute_RTYPEW:(5)words$word ->(5)words$word ->(5)words$word -> ropw ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
let rs1_val = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
let rs2_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (result : 32 bits) =
((case op of
@@ -21457,15 +27209,15 @@ val _ = Define `
(shift_right_arith32 rs1_val ((subrange_vec_dec rs2_val (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
+ (wX_bits rd ((EXTS (( 32 : int):ii) result : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
(*val execute_RTYPE : mword ty5 -> mword ty5 -> mword ty5 -> rop -> M Retired*)
val _ = Define `
((execute_RTYPE:(5)words$word ->(5)words$word ->(5)words$word -> rop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val .
let (result : xlenbits) =
((case op of
RISCV_ADD => (add_vec rs1_val rs2_val : 32 words$word)
@@ -21487,14 +27239,14 @@ val _ = Define `
(shift_right_arith32 rs1_val ((subrange_vec_dec rs2_val (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
(*val execute_RISCV_JALR : mword ty12 -> mword ty5 -> mword ty5 -> M Retired*)
val _ = Define `
((execute_RISCV_JALR:(12)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
let (t : xlenbits) = ((add_vec w__0 ((EXTS (( 32 : int):ii) imm : 32 words$word)) : 32 words$word)) in
(case ((ext_control_check_addr t)) of
Ext_ControlAddr_Error (e) =>
@@ -21504,10 +27256,10 @@ val _ = Define `
let target = ((update_vec_dec addr (( 0 : int):ii) B0 : 32 words$word)) in sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
(get_next_pc () : ( 32 words$word) M) (\ (w__3 : 32 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
))))`;
@@ -21524,10 +27276,10 @@ val _ = Define `
| Ext_ControlAddr_OK (target) => sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
(get_next_pc () : ( 32 words$word) M) (\ (w__3 : 32 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
))))`;
@@ -21537,14 +27289,14 @@ val _ = Define `
((execute_REMW:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (r : ii) = (if (((rs2_int = (( 0 : int):ii)))) then rs1_int else hardware_mod rs1_int rs2_int) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 32 : int):ii) ((to_bits (( 32 : int):ii) r : 32 words$word)) : 32 words$word)))
+ (wX_bits rd ((EXTS (( 32 : int):ii) ((to_bits (( 32 : int):ii) r : 32 words$word)) : 32 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21555,12 +27307,12 @@ val _ = Define `
((execute_REM:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (r : ii) = (if (((rs2_int = (( 0 : int):ii)))) then rs1_int else hardware_mod rs1_int rs2_int) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((to_bits (( 32 : int):ii) r : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd ((to_bits (( 32 : int):ii) r : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21570,9 +27322,9 @@ val _ = Define `
((execute_MULW:(5)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (integer_word$w2i rs1_val) in
let (rs2_int : ii) = (integer_word$w2i rs2_val) in
@@ -21581,7 +27333,7 @@ val _ = Define `
(( 0 : int):ii)
: 32 words$word)) in
let (result : xlenbits) = ((EXTS (( 32 : int):ii) result32 : 32 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21591,8 +27343,8 @@ val _ = Define `
((execute_MUL:(5)words$word ->(5)words$word ->(5)words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd high signed1 signed2= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if signed1 then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if signed2 then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let result_wide =
@@ -21603,7 +27355,7 @@ val _ = Define `
(( 32 : int):ii)
: 32 words$word)
else (subrange_vec_dec result_wide (((( 32 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21611,15 +27363,51 @@ val _ = Define `
val _ = Define `
((execute_MRET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$seqS
- (if (((((privLevel_to_bits w__0 : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__2 : 32 words$word) . sail2_state_monad$bindS
- (exception_handler w__1 (CTL_MRET () ) w__2 : ( 32 words$word) M) (\ (w__3 : 32 words$word) .
- set_next_pc w__3)))
- else handle_illegal () )
- (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) .
+ if (((w__0 <> Machine))) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if ((~ ((ext_check_xret_priv Machine)))) then
+ let (_ : unit) = (ext_fail_xret_priv () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__2 : 32 words$word) . sail2_state_monad$bindS
+ (exception_handler w__1 (CTL_MRET () ) w__2 : ( 32 words$word) M) (\ (w__3 : 32 words$word) . sail2_state_monad$seqS
+ (set_next_pc w__3) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+
+
+(*val execute_LOAD_FP : mword ty12 -> mword ty5 -> mword ty5 -> word_width -> M Retired*)
+
+val _ = Define `
+ ((execute_LOAD_FP:(12)words$word ->(5)words$word ->(5)words$word -> word_width ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd width=
+ (let (offset : xlenbits) = ((EXTS (( 32 : int):ii) imm : 32 words$word)) in sail2_state_monad$bindS
+ (ext_data_get_addr rs1 offset (Read Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (case w__0 of
+ Ext_DataAddr_Error (e) =>
+ let (_ : unit) = (ext_handle_data_check_error e) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ | Ext_DataAddr_OK (vaddr) =>
+ if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
+ else sail2_state_monad$bindS
+ (translateAddr vaddr (Read Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
+ TR_Result) .
+ (case w__1 of
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) =>
+ let (aq, rl, res) = (F, F, F) in
+ (case (width, (( 32 : int):ii)) of
+ (BYTE, g__318) => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ | (HALF, g__319) => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ | (WORD, g__320) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 4 : int):ii) aq rl res : ( ( 32 words$word)MemoryOpResult) M) (\ (w__2 : ( 32 words$word)
+ MemoryOpResult) .
+ process_fload32 rd vaddr w__2)
+ | _ => sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_insts_fext.sail 331:10 - 338:11")
+ (sail2_state_monad$exitS () )
+ )
+ ))
+ ))))`;
(*val execute_LOADRES : bool -> bool -> mword ty5 -> word_width -> mword ty5 -> M Retired*)
@@ -21628,7 +27416,7 @@ val _ = Define `
((execute_LOADRES:bool -> bool ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) aq rl rs1 width rd= (sail2_state_monad$bindS
(haveAtomics () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) Read width) (\ (w__1 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) (Read Data) width) (\ (w__1 : unit
Ext_DataAddr_Check) .
(case w__1 of
Ext_DataAddr_Error (e) =>
@@ -21638,26 +27426,33 @@ val _ = Define `
let (aligned : bool) =
((case width of
BYTE => T
- | HALF =>
- (((cast_unit_vec0 ((access_vec_dec vaddr (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word))
- | WORD =>
- (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))
+ | HALF => (((subrange_vec_dec vaddr (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))
+ | WORD => (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))
| DOUBLE =>
- (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word))
+ (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (0b000w : 3 words$word))
)) in
- if ((~ aligned)) then sail2_state_monad$seqS (handle_mem_exception vaddr E_Load_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if ((~ aligned)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Read : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 32 words$word), ExceptionType)
+ (translateAddr vaddr (Read Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__2 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) =>
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) =>
(case (width, (( 32 : int):ii)) of
- (WORD, _) => sail2_state_monad$bindS
- (mem_read Read addr (( 4 : int):ii) aq rl T : ( ( 32 words$word)MemoryOpResult) M) (\ (w__3 : ( 32 words$word)
- MemoryOpResult) .
+ (BYTE, _) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 1 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 8 words$word)MemoryOpResult) M) (\ (w__3 : ( 8 words$word) MemoryOpResult) .
process_loadres rd vaddr w__3 F)
- | _ => internal_error "LOADRES expected WORD or DOUBLE"
+ | (HALF, _) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 2 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 16 words$word)MemoryOpResult) M) (\ (w__5 : ( 16 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__5 F)
+ | (WORD, _) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 4 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 32 words$word)MemoryOpResult) M) (\ (w__7 : ( 32 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__7 F)
+ | _ => internal_error "Unexpected AMO width"
)
))
))
@@ -21669,33 +27464,36 @@ val _ = Define `
val _ = Define `
((execute_LOAD:(12)words$word ->(5)words$word ->(5)words$word -> bool -> word_width -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd is_unsigned width aq rl=
(let (offset : xlenbits) = ((EXTS (( 32 : int):ii) imm : 32 words$word)) in sail2_state_monad$bindS
- (ext_data_get_addr rs1 offset Read width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (ext_data_get_addr rs1 offset (Read Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
(case w__0 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) =>
if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
- (handle_mem_exception vaddr E_Load_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Read : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
+ (translateAddr vaddr (Read Data) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__1 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) =>
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((paddr, _)) =>
(case (width, (( 32 : int):ii)) of
- (BYTE, _) => sail2_state_monad$bindS
- (mem_read Read addr (( 1 : int):ii) aq rl F : ( ( 8 words$word)MemoryOpResult) M) (\ (w__2 : ( 8 words$word)
+ (BYTE, g__310) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 1 : int):ii) aq rl F : ( ( 8 words$word)MemoryOpResult) M) (\ (w__2 : ( 8 words$word)
MemoryOpResult) .
process_load rd vaddr w__2 is_unsigned)
- | (HALF, _) => sail2_state_monad$bindS
- (mem_read Read addr (( 2 : int):ii) aq rl F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__4 : ( 16 words$word)
+ | (HALF, g__311) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 2 : int):ii) aq rl F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__4 : ( 16 words$word)
MemoryOpResult) .
process_load rd vaddr w__4 is_unsigned)
- | (WORD, _) => sail2_state_monad$bindS
- (mem_read Read addr (( 4 : int):ii) aq rl F : ( ( 32 words$word)MemoryOpResult) M) (\ (w__6 : ( 32 words$word)
+ | (WORD, g__312) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 4 : int):ii) aq rl F : ( ( 32 words$word)MemoryOpResult) M) (\ (w__6 : ( 32 words$word)
MemoryOpResult) .
process_load rd vaddr w__6 is_unsigned)
+ | _ => sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_insts_base.sail 329:10 - 338:11")
+ (sail2_state_monad$exitS () )
)
))
))))`;
@@ -21705,7 +27503,7 @@ val _ = Define `
val _ = Define `
((execute_ITYPE:(12)words$word ->(5)words$word ->(5)words$word -> iop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val .
let (immext : xlenbits) = ((EXTS (( 32 : int):ii) imm : 32 words$word)) in
let (result : xlenbits) =
((case op of
@@ -21718,7 +27516,7 @@ val _ = Define `
| RISCV_ORI => (or_vec rs1_val immext : 32 words$word)
| RISCV_XORI => (xor_vec rs1_val immext : 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_ILLEGAL : mword ty32 -> M Retired*)
@@ -21727,16 +27525,250 @@ val _ = Define `
((execute_ILLEGAL:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s= (sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)))`;
+(*val execute_F_UN_TYPE_S : mword ty5 -> mword ty5 -> f_un_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_TYPE_S:(5)words$word ->(5)words$word -> f_un_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2=
+ (let merge_var = (arg0, arg1, arg2) in
+ (case merge_var of
+ (rs1, rd, FCLASS_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in
+ let (rd_val_10b : 10 bits) =
+ (if ((f_is_neg_inf_S rs1_val_S)) then (0b0000000001w : 10 words$word)
+ else if ((f_is_neg_norm_S rs1_val_S)) then (0b0000000010w : 10 words$word)
+ else if ((f_is_neg_subnorm_S rs1_val_S)) then (0b0000000100w : 10 words$word)
+ else if ((f_is_neg_zero_S rs1_val_S)) then (0b0000001000w : 10 words$word)
+ else if ((f_is_pos_zero_S rs1_val_S)) then (0b0000010000w : 10 words$word)
+ else if ((f_is_pos_subnorm_S rs1_val_S)) then (0b0000100000w : 10 words$word)
+ else if ((f_is_pos_norm_S rs1_val_S)) then (0b0001000000w : 10 words$word)
+ else if ((f_is_pos_inf_S rs1_val_S)) then (0b0010000000w : 10 words$word)
+ else if ((f_is_SNaN_S rs1_val_S)) then (0b0100000000w : 10 words$word)
+ else if ((f_is_QNaN_S rs1_val_S)) then (0b1000000000w : 10 words$word)
+ else (zeros_implicit (( 10 : int):ii) : 10 words$word)) in sail2_state_monad$seqS
+ (wX_bits rd ((EXTZ (( 32 : int):ii) rd_val_10b : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_X_W) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
+ let (rd_val_X : xlenbits) = ((EXTS (( 32 : int):ii) rs1_val_S : 32 words$word)) in sail2_state_monad$seqS
+ (wX_bits rd rd_val_X) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_W_X) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val_X .
+ let rd_val_S = ((subrange_vec_dec rs1_val_X (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ )))`;
+
+
+(*val execute_F_UN_RM_TYPE_S : mword ty5 -> rounding_mode -> mword ty5 -> f_un_rm_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_RM_TYPE_S:(5)words$word -> rounding_mode ->(5)words$word -> f_un_rm_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs1, rm, rd, FSQRT_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Sqrt rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_W_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToI32 rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_W) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 32 : int):ii) rd_val_W : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_WU_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToUi32 rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_WU) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 32 : int):ii) rd_val_WU : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_W) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_W = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_i32ToF32 rm_3b rs1_val_W : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_WU) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_WU = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_ui32ToF32 rm_3b rs1_val_WU : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_L_S) => sail2_state_monad$returnS RETIRE_FAIL
+ | (rs1, rm, rd, FCVT_LU_S) => sail2_state_monad$returnS RETIRE_FAIL
+ | (rs1, rm, rd, FCVT_S_L) => sail2_state_monad$returnS RETIRE_FAIL
+ | (rs1, rm, rd, FCVT_S_LU) => sail2_state_monad$returnS RETIRE_FAIL
+ )))`;
+
+
+(*val execute_F_MADD_TYPE_S : mword ty5 -> mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_madd_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_MADD_TYPE_S:(5)words$word ->(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_madd_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs3 rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_32b = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_32b = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs3 : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ let rs3_val_32b = ((nan_unbox w__2 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__3 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__3 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FMADD_S =>
+ (riscv_f32MulAdd rm_3b rs1_val_32b rs2_val_32b rs3_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FMSUB_S =>
+ (riscv_f32MulAdd rm_3b rs1_val_32b rs2_val_32b ((negate_S rs3_val_32b : 32 words$word))
+ : (( 5 words$word # 32 words$word)) M)
+ | FNMSUB_S =>
+ (riscv_f32MulAdd rm_3b ((negate_S rs1_val_32b : 32 words$word)) rs2_val_32b rs3_val_32b
+ : (( 5 words$word # 32 words$word)) M)
+ | FNMADD_S =>
+ (riscv_f32MulAdd rm_3b ((negate_S rs1_val_32b : 32 words$word)) rs2_val_32b
+ ((negate_S rs3_val_32b : 32 words$word))
+ : (( 5 words$word # 32 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_32b : 32 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_32b : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
+
+
+(*val execute_F_BIN_TYPE_S : mword ty5 -> mword ty5 -> mword ty5 -> f_bin_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_TYPE_S:(5)words$word ->(5)words$word ->(5)words$word -> f_bin_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs2, rs1, rd, FSGNJ_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S s2 e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJN_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S ((xor_vec (0b1w : 1 words$word) s2 : 1 words$word)) e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJX_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S ((xor_vec s1 s2 : 1 words$word)) e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMIN_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let is_quiet = T in
+ let (rs1_lt_rs2, fflags) = ((fle_S rs1_val_S rs2_val_S is_quiet : (bool # 5 words$word))) in
+ let rd_val_S =
+ (if (((((f_is_NaN_S rs1_val_S)) /\ ((f_is_NaN_S rs2_val_S))))) then
+ (canonical_NaN_S () : 32 words$word)
+ else if ((f_is_NaN_S rs1_val_S)) then rs2_val_S
+ else if ((f_is_NaN_S rs2_val_S)) then rs1_val_S
+ else if (((((f_is_neg_zero_S rs1_val_S)) /\ ((f_is_pos_zero_S rs2_val_S))))) then
+ rs1_val_S
+ else if (((((f_is_neg_zero_S rs2_val_S)) /\ ((f_is_pos_zero_S rs1_val_S))))) then
+ rs2_val_S
+ else if rs1_lt_rs2 then rs1_val_S
+ else rs2_val_S) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMAX_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let is_quiet = T in
+ let (rs2_lt_rs1, fflags) = ((fle_S rs2_val_S rs1_val_S is_quiet : (bool # 5 words$word))) in
+ let rd_val_S =
+ (if (((((f_is_NaN_S rs1_val_S)) /\ ((f_is_NaN_S rs2_val_S))))) then
+ (canonical_NaN_S () : 32 words$word)
+ else if ((f_is_NaN_S rs1_val_S)) then rs2_val_S
+ else if ((f_is_NaN_S rs2_val_S)) then rs1_val_S
+ else if (((((f_is_neg_zero_S rs1_val_S)) /\ ((f_is_pos_zero_S rs2_val_S))))) then
+ rs2_val_S
+ else if (((((f_is_neg_zero_S rs2_val_S)) /\ ((f_is_pos_zero_S rs1_val_S))))) then
+ rs1_val_S
+ else if rs2_lt_rs1 then rs1_val_S
+ else rs2_val_S) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FEQ_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Eq rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 32 : int):ii) rd_val : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLT_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Lt rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 32 : int):ii) rd_val : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLE_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Le rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 32 : int):ii) rd_val : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ )))`;
+
+
+(*val execute_F_BIN_RM_TYPE_S : mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_bin_rm_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_RM_TYPE_S:(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_bin_rm_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ let rs1_val_32b = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ let rs2_val_32b = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__2 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__2 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FADD_S => (riscv_f32Add rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FSUB_S => (riscv_f32Sub rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FMUL_S => (riscv_f32Mul rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FDIV_S => (riscv_f32Div rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_32b : 32 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_32b : 32 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+
+
(*val execute_FENCE_TSO : mword ty4 -> mword ty4 -> M Retired*)
val _ = Define `
((execute_FENCE_TSO:(4)words$word ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) pred succ= (sail2_state_monad$seqS
(case (pred, succ) of
- (v__794, v__795) =>
- if ((((((((subrange_vec_dec v__794 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__795 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_tso
+ (v__1172, v__1173) =>
+ if ((((((((subrange_vec_dec v__1172 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1173 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ barrier (Barrier_RISCV_tso () )
else
- sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__794 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__795 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
+ sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__1172 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1173 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))) then
()
else
let (_ : unit) = (print_endline "FIXME: unsupported fence") in
@@ -21745,6 +27777,18 @@ val _ = Define `
(sail2_state_monad$returnS RETIRE_SUCCESS)))`;
+(*val execute_FENCE_RESERVED : mword ty4 -> mword ty4 -> mword ty4 -> mword ty5 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_FENCE_RESERVED:(4)words$word ->(4)words$word ->(4)words$word ->(5)words$word ->(5)words$word -> Retired) fm pred succ rs rd= RETIRE_SUCCESS)`;
+
+
+(*val execute_FENCEI_RESERVED : mword ty12 -> mword ty5 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_FENCEI_RESERVED:(12)words$word ->(5)words$word ->(5)words$word -> Retired) imm rs rd= RETIRE_SUCCESS)`;
+
+
(*val execute_FENCEI : unit -> Retired*)
val _ = Define `
@@ -21756,27 +27800,30 @@ val _ = Define `
val _ = Define `
((execute_FENCE:(4)words$word ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) pred succ= (sail2_state_monad$seqS
(case (pred, succ) of
- (v__754, v__755) =>
- if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_r
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_r
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_r
+ (v__1132, v__1133) =>
+ if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ barrier (Barrier_RISCV_rw_rw () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_rw () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_r () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_rw_w () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_w () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_rw () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_rw_r () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_w () )
+ else if ((((((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_r () )
else
- sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__1133 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) then
+ ()
+ else if (((((subrange_vec_dec v__1132 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) then
()
else
let (_ : unit) = (print_endline "FIXME: unsupported fence") in
@@ -21793,9 +27840,9 @@ val _ = Define `
let (t : sync_exception) =
(<| sync_exception_trap :=
((case w__0 of
- User => E_U_EnvCall
- | Supervisor => E_S_EnvCall
- | Machine => E_M_EnvCall
+ User => E_U_EnvCall ()
+ | Supervisor => E_S_EnvCall ()
+ | Machine => E_M_EnvCall ()
));
sync_exception_excinfo := NONE;
sync_exception_ext := NONE |>) in sail2_state_monad$bindS
@@ -21810,7 +27857,7 @@ val _ = Define `
val _ = Define `
((execute_EBREAK:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) . sail2_state_monad$seqS
- (handle_mem_exception w__0 E_Breakpoint) (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ (handle_mem_exception w__0 (E_Breakpoint () )) (sail2_state_monad$returnS RETIRE_FAIL))))`;
(*val execute_DIVW : mword ty5 -> mword ty5 -> mword ty5 -> bool -> M Retired*)
@@ -21819,9 +27866,9 @@ val _ = Define `
((execute_DIVW:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__1 : 32 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__2 : 32 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
@@ -21830,7 +27877,7 @@ val _ = Define `
(if (((s /\ ((q > ((((pow2 (( 31 : int):ii))) - (( 1 : int):ii)))))))) then
(( 0 : int):ii) - ((pow0 (( 2 : int):ii) (( 31 : int):ii)))
else q) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 32 : int):ii) ((to_bits (( 32 : int):ii) q' : 32 words$word)) : 32 words$word)))
+ (wX_bits rd ((EXTS (( 32 : int):ii) ((to_bits (( 32 : int):ii) q' : 32 words$word)) : 32 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21841,34 +27888,88 @@ val _ = Define `
((execute_DIV:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (q : ii) = (if (((rs2_int = (( 0 : int):ii)))) then ((( 0 : int)-( 1 : int)):ii) else hardware_quot rs1_int rs2_int) in
let (q' : ii) = (if (((s /\ ((q > xlen_max_signed))))) then xlen_min_signed else q) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((to_bits (( 32 : int):ii) q' : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd ((to_bits (( 32 : int):ii) q' : 32 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
+(*val execute_C_SRLI_HINT : mword ty3 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SRLI_HINT:(3)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_SRAI_HINT : mword ty3 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SRAI_HINT:(3)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_SLLI_HINT : mword ty6 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SLLI_HINT:(6)words$word ->(5)words$word -> Retired) shamt rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_NOP_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_NOP_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
(*val execute_C_NOP : unit -> Retired*)
val _ = Define `
((execute_C_NOP:unit -> Retired) () = RETIRE_SUCCESS)`;
+(*val execute_C_MV_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_MV_HINT:(5)words$word -> Retired) rs2= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_LUI_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_LUI_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_LI_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_LI_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
(*val execute_C_ILLEGAL : mword ty16 -> M Retired*)
val _ = Define `
((execute_C_ILLEGAL:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s= (sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)))`;
+(*val execute_C_ADD_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_ADD_HINT:(5)words$word -> Retired) rs2= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_ADDI_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_ADDI_HINT:(5)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
(*val execute_CSR : mword ty12 -> mword ty5 -> mword ty5 -> bool -> csrop -> M Retired*)
val _ = Define `
((execute_CSR:(12)words$word ->(5)words$word ->(5)words$word -> bool -> csrop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr rs1 rd is_imm op= (sail2_state_monad$bindS
(if is_imm then sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) rs1 : 32 words$word))
- else (rX ((regidx_to_regno rs1)) : ( 32 words$word) M)) (\ (rs1_val : xlenbits) .
+ else (rX_bits rs1 : ( 32 words$word) M)) (\ (rs1_val : xlenbits) .
let (isWrite : bool) =
((case op of
CSRRW => T
@@ -21878,25 +27979,30 @@ val _ = Define `
(check_CSR csr w__1 isWrite) (\ (w__2 : bool) .
if ((~ w__2)) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (readCSR csr : ( 32 words$word) M) (\ csr_val . sail2_state_monad$seqS (sail2_state_monad$seqS
- (if isWrite then
- let (new_val : xlenbits) =
- ((case op of
- CSRRW => rs1_val
- | CSRRS => (or_vec csr_val rs1_val : 32 words$word)
- | CSRRC => (and_vec csr_val ((not_vec rs1_val : 32 words$word)) : 32 words$word)
- )) in
- writeCSR csr new_val
- else sail2_state_monad$returnS () )
- (wX ((regidx_to_regno rd)) csr_val)) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__3 : Privilege) .
+ if ((~ ((ext_check_CSR csr w__3 isWrite)))) then
+ let (_ : unit) = (ext_check_CSR_fail () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (readCSR csr : ( 32 words$word) M) (\ csr_val . sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if isWrite then
+ let (new_val : xlenbits) =
+ ((case op of
+ CSRRW => rs1_val
+ | CSRRS => (or_vec csr_val rs1_val : 32 words$word)
+ | CSRRC => (and_vec csr_val ((not_vec rs1_val : 32 words$word)) : 32 words$word)
+ )) in
+ writeCSR csr new_val
+ else sail2_state_monad$returnS () )
+ (wX_bits rd csr_val)) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
(*val execute_BTYPE : mword ty13 -> mword ty5 -> mword ty5 -> bop -> M Retired*)
val _ = Define `
((execute_BTYPE:(13)words$word ->(5)words$word ->(5)words$word -> bop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 32 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ rs2_val .
let (taken : bool) =
((case op of
RISCV_BEQ => (rs1_val = rs2_val)
@@ -21916,7 +28022,7 @@ val _ = Define `
| Ext_ControlAddr_OK (target) => sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$seqS (set_next_pc target) (sail2_state_monad$returnS RETIRE_SUCCESS))
)
else sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
@@ -21928,35 +28034,75 @@ val _ = Define `
((execute_AMO:amoop -> bool -> bool ->(5)words$word ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) op aq rl rs2 rs1 width rd= (sail2_state_monad$bindS
(haveAtomics () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) ReadWrite width) (\ (w__1 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 32 : int):ii) : 32 words$word)) (ReadWrite (Data, Data)) width) (\ (w__1 : unit
Ext_DataAddr_Check) .
(case w__1 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) => sail2_state_monad$bindS
- (translateAddr vaddr ReadWrite : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 32 words$word), ExceptionType)
+ (translateAddr vaddr (ReadWrite (Data, Data)) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__2 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (WORD, _) => mem_write_ea addr (( 4 : int):ii) (((aq /\ rl))) rl T
- | _ => internal_error "AMO expected WORD or DOUBLE"
- ) (\ (eares : unit MemoryOpResult) . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 32 words$word) M) (\ (rs2_val : xlenbits) .
+ (BYTE, _) => mem_write_ea addr (( 1 : int):ii) (((aq /\ rl))) rl T
+ | (HALF, _) => mem_write_ea addr (( 2 : int):ii) (((aq /\ rl))) rl T
+ | (WORD, _) => mem_write_ea addr (( 4 : int):ii) (((aq /\ rl))) rl T
+ | _ => internal_error "Unexpected AMO width"
+ ) (\ (eares : unit MemoryOpResult) .
+ let (is_unsigned : bool) =
+ ((case op of AMOMINU => T | AMOMAXU => T | _ => F )) in sail2_state_monad$bindS
+ (case width of
+ BYTE =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__7 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((subrange_vec_dec w__7 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 32 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__8 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 32 : int):ii) ((subrange_vec_dec w__8 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 32 words$word)))
+ | HALF =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__10 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((subrange_vec_dec w__10 (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 32 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__11 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 32 : int):ii) ((subrange_vec_dec w__11 (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 32 words$word)))
+ | WORD =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__13 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 32 : int):ii) ((subrange_vec_dec w__13 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 32 words$word) M) (\ (w__14 : 32 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 32 : int):ii) ((subrange_vec_dec w__14 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)))
+ | DOUBLE => (rX_bits rs2 : ( 32 words$word) M)
+ ) (\ (rs2_val : xlenbits) .
(case eares of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (_) => sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (WORD, _) => sail2_state_monad$bindS
- (mem_read ReadWrite addr (( 4 : int):ii) aq (((aq /\ rl))) T
- : ( ( 32 words$word)MemoryOpResult) M) (\ (w__5 : ( 32 words$word) MemoryOpResult) .
- sail2_state_monad$returnS ((extend_value F w__5 : ( 32 words$word) MemoryOpResult)))
- | _ =>
- (internal_error "AMO expected WORD or DOUBLE" : ( ( 32 words$word)MemoryOpResult) M)
- ) (\ (rval : xlenbits MemoryOpResult) .
- (case rval of
+ (BYTE, _) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr (( 1 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 8 words$word)MemoryOpResult) M) (\ (w__17 : ( 8 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS ((extend_value is_unsigned w__17 : ( 32 words$word) MemoryOpResult)))
+ | (HALF, _) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr (( 2 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 16 words$word)MemoryOpResult) M) (\ (w__18 : ( 16 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS ((extend_value is_unsigned w__18 : ( 32 words$word) MemoryOpResult)))
+ | (WORD, _) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr (( 4 : int):ii) aq (((aq /\ rl))) T
+ : ( ( 32 words$word)MemoryOpResult) M) (\ (w__19 : ( 32 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS ((extend_value is_unsigned w__19 : ( 32 words$word) MemoryOpResult)))
+ | _ => (internal_error "Unexpected AMO width" : ( ( 32 words$word)MemoryOpResult) M)
+ ) (\ (mval : xlenbits MemoryOpResult) .
+ (case mval of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (loaded) =>
let (result : xlenbits) =
@@ -21974,16 +28120,37 @@ val _ = Define `
(to_bits (( 32 : int):ii) ((int_min ((lem$w2ui rs2_val)) ((lem$w2ui loaded)))) : 32 words$word)
| AMOMAXU =>
(to_bits (( 32 : int):ii) ((int_max ((lem$w2ui rs2_val)) ((lem$w2ui loaded)))) : 32 words$word)
+ )) in
+ let (rval : xlenbits) =
+ ((case width of
+ BYTE =>
+ (EXTS (( 32 : int):ii) ((subrange_vec_dec loaded (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 32 words$word)
+ | HALF =>
+ (EXTS (( 32 : int):ii) ((subrange_vec_dec loaded (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 32 words$word)
+ | WORD =>
+ (EXTS (( 32 : int):ii) ((subrange_vec_dec loaded (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)
+ | DOUBLE => loaded
)) in sail2_state_monad$bindS
(case (width, (( 32 : int):ii)) of
- (WORD, _) =>
+ (BYTE, _) =>
+ mem_write_value addr (( 1 : int):ii)
+ ((subrange_vec_dec result (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) (((aq /\ rl))) rl
+ T
+ | (HALF, _) =>
+ mem_write_value addr (( 2 : int):ii)
+ ((subrange_vec_dec result (( 15 : int):ii) (( 0 : int):ii) : 16 words$word)) (((aq /\ rl))) rl
+ T
+ | (WORD, _) =>
mem_write_value addr (( 4 : int):ii)
((subrange_vec_dec result (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) (((aq /\ rl))) rl
T
- | _ => internal_error "AMO expected WORD or DOUBLE"
+ | _ => internal_error "Unexpected AMO width"
) (\ (wval : bool MemoryOpResult) .
(case wval of
- MemValue (T) => sail2_state_monad$seqS (wX ((regidx_to_regno rd)) loaded) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ MemValue (T) => sail2_state_monad$seqS (wX_bits rd rval) (sail2_state_monad$returnS RETIRE_SUCCESS)
| MemValue (F) => internal_error "AMO got false from mem_write_value"
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
))
@@ -21998,9 +28165,9 @@ val _ = Define `
val _ = Define `
((execute_ADDIW:(12)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
+ (rX_bits rs1 : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
let (result : xlenbits) = ((add_vec ((EXTS (( 32 : int):ii) imm : 32 words$word)) w__0 : 32 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
+ (wX_bits rd
((EXTS (( 32 : int):ii) ((subrange_vec_dec result (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) : 32 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS))))`;
@@ -22010,36 +28177,31 @@ val _ = Define `
((case merge_var of
C_ADDI4SPN ((rdc, nzimm)) =>
let (imm : 12 bits) =
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec nzimm (vec_of_bits [B0;B0] : 2 words$word) : 10 words$word))
+ ((concat_vec (0b00w : 2 words$word) ((concat_vec nzimm (0b00w : 2 words$word) : 10 words$word))
: 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
execute (ITYPE (imm, sp, rd, RISCV_ADDI))
| C_LW ((uimm, rsc, rdc)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 7 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
let rs = ((creg2reg_idx rsc : 5 words$word)) in
execute (LOAD (imm, rs, rd, F, WORD, F, F))
| C_LD ((uimm, rsc, rdc)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
let rs = ((creg2reg_idx rsc : 5 words$word)) in
execute (LOAD (imm, rs, rd, F, DOUBLE, F, F))
| C_SW ((uimm, rsc1, rsc2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 7 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
execute (STORE (imm, rs2, rs1, WORD, F, F))
| C_SD ((uimm, rsc1, rsc2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
execute (STORE (imm, rs2, rs1, DOUBLE, F, F))
@@ -22048,8 +28210,7 @@ val _ = Define `
execute (ITYPE (imm, rsd, rsd, RISCV_ADDI))
| C_JAL (imm) =>
execute
- (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))
- : 21 words$word),
+ (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 12 words$word)) : 21 words$word),
ra))
| C_ADDIW ((imm, rsd)) => execute (ADDIW ((EXTS (( 12 : int):ii) imm : 12 words$word), rsd, rsd))
| C_LI ((imm, rd)) =>
@@ -22057,8 +28218,7 @@ val _ = Define `
execute (ITYPE (imm, zreg, rd, RISCV_ADDI))
| C_ADDI16SP (imm) =>
let (imm : 12 bits) =
- ((EXTS (( 12 : int):ii) ((concat_vec imm (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 10 words$word))
- : 12 words$word)) in
+ ((EXTS (( 12 : int):ii) ((concat_vec imm (0x0w : 4 words$word) : 10 words$word)) : 12 words$word)) in
execute (ITYPE (imm, sp, sp, RISCV_ADDI))
| C_LUI ((imm, rd)) =>
let (res : 20 bits) = ((EXTS (( 20 : int):ii) imm : 20 words$word)) in
@@ -22098,51 +28258,62 @@ val _ = Define `
execute (RTYPEW (rs2, rsd, rsd, RISCV_ADDW))
| C_J (imm) =>
execute
- (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))
- : 21 words$word),
+ (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 12 words$word)) : 21 words$word),
zreg))
| C_BEQZ ((imm, rs)) =>
execute
- (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 9 words$word))
- : 13 words$word),
+ (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 9 words$word)) : 13 words$word),
zreg,
(creg2reg_idx rs : 5 words$word),
RISCV_BEQ))
| C_BNEZ ((imm, rs)) =>
execute
- (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 9 words$word))
- : 13 words$word),
+ (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 9 words$word)) : 13 words$word),
zreg,
(creg2reg_idx rs : 5 words$word),
RISCV_BNE))
| C_SLLI ((shamt, rsd)) => execute (SHIFTIOP (shamt, rsd, rsd, RISCV_SLLI))
| C_LWSP ((uimm, rd)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
execute (LOAD (imm, sp, rd, F, WORD, F, F))
| C_LDSP ((uimm, rd)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 9 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
execute (LOAD (imm, sp, rd, F, DOUBLE, F, F))
| C_SWSP ((uimm, rs2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
execute (STORE (imm, rs2, sp, WORD, F, F))
| C_SDSP ((uimm, rs2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 9 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
execute (STORE (imm, rs2, sp, DOUBLE, F, F))
- | C_JR (rs1) =>
- execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (vec_of_bits [B0] : 1 words$word) : 12 words$word), rs1, zreg))
- | C_JALR (rs1) =>
- execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (vec_of_bits [B0] : 1 words$word) : 12 words$word), rs1, ra))
+ | C_JR (rs1) => execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (0b0w : 1 words$word) : 12 words$word), rs1, zreg))
+ | C_JALR (rs1) => execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (0b0w : 1 words$word) : 12 words$word), rs1, ra))
| C_MV ((rd, rs2)) => execute (RTYPE (rs2, zreg, rd, RISCV_ADD))
| C_EBREAK (() ) => execute (EBREAK () )
| C_ADD ((rsd, rs2)) => execute (RTYPE (rs2, rsd, rsd, RISCV_ADD))
+ | C_FLWSP ((imm, rd)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec imm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
+ execute (LOAD_FP (imm, sp, rd, WORD))
+ | C_FSWSP ((uimm, rs2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
+ execute (STORE_FP (imm, rs2, sp, WORD))
+ | C_FLW ((uimm, rsc, rdc)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
+ let rd = ((creg2reg_idx rdc : 5 words$word)) in
+ let rs = ((creg2reg_idx rsc : 5 words$word)) in
+ execute (LOAD_FP (imm, rs, rd, WORD))
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
+ let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
+ let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
+ execute (STORE_FP (imm, rs2, rs1, WORD))
| UTYPE ((imm, rd, op)) => execute_UTYPE imm rd op
| RISCV_JAL ((imm, rd)) => execute_RISCV_JAL imm rd
| BTYPE ((imm, rs2, rs1, op)) => execute_BTYPE imm rs2 rs1 op
@@ -22177,6 +28348,25 @@ val _ = Define `
| REMW ((rs2, rs1, rd, s)) => execute_REMW rs2 rs1 rd s
| CSR ((csr, rs1, rd, is_imm, op)) => execute_CSR csr rs1 rd is_imm op
| URET (arg0) => execute_URET arg0
+ | C_NOP_HINT (imm) => sail2_state_monad$returnS ((execute_C_NOP_HINT imm))
+ | C_ADDI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_ADDI_HINT rsd))
+ | C_LI_HINT (imm) => sail2_state_monad$returnS ((execute_C_LI_HINT imm))
+ | C_LUI_HINT (imm) => sail2_state_monad$returnS ((execute_C_LUI_HINT imm))
+ | C_MV_HINT (rs2) => sail2_state_monad$returnS ((execute_C_MV_HINT rs2))
+ | C_ADD_HINT (rs2) => sail2_state_monad$returnS ((execute_C_ADD_HINT rs2))
+ | C_SLLI_HINT ((shamt, rsd)) => sail2_state_monad$returnS ((execute_C_SLLI_HINT shamt rsd))
+ | C_SRLI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_SRLI_HINT rsd))
+ | C_SRAI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_SRAI_HINT rsd))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ sail2_state_monad$returnS ((execute_FENCE_RESERVED fm pred succ rs rd))
+ | FENCEI_RESERVED ((imm, rs, rd)) => sail2_state_monad$returnS ((execute_FENCEI_RESERVED imm rs rd))
+ | LOAD_FP ((imm, rs1, rd, width)) => execute_LOAD_FP imm rs1 rd width
+ | STORE_FP ((imm, rs2, rs1, width)) => execute_STORE_FP imm rs2 rs1 width
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => execute_F_MADD_TYPE_S rs3 rs2 rs1 rm rd op
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => execute_F_BIN_RM_TYPE_S rs2 rs1 rm rd op
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, arg3)) => execute_F_UN_RM_TYPE_S rs1 rm rd arg3
+ | F_BIN_TYPE_S ((rs2, rs1, rd, arg3)) => execute_F_BIN_TYPE_S rs2 rs1 rd arg3
+ | F_UN_TYPE_S ((rs1, rd, arg2)) => execute_F_UN_TYPE_S rs1 rd arg2
| RISCV_JALR ((imm, rs1, rd)) => execute_RISCV_JALR imm rs1 rd
| ILLEGAL (s) => execute_ILLEGAL s
| C_ILLEGAL (s) => execute_C_ILLEGAL s
@@ -22184,8 +28374,6 @@ val _ = Define `
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn execute_defn;
-(*val assembly_forwards : ast -> M string*)
-
val _ = Define `
((assembly_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
@@ -22984,11 +29172,11 @@ val _ = Define `
(reg_name_forwards rd)
(\ (w__45 : string) .
sail2_state_monad$bindS
- (reg_name_forwards rs1)
+ (reg_name_forwards rs2)
(\ (w__46 : string) .
sail2_state_monad$bindS
(reg_name_forwards
- rs2)
+ rs1)
(\ (w__47 : string) .
sail2_state_monad$returnS
((string_append
@@ -23049,11 +29237,19 @@ val _ = Define `
(
(
string_append
- w__47
- "")))))))))))))))))))))))))
+ "("
+ (
+ (
+ string_append
+ w__47
+ (
+ (
+ string_append
+ ")"
+ "")))))))))))))))))))))))))))))
| C_NOP (() ) => sail2_state_monad$returnS "c.nop"
| C_ADDI4SPN ((rdc, nzimm)) =>
- if (((nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
+ if (((nzimm <> (0x00w : 8 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rdc)
(\ (w__48 : string) .
sail2_state_monad$returnS
@@ -23063,9 +29259,8 @@ val _ = Define `
((string_append ((sep_forwards () ))
((string_append
((decimal_string_of_bits
- ((concat_vec nzimm
- (vec_of_bits [B0;B0] : 2 words$word)
- : 10 words$word)))) ""))))))))))) else
+ ((concat_vec nzimm (0b00w : 2 words$word) : 10 words$word))))
+ ""))))))))))) else
sail2_state_monad$seqS
(sail2_state_monad$assert_expS F
"Pattern match failure at unknown location")
@@ -23119,9 +29314,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0] : 2 words$word)
- : 7 words$word))))
+ 0b00w : 2 words$word) : 7 words$word))))
""))))))))))))))))
| C_LD ((uimm, rsc, rdc)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then
@@ -23144,9 +29337,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0;B0] : 3 words$word)
- : 8 words$word))))
+ 0b000w : 3 words$word) : 8 words$word))))
""))))))))))))))))
else
sail2_state_monad$seqS
@@ -23202,9 +29393,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0] : 2 words$word)
- : 7 words$word))))
+ 0b00w : 2 words$word) : 7 words$word))))
""))))))))))))))))
| C_SD ((uimm, rsc1, rsc2)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then
@@ -23227,9 +29416,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0;B0] : 3 words$word)
- : 8 words$word))))
+ 0b000w : 3 words$word) : 8 words$word))))
""))))))))))))))))
else
sail2_state_monad$seqS
@@ -23237,8 +29424,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_ADDI ((nzi, rsd)) =>
- if ((((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__63 : string) .
sail2_state_monad$returnS
@@ -23259,7 +29445,7 @@ val _ = Define `
((string_append ((spc_forwards () ))
((string_append
((decimal_string_of_bits
- ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))))
+ ((concat_vec imm (0b0w : 1 words$word) : 12 words$word))))
"")))))) else
sail2_state_monad$seqS
(sail2_state_monad$assert_expS F
@@ -23281,7 +29467,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LI ((imm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
+ if (((rd <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__71 : string) .
sail2_state_monad$returnS
@@ -23296,7 +29482,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_ADDI16SP (imm) =>
- if (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((imm <> (0b000000w : 6 words$word)))) then
sail2_state_monad$returnS
((string_append "c.addi16sp"
((string_append ((spc_forwards () ))
@@ -23306,9 +29492,8 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LUI ((imm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\
- (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))))))))) then
+ if ((((((rd <> zreg))) /\
+ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word)))))))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__76 : string) .
sail2_state_monad$returnS
@@ -23323,7 +29508,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_SRLI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((shamt <> (0b000000w : 6 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rsd)
(\ (w__79 : string) .
sail2_state_monad$returnS
@@ -23338,7 +29523,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_SRAI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((shamt <> (0b000000w : 6 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rsd)
(\ (w__82 : string) .
sail2_state_monad$returnS
@@ -23534,8 +29719,7 @@ val _ = Define `
((decimal_string_of_bits
imm)) "")))))))))))
| C_SLLI ((shamt, rsd)) =>
- if ((((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__104 : string) .
sail2_state_monad$returnS
@@ -23550,7 +29734,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LWSP ((uimm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
+ if (((rd <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__107 : string) .
sail2_state_monad$returnS
@@ -23565,8 +29749,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LDSP ((uimm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((( 32 : int): ii) = (( 64 : int): ii))))))) then
+ if ((((((rd <> zreg))) /\ ((((( 32 : int): ii) = (( 64 : int): ii))))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__110 : string) .
sail2_state_monad$returnS
@@ -23607,7 +29790,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
+ if (((rs1 <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rs1)
(\ (w__117 : string) .
sail2_state_monad$returnS
@@ -23619,7 +29802,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
+ if (((rs1 <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rs1)
(\ (w__120 : string) .
sail2_state_monad$returnS
@@ -23631,8 +29814,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__123 : string) . sail2_state_monad$bindS
(reg_name_forwards rs2)
@@ -23651,8 +29833,7 @@ val _ = Define `
(sail2_state_monad$exitS () )
| C_EBREAK (() ) => sail2_state_monad$returnS "c.ebreak"
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__127 : string) . sail2_state_monad$bindS
(reg_name_forwards rs2)
@@ -24004,10 +30185,42 @@ val _ = Define `
(sail2_state_monad$exitS () )
| CSR ((csr, rs1, rd, T, op)) => sail2_state_monad$bindS
(reg_name_forwards rd)
- (\ (w__155 : string) . sail2_state_monad$bindS
- (csr_name_map_forwards
- csr)
- (\ (w__156 : string) .
+ (\ (w__155 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((csr_mnemonic_forwards op))
+ ((string_append "i"
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__155
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((
+ csr_name_map_forwards
+ csr))
+ ((
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ decimal_string_of_bits
+ rs1))
+ "")))))))))))))))))
+ | CSR ((csr, rs1, rd, F, op)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__156 : string) . sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__157 : string) .
sail2_state_monad$returnS
(
(
@@ -24019,7 +30232,217 @@ val _ = Define `
(
(
string_append
- "i"
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__156
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ csr_name_map_forwards
+ csr))
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__157
+ ""))))))))))))))))
+ | URET (() ) => sail2_state_monad$returnS "uret"
+ | C_NOP_HINT (imm) =>
+ sail2_state_monad$returnS
+ ((string_append "c.nop.hint."
+ ((string_append ((decimal_string_of_bits imm)) ""))))
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rsd)
+ (\ (w__158 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.addi.hint." ((string_append w__158 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_LI_HINT (imm) =>
+ sail2_state_monad$returnS
+ ((string_append "c.li.hint."
+ ((string_append ((decimal_string_of_bits imm)) ""))))
+ | C_LUI_HINT (imm) =>
+ if (((imm <> (0b000000w : 6 words$word)))) then
+ sail2_state_monad$returnS
+ ((string_append "c.lui.hint."
+ ((string_append ((decimal_string_of_bits imm)) "")))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rs2)
+ (\ (w__163 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.mv.hint." ((string_append w__163 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rs2)
+ (\ (w__166 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.add.hint." ((string_append w__166 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_SLLI_HINT ((shamt, rsd)) =>
+ if ((((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) then
+ sail2_state_monad$bindS (reg_name_forwards rsd)
+ (\ (w__169 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.slli.hint."
+ ((string_append w__169
+ ((string_append "."
+ ((string_append ((decimal_string_of_bits shamt)) "")))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_SRLI_HINT (rsd) => sail2_state_monad$bindS (creg_name_forwards rsd)
+ (\ (w__172 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.srli.hint."
+ ((string_append w__172 "")))))
+ | C_SRAI_HINT (rsd) => sail2_state_monad$bindS (creg_name_forwards rsd)
+ (\ (w__173 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.srai.hint."
+ ((string_append w__173 "")))))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\
+ (((fm <> (0x8w : 4 words$word))))))) \/
+ ((((((rs <> (0b00000w : 5 words$word)))) \/
+ (((rd <> (0b00000w : 5 words$word)))))))))) then
+ sail2_state_monad$bindS (fence_bits_forwards pred)
+ (\ (w__174 : string) . sail2_state_monad$bindS
+ (fence_bits_forwards succ)
+ (\ (w__175 : string) . sail2_state_monad$bindS
+ (reg_name_forwards
+ rs)
+ (\ (w__176 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rd)
+ (\ (w__177 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ "fence.reserved."
+ (
+ (
+ string_append
+ w__174
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__175
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__176
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__177
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ (
+ (
+ decimal_string_of_bits
+ fm))
+ ""))))))))))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/
+ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__180 : string) . sail2_state_monad$bindS (reg_name_forwards rs)
+ (\ (w__181 : string) .
+ sail2_state_monad$returnS
+ ((string_append "fence.i.reserved."
+ ((string_append w__180
+ ((string_append "."
+ ((string_append w__181
+ ((string_append "."
+ ((string_append
+ ((decimal_string_of_bits
+ imm))
+ ""))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | LOAD_FP ((imm, rs1, rd, width)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__184 : string) . sail2_state_monad$bindS
+ (
+ reg_name_forwards
+ rs1)
+ (
+ \ (w__185 : string) .
+ sail2_state_monad$returnS
+ (
+ (
+ string_append
+ "fl"
+ (
+ (
+ string_append
+ (
+ (
+ size_mnemonic_forwards
+ width))
(
(
string_append
@@ -24030,7 +30453,7 @@ val _ = Define `
(
(
string_append
- w__155
+ w__184
(
(
string_append
@@ -24044,7 +30467,57 @@ val _ = Define `
(
(
decimal_string_of_bits
- rs1))
+ imm))
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ "("
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__185
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ ")"
+ ""))))))))))))))))))))))))))
+ | STORE_FP ((imm, rs2, rs1, width)) => sail2_state_monad$bindS
+ (freg_name_forwards rs2)
+ (\ (w__186 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards rs1)
+ (\ (w__187 : string) .
+ sail2_state_monad$returnS
+ ((string_append "fs"
+ ((string_append
+ ((size_mnemonic_forwards
+ width))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__186
(
(
string_append
@@ -24055,27 +30528,67 @@ val _ = Define `
(
(
string_append
- w__156
- ""))))))))))))))))))
- | CSR ((csr, rs1, rd, F, op)) => sail2_state_monad$bindS
- (reg_name_forwards rd)
- (\ (w__157 : string) . sail2_state_monad$bindS
- (reg_name_forwards
- rs1)
- (\ (w__158 : string) .
- sail2_state_monad$bindS
(
- csr_name_map_forwards
- csr)
(
- \ (w__159 : string) .
- sail2_state_monad$returnS
+ decimal_string_of_bits
+ imm))
(
(
string_append
(
(
- csr_mnemonic_forwards
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ "("
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__187
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ ")"
+ ""))))))))))))))))))))))))))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards
+ rd)
+ (\ (w__188 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__189 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__190 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs3)
+ (\ (w__191 : string) .
+ sail2_state_monad$returnS
+ (
+ (
+ string_append
+ (
+ (
+ f_madd_type_mnemonic_S_forwards
op))
(
(
@@ -24087,7 +30600,40 @@ val _ = Define `
(
(
string_append
- w__157
+ w__188
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__189
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__190
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__191
(
(
string_append
@@ -24098,7 +30644,35 @@ val _ = Define `
(
(
string_append
- w__158
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))))))))))))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__192 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__193 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__194 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_rm_type_mnemonic_S_forwards
+ op))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__192
(
(
string_append
@@ -24109,9 +30683,948 @@ val _ = Define `
(
(
string_append
- w__159
+ w__193
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__194
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ "")))))))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__195 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__196 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FSQRT_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__195
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__196
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__197 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__198 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_W_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__197
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__198
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__199 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__200 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_WU_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__199
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__200
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__201 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__202 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_W))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__201
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__202
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__203 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__204 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_WU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__203
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__204
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__205 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__206 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_L_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__205
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__206
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__207 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__208 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_LU_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__207
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__208
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__209 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__210 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_L))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__209
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__210
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__211 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__212 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_LU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__211
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__212
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__213 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__214 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__215 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJ_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__213
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__214
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__215
"")))))))))))))))))
- | URET (() ) => sail2_state_monad$returnS "uret"
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__216 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__217 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__218 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJN_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__216
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__217
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__218
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__219 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__220 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__221 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJX_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__219
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__220
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__221
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__222 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__223 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__224 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FMIN_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__222
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__223
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__224
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__225 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__226 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__227 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FMAX_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__225
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__226
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__227
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__228 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__229 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__230 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FEQ_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__228
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__229
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__230
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__231 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__232 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__233 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FLT_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__231
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__232
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__233
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__234 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__235 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__236 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FLE_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__234
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__235
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__236
+ "")))))))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__237 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__238 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FMV_X_W))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__237
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__238
+ ""))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__239 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards rs1)
+ (\ (w__240 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FMV_W_X))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__239
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__240
+ ""))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__241 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__242 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FCLASS_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__241
+ ((string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__242
+ ""))))))))))))
+ | C_FLWSP ((imm, rd)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__243 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.flwsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__243
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits imm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSWSP ((uimm, rd)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__246 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fswsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__246
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits uimm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FLW ((uimm, rsc, rdc)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (creg_name_forwards rdc)
+ (\ (w__249 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc)
+ (\ (w__250 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.flw"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__249
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__250
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b00w : 2 words$word) : 7 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (creg_name_forwards rsc1)
+ (\ (w__253 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc2)
+ (\ (w__254 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fsw"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__253
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__254
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b00w : 2 words$word) : 7 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
| ILLEGAL (s) =>
sail2_state_monad$returnS
((string_append "illegal"
@@ -24125,24 +31638,22 @@ val _ = Define `
)))`;
-(*val assembly_backwards : string -> M ast*)
-
-(*val _s1677_ : string -> maybe (mword ty16)*)
+(*val _s2645_ : string -> maybe (mword ty16)*)
val _ = Define `
- ((s1677_:string ->((16)words$word)option) s1678_0=
- (let s1679_0 = s1678_0 in
- if ((string_startswith s1679_0 "c.illegal")) then
- (case ((string_drop s1679_0 ((string_length "c.illegal")))) of
- s1680_0 =>
- (case ((spc_matches_prefix0 s1680_0)) of
- SOME ((() , s1681_0)) =>
- (case ((string_drop s1680_0 s1681_0)) of
- s1682_0 =>
+ ((s2645_:string ->((16)words$word)option) s2646_0=
+ (let s2647_0 = s2646_0 in
+ if ((string_startswith s2647_0 "c.illegal")) then
+ (case ((string_drop s2647_0 ((string_length "c.illegal")))) of
+ s2648_0 =>
+ (case ((spc_matches_prefix0 s2648_0)) of
+ SOME ((() , s2649_0)) =>
+ (case ((string_drop s2648_0 s2649_0)) of
+ s2650_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1682_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s1683_0)) =>
- let p0_ = (string_drop s1682_0 s1683_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2650_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s2651_0)) =>
+ let p0_ = (string_drop s2650_0 s2651_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -24153,22 +31664,22 @@ val _ = Define `
else NONE))`;
-(*val _s1669_ : string -> maybe (mword ty32)*)
+(*val _s2637_ : string -> maybe (mword ty32)*)
val _ = Define `
- ((s1669_:string ->((32)words$word)option) s1670_0=
- (let s1671_0 = s1670_0 in
- if ((string_startswith s1671_0 "illegal")) then
- (case ((string_drop s1671_0 ((string_length "illegal")))) of
- s1672_0 =>
- (case ((spc_matches_prefix0 s1672_0)) of
- SOME ((() , s1673_0)) =>
- (case ((string_drop s1672_0 s1673_0)) of
- s1674_0 =>
+ ((s2637_:string ->((32)words$word)option) s2638_0=
+ (let s2639_0 = s2638_0 in
+ if ((string_startswith s2639_0 "illegal")) then
+ (case ((string_drop s2639_0 ((string_length "illegal")))) of
+ s2640_0 =>
+ (case ((spc_matches_prefix0 s2640_0)) of
+ SOME ((() , s2641_0)) =>
+ (case ((string_drop s2640_0 s2641_0)) of
+ s2642_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1674_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s1675_0)) =>
- let p0_ = (string_drop s1674_0 s1675_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2642_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s2643_0)) =>
+ let p0_ = (string_drop s2642_0 s2643_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -24179,41 +31690,1439 @@ val _ = Define `
else NONE))`;
-(*val _s1652_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s2621_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1652_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s1653_0=
- ((case s1653_0 of
- s1654_0 =>
- (case ((csr_mnemonic_matches_prefix s1654_0)) of
- SOME ((op, s1655_0)) =>
- (case ((string_drop s1654_0 s1655_0)) of
- s1656_0 =>
- (case ((spc_matches_prefix0 s1656_0)) of
- SOME ((() , s1657_0)) =>
- (case ((string_drop s1656_0 s1657_0)) of
- s1658_0 =>
- (case ((reg_name_matches_prefix s1658_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1659_0)) =>
- (case ((string_drop s1658_0 s1659_0)) of
- s1660_0 =>
- (case ((sep_matches_prefix s1660_0)) of
- SOME ((() , s1661_0)) =>
- (case ((string_drop s1660_0 s1661_0)) of
- s1662_0 =>
- (case ((reg_name_matches_prefix s1662_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1663_0)) =>
- (case ((string_drop s1662_0 s1663_0)) of
- s1664_0 =>
- (case ((sep_matches_prefix s1664_0)) of
- SOME ((() , s1665_0)) =>
- (case ((string_drop s1664_0 s1665_0)) of
- s1666_0 =>
- (case ((csr_name_map_matches_prefix s1666_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s1667_0)) =>
- let p0_ = (string_drop s1666_0 s1667_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ ((s2621_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2622_0=
+ (let s2623_0 = s2622_0 in
+ if ((string_startswith s2623_0 "c.fsw")) then
+ (case ((string_drop s2623_0 ((string_length "c.fsw")))) of
+ s2624_0 =>
+ (case ((spc_matches_prefix0 s2624_0)) of
+ SOME ((() , s2625_0)) =>
+ (case ((string_drop s2624_0 s2625_0)) of
+ s2626_0 =>
+ (case ((creg_name_matches_prefix s2626_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s2627_0)) =>
+ (case ((string_drop s2626_0 s2627_0)) of
+ s2628_0 =>
+ (case ((sep_matches_prefix s2628_0)) of
+ SOME ((() , s2629_0)) =>
+ (case ((string_drop s2628_0 s2629_0)) of
+ s2630_0 =>
+ (case ((creg_name_matches_prefix s2630_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s2631_0)) =>
+ (case ((string_drop s2630_0 s2631_0)) of
+ s2632_0 =>
+ (case ((sep_matches_prefix s2632_0)) of
+ SOME ((() , s2633_0)) =>
+ (case ((string_drop s2632_0 s2633_0)) of
+ s2634_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2634_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1180, s2635_0)) =>
+ if (((((subrange_vec_dec v__1180 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1180 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1180 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s2634_0 s2635_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2605_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s2605_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2606_0=
+ (let s2607_0 = s2606_0 in
+ if ((string_startswith s2607_0 "c.flw")) then
+ (case ((string_drop s2607_0 ((string_length "c.flw")))) of
+ s2608_0 =>
+ (case ((spc_matches_prefix0 s2608_0)) of
+ SOME ((() , s2609_0)) =>
+ (case ((string_drop s2608_0 s2609_0)) of
+ s2610_0 =>
+ (case ((creg_name_matches_prefix s2610_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s2611_0)) =>
+ (case ((string_drop s2610_0 s2611_0)) of
+ s2612_0 =>
+ (case ((sep_matches_prefix s2612_0)) of
+ SOME ((() , s2613_0)) =>
+ (case ((string_drop s2612_0 s2613_0)) of
+ s2614_0 =>
+ (case ((creg_name_matches_prefix s2614_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s2615_0)) =>
+ (case ((string_drop s2614_0 s2615_0)) of
+ s2616_0 =>
+ (case ((sep_matches_prefix s2616_0)) of
+ SOME ((() , s2617_0)) =>
+ (case ((string_drop s2616_0 s2617_0)) of
+ s2618_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2618_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1182, s2619_0)) =>
+ if (((((subrange_vec_dec v__1182 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1182 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1182 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s2618_0 s2619_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2593_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2593_:string ->((5)words$word#(6)words$word)option) s2594_0=
+ (let s2595_0 = s2594_0 in
+ if ((string_startswith s2595_0 "c.fswsp")) then
+ (case ((string_drop s2595_0 ((string_length "c.fswsp")))) of
+ s2596_0 =>
+ (case ((spc_matches_prefix0 s2596_0)) of
+ SOME ((() , s2597_0)) =>
+ (case ((string_drop s2596_0 s2597_0)) of
+ s2598_0 =>
+ (case ((reg_name_matches_prefix s2598_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2599_0)) =>
+ (case ((string_drop s2598_0 s2599_0)) of
+ s2600_0 =>
+ (case ((sep_matches_prefix s2600_0)) of
+ SOME ((() , s2601_0)) =>
+ (case ((string_drop s2600_0 s2601_0)) of
+ s2602_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2602_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s2603_0)) =>
+ let p0_ = (string_drop s2602_0 s2603_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2581_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2581_:string ->((5)words$word#(6)words$word)option) s2582_0=
+ (let s2583_0 = s2582_0 in
+ if ((string_startswith s2583_0 "c.flwsp")) then
+ (case ((string_drop s2583_0 ((string_length "c.flwsp")))) of
+ s2584_0 =>
+ (case ((spc_matches_prefix0 s2584_0)) of
+ SOME ((() , s2585_0)) =>
+ (case ((string_drop s2584_0 s2585_0)) of
+ s2586_0 =>
+ (case ((reg_name_matches_prefix s2586_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2587_0)) =>
+ (case ((string_drop s2586_0 s2587_0)) of
+ s2588_0 =>
+ (case ((sep_matches_prefix s2588_0)) of
+ SOME ((() , s2589_0)) =>
+ (case ((string_drop s2588_0 s2589_0)) of
+ s2590_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2590_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2591_0)) =>
+ let p0_ = (string_drop s2590_0 s2591_0) in
+ if (((p0_ = ""))) then SOME (rd, imm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2568_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2568_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2569_0=
+ ((case s2569_0 of
+ s2570_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2570_0)) of
+ SOME ((FCLASS_S, s2571_0)) =>
+ (case ((string_drop s2570_0 s2571_0)) of
+ s2572_0 =>
+ (case ((spc_matches_prefix0 s2572_0)) of
+ SOME ((() , s2573_0)) =>
+ (case ((string_drop s2572_0 s2573_0)) of
+ s2574_0 =>
+ (case ((reg_name_matches_prefix s2574_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2575_0)) =>
+ (case ((string_drop s2574_0 s2575_0)) of
+ s2576_0 =>
+ (case ((sep_matches_prefix s2576_0)) of
+ SOME ((() , s2577_0)) =>
+ (case ((string_drop s2576_0 s2577_0)) of
+ s2578_0 =>
+ (case ((freg_name_matches_prefix s2578_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2579_0)) =>
+ let p0_ = (string_drop s2578_0 s2579_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_S, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2555_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2555_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2556_0=
+ ((case s2556_0 of
+ s2557_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2557_0)) of
+ SOME ((FMV_W_X, s2558_0)) =>
+ (case ((string_drop s2557_0 s2558_0)) of
+ s2559_0 =>
+ (case ((spc_matches_prefix0 s2559_0)) of
+ SOME ((() , s2560_0)) =>
+ (case ((string_drop s2559_0 s2560_0)) of
+ s2561_0 =>
+ (case ((freg_name_matches_prefix s2561_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2562_0)) =>
+ (case ((string_drop s2561_0 s2562_0)) of
+ s2563_0 =>
+ (case ((sep_matches_prefix s2563_0)) of
+ SOME ((() , s2564_0)) =>
+ (case ((string_drop s2563_0 s2564_0)) of
+ s2565_0 =>
+ (case ((reg_name_matches_prefix s2565_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2566_0)) =>
+ let p0_ = (string_drop s2565_0 s2566_0) in
+ if (((p0_ = ""))) then SOME (FMV_W_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2542_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2542_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2543_0=
+ ((case s2543_0 of
+ s2544_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2544_0)) of
+ SOME ((FMV_X_W, s2545_0)) =>
+ (case ((string_drop s2544_0 s2545_0)) of
+ s2546_0 =>
+ (case ((spc_matches_prefix0 s2546_0)) of
+ SOME ((() , s2547_0)) =>
+ (case ((string_drop s2546_0 s2547_0)) of
+ s2548_0 =>
+ (case ((reg_name_matches_prefix s2548_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2549_0)) =>
+ (case ((string_drop s2548_0 s2549_0)) of
+ s2550_0 =>
+ (case ((sep_matches_prefix s2550_0)) of
+ SOME ((() , s2551_0)) =>
+ (case ((string_drop s2550_0 s2551_0)) of
+ s2552_0 =>
+ (case ((freg_name_matches_prefix s2552_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2553_0)) =>
+ let p0_ = (string_drop s2552_0 s2553_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_W, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2525_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2525_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2526_0=
+ ((case s2526_0 of
+ s2527_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2527_0)) of
+ SOME ((FLE_S, s2528_0)) =>
+ (case ((string_drop s2527_0 s2528_0)) of
+ s2529_0 =>
+ (case ((spc_matches_prefix0 s2529_0)) of
+ SOME ((() , s2530_0)) =>
+ (case ((string_drop s2529_0 s2530_0)) of
+ s2531_0 =>
+ (case ((reg_name_matches_prefix s2531_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2532_0)) =>
+ (case ((string_drop s2531_0 s2532_0)) of
+ s2533_0 =>
+ (case ((sep_matches_prefix s2533_0)) of
+ SOME ((() , s2534_0)) =>
+ (case ((string_drop s2533_0 s2534_0)) of
+ s2535_0 =>
+ (case ((freg_name_matches_prefix s2535_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2536_0)) =>
+ (case ((string_drop s2535_0 s2536_0)) of
+ s2537_0 =>
+ (case ((sep_matches_prefix s2537_0)) of
+ SOME ((() , s2538_0)) =>
+ (case ((string_drop s2537_0 s2538_0)) of
+ s2539_0 =>
+ (case ((freg_name_matches_prefix s2539_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2540_0)) =>
+ let p0_ = (string_drop s2539_0 s2540_0) in
+ if (((p0_ = ""))) then SOME (FLE_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2508_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2508_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2509_0=
+ ((case s2509_0 of
+ s2510_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2510_0)) of
+ SOME ((FLT_S, s2511_0)) =>
+ (case ((string_drop s2510_0 s2511_0)) of
+ s2512_0 =>
+ (case ((spc_matches_prefix0 s2512_0)) of
+ SOME ((() , s2513_0)) =>
+ (case ((string_drop s2512_0 s2513_0)) of
+ s2514_0 =>
+ (case ((reg_name_matches_prefix s2514_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2515_0)) =>
+ (case ((string_drop s2514_0 s2515_0)) of
+ s2516_0 =>
+ (case ((sep_matches_prefix s2516_0)) of
+ SOME ((() , s2517_0)) =>
+ (case ((string_drop s2516_0 s2517_0)) of
+ s2518_0 =>
+ (case ((freg_name_matches_prefix s2518_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2519_0)) =>
+ (case ((string_drop s2518_0 s2519_0)) of
+ s2520_0 =>
+ (case ((sep_matches_prefix s2520_0)) of
+ SOME ((() , s2521_0)) =>
+ (case ((string_drop s2520_0 s2521_0)) of
+ s2522_0 =>
+ (case ((freg_name_matches_prefix s2522_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2523_0)) =>
+ let p0_ = (string_drop s2522_0 s2523_0) in
+ if (((p0_ = ""))) then SOME (FLT_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2491_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2491_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2492_0=
+ ((case s2492_0 of
+ s2493_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2493_0)) of
+ SOME ((FEQ_S, s2494_0)) =>
+ (case ((string_drop s2493_0 s2494_0)) of
+ s2495_0 =>
+ (case ((spc_matches_prefix0 s2495_0)) of
+ SOME ((() , s2496_0)) =>
+ (case ((string_drop s2495_0 s2496_0)) of
+ s2497_0 =>
+ (case ((reg_name_matches_prefix s2497_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2498_0)) =>
+ (case ((string_drop s2497_0 s2498_0)) of
+ s2499_0 =>
+ (case ((sep_matches_prefix s2499_0)) of
+ SOME ((() , s2500_0)) =>
+ (case ((string_drop s2499_0 s2500_0)) of
+ s2501_0 =>
+ (case ((freg_name_matches_prefix s2501_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2502_0)) =>
+ (case ((string_drop s2501_0 s2502_0)) of
+ s2503_0 =>
+ (case ((sep_matches_prefix s2503_0)) of
+ SOME ((() , s2504_0)) =>
+ (case ((string_drop s2503_0 s2504_0)) of
+ s2505_0 =>
+ (case ((freg_name_matches_prefix s2505_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2506_0)) =>
+ let p0_ = (string_drop s2505_0 s2506_0) in
+ if (((p0_ = ""))) then SOME (FEQ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2474_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2474_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2475_0=
+ ((case s2475_0 of
+ s2476_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2476_0)) of
+ SOME ((FMAX_S, s2477_0)) =>
+ (case ((string_drop s2476_0 s2477_0)) of
+ s2478_0 =>
+ (case ((spc_matches_prefix0 s2478_0)) of
+ SOME ((() , s2479_0)) =>
+ (case ((string_drop s2478_0 s2479_0)) of
+ s2480_0 =>
+ (case ((freg_name_matches_prefix s2480_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2481_0)) =>
+ (case ((string_drop s2480_0 s2481_0)) of
+ s2482_0 =>
+ (case ((sep_matches_prefix s2482_0)) of
+ SOME ((() , s2483_0)) =>
+ (case ((string_drop s2482_0 s2483_0)) of
+ s2484_0 =>
+ (case ((freg_name_matches_prefix s2484_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2485_0)) =>
+ (case ((string_drop s2484_0 s2485_0)) of
+ s2486_0 =>
+ (case ((sep_matches_prefix s2486_0)) of
+ SOME ((() , s2487_0)) =>
+ (case ((string_drop s2486_0 s2487_0)) of
+ s2488_0 =>
+ (case ((freg_name_matches_prefix s2488_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2489_0)) =>
+ let p0_ = (string_drop s2488_0 s2489_0) in
+ if (((p0_ = ""))) then SOME (FMAX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2457_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2457_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2458_0=
+ ((case s2458_0 of
+ s2459_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2459_0)) of
+ SOME ((FMIN_S, s2460_0)) =>
+ (case ((string_drop s2459_0 s2460_0)) of
+ s2461_0 =>
+ (case ((spc_matches_prefix0 s2461_0)) of
+ SOME ((() , s2462_0)) =>
+ (case ((string_drop s2461_0 s2462_0)) of
+ s2463_0 =>
+ (case ((freg_name_matches_prefix s2463_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2464_0)) =>
+ (case ((string_drop s2463_0 s2464_0)) of
+ s2465_0 =>
+ (case ((sep_matches_prefix s2465_0)) of
+ SOME ((() , s2466_0)) =>
+ (case ((string_drop s2465_0 s2466_0)) of
+ s2467_0 =>
+ (case ((freg_name_matches_prefix s2467_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2468_0)) =>
+ (case ((string_drop s2467_0 s2468_0)) of
+ s2469_0 =>
+ (case ((sep_matches_prefix s2469_0)) of
+ SOME ((() , s2470_0)) =>
+ (case ((string_drop s2469_0 s2470_0)) of
+ s2471_0 =>
+ (case ((freg_name_matches_prefix s2471_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2472_0)) =>
+ let p0_ = (string_drop s2471_0 s2472_0) in
+ if (((p0_ = ""))) then SOME (FMIN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2440_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2440_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2441_0=
+ ((case s2441_0 of
+ s2442_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2442_0)) of
+ SOME ((FSGNJX_S, s2443_0)) =>
+ (case ((string_drop s2442_0 s2443_0)) of
+ s2444_0 =>
+ (case ((spc_matches_prefix0 s2444_0)) of
+ SOME ((() , s2445_0)) =>
+ (case ((string_drop s2444_0 s2445_0)) of
+ s2446_0 =>
+ (case ((freg_name_matches_prefix s2446_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2447_0)) =>
+ (case ((string_drop s2446_0 s2447_0)) of
+ s2448_0 =>
+ (case ((sep_matches_prefix s2448_0)) of
+ SOME ((() , s2449_0)) =>
+ (case ((string_drop s2448_0 s2449_0)) of
+ s2450_0 =>
+ (case ((freg_name_matches_prefix s2450_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2451_0)) =>
+ (case ((string_drop s2450_0 s2451_0)) of
+ s2452_0 =>
+ (case ((sep_matches_prefix s2452_0)) of
+ SOME ((() , s2453_0)) =>
+ (case ((string_drop s2452_0 s2453_0)) of
+ s2454_0 =>
+ (case ((freg_name_matches_prefix s2454_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2455_0)) =>
+ let p0_ = (string_drop s2454_0 s2455_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2423_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2423_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2424_0=
+ ((case s2424_0 of
+ s2425_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2425_0)) of
+ SOME ((FSGNJN_S, s2426_0)) =>
+ (case ((string_drop s2425_0 s2426_0)) of
+ s2427_0 =>
+ (case ((spc_matches_prefix0 s2427_0)) of
+ SOME ((() , s2428_0)) =>
+ (case ((string_drop s2427_0 s2428_0)) of
+ s2429_0 =>
+ (case ((freg_name_matches_prefix s2429_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2430_0)) =>
+ (case ((string_drop s2429_0 s2430_0)) of
+ s2431_0 =>
+ (case ((sep_matches_prefix s2431_0)) of
+ SOME ((() , s2432_0)) =>
+ (case ((string_drop s2431_0 s2432_0)) of
+ s2433_0 =>
+ (case ((freg_name_matches_prefix s2433_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2434_0)) =>
+ (case ((string_drop s2433_0 s2434_0)) of
+ s2435_0 =>
+ (case ((sep_matches_prefix s2435_0)) of
+ SOME ((() , s2436_0)) =>
+ (case ((string_drop s2435_0 s2436_0)) of
+ s2437_0 =>
+ (case ((freg_name_matches_prefix s2437_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2438_0)) =>
+ let p0_ = (string_drop s2437_0 s2438_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2406_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2406_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2407_0=
+ ((case s2407_0 of
+ s2408_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2408_0)) of
+ SOME ((FSGNJ_S, s2409_0)) =>
+ (case ((string_drop s2408_0 s2409_0)) of
+ s2410_0 =>
+ (case ((spc_matches_prefix0 s2410_0)) of
+ SOME ((() , s2411_0)) =>
+ (case ((string_drop s2410_0 s2411_0)) of
+ s2412_0 =>
+ (case ((freg_name_matches_prefix s2412_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2413_0)) =>
+ (case ((string_drop s2412_0 s2413_0)) of
+ s2414_0 =>
+ (case ((sep_matches_prefix s2414_0)) of
+ SOME ((() , s2415_0)) =>
+ (case ((string_drop s2414_0 s2415_0)) of
+ s2416_0 =>
+ (case ((freg_name_matches_prefix s2416_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2417_0)) =>
+ (case ((string_drop s2416_0 s2417_0)) of
+ s2418_0 =>
+ (case ((sep_matches_prefix s2418_0)) of
+ SOME ((() , s2419_0)) =>
+ (case ((string_drop s2418_0 s2419_0)) of
+ s2420_0 =>
+ (case ((freg_name_matches_prefix s2420_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2421_0)) =>
+ let p0_ = (string_drop s2420_0 s2421_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2389_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2389_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2390_0=
+ ((case s2390_0 of
+ s2391_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2391_0)) of
+ SOME ((FCVT_S_LU, s2392_0)) =>
+ (case ((string_drop s2391_0 s2392_0)) of
+ s2393_0 =>
+ (case ((spc_matches_prefix0 s2393_0)) of
+ SOME ((() , s2394_0)) =>
+ (case ((string_drop s2393_0 s2394_0)) of
+ s2395_0 =>
+ (case ((freg_name_matches_prefix s2395_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2396_0)) =>
+ (case ((string_drop s2395_0 s2396_0)) of
+ s2397_0 =>
+ (case ((sep_matches_prefix s2397_0)) of
+ SOME ((() , s2398_0)) =>
+ (case ((string_drop s2397_0 s2398_0)) of
+ s2399_0 =>
+ (case ((reg_name_matches_prefix s2399_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2400_0)) =>
+ (case ((string_drop s2399_0 s2400_0)) of
+ s2401_0 =>
+ (case ((sep_matches_prefix s2401_0)) of
+ SOME ((() , s2402_0)) =>
+ (case ((string_drop s2401_0 s2402_0)) of
+ s2403_0 =>
+ (case ((frm_mnemonic_matches_prefix s2403_0)) of
+ SOME ((rm, s2404_0)) =>
+ let p0_ = (string_drop s2403_0 s2404_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2372_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2372_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2373_0=
+ ((case s2373_0 of
+ s2374_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2374_0)) of
+ SOME ((FCVT_S_L, s2375_0)) =>
+ (case ((string_drop s2374_0 s2375_0)) of
+ s2376_0 =>
+ (case ((spc_matches_prefix0 s2376_0)) of
+ SOME ((() , s2377_0)) =>
+ (case ((string_drop s2376_0 s2377_0)) of
+ s2378_0 =>
+ (case ((freg_name_matches_prefix s2378_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2379_0)) =>
+ (case ((string_drop s2378_0 s2379_0)) of
+ s2380_0 =>
+ (case ((sep_matches_prefix s2380_0)) of
+ SOME ((() , s2381_0)) =>
+ (case ((string_drop s2380_0 s2381_0)) of
+ s2382_0 =>
+ (case ((reg_name_matches_prefix s2382_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2383_0)) =>
+ (case ((string_drop s2382_0 s2383_0)) of
+ s2384_0 =>
+ (case ((sep_matches_prefix s2384_0)) of
+ SOME ((() , s2385_0)) =>
+ (case ((string_drop s2384_0 s2385_0)) of
+ s2386_0 =>
+ (case ((frm_mnemonic_matches_prefix s2386_0)) of
+ SOME ((rm, s2387_0)) =>
+ let p0_ = (string_drop s2386_0 s2387_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2355_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2355_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2356_0=
+ ((case s2356_0 of
+ s2357_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2357_0)) of
+ SOME ((FCVT_LU_S, s2358_0)) =>
+ (case ((string_drop s2357_0 s2358_0)) of
+ s2359_0 =>
+ (case ((spc_matches_prefix0 s2359_0)) of
+ SOME ((() , s2360_0)) =>
+ (case ((string_drop s2359_0 s2360_0)) of
+ s2361_0 =>
+ (case ((reg_name_matches_prefix s2361_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2362_0)) =>
+ (case ((string_drop s2361_0 s2362_0)) of
+ s2363_0 =>
+ (case ((sep_matches_prefix s2363_0)) of
+ SOME ((() , s2364_0)) =>
+ (case ((string_drop s2363_0 s2364_0)) of
+ s2365_0 =>
+ (case ((freg_name_matches_prefix s2365_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2366_0)) =>
+ (case ((string_drop s2365_0 s2366_0)) of
+ s2367_0 =>
+ (case ((sep_matches_prefix s2367_0)) of
+ SOME ((() , s2368_0)) =>
+ (case ((string_drop s2367_0 s2368_0)) of
+ s2369_0 =>
+ (case ((frm_mnemonic_matches_prefix s2369_0)) of
+ SOME ((rm, s2370_0)) =>
+ let p0_ = (string_drop s2369_0 s2370_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2338_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2338_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2339_0=
+ ((case s2339_0 of
+ s2340_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2340_0)) of
+ SOME ((FCVT_L_S, s2341_0)) =>
+ (case ((string_drop s2340_0 s2341_0)) of
+ s2342_0 =>
+ (case ((spc_matches_prefix0 s2342_0)) of
+ SOME ((() , s2343_0)) =>
+ (case ((string_drop s2342_0 s2343_0)) of
+ s2344_0 =>
+ (case ((reg_name_matches_prefix s2344_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2345_0)) =>
+ (case ((string_drop s2344_0 s2345_0)) of
+ s2346_0 =>
+ (case ((sep_matches_prefix s2346_0)) of
+ SOME ((() , s2347_0)) =>
+ (case ((string_drop s2346_0 s2347_0)) of
+ s2348_0 =>
+ (case ((freg_name_matches_prefix s2348_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2349_0)) =>
+ (case ((string_drop s2348_0 s2349_0)) of
+ s2350_0 =>
+ (case ((sep_matches_prefix s2350_0)) of
+ SOME ((() , s2351_0)) =>
+ (case ((string_drop s2350_0 s2351_0)) of
+ s2352_0 =>
+ (case ((frm_mnemonic_matches_prefix s2352_0)) of
+ SOME ((rm, s2353_0)) =>
+ let p0_ = (string_drop s2352_0 s2353_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2321_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2321_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2322_0=
+ ((case s2322_0 of
+ s2323_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2323_0)) of
+ SOME ((FCVT_S_WU, s2324_0)) =>
+ (case ((string_drop s2323_0 s2324_0)) of
+ s2325_0 =>
+ (case ((spc_matches_prefix0 s2325_0)) of
+ SOME ((() , s2326_0)) =>
+ (case ((string_drop s2325_0 s2326_0)) of
+ s2327_0 =>
+ (case ((freg_name_matches_prefix s2327_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2328_0)) =>
+ (case ((string_drop s2327_0 s2328_0)) of
+ s2329_0 =>
+ (case ((sep_matches_prefix s2329_0)) of
+ SOME ((() , s2330_0)) =>
+ (case ((string_drop s2329_0 s2330_0)) of
+ s2331_0 =>
+ (case ((reg_name_matches_prefix s2331_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2332_0)) =>
+ (case ((string_drop s2331_0 s2332_0)) of
+ s2333_0 =>
+ (case ((sep_matches_prefix s2333_0)) of
+ SOME ((() , s2334_0)) =>
+ (case ((string_drop s2333_0 s2334_0)) of
+ s2335_0 =>
+ (case ((frm_mnemonic_matches_prefix s2335_0)) of
+ SOME ((rm, s2336_0)) =>
+ let p0_ = (string_drop s2335_0 s2336_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2304_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2304_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2305_0=
+ ((case s2305_0 of
+ s2306_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2306_0)) of
+ SOME ((FCVT_S_W, s2307_0)) =>
+ (case ((string_drop s2306_0 s2307_0)) of
+ s2308_0 =>
+ (case ((spc_matches_prefix0 s2308_0)) of
+ SOME ((() , s2309_0)) =>
+ (case ((string_drop s2308_0 s2309_0)) of
+ s2310_0 =>
+ (case ((freg_name_matches_prefix s2310_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2311_0)) =>
+ (case ((string_drop s2310_0 s2311_0)) of
+ s2312_0 =>
+ (case ((sep_matches_prefix s2312_0)) of
+ SOME ((() , s2313_0)) =>
+ (case ((string_drop s2312_0 s2313_0)) of
+ s2314_0 =>
+ (case ((reg_name_matches_prefix s2314_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2315_0)) =>
+ (case ((string_drop s2314_0 s2315_0)) of
+ s2316_0 =>
+ (case ((sep_matches_prefix s2316_0)) of
+ SOME ((() , s2317_0)) =>
+ (case ((string_drop s2316_0 s2317_0)) of
+ s2318_0 =>
+ (case ((frm_mnemonic_matches_prefix s2318_0)) of
+ SOME ((rm, s2319_0)) =>
+ let p0_ = (string_drop s2318_0 s2319_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2287_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2287_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2288_0=
+ ((case s2288_0 of
+ s2289_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2289_0)) of
+ SOME ((FCVT_WU_S, s2290_0)) =>
+ (case ((string_drop s2289_0 s2290_0)) of
+ s2291_0 =>
+ (case ((spc_matches_prefix0 s2291_0)) of
+ SOME ((() , s2292_0)) =>
+ (case ((string_drop s2291_0 s2292_0)) of
+ s2293_0 =>
+ (case ((reg_name_matches_prefix s2293_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2294_0)) =>
+ (case ((string_drop s2293_0 s2294_0)) of
+ s2295_0 =>
+ (case ((sep_matches_prefix s2295_0)) of
+ SOME ((() , s2296_0)) =>
+ (case ((string_drop s2295_0 s2296_0)) of
+ s2297_0 =>
+ (case ((freg_name_matches_prefix s2297_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2298_0)) =>
+ (case ((string_drop s2297_0 s2298_0)) of
+ s2299_0 =>
+ (case ((sep_matches_prefix s2299_0)) of
+ SOME ((() , s2300_0)) =>
+ (case ((string_drop s2299_0 s2300_0)) of
+ s2301_0 =>
+ (case ((frm_mnemonic_matches_prefix s2301_0)) of
+ SOME ((rm, s2302_0)) =>
+ let p0_ = (string_drop s2301_0 s2302_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2270_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2270_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2271_0=
+ ((case s2271_0 of
+ s2272_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2272_0)) of
+ SOME ((FCVT_W_S, s2273_0)) =>
+ (case ((string_drop s2272_0 s2273_0)) of
+ s2274_0 =>
+ (case ((spc_matches_prefix0 s2274_0)) of
+ SOME ((() , s2275_0)) =>
+ (case ((string_drop s2274_0 s2275_0)) of
+ s2276_0 =>
+ (case ((reg_name_matches_prefix s2276_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2277_0)) =>
+ (case ((string_drop s2276_0 s2277_0)) of
+ s2278_0 =>
+ (case ((sep_matches_prefix s2278_0)) of
+ SOME ((() , s2279_0)) =>
+ (case ((string_drop s2278_0 s2279_0)) of
+ s2280_0 =>
+ (case ((freg_name_matches_prefix s2280_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2281_0)) =>
+ (case ((string_drop s2280_0 s2281_0)) of
+ s2282_0 =>
+ (case ((sep_matches_prefix s2282_0)) of
+ SOME ((() , s2283_0)) =>
+ (case ((string_drop s2282_0 s2283_0)) of
+ s2284_0 =>
+ (case ((frm_mnemonic_matches_prefix s2284_0)) of
+ SOME ((rm, s2285_0)) =>
+ let p0_ = (string_drop s2284_0 s2285_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2253_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2253_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2254_0=
+ ((case s2254_0 of
+ s2255_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2255_0)) of
+ SOME ((FSQRT_S, s2256_0)) =>
+ (case ((string_drop s2255_0 s2256_0)) of
+ s2257_0 =>
+ (case ((spc_matches_prefix0 s2257_0)) of
+ SOME ((() , s2258_0)) =>
+ (case ((string_drop s2257_0 s2258_0)) of
+ s2259_0 =>
+ (case ((freg_name_matches_prefix s2259_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2260_0)) =>
+ (case ((string_drop s2259_0 s2260_0)) of
+ s2261_0 =>
+ (case ((sep_matches_prefix s2261_0)) of
+ SOME ((() , s2262_0)) =>
+ (case ((string_drop s2261_0 s2262_0)) of
+ s2263_0 =>
+ (case ((freg_name_matches_prefix s2263_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2264_0)) =>
+ (case ((string_drop s2263_0 s2264_0)) of
+ s2265_0 =>
+ (case ((sep_matches_prefix s2265_0)) of
+ SOME ((() , s2266_0)) =>
+ (case ((string_drop s2265_0 s2266_0)) of
+ s2267_0 =>
+ (case ((frm_mnemonic_matches_prefix s2267_0)) of
+ SOME ((rm, s2268_0)) =>
+ let p0_ = (string_drop s2267_0 s2268_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2232_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2232_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2233_0=
+ ((case s2233_0 of
+ s2234_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s2234_0)) of
+ SOME ((op, s2235_0)) =>
+ (case ((string_drop s2234_0 s2235_0)) of
+ s2236_0 =>
+ (case ((spc_matches_prefix0 s2236_0)) of
+ SOME ((() , s2237_0)) =>
+ (case ((string_drop s2236_0 s2237_0)) of
+ s2238_0 =>
+ (case ((freg_name_matches_prefix s2238_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2239_0)) =>
+ (case ((string_drop s2238_0 s2239_0)) of
+ s2240_0 =>
+ (case ((sep_matches_prefix s2240_0)) of
+ SOME ((() , s2241_0)) =>
+ (case ((string_drop s2240_0 s2241_0)) of
+ s2242_0 =>
+ (case ((freg_name_matches_prefix s2242_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2243_0)) =>
+ (case ((string_drop s2242_0 s2243_0)) of
+ s2244_0 =>
+ (case ((sep_matches_prefix s2244_0)) of
+ SOME ((() , s2245_0)) =>
+ (case ((string_drop s2244_0 s2245_0)) of
+ s2246_0 =>
+ (case ((freg_name_matches_prefix s2246_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2247_0)) =>
+ (case ((string_drop s2246_0 s2247_0)) of
+ s2248_0 =>
+ (case ((sep_matches_prefix s2248_0)) of
+ SOME ((() , s2249_0)) =>
+ (case ((string_drop s2248_0 s2249_0)) of
+ s2250_0 =>
+ (case ((frm_mnemonic_matches_prefix s2250_0)) of
+ SOME ((rm, s2251_0)) =>
+ let p0_ = (string_drop s2250_0 s2251_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2207_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2207_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2208_0=
+ ((case s2208_0 of
+ s2209_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s2209_0)) of
+ SOME ((op, s2210_0)) =>
+ (case ((string_drop s2209_0 s2210_0)) of
+ s2211_0 =>
+ (case ((spc_matches_prefix0 s2211_0)) of
+ SOME ((() , s2212_0)) =>
+ (case ((string_drop s2211_0 s2212_0)) of
+ s2213_0 =>
+ (case ((freg_name_matches_prefix s2213_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2214_0)) =>
+ (case ((string_drop s2213_0 s2214_0)) of
+ s2215_0 =>
+ (case ((sep_matches_prefix s2215_0)) of
+ SOME ((() , s2216_0)) =>
+ (case ((string_drop s2215_0 s2216_0)) of
+ s2217_0 =>
+ (case ((freg_name_matches_prefix s2217_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2218_0)) =>
+ (case ((string_drop s2217_0 s2218_0)) of
+ s2219_0 =>
+ (case ((sep_matches_prefix s2219_0)) of
+ SOME ((() , s2220_0)) =>
+ (case ((string_drop s2219_0 s2220_0)) of
+ s2221_0 =>
+ (case ((freg_name_matches_prefix s2221_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2222_0)) =>
+ (case ((string_drop s2221_0 s2222_0)) of
+ s2223_0 =>
+ (case ((sep_matches_prefix s2223_0)) of
+ SOME ((() , s2224_0)) =>
+ (case ((string_drop s2223_0 s2224_0)) of
+ s2225_0 =>
+ (case ((freg_name_matches_prefix s2225_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s2226_0)) =>
+ (case ((string_drop s2225_0 s2226_0)) of
+ s2227_0 =>
+ (case ((sep_matches_prefix s2227_0)) of
+ SOME ((() , s2228_0)) =>
+ (case ((string_drop s2227_0 s2228_0)) of
+ s2229_0 =>
+ (case ((frm_mnemonic_matches_prefix s2229_0)) of
+ SOME ((rm, s2230_0)) =>
+ let p0_ = (string_drop s2229_0 s2230_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
| _ => NONE
)
)
@@ -24237,45 +33146,531 @@ val _ = Define `
)))`;
-(*val _s1634_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s2183_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1634_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s1635_0=
- ((case s1635_0 of
- s1636_0 =>
- (case ((csr_mnemonic_matches_prefix s1636_0)) of
- SOME ((op, s1637_0)) =>
- let s1638_0 = (string_drop s1636_0 s1637_0) in
- if ((string_startswith s1638_0 "i")) then
- (case ((string_drop s1638_0 ((string_length "i")))) of
- s1639_0 =>
- (case ((spc_matches_prefix0 s1639_0)) of
- SOME ((() , s1640_0)) =>
- (case ((string_drop s1639_0 s1640_0)) of
- s1641_0 =>
- (case ((reg_name_matches_prefix s1641_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1642_0)) =>
- (case ((string_drop s1641_0 s1642_0)) of
- s1643_0 =>
- (case ((sep_matches_prefix s1643_0)) of
- SOME ((() , s1644_0)) =>
- (case ((string_drop s1643_0 s1644_0)) of
- s1645_0 =>
+ ((s2183_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s2184_0=
+ (let s2185_0 = s2184_0 in
+ if ((string_startswith s2185_0 "fs")) then
+ (case ((string_drop s2185_0 ((string_length "fs")))) of
+ s2186_0 =>
+ (case ((size_mnemonic_matches_prefix s2186_0)) of
+ SOME ((width, s2187_0)) =>
+ (case ((string_drop s2186_0 s2187_0)) of
+ s2188_0 =>
+ (case ((spc_matches_prefix0 s2188_0)) of
+ SOME ((() , s2189_0)) =>
+ (case ((string_drop s2188_0 s2189_0)) of
+ s2190_0 =>
+ (case ((freg_name_matches_prefix s2190_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2191_0)) =>
+ (case ((string_drop s2190_0 s2191_0)) of
+ s2192_0 =>
+ (case ((sep_matches_prefix s2192_0)) of
+ SOME ((() , s2193_0)) =>
+ (case ((string_drop s2192_0 s2193_0)) of
+ s2194_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2194_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2195_0)) =>
+ (case ((string_drop s2194_0 s2195_0)) of
+ s2196_0 =>
+ (case ((opt_spc_matches_prefix0 s2196_0)) of
+ SOME ((() , s2197_0)) =>
+ let s2198_0 = (string_drop s2196_0 s2197_0) in
+ if ((string_startswith s2198_0 "(")) then
+ (case ((string_drop s2198_0 ((string_length "(")))) of
+ s2199_0 =>
+ (case ((opt_spc_matches_prefix0 s2199_0)) of
+ SOME ((() , s2200_0)) =>
+ (case ((string_drop s2199_0 s2200_0)) of
+ s2201_0 =>
+ (case ((reg_name_matches_prefix s2201_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2202_0)) =>
+ (case ((string_drop s2201_0 s2202_0)) of
+ s2203_0 =>
+ (case ((opt_spc_matches_prefix0 s2203_0)) of
+ SOME ((() , s2204_0)) =>
+ let s2205_0 = (string_drop s2203_0 s2204_0) in
+ if ((string_startswith s2205_0 ")")) then
+ let p0_ = (string_drop s2205_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rs2, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2159_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2159_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s2160_0=
+ (let s2161_0 = s2160_0 in
+ if ((string_startswith s2161_0 "fl")) then
+ (case ((string_drop s2161_0 ((string_length "fl")))) of
+ s2162_0 =>
+ (case ((size_mnemonic_matches_prefix s2162_0)) of
+ SOME ((width, s2163_0)) =>
+ (case ((string_drop s2162_0 s2163_0)) of
+ s2164_0 =>
+ (case ((spc_matches_prefix0 s2164_0)) of
+ SOME ((() , s2165_0)) =>
+ (case ((string_drop s2164_0 s2165_0)) of
+ s2166_0 =>
+ (case ((freg_name_matches_prefix s2166_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2167_0)) =>
+ (case ((string_drop s2166_0 s2167_0)) of
+ s2168_0 =>
+ (case ((sep_matches_prefix s2168_0)) of
+ SOME ((() , s2169_0)) =>
+ (case ((string_drop s2168_0 s2169_0)) of
+ s2170_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2170_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2171_0)) =>
+ (case ((string_drop s2170_0 s2171_0)) of
+ s2172_0 =>
+ (case ((opt_spc_matches_prefix0 s2172_0)) of
+ SOME ((() , s2173_0)) =>
+ let s2174_0 = (string_drop s2172_0 s2173_0) in
+ if ((string_startswith s2174_0 "(")) then
+ (case ((string_drop s2174_0 ((string_length "(")))) of
+ s2175_0 =>
+ (case ((opt_spc_matches_prefix0 s2175_0)) of
+ SOME ((() , s2176_0)) =>
+ (case ((string_drop s2175_0 s2176_0)) of
+ s2177_0 =>
+ (case ((reg_name_matches_prefix s2177_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2178_0)) =>
+ (case ((string_drop s2177_0 s2178_0)) of
+ s2179_0 =>
+ (case ((opt_spc_matches_prefix0 s2179_0)) of
+ SOME ((() , s2180_0)) =>
+ let s2181_0 = (string_drop s2179_0 s2180_0) in
+ if ((string_startswith s2181_0 ")")) then
+ let p0_ = (string_drop s2181_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rd, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2147_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s2147_:string ->((5)words$word#(5)words$word#(12)words$word)option) s2148_0=
+ (let s2149_0 = s2148_0 in
+ if ((string_startswith s2149_0 "fence.i.reserved.")) then
+ (case ((string_drop s2149_0 ((string_length "fence.i.reserved.")))) of
+ s2150_0 =>
+ (case ((reg_name_matches_prefix s2150_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2151_0)) =>
+ let s2152_0 = (string_drop s2150_0 s2151_0) in
+ if ((string_startswith s2152_0 ".")) then
+ (case ((string_drop s2152_0 ((string_length ".")))) of
+ s2153_0 =>
+ (case ((reg_name_matches_prefix s2153_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s2154_0)) =>
+ let s2155_0 = (string_drop s2153_0 s2154_0) in
+ if ((string_startswith s2155_0 ".")) then
+ (case ((string_drop s2155_0 ((string_length ".")))) of
+ s2156_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2156_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2157_0)) =>
+ let p0_ = (string_drop s2156_0 s2157_0) in
+ if (((p0_ = ""))) then SOME (rd, rs, imm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2129_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4))*)
+
+val _ = Define `
+ ((s2129_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word)option) s2130_0=
+ (let s2131_0 = s2130_0 in
+ if ((string_startswith s2131_0 "fence.reserved.")) then
+ (case ((string_drop s2131_0 ((string_length "fence.reserved.")))) of
+ s2132_0 =>
+ (case ((fence_bits_matches_prefix s2132_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s2133_0)) =>
+ let s2134_0 = (string_drop s2132_0 s2133_0) in
+ if ((string_startswith s2134_0 ".")) then
+ (case ((string_drop s2134_0 ((string_length ".")))) of
+ s2135_0 =>
+ (case ((fence_bits_matches_prefix s2135_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s2136_0)) =>
+ let s2137_0 = (string_drop s2135_0 s2136_0) in
+ if ((string_startswith s2137_0 ".")) then
+ (case ((string_drop s2137_0 ((string_length ".")))) of
+ s2138_0 =>
+ (case ((reg_name_matches_prefix s2138_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s2139_0)) =>
+ let s2140_0 = (string_drop s2138_0 s2139_0) in
+ if ((string_startswith s2140_0 ".")) then
+ (case ((string_drop s2140_0 ((string_length ".")))) of
+ s2141_0 =>
+ (case ((reg_name_matches_prefix s2141_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2142_0)) =>
+ let s2143_0 = (string_drop s2141_0 s2142_0) in
+ if ((string_startswith s2143_0 ".")) then
+ (case ((string_drop s2143_0 ((string_length ".")))) of
+ s2144_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s2144_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s2145_0)) =>
+ let p0_ = (string_drop s2144_0 s2145_0) in
+ if (((p0_ = ""))) then SOME (pred, succ, rs, rd, fm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2123_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s2123_:string ->((3)words$word)option) s2124_0=
+ (let s2125_0 = s2124_0 in
+ if ((string_startswith s2125_0 "c.srai.hint.")) then
+ (case ((string_drop s2125_0 ((string_length "c.srai.hint.")))) of
+ s2126_0 =>
+ (case ((creg_name_matches_prefix s2126_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s2127_0)) =>
+ let p0_ = (string_drop s2126_0 s2127_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2117_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s2117_:string ->((3)words$word)option) s2118_0=
+ (let s2119_0 = s2118_0 in
+ if ((string_startswith s2119_0 "c.srli.hint.")) then
+ (case ((string_drop s2119_0 ((string_length "c.srli.hint.")))) of
+ s2120_0 =>
+ (case ((creg_name_matches_prefix s2120_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s2121_0)) =>
+ let p0_ = (string_drop s2120_0 s2121_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2108_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2108_:string ->((5)words$word#(6)words$word)option) s2109_0=
+ (let s2110_0 = s2109_0 in
+ if ((string_startswith s2110_0 "c.slli.hint.")) then
+ (case ((string_drop s2110_0 ((string_length "c.slli.hint.")))) of
+ s2111_0 =>
+ (case ((reg_name_matches_prefix s2111_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s2112_0)) =>
+ let s2113_0 = (string_drop s2111_0 s2112_0) in
+ if ((string_startswith s2113_0 ".")) then
+ (case ((string_drop s2113_0 ((string_length ".")))) of
+ s2114_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s2114_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s2115_0)) =>
+ let p0_ = (string_drop s2114_0 s2115_0) in
+ if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2102_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2102_:string ->((5)words$word)option) s2103_0=
+ (let s2104_0 = s2103_0 in
+ if ((string_startswith s2104_0 "c.add.hint.")) then
+ (case ((string_drop s2104_0 ((string_length "c.add.hint.")))) of
+ s2105_0 =>
+ (case ((reg_name_matches_prefix s2105_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2106_0)) =>
+ let p0_ = (string_drop s2105_0 s2106_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2096_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2096_:string ->((5)words$word)option) s2097_0=
+ (let s2098_0 = s2097_0 in
+ if ((string_startswith s2098_0 "c.mv.hint.")) then
+ (case ((string_drop s2098_0 ((string_length "c.mv.hint.")))) of
+ s2099_0 =>
+ (case ((reg_name_matches_prefix s2099_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2100_0)) =>
+ let p0_ = (string_drop s2099_0 s2100_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2090_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2090_:string ->((6)words$word)option) s2091_0=
+ (let s2092_0 = s2091_0 in
+ if ((string_startswith s2092_0 "c.lui.hint.")) then
+ (case ((string_drop s2092_0 ((string_length "c.lui.hint.")))) of
+ s2093_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2093_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2094_0)) =>
+ let p0_ = (string_drop s2093_0 s2094_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2084_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2084_:string ->((6)words$word)option) s2085_0=
+ (let s2086_0 = s2085_0 in
+ if ((string_startswith s2086_0 "c.li.hint.")) then
+ (case ((string_drop s2086_0 ((string_length "c.li.hint.")))) of
+ s2087_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2087_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2088_0)) =>
+ let p0_ = (string_drop s2087_0 s2088_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2078_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2078_:string ->((5)words$word)option) s2079_0=
+ (let s2080_0 = s2079_0 in
+ if ((string_startswith s2080_0 "c.addi.hint.")) then
+ (case ((string_drop s2080_0 ((string_length "c.addi.hint.")))) of
+ s2081_0 =>
+ (case ((reg_name_matches_prefix s2081_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s2082_0)) =>
+ let p0_ = (string_drop s2081_0 s2082_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2072_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2072_:string ->((6)words$word)option) s2073_0=
+ (let s2074_0 = s2073_0 in
+ if ((string_startswith s2074_0 "c.nop.hint.")) then
+ (case ((string_drop s2074_0 ((string_length "c.nop.hint.")))) of
+ s2075_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2075_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2076_0)) =>
+ let p0_ = (string_drop s2075_0 s2076_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2055_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2055_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s2056_0=
+ ((case s2056_0 of
+ s2057_0 =>
+ (case ((csr_mnemonic_matches_prefix s2057_0)) of
+ SOME ((op, s2058_0)) =>
+ (case ((string_drop s2057_0 s2058_0)) of
+ s2059_0 =>
+ (case ((spc_matches_prefix0 s2059_0)) of
+ SOME ((() , s2060_0)) =>
+ (case ((string_drop s2059_0 s2060_0)) of
+ s2061_0 =>
+ (case ((reg_name_matches_prefix s2061_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2062_0)) =>
+ (case ((string_drop s2061_0 s2062_0)) of
+ s2063_0 =>
+ (case ((sep_matches_prefix s2063_0)) of
+ SOME ((() , s2064_0)) =>
+ (case ((string_drop s2063_0 s2064_0)) of
+ s2065_0 =>
+ (case ((csr_name_map_matches_prefix s2065_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s2066_0)) =>
+ (case ((string_drop s2065_0 s2066_0)) of
+ s2067_0 =>
+ (case ((sep_matches_prefix s2067_0)) of
+ SOME ((() , s2068_0)) =>
+ (case ((string_drop s2067_0 s2068_0)) of
+ s2069_0 =>
+ (case ((reg_name_matches_prefix s2069_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2070_0)) =>
+ let p0_ = (string_drop s2069_0 s2070_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2037_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2037_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s2038_0=
+ ((case s2038_0 of
+ s2039_0 =>
+ (case ((csr_mnemonic_matches_prefix s2039_0)) of
+ SOME ((op, s2040_0)) =>
+ let s2041_0 = (string_drop s2039_0 s2040_0) in
+ if ((string_startswith s2041_0 "i")) then
+ (case ((string_drop s2041_0 ((string_length "i")))) of
+ s2042_0 =>
+ (case ((spc_matches_prefix0 s2042_0)) of
+ SOME ((() , s2043_0)) =>
+ (case ((string_drop s2042_0 s2043_0)) of
+ s2044_0 =>
+ (case ((reg_name_matches_prefix s2044_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2045_0)) =>
+ (case ((string_drop s2044_0 s2045_0)) of
+ s2046_0 =>
+ (case ((sep_matches_prefix s2046_0)) of
+ SOME ((() , s2047_0)) =>
+ (case ((string_drop s2046_0 s2047_0)) of
+ s2048_0 =>
+ (case ((csr_name_map_matches_prefix s2048_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s2049_0)) =>
+ (case ((string_drop s2048_0 s2049_0)) of
+ s2050_0 =>
+ (case ((sep_matches_prefix s2050_0)) of
+ SOME ((() , s2051_0)) =>
+ (case ((string_drop s2050_0 s2051_0)) of
+ s2052_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1645_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1646_0)) =>
- (case ((string_drop s1645_0 s1646_0)) of
- s1647_0 =>
- (case ((sep_matches_prefix s1647_0)) of
- SOME ((() , s1648_0)) =>
- (case ((string_drop s1647_0 s1648_0)) of
- s1649_0 =>
- (case ((csr_name_map_matches_prefix s1649_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s1650_0)) =>
- let p0_ = (string_drop s1649_0 s1650_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ s2052_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2053_0)) =>
+ let p0_ = (string_drop s2052_0 s2053_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
| _ => NONE
)
)
@@ -24299,43 +33694,43 @@ val _ = Define `
)))`;
-(*val _s1615_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1615_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1616_0=
- (let s1617_0 = s1616_0 in
- if ((string_startswith s1617_0 "rem")) then
- (case ((string_drop s1617_0 ((string_length "rem")))) of
- s1618_0 =>
- (case ((maybe_not_u_matches_prefix s1618_0)) of
- SOME ((s, s1619_0)) =>
- let s1620_0 = (string_drop s1618_0 s1619_0) in
- if ((string_startswith s1620_0 "w")) then
- (case ((string_drop s1620_0 ((string_length "w")))) of
- s1621_0 =>
- (case ((spc_matches_prefix0 s1621_0)) of
- SOME ((() , s1622_0)) =>
- (case ((string_drop s1621_0 s1622_0)) of
- s1623_0 =>
- (case ((reg_name_matches_prefix s1623_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1624_0)) =>
- (case ((string_drop s1623_0 s1624_0)) of
- s1625_0 =>
- (case ((sep_matches_prefix s1625_0)) of
- SOME ((() , s1626_0)) =>
- (case ((string_drop s1625_0 s1626_0)) of
- s1627_0 =>
- (case ((reg_name_matches_prefix s1627_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1628_0)) =>
- (case ((string_drop s1627_0 s1628_0)) of
- s1629_0 =>
- (case ((sep_matches_prefix s1629_0)) of
- SOME ((() , s1630_0)) =>
- (case ((string_drop s1629_0 s1630_0)) of
- s1631_0 =>
- (case ((reg_name_matches_prefix s1631_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1632_0)) =>
- let p0_ = (string_drop s1631_0 s1632_0) in
+(*val _s2018_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2018_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2019_0=
+ (let s2020_0 = s2019_0 in
+ if ((string_startswith s2020_0 "rem")) then
+ (case ((string_drop s2020_0 ((string_length "rem")))) of
+ s2021_0 =>
+ (case ((maybe_not_u_matches_prefix s2021_0)) of
+ SOME ((s, s2022_0)) =>
+ let s2023_0 = (string_drop s2021_0 s2022_0) in
+ if ((string_startswith s2023_0 "w")) then
+ (case ((string_drop s2023_0 ((string_length "w")))) of
+ s2024_0 =>
+ (case ((spc_matches_prefix0 s2024_0)) of
+ SOME ((() , s2025_0)) =>
+ (case ((string_drop s2024_0 s2025_0)) of
+ s2026_0 =>
+ (case ((reg_name_matches_prefix s2026_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2027_0)) =>
+ (case ((string_drop s2026_0 s2027_0)) of
+ s2028_0 =>
+ (case ((sep_matches_prefix s2028_0)) of
+ SOME ((() , s2029_0)) =>
+ (case ((string_drop s2028_0 s2029_0)) of
+ s2030_0 =>
+ (case ((reg_name_matches_prefix s2030_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2031_0)) =>
+ (case ((string_drop s2030_0 s2031_0)) of
+ s2032_0 =>
+ (case ((sep_matches_prefix s2032_0)) of
+ SOME ((() , s2033_0)) =>
+ (case ((string_drop s2032_0 s2033_0)) of
+ s2034_0 =>
+ (case ((reg_name_matches_prefix s2034_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2035_0)) =>
+ let p0_ = (string_drop s2034_0 s2035_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24361,43 +33756,43 @@ val _ = Define `
else NONE))`;
-(*val _s1596_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1596_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1597_0=
- (let s1598_0 = s1597_0 in
- if ((string_startswith s1598_0 "div")) then
- (case ((string_drop s1598_0 ((string_length "div")))) of
- s1599_0 =>
- (case ((maybe_not_u_matches_prefix s1599_0)) of
- SOME ((s, s1600_0)) =>
- let s1601_0 = (string_drop s1599_0 s1600_0) in
- if ((string_startswith s1601_0 "w")) then
- (case ((string_drop s1601_0 ((string_length "w")))) of
- s1602_0 =>
- (case ((spc_matches_prefix0 s1602_0)) of
- SOME ((() , s1603_0)) =>
- (case ((string_drop s1602_0 s1603_0)) of
- s1604_0 =>
- (case ((reg_name_matches_prefix s1604_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1605_0)) =>
- (case ((string_drop s1604_0 s1605_0)) of
- s1606_0 =>
- (case ((sep_matches_prefix s1606_0)) of
- SOME ((() , s1607_0)) =>
- (case ((string_drop s1606_0 s1607_0)) of
- s1608_0 =>
- (case ((reg_name_matches_prefix s1608_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1609_0)) =>
- (case ((string_drop s1608_0 s1609_0)) of
- s1610_0 =>
- (case ((sep_matches_prefix s1610_0)) of
- SOME ((() , s1611_0)) =>
- (case ((string_drop s1610_0 s1611_0)) of
- s1612_0 =>
- (case ((reg_name_matches_prefix s1612_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1613_0)) =>
- let p0_ = (string_drop s1612_0 s1613_0) in
+(*val _s1999_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1999_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2000_0=
+ (let s2001_0 = s2000_0 in
+ if ((string_startswith s2001_0 "div")) then
+ (case ((string_drop s2001_0 ((string_length "div")))) of
+ s2002_0 =>
+ (case ((maybe_not_u_matches_prefix s2002_0)) of
+ SOME ((s, s2003_0)) =>
+ let s2004_0 = (string_drop s2002_0 s2003_0) in
+ if ((string_startswith s2004_0 "w")) then
+ (case ((string_drop s2004_0 ((string_length "w")))) of
+ s2005_0 =>
+ (case ((spc_matches_prefix0 s2005_0)) of
+ SOME ((() , s2006_0)) =>
+ (case ((string_drop s2005_0 s2006_0)) of
+ s2007_0 =>
+ (case ((reg_name_matches_prefix s2007_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2008_0)) =>
+ (case ((string_drop s2007_0 s2008_0)) of
+ s2009_0 =>
+ (case ((sep_matches_prefix s2009_0)) of
+ SOME ((() , s2010_0)) =>
+ (case ((string_drop s2009_0 s2010_0)) of
+ s2011_0 =>
+ (case ((reg_name_matches_prefix s2011_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2012_0)) =>
+ (case ((string_drop s2011_0 s2012_0)) of
+ s2013_0 =>
+ (case ((sep_matches_prefix s2013_0)) of
+ SOME ((() , s2014_0)) =>
+ (case ((string_drop s2013_0 s2014_0)) of
+ s2015_0 =>
+ (case ((reg_name_matches_prefix s2015_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2016_0)) =>
+ let p0_ = (string_drop s2015_0 s2016_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24423,37 +33818,37 @@ val _ = Define `
else NONE))`;
-(*val _s1580_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1983_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1580_:string ->((5)words$word#(5)words$word#(5)words$word)option) s1581_0=
- (let s1582_0 = s1581_0 in
- if ((string_startswith s1582_0 "mulw")) then
- (case ((string_drop s1582_0 ((string_length "mulw")))) of
- s1583_0 =>
- (case ((spc_matches_prefix0 s1583_0)) of
- SOME ((() , s1584_0)) =>
- (case ((string_drop s1583_0 s1584_0)) of
- s1585_0 =>
- (case ((reg_name_matches_prefix s1585_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1586_0)) =>
- (case ((string_drop s1585_0 s1586_0)) of
- s1587_0 =>
- (case ((sep_matches_prefix s1587_0)) of
- SOME ((() , s1588_0)) =>
- (case ((string_drop s1587_0 s1588_0)) of
- s1589_0 =>
- (case ((reg_name_matches_prefix s1589_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1590_0)) =>
- (case ((string_drop s1589_0 s1590_0)) of
- s1591_0 =>
- (case ((sep_matches_prefix s1591_0)) of
- SOME ((() , s1592_0)) =>
- (case ((string_drop s1591_0 s1592_0)) of
- s1593_0 =>
- (case ((reg_name_matches_prefix s1593_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1594_0)) =>
- let p0_ = (string_drop s1593_0 s1594_0) in
+ ((s1983_:string ->((5)words$word#(5)words$word#(5)words$word)option) s1984_0=
+ (let s1985_0 = s1984_0 in
+ if ((string_startswith s1985_0 "mulw")) then
+ (case ((string_drop s1985_0 ((string_length "mulw")))) of
+ s1986_0 =>
+ (case ((spc_matches_prefix0 s1986_0)) of
+ SOME ((() , s1987_0)) =>
+ (case ((string_drop s1986_0 s1987_0)) of
+ s1988_0 =>
+ (case ((reg_name_matches_prefix s1988_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1989_0)) =>
+ (case ((string_drop s1988_0 s1989_0)) of
+ s1990_0 =>
+ (case ((sep_matches_prefix s1990_0)) of
+ SOME ((() , s1991_0)) =>
+ (case ((string_drop s1990_0 s1991_0)) of
+ s1992_0 =>
+ (case ((reg_name_matches_prefix s1992_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1993_0)) =>
+ (case ((string_drop s1992_0 s1993_0)) of
+ s1994_0 =>
+ (case ((sep_matches_prefix s1994_0)) of
+ SOME ((() , s1995_0)) =>
+ (case ((string_drop s1994_0 s1995_0)) of
+ s1996_0 =>
+ (case ((reg_name_matches_prefix s1996_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1997_0)) =>
+ let p0_ = (string_drop s1996_0 s1997_0) in
if (((p0_ = ""))) then SOME (rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24476,41 +33871,41 @@ val _ = Define `
else NONE))`;
-(*val _s1562_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1965_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1562_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1563_0=
- (let s1564_0 = s1563_0 in
- if ((string_startswith s1564_0 "rem")) then
- (case ((string_drop s1564_0 ((string_length "rem")))) of
- s1565_0 =>
- (case ((maybe_not_u_matches_prefix s1565_0)) of
- SOME ((s, s1566_0)) =>
- (case ((string_drop s1565_0 s1566_0)) of
- s1567_0 =>
- (case ((spc_matches_prefix0 s1567_0)) of
- SOME ((() , s1568_0)) =>
- (case ((string_drop s1567_0 s1568_0)) of
- s1569_0 =>
- (case ((reg_name_matches_prefix s1569_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1570_0)) =>
- (case ((string_drop s1569_0 s1570_0)) of
- s1571_0 =>
- (case ((sep_matches_prefix s1571_0)) of
- SOME ((() , s1572_0)) =>
- (case ((string_drop s1571_0 s1572_0)) of
- s1573_0 =>
- (case ((reg_name_matches_prefix s1573_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1574_0)) =>
- (case ((string_drop s1573_0 s1574_0)) of
- s1575_0 =>
- (case ((sep_matches_prefix s1575_0)) of
- SOME ((() , s1576_0)) =>
- (case ((string_drop s1575_0 s1576_0)) of
- s1577_0 =>
- (case ((reg_name_matches_prefix s1577_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1578_0)) =>
- let p0_ = (string_drop s1577_0 s1578_0) in
+ ((s1965_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1966_0=
+ (let s1967_0 = s1966_0 in
+ if ((string_startswith s1967_0 "rem")) then
+ (case ((string_drop s1967_0 ((string_length "rem")))) of
+ s1968_0 =>
+ (case ((maybe_not_u_matches_prefix s1968_0)) of
+ SOME ((s, s1969_0)) =>
+ (case ((string_drop s1968_0 s1969_0)) of
+ s1970_0 =>
+ (case ((spc_matches_prefix0 s1970_0)) of
+ SOME ((() , s1971_0)) =>
+ (case ((string_drop s1970_0 s1971_0)) of
+ s1972_0 =>
+ (case ((reg_name_matches_prefix s1972_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1973_0)) =>
+ (case ((string_drop s1972_0 s1973_0)) of
+ s1974_0 =>
+ (case ((sep_matches_prefix s1974_0)) of
+ SOME ((() , s1975_0)) =>
+ (case ((string_drop s1974_0 s1975_0)) of
+ s1976_0 =>
+ (case ((reg_name_matches_prefix s1976_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1977_0)) =>
+ (case ((string_drop s1976_0 s1977_0)) of
+ s1978_0 =>
+ (case ((sep_matches_prefix s1978_0)) of
+ SOME ((() , s1979_0)) =>
+ (case ((string_drop s1978_0 s1979_0)) of
+ s1980_0 =>
+ (case ((reg_name_matches_prefix s1980_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1981_0)) =>
+ let p0_ = (string_drop s1980_0 s1981_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24536,41 +33931,41 @@ val _ = Define `
else NONE))`;
-(*val _s1544_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1947_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1544_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1545_0=
- (let s1546_0 = s1545_0 in
- if ((string_startswith s1546_0 "div")) then
- (case ((string_drop s1546_0 ((string_length "div")))) of
- s1547_0 =>
- (case ((maybe_not_u_matches_prefix s1547_0)) of
- SOME ((s, s1548_0)) =>
- (case ((string_drop s1547_0 s1548_0)) of
- s1549_0 =>
- (case ((spc_matches_prefix0 s1549_0)) of
- SOME ((() , s1550_0)) =>
- (case ((string_drop s1549_0 s1550_0)) of
- s1551_0 =>
- (case ((reg_name_matches_prefix s1551_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1552_0)) =>
- (case ((string_drop s1551_0 s1552_0)) of
- s1553_0 =>
- (case ((sep_matches_prefix s1553_0)) of
- SOME ((() , s1554_0)) =>
- (case ((string_drop s1553_0 s1554_0)) of
- s1555_0 =>
- (case ((reg_name_matches_prefix s1555_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1556_0)) =>
- (case ((string_drop s1555_0 s1556_0)) of
- s1557_0 =>
- (case ((sep_matches_prefix s1557_0)) of
- SOME ((() , s1558_0)) =>
- (case ((string_drop s1557_0 s1558_0)) of
- s1559_0 =>
- (case ((reg_name_matches_prefix s1559_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1560_0)) =>
- let p0_ = (string_drop s1559_0 s1560_0) in
+ ((s1947_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1948_0=
+ (let s1949_0 = s1948_0 in
+ if ((string_startswith s1949_0 "div")) then
+ (case ((string_drop s1949_0 ((string_length "div")))) of
+ s1950_0 =>
+ (case ((maybe_not_u_matches_prefix s1950_0)) of
+ SOME ((s, s1951_0)) =>
+ (case ((string_drop s1950_0 s1951_0)) of
+ s1952_0 =>
+ (case ((spc_matches_prefix0 s1952_0)) of
+ SOME ((() , s1953_0)) =>
+ (case ((string_drop s1952_0 s1953_0)) of
+ s1954_0 =>
+ (case ((reg_name_matches_prefix s1954_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1955_0)) =>
+ (case ((string_drop s1954_0 s1955_0)) of
+ s1956_0 =>
+ (case ((sep_matches_prefix s1956_0)) of
+ SOME ((() , s1957_0)) =>
+ (case ((string_drop s1956_0 s1957_0)) of
+ s1958_0 =>
+ (case ((reg_name_matches_prefix s1958_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1959_0)) =>
+ (case ((string_drop s1958_0 s1959_0)) of
+ s1960_0 =>
+ (case ((sep_matches_prefix s1960_0)) of
+ SOME ((() , s1961_0)) =>
+ (case ((string_drop s1960_0 s1961_0)) of
+ s1962_0 =>
+ (case ((reg_name_matches_prefix s1962_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1963_0)) =>
+ let p0_ = (string_drop s1962_0 s1963_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24596,39 +33991,39 @@ val _ = Define `
else NONE))`;
-(*val _s1527_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1930_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1527_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1528_0=
- ((case s1528_0 of
- s1529_0 =>
- (case ((mul_mnemonic_matches_prefix s1529_0)) of
- SOME (((high, signed1, signed2), s1530_0)) =>
- (case ((string_drop s1529_0 s1530_0)) of
- s1531_0 =>
- (case ((spc_matches_prefix0 s1531_0)) of
- SOME ((() , s1532_0)) =>
- (case ((string_drop s1531_0 s1532_0)) of
- s1533_0 =>
- (case ((reg_name_matches_prefix s1533_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1534_0)) =>
- (case ((string_drop s1533_0 s1534_0)) of
- s1535_0 =>
- (case ((sep_matches_prefix s1535_0)) of
- SOME ((() , s1536_0)) =>
- (case ((string_drop s1535_0 s1536_0)) of
- s1537_0 =>
- (case ((reg_name_matches_prefix s1537_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1538_0)) =>
- (case ((string_drop s1537_0 s1538_0)) of
- s1539_0 =>
- (case ((sep_matches_prefix s1539_0)) of
- SOME ((() , s1540_0)) =>
- (case ((string_drop s1539_0 s1540_0)) of
- s1541_0 =>
- (case ((reg_name_matches_prefix s1541_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1542_0)) =>
- let p0_ = (string_drop s1541_0 s1542_0) in
+ ((s1930_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1931_0=
+ ((case s1931_0 of
+ s1932_0 =>
+ (case ((mul_mnemonic_matches_prefix s1932_0)) of
+ SOME (((high, signed1, signed2), s1933_0)) =>
+ (case ((string_drop s1932_0 s1933_0)) of
+ s1934_0 =>
+ (case ((spc_matches_prefix0 s1934_0)) of
+ SOME ((() , s1935_0)) =>
+ (case ((string_drop s1934_0 s1935_0)) of
+ s1936_0 =>
+ (case ((reg_name_matches_prefix s1936_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1937_0)) =>
+ (case ((string_drop s1936_0 s1937_0)) of
+ s1938_0 =>
+ (case ((sep_matches_prefix s1938_0)) of
+ SOME ((() , s1939_0)) =>
+ (case ((string_drop s1938_0 s1939_0)) of
+ s1940_0 =>
+ (case ((reg_name_matches_prefix s1940_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1941_0)) =>
+ (case ((string_drop s1940_0 s1941_0)) of
+ s1942_0 =>
+ (case ((sep_matches_prefix s1942_0)) of
+ SOME ((() , s1943_0)) =>
+ (case ((string_drop s1942_0 s1943_0)) of
+ s1944_0 =>
+ (case ((reg_name_matches_prefix s1944_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1945_0)) =>
+ let p0_ = (string_drop s1944_0 s1945_0) in
if (((p0_ = ""))) then SOME (high, signed1, signed2, rd, rs1, rs2) else
NONE
| _ => NONE
@@ -24654,29 +34049,29 @@ val _ = Define `
)))`;
-(*val _s1515_ : string -> maybe ((mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1515_:string ->((5)words$word#(5)words$word)option) s1516_0=
- (let s1517_0 = s1516_0 in
- if ((string_startswith s1517_0 "c.add")) then
- (case ((string_drop s1517_0 ((string_length "c.add")))) of
- s1518_0 =>
- (case ((spc_matches_prefix0 s1518_0)) of
- SOME ((() , s1519_0)) =>
- (case ((string_drop s1518_0 s1519_0)) of
- s1520_0 =>
- (case ((reg_name_matches_prefix s1520_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1521_0)) =>
- (case ((string_drop s1520_0 s1521_0)) of
- s1522_0 =>
- (case ((sep_matches_prefix s1522_0)) of
- SOME ((() , s1523_0)) =>
- (case ((string_drop s1522_0 s1523_0)) of
- s1524_0 =>
- (case ((reg_name_matches_prefix s1524_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1525_0)) =>
- let p0_ = (string_drop s1524_0 s1525_0) in
+(*val _s1918_ : string -> maybe ((mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1918_:string ->((5)words$word#(5)words$word)option) s1919_0=
+ (let s1920_0 = s1919_0 in
+ if ((string_startswith s1920_0 "c.add")) then
+ (case ((string_drop s1920_0 ((string_length "c.add")))) of
+ s1921_0 =>
+ (case ((spc_matches_prefix0 s1921_0)) of
+ SOME ((() , s1922_0)) =>
+ (case ((string_drop s1921_0 s1922_0)) of
+ s1923_0 =>
+ (case ((reg_name_matches_prefix s1923_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1924_0)) =>
+ (case ((string_drop s1923_0 s1924_0)) of
+ s1925_0 =>
+ (case ((sep_matches_prefix s1925_0)) of
+ SOME ((() , s1926_0)) =>
+ (case ((string_drop s1925_0 s1926_0)) of
+ s1927_0 =>
+ (case ((reg_name_matches_prefix s1927_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1928_0)) =>
+ let p0_ = (string_drop s1927_0 s1928_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -24693,29 +34088,29 @@ val _ = Define `
else NONE))`;
-(*val _s1503_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s1906_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1503_:string ->((5)words$word#(5)words$word)option) s1504_0=
- (let s1505_0 = s1504_0 in
- if ((string_startswith s1505_0 "c.mv")) then
- (case ((string_drop s1505_0 ((string_length "c.mv")))) of
- s1506_0 =>
- (case ((spc_matches_prefix0 s1506_0)) of
- SOME ((() , s1507_0)) =>
- (case ((string_drop s1506_0 s1507_0)) of
- s1508_0 =>
- (case ((reg_name_matches_prefix s1508_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1509_0)) =>
- (case ((string_drop s1508_0 s1509_0)) of
- s1510_0 =>
- (case ((sep_matches_prefix s1510_0)) of
- SOME ((() , s1511_0)) =>
- (case ((string_drop s1510_0 s1511_0)) of
- s1512_0 =>
- (case ((reg_name_matches_prefix s1512_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1513_0)) =>
- let p0_ = (string_drop s1512_0 s1513_0) in
+ ((s1906_:string ->((5)words$word#(5)words$word)option) s1907_0=
+ (let s1908_0 = s1907_0 in
+ if ((string_startswith s1908_0 "c.mv")) then
+ (case ((string_drop s1908_0 ((string_length "c.mv")))) of
+ s1909_0 =>
+ (case ((spc_matches_prefix0 s1909_0)) of
+ SOME ((() , s1910_0)) =>
+ (case ((string_drop s1909_0 s1910_0)) of
+ s1911_0 =>
+ (case ((reg_name_matches_prefix s1911_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1912_0)) =>
+ (case ((string_drop s1911_0 s1912_0)) of
+ s1913_0 =>
+ (case ((sep_matches_prefix s1913_0)) of
+ SOME ((() , s1914_0)) =>
+ (case ((string_drop s1913_0 s1914_0)) of
+ s1915_0 =>
+ (case ((reg_name_matches_prefix s1915_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1916_0)) =>
+ let p0_ = (string_drop s1915_0 s1916_0) in
if (((p0_ = ""))) then SOME (rd, rs2) else NONE
| _ => NONE
)
@@ -24732,21 +34127,21 @@ val _ = Define `
else NONE))`;
-(*val _s1495_ : string -> maybe (mword ty5)*)
+(*val _s1898_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s1495_:string ->((5)words$word)option) s1496_0=
- (let s1497_0 = s1496_0 in
- if ((string_startswith s1497_0 "c.jalr")) then
- (case ((string_drop s1497_0 ((string_length "c.jalr")))) of
- s1498_0 =>
- (case ((spc_matches_prefix0 s1498_0)) of
- SOME ((() , s1499_0)) =>
- (case ((string_drop s1498_0 s1499_0)) of
- s1500_0 =>
- (case ((reg_name_matches_prefix s1500_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1501_0)) =>
- let p0_ = (string_drop s1500_0 s1501_0) in
+ ((s1898_:string ->((5)words$word)option) s1899_0=
+ (let s1900_0 = s1899_0 in
+ if ((string_startswith s1900_0 "c.jalr")) then
+ (case ((string_drop s1900_0 ((string_length "c.jalr")))) of
+ s1901_0 =>
+ (case ((spc_matches_prefix0 s1901_0)) of
+ SOME ((() , s1902_0)) =>
+ (case ((string_drop s1901_0 s1902_0)) of
+ s1903_0 =>
+ (case ((reg_name_matches_prefix s1903_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1904_0)) =>
+ let p0_ = (string_drop s1903_0 s1904_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -24757,21 +34152,21 @@ val _ = Define `
else NONE))`;
-(*val _s1487_ : string -> maybe (mword ty5)*)
+(*val _s1890_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s1487_:string ->((5)words$word)option) s1488_0=
- (let s1489_0 = s1488_0 in
- if ((string_startswith s1489_0 "c.jr")) then
- (case ((string_drop s1489_0 ((string_length "c.jr")))) of
- s1490_0 =>
- (case ((spc_matches_prefix0 s1490_0)) of
- SOME ((() , s1491_0)) =>
- (case ((string_drop s1490_0 s1491_0)) of
- s1492_0 =>
- (case ((reg_name_matches_prefix s1492_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1493_0)) =>
- let p0_ = (string_drop s1492_0 s1493_0) in
+ ((s1890_:string ->((5)words$word)option) s1891_0=
+ (let s1892_0 = s1891_0 in
+ if ((string_startswith s1892_0 "c.jr")) then
+ (case ((string_drop s1892_0 ((string_length "c.jr")))) of
+ s1893_0 =>
+ (case ((spc_matches_prefix0 s1893_0)) of
+ SOME ((() , s1894_0)) =>
+ (case ((string_drop s1893_0 s1894_0)) of
+ s1895_0 =>
+ (case ((reg_name_matches_prefix s1895_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1896_0)) =>
+ let p0_ = (string_drop s1895_0 s1896_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -24782,30 +34177,30 @@ val _ = Define `
else NONE))`;
-(*val _s1475_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1878_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1475_:string ->((5)words$word#(6)words$word)option) s1476_0=
- (let s1477_0 = s1476_0 in
- if ((string_startswith s1477_0 "c.sdsp")) then
- (case ((string_drop s1477_0 ((string_length "c.sdsp")))) of
- s1478_0 =>
- (case ((spc_matches_prefix0 s1478_0)) of
- SOME ((() , s1479_0)) =>
- (case ((string_drop s1478_0 s1479_0)) of
- s1480_0 =>
- (case ((reg_name_matches_prefix s1480_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1481_0)) =>
- (case ((string_drop s1480_0 s1481_0)) of
- s1482_0 =>
- (case ((sep_matches_prefix s1482_0)) of
- SOME ((() , s1483_0)) =>
- (case ((string_drop s1482_0 s1483_0)) of
- s1484_0 =>
+ ((s1878_:string ->((5)words$word#(6)words$word)option) s1879_0=
+ (let s1880_0 = s1879_0 in
+ if ((string_startswith s1880_0 "c.sdsp")) then
+ (case ((string_drop s1880_0 ((string_length "c.sdsp")))) of
+ s1881_0 =>
+ (case ((spc_matches_prefix0 s1881_0)) of
+ SOME ((() , s1882_0)) =>
+ (case ((string_drop s1881_0 s1882_0)) of
+ s1883_0 =>
+ (case ((reg_name_matches_prefix s1883_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1884_0)) =>
+ (case ((string_drop s1883_0 s1884_0)) of
+ s1885_0 =>
+ (case ((sep_matches_prefix s1885_0)) of
+ SOME ((() , s1886_0)) =>
+ (case ((string_drop s1885_0 s1886_0)) of
+ s1887_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1484_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1485_0)) =>
- let p0_ = (string_drop s1484_0 s1485_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1887_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1888_0)) =>
+ let p0_ = (string_drop s1887_0 s1888_0) in
if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
| _ => NONE
)
@@ -24822,30 +34217,30 @@ val _ = Define `
else NONE))`;
-(*val _s1463_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1866_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1463_:string ->((5)words$word#(6)words$word)option) s1464_0=
- (let s1465_0 = s1464_0 in
- if ((string_startswith s1465_0 "c.swsp")) then
- (case ((string_drop s1465_0 ((string_length "c.swsp")))) of
- s1466_0 =>
- (case ((spc_matches_prefix0 s1466_0)) of
- SOME ((() , s1467_0)) =>
- (case ((string_drop s1466_0 s1467_0)) of
- s1468_0 =>
- (case ((reg_name_matches_prefix s1468_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1469_0)) =>
- (case ((string_drop s1468_0 s1469_0)) of
- s1470_0 =>
- (case ((sep_matches_prefix s1470_0)) of
- SOME ((() , s1471_0)) =>
- (case ((string_drop s1470_0 s1471_0)) of
- s1472_0 =>
+ ((s1866_:string ->((5)words$word#(6)words$word)option) s1867_0=
+ (let s1868_0 = s1867_0 in
+ if ((string_startswith s1868_0 "c.swsp")) then
+ (case ((string_drop s1868_0 ((string_length "c.swsp")))) of
+ s1869_0 =>
+ (case ((spc_matches_prefix0 s1869_0)) of
+ SOME ((() , s1870_0)) =>
+ (case ((string_drop s1869_0 s1870_0)) of
+ s1871_0 =>
+ (case ((reg_name_matches_prefix s1871_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1872_0)) =>
+ (case ((string_drop s1871_0 s1872_0)) of
+ s1873_0 =>
+ (case ((sep_matches_prefix s1873_0)) of
+ SOME ((() , s1874_0)) =>
+ (case ((string_drop s1873_0 s1874_0)) of
+ s1875_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1472_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1473_0)) =>
- let p0_ = (string_drop s1472_0 s1473_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1875_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1876_0)) =>
+ let p0_ = (string_drop s1875_0 s1876_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -24862,30 +34257,30 @@ val _ = Define `
else NONE))`;
-(*val _s1451_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1854_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1451_:string ->((5)words$word#(6)words$word)option) s1452_0=
- (let s1453_0 = s1452_0 in
- if ((string_startswith s1453_0 "c.ldsp")) then
- (case ((string_drop s1453_0 ((string_length "c.ldsp")))) of
- s1454_0 =>
- (case ((spc_matches_prefix0 s1454_0)) of
- SOME ((() , s1455_0)) =>
- (case ((string_drop s1454_0 s1455_0)) of
- s1456_0 =>
- (case ((reg_name_matches_prefix s1456_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1457_0)) =>
- (case ((string_drop s1456_0 s1457_0)) of
- s1458_0 =>
- (case ((sep_matches_prefix s1458_0)) of
- SOME ((() , s1459_0)) =>
- (case ((string_drop s1458_0 s1459_0)) of
- s1460_0 =>
+ ((s1854_:string ->((5)words$word#(6)words$word)option) s1855_0=
+ (let s1856_0 = s1855_0 in
+ if ((string_startswith s1856_0 "c.ldsp")) then
+ (case ((string_drop s1856_0 ((string_length "c.ldsp")))) of
+ s1857_0 =>
+ (case ((spc_matches_prefix0 s1857_0)) of
+ SOME ((() , s1858_0)) =>
+ (case ((string_drop s1857_0 s1858_0)) of
+ s1859_0 =>
+ (case ((reg_name_matches_prefix s1859_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1860_0)) =>
+ (case ((string_drop s1859_0 s1860_0)) of
+ s1861_0 =>
+ (case ((sep_matches_prefix s1861_0)) of
+ SOME ((() , s1862_0)) =>
+ (case ((string_drop s1861_0 s1862_0)) of
+ s1863_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1460_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1461_0)) =>
- let p0_ = (string_drop s1460_0 s1461_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1863_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1864_0)) =>
+ let p0_ = (string_drop s1863_0 s1864_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -24902,30 +34297,30 @@ val _ = Define `
else NONE))`;
-(*val _s1439_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1842_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1439_:string ->((5)words$word#(6)words$word)option) s1440_0=
- (let s1441_0 = s1440_0 in
- if ((string_startswith s1441_0 "c.lwsp")) then
- (case ((string_drop s1441_0 ((string_length "c.lwsp")))) of
- s1442_0 =>
- (case ((spc_matches_prefix0 s1442_0)) of
- SOME ((() , s1443_0)) =>
- (case ((string_drop s1442_0 s1443_0)) of
- s1444_0 =>
- (case ((reg_name_matches_prefix s1444_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1445_0)) =>
- (case ((string_drop s1444_0 s1445_0)) of
- s1446_0 =>
- (case ((sep_matches_prefix s1446_0)) of
- SOME ((() , s1447_0)) =>
- (case ((string_drop s1446_0 s1447_0)) of
- s1448_0 =>
+ ((s1842_:string ->((5)words$word#(6)words$word)option) s1843_0=
+ (let s1844_0 = s1843_0 in
+ if ((string_startswith s1844_0 "c.lwsp")) then
+ (case ((string_drop s1844_0 ((string_length "c.lwsp")))) of
+ s1845_0 =>
+ (case ((spc_matches_prefix0 s1845_0)) of
+ SOME ((() , s1846_0)) =>
+ (case ((string_drop s1845_0 s1846_0)) of
+ s1847_0 =>
+ (case ((reg_name_matches_prefix s1847_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1848_0)) =>
+ (case ((string_drop s1847_0 s1848_0)) of
+ s1849_0 =>
+ (case ((sep_matches_prefix s1849_0)) of
+ SOME ((() , s1850_0)) =>
+ (case ((string_drop s1849_0 s1850_0)) of
+ s1851_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1448_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1449_0)) =>
- let p0_ = (string_drop s1448_0 s1449_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1851_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1852_0)) =>
+ let p0_ = (string_drop s1851_0 s1852_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -24942,30 +34337,30 @@ val _ = Define `
else NONE))`;
-(*val _s1427_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1830_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1427_:string ->((5)words$word#(6)words$word)option) s1428_0=
- (let s1429_0 = s1428_0 in
- if ((string_startswith s1429_0 "c.slli")) then
- (case ((string_drop s1429_0 ((string_length "c.slli")))) of
- s1430_0 =>
- (case ((spc_matches_prefix0 s1430_0)) of
- SOME ((() , s1431_0)) =>
- (case ((string_drop s1430_0 s1431_0)) of
- s1432_0 =>
- (case ((reg_name_matches_prefix s1432_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1433_0)) =>
- (case ((string_drop s1432_0 s1433_0)) of
- s1434_0 =>
- (case ((sep_matches_prefix s1434_0)) of
- SOME ((() , s1435_0)) =>
- (case ((string_drop s1434_0 s1435_0)) of
- s1436_0 =>
+ ((s1830_:string ->((5)words$word#(6)words$word)option) s1831_0=
+ (let s1832_0 = s1831_0 in
+ if ((string_startswith s1832_0 "c.slli")) then
+ (case ((string_drop s1832_0 ((string_length "c.slli")))) of
+ s1833_0 =>
+ (case ((spc_matches_prefix0 s1833_0)) of
+ SOME ((() , s1834_0)) =>
+ (case ((string_drop s1833_0 s1834_0)) of
+ s1835_0 =>
+ (case ((reg_name_matches_prefix s1835_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1836_0)) =>
+ (case ((string_drop s1835_0 s1836_0)) of
+ s1837_0 =>
+ (case ((sep_matches_prefix s1837_0)) of
+ SOME ((() , s1838_0)) =>
+ (case ((string_drop s1837_0 s1838_0)) of
+ s1839_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1436_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1437_0)) =>
- let p0_ = (string_drop s1436_0 s1437_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1839_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1840_0)) =>
+ let p0_ = (string_drop s1839_0 s1840_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -24982,30 +34377,30 @@ val _ = Define `
else NONE))`;
-(*val _s1415_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1818_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1415_:string ->((3)words$word#(8)words$word)option) s1416_0=
- (let s1417_0 = s1416_0 in
- if ((string_startswith s1417_0 "c.bnez")) then
- (case ((string_drop s1417_0 ((string_length "c.bnez")))) of
- s1418_0 =>
- (case ((spc_matches_prefix0 s1418_0)) of
- SOME ((() , s1419_0)) =>
- (case ((string_drop s1418_0 s1419_0)) of
- s1420_0 =>
- (case ((creg_name_matches_prefix s1420_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s1421_0)) =>
- (case ((string_drop s1420_0 s1421_0)) of
- s1422_0 =>
- (case ((sep_matches_prefix s1422_0)) of
- SOME ((() , s1423_0)) =>
- (case ((string_drop s1422_0 s1423_0)) of
- s1424_0 =>
+ ((s1818_:string ->((3)words$word#(8)words$word)option) s1819_0=
+ (let s1820_0 = s1819_0 in
+ if ((string_startswith s1820_0 "c.bnez")) then
+ (case ((string_drop s1820_0 ((string_length "c.bnez")))) of
+ s1821_0 =>
+ (case ((spc_matches_prefix0 s1821_0)) of
+ SOME ((() , s1822_0)) =>
+ (case ((string_drop s1821_0 s1822_0)) of
+ s1823_0 =>
+ (case ((creg_name_matches_prefix s1823_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s1824_0)) =>
+ (case ((string_drop s1823_0 s1824_0)) of
+ s1825_0 =>
+ (case ((sep_matches_prefix s1825_0)) of
+ SOME ((() , s1826_0)) =>
+ (case ((string_drop s1825_0 s1826_0)) of
+ s1827_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1424_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s1425_0)) =>
- let p0_ = (string_drop s1424_0 s1425_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1827_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s1828_0)) =>
+ let p0_ = (string_drop s1827_0 s1828_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -25022,30 +34417,30 @@ val _ = Define `
else NONE))`;
-(*val _s1403_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1806_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1403_:string ->((3)words$word#(8)words$word)option) s1404_0=
- (let s1405_0 = s1404_0 in
- if ((string_startswith s1405_0 "c.beqz")) then
- (case ((string_drop s1405_0 ((string_length "c.beqz")))) of
- s1406_0 =>
- (case ((spc_matches_prefix0 s1406_0)) of
- SOME ((() , s1407_0)) =>
- (case ((string_drop s1406_0 s1407_0)) of
- s1408_0 =>
- (case ((creg_name_matches_prefix s1408_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s1409_0)) =>
- (case ((string_drop s1408_0 s1409_0)) of
- s1410_0 =>
- (case ((sep_matches_prefix s1410_0)) of
- SOME ((() , s1411_0)) =>
- (case ((string_drop s1410_0 s1411_0)) of
- s1412_0 =>
+ ((s1806_:string ->((3)words$word#(8)words$word)option) s1807_0=
+ (let s1808_0 = s1807_0 in
+ if ((string_startswith s1808_0 "c.beqz")) then
+ (case ((string_drop s1808_0 ((string_length "c.beqz")))) of
+ s1809_0 =>
+ (case ((spc_matches_prefix0 s1809_0)) of
+ SOME ((() , s1810_0)) =>
+ (case ((string_drop s1809_0 s1810_0)) of
+ s1811_0 =>
+ (case ((creg_name_matches_prefix s1811_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s1812_0)) =>
+ (case ((string_drop s1811_0 s1812_0)) of
+ s1813_0 =>
+ (case ((sep_matches_prefix s1813_0)) of
+ SOME ((() , s1814_0)) =>
+ (case ((string_drop s1813_0 s1814_0)) of
+ s1815_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1412_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s1413_0)) =>
- let p0_ = (string_drop s1412_0 s1413_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1815_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s1816_0)) =>
+ let p0_ = (string_drop s1815_0 s1816_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -25062,22 +34457,22 @@ val _ = Define `
else NONE))`;
-(*val _s1395_ : string -> maybe (mword ty11)*)
+(*val _s1798_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s1395_:string ->((11)words$word)option) s1396_0=
- (let s1397_0 = s1396_0 in
- if ((string_startswith s1397_0 "c.j")) then
- (case ((string_drop s1397_0 ((string_length "c.j")))) of
- s1398_0 =>
- (case ((spc_matches_prefix0 s1398_0)) of
- SOME ((() , s1399_0)) =>
- (case ((string_drop s1398_0 s1399_0)) of
- s1400_0 =>
+ ((s1798_:string ->((11)words$word)option) s1799_0=
+ (let s1800_0 = s1799_0 in
+ if ((string_startswith s1800_0 "c.j")) then
+ (case ((string_drop s1800_0 ((string_length "c.j")))) of
+ s1801_0 =>
+ (case ((spc_matches_prefix0 s1801_0)) of
+ SOME ((() , s1802_0)) =>
+ (case ((string_drop s1801_0 s1802_0)) of
+ s1803_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1400_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s1401_0)) =>
- let p0_ = (string_drop s1400_0 s1401_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1803_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s1804_0)) =>
+ let p0_ = (string_drop s1803_0 s1804_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -25088,29 +34483,29 @@ val _ = Define `
else NONE))`;
-(*val _s1383_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1786_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1383_:string ->((3)words$word#(3)words$word)option) s1384_0=
- (let s1385_0 = s1384_0 in
- if ((string_startswith s1385_0 "c.addw")) then
- (case ((string_drop s1385_0 ((string_length "c.addw")))) of
- s1386_0 =>
- (case ((spc_matches_prefix0 s1386_0)) of
- SOME ((() , s1387_0)) =>
- (case ((string_drop s1386_0 s1387_0)) of
- s1388_0 =>
- (case ((creg_name_matches_prefix s1388_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1389_0)) =>
- (case ((string_drop s1388_0 s1389_0)) of
- s1390_0 =>
- (case ((sep_matches_prefix s1390_0)) of
- SOME ((() , s1391_0)) =>
- (case ((string_drop s1390_0 s1391_0)) of
- s1392_0 =>
- (case ((creg_name_matches_prefix s1392_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1393_0)) =>
- let p0_ = (string_drop s1392_0 s1393_0) in
+ ((s1786_:string ->((3)words$word#(3)words$word)option) s1787_0=
+ (let s1788_0 = s1787_0 in
+ if ((string_startswith s1788_0 "c.addw")) then
+ (case ((string_drop s1788_0 ((string_length "c.addw")))) of
+ s1789_0 =>
+ (case ((spc_matches_prefix0 s1789_0)) of
+ SOME ((() , s1790_0)) =>
+ (case ((string_drop s1789_0 s1790_0)) of
+ s1791_0 =>
+ (case ((creg_name_matches_prefix s1791_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1792_0)) =>
+ (case ((string_drop s1791_0 s1792_0)) of
+ s1793_0 =>
+ (case ((sep_matches_prefix s1793_0)) of
+ SOME ((() , s1794_0)) =>
+ (case ((string_drop s1793_0 s1794_0)) of
+ s1795_0 =>
+ (case ((creg_name_matches_prefix s1795_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1796_0)) =>
+ let p0_ = (string_drop s1795_0 s1796_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25127,29 +34522,29 @@ val _ = Define `
else NONE))`;
-(*val _s1371_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1774_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1371_:string ->((3)words$word#(3)words$word)option) s1372_0=
- (let s1373_0 = s1372_0 in
- if ((string_startswith s1373_0 "c.subw")) then
- (case ((string_drop s1373_0 ((string_length "c.subw")))) of
- s1374_0 =>
- (case ((spc_matches_prefix0 s1374_0)) of
- SOME ((() , s1375_0)) =>
- (case ((string_drop s1374_0 s1375_0)) of
- s1376_0 =>
- (case ((creg_name_matches_prefix s1376_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1377_0)) =>
- (case ((string_drop s1376_0 s1377_0)) of
- s1378_0 =>
- (case ((sep_matches_prefix s1378_0)) of
- SOME ((() , s1379_0)) =>
- (case ((string_drop s1378_0 s1379_0)) of
- s1380_0 =>
- (case ((creg_name_matches_prefix s1380_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1381_0)) =>
- let p0_ = (string_drop s1380_0 s1381_0) in
+ ((s1774_:string ->((3)words$word#(3)words$word)option) s1775_0=
+ (let s1776_0 = s1775_0 in
+ if ((string_startswith s1776_0 "c.subw")) then
+ (case ((string_drop s1776_0 ((string_length "c.subw")))) of
+ s1777_0 =>
+ (case ((spc_matches_prefix0 s1777_0)) of
+ SOME ((() , s1778_0)) =>
+ (case ((string_drop s1777_0 s1778_0)) of
+ s1779_0 =>
+ (case ((creg_name_matches_prefix s1779_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1780_0)) =>
+ (case ((string_drop s1779_0 s1780_0)) of
+ s1781_0 =>
+ (case ((sep_matches_prefix s1781_0)) of
+ SOME ((() , s1782_0)) =>
+ (case ((string_drop s1781_0 s1782_0)) of
+ s1783_0 =>
+ (case ((creg_name_matches_prefix s1783_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1784_0)) =>
+ let p0_ = (string_drop s1783_0 s1784_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25166,29 +34561,29 @@ val _ = Define `
else NONE))`;
-(*val _s1359_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1762_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1359_:string ->((3)words$word#(3)words$word)option) s1360_0=
- (let s1361_0 = s1360_0 in
- if ((string_startswith s1361_0 "c.and")) then
- (case ((string_drop s1361_0 ((string_length "c.and")))) of
- s1362_0 =>
- (case ((spc_matches_prefix0 s1362_0)) of
- SOME ((() , s1363_0)) =>
- (case ((string_drop s1362_0 s1363_0)) of
- s1364_0 =>
- (case ((creg_name_matches_prefix s1364_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1365_0)) =>
- (case ((string_drop s1364_0 s1365_0)) of
- s1366_0 =>
- (case ((sep_matches_prefix s1366_0)) of
- SOME ((() , s1367_0)) =>
- (case ((string_drop s1366_0 s1367_0)) of
- s1368_0 =>
- (case ((creg_name_matches_prefix s1368_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1369_0)) =>
- let p0_ = (string_drop s1368_0 s1369_0) in
+ ((s1762_:string ->((3)words$word#(3)words$word)option) s1763_0=
+ (let s1764_0 = s1763_0 in
+ if ((string_startswith s1764_0 "c.and")) then
+ (case ((string_drop s1764_0 ((string_length "c.and")))) of
+ s1765_0 =>
+ (case ((spc_matches_prefix0 s1765_0)) of
+ SOME ((() , s1766_0)) =>
+ (case ((string_drop s1765_0 s1766_0)) of
+ s1767_0 =>
+ (case ((creg_name_matches_prefix s1767_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1768_0)) =>
+ (case ((string_drop s1767_0 s1768_0)) of
+ s1769_0 =>
+ (case ((sep_matches_prefix s1769_0)) of
+ SOME ((() , s1770_0)) =>
+ (case ((string_drop s1769_0 s1770_0)) of
+ s1771_0 =>
+ (case ((creg_name_matches_prefix s1771_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1772_0)) =>
+ let p0_ = (string_drop s1771_0 s1772_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25205,29 +34600,29 @@ val _ = Define `
else NONE))`;
-(*val _s1347_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1750_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1347_:string ->((3)words$word#(3)words$word)option) s1348_0=
- (let s1349_0 = s1348_0 in
- if ((string_startswith s1349_0 "c.or")) then
- (case ((string_drop s1349_0 ((string_length "c.or")))) of
- s1350_0 =>
- (case ((spc_matches_prefix0 s1350_0)) of
- SOME ((() , s1351_0)) =>
- (case ((string_drop s1350_0 s1351_0)) of
- s1352_0 =>
- (case ((creg_name_matches_prefix s1352_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1353_0)) =>
- (case ((string_drop s1352_0 s1353_0)) of
- s1354_0 =>
- (case ((sep_matches_prefix s1354_0)) of
- SOME ((() , s1355_0)) =>
- (case ((string_drop s1354_0 s1355_0)) of
- s1356_0 =>
- (case ((creg_name_matches_prefix s1356_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1357_0)) =>
- let p0_ = (string_drop s1356_0 s1357_0) in
+ ((s1750_:string ->((3)words$word#(3)words$word)option) s1751_0=
+ (let s1752_0 = s1751_0 in
+ if ((string_startswith s1752_0 "c.or")) then
+ (case ((string_drop s1752_0 ((string_length "c.or")))) of
+ s1753_0 =>
+ (case ((spc_matches_prefix0 s1753_0)) of
+ SOME ((() , s1754_0)) =>
+ (case ((string_drop s1753_0 s1754_0)) of
+ s1755_0 =>
+ (case ((creg_name_matches_prefix s1755_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1756_0)) =>
+ (case ((string_drop s1755_0 s1756_0)) of
+ s1757_0 =>
+ (case ((sep_matches_prefix s1757_0)) of
+ SOME ((() , s1758_0)) =>
+ (case ((string_drop s1757_0 s1758_0)) of
+ s1759_0 =>
+ (case ((creg_name_matches_prefix s1759_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1760_0)) =>
+ let p0_ = (string_drop s1759_0 s1760_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25244,29 +34639,29 @@ val _ = Define `
else NONE))`;
-(*val _s1335_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1738_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1335_:string ->((3)words$word#(3)words$word)option) s1336_0=
- (let s1337_0 = s1336_0 in
- if ((string_startswith s1337_0 "c.xor")) then
- (case ((string_drop s1337_0 ((string_length "c.xor")))) of
- s1338_0 =>
- (case ((spc_matches_prefix0 s1338_0)) of
- SOME ((() , s1339_0)) =>
- (case ((string_drop s1338_0 s1339_0)) of
- s1340_0 =>
- (case ((creg_name_matches_prefix s1340_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1341_0)) =>
- (case ((string_drop s1340_0 s1341_0)) of
- s1342_0 =>
- (case ((sep_matches_prefix s1342_0)) of
- SOME ((() , s1343_0)) =>
- (case ((string_drop s1342_0 s1343_0)) of
- s1344_0 =>
- (case ((creg_name_matches_prefix s1344_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1345_0)) =>
- let p0_ = (string_drop s1344_0 s1345_0) in
+ ((s1738_:string ->((3)words$word#(3)words$word)option) s1739_0=
+ (let s1740_0 = s1739_0 in
+ if ((string_startswith s1740_0 "c.xor")) then
+ (case ((string_drop s1740_0 ((string_length "c.xor")))) of
+ s1741_0 =>
+ (case ((spc_matches_prefix0 s1741_0)) of
+ SOME ((() , s1742_0)) =>
+ (case ((string_drop s1741_0 s1742_0)) of
+ s1743_0 =>
+ (case ((creg_name_matches_prefix s1743_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1744_0)) =>
+ (case ((string_drop s1743_0 s1744_0)) of
+ s1745_0 =>
+ (case ((sep_matches_prefix s1745_0)) of
+ SOME ((() , s1746_0)) =>
+ (case ((string_drop s1745_0 s1746_0)) of
+ s1747_0 =>
+ (case ((creg_name_matches_prefix s1747_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1748_0)) =>
+ let p0_ = (string_drop s1747_0 s1748_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25283,29 +34678,29 @@ val _ = Define `
else NONE))`;
-(*val _s1323_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1726_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1323_:string ->((3)words$word#(3)words$word)option) s1324_0=
- (let s1325_0 = s1324_0 in
- if ((string_startswith s1325_0 "c.sub")) then
- (case ((string_drop s1325_0 ((string_length "c.sub")))) of
- s1326_0 =>
- (case ((spc_matches_prefix0 s1326_0)) of
- SOME ((() , s1327_0)) =>
- (case ((string_drop s1326_0 s1327_0)) of
- s1328_0 =>
- (case ((creg_name_matches_prefix s1328_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1329_0)) =>
- (case ((string_drop s1328_0 s1329_0)) of
- s1330_0 =>
- (case ((sep_matches_prefix s1330_0)) of
- SOME ((() , s1331_0)) =>
- (case ((string_drop s1330_0 s1331_0)) of
- s1332_0 =>
- (case ((creg_name_matches_prefix s1332_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1333_0)) =>
- let p0_ = (string_drop s1332_0 s1333_0) in
+ ((s1726_:string ->((3)words$word#(3)words$word)option) s1727_0=
+ (let s1728_0 = s1727_0 in
+ if ((string_startswith s1728_0 "c.sub")) then
+ (case ((string_drop s1728_0 ((string_length "c.sub")))) of
+ s1729_0 =>
+ (case ((spc_matches_prefix0 s1729_0)) of
+ SOME ((() , s1730_0)) =>
+ (case ((string_drop s1729_0 s1730_0)) of
+ s1731_0 =>
+ (case ((creg_name_matches_prefix s1731_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1732_0)) =>
+ (case ((string_drop s1731_0 s1732_0)) of
+ s1733_0 =>
+ (case ((sep_matches_prefix s1733_0)) of
+ SOME ((() , s1734_0)) =>
+ (case ((string_drop s1733_0 s1734_0)) of
+ s1735_0 =>
+ (case ((creg_name_matches_prefix s1735_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1736_0)) =>
+ let p0_ = (string_drop s1735_0 s1736_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25322,30 +34717,30 @@ val _ = Define `
else NONE))`;
-(*val _s1311_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1714_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1311_:string ->((3)words$word#(6)words$word)option) s1312_0=
- (let s1313_0 = s1312_0 in
- if ((string_startswith s1313_0 "c.andi")) then
- (case ((string_drop s1313_0 ((string_length "c.andi")))) of
- s1314_0 =>
- (case ((spc_matches_prefix0 s1314_0)) of
- SOME ((() , s1315_0)) =>
- (case ((string_drop s1314_0 s1315_0)) of
- s1316_0 =>
- (case ((creg_name_matches_prefix s1316_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1317_0)) =>
- (case ((string_drop s1316_0 s1317_0)) of
- s1318_0 =>
- (case ((sep_matches_prefix s1318_0)) of
- SOME ((() , s1319_0)) =>
- (case ((string_drop s1318_0 s1319_0)) of
- s1320_0 =>
+ ((s1714_:string ->((3)words$word#(6)words$word)option) s1715_0=
+ (let s1716_0 = s1715_0 in
+ if ((string_startswith s1716_0 "c.andi")) then
+ (case ((string_drop s1716_0 ((string_length "c.andi")))) of
+ s1717_0 =>
+ (case ((spc_matches_prefix0 s1717_0)) of
+ SOME ((() , s1718_0)) =>
+ (case ((string_drop s1717_0 s1718_0)) of
+ s1719_0 =>
+ (case ((creg_name_matches_prefix s1719_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1720_0)) =>
+ (case ((string_drop s1719_0 s1720_0)) of
+ s1721_0 =>
+ (case ((sep_matches_prefix s1721_0)) of
+ SOME ((() , s1722_0)) =>
+ (case ((string_drop s1721_0 s1722_0)) of
+ s1723_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1320_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1321_0)) =>
- let p0_ = (string_drop s1320_0 s1321_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1723_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1724_0)) =>
+ let p0_ = (string_drop s1723_0 s1724_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -25362,30 +34757,30 @@ val _ = Define `
else NONE))`;
-(*val _s1299_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1702_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1299_:string ->((3)words$word#(6)words$word)option) s1300_0=
- (let s1301_0 = s1300_0 in
- if ((string_startswith s1301_0 "c.srai")) then
- (case ((string_drop s1301_0 ((string_length "c.srai")))) of
- s1302_0 =>
- (case ((spc_matches_prefix0 s1302_0)) of
- SOME ((() , s1303_0)) =>
- (case ((string_drop s1302_0 s1303_0)) of
- s1304_0 =>
- (case ((creg_name_matches_prefix s1304_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1305_0)) =>
- (case ((string_drop s1304_0 s1305_0)) of
- s1306_0 =>
- (case ((sep_matches_prefix s1306_0)) of
- SOME ((() , s1307_0)) =>
- (case ((string_drop s1306_0 s1307_0)) of
- s1308_0 =>
+ ((s1702_:string ->((3)words$word#(6)words$word)option) s1703_0=
+ (let s1704_0 = s1703_0 in
+ if ((string_startswith s1704_0 "c.srai")) then
+ (case ((string_drop s1704_0 ((string_length "c.srai")))) of
+ s1705_0 =>
+ (case ((spc_matches_prefix0 s1705_0)) of
+ SOME ((() , s1706_0)) =>
+ (case ((string_drop s1705_0 s1706_0)) of
+ s1707_0 =>
+ (case ((creg_name_matches_prefix s1707_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1708_0)) =>
+ (case ((string_drop s1707_0 s1708_0)) of
+ s1709_0 =>
+ (case ((sep_matches_prefix s1709_0)) of
+ SOME ((() , s1710_0)) =>
+ (case ((string_drop s1709_0 s1710_0)) of
+ s1711_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1308_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1309_0)) =>
- let p0_ = (string_drop s1308_0 s1309_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1711_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1712_0)) =>
+ let p0_ = (string_drop s1711_0 s1712_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -25402,30 +34797,30 @@ val _ = Define `
else NONE))`;
-(*val _s1287_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1690_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1287_:string ->((3)words$word#(6)words$word)option) s1288_0=
- (let s1289_0 = s1288_0 in
- if ((string_startswith s1289_0 "c.srli")) then
- (case ((string_drop s1289_0 ((string_length "c.srli")))) of
- s1290_0 =>
- (case ((spc_matches_prefix0 s1290_0)) of
- SOME ((() , s1291_0)) =>
- (case ((string_drop s1290_0 s1291_0)) of
- s1292_0 =>
- (case ((creg_name_matches_prefix s1292_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1293_0)) =>
- (case ((string_drop s1292_0 s1293_0)) of
- s1294_0 =>
- (case ((sep_matches_prefix s1294_0)) of
- SOME ((() , s1295_0)) =>
- (case ((string_drop s1294_0 s1295_0)) of
- s1296_0 =>
+ ((s1690_:string ->((3)words$word#(6)words$word)option) s1691_0=
+ (let s1692_0 = s1691_0 in
+ if ((string_startswith s1692_0 "c.srli")) then
+ (case ((string_drop s1692_0 ((string_length "c.srli")))) of
+ s1693_0 =>
+ (case ((spc_matches_prefix0 s1693_0)) of
+ SOME ((() , s1694_0)) =>
+ (case ((string_drop s1693_0 s1694_0)) of
+ s1695_0 =>
+ (case ((creg_name_matches_prefix s1695_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1696_0)) =>
+ (case ((string_drop s1695_0 s1696_0)) of
+ s1697_0 =>
+ (case ((sep_matches_prefix s1697_0)) of
+ SOME ((() , s1698_0)) =>
+ (case ((string_drop s1697_0 s1698_0)) of
+ s1699_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1296_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1297_0)) =>
- let p0_ = (string_drop s1296_0 s1297_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1699_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1700_0)) =>
+ let p0_ = (string_drop s1699_0 s1700_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -25442,30 +34837,30 @@ val _ = Define `
else NONE))`;
-(*val _s1275_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1678_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1275_:string ->((5)words$word#(6)words$word)option) s1276_0=
- (let s1277_0 = s1276_0 in
- if ((string_startswith s1277_0 "c.lui")) then
- (case ((string_drop s1277_0 ((string_length "c.lui")))) of
- s1278_0 =>
- (case ((spc_matches_prefix0 s1278_0)) of
- SOME ((() , s1279_0)) =>
- (case ((string_drop s1278_0 s1279_0)) of
- s1280_0 =>
- (case ((reg_name_matches_prefix s1280_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1281_0)) =>
- (case ((string_drop s1280_0 s1281_0)) of
- s1282_0 =>
- (case ((sep_matches_prefix s1282_0)) of
- SOME ((() , s1283_0)) =>
- (case ((string_drop s1282_0 s1283_0)) of
- s1284_0 =>
+ ((s1678_:string ->((5)words$word#(6)words$word)option) s1679_0=
+ (let s1680_0 = s1679_0 in
+ if ((string_startswith s1680_0 "c.lui")) then
+ (case ((string_drop s1680_0 ((string_length "c.lui")))) of
+ s1681_0 =>
+ (case ((spc_matches_prefix0 s1681_0)) of
+ SOME ((() , s1682_0)) =>
+ (case ((string_drop s1681_0 s1682_0)) of
+ s1683_0 =>
+ (case ((reg_name_matches_prefix s1683_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1684_0)) =>
+ (case ((string_drop s1683_0 s1684_0)) of
+ s1685_0 =>
+ (case ((sep_matches_prefix s1685_0)) of
+ SOME ((() , s1686_0)) =>
+ (case ((string_drop s1685_0 s1686_0)) of
+ s1687_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1284_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1285_0)) =>
- let p0_ = (string_drop s1284_0 s1285_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1687_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1688_0)) =>
+ let p0_ = (string_drop s1687_0 s1688_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -25482,22 +34877,22 @@ val _ = Define `
else NONE))`;
-(*val _s1267_ : string -> maybe (mword ty6)*)
+(*val _s1670_ : string -> maybe (mword ty6)*)
val _ = Define `
- ((s1267_:string ->((6)words$word)option) s1268_0=
- (let s1269_0 = s1268_0 in
- if ((string_startswith s1269_0 "c.addi16sp")) then
- (case ((string_drop s1269_0 ((string_length "c.addi16sp")))) of
- s1270_0 =>
- (case ((spc_matches_prefix0 s1270_0)) of
- SOME ((() , s1271_0)) =>
- (case ((string_drop s1270_0 s1271_0)) of
- s1272_0 =>
+ ((s1670_:string ->((6)words$word)option) s1671_0=
+ (let s1672_0 = s1671_0 in
+ if ((string_startswith s1672_0 "c.addi16sp")) then
+ (case ((string_drop s1672_0 ((string_length "c.addi16sp")))) of
+ s1673_0 =>
+ (case ((spc_matches_prefix0 s1673_0)) of
+ SOME ((() , s1674_0)) =>
+ (case ((string_drop s1673_0 s1674_0)) of
+ s1675_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1272_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1273_0)) =>
- let p0_ = (string_drop s1272_0 s1273_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1675_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1676_0)) =>
+ let p0_ = (string_drop s1675_0 s1676_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -25508,30 +34903,30 @@ val _ = Define `
else NONE))`;
-(*val _s1255_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1658_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1255_:string ->((5)words$word#(6)words$word)option) s1256_0=
- (let s1257_0 = s1256_0 in
- if ((string_startswith s1257_0 "c.li")) then
- (case ((string_drop s1257_0 ((string_length "c.li")))) of
- s1258_0 =>
- (case ((spc_matches_prefix0 s1258_0)) of
- SOME ((() , s1259_0)) =>
- (case ((string_drop s1258_0 s1259_0)) of
- s1260_0 =>
- (case ((reg_name_matches_prefix s1260_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1261_0)) =>
- (case ((string_drop s1260_0 s1261_0)) of
- s1262_0 =>
- (case ((sep_matches_prefix s1262_0)) of
- SOME ((() , s1263_0)) =>
- (case ((string_drop s1262_0 s1263_0)) of
- s1264_0 =>
+ ((s1658_:string ->((5)words$word#(6)words$word)option) s1659_0=
+ (let s1660_0 = s1659_0 in
+ if ((string_startswith s1660_0 "c.li")) then
+ (case ((string_drop s1660_0 ((string_length "c.li")))) of
+ s1661_0 =>
+ (case ((spc_matches_prefix0 s1661_0)) of
+ SOME ((() , s1662_0)) =>
+ (case ((string_drop s1661_0 s1662_0)) of
+ s1663_0 =>
+ (case ((reg_name_matches_prefix s1663_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1664_0)) =>
+ (case ((string_drop s1663_0 s1664_0)) of
+ s1665_0 =>
+ (case ((sep_matches_prefix s1665_0)) of
+ SOME ((() , s1666_0)) =>
+ (case ((string_drop s1665_0 s1666_0)) of
+ s1667_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1264_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1265_0)) =>
- let p0_ = (string_drop s1264_0 s1265_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1667_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1668_0)) =>
+ let p0_ = (string_drop s1667_0 s1668_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -25548,30 +34943,30 @@ val _ = Define `
else NONE))`;
-(*val _s1243_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1646_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1243_:string ->((5)words$word#(6)words$word)option) s1244_0=
- (let s1245_0 = s1244_0 in
- if ((string_startswith s1245_0 "c.addiw")) then
- (case ((string_drop s1245_0 ((string_length "c.addiw")))) of
- s1246_0 =>
- (case ((spc_matches_prefix0 s1246_0)) of
- SOME ((() , s1247_0)) =>
- (case ((string_drop s1246_0 s1247_0)) of
- s1248_0 =>
- (case ((reg_name_matches_prefix s1248_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1249_0)) =>
- (case ((string_drop s1248_0 s1249_0)) of
- s1250_0 =>
- (case ((sep_matches_prefix s1250_0)) of
- SOME ((() , s1251_0)) =>
- (case ((string_drop s1250_0 s1251_0)) of
- s1252_0 =>
+ ((s1646_:string ->((5)words$word#(6)words$word)option) s1647_0=
+ (let s1648_0 = s1647_0 in
+ if ((string_startswith s1648_0 "c.addiw")) then
+ (case ((string_drop s1648_0 ((string_length "c.addiw")))) of
+ s1649_0 =>
+ (case ((spc_matches_prefix0 s1649_0)) of
+ SOME ((() , s1650_0)) =>
+ (case ((string_drop s1649_0 s1650_0)) of
+ s1651_0 =>
+ (case ((reg_name_matches_prefix s1651_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1652_0)) =>
+ (case ((string_drop s1651_0 s1652_0)) of
+ s1653_0 =>
+ (case ((sep_matches_prefix s1653_0)) of
+ SOME ((() , s1654_0)) =>
+ (case ((string_drop s1653_0 s1654_0)) of
+ s1655_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1252_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1253_0)) =>
- let p0_ = (string_drop s1252_0 s1253_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1655_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1656_0)) =>
+ let p0_ = (string_drop s1655_0 s1656_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -25588,28 +34983,27 @@ val _ = Define `
else NONE))`;
-(*val _s1235_ : string -> maybe (mword ty11)*)
+(*val _s1638_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s1235_:string ->((11)words$word)option) s1236_0=
- (let s1237_0 = s1236_0 in
- if ((string_startswith s1237_0 "c.jal")) then
- (case ((string_drop s1237_0 ((string_length "c.jal")))) of
- s1238_0 =>
- (case ((spc_matches_prefix0 s1238_0)) of
- SOME ((() , s1239_0)) =>
- (case ((string_drop s1238_0 s1239_0)) of
- s1240_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1240_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__802, s1241_0)) =>
- if (((((subrange_vec_dec v__802 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__802 (( 11 : int): ii)
+ ((s1638_:string ->((11)words$word)option) s1639_0=
+ (let s1640_0 = s1639_0 in
+ if ((string_startswith s1640_0 "c.jal")) then
+ (case ((string_drop s1640_0 ((string_length "c.jal")))) of
+ s1641_0 =>
+ (case ((spc_matches_prefix0 s1641_0)) of
+ SOME ((() , s1642_0)) =>
+ (case ((string_drop s1641_0 s1642_0)) of
+ s1643_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1643_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1184, s1644_0)) =>
+ if (((((subrange_vec_dec v__1184 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1184 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__802 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1184 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let p0_ = (string_drop s1240_0 s1241_0) in
+ let p0_ = (string_drop s1643_0 s1644_0) in
if (((p0_ = ""))) then SOME imm else NONE else NONE
| _ => NONE
)
@@ -25620,30 +35014,30 @@ val _ = Define `
else NONE))`;
-(*val _s1223_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1626_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1223_:string ->((5)words$word#(6)words$word)option) s1224_0=
- (let s1225_0 = s1224_0 in
- if ((string_startswith s1225_0 "c.addi")) then
- (case ((string_drop s1225_0 ((string_length "c.addi")))) of
- s1226_0 =>
- (case ((spc_matches_prefix0 s1226_0)) of
- SOME ((() , s1227_0)) =>
- (case ((string_drop s1226_0 s1227_0)) of
- s1228_0 =>
- (case ((reg_name_matches_prefix s1228_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1229_0)) =>
- (case ((string_drop s1228_0 s1229_0)) of
- s1230_0 =>
- (case ((sep_matches_prefix s1230_0)) of
- SOME ((() , s1231_0)) =>
- (case ((string_drop s1230_0 s1231_0)) of
- s1232_0 =>
+ ((s1626_:string ->((5)words$word#(6)words$word)option) s1627_0=
+ (let s1628_0 = s1627_0 in
+ if ((string_startswith s1628_0 "c.addi")) then
+ (case ((string_drop s1628_0 ((string_length "c.addi")))) of
+ s1629_0 =>
+ (case ((spc_matches_prefix0 s1629_0)) of
+ SOME ((() , s1630_0)) =>
+ (case ((string_drop s1629_0 s1630_0)) of
+ s1631_0 =>
+ (case ((reg_name_matches_prefix s1631_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1632_0)) =>
+ (case ((string_drop s1631_0 s1632_0)) of
+ s1633_0 =>
+ (case ((sep_matches_prefix s1633_0)) of
+ SOME ((() , s1634_0)) =>
+ (case ((string_drop s1633_0 s1634_0)) of
+ s1635_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1232_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s1233_0)) =>
- let p0_ = (string_drop s1232_0 s1233_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1635_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s1636_0)) =>
+ let p0_ = (string_drop s1635_0 s1636_0) in
if (((p0_ = ""))) then SOME (rsd, nzi) else NONE
| _ => NONE
)
@@ -25660,45 +35054,45 @@ val _ = Define `
else NONE))`;
-(*val _s1207_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1610_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1207_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1208_0=
- (let s1209_0 = s1208_0 in
- if ((string_startswith s1209_0 "c.sd")) then
- (case ((string_drop s1209_0 ((string_length "c.sd")))) of
- s1210_0 =>
- (case ((spc_matches_prefix0 s1210_0)) of
- SOME ((() , s1211_0)) =>
- (case ((string_drop s1210_0 s1211_0)) of
- s1212_0 =>
- (case ((creg_name_matches_prefix s1212_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s1213_0)) =>
- (case ((string_drop s1212_0 s1213_0)) of
- s1214_0 =>
- (case ((sep_matches_prefix s1214_0)) of
- SOME ((() , s1215_0)) =>
- (case ((string_drop s1214_0 s1215_0)) of
- s1216_0 =>
- (case ((creg_name_matches_prefix s1216_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s1217_0)) =>
- (case ((string_drop s1216_0 s1217_0)) of
- s1218_0 =>
- (case ((sep_matches_prefix s1218_0)) of
- SOME ((() , s1219_0)) =>
- (case ((string_drop s1218_0 s1219_0)) of
- s1220_0 =>
+ ((s1610_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1611_0=
+ (let s1612_0 = s1611_0 in
+ if ((string_startswith s1612_0 "c.sd")) then
+ (case ((string_drop s1612_0 ((string_length "c.sd")))) of
+ s1613_0 =>
+ (case ((spc_matches_prefix0 s1613_0)) of
+ SOME ((() , s1614_0)) =>
+ (case ((string_drop s1613_0 s1614_0)) of
+ s1615_0 =>
+ (case ((creg_name_matches_prefix s1615_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s1616_0)) =>
+ (case ((string_drop s1615_0 s1616_0)) of
+ s1617_0 =>
+ (case ((sep_matches_prefix s1617_0)) of
+ SOME ((() , s1618_0)) =>
+ (case ((string_drop s1617_0 s1618_0)) of
+ s1619_0 =>
+ (case ((creg_name_matches_prefix s1619_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s1620_0)) =>
+ (case ((string_drop s1619_0 s1620_0)) of
+ s1621_0 =>
+ (case ((sep_matches_prefix s1621_0)) of
+ SOME ((() , s1622_0)) =>
+ (case ((string_drop s1621_0 s1622_0)) of
+ s1623_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1220_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1623_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__804, s1221_0)) =>
- if (((((subrange_vec_dec v__804 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1186, s1624_0)) =>
+ if (((((subrange_vec_dec v__1186 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__804 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1186 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__804 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1220_0 s1221_0) in
+ ((subrange_vec_dec v__1186 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1623_0 s1624_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -25721,45 +35115,45 @@ val _ = Define `
else NONE))`;
-(*val _s1191_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1594_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1191_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1192_0=
- (let s1193_0 = s1192_0 in
- if ((string_startswith s1193_0 "c.sw")) then
- (case ((string_drop s1193_0 ((string_length "c.sw")))) of
- s1194_0 =>
- (case ((spc_matches_prefix0 s1194_0)) of
- SOME ((() , s1195_0)) =>
- (case ((string_drop s1194_0 s1195_0)) of
- s1196_0 =>
- (case ((creg_name_matches_prefix s1196_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s1197_0)) =>
- (case ((string_drop s1196_0 s1197_0)) of
- s1198_0 =>
- (case ((sep_matches_prefix s1198_0)) of
- SOME ((() , s1199_0)) =>
- (case ((string_drop s1198_0 s1199_0)) of
- s1200_0 =>
- (case ((creg_name_matches_prefix s1200_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s1201_0)) =>
- (case ((string_drop s1200_0 s1201_0)) of
- s1202_0 =>
- (case ((sep_matches_prefix s1202_0)) of
- SOME ((() , s1203_0)) =>
- (case ((string_drop s1202_0 s1203_0)) of
- s1204_0 =>
+ ((s1594_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1595_0=
+ (let s1596_0 = s1595_0 in
+ if ((string_startswith s1596_0 "c.sw")) then
+ (case ((string_drop s1596_0 ((string_length "c.sw")))) of
+ s1597_0 =>
+ (case ((spc_matches_prefix0 s1597_0)) of
+ SOME ((() , s1598_0)) =>
+ (case ((string_drop s1597_0 s1598_0)) of
+ s1599_0 =>
+ (case ((creg_name_matches_prefix s1599_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s1600_0)) =>
+ (case ((string_drop s1599_0 s1600_0)) of
+ s1601_0 =>
+ (case ((sep_matches_prefix s1601_0)) of
+ SOME ((() , s1602_0)) =>
+ (case ((string_drop s1601_0 s1602_0)) of
+ s1603_0 =>
+ (case ((creg_name_matches_prefix s1603_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s1604_0)) =>
+ (case ((string_drop s1603_0 s1604_0)) of
+ s1605_0 =>
+ (case ((sep_matches_prefix s1605_0)) of
+ SOME ((() , s1606_0)) =>
+ (case ((string_drop s1605_0 s1606_0)) of
+ s1607_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1204_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1607_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__806, s1205_0)) =>
- if (((((subrange_vec_dec v__806 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1188, s1608_0)) =>
+ if (((((subrange_vec_dec v__1188 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__806 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1188 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__806 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1204_0 s1205_0) in
+ ((subrange_vec_dec v__1188 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1607_0 s1608_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -25782,45 +35176,45 @@ val _ = Define `
else NONE))`;
-(*val _s1175_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1578_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1175_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1176_0=
- (let s1177_0 = s1176_0 in
- if ((string_startswith s1177_0 "c.ld")) then
- (case ((string_drop s1177_0 ((string_length "c.ld")))) of
- s1178_0 =>
- (case ((spc_matches_prefix0 s1178_0)) of
- SOME ((() , s1179_0)) =>
- (case ((string_drop s1178_0 s1179_0)) of
- s1180_0 =>
- (case ((creg_name_matches_prefix s1180_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1181_0)) =>
- (case ((string_drop s1180_0 s1181_0)) of
- s1182_0 =>
- (case ((sep_matches_prefix s1182_0)) of
- SOME ((() , s1183_0)) =>
- (case ((string_drop s1182_0 s1183_0)) of
- s1184_0 =>
- (case ((creg_name_matches_prefix s1184_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s1185_0)) =>
- (case ((string_drop s1184_0 s1185_0)) of
- s1186_0 =>
- (case ((sep_matches_prefix s1186_0)) of
- SOME ((() , s1187_0)) =>
- (case ((string_drop s1186_0 s1187_0)) of
- s1188_0 =>
+ ((s1578_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1579_0=
+ (let s1580_0 = s1579_0 in
+ if ((string_startswith s1580_0 "c.ld")) then
+ (case ((string_drop s1580_0 ((string_length "c.ld")))) of
+ s1581_0 =>
+ (case ((spc_matches_prefix0 s1581_0)) of
+ SOME ((() , s1582_0)) =>
+ (case ((string_drop s1581_0 s1582_0)) of
+ s1583_0 =>
+ (case ((creg_name_matches_prefix s1583_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1584_0)) =>
+ (case ((string_drop s1583_0 s1584_0)) of
+ s1585_0 =>
+ (case ((sep_matches_prefix s1585_0)) of
+ SOME ((() , s1586_0)) =>
+ (case ((string_drop s1585_0 s1586_0)) of
+ s1587_0 =>
+ (case ((creg_name_matches_prefix s1587_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s1588_0)) =>
+ (case ((string_drop s1587_0 s1588_0)) of
+ s1589_0 =>
+ (case ((sep_matches_prefix s1589_0)) of
+ SOME ((() , s1590_0)) =>
+ (case ((string_drop s1589_0 s1590_0)) of
+ s1591_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1188_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1591_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__808, s1189_0)) =>
- if (((((subrange_vec_dec v__808 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1190, s1592_0)) =>
+ if (((((subrange_vec_dec v__1190 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__808 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1190 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__808 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1188_0 s1189_0) in
+ ((subrange_vec_dec v__1190 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1591_0 s1592_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -25843,45 +35237,45 @@ val _ = Define `
else NONE))`;
-(*val _s1159_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1562_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1159_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1160_0=
- (let s1161_0 = s1160_0 in
- if ((string_startswith s1161_0 "c.lw")) then
- (case ((string_drop s1161_0 ((string_length "c.lw")))) of
- s1162_0 =>
- (case ((spc_matches_prefix0 s1162_0)) of
- SOME ((() , s1163_0)) =>
- (case ((string_drop s1162_0 s1163_0)) of
- s1164_0 =>
- (case ((creg_name_matches_prefix s1164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1165_0)) =>
- (case ((string_drop s1164_0 s1165_0)) of
- s1166_0 =>
- (case ((sep_matches_prefix s1166_0)) of
- SOME ((() , s1167_0)) =>
- (case ((string_drop s1166_0 s1167_0)) of
- s1168_0 =>
- (case ((creg_name_matches_prefix s1168_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s1169_0)) =>
- (case ((string_drop s1168_0 s1169_0)) of
- s1170_0 =>
- (case ((sep_matches_prefix s1170_0)) of
- SOME ((() , s1171_0)) =>
- (case ((string_drop s1170_0 s1171_0)) of
- s1172_0 =>
+ ((s1562_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1563_0=
+ (let s1564_0 = s1563_0 in
+ if ((string_startswith s1564_0 "c.lw")) then
+ (case ((string_drop s1564_0 ((string_length "c.lw")))) of
+ s1565_0 =>
+ (case ((spc_matches_prefix0 s1565_0)) of
+ SOME ((() , s1566_0)) =>
+ (case ((string_drop s1565_0 s1566_0)) of
+ s1567_0 =>
+ (case ((creg_name_matches_prefix s1567_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1568_0)) =>
+ (case ((string_drop s1567_0 s1568_0)) of
+ s1569_0 =>
+ (case ((sep_matches_prefix s1569_0)) of
+ SOME ((() , s1570_0)) =>
+ (case ((string_drop s1569_0 s1570_0)) of
+ s1571_0 =>
+ (case ((creg_name_matches_prefix s1571_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s1572_0)) =>
+ (case ((string_drop s1571_0 s1572_0)) of
+ s1573_0 =>
+ (case ((sep_matches_prefix s1573_0)) of
+ SOME ((() , s1574_0)) =>
+ (case ((string_drop s1573_0 s1574_0)) of
+ s1575_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1172_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1575_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__810, s1173_0)) =>
- if (((((subrange_vec_dec v__810 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1192, s1576_0)) =>
+ if (((((subrange_vec_dec v__1192 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__810 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1192 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__810 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1172_0 s1173_0) in
+ ((subrange_vec_dec v__1192 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1575_0 s1576_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -25904,36 +35298,36 @@ val _ = Define `
else NONE))`;
-(*val _s1147_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1550_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1147_:string ->((3)words$word#(8)words$word)option) s1148_0=
- (let s1149_0 = s1148_0 in
- if ((string_startswith s1149_0 "c.addi4spn")) then
- (case ((string_drop s1149_0 ((string_length "c.addi4spn")))) of
- s1150_0 =>
- (case ((spc_matches_prefix0 s1150_0)) of
- SOME ((() , s1151_0)) =>
- (case ((string_drop s1150_0 s1151_0)) of
- s1152_0 =>
- (case ((creg_name_matches_prefix s1152_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1153_0)) =>
- (case ((string_drop s1152_0 s1153_0)) of
- s1154_0 =>
- (case ((sep_matches_prefix s1154_0)) of
- SOME ((() , s1155_0)) =>
- (case ((string_drop s1154_0 s1155_0)) of
- s1156_0 =>
+ ((s1550_:string ->((3)words$word#(8)words$word)option) s1551_0=
+ (let s1552_0 = s1551_0 in
+ if ((string_startswith s1552_0 "c.addi4spn")) then
+ (case ((string_drop s1552_0 ((string_length "c.addi4spn")))) of
+ s1553_0 =>
+ (case ((spc_matches_prefix0 s1553_0)) of
+ SOME ((() , s1554_0)) =>
+ (case ((string_drop s1553_0 s1554_0)) of
+ s1555_0 =>
+ (case ((creg_name_matches_prefix s1555_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1556_0)) =>
+ (case ((string_drop s1555_0 s1556_0)) of
+ s1557_0 =>
+ (case ((sep_matches_prefix s1557_0)) of
+ SOME ((() , s1558_0)) =>
+ (case ((string_drop s1557_0 s1558_0)) of
+ s1559_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1156_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__812, s1157_0)) =>
- if (((((subrange_vec_dec v__812 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1559_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1194, s1560_0)) =>
+ if (((((subrange_vec_dec v__1194 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__812 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1194 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__812 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- let p0_ = (string_drop s1156_0 s1157_0) in
+ ((subrange_vec_dec v__1194 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ let p0_ = (string_drop s1559_0 s1560_0) in
if (((p0_ = ""))) then SOME (rdc, nzimm) else NONE else NONE
| _ => NONE
)
@@ -25950,57 +35344,63 @@ val _ = Define `
else NONE))`;
-(*val _s1123_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1123_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1124_0=
- ((case s1124_0 of
- s1125_0 =>
- (case ((amo_mnemonic_matches_prefix s1125_0)) of
- SOME ((op, s1126_0)) =>
- let s1127_0 = (string_drop s1125_0 s1126_0) in
- if ((string_startswith s1127_0 ".")) then
- (case ((string_drop s1127_0 ((string_length ".")))) of
- s1128_0 =>
- (case ((size_mnemonic_matches_prefix s1128_0)) of
- SOME ((width, s1129_0)) =>
- (case ((string_drop s1128_0 s1129_0)) of
- s1130_0 =>
- (case ((maybe_aq_matches_prefix s1130_0)) of
- SOME ((aq, s1131_0)) =>
- (case ((string_drop s1130_0 s1131_0)) of
- s1132_0 =>
- (case ((maybe_rl_matches_prefix s1132_0)) of
- SOME ((rl, s1133_0)) =>
- (case ((string_drop s1132_0 s1133_0)) of
- s1134_0 =>
- (case ((spc_matches_prefix0 s1134_0)) of
- SOME ((() , s1135_0)) =>
- (case ((string_drop s1134_0 s1135_0)) of
- s1136_0 =>
- (case ((reg_name_matches_prefix s1136_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1137_0)) =>
- (case ((string_drop s1136_0 s1137_0)) of
- s1138_0 =>
- (case ((sep_matches_prefix s1138_0)) of
- SOME ((() , s1139_0)) =>
- (case ((string_drop s1138_0 s1139_0)) of
- s1140_0 =>
- (case ((reg_name_matches_prefix s1140_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1141_0)) =>
- (case ((string_drop s1140_0 s1141_0)) of
- s1142_0 =>
- (case ((sep_matches_prefix s1142_0)) of
- SOME ((() , s1143_0)) =>
- (case ((string_drop s1142_0 s1143_0)) of
- s1144_0 =>
- (case ((reg_name_matches_prefix s1144_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1145_0)) =>
- let p0_ = (string_drop s1144_0 s1145_0) in
- if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs1, rs2) else NONE
- | _ => NONE
- )
- )
+(*val _s1524_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1524_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1525_0=
+ ((case s1525_0 of
+ s1526_0 =>
+ (case ((amo_mnemonic_matches_prefix s1526_0)) of
+ SOME ((op, s1527_0)) =>
+ let s1528_0 = (string_drop s1526_0 s1527_0) in
+ if ((string_startswith s1528_0 ".")) then
+ (case ((string_drop s1528_0 ((string_length ".")))) of
+ s1529_0 =>
+ (case ((size_mnemonic_matches_prefix s1529_0)) of
+ SOME ((width, s1530_0)) =>
+ (case ((string_drop s1529_0 s1530_0)) of
+ s1531_0 =>
+ (case ((maybe_aq_matches_prefix s1531_0)) of
+ SOME ((aq, s1532_0)) =>
+ (case ((string_drop s1531_0 s1532_0)) of
+ s1533_0 =>
+ (case ((maybe_rl_matches_prefix s1533_0)) of
+ SOME ((rl, s1534_0)) =>
+ (case ((string_drop s1533_0 s1534_0)) of
+ s1535_0 =>
+ (case ((spc_matches_prefix0 s1535_0)) of
+ SOME ((() , s1536_0)) =>
+ (case ((string_drop s1535_0 s1536_0)) of
+ s1537_0 =>
+ (case ((reg_name_matches_prefix s1537_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1538_0)) =>
+ (case ((string_drop s1537_0 s1538_0)) of
+ s1539_0 =>
+ (case ((sep_matches_prefix s1539_0)) of
+ SOME ((() , s1540_0)) =>
+ (case ((string_drop s1539_0 s1540_0)) of
+ s1541_0 =>
+ (case ((reg_name_matches_prefix s1541_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1542_0)) =>
+ (case ((string_drop s1541_0 s1542_0)) of
+ s1543_0 =>
+ (case ((sep_matches_prefix s1543_0)) of
+ SOME ((() , s1544_0)) =>
+ let s1545_0 = (string_drop s1543_0 s1544_0) in
+ if ((string_startswith s1545_0 "(")) then
+ (case ((string_drop s1545_0 ((string_length "(")))) of
+ s1546_0 =>
+ (case ((reg_name_matches_prefix s1546_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1547_0)) =>
+ let s1548_0 = (string_drop s1546_0 s1547_0) in
+ if ((string_startswith s1548_0 ")")) then
+ let p0_ = (string_drop s1548_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs2, rs1) else
+ NONE else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -26030,49 +35430,49 @@ val _ = Define `
)))`;
-(*val _s1101_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1101_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1102_0=
- (let s1103_0 = s1102_0 in
- if ((string_startswith s1103_0 "sc.")) then
- (case ((string_drop s1103_0 ((string_length "sc.")))) of
- s1104_0 =>
- (case ((size_mnemonic_matches_prefix s1104_0)) of
- SOME ((size1, s1105_0)) =>
- (case ((string_drop s1104_0 s1105_0)) of
- s1106_0 =>
- (case ((maybe_aq_matches_prefix s1106_0)) of
- SOME ((aq, s1107_0)) =>
- (case ((string_drop s1106_0 s1107_0)) of
- s1108_0 =>
- (case ((maybe_rl_matches_prefix s1108_0)) of
- SOME ((rl, s1109_0)) =>
- (case ((string_drop s1108_0 s1109_0)) of
- s1110_0 =>
- (case ((spc_matches_prefix0 s1110_0)) of
- SOME ((() , s1111_0)) =>
- (case ((string_drop s1110_0 s1111_0)) of
- s1112_0 =>
- (case ((reg_name_matches_prefix s1112_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1113_0)) =>
- (case ((string_drop s1112_0 s1113_0)) of
- s1114_0 =>
- (case ((sep_matches_prefix s1114_0)) of
- SOME ((() , s1115_0)) =>
- (case ((string_drop s1114_0 s1115_0)) of
- s1116_0 =>
- (case ((reg_name_matches_prefix s1116_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1117_0)) =>
- (case ((string_drop s1116_0 s1117_0)) of
- s1118_0 =>
- (case ((sep_matches_prefix s1118_0)) of
- SOME ((() , s1119_0)) =>
- (case ((string_drop s1118_0 s1119_0)) of
- s1120_0 =>
- (case ((reg_name_matches_prefix s1120_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1121_0)) =>
- let p0_ = (string_drop s1120_0 s1121_0) in
+(*val _s1502_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1502_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1503_0=
+ (let s1504_0 = s1503_0 in
+ if ((string_startswith s1504_0 "sc.")) then
+ (case ((string_drop s1504_0 ((string_length "sc.")))) of
+ s1505_0 =>
+ (case ((size_mnemonic_matches_prefix s1505_0)) of
+ SOME ((size1, s1506_0)) =>
+ (case ((string_drop s1505_0 s1506_0)) of
+ s1507_0 =>
+ (case ((maybe_aq_matches_prefix s1507_0)) of
+ SOME ((aq, s1508_0)) =>
+ (case ((string_drop s1507_0 s1508_0)) of
+ s1509_0 =>
+ (case ((maybe_rl_matches_prefix s1509_0)) of
+ SOME ((rl, s1510_0)) =>
+ (case ((string_drop s1509_0 s1510_0)) of
+ s1511_0 =>
+ (case ((spc_matches_prefix0 s1511_0)) of
+ SOME ((() , s1512_0)) =>
+ (case ((string_drop s1511_0 s1512_0)) of
+ s1513_0 =>
+ (case ((reg_name_matches_prefix s1513_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1514_0)) =>
+ (case ((string_drop s1513_0 s1514_0)) of
+ s1515_0 =>
+ (case ((sep_matches_prefix s1515_0)) of
+ SOME ((() , s1516_0)) =>
+ (case ((string_drop s1515_0 s1516_0)) of
+ s1517_0 =>
+ (case ((reg_name_matches_prefix s1517_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1518_0)) =>
+ (case ((string_drop s1517_0 s1518_0)) of
+ s1519_0 =>
+ (case ((sep_matches_prefix s1519_0)) of
+ SOME ((() , s1520_0)) =>
+ (case ((string_drop s1519_0 s1520_0)) of
+ s1521_0 =>
+ (case ((reg_name_matches_prefix s1521_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1522_0)) =>
+ let p0_ = (string_drop s1521_0 s1522_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26104,41 +35504,41 @@ val _ = Define `
else NONE))`;
-(*val _s1083_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
+(*val _s1484_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1083_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1084_0=
- (let s1085_0 = s1084_0 in
- if ((string_startswith s1085_0 "lr.")) then
- (case ((string_drop s1085_0 ((string_length "lr.")))) of
- s1086_0 =>
- (case ((size_mnemonic_matches_prefix s1086_0)) of
- SOME ((size1, s1087_0)) =>
- (case ((string_drop s1086_0 s1087_0)) of
- s1088_0 =>
- (case ((maybe_aq_matches_prefix s1088_0)) of
- SOME ((aq, s1089_0)) =>
- (case ((string_drop s1088_0 s1089_0)) of
- s1090_0 =>
- (case ((maybe_rl_matches_prefix s1090_0)) of
- SOME ((rl, s1091_0)) =>
- (case ((string_drop s1090_0 s1091_0)) of
- s1092_0 =>
- (case ((spc_matches_prefix0 s1092_0)) of
- SOME ((() , s1093_0)) =>
- (case ((string_drop s1092_0 s1093_0)) of
- s1094_0 =>
- (case ((reg_name_matches_prefix s1094_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1095_0)) =>
- (case ((string_drop s1094_0 s1095_0)) of
- s1096_0 =>
- (case ((sep_matches_prefix s1096_0)) of
- SOME ((() , s1097_0)) =>
- (case ((string_drop s1096_0 s1097_0)) of
- s1098_0 =>
- (case ((reg_name_matches_prefix s1098_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1099_0)) =>
- let p0_ = (string_drop s1098_0 s1099_0) in
+ ((s1484_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1485_0=
+ (let s1486_0 = s1485_0 in
+ if ((string_startswith s1486_0 "lr.")) then
+ (case ((string_drop s1486_0 ((string_length "lr.")))) of
+ s1487_0 =>
+ (case ((size_mnemonic_matches_prefix s1487_0)) of
+ SOME ((size1, s1488_0)) =>
+ (case ((string_drop s1487_0 s1488_0)) of
+ s1489_0 =>
+ (case ((maybe_aq_matches_prefix s1489_0)) of
+ SOME ((aq, s1490_0)) =>
+ (case ((string_drop s1489_0 s1490_0)) of
+ s1491_0 =>
+ (case ((maybe_rl_matches_prefix s1491_0)) of
+ SOME ((rl, s1492_0)) =>
+ (case ((string_drop s1491_0 s1492_0)) of
+ s1493_0 =>
+ (case ((spc_matches_prefix0 s1493_0)) of
+ SOME ((() , s1494_0)) =>
+ (case ((string_drop s1493_0 s1494_0)) of
+ s1495_0 =>
+ (case ((reg_name_matches_prefix s1495_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1496_0)) =>
+ (case ((string_drop s1495_0 s1496_0)) of
+ s1497_0 =>
+ (case ((sep_matches_prefix s1497_0)) of
+ SOME ((() , s1498_0)) =>
+ (case ((string_drop s1497_0 s1498_0)) of
+ s1499_0 =>
+ (case ((reg_name_matches_prefix s1499_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1500_0)) =>
+ let p0_ = (string_drop s1499_0 s1500_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1) else NONE
| _ => NONE
)
@@ -26164,29 +35564,29 @@ val _ = Define `
else NONE))`;
-(*val _s1071_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s1472_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1071_:string ->((5)words$word#(5)words$word)option) s1072_0=
- (let s1073_0 = s1072_0 in
- if ((string_startswith s1073_0 "sfence.vma")) then
- (case ((string_drop s1073_0 ((string_length "sfence.vma")))) of
- s1074_0 =>
- (case ((spc_matches_prefix0 s1074_0)) of
- SOME ((() , s1075_0)) =>
- (case ((string_drop s1074_0 s1075_0)) of
- s1076_0 =>
- (case ((reg_name_matches_prefix s1076_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1077_0)) =>
- (case ((string_drop s1076_0 s1077_0)) of
- s1078_0 =>
- (case ((sep_matches_prefix s1078_0)) of
- SOME ((() , s1079_0)) =>
- (case ((string_drop s1078_0 s1079_0)) of
- s1080_0 =>
- (case ((reg_name_matches_prefix s1080_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1081_0)) =>
- let p0_ = (string_drop s1080_0 s1081_0) in
+ ((s1472_:string ->((5)words$word#(5)words$word)option) s1473_0=
+ (let s1474_0 = s1473_0 in
+ if ((string_startswith s1474_0 "sfence.vma")) then
+ (case ((string_drop s1474_0 ((string_length "sfence.vma")))) of
+ s1475_0 =>
+ (case ((spc_matches_prefix0 s1475_0)) of
+ SOME ((() , s1476_0)) =>
+ (case ((string_drop s1475_0 s1476_0)) of
+ s1477_0 =>
+ (case ((reg_name_matches_prefix s1477_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1478_0)) =>
+ (case ((string_drop s1477_0 s1478_0)) of
+ s1479_0 =>
+ (case ((sep_matches_prefix s1479_0)) of
+ SOME ((() , s1480_0)) =>
+ (case ((string_drop s1479_0 s1480_0)) of
+ s1481_0 =>
+ (case ((reg_name_matches_prefix s1481_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1482_0)) =>
+ let p0_ = (string_drop s1481_0 s1482_0) in
if (((p0_ = ""))) then SOME (rs1, rs2) else NONE
| _ => NONE
)
@@ -26203,29 +35603,29 @@ val _ = Define `
else NONE))`;
-(*val _s1059_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s1460_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1059_:string ->((4)words$word#(4)words$word)option) s1060_0=
- (let s1061_0 = s1060_0 in
- if ((string_startswith s1061_0 "fence.tso")) then
- (case ((string_drop s1061_0 ((string_length "fence.tso")))) of
- s1062_0 =>
- (case ((spc_matches_prefix0 s1062_0)) of
- SOME ((() , s1063_0)) =>
- (case ((string_drop s1062_0 s1063_0)) of
- s1064_0 =>
- (case ((fence_bits_matches_prefix s1064_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1065_0)) =>
- (case ((string_drop s1064_0 s1065_0)) of
- s1066_0 =>
- (case ((sep_matches_prefix s1066_0)) of
- SOME ((() , s1067_0)) =>
- (case ((string_drop s1066_0 s1067_0)) of
- s1068_0 =>
- (case ((fence_bits_matches_prefix s1068_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1069_0)) =>
- let p0_ = (string_drop s1068_0 s1069_0) in
+ ((s1460_:string ->((4)words$word#(4)words$word)option) s1461_0=
+ (let s1462_0 = s1461_0 in
+ if ((string_startswith s1462_0 "fence.tso")) then
+ (case ((string_drop s1462_0 ((string_length "fence.tso")))) of
+ s1463_0 =>
+ (case ((spc_matches_prefix0 s1463_0)) of
+ SOME ((() , s1464_0)) =>
+ (case ((string_drop s1463_0 s1464_0)) of
+ s1465_0 =>
+ (case ((fence_bits_matches_prefix s1465_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s1466_0)) =>
+ (case ((string_drop s1465_0 s1466_0)) of
+ s1467_0 =>
+ (case ((sep_matches_prefix s1467_0)) of
+ SOME ((() , s1468_0)) =>
+ (case ((string_drop s1467_0 s1468_0)) of
+ s1469_0 =>
+ (case ((fence_bits_matches_prefix s1469_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s1470_0)) =>
+ let p0_ = (string_drop s1469_0 s1470_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -26242,29 +35642,29 @@ val _ = Define `
else NONE))`;
-(*val _s1047_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s1448_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1047_:string ->((4)words$word#(4)words$word)option) s1048_0=
- (let s1049_0 = s1048_0 in
- if ((string_startswith s1049_0 "fence")) then
- (case ((string_drop s1049_0 ((string_length "fence")))) of
- s1050_0 =>
- (case ((spc_matches_prefix0 s1050_0)) of
- SOME ((() , s1051_0)) =>
- (case ((string_drop s1050_0 s1051_0)) of
- s1052_0 =>
- (case ((fence_bits_matches_prefix s1052_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1053_0)) =>
- (case ((string_drop s1052_0 s1053_0)) of
- s1054_0 =>
- (case ((sep_matches_prefix s1054_0)) of
- SOME ((() , s1055_0)) =>
- (case ((string_drop s1054_0 s1055_0)) of
- s1056_0 =>
- (case ((fence_bits_matches_prefix s1056_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1057_0)) =>
- let p0_ = (string_drop s1056_0 s1057_0) in
+ ((s1448_:string ->((4)words$word#(4)words$word)option) s1449_0=
+ (let s1450_0 = s1449_0 in
+ if ((string_startswith s1450_0 "fence")) then
+ (case ((string_drop s1450_0 ((string_length "fence")))) of
+ s1451_0 =>
+ (case ((spc_matches_prefix0 s1451_0)) of
+ SOME ((() , s1452_0)) =>
+ (case ((string_drop s1451_0 s1452_0)) of
+ s1453_0 =>
+ (case ((fence_bits_matches_prefix s1453_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s1454_0)) =>
+ (case ((string_drop s1453_0 s1454_0)) of
+ s1455_0 =>
+ (case ((sep_matches_prefix s1455_0)) of
+ SOME ((() , s1456_0)) =>
+ (case ((string_drop s1455_0 s1456_0)) of
+ s1457_0 =>
+ (case ((fence_bits_matches_prefix s1457_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s1458_0)) =>
+ let p0_ = (string_drop s1457_0 s1458_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -26281,41 +35681,41 @@ val _ = Define `
else NONE))`;
-(*val _s1030_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1431_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1030_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1031_0=
- ((case s1031_0 of
- s1032_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s1032_0)) of
- SOME ((op, s1033_0)) =>
- (case ((string_drop s1032_0 s1033_0)) of
- s1034_0 =>
- (case ((spc_matches_prefix0 s1034_0)) of
- SOME ((() , s1035_0)) =>
- (case ((string_drop s1034_0 s1035_0)) of
- s1036_0 =>
- (case ((reg_name_matches_prefix s1036_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1037_0)) =>
- (case ((string_drop s1036_0 s1037_0)) of
- s1038_0 =>
- (case ((sep_matches_prefix s1038_0)) of
- SOME ((() , s1039_0)) =>
- (case ((string_drop s1038_0 s1039_0)) of
- s1040_0 =>
- (case ((reg_name_matches_prefix s1040_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1041_0)) =>
- (case ((string_drop s1040_0 s1041_0)) of
- s1042_0 =>
- (case ((sep_matches_prefix s1042_0)) of
- SOME ((() , s1043_0)) =>
- (case ((string_drop s1042_0 s1043_0)) of
- s1044_0 =>
+ ((s1431_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1432_0=
+ ((case s1432_0 of
+ s1433_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s1433_0)) of
+ SOME ((op, s1434_0)) =>
+ (case ((string_drop s1433_0 s1434_0)) of
+ s1435_0 =>
+ (case ((spc_matches_prefix0 s1435_0)) of
+ SOME ((() , s1436_0)) =>
+ (case ((string_drop s1435_0 s1436_0)) of
+ s1437_0 =>
+ (case ((reg_name_matches_prefix s1437_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1438_0)) =>
+ (case ((string_drop s1437_0 s1438_0)) of
+ s1439_0 =>
+ (case ((sep_matches_prefix s1439_0)) of
+ SOME ((() , s1440_0)) =>
+ (case ((string_drop s1439_0 s1440_0)) of
+ s1441_0 =>
+ (case ((reg_name_matches_prefix s1441_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1442_0)) =>
+ (case ((string_drop s1441_0 s1442_0)) of
+ s1443_0 =>
+ (case ((sep_matches_prefix s1443_0)) of
+ SOME ((() , s1444_0)) =>
+ (case ((string_drop s1443_0 s1444_0)) of
+ s1445_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1044_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1045_0)) =>
- let p0_ = (string_drop s1044_0 s1045_0) in
+ s1445_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s1446_0)) =>
+ let p0_ = (string_drop s1445_0 s1446_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26340,39 +35740,39 @@ val _ = Define `
)))`;
-(*val _s1013_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1013_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1014_0=
- ((case s1014_0 of
- s1015_0 =>
- (case ((rtypew_mnemonic_matches_prefix s1015_0)) of
- SOME ((op, s1016_0)) =>
- (case ((string_drop s1015_0 s1016_0)) of
- s1017_0 =>
- (case ((spc_matches_prefix0 s1017_0)) of
- SOME ((() , s1018_0)) =>
- (case ((string_drop s1017_0 s1018_0)) of
- s1019_0 =>
- (case ((reg_name_matches_prefix s1019_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1020_0)) =>
- (case ((string_drop s1019_0 s1020_0)) of
- s1021_0 =>
- (case ((sep_matches_prefix s1021_0)) of
- SOME ((() , s1022_0)) =>
- (case ((string_drop s1021_0 s1022_0)) of
- s1023_0 =>
- (case ((reg_name_matches_prefix s1023_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1024_0)) =>
- (case ((string_drop s1023_0 s1024_0)) of
- s1025_0 =>
- (case ((sep_matches_prefix s1025_0)) of
- SOME ((() , s1026_0)) =>
- (case ((string_drop s1025_0 s1026_0)) of
- s1027_0 =>
- (case ((reg_name_matches_prefix s1027_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1028_0)) =>
- let p0_ = (string_drop s1027_0 s1028_0) in
+(*val _s1414_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1414_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1415_0=
+ ((case s1415_0 of
+ s1416_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s1416_0)) of
+ SOME ((op, s1417_0)) =>
+ (case ((string_drop s1416_0 s1417_0)) of
+ s1418_0 =>
+ (case ((spc_matches_prefix0 s1418_0)) of
+ SOME ((() , s1419_0)) =>
+ (case ((string_drop s1418_0 s1419_0)) of
+ s1420_0 =>
+ (case ((reg_name_matches_prefix s1420_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1421_0)) =>
+ (case ((string_drop s1420_0 s1421_0)) of
+ s1422_0 =>
+ (case ((sep_matches_prefix s1422_0)) of
+ SOME ((() , s1423_0)) =>
+ (case ((string_drop s1422_0 s1423_0)) of
+ s1424_0 =>
+ (case ((reg_name_matches_prefix s1424_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1425_0)) =>
+ (case ((string_drop s1424_0 s1425_0)) of
+ s1426_0 =>
+ (case ((sep_matches_prefix s1426_0)) of
+ SOME ((() , s1427_0)) =>
+ (case ((string_drop s1426_0 s1427_0)) of
+ s1428_0 =>
+ (case ((reg_name_matches_prefix s1428_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1429_0)) =>
+ let p0_ = (string_drop s1428_0 s1429_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26397,41 +35797,41 @@ val _ = Define `
)))`;
-(*val _s996_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s996_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s997_0=
- ((case s997_0 of
- s998_0 =>
- (case ((shiftw_mnemonic_matches_prefix s998_0)) of
- SOME ((op, s999_0)) =>
- (case ((string_drop s998_0 s999_0)) of
- s1000_0 =>
- (case ((spc_matches_prefix0 s1000_0)) of
- SOME ((() , s1001_0)) =>
- (case ((string_drop s1000_0 s1001_0)) of
- s1002_0 =>
- (case ((reg_name_matches_prefix s1002_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1003_0)) =>
- (case ((string_drop s1002_0 s1003_0)) of
- s1004_0 =>
- (case ((sep_matches_prefix s1004_0)) of
- SOME ((() , s1005_0)) =>
- (case ((string_drop s1004_0 s1005_0)) of
- s1006_0 =>
- (case ((reg_name_matches_prefix s1006_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1007_0)) =>
- (case ((string_drop s1006_0 s1007_0)) of
- s1008_0 =>
- (case ((sep_matches_prefix s1008_0)) of
- SOME ((() , s1009_0)) =>
- (case ((string_drop s1008_0 s1009_0)) of
- s1010_0 =>
+(*val _s1397_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1397_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s1398_0=
+ ((case s1398_0 of
+ s1399_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s1399_0)) of
+ SOME ((op, s1400_0)) =>
+ (case ((string_drop s1399_0 s1400_0)) of
+ s1401_0 =>
+ (case ((spc_matches_prefix0 s1401_0)) of
+ SOME ((() , s1402_0)) =>
+ (case ((string_drop s1401_0 s1402_0)) of
+ s1403_0 =>
+ (case ((reg_name_matches_prefix s1403_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1404_0)) =>
+ (case ((string_drop s1403_0 s1404_0)) of
+ s1405_0 =>
+ (case ((sep_matches_prefix s1405_0)) of
+ SOME ((() , s1406_0)) =>
+ (case ((string_drop s1405_0 s1406_0)) of
+ s1407_0 =>
+ (case ((reg_name_matches_prefix s1407_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1408_0)) =>
+ (case ((string_drop s1407_0 s1408_0)) of
+ s1409_0 =>
+ (case ((sep_matches_prefix s1409_0)) of
+ SOME ((() , s1410_0)) =>
+ (case ((string_drop s1409_0 s1410_0)) of
+ s1411_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1010_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1011_0)) =>
- let p0_ = (string_drop s1010_0 s1011_0) in
+ s1411_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s1412_0)) =>
+ let p0_ = (string_drop s1411_0 s1412_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26456,39 +35856,38 @@ val _ = Define `
)))`;
-(*val _s980_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+(*val _s1381_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
val _ = Define `
- ((s980_:string ->((5)words$word#(5)words$word#(12)words$word)option) s981_0=
- (let s982_0 = s981_0 in
- if ((string_startswith s982_0 "addiw")) then
- (case ((string_drop s982_0 ((string_length "addiw")))) of
- s983_0 =>
- (case ((spc_matches_prefix0 s983_0)) of
- SOME ((() , s984_0)) =>
- (case ((string_drop s983_0 s984_0)) of
- s985_0 =>
- (case ((reg_name_matches_prefix s985_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s986_0)) =>
- (case ((string_drop s985_0 s986_0)) of
- s987_0 =>
- (case ((sep_matches_prefix s987_0)) of
- SOME ((() , s988_0)) =>
- (case ((string_drop s987_0 s988_0)) of
- s989_0 =>
- (case ((reg_name_matches_prefix s989_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s990_0)) =>
- (case ((string_drop s989_0 s990_0)) of
- s991_0 =>
- (case ((sep_matches_prefix s991_0)) of
- SOME ((() , s992_0)) =>
- (case ((string_drop s991_0 s992_0)) of
- s993_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s993_0
+ ((s1381_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1382_0=
+ (let s1383_0 = s1382_0 in
+ if ((string_startswith s1383_0 "addiw")) then
+ (case ((string_drop s1383_0 ((string_length "addiw")))) of
+ s1384_0 =>
+ (case ((spc_matches_prefix0 s1384_0)) of
+ SOME ((() , s1385_0)) =>
+ (case ((string_drop s1384_0 s1385_0)) of
+ s1386_0 =>
+ (case ((reg_name_matches_prefix s1386_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1387_0)) =>
+ (case ((string_drop s1386_0 s1387_0)) of
+ s1388_0 =>
+ (case ((sep_matches_prefix s1388_0)) of
+ SOME ((() , s1389_0)) =>
+ (case ((string_drop s1388_0 s1389_0)) of
+ s1390_0 =>
+ (case ((reg_name_matches_prefix s1390_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1391_0)) =>
+ (case ((string_drop s1390_0 s1391_0)) of
+ s1392_0 =>
+ (case ((sep_matches_prefix s1392_0)) of
+ SOME ((() , s1393_0)) =>
+ (case ((string_drop s1392_0 s1393_0)) of
+ s1394_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1394_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s994_0)) =>
- let p0_ = (string_drop s993_0 s994_0) in
+ SOME ((imm, s1395_0)) =>
+ let p0_ = (string_drop s1394_0 s1395_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -26511,63 +35910,62 @@ val _ = Define `
else NONE))`;
-(*val _s952_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s1353_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s952_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s953_0=
- (let s954_0 = s953_0 in
- if ((string_startswith s954_0 "s")) then
- (case ((string_drop s954_0 ((string_length "s")))) of
- s955_0 =>
- (case ((size_mnemonic_matches_prefix s955_0)) of
- SOME ((size1, s956_0)) =>
- (case ((string_drop s955_0 s956_0)) of
- s957_0 =>
- (case ((maybe_aq_matches_prefix s957_0)) of
- SOME ((aq, s958_0)) =>
- (case ((string_drop s957_0 s958_0)) of
- s959_0 =>
- (case ((maybe_rl_matches_prefix s959_0)) of
- SOME ((rl, s960_0)) =>
- (case ((string_drop s959_0 s960_0)) of
- s961_0 =>
- (case ((spc_matches_prefix0 s961_0)) of
- SOME ((() , s962_0)) =>
- (case ((string_drop s961_0 s962_0)) of
- s963_0 =>
- (case ((reg_name_matches_prefix s963_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s964_0)) =>
- (case ((string_drop s963_0 s964_0)) of
- s965_0 =>
- (case ((sep_matches_prefix s965_0)) of
- SOME ((() , s966_0)) =>
- (case ((string_drop s965_0 s966_0)) of
- s967_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s967_0
+ ((s1353_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1354_0=
+ (let s1355_0 = s1354_0 in
+ if ((string_startswith s1355_0 "s")) then
+ (case ((string_drop s1355_0 ((string_length "s")))) of
+ s1356_0 =>
+ (case ((size_mnemonic_matches_prefix s1356_0)) of
+ SOME ((size1, s1357_0)) =>
+ (case ((string_drop s1356_0 s1357_0)) of
+ s1358_0 =>
+ (case ((maybe_aq_matches_prefix s1358_0)) of
+ SOME ((aq, s1359_0)) =>
+ (case ((string_drop s1358_0 s1359_0)) of
+ s1360_0 =>
+ (case ((maybe_rl_matches_prefix s1360_0)) of
+ SOME ((rl, s1361_0)) =>
+ (case ((string_drop s1360_0 s1361_0)) of
+ s1362_0 =>
+ (case ((spc_matches_prefix0 s1362_0)) of
+ SOME ((() , s1363_0)) =>
+ (case ((string_drop s1362_0 s1363_0)) of
+ s1364_0 =>
+ (case ((reg_name_matches_prefix s1364_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1365_0)) =>
+ (case ((string_drop s1364_0 s1365_0)) of
+ s1366_0 =>
+ (case ((sep_matches_prefix s1366_0)) of
+ SOME ((() , s1367_0)) =>
+ (case ((string_drop s1366_0 s1367_0)) of
+ s1368_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1368_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s968_0)) =>
- (case ((string_drop s967_0 s968_0)) of
- s969_0 =>
- (case ((opt_spc_matches_prefix0 s969_0)) of
- SOME ((() , s970_0)) =>
- let s971_0 = (string_drop s969_0 s970_0) in
- if ((string_startswith s971_0 "(")) then
- (case ((string_drop s971_0 ((string_length "(")))) of
- s972_0 =>
- (case ((opt_spc_matches_prefix0 s972_0)) of
- SOME ((() , s973_0)) =>
- (case ((string_drop s972_0 s973_0)) of
- s974_0 =>
- (case ((reg_name_matches_prefix s974_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s975_0)) =>
- (case ((string_drop s974_0 s975_0)) of
- s976_0 =>
- (case ((opt_spc_matches_prefix0 s976_0)) of
- SOME ((() , s977_0)) =>
- let s978_0 = (string_drop s976_0 s977_0) in
- if ((string_startswith s978_0 ")")) then
- let p0_ = (string_drop s978_0 ((string_length ")"))) in
+ SOME ((imm, s1369_0)) =>
+ (case ((string_drop s1368_0 s1369_0)) of
+ s1370_0 =>
+ (case ((opt_spc_matches_prefix0 s1370_0)) of
+ SOME ((() , s1371_0)) =>
+ let s1372_0 = (string_drop s1370_0 s1371_0) in
+ if ((string_startswith s1372_0 "(")) then
+ (case ((string_drop s1372_0 ((string_length "(")))) of
+ s1373_0 =>
+ (case ((opt_spc_matches_prefix0 s1373_0)) of
+ SOME ((() , s1374_0)) =>
+ (case ((string_drop s1373_0 s1374_0)) of
+ s1375_0 =>
+ (case ((reg_name_matches_prefix s1375_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1376_0)) =>
+ (case ((string_drop s1375_0 s1376_0)) of
+ s1377_0 =>
+ (case ((opt_spc_matches_prefix0 s1377_0)) of
+ SOME ((() , s1378_0)) =>
+ let s1379_0 = (string_drop s1377_0 s1378_0) in
+ if ((string_startswith s1379_0 ")")) then
+ let p0_ = (string_drop s1379_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rs2, imm, rs1) else NONE
else NONE
| _ => NONE
@@ -26606,67 +36004,66 @@ val _ = Define `
else NONE))`;
-(*val _s922_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s1323_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s922_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s923_0=
- (let s924_0 = s923_0 in
- if ((string_startswith s924_0 "l")) then
- (case ((string_drop s924_0 ((string_length "l")))) of
- s925_0 =>
- (case ((size_mnemonic_matches_prefix s925_0)) of
- SOME ((size1, s926_0)) =>
- (case ((string_drop s925_0 s926_0)) of
- s927_0 =>
- (case ((maybe_u_matches_prefix s927_0)) of
- SOME ((is_unsigned, s928_0)) =>
- (case ((string_drop s927_0 s928_0)) of
- s929_0 =>
- (case ((maybe_aq_matches_prefix s929_0)) of
- SOME ((aq, s930_0)) =>
- (case ((string_drop s929_0 s930_0)) of
- s931_0 =>
- (case ((maybe_rl_matches_prefix s931_0)) of
- SOME ((rl, s932_0)) =>
- (case ((string_drop s931_0 s932_0)) of
- s933_0 =>
- (case ((spc_matches_prefix0 s933_0)) of
- SOME ((() , s934_0)) =>
- (case ((string_drop s933_0 s934_0)) of
- s935_0 =>
- (case ((reg_name_matches_prefix s935_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s936_0)) =>
- (case ((string_drop s935_0 s936_0)) of
- s937_0 =>
- (case ((sep_matches_prefix s937_0)) of
- SOME ((() , s938_0)) =>
- (case ((string_drop s937_0 s938_0)) of
- s939_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s939_0
+ ((s1323_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1324_0=
+ (let s1325_0 = s1324_0 in
+ if ((string_startswith s1325_0 "l")) then
+ (case ((string_drop s1325_0 ((string_length "l")))) of
+ s1326_0 =>
+ (case ((size_mnemonic_matches_prefix s1326_0)) of
+ SOME ((size1, s1327_0)) =>
+ (case ((string_drop s1326_0 s1327_0)) of
+ s1328_0 =>
+ (case ((maybe_u_matches_prefix s1328_0)) of
+ SOME ((is_unsigned, s1329_0)) =>
+ (case ((string_drop s1328_0 s1329_0)) of
+ s1330_0 =>
+ (case ((maybe_aq_matches_prefix s1330_0)) of
+ SOME ((aq, s1331_0)) =>
+ (case ((string_drop s1330_0 s1331_0)) of
+ s1332_0 =>
+ (case ((maybe_rl_matches_prefix s1332_0)) of
+ SOME ((rl, s1333_0)) =>
+ (case ((string_drop s1332_0 s1333_0)) of
+ s1334_0 =>
+ (case ((spc_matches_prefix0 s1334_0)) of
+ SOME ((() , s1335_0)) =>
+ (case ((string_drop s1334_0 s1335_0)) of
+ s1336_0 =>
+ (case ((reg_name_matches_prefix s1336_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1337_0)) =>
+ (case ((string_drop s1336_0 s1337_0)) of
+ s1338_0 =>
+ (case ((sep_matches_prefix s1338_0)) of
+ SOME ((() , s1339_0)) =>
+ (case ((string_drop s1338_0 s1339_0)) of
+ s1340_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1340_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s940_0)) =>
- (case ((string_drop s939_0 s940_0)) of
- s941_0 =>
- (case ((opt_spc_matches_prefix0 s941_0)) of
- SOME ((() , s942_0)) =>
- let s943_0 = (string_drop s941_0 s942_0) in
- if ((string_startswith s943_0 "(")) then
- (case ((string_drop s943_0 ((string_length "(")))) of
- s944_0 =>
- (case ((opt_spc_matches_prefix0 s944_0)) of
- SOME ((() , s945_0)) =>
- (case ((string_drop s944_0 s945_0)) of
- s946_0 =>
- (case ((reg_name_matches_prefix s946_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s947_0)) =>
- (case ((string_drop s946_0 s947_0)) of
- s948_0 =>
- (case ((opt_spc_matches_prefix0 s948_0)) of
- SOME ((() , s949_0)) =>
- let s950_0 = (string_drop s948_0 s949_0) in
- if ((string_startswith s950_0 ")")) then
- let p0_ = (string_drop s950_0 ((string_length ")"))) in
+ SOME ((imm, s1341_0)) =>
+ (case ((string_drop s1340_0 s1341_0)) of
+ s1342_0 =>
+ (case ((opt_spc_matches_prefix0 s1342_0)) of
+ SOME ((() , s1343_0)) =>
+ let s1344_0 = (string_drop s1342_0 s1343_0) in
+ if ((string_startswith s1344_0 "(")) then
+ (case ((string_drop s1344_0 ((string_length "(")))) of
+ s1345_0 =>
+ (case ((opt_spc_matches_prefix0 s1345_0)) of
+ SOME ((() , s1346_0)) =>
+ (case ((string_drop s1345_0 s1346_0)) of
+ s1347_0 =>
+ (case ((reg_name_matches_prefix s1347_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1348_0)) =>
+ (case ((string_drop s1347_0 s1348_0)) of
+ s1349_0 =>
+ (case ((opt_spc_matches_prefix0 s1349_0)) of
+ SOME ((() , s1350_0)) =>
+ let s1351_0 = (string_drop s1349_0 s1350_0) in
+ if ((string_startswith s1351_0 ")")) then
+ let p0_ = (string_drop s1351_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, is_unsigned, aq, rl, rd, imm, rs1)
else NONE else NONE
| _ => NONE
@@ -26708,39 +36105,39 @@ val _ = Define `
else NONE))`;
-(*val _s905_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1306_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s905_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s906_0=
- ((case s906_0 of
- s907_0 =>
- (case ((rtype_mnemonic_matches_prefix s907_0)) of
- SOME ((op, s908_0)) =>
- (case ((string_drop s907_0 s908_0)) of
- s909_0 =>
- (case ((spc_matches_prefix0 s909_0)) of
- SOME ((() , s910_0)) =>
- (case ((string_drop s909_0 s910_0)) of
- s911_0 =>
- (case ((reg_name_matches_prefix s911_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s912_0)) =>
- (case ((string_drop s911_0 s912_0)) of
- s913_0 =>
- (case ((sep_matches_prefix s913_0)) of
- SOME ((() , s914_0)) =>
- (case ((string_drop s913_0 s914_0)) of
- s915_0 =>
- (case ((reg_name_matches_prefix s915_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s916_0)) =>
- (case ((string_drop s915_0 s916_0)) of
- s917_0 =>
- (case ((sep_matches_prefix s917_0)) of
- SOME ((() , s918_0)) =>
- (case ((string_drop s917_0 s918_0)) of
- s919_0 =>
- (case ((reg_name_matches_prefix s919_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s920_0)) =>
- let p0_ = (string_drop s919_0 s920_0) in
+ ((s1306_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s1307_0=
+ ((case s1307_0 of
+ s1308_0 =>
+ (case ((rtype_mnemonic_matches_prefix s1308_0)) of
+ SOME ((op, s1309_0)) =>
+ (case ((string_drop s1308_0 s1309_0)) of
+ s1310_0 =>
+ (case ((spc_matches_prefix0 s1310_0)) of
+ SOME ((() , s1311_0)) =>
+ (case ((string_drop s1310_0 s1311_0)) of
+ s1312_0 =>
+ (case ((reg_name_matches_prefix s1312_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1313_0)) =>
+ (case ((string_drop s1312_0 s1313_0)) of
+ s1314_0 =>
+ (case ((sep_matches_prefix s1314_0)) of
+ SOME ((() , s1315_0)) =>
+ (case ((string_drop s1314_0 s1315_0)) of
+ s1316_0 =>
+ (case ((reg_name_matches_prefix s1316_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1317_0)) =>
+ (case ((string_drop s1316_0 s1317_0)) of
+ s1318_0 =>
+ (case ((sep_matches_prefix s1318_0)) of
+ SOME ((() , s1319_0)) =>
+ (case ((string_drop s1318_0 s1319_0)) of
+ s1320_0 =>
+ (case ((reg_name_matches_prefix s1320_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1321_0)) =>
+ let p0_ = (string_drop s1320_0 s1321_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26765,41 +36162,41 @@ val _ = Define `
)))`;
-(*val _s888_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
-
-val _ = Define `
- ((s888_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s889_0=
- ((case s889_0 of
- s890_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s890_0)) of
- SOME ((op, s891_0)) =>
- (case ((string_drop s890_0 s891_0)) of
- s892_0 =>
- (case ((spc_matches_prefix0 s892_0)) of
- SOME ((() , s893_0)) =>
- (case ((string_drop s892_0 s893_0)) of
- s894_0 =>
- (case ((reg_name_matches_prefix s894_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s895_0)) =>
- (case ((string_drop s894_0 s895_0)) of
- s896_0 =>
- (case ((sep_matches_prefix s896_0)) of
- SOME ((() , s897_0)) =>
- (case ((string_drop s896_0 s897_0)) of
- s898_0 =>
- (case ((reg_name_matches_prefix s898_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s899_0)) =>
- (case ((string_drop s898_0 s899_0)) of
- s900_0 =>
- (case ((sep_matches_prefix s900_0)) of
- SOME ((() , s901_0)) =>
- (case ((string_drop s900_0 s901_0)) of
- s902_0 =>
+(*val _s1289_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s1289_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s1290_0=
+ ((case s1290_0 of
+ s1291_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s1291_0)) of
+ SOME ((op, s1292_0)) =>
+ (case ((string_drop s1291_0 s1292_0)) of
+ s1293_0 =>
+ (case ((spc_matches_prefix0 s1293_0)) of
+ SOME ((() , s1294_0)) =>
+ (case ((string_drop s1293_0 s1294_0)) of
+ s1295_0 =>
+ (case ((reg_name_matches_prefix s1295_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1296_0)) =>
+ (case ((string_drop s1295_0 s1296_0)) of
+ s1297_0 =>
+ (case ((sep_matches_prefix s1297_0)) of
+ SOME ((() , s1298_0)) =>
+ (case ((string_drop s1297_0 s1298_0)) of
+ s1299_0 =>
+ (case ((reg_name_matches_prefix s1299_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1300_0)) =>
+ (case ((string_drop s1299_0 s1300_0)) of
+ s1301_0 =>
+ (case ((sep_matches_prefix s1301_0)) of
+ SOME ((() , s1302_0)) =>
+ (case ((string_drop s1301_0 s1302_0)) of
+ s1303_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s902_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s903_0)) =>
- let p0_ = (string_drop s902_0 s903_0) in
+ s1303_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1304_0)) =>
+ let p0_ = (string_drop s1303_0 s1304_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26824,41 +36221,40 @@ val _ = Define `
)))`;
-(*val _s871_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s871_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s872_0=
- ((case s872_0 of
- s873_0 =>
- (case ((itype_mnemonic_matches_prefix s873_0)) of
- SOME ((op, s874_0)) =>
- (case ((string_drop s873_0 s874_0)) of
- s875_0 =>
- (case ((spc_matches_prefix0 s875_0)) of
- SOME ((() , s876_0)) =>
- (case ((string_drop s875_0 s876_0)) of
- s877_0 =>
- (case ((reg_name_matches_prefix s877_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s878_0)) =>
- (case ((string_drop s877_0 s878_0)) of
- s879_0 =>
- (case ((sep_matches_prefix s879_0)) of
- SOME ((() , s880_0)) =>
- (case ((string_drop s879_0 s880_0)) of
- s881_0 =>
- (case ((reg_name_matches_prefix s881_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s882_0)) =>
- (case ((string_drop s881_0 s882_0)) of
- s883_0 =>
- (case ((sep_matches_prefix s883_0)) of
- SOME ((() , s884_0)) =>
- (case ((string_drop s883_0 s884_0)) of
- s885_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s885_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s886_0)) =>
- let p0_ = (string_drop s885_0 s886_0) in
+(*val _s1272_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s1272_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s1273_0=
+ ((case s1273_0 of
+ s1274_0 =>
+ (case ((itype_mnemonic_matches_prefix s1274_0)) of
+ SOME ((op, s1275_0)) =>
+ (case ((string_drop s1274_0 s1275_0)) of
+ s1276_0 =>
+ (case ((spc_matches_prefix0 s1276_0)) of
+ SOME ((() , s1277_0)) =>
+ (case ((string_drop s1276_0 s1277_0)) of
+ s1278_0 =>
+ (case ((reg_name_matches_prefix s1278_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1279_0)) =>
+ (case ((string_drop s1278_0 s1279_0)) of
+ s1280_0 =>
+ (case ((sep_matches_prefix s1280_0)) of
+ SOME ((() , s1281_0)) =>
+ (case ((string_drop s1280_0 s1281_0)) of
+ s1282_0 =>
+ (case ((reg_name_matches_prefix s1282_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1283_0)) =>
+ (case ((string_drop s1282_0 s1283_0)) of
+ s1284_0 =>
+ (case ((sep_matches_prefix s1284_0)) of
+ SOME ((() , s1285_0)) =>
+ (case ((string_drop s1284_0 s1285_0)) of
+ s1286_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1286_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s1287_0)) =>
+ let p0_ = (string_drop s1286_0 s1287_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, imm) else NONE
| _ => NONE
)
@@ -26883,41 +36279,41 @@ val _ = Define `
)))`;
-(*val _s854_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
-
-val _ = Define `
- ((s854_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s855_0=
- ((case s855_0 of
- s856_0 =>
- (case ((btype_mnemonic_matches_prefix s856_0)) of
- SOME ((op, s857_0)) =>
- (case ((string_drop s856_0 s857_0)) of
- s858_0 =>
- (case ((spc_matches_prefix0 s858_0)) of
- SOME ((() , s859_0)) =>
- (case ((string_drop s858_0 s859_0)) of
- s860_0 =>
- (case ((reg_name_matches_prefix s860_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s861_0)) =>
- (case ((string_drop s860_0 s861_0)) of
- s862_0 =>
- (case ((sep_matches_prefix s862_0)) of
- SOME ((() , s863_0)) =>
- (case ((string_drop s862_0 s863_0)) of
- s864_0 =>
- (case ((reg_name_matches_prefix s864_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s865_0)) =>
- (case ((string_drop s864_0 s865_0)) of
- s866_0 =>
- (case ((sep_matches_prefix s866_0)) of
- SOME ((() , s867_0)) =>
- (case ((string_drop s866_0 s867_0)) of
- s868_0 =>
+(*val _s1255_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
+
+val _ = Define `
+ ((s1255_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s1256_0=
+ ((case s1256_0 of
+ s1257_0 =>
+ (case ((btype_mnemonic_matches_prefix s1257_0)) of
+ SOME ((op, s1258_0)) =>
+ (case ((string_drop s1257_0 s1258_0)) of
+ s1259_0 =>
+ (case ((spc_matches_prefix0 s1259_0)) of
+ SOME ((() , s1260_0)) =>
+ (case ((string_drop s1259_0 s1260_0)) of
+ s1261_0 =>
+ (case ((reg_name_matches_prefix s1261_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1262_0)) =>
+ (case ((string_drop s1261_0 s1262_0)) of
+ s1263_0 =>
+ (case ((sep_matches_prefix s1263_0)) of
+ SOME ((() , s1264_0)) =>
+ (case ((string_drop s1263_0 s1264_0)) of
+ s1265_0 =>
+ (case ((reg_name_matches_prefix s1265_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1266_0)) =>
+ (case ((string_drop s1265_0 s1266_0)) of
+ s1267_0 =>
+ (case ((sep_matches_prefix s1267_0)) of
+ SOME ((() , s1268_0)) =>
+ (case ((string_drop s1267_0 s1268_0)) of
+ s1269_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s868_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s869_0)) =>
- let p0_ = (string_drop s868_0 s869_0) in
+ s1269_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s1270_0)) =>
+ let p0_ = (string_drop s1269_0 s1270_0) in
if (((p0_ = ""))) then SOME (op, rs1, rs2, imm) else NONE
| _ => NONE
)
@@ -26942,39 +36338,38 @@ val _ = Define `
)))`;
-(*val _s838_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+(*val _s1239_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
val _ = Define `
- ((s838_:string ->((5)words$word#(5)words$word#(12)words$word)option) s839_0=
- (let s840_0 = s839_0 in
- if ((string_startswith s840_0 "jalr")) then
- (case ((string_drop s840_0 ((string_length "jalr")))) of
- s841_0 =>
- (case ((spc_matches_prefix0 s841_0)) of
- SOME ((() , s842_0)) =>
- (case ((string_drop s841_0 s842_0)) of
- s843_0 =>
- (case ((reg_name_matches_prefix s843_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s844_0)) =>
- (case ((string_drop s843_0 s844_0)) of
- s845_0 =>
- (case ((sep_matches_prefix s845_0)) of
- SOME ((() , s846_0)) =>
- (case ((string_drop s845_0 s846_0)) of
- s847_0 =>
- (case ((reg_name_matches_prefix s847_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s848_0)) =>
- (case ((string_drop s847_0 s848_0)) of
- s849_0 =>
- (case ((sep_matches_prefix s849_0)) of
- SOME ((() , s850_0)) =>
- (case ((string_drop s849_0 s850_0)) of
- s851_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s851_0
+ ((s1239_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1240_0=
+ (let s1241_0 = s1240_0 in
+ if ((string_startswith s1241_0 "jalr")) then
+ (case ((string_drop s1241_0 ((string_length "jalr")))) of
+ s1242_0 =>
+ (case ((spc_matches_prefix0 s1242_0)) of
+ SOME ((() , s1243_0)) =>
+ (case ((string_drop s1242_0 s1243_0)) of
+ s1244_0 =>
+ (case ((reg_name_matches_prefix s1244_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1245_0)) =>
+ (case ((string_drop s1244_0 s1245_0)) of
+ s1246_0 =>
+ (case ((sep_matches_prefix s1246_0)) of
+ SOME ((() , s1247_0)) =>
+ (case ((string_drop s1246_0 s1247_0)) of
+ s1248_0 =>
+ (case ((reg_name_matches_prefix s1248_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1249_0)) =>
+ (case ((string_drop s1248_0 s1249_0)) of
+ s1250_0 =>
+ (case ((sep_matches_prefix s1250_0)) of
+ SOME ((() , s1251_0)) =>
+ (case ((string_drop s1250_0 s1251_0)) of
+ s1252_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1252_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s852_0)) =>
- let p0_ = (string_drop s851_0 s852_0) in
+ SOME ((imm, s1253_0)) =>
+ let p0_ = (string_drop s1252_0 s1253_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -26997,30 +36392,30 @@ val _ = Define `
else NONE))`;
-(*val _s826_ : string -> maybe ((mword ty5 * mword ty21))*)
+(*val _s1227_ : string -> maybe ((mword ty5 * mword ty21))*)
val _ = Define `
- ((s826_:string ->((5)words$word#(21)words$word)option) s827_0=
- (let s828_0 = s827_0 in
- if ((string_startswith s828_0 "jal")) then
- (case ((string_drop s828_0 ((string_length "jal")))) of
- s829_0 =>
- (case ((spc_matches_prefix0 s829_0)) of
- SOME ((() , s830_0)) =>
- (case ((string_drop s829_0 s830_0)) of
- s831_0 =>
- (case ((reg_name_matches_prefix s831_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s832_0)) =>
- (case ((string_drop s831_0 s832_0)) of
- s833_0 =>
- (case ((sep_matches_prefix s833_0)) of
- SOME ((() , s834_0)) =>
- (case ((string_drop s833_0 s834_0)) of
- s835_0 =>
+ ((s1227_:string ->((5)words$word#(21)words$word)option) s1228_0=
+ (let s1229_0 = s1228_0 in
+ if ((string_startswith s1229_0 "jal")) then
+ (case ((string_drop s1229_0 ((string_length "jal")))) of
+ s1230_0 =>
+ (case ((spc_matches_prefix0 s1230_0)) of
+ SOME ((() , s1231_0)) =>
+ (case ((string_drop s1230_0 s1231_0)) of
+ s1232_0 =>
+ (case ((reg_name_matches_prefix s1232_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1233_0)) =>
+ (case ((string_drop s1232_0 s1233_0)) of
+ s1234_0 =>
+ (case ((sep_matches_prefix s1234_0)) of
+ SOME ((() , s1235_0)) =>
+ (case ((string_drop s1234_0 s1235_0)) of
+ s1236_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s835_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s836_0)) =>
- let p0_ = (string_drop s835_0 s836_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1236_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s1237_0)) =>
+ let p0_ = (string_drop s1236_0 s1237_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -27037,33 +36432,33 @@ val _ = Define `
else NONE))`;
-(*val _s813_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
+(*val _s1214_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
val _ = Define `
- ((s813_:string ->(uop#(5)words$word#(20)words$word)option) s814_0=
- ((case s814_0 of
- s815_0 =>
- (case ((utype_mnemonic_matches_prefix s815_0)) of
- SOME ((op, s816_0)) =>
- (case ((string_drop s815_0 s816_0)) of
- s817_0 =>
- (case ((spc_matches_prefix0 s817_0)) of
- SOME ((() , s818_0)) =>
- (case ((string_drop s817_0 s818_0)) of
- s819_0 =>
- (case ((reg_name_matches_prefix s819_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s820_0)) =>
- (case ((string_drop s819_0 s820_0)) of
- s821_0 =>
- (case ((sep_matches_prefix s821_0)) of
- SOME ((() , s822_0)) =>
- (case ((string_drop s821_0 s822_0)) of
- s823_0 =>
+ ((s1214_:string ->(uop#(5)words$word#(20)words$word)option) s1215_0=
+ ((case s1215_0 of
+ s1216_0 =>
+ (case ((utype_mnemonic_matches_prefix s1216_0)) of
+ SOME ((op, s1217_0)) =>
+ (case ((string_drop s1216_0 s1217_0)) of
+ s1218_0 =>
+ (case ((spc_matches_prefix0 s1218_0)) of
+ SOME ((() , s1219_0)) =>
+ (case ((string_drop s1218_0 s1219_0)) of
+ s1220_0 =>
+ (case ((reg_name_matches_prefix s1220_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1221_0)) =>
+ (case ((string_drop s1220_0 s1221_0)) of
+ s1222_0 =>
+ (case ((sep_matches_prefix s1222_0)) of
+ SOME ((() , s1223_0)) =>
+ (case ((string_drop s1222_0 s1223_0)) of
+ s1224_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s823_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s824_0)) =>
- let p0_ = (string_drop s823_0 s824_0) in
+ s1224_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s1225_0)) =>
+ let p0_ = (string_drop s1224_0 s1225_0) in
if (((p0_ = ""))) then SOME (op, rd, imm) else NONE
| _ => NONE
)
@@ -27084,478 +36479,789 @@ val _ = Define `
val _ = Define `
((assembly_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let s825_0 = arg_ in
- if ((case ((s813_ s825_0 : ((uop # 5 words$word # 20 words$word))option)) of
+ (let s1226_0 = arg_ in
+ if ((case ((s1214_ s1226_0 : ((uop # 5 words$word # 20 words$word))option)) of
SOME ((op, rd, imm)) => T
| _ => F
- )) then (case (s813_ s825_0 : (( uop # 5 words$word # 20 words$word)) option) of
+ )) then (case (s1214_ s1226_0 : (( uop # 5 words$word # 20 words$word)) option) of
(SOME ((op, rd, imm))) =>
sail2_state_monad$returnS (UTYPE (imm, rd, op))
)
- else if ((case ((s826_ s825_0 : (( 5 words$word # 21 words$word))option)) of
+ else if ((case ((s1227_ s1226_0 : (( 5 words$word # 21 words$word))option)) of
SOME ((rd, imm)) => T
| _ => F
- )) then (case (s826_ s825_0 : (( 5 words$word # 21 words$word)) option) of
+ )) then (case (s1227_ s1226_0 : (( 5 words$word # 21 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (RISCV_JAL (imm, rd))
)
- else if ((case ((s838_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1239_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => T
| _ => F
- )) then (case (s838_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s1239_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
sail2_state_monad$returnS (RISCV_JALR (imm, rs1, rd))
)
- else if ((case ((s854_ s825_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
+ else if ((case ((s1255_ s1226_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
SOME ((op, rs1, rs2, imm)) => T
| _ => F
)) then (case
- (s854_ s825_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
+ (s1255_ s1226_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
(SOME ((op, rs1, rs2, imm))) =>
sail2_state_monad$returnS (BTYPE (imm, rs2, rs1, op))
)
- else if ((case ((s871_ s825_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1272_ s1226_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((op, rd, rs1, imm)) => T
| _ => F
)) then (case
- (s871_ s825_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
+ (s1272_ s1226_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((op, rd, rs1, imm))) =>
sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op))
)
- else if ((case ((s888_ s825_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1289_ s1226_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => T
| _ => F
)) then (case
- (s888_ s825_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
+ (s1289_ s1226_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, op))
)
- else if ((case ((s905_ s825_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1306_ s1226_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s905_ s825_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1306_ s1226_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, op))
)
- else if ((case ((s922_ s825_0
+ else if ((case ((s1323_ s1226_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1)) => T
| _ => F
)) then (case
- (s922_ s825_0
+ (s1323_ s1226_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1))) =>
sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, aq, rl))
)
- else if ((case ((s952_ s825_0
+ else if ((case ((s1353_ s1226_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1)) => T
| _ => F
)) then (case
- (s952_ s825_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (s1353_ s1226_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1))) =>
sail2_state_monad$returnS (STORE (imm, rs2, rs1, size1, aq, rl))
)
- else if ((case ((s980_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1381_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s980_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s1381_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
)
- else if ((case ((s996_ s825_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1397_ s1226_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s996_ s825_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1397_ s1226_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, op))
)
- else if ((case ((s1013_ s825_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1414_ s1226_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1013_ s825_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1414_ s1226_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, op))
)
- else if ((case ((s1030_ s825_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1431_ s1226_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1030_ s825_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1431_ s1226_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, op))
)
- else if ((case ((s1047_ s825_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s1448_ s1226_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1047_ s825_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s1448_ s1226_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
sail2_state_monad$returnS (FENCE (pred, succ))
)
- else if ((case ((s1059_ s825_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s1460_ s1226_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1059_ s825_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s1460_ s1226_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
sail2_state_monad$returnS (FENCE_TSO (pred, succ))
)
- else if (((s825_0 = "fence.i"))) then sail2_state_monad$returnS (FENCEI () )
- else if (((s825_0 = "ecall"))) then sail2_state_monad$returnS (ECALL () )
- else if (((s825_0 = "mret"))) then sail2_state_monad$returnS (MRET () )
- else if (((s825_0 = "sret"))) then sail2_state_monad$returnS (SRET () )
- else if (((s825_0 = "ebreak"))) then sail2_state_monad$returnS (EBREAK () )
- else if (((s825_0 = "wfi"))) then sail2_state_monad$returnS (WFI () )
- else if ((case ((s1071_ s825_0 : (( 5 words$word # 5 words$word))option)) of
+ else if (((s1226_0 = "fence.i"))) then sail2_state_monad$returnS (FENCEI () )
+ else if (((s1226_0 = "ecall"))) then sail2_state_monad$returnS (ECALL () )
+ else if (((s1226_0 = "mret"))) then sail2_state_monad$returnS (MRET () )
+ else if (((s1226_0 = "sret"))) then sail2_state_monad$returnS (SRET () )
+ else if (((s1226_0 = "ebreak"))) then sail2_state_monad$returnS (EBREAK () )
+ else if (((s1226_0 = "wfi"))) then sail2_state_monad$returnS (WFI () )
+ else if ((case ((s1472_ s1226_0 : (( 5 words$word # 5 words$word))option)) of
SOME ((rs1, rs2)) => T
| _ => F
- )) then (case (s1071_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s1472_ s1226_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rs1, rs2))) =>
sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
)
- else if ((case ((s1083_ s825_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1484_ s1226_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1)) => T
| _ => F
)) then (case
- (s1083_ s825_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
+ (s1484_ s1226_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1))) =>
sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd))
)
- else if ((case ((s1101_ s825_0
+ else if ((case ((s1502_ s1226_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1101_ s825_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1502_ s1226_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2))) =>
sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd))
)
- else if ((case ((s1123_ s825_0
+ else if ((case ((s1524_ s1226_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1)) => T
| _ => F
)) then (case
- (s1123_ s825_0
+ (s1524_ s1226_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1))) =>
sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, width, rd))
)
- else if (((s825_0 = "c.nop"))) then sail2_state_monad$returnS (C_NOP () )
- else if ((case ((s1147_ s825_0 : (( 3 words$word # 8 words$word))option)) of
- SOME ((rdc, nzimm)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if (((s1226_0 = "c.nop"))) then sail2_state_monad$returnS (C_NOP () )
+ else if ((case ((s1550_ s1226_0 : (( 3 words$word # 8 words$word))option)) of
+ SOME ((rdc, nzimm)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s1147_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1550_ s1226_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rdc, nzimm))) =>
sail2_state_monad$returnS (C_ADDI4SPN (rdc, nzimm))
)
- else if ((case ((s1159_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1562_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => T
| _ => F
- )) then (case (s1159_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ )) then (case
+ (s1562_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
sail2_state_monad$returnS (C_LW (uimm, rsc, rdc))
)
- else if ((case ((s1175_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1578_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1175_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ )) then (case
+ (s1578_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
sail2_state_monad$returnS (C_LD (uimm, rsc, rdc))
)
- else if ((case ((s1191_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1594_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => T
| _ => F
)) then (case
- (s1191_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s1594_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
sail2_state_monad$returnS (C_SW (uimm, rsc1, rsc2))
)
- else if ((case ((s1207_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1610_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1207_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s1610_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
sail2_state_monad$returnS (C_SD (uimm, rsc1, rsc2))
)
- else if ((case ((s1223_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, nzi)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s1626_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, nzi)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s1223_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1626_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, nzi))) =>
sail2_state_monad$returnS (C_ADDI (nzi, rsd))
)
- else if ((case ((s1235_ s825_0 : ( 11 words$word)option)) of
+ else if ((case ((s1638_ s1226_0 : ( 11 words$word)option)) of
SOME (imm) => ((( 32 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s1235_ s825_0 : ( 11 words$word) option) of
+ )) then (case (s1638_ s1226_0 : ( 11 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_JAL imm)
)
- else if ((case ((s1243_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1646_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1243_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1646_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
sail2_state_monad$returnS (C_ADDIW (imm, rsd))
)
- else if ((case ((s1255_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, imm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1658_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => (rd <> zreg)
| _ => F
- )) then (case (s1255_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1658_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (C_LI (imm, rd))
)
- else if ((case ((s1267_ s825_0 : ( 6 words$word)option)) of
- SOME (imm) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1670_ s1226_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1267_ s825_0 : ( 6 words$word) option) of
+ )) then (case (s1670_ s1226_0 : ( 6 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_ADDI16SP imm)
)
- else if ((case ((s1275_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1678_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, imm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s1275_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1678_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (C_LUI (imm, rd))
)
- else if ((case ((s1287_ s825_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1690_ s1226_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1287_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1690_ s1226_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SRLI (shamt, rsd))
)
- else if ((case ((s1299_ s825_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1702_ s1226_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1299_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1702_ s1226_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SRAI (shamt, rsd))
)
- else if ((case ((s1311_ s825_0 : (( 3 words$word # 6 words$word))option)) of
+ else if ((case ((s1714_ s1226_0 : (( 3 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => T
| _ => F
- )) then (case (s1311_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1714_ s1226_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
sail2_state_monad$returnS (C_ANDI (imm, rsd))
)
- else if ((case ((s1323_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1726_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1323_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1726_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_SUB (rsd, rs2))
)
- else if ((case ((s1335_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1738_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1335_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1738_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_XOR (rsd, rs2))
)
- else if ((case ((s1347_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1750_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1347_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1750_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_OR (rsd, rs2))
)
- else if ((case ((s1359_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1762_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1359_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1762_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_AND (rsd, rs2))
)
- else if ((case ((s1371_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1774_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1371_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1774_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_SUBW (rsd, rs2))
)
- else if ((case ((s1383_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1786_ s1226_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1383_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1786_ s1226_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_ADDW (rsd, rs2))
)
- else if ((case ((s1395_ s825_0 : ( 11 words$word)option)) of
+ else if ((case ((s1798_ s1226_0 : ( 11 words$word)option)) of
SOME (imm) => T
| _ => F
- )) then (case (s1395_ s825_0 : ( 11 words$word) option) of
+ )) then (case (s1798_ s1226_0 : ( 11 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_J imm)
)
- else if ((case ((s1403_ s825_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s1806_ s1226_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s1403_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1806_ s1226_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
sail2_state_monad$returnS (C_BEQZ (imm, rs))
)
- else if ((case ((s1415_ s825_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s1818_ s1226_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s1415_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1818_ s1226_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
sail2_state_monad$returnS (C_BNEZ (imm, rs))
)
- else if ((case ((s1427_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s1830_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s1427_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1830_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SLLI (shamt, rsd))
)
- else if ((case ((s1439_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1842_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (rd <> zreg)
| _ => F
- )) then (case (s1439_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1842_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_LWSP (uimm, rd))
)
- else if ((case ((s1451_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s1854_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s1451_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1854_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_LDSP (uimm, rd))
)
- else if ((case ((s1463_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1866_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, uimm)) => T
| _ => F
- )) then (case (s1463_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1866_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_SWSP (uimm, rd))
)
- else if ((case ((s1475_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1878_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rs2, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1475_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1878_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rs2, uimm))) =>
sail2_state_monad$returnS (C_SDSP (uimm, rs2))
)
- else if ((case ((s1487_ s825_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1890_ s1226_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s1487_ s825_0 : ( 5 words$word) option) of
+ )) then (case (s1890_ s1226_0 : ( 5 words$word) option) of
(SOME (rs1)) =>
sail2_state_monad$returnS (C_JR rs1)
)
- else if ((case ((s1495_ s825_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1898_ s1226_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s1495_ s825_0 : ( 5 words$word) option) of
+ )) then (case (s1898_ s1226_0 : ( 5 words$word) option) of
(SOME (rs1)) =>
sail2_state_monad$returnS (C_JALR rs1)
)
- else if ((case ((s1503_ s825_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rd, rs2)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s1906_ s1226_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rd, rs2)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s1503_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s1906_ s1226_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs2))) =>
sail2_state_monad$returnS (C_MV (rd, rs2))
)
- else if (((s825_0 = "c.ebreak"))) then sail2_state_monad$returnS (C_EBREAK () )
- else if ((case ((s1515_ s825_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rsd, rs2)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if (((s1226_0 = "c.ebreak"))) then sail2_state_monad$returnS (C_EBREAK () )
+ else if ((case ((s1918_ s1226_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rsd, rs2)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s1515_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s1918_ s1226_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_ADD (rsd, rs2))
)
- else if ((case ((s1527_ s825_0
+ else if ((case ((s1930_ s1226_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1527_ s825_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1930_ s1226_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2))) =>
sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2))
)
- else if ((case ((s1544_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1947_ s1226_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1544_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1947_ s1226_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s))
)
- else if ((case ((s1562_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1965_ s1226_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1562_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1965_ s1226_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (REM (rs2, rs1, rd, s))
)
- else if ((case ((s1580_ s825_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1983_ s1226_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1580_ s825_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
+ )) then (case (s1983_ s1226_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs1, rs2))) =>
sail2_state_monad$returnS (MULW (rs2, rs1, rd))
)
- else if ((case ((s1596_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1999_ s1226_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1596_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1999_ s1226_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s))
)
- else if ((case ((s1615_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2018_ s1226_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1615_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2018_ s1226_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (REMW (rs2, rs1, rd, s))
)
- else if ((case ((s1634_ s825_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s2037_ s1226_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
| _ => F
)) then (case
- (s1634_ s825_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s2037_ s1226_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
sail2_state_monad$returnS (CSR (csr, rs1, rd, T, op))
)
- else if ((case ((s1652_ s825_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s2055_ s1226_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
| _ => F
)) then (case
- (s1652_ s825_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s2055_ s1226_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
sail2_state_monad$returnS (CSR (csr, rs1, rd, F, op))
)
- else if (((s825_0 = "uret"))) then sail2_state_monad$returnS (URET () )
- else if ((case ((s1669_ s825_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s1669_ s825_0 : ( 32 words$word) option) of
+ else if (((s1226_0 = "uret"))) then sail2_state_monad$returnS (URET () )
+ else if ((case ((s2072_ s1226_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s2072_ s1226_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_NOP_HINT imm)
+ )
+ else if ((case ((s2078_ s1226_0 : ( 5 words$word)option)) of
+ SOME (rsd) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s2078_ s1226_0 : ( 5 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_ADDI_HINT rsd)
+ )
+ else if ((case ((s2084_ s1226_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s2084_ s1226_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_LI_HINT imm)
+ )
+ else if ((case ((s2090_ s1226_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s2090_ s1226_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_LUI_HINT imm)
+ )
+ else if ((case ((s2096_ s1226_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s2096_ s1226_0 : ( 5 words$word) option) of
+ (SOME (rs2)) =>
+ sail2_state_monad$returnS (C_MV_HINT rs2)
+ )
+ else if ((case ((s2102_ s1226_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s2102_ s1226_0 : ( 5 words$word) option) of
+ (SOME (rs2)) =>
+ sail2_state_monad$returnS (C_ADD_HINT rs2)
+ )
+ else if ((case ((s2108_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s2108_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rsd, shamt))) =>
+ sail2_state_monad$returnS (C_SLLI_HINT (shamt, rsd))
+ )
+ else if ((case ((s2117_ s1226_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s2117_ s1226_0 : ( 3 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_SRLI_HINT rsd)
+ )
+ else if ((case ((s2123_ s1226_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s2123_ s1226_0 : ( 3 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_SRAI_HINT rsd)
+ )
+ else if ((case ((s2129_ s1226_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word))option)) of
+ SOME ((pred, succ, rs, rd, fm)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s2129_ s1226_0 : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word)) option) of
+ (SOME ((pred, succ, rs, rd, fm))) =>
+ sail2_state_monad$returnS (FENCE_RESERVED (fm, pred, succ, rs, rd))
+ )
+ else if ((case ((s2147_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ SOME ((rd, rs, imm)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case (s2147_ s1226_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ (SOME ((rd, rs, imm))) =>
+ sail2_state_monad$returnS (FENCEI_RESERVED (imm, rs, rd))
+ )
+ else if ((case ((s2159_ s1226_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rd, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2159_ s1226_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rd, imm, rs1))) =>
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, width))
+ )
+ else if ((case ((s2183_ s1226_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rs2, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2183_ s1226_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rs2, imm, rs1))) =>
+ sail2_state_monad$returnS (STORE_FP (imm, rs2, rs1, width))
+ )
+ else if ((case ((s2207_ s1226_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s2207_ s1226_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2232_ s1226_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s2232_ s1226_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2253_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2253_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S))
+ )
+ else if ((case ((s2270_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2270_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S))
+ )
+ else if ((case ((s2287_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2287_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S))
+ )
+ else if ((case ((s2304_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2304_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W))
+ )
+ else if ((case ((s2321_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2321_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_WU))
+ )
+ else if ((case ((s2338_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2338_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_L_S))
+ )
+ else if ((case ((s2355_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2355_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_LU_S))
+ )
+ else if ((case ((s2372_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2372_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_L))
+ )
+ else if ((case ((s2389_ s1226_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2389_ s1226_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_LU))
+ )
+ else if ((case ((s2406_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2406_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJ_S))
+ )
+ else if ((case ((s2423_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2423_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJN_S))
+ )
+ else if ((case ((s2440_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2440_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJX_S))
+ )
+ else if ((case ((s2457_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2457_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FMIN_S))
+ )
+ else if ((case ((s2474_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2474_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FMAX_S))
+ )
+ else if ((case ((s2491_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2491_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FEQ_S))
+ )
+ else if ((case ((s2508_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2508_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FLT_S))
+ )
+ else if ((case ((s2525_ s1226_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2525_ s1226_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FLE_S))
+ )
+ else if ((case ((s2542_ s1226_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_W, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2542_ s1226_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_W, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FMV_X_W))
+ )
+ else if ((case ((s2555_ s1226_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_W_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2555_ s1226_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_W_X, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FMV_W_X))
+ )
+ else if ((case ((s2568_ s1226_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_S, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2568_ s1226_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_S, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FCLASS_S))
+ )
+ else if ((case ((s2581_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s2581_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, imm))) =>
+ sail2_state_monad$returnS (C_FLWSP (imm, rd))
+ )
+ else if ((case ((s2593_ s1226_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s2593_ s1226_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ sail2_state_monad$returnS (C_FSWSP (uimm, rd))
+ )
+ else if ((case ((s2605_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s2605_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ sail2_state_monad$returnS (C_FLW (uimm, rsc, rdc))
+ )
+ else if ((case ((s2621_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s2621_ s1226_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ sail2_state_monad$returnS (C_FSW (uimm, rsc1, rsc2))
+ )
+ else if ((case ((s2637_ s1226_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s2637_ s1226_0 : ( 32 words$word) option) of
(SOME (s)) =>
sail2_state_monad$returnS (ILLEGAL s)
)
- else if ((case ((s1677_ s825_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s1677_ s825_0 : ( 16 words$word) option) of
+ else if ((case ((s2645_ s1226_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s2645_ s1226_0 : ( 16 words$word) option) of
(SOME (s)) =>
sail2_state_monad$returnS (C_ILLEGAL s)
)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val assembly_forwards_matches : ast -> bool*)
-
val _ = Define `
((assembly_forwards_matches:ast -> bool) arg_=
((case arg_ of
@@ -27590,8 +37296,7 @@ val _ = Define `
| AMO ((op, aq, rl, rs2, rs1, width, rd)) => T
| C_NOP (() ) => T
| C_ADDI4SPN ((rdc, nzimm)) =>
- if (((nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
- T else F
+ if (((nzimm <> (0x00w : 8 words$word)))) then T else F
| C_LW ((uimm, rsc, rdc)) => T
| C_LD ((uimm, rsc, rdc)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then T else F
@@ -27599,29 +37304,24 @@ val _ = Define `
| C_SD ((uimm, rsc1, rsc2)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then T else F
| C_ADDI ((nzi, rsd)) =>
- if ((((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
T else F
| C_JAL (imm) =>
if ((((( 32 : int): ii) = (( 32 : int): ii)))) then T else F
| C_ADDIW ((imm, rsd)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then T else F
| C_LI ((imm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rd <> zreg))) then T else F
| C_ADDI16SP (imm) =>
- if (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((imm <> (0b000000w : 6 words$word)))) then T else F
| C_LUI ((imm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\
- (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))))))))) then
+ if ((((((rd <> zreg))) /\
+ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word)))))))))) then
T else F
| C_SRLI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((shamt <> (0b000000w : 6 words$word)))) then T else F
| C_SRAI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((shamt <> (0b000000w : 6 words$word)))) then T else F
| C_ANDI ((imm, rsd)) => T
| C_SUB ((rsd, rs2)) => T
| C_XOR ((rsd, rs2)) => T
@@ -27635,31 +37335,25 @@ val _ = Define `
| C_BEQZ ((imm, rs)) => T
| C_BNEZ ((imm, rs)) => T
| C_SLLI ((shamt, rsd)) =>
- if ((((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
T else F
| C_LWSP ((uimm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rd <> zreg))) then T else F
| C_LDSP ((uimm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((( 32 : int): ii) = (( 64 : int): ii))))))) then T else
- F
+ if ((((((rd <> zreg))) /\ ((((( 32 : int): ii) = (( 64 : int): ii))))))) then
+ T else F
| C_SWSP ((uimm, rd)) => T
| C_SDSP ((uimm, rs2)) =>
if ((((( 32 : int): ii) = (( 64 : int): ii)))) then T else F
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rs1 <> zreg))) then T else F
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rs1 <> zreg))) then T else F
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T else F
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F
| C_EBREAK (() ) => T
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T else F
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F
| MUL ((rs2, rs1, rd, high, signed1, signed2)) => T
| DIV0 ((rs2, rs1, rd, s)) => T
| REM ((rs2, rs1, rd, s)) => T
@@ -27672,29 +37366,84 @@ val _ = Define `
| CSR ((csr, rs1, rd, T, op)) => T
| CSR ((csr, rs1, rd, F, op)) => T
| URET (() ) => T
+ | C_NOP_HINT (imm) => T
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then T else F
+ | C_LI_HINT (imm) => T
+ | C_LUI_HINT (imm) =>
+ if (((imm <> (0b000000w : 6 words$word)))) then T else F
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then T else F
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then T else F
+ | C_SLLI_HINT ((shamt, rsd)) =>
+ if ((((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) then
+ T else F
+ | C_SRLI_HINT (rsd) => T
+ | C_SRAI_HINT (rsd) => T
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\
+ (((fm <> (0x8w : 4 words$word))))))) \/
+ ((((((rs <> (0b00000w : 5 words$word)))) \/
+ (((rd <> (0b00000w : 5 words$word)))))))))) then T else
+ F
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/
+ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then T else
+ F
+ | LOAD_FP ((imm, rs1, rd, width)) => T
+ | STORE_FP ((imm, rs2, rs1, width)) => T
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => T
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => T
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => T
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => T
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => T
+ | C_FLWSP ((imm, rd)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FSWSP ((uimm, rd)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FLW ((uimm, rsc, rdc)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ if ((((( 32 : int): ii) = (( 32 : int): ii)))) then T else F
| ILLEGAL (s) => T
| C_ILLEGAL (s) => T
)))`;
-(*val assembly_backwards_matches : string -> bool*)
-
-(*val _s2549_ : string -> maybe (mword ty16)*)
+(*val _s4084_ : string -> maybe (mword ty16)*)
val _ = Define `
- ((s2549_:string ->((16)words$word)option) s2550_0=
- (let s2551_0 = s2550_0 in
- if ((string_startswith s2551_0 "c.illegal")) then
- (case ((string_drop s2551_0 ((string_length "c.illegal")))) of
- s2552_0 =>
- (case ((spc_matches_prefix0 s2552_0)) of
- SOME ((() , s2553_0)) =>
- (case ((string_drop s2552_0 s2553_0)) of
- s2554_0 =>
+ ((s4084_:string ->((16)words$word)option) s4085_0=
+ (let s4086_0 = s4085_0 in
+ if ((string_startswith s4086_0 "c.illegal")) then
+ (case ((string_drop s4086_0 ((string_length "c.illegal")))) of
+ s4087_0 =>
+ (case ((spc_matches_prefix0 s4087_0)) of
+ SOME ((() , s4088_0)) =>
+ (case ((string_drop s4087_0 s4088_0)) of
+ s4089_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2554_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s2555_0)) =>
- let p0_ = (string_drop s2554_0 s2555_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4089_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s4090_0)) =>
+ let p0_ = (string_drop s4089_0 s4090_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -27705,22 +37454,22 @@ val _ = Define `
else NONE))`;
-(*val _s2541_ : string -> maybe (mword ty32)*)
+(*val _s4076_ : string -> maybe (mword ty32)*)
val _ = Define `
- ((s2541_:string ->((32)words$word)option) s2542_0=
- (let s2543_0 = s2542_0 in
- if ((string_startswith s2543_0 "illegal")) then
- (case ((string_drop s2543_0 ((string_length "illegal")))) of
- s2544_0 =>
- (case ((spc_matches_prefix0 s2544_0)) of
- SOME ((() , s2545_0)) =>
- (case ((string_drop s2544_0 s2545_0)) of
- s2546_0 =>
+ ((s4076_:string ->((32)words$word)option) s4077_0=
+ (let s4078_0 = s4077_0 in
+ if ((string_startswith s4078_0 "illegal")) then
+ (case ((string_drop s4078_0 ((string_length "illegal")))) of
+ s4079_0 =>
+ (case ((spc_matches_prefix0 s4079_0)) of
+ SOME ((() , s4080_0)) =>
+ (case ((string_drop s4079_0 s4080_0)) of
+ s4081_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2546_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s2547_0)) =>
- let p0_ = (string_drop s2546_0 s2547_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4081_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s4082_0)) =>
+ let p0_ = (string_drop s4081_0 s4082_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -27731,41 +37480,1283 @@ val _ = Define `
else NONE))`;
-(*val _s2524_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s4060_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2524_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s2525_0=
- ((case s2525_0 of
- s2526_0 =>
- (case ((csr_mnemonic_matches_prefix s2526_0)) of
- SOME ((op, s2527_0)) =>
- (case ((string_drop s2526_0 s2527_0)) of
- s2528_0 =>
- (case ((spc_matches_prefix0 s2528_0)) of
- SOME ((() , s2529_0)) =>
- (case ((string_drop s2528_0 s2529_0)) of
- s2530_0 =>
- (case ((reg_name_matches_prefix s2530_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2531_0)) =>
- (case ((string_drop s2530_0 s2531_0)) of
- s2532_0 =>
- (case ((sep_matches_prefix s2532_0)) of
- SOME ((() , s2533_0)) =>
- (case ((string_drop s2532_0 s2533_0)) of
- s2534_0 =>
- (case ((reg_name_matches_prefix s2534_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2535_0)) =>
- (case ((string_drop s2534_0 s2535_0)) of
- s2536_0 =>
- (case ((sep_matches_prefix s2536_0)) of
- SOME ((() , s2537_0)) =>
- (case ((string_drop s2536_0 s2537_0)) of
- s2538_0 =>
- (case ((csr_name_map_matches_prefix s2538_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s2539_0)) =>
- let p0_ = (string_drop s2538_0 s2539_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ ((s4060_:string ->((3)words$word#(3)words$word#(5)words$word)option) s4061_0=
+ (let s4062_0 = s4061_0 in
+ if ((string_startswith s4062_0 "c.fsw")) then
+ (case ((string_drop s4062_0 ((string_length "c.fsw")))) of
+ s4063_0 =>
+ (case ((spc_matches_prefix0 s4063_0)) of
+ SOME ((() , s4064_0)) =>
+ (case ((string_drop s4063_0 s4064_0)) of
+ s4065_0 =>
+ (case ((creg_name_matches_prefix s4065_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s4066_0)) =>
+ (case ((string_drop s4065_0 s4066_0)) of
+ s4067_0 =>
+ (case ((sep_matches_prefix s4067_0)) of
+ SOME ((() , s4068_0)) =>
+ (case ((string_drop s4067_0 s4068_0)) of
+ s4069_0 =>
+ (case ((creg_name_matches_prefix s4069_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s4070_0)) =>
+ (case ((string_drop s4069_0 s4070_0)) of
+ s4071_0 =>
+ (case ((sep_matches_prefix s4071_0)) of
+ SOME ((() , s4072_0)) =>
+ (case ((string_drop s4071_0 s4072_0)) of
+ s4073_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4073_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1196, s4074_0)) =>
+ if (((((subrange_vec_dec v__1196 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1196 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1196 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s4073_0 s4074_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4044_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s4044_:string ->((3)words$word#(3)words$word#(5)words$word)option) s4045_0=
+ (let s4046_0 = s4045_0 in
+ if ((string_startswith s4046_0 "c.flw")) then
+ (case ((string_drop s4046_0 ((string_length "c.flw")))) of
+ s4047_0 =>
+ (case ((spc_matches_prefix0 s4047_0)) of
+ SOME ((() , s4048_0)) =>
+ (case ((string_drop s4047_0 s4048_0)) of
+ s4049_0 =>
+ (case ((creg_name_matches_prefix s4049_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s4050_0)) =>
+ (case ((string_drop s4049_0 s4050_0)) of
+ s4051_0 =>
+ (case ((sep_matches_prefix s4051_0)) of
+ SOME ((() , s4052_0)) =>
+ (case ((string_drop s4051_0 s4052_0)) of
+ s4053_0 =>
+ (case ((creg_name_matches_prefix s4053_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s4054_0)) =>
+ (case ((string_drop s4053_0 s4054_0)) of
+ s4055_0 =>
+ (case ((sep_matches_prefix s4055_0)) of
+ SOME ((() , s4056_0)) =>
+ (case ((string_drop s4055_0 s4056_0)) of
+ s4057_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4057_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1198, s4058_0)) =>
+ if (((((subrange_vec_dec v__1198 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1198 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1198 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s4057_0 s4058_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4032_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s4032_:string ->((5)words$word#(6)words$word)option) s4033_0=
+ (let s4034_0 = s4033_0 in
+ if ((string_startswith s4034_0 "c.fswsp")) then
+ (case ((string_drop s4034_0 ((string_length "c.fswsp")))) of
+ s4035_0 =>
+ (case ((spc_matches_prefix0 s4035_0)) of
+ SOME ((() , s4036_0)) =>
+ (case ((string_drop s4035_0 s4036_0)) of
+ s4037_0 =>
+ (case ((reg_name_matches_prefix s4037_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4038_0)) =>
+ (case ((string_drop s4037_0 s4038_0)) of
+ s4039_0 =>
+ (case ((sep_matches_prefix s4039_0)) of
+ SOME ((() , s4040_0)) =>
+ (case ((string_drop s4039_0 s4040_0)) of
+ s4041_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4041_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4042_0)) =>
+ let p0_ = (string_drop s4041_0 s4042_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4020_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s4020_:string ->((5)words$word#(6)words$word)option) s4021_0=
+ (let s4022_0 = s4021_0 in
+ if ((string_startswith s4022_0 "c.flwsp")) then
+ (case ((string_drop s4022_0 ((string_length "c.flwsp")))) of
+ s4023_0 =>
+ (case ((spc_matches_prefix0 s4023_0)) of
+ SOME ((() , s4024_0)) =>
+ (case ((string_drop s4023_0 s4024_0)) of
+ s4025_0 =>
+ (case ((reg_name_matches_prefix s4025_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4026_0)) =>
+ (case ((string_drop s4025_0 s4026_0)) of
+ s4027_0 =>
+ (case ((sep_matches_prefix s4027_0)) of
+ SOME ((() , s4028_0)) =>
+ (case ((string_drop s4027_0 s4028_0)) of
+ s4029_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4029_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4030_0)) =>
+ let p0_ = (string_drop s4029_0 s4030_0) in
+ if (((p0_ = ""))) then SOME (rd, imm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4007_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4007_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s4008_0=
+ ((case s4008_0 of
+ s4009_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s4009_0)) of
+ SOME ((FCLASS_S, s4010_0)) =>
+ (case ((string_drop s4009_0 s4010_0)) of
+ s4011_0 =>
+ (case ((spc_matches_prefix0 s4011_0)) of
+ SOME ((() , s4012_0)) =>
+ (case ((string_drop s4011_0 s4012_0)) of
+ s4013_0 =>
+ (case ((reg_name_matches_prefix s4013_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4014_0)) =>
+ (case ((string_drop s4013_0 s4014_0)) of
+ s4015_0 =>
+ (case ((sep_matches_prefix s4015_0)) of
+ SOME ((() , s4016_0)) =>
+ (case ((string_drop s4015_0 s4016_0)) of
+ s4017_0 =>
+ (case ((freg_name_matches_prefix s4017_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4018_0)) =>
+ let p0_ = (string_drop s4017_0 s4018_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_S, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3994_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3994_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s3995_0=
+ ((case s3995_0 of
+ s3996_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s3996_0)) of
+ SOME ((FMV_W_X, s3997_0)) =>
+ (case ((string_drop s3996_0 s3997_0)) of
+ s3998_0 =>
+ (case ((spc_matches_prefix0 s3998_0)) of
+ SOME ((() , s3999_0)) =>
+ (case ((string_drop s3998_0 s3999_0)) of
+ s4000_0 =>
+ (case ((freg_name_matches_prefix s4000_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4001_0)) =>
+ (case ((string_drop s4000_0 s4001_0)) of
+ s4002_0 =>
+ (case ((sep_matches_prefix s4002_0)) of
+ SOME ((() , s4003_0)) =>
+ (case ((string_drop s4002_0 s4003_0)) of
+ s4004_0 =>
+ (case ((reg_name_matches_prefix s4004_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4005_0)) =>
+ let p0_ = (string_drop s4004_0 s4005_0) in
+ if (((p0_ = ""))) then SOME (FMV_W_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3981_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3981_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s3982_0=
+ ((case s3982_0 of
+ s3983_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s3983_0)) of
+ SOME ((FMV_X_W, s3984_0)) =>
+ (case ((string_drop s3983_0 s3984_0)) of
+ s3985_0 =>
+ (case ((spc_matches_prefix0 s3985_0)) of
+ SOME ((() , s3986_0)) =>
+ (case ((string_drop s3985_0 s3986_0)) of
+ s3987_0 =>
+ (case ((reg_name_matches_prefix s3987_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3988_0)) =>
+ (case ((string_drop s3987_0 s3988_0)) of
+ s3989_0 =>
+ (case ((sep_matches_prefix s3989_0)) of
+ SOME ((() , s3990_0)) =>
+ (case ((string_drop s3989_0 s3990_0)) of
+ s3991_0 =>
+ (case ((freg_name_matches_prefix s3991_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3992_0)) =>
+ let p0_ = (string_drop s3991_0 s3992_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_W, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3964_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3964_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3965_0=
+ ((case s3965_0 of
+ s3966_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3966_0)) of
+ SOME ((FLE_S, s3967_0)) =>
+ (case ((string_drop s3966_0 s3967_0)) of
+ s3968_0 =>
+ (case ((spc_matches_prefix0 s3968_0)) of
+ SOME ((() , s3969_0)) =>
+ (case ((string_drop s3968_0 s3969_0)) of
+ s3970_0 =>
+ (case ((reg_name_matches_prefix s3970_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3971_0)) =>
+ (case ((string_drop s3970_0 s3971_0)) of
+ s3972_0 =>
+ (case ((sep_matches_prefix s3972_0)) of
+ SOME ((() , s3973_0)) =>
+ (case ((string_drop s3972_0 s3973_0)) of
+ s3974_0 =>
+ (case ((freg_name_matches_prefix s3974_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3975_0)) =>
+ (case ((string_drop s3974_0 s3975_0)) of
+ s3976_0 =>
+ (case ((sep_matches_prefix s3976_0)) of
+ SOME ((() , s3977_0)) =>
+ (case ((string_drop s3976_0 s3977_0)) of
+ s3978_0 =>
+ (case ((freg_name_matches_prefix s3978_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3979_0)) =>
+ let p0_ = (string_drop s3978_0 s3979_0) in
+ if (((p0_ = ""))) then SOME (FLE_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3947_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3947_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3948_0=
+ ((case s3948_0 of
+ s3949_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3949_0)) of
+ SOME ((FLT_S, s3950_0)) =>
+ (case ((string_drop s3949_0 s3950_0)) of
+ s3951_0 =>
+ (case ((spc_matches_prefix0 s3951_0)) of
+ SOME ((() , s3952_0)) =>
+ (case ((string_drop s3951_0 s3952_0)) of
+ s3953_0 =>
+ (case ((reg_name_matches_prefix s3953_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3954_0)) =>
+ (case ((string_drop s3953_0 s3954_0)) of
+ s3955_0 =>
+ (case ((sep_matches_prefix s3955_0)) of
+ SOME ((() , s3956_0)) =>
+ (case ((string_drop s3955_0 s3956_0)) of
+ s3957_0 =>
+ (case ((freg_name_matches_prefix s3957_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3958_0)) =>
+ (case ((string_drop s3957_0 s3958_0)) of
+ s3959_0 =>
+ (case ((sep_matches_prefix s3959_0)) of
+ SOME ((() , s3960_0)) =>
+ (case ((string_drop s3959_0 s3960_0)) of
+ s3961_0 =>
+ (case ((freg_name_matches_prefix s3961_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3962_0)) =>
+ let p0_ = (string_drop s3961_0 s3962_0) in
+ if (((p0_ = ""))) then SOME (FLT_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3930_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3930_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3931_0=
+ ((case s3931_0 of
+ s3932_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3932_0)) of
+ SOME ((FEQ_S, s3933_0)) =>
+ (case ((string_drop s3932_0 s3933_0)) of
+ s3934_0 =>
+ (case ((spc_matches_prefix0 s3934_0)) of
+ SOME ((() , s3935_0)) =>
+ (case ((string_drop s3934_0 s3935_0)) of
+ s3936_0 =>
+ (case ((reg_name_matches_prefix s3936_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3937_0)) =>
+ (case ((string_drop s3936_0 s3937_0)) of
+ s3938_0 =>
+ (case ((sep_matches_prefix s3938_0)) of
+ SOME ((() , s3939_0)) =>
+ (case ((string_drop s3938_0 s3939_0)) of
+ s3940_0 =>
+ (case ((freg_name_matches_prefix s3940_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3941_0)) =>
+ (case ((string_drop s3940_0 s3941_0)) of
+ s3942_0 =>
+ (case ((sep_matches_prefix s3942_0)) of
+ SOME ((() , s3943_0)) =>
+ (case ((string_drop s3942_0 s3943_0)) of
+ s3944_0 =>
+ (case ((freg_name_matches_prefix s3944_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3945_0)) =>
+ let p0_ = (string_drop s3944_0 s3945_0) in
+ if (((p0_ = ""))) then SOME (FEQ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3913_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3913_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3914_0=
+ ((case s3914_0 of
+ s3915_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3915_0)) of
+ SOME ((FMAX_S, s3916_0)) =>
+ (case ((string_drop s3915_0 s3916_0)) of
+ s3917_0 =>
+ (case ((spc_matches_prefix0 s3917_0)) of
+ SOME ((() , s3918_0)) =>
+ (case ((string_drop s3917_0 s3918_0)) of
+ s3919_0 =>
+ (case ((freg_name_matches_prefix s3919_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3920_0)) =>
+ (case ((string_drop s3919_0 s3920_0)) of
+ s3921_0 =>
+ (case ((sep_matches_prefix s3921_0)) of
+ SOME ((() , s3922_0)) =>
+ (case ((string_drop s3921_0 s3922_0)) of
+ s3923_0 =>
+ (case ((freg_name_matches_prefix s3923_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3924_0)) =>
+ (case ((string_drop s3923_0 s3924_0)) of
+ s3925_0 =>
+ (case ((sep_matches_prefix s3925_0)) of
+ SOME ((() , s3926_0)) =>
+ (case ((string_drop s3925_0 s3926_0)) of
+ s3927_0 =>
+ (case ((freg_name_matches_prefix s3927_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3928_0)) =>
+ let p0_ = (string_drop s3927_0 s3928_0) in
+ if (((p0_ = ""))) then SOME (FMAX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3896_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3896_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3897_0=
+ ((case s3897_0 of
+ s3898_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3898_0)) of
+ SOME ((FMIN_S, s3899_0)) =>
+ (case ((string_drop s3898_0 s3899_0)) of
+ s3900_0 =>
+ (case ((spc_matches_prefix0 s3900_0)) of
+ SOME ((() , s3901_0)) =>
+ (case ((string_drop s3900_0 s3901_0)) of
+ s3902_0 =>
+ (case ((freg_name_matches_prefix s3902_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3903_0)) =>
+ (case ((string_drop s3902_0 s3903_0)) of
+ s3904_0 =>
+ (case ((sep_matches_prefix s3904_0)) of
+ SOME ((() , s3905_0)) =>
+ (case ((string_drop s3904_0 s3905_0)) of
+ s3906_0 =>
+ (case ((freg_name_matches_prefix s3906_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3907_0)) =>
+ (case ((string_drop s3906_0 s3907_0)) of
+ s3908_0 =>
+ (case ((sep_matches_prefix s3908_0)) of
+ SOME ((() , s3909_0)) =>
+ (case ((string_drop s3908_0 s3909_0)) of
+ s3910_0 =>
+ (case ((freg_name_matches_prefix s3910_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3911_0)) =>
+ let p0_ = (string_drop s3910_0 s3911_0) in
+ if (((p0_ = ""))) then SOME (FMIN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3879_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3879_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3880_0=
+ ((case s3880_0 of
+ s3881_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3881_0)) of
+ SOME ((FSGNJX_S, s3882_0)) =>
+ (case ((string_drop s3881_0 s3882_0)) of
+ s3883_0 =>
+ (case ((spc_matches_prefix0 s3883_0)) of
+ SOME ((() , s3884_0)) =>
+ (case ((string_drop s3883_0 s3884_0)) of
+ s3885_0 =>
+ (case ((freg_name_matches_prefix s3885_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3886_0)) =>
+ (case ((string_drop s3885_0 s3886_0)) of
+ s3887_0 =>
+ (case ((sep_matches_prefix s3887_0)) of
+ SOME ((() , s3888_0)) =>
+ (case ((string_drop s3887_0 s3888_0)) of
+ s3889_0 =>
+ (case ((freg_name_matches_prefix s3889_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3890_0)) =>
+ (case ((string_drop s3889_0 s3890_0)) of
+ s3891_0 =>
+ (case ((sep_matches_prefix s3891_0)) of
+ SOME ((() , s3892_0)) =>
+ (case ((string_drop s3891_0 s3892_0)) of
+ s3893_0 =>
+ (case ((freg_name_matches_prefix s3893_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3894_0)) =>
+ let p0_ = (string_drop s3893_0 s3894_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3862_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3862_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3863_0=
+ ((case s3863_0 of
+ s3864_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3864_0)) of
+ SOME ((FSGNJN_S, s3865_0)) =>
+ (case ((string_drop s3864_0 s3865_0)) of
+ s3866_0 =>
+ (case ((spc_matches_prefix0 s3866_0)) of
+ SOME ((() , s3867_0)) =>
+ (case ((string_drop s3866_0 s3867_0)) of
+ s3868_0 =>
+ (case ((freg_name_matches_prefix s3868_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3869_0)) =>
+ (case ((string_drop s3868_0 s3869_0)) of
+ s3870_0 =>
+ (case ((sep_matches_prefix s3870_0)) of
+ SOME ((() , s3871_0)) =>
+ (case ((string_drop s3870_0 s3871_0)) of
+ s3872_0 =>
+ (case ((freg_name_matches_prefix s3872_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3873_0)) =>
+ (case ((string_drop s3872_0 s3873_0)) of
+ s3874_0 =>
+ (case ((sep_matches_prefix s3874_0)) of
+ SOME ((() , s3875_0)) =>
+ (case ((string_drop s3874_0 s3875_0)) of
+ s3876_0 =>
+ (case ((freg_name_matches_prefix s3876_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3877_0)) =>
+ let p0_ = (string_drop s3876_0 s3877_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3845_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3845_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s3846_0=
+ ((case s3846_0 of
+ s3847_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s3847_0)) of
+ SOME ((FSGNJ_S, s3848_0)) =>
+ (case ((string_drop s3847_0 s3848_0)) of
+ s3849_0 =>
+ (case ((spc_matches_prefix0 s3849_0)) of
+ SOME ((() , s3850_0)) =>
+ (case ((string_drop s3849_0 s3850_0)) of
+ s3851_0 =>
+ (case ((freg_name_matches_prefix s3851_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3852_0)) =>
+ (case ((string_drop s3851_0 s3852_0)) of
+ s3853_0 =>
+ (case ((sep_matches_prefix s3853_0)) of
+ SOME ((() , s3854_0)) =>
+ (case ((string_drop s3853_0 s3854_0)) of
+ s3855_0 =>
+ (case ((freg_name_matches_prefix s3855_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3856_0)) =>
+ (case ((string_drop s3855_0 s3856_0)) of
+ s3857_0 =>
+ (case ((sep_matches_prefix s3857_0)) of
+ SOME ((() , s3858_0)) =>
+ (case ((string_drop s3857_0 s3858_0)) of
+ s3859_0 =>
+ (case ((freg_name_matches_prefix s3859_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3860_0)) =>
+ let p0_ = (string_drop s3859_0 s3860_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3828_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3828_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3829_0=
+ ((case s3829_0 of
+ s3830_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3830_0)) of
+ SOME ((FCVT_S_LU, s3831_0)) =>
+ (case ((string_drop s3830_0 s3831_0)) of
+ s3832_0 =>
+ (case ((spc_matches_prefix0 s3832_0)) of
+ SOME ((() , s3833_0)) =>
+ (case ((string_drop s3832_0 s3833_0)) of
+ s3834_0 =>
+ (case ((freg_name_matches_prefix s3834_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3835_0)) =>
+ (case ((string_drop s3834_0 s3835_0)) of
+ s3836_0 =>
+ (case ((sep_matches_prefix s3836_0)) of
+ SOME ((() , s3837_0)) =>
+ (case ((string_drop s3836_0 s3837_0)) of
+ s3838_0 =>
+ (case ((reg_name_matches_prefix s3838_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3839_0)) =>
+ (case ((string_drop s3838_0 s3839_0)) of
+ s3840_0 =>
+ (case ((sep_matches_prefix s3840_0)) of
+ SOME ((() , s3841_0)) =>
+ (case ((string_drop s3840_0 s3841_0)) of
+ s3842_0 =>
+ (case ((frm_mnemonic_matches_prefix s3842_0)) of
+ SOME ((rm, s3843_0)) =>
+ let p0_ = (string_drop s3842_0 s3843_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3811_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3811_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3812_0=
+ ((case s3812_0 of
+ s3813_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3813_0)) of
+ SOME ((FCVT_S_L, s3814_0)) =>
+ (case ((string_drop s3813_0 s3814_0)) of
+ s3815_0 =>
+ (case ((spc_matches_prefix0 s3815_0)) of
+ SOME ((() , s3816_0)) =>
+ (case ((string_drop s3815_0 s3816_0)) of
+ s3817_0 =>
+ (case ((freg_name_matches_prefix s3817_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3818_0)) =>
+ (case ((string_drop s3817_0 s3818_0)) of
+ s3819_0 =>
+ (case ((sep_matches_prefix s3819_0)) of
+ SOME ((() , s3820_0)) =>
+ (case ((string_drop s3819_0 s3820_0)) of
+ s3821_0 =>
+ (case ((reg_name_matches_prefix s3821_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3822_0)) =>
+ (case ((string_drop s3821_0 s3822_0)) of
+ s3823_0 =>
+ (case ((sep_matches_prefix s3823_0)) of
+ SOME ((() , s3824_0)) =>
+ (case ((string_drop s3823_0 s3824_0)) of
+ s3825_0 =>
+ (case ((frm_mnemonic_matches_prefix s3825_0)) of
+ SOME ((rm, s3826_0)) =>
+ let p0_ = (string_drop s3825_0 s3826_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3794_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3794_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3795_0=
+ ((case s3795_0 of
+ s3796_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3796_0)) of
+ SOME ((FCVT_LU_S, s3797_0)) =>
+ (case ((string_drop s3796_0 s3797_0)) of
+ s3798_0 =>
+ (case ((spc_matches_prefix0 s3798_0)) of
+ SOME ((() , s3799_0)) =>
+ (case ((string_drop s3798_0 s3799_0)) of
+ s3800_0 =>
+ (case ((reg_name_matches_prefix s3800_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3801_0)) =>
+ (case ((string_drop s3800_0 s3801_0)) of
+ s3802_0 =>
+ (case ((sep_matches_prefix s3802_0)) of
+ SOME ((() , s3803_0)) =>
+ (case ((string_drop s3802_0 s3803_0)) of
+ s3804_0 =>
+ (case ((freg_name_matches_prefix s3804_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3805_0)) =>
+ (case ((string_drop s3804_0 s3805_0)) of
+ s3806_0 =>
+ (case ((sep_matches_prefix s3806_0)) of
+ SOME ((() , s3807_0)) =>
+ (case ((string_drop s3806_0 s3807_0)) of
+ s3808_0 =>
+ (case ((frm_mnemonic_matches_prefix s3808_0)) of
+ SOME ((rm, s3809_0)) =>
+ let p0_ = (string_drop s3808_0 s3809_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3777_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3777_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3778_0=
+ ((case s3778_0 of
+ s3779_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3779_0)) of
+ SOME ((FCVT_L_S, s3780_0)) =>
+ (case ((string_drop s3779_0 s3780_0)) of
+ s3781_0 =>
+ (case ((spc_matches_prefix0 s3781_0)) of
+ SOME ((() , s3782_0)) =>
+ (case ((string_drop s3781_0 s3782_0)) of
+ s3783_0 =>
+ (case ((reg_name_matches_prefix s3783_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3784_0)) =>
+ (case ((string_drop s3783_0 s3784_0)) of
+ s3785_0 =>
+ (case ((sep_matches_prefix s3785_0)) of
+ SOME ((() , s3786_0)) =>
+ (case ((string_drop s3785_0 s3786_0)) of
+ s3787_0 =>
+ (case ((freg_name_matches_prefix s3787_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3788_0)) =>
+ (case ((string_drop s3787_0 s3788_0)) of
+ s3789_0 =>
+ (case ((sep_matches_prefix s3789_0)) of
+ SOME ((() , s3790_0)) =>
+ (case ((string_drop s3789_0 s3790_0)) of
+ s3791_0 =>
+ (case ((frm_mnemonic_matches_prefix s3791_0)) of
+ SOME ((rm, s3792_0)) =>
+ let p0_ = (string_drop s3791_0 s3792_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3760_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3760_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3761_0=
+ ((case s3761_0 of
+ s3762_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3762_0)) of
+ SOME ((FCVT_S_WU, s3763_0)) =>
+ (case ((string_drop s3762_0 s3763_0)) of
+ s3764_0 =>
+ (case ((spc_matches_prefix0 s3764_0)) of
+ SOME ((() , s3765_0)) =>
+ (case ((string_drop s3764_0 s3765_0)) of
+ s3766_0 =>
+ (case ((freg_name_matches_prefix s3766_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3767_0)) =>
+ (case ((string_drop s3766_0 s3767_0)) of
+ s3768_0 =>
+ (case ((sep_matches_prefix s3768_0)) of
+ SOME ((() , s3769_0)) =>
+ (case ((string_drop s3768_0 s3769_0)) of
+ s3770_0 =>
+ (case ((reg_name_matches_prefix s3770_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3771_0)) =>
+ (case ((string_drop s3770_0 s3771_0)) of
+ s3772_0 =>
+ (case ((sep_matches_prefix s3772_0)) of
+ SOME ((() , s3773_0)) =>
+ (case ((string_drop s3772_0 s3773_0)) of
+ s3774_0 =>
+ (case ((frm_mnemonic_matches_prefix s3774_0)) of
+ SOME ((rm, s3775_0)) =>
+ let p0_ = (string_drop s3774_0 s3775_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3743_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3743_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3744_0=
+ ((case s3744_0 of
+ s3745_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3745_0)) of
+ SOME ((FCVT_S_W, s3746_0)) =>
+ (case ((string_drop s3745_0 s3746_0)) of
+ s3747_0 =>
+ (case ((spc_matches_prefix0 s3747_0)) of
+ SOME ((() , s3748_0)) =>
+ (case ((string_drop s3747_0 s3748_0)) of
+ s3749_0 =>
+ (case ((freg_name_matches_prefix s3749_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3750_0)) =>
+ (case ((string_drop s3749_0 s3750_0)) of
+ s3751_0 =>
+ (case ((sep_matches_prefix s3751_0)) of
+ SOME ((() , s3752_0)) =>
+ (case ((string_drop s3751_0 s3752_0)) of
+ s3753_0 =>
+ (case ((reg_name_matches_prefix s3753_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3754_0)) =>
+ (case ((string_drop s3753_0 s3754_0)) of
+ s3755_0 =>
+ (case ((sep_matches_prefix s3755_0)) of
+ SOME ((() , s3756_0)) =>
+ (case ((string_drop s3755_0 s3756_0)) of
+ s3757_0 =>
+ (case ((frm_mnemonic_matches_prefix s3757_0)) of
+ SOME ((rm, s3758_0)) =>
+ let p0_ = (string_drop s3757_0 s3758_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3726_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3726_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3727_0=
+ ((case s3727_0 of
+ s3728_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3728_0)) of
+ SOME ((FCVT_WU_S, s3729_0)) =>
+ (case ((string_drop s3728_0 s3729_0)) of
+ s3730_0 =>
+ (case ((spc_matches_prefix0 s3730_0)) of
+ SOME ((() , s3731_0)) =>
+ (case ((string_drop s3730_0 s3731_0)) of
+ s3732_0 =>
+ (case ((reg_name_matches_prefix s3732_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3733_0)) =>
+ (case ((string_drop s3732_0 s3733_0)) of
+ s3734_0 =>
+ (case ((sep_matches_prefix s3734_0)) of
+ SOME ((() , s3735_0)) =>
+ (case ((string_drop s3734_0 s3735_0)) of
+ s3736_0 =>
+ (case ((freg_name_matches_prefix s3736_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3737_0)) =>
+ (case ((string_drop s3736_0 s3737_0)) of
+ s3738_0 =>
+ (case ((sep_matches_prefix s3738_0)) of
+ SOME ((() , s3739_0)) =>
+ (case ((string_drop s3738_0 s3739_0)) of
+ s3740_0 =>
+ (case ((frm_mnemonic_matches_prefix s3740_0)) of
+ SOME ((rm, s3741_0)) =>
+ let p0_ = (string_drop s3740_0 s3741_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3709_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3709_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3710_0=
+ ((case s3710_0 of
+ s3711_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3711_0)) of
+ SOME ((FCVT_W_S, s3712_0)) =>
+ (case ((string_drop s3711_0 s3712_0)) of
+ s3713_0 =>
+ (case ((spc_matches_prefix0 s3713_0)) of
+ SOME ((() , s3714_0)) =>
+ (case ((string_drop s3713_0 s3714_0)) of
+ s3715_0 =>
+ (case ((reg_name_matches_prefix s3715_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3716_0)) =>
+ (case ((string_drop s3715_0 s3716_0)) of
+ s3717_0 =>
+ (case ((sep_matches_prefix s3717_0)) of
+ SOME ((() , s3718_0)) =>
+ (case ((string_drop s3717_0 s3718_0)) of
+ s3719_0 =>
+ (case ((freg_name_matches_prefix s3719_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3720_0)) =>
+ (case ((string_drop s3719_0 s3720_0)) of
+ s3721_0 =>
+ (case ((sep_matches_prefix s3721_0)) of
+ SOME ((() , s3722_0)) =>
+ (case ((string_drop s3721_0 s3722_0)) of
+ s3723_0 =>
+ (case ((frm_mnemonic_matches_prefix s3723_0)) of
+ SOME ((rm, s3724_0)) =>
+ let p0_ = (string_drop s3723_0 s3724_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3692_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3692_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s3693_0=
+ ((case s3693_0 of
+ s3694_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s3694_0)) of
+ SOME ((FSQRT_S, s3695_0)) =>
+ (case ((string_drop s3694_0 s3695_0)) of
+ s3696_0 =>
+ (case ((spc_matches_prefix0 s3696_0)) of
+ SOME ((() , s3697_0)) =>
+ (case ((string_drop s3696_0 s3697_0)) of
+ s3698_0 =>
+ (case ((freg_name_matches_prefix s3698_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3699_0)) =>
+ (case ((string_drop s3698_0 s3699_0)) of
+ s3700_0 =>
+ (case ((sep_matches_prefix s3700_0)) of
+ SOME ((() , s3701_0)) =>
+ (case ((string_drop s3700_0 s3701_0)) of
+ s3702_0 =>
+ (case ((freg_name_matches_prefix s3702_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3703_0)) =>
+ (case ((string_drop s3702_0 s3703_0)) of
+ s3704_0 =>
+ (case ((sep_matches_prefix s3704_0)) of
+ SOME ((() , s3705_0)) =>
+ (case ((string_drop s3704_0 s3705_0)) of
+ s3706_0 =>
+ (case ((frm_mnemonic_matches_prefix s3706_0)) of
+ SOME ((rm, s3707_0)) =>
+ let p0_ = (string_drop s3706_0 s3707_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_S, rd, rs1, rm) else NONE
| _ => NONE
)
)
@@ -27789,45 +38780,687 @@ val _ = Define `
)))`;
-(*val _s2506_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s3671_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3671_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s3672_0=
+ ((case s3672_0 of
+ s3673_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s3673_0)) of
+ SOME ((op, s3674_0)) =>
+ (case ((string_drop s3673_0 s3674_0)) of
+ s3675_0 =>
+ (case ((spc_matches_prefix0 s3675_0)) of
+ SOME ((() , s3676_0)) =>
+ (case ((string_drop s3675_0 s3676_0)) of
+ s3677_0 =>
+ (case ((freg_name_matches_prefix s3677_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3678_0)) =>
+ (case ((string_drop s3677_0 s3678_0)) of
+ s3679_0 =>
+ (case ((sep_matches_prefix s3679_0)) of
+ SOME ((() , s3680_0)) =>
+ (case ((string_drop s3679_0 s3680_0)) of
+ s3681_0 =>
+ (case ((freg_name_matches_prefix s3681_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3682_0)) =>
+ (case ((string_drop s3681_0 s3682_0)) of
+ s3683_0 =>
+ (case ((sep_matches_prefix s3683_0)) of
+ SOME ((() , s3684_0)) =>
+ (case ((string_drop s3683_0 s3684_0)) of
+ s3685_0 =>
+ (case ((freg_name_matches_prefix s3685_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3686_0)) =>
+ (case ((string_drop s3685_0 s3686_0)) of
+ s3687_0 =>
+ (case ((sep_matches_prefix s3687_0)) of
+ SOME ((() , s3688_0)) =>
+ (case ((string_drop s3687_0 s3688_0)) of
+ s3689_0 =>
+ (case ((frm_mnemonic_matches_prefix s3689_0)) of
+ SOME ((rm, s3690_0)) =>
+ let p0_ = (string_drop s3689_0 s3690_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3646_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s3646_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s3647_0=
+ ((case s3647_0 of
+ s3648_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s3648_0)) of
+ SOME ((op, s3649_0)) =>
+ (case ((string_drop s3648_0 s3649_0)) of
+ s3650_0 =>
+ (case ((spc_matches_prefix0 s3650_0)) of
+ SOME ((() , s3651_0)) =>
+ (case ((string_drop s3650_0 s3651_0)) of
+ s3652_0 =>
+ (case ((freg_name_matches_prefix s3652_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3653_0)) =>
+ (case ((string_drop s3652_0 s3653_0)) of
+ s3654_0 =>
+ (case ((sep_matches_prefix s3654_0)) of
+ SOME ((() , s3655_0)) =>
+ (case ((string_drop s3654_0 s3655_0)) of
+ s3656_0 =>
+ (case ((freg_name_matches_prefix s3656_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3657_0)) =>
+ (case ((string_drop s3656_0 s3657_0)) of
+ s3658_0 =>
+ (case ((sep_matches_prefix s3658_0)) of
+ SOME ((() , s3659_0)) =>
+ (case ((string_drop s3658_0 s3659_0)) of
+ s3660_0 =>
+ (case ((freg_name_matches_prefix s3660_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3661_0)) =>
+ (case ((string_drop s3660_0 s3661_0)) of
+ s3662_0 =>
+ (case ((sep_matches_prefix s3662_0)) of
+ SOME ((() , s3663_0)) =>
+ (case ((string_drop s3662_0 s3663_0)) of
+ s3664_0 =>
+ (case ((freg_name_matches_prefix s3664_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s3665_0)) =>
+ (case ((string_drop s3664_0 s3665_0)) of
+ s3666_0 =>
+ (case ((sep_matches_prefix s3666_0)) of
+ SOME ((() , s3667_0)) =>
+ (case ((string_drop s3666_0 s3667_0)) of
+ s3668_0 =>
+ (case ((frm_mnemonic_matches_prefix s3668_0)) of
+ SOME ((rm, s3669_0)) =>
+ let p0_ = (string_drop s3668_0 s3669_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3622_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s3622_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s3623_0=
+ (let s3624_0 = s3623_0 in
+ if ((string_startswith s3624_0 "fs")) then
+ (case ((string_drop s3624_0 ((string_length "fs")))) of
+ s3625_0 =>
+ (case ((size_mnemonic_matches_prefix s3625_0)) of
+ SOME ((width, s3626_0)) =>
+ (case ((string_drop s3625_0 s3626_0)) of
+ s3627_0 =>
+ (case ((spc_matches_prefix0 s3627_0)) of
+ SOME ((() , s3628_0)) =>
+ (case ((string_drop s3627_0 s3628_0)) of
+ s3629_0 =>
+ (case ((freg_name_matches_prefix s3629_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3630_0)) =>
+ (case ((string_drop s3629_0 s3630_0)) of
+ s3631_0 =>
+ (case ((sep_matches_prefix s3631_0)) of
+ SOME ((() , s3632_0)) =>
+ (case ((string_drop s3631_0 s3632_0)) of
+ s3633_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3633_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s3634_0)) =>
+ (case ((string_drop s3633_0 s3634_0)) of
+ s3635_0 =>
+ (case ((opt_spc_matches_prefix0 s3635_0)) of
+ SOME ((() , s3636_0)) =>
+ let s3637_0 = (string_drop s3635_0 s3636_0) in
+ if ((string_startswith s3637_0 "(")) then
+ (case ((string_drop s3637_0 ((string_length "(")))) of
+ s3638_0 =>
+ (case ((opt_spc_matches_prefix0 s3638_0)) of
+ SOME ((() , s3639_0)) =>
+ (case ((string_drop s3638_0 s3639_0)) of
+ s3640_0 =>
+ (case ((reg_name_matches_prefix s3640_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3641_0)) =>
+ (case ((string_drop s3640_0 s3641_0)) of
+ s3642_0 =>
+ (case ((opt_spc_matches_prefix0 s3642_0)) of
+ SOME ((() , s3643_0)) =>
+ let s3644_0 = (string_drop s3642_0 s3643_0) in
+ if ((string_startswith s3644_0 ")")) then
+ let p0_ = (string_drop s3644_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rs2, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3598_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s3598_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s3599_0=
+ (let s3600_0 = s3599_0 in
+ if ((string_startswith s3600_0 "fl")) then
+ (case ((string_drop s3600_0 ((string_length "fl")))) of
+ s3601_0 =>
+ (case ((size_mnemonic_matches_prefix s3601_0)) of
+ SOME ((width, s3602_0)) =>
+ (case ((string_drop s3601_0 s3602_0)) of
+ s3603_0 =>
+ (case ((spc_matches_prefix0 s3603_0)) of
+ SOME ((() , s3604_0)) =>
+ (case ((string_drop s3603_0 s3604_0)) of
+ s3605_0 =>
+ (case ((freg_name_matches_prefix s3605_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3606_0)) =>
+ (case ((string_drop s3605_0 s3606_0)) of
+ s3607_0 =>
+ (case ((sep_matches_prefix s3607_0)) of
+ SOME ((() , s3608_0)) =>
+ (case ((string_drop s3607_0 s3608_0)) of
+ s3609_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3609_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s3610_0)) =>
+ (case ((string_drop s3609_0 s3610_0)) of
+ s3611_0 =>
+ (case ((opt_spc_matches_prefix0 s3611_0)) of
+ SOME ((() , s3612_0)) =>
+ let s3613_0 = (string_drop s3611_0 s3612_0) in
+ if ((string_startswith s3613_0 "(")) then
+ (case ((string_drop s3613_0 ((string_length "(")))) of
+ s3614_0 =>
+ (case ((opt_spc_matches_prefix0 s3614_0)) of
+ SOME ((() , s3615_0)) =>
+ (case ((string_drop s3614_0 s3615_0)) of
+ s3616_0 =>
+ (case ((reg_name_matches_prefix s3616_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3617_0)) =>
+ (case ((string_drop s3616_0 s3617_0)) of
+ s3618_0 =>
+ (case ((opt_spc_matches_prefix0 s3618_0)) of
+ SOME ((() , s3619_0)) =>
+ let s3620_0 = (string_drop s3618_0 s3619_0) in
+ if ((string_startswith s3620_0 ")")) then
+ let p0_ = (string_drop s3620_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rd, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3586_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s3586_:string ->((5)words$word#(5)words$word#(12)words$word)option) s3587_0=
+ (let s3588_0 = s3587_0 in
+ if ((string_startswith s3588_0 "fence.i.reserved.")) then
+ (case ((string_drop s3588_0 ((string_length "fence.i.reserved.")))) of
+ s3589_0 =>
+ (case ((reg_name_matches_prefix s3589_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3590_0)) =>
+ let s3591_0 = (string_drop s3589_0 s3590_0) in
+ if ((string_startswith s3591_0 ".")) then
+ (case ((string_drop s3591_0 ((string_length ".")))) of
+ s3592_0 =>
+ (case ((reg_name_matches_prefix s3592_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s3593_0)) =>
+ let s3594_0 = (string_drop s3592_0 s3593_0) in
+ if ((string_startswith s3594_0 ".")) then
+ (case ((string_drop s3594_0 ((string_length ".")))) of
+ s3595_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3595_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s3596_0)) =>
+ let p0_ = (string_drop s3595_0 s3596_0) in
+ if (((p0_ = ""))) then SOME (rd, rs, imm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3568_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4))*)
+
+val _ = Define `
+ ((s3568_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word)option) s3569_0=
+ (let s3570_0 = s3569_0 in
+ if ((string_startswith s3570_0 "fence.reserved.")) then
+ (case ((string_drop s3570_0 ((string_length "fence.reserved.")))) of
+ s3571_0 =>
+ (case ((fence_bits_matches_prefix s3571_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s3572_0)) =>
+ let s3573_0 = (string_drop s3571_0 s3572_0) in
+ if ((string_startswith s3573_0 ".")) then
+ (case ((string_drop s3573_0 ((string_length ".")))) of
+ s3574_0 =>
+ (case ((fence_bits_matches_prefix s3574_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s3575_0)) =>
+ let s3576_0 = (string_drop s3574_0 s3575_0) in
+ if ((string_startswith s3576_0 ".")) then
+ (case ((string_drop s3576_0 ((string_length ".")))) of
+ s3577_0 =>
+ (case ((reg_name_matches_prefix s3577_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s3578_0)) =>
+ let s3579_0 = (string_drop s3577_0 s3578_0) in
+ if ((string_startswith s3579_0 ".")) then
+ (case ((string_drop s3579_0 ((string_length ".")))) of
+ s3580_0 =>
+ (case ((reg_name_matches_prefix s3580_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3581_0)) =>
+ let s3582_0 = (string_drop s3580_0 s3581_0) in
+ if ((string_startswith s3582_0 ".")) then
+ (case ((string_drop s3582_0 ((string_length ".")))) of
+ s3583_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s3583_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s3584_0)) =>
+ let p0_ = (string_drop s3583_0 s3584_0) in
+ if (((p0_ = ""))) then SOME (pred, succ, rs, rd, fm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3562_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s3562_:string ->((3)words$word)option) s3563_0=
+ (let s3564_0 = s3563_0 in
+ if ((string_startswith s3564_0 "c.srai.hint.")) then
+ (case ((string_drop s3564_0 ((string_length "c.srai.hint.")))) of
+ s3565_0 =>
+ (case ((creg_name_matches_prefix s3565_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3566_0)) =>
+ let p0_ = (string_drop s3565_0 s3566_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3556_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s3556_:string ->((3)words$word)option) s3557_0=
+ (let s3558_0 = s3557_0 in
+ if ((string_startswith s3558_0 "c.srli.hint.")) then
+ (case ((string_drop s3558_0 ((string_length "c.srli.hint.")))) of
+ s3559_0 =>
+ (case ((creg_name_matches_prefix s3559_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3560_0)) =>
+ let p0_ = (string_drop s3559_0 s3560_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3547_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2506_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s2507_0=
- ((case s2507_0 of
- s2508_0 =>
- (case ((csr_mnemonic_matches_prefix s2508_0)) of
- SOME ((op, s2509_0)) =>
- let s2510_0 = (string_drop s2508_0 s2509_0) in
- if ((string_startswith s2510_0 "i")) then
- (case ((string_drop s2510_0 ((string_length "i")))) of
- s2511_0 =>
- (case ((spc_matches_prefix0 s2511_0)) of
- SOME ((() , s2512_0)) =>
- (case ((string_drop s2511_0 s2512_0)) of
- s2513_0 =>
- (case ((reg_name_matches_prefix s2513_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2514_0)) =>
- (case ((string_drop s2513_0 s2514_0)) of
- s2515_0 =>
- (case ((sep_matches_prefix s2515_0)) of
- SOME ((() , s2516_0)) =>
- (case ((string_drop s2515_0 s2516_0)) of
- s2517_0 =>
+ ((s3547_:string ->((5)words$word#(6)words$word)option) s3548_0=
+ (let s3549_0 = s3548_0 in
+ if ((string_startswith s3549_0 "c.slli.hint.")) then
+ (case ((string_drop s3549_0 ((string_length "c.slli.hint.")))) of
+ s3550_0 =>
+ (case ((reg_name_matches_prefix s3550_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3551_0)) =>
+ let s3552_0 = (string_drop s3550_0 s3551_0) in
+ if ((string_startswith s3552_0 ".")) then
+ (case ((string_drop s3552_0 ((string_length ".")))) of
+ s3553_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s3553_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3554_0)) =>
+ let p0_ = (string_drop s3553_0 s3554_0) in
+ if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3541_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s3541_:string ->((5)words$word)option) s3542_0=
+ (let s3543_0 = s3542_0 in
+ if ((string_startswith s3543_0 "c.add.hint.")) then
+ (case ((string_drop s3543_0 ((string_length "c.add.hint.")))) of
+ s3544_0 =>
+ (case ((reg_name_matches_prefix s3544_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3545_0)) =>
+ let p0_ = (string_drop s3544_0 s3545_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3535_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s3535_:string ->((5)words$word)option) s3536_0=
+ (let s3537_0 = s3536_0 in
+ if ((string_startswith s3537_0 "c.mv.hint.")) then
+ (case ((string_drop s3537_0 ((string_length "c.mv.hint.")))) of
+ s3538_0 =>
+ (case ((reg_name_matches_prefix s3538_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3539_0)) =>
+ let p0_ = (string_drop s3538_0 s3539_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3529_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s3529_:string ->((6)words$word)option) s3530_0=
+ (let s3531_0 = s3530_0 in
+ if ((string_startswith s3531_0 "c.lui.hint.")) then
+ (case ((string_drop s3531_0 ((string_length "c.lui.hint.")))) of
+ s3532_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3532_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3533_0)) =>
+ let p0_ = (string_drop s3532_0 s3533_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3523_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s3523_:string ->((6)words$word)option) s3524_0=
+ (let s3525_0 = s3524_0 in
+ if ((string_startswith s3525_0 "c.li.hint.")) then
+ (case ((string_drop s3525_0 ((string_length "c.li.hint.")))) of
+ s3526_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3526_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3527_0)) =>
+ let p0_ = (string_drop s3526_0 s3527_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3517_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s3517_:string ->((5)words$word)option) s3518_0=
+ (let s3519_0 = s3518_0 in
+ if ((string_startswith s3519_0 "c.addi.hint.")) then
+ (case ((string_drop s3519_0 ((string_length "c.addi.hint.")))) of
+ s3520_0 =>
+ (case ((reg_name_matches_prefix s3520_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3521_0)) =>
+ let p0_ = (string_drop s3520_0 s3521_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3511_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s3511_:string ->((6)words$word)option) s3512_0=
+ (let s3513_0 = s3512_0 in
+ if ((string_startswith s3513_0 "c.nop.hint.")) then
+ (case ((string_drop s3513_0 ((string_length "c.nop.hint.")))) of
+ s3514_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3514_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3515_0)) =>
+ let p0_ = (string_drop s3514_0 s3515_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3494_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s3494_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s3495_0=
+ ((case s3495_0 of
+ s3496_0 =>
+ (case ((csr_mnemonic_matches_prefix s3496_0)) of
+ SOME ((op, s3497_0)) =>
+ (case ((string_drop s3496_0 s3497_0)) of
+ s3498_0 =>
+ (case ((spc_matches_prefix0 s3498_0)) of
+ SOME ((() , s3499_0)) =>
+ (case ((string_drop s3498_0 s3499_0)) of
+ s3500_0 =>
+ (case ((reg_name_matches_prefix s3500_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3501_0)) =>
+ (case ((string_drop s3500_0 s3501_0)) of
+ s3502_0 =>
+ (case ((sep_matches_prefix s3502_0)) of
+ SOME ((() , s3503_0)) =>
+ (case ((string_drop s3502_0 s3503_0)) of
+ s3504_0 =>
+ (case ((csr_name_map_matches_prefix s3504_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s3505_0)) =>
+ (case ((string_drop s3504_0 s3505_0)) of
+ s3506_0 =>
+ (case ((sep_matches_prefix s3506_0)) of
+ SOME ((() , s3507_0)) =>
+ (case ((string_drop s3506_0 s3507_0)) of
+ s3508_0 =>
+ (case ((reg_name_matches_prefix s3508_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3509_0)) =>
+ let p0_ = (string_drop s3508_0 s3509_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3476_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s3476_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s3477_0=
+ ((case s3477_0 of
+ s3478_0 =>
+ (case ((csr_mnemonic_matches_prefix s3478_0)) of
+ SOME ((op, s3479_0)) =>
+ let s3480_0 = (string_drop s3478_0 s3479_0) in
+ if ((string_startswith s3480_0 "i")) then
+ (case ((string_drop s3480_0 ((string_length "i")))) of
+ s3481_0 =>
+ (case ((spc_matches_prefix0 s3481_0)) of
+ SOME ((() , s3482_0)) =>
+ (case ((string_drop s3481_0 s3482_0)) of
+ s3483_0 =>
+ (case ((reg_name_matches_prefix s3483_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3484_0)) =>
+ (case ((string_drop s3483_0 s3484_0)) of
+ s3485_0 =>
+ (case ((sep_matches_prefix s3485_0)) of
+ SOME ((() , s3486_0)) =>
+ (case ((string_drop s3485_0 s3486_0)) of
+ s3487_0 =>
+ (case ((csr_name_map_matches_prefix s3487_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s3488_0)) =>
+ (case ((string_drop s3487_0 s3488_0)) of
+ s3489_0 =>
+ (case ((sep_matches_prefix s3489_0)) of
+ SOME ((() , s3490_0)) =>
+ (case ((string_drop s3489_0 s3490_0)) of
+ s3491_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2517_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2518_0)) =>
- (case ((string_drop s2517_0 s2518_0)) of
- s2519_0 =>
- (case ((sep_matches_prefix s2519_0)) of
- SOME ((() , s2520_0)) =>
- (case ((string_drop s2519_0 s2520_0)) of
- s2521_0 =>
- (case ((csr_name_map_matches_prefix s2521_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s2522_0)) =>
- let p0_ = (string_drop s2521_0 s2522_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ s3491_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3492_0)) =>
+ let p0_ = (string_drop s3491_0 s3492_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
| _ => NONE
)
)
@@ -27851,43 +39484,43 @@ val _ = Define `
)))`;
-(*val _s2487_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2487_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2488_0=
- (let s2489_0 = s2488_0 in
- if ((string_startswith s2489_0 "rem")) then
- (case ((string_drop s2489_0 ((string_length "rem")))) of
- s2490_0 =>
- (case ((maybe_not_u_matches_prefix s2490_0)) of
- SOME ((s, s2491_0)) =>
- let s2492_0 = (string_drop s2490_0 s2491_0) in
- if ((string_startswith s2492_0 "w")) then
- (case ((string_drop s2492_0 ((string_length "w")))) of
- s2493_0 =>
- (case ((spc_matches_prefix0 s2493_0)) of
- SOME ((() , s2494_0)) =>
- (case ((string_drop s2493_0 s2494_0)) of
- s2495_0 =>
- (case ((reg_name_matches_prefix s2495_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2496_0)) =>
- (case ((string_drop s2495_0 s2496_0)) of
- s2497_0 =>
- (case ((sep_matches_prefix s2497_0)) of
- SOME ((() , s2498_0)) =>
- (case ((string_drop s2497_0 s2498_0)) of
- s2499_0 =>
- (case ((reg_name_matches_prefix s2499_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2500_0)) =>
- (case ((string_drop s2499_0 s2500_0)) of
- s2501_0 =>
- (case ((sep_matches_prefix s2501_0)) of
- SOME ((() , s2502_0)) =>
- (case ((string_drop s2501_0 s2502_0)) of
- s2503_0 =>
- (case ((reg_name_matches_prefix s2503_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2504_0)) =>
- let p0_ = (string_drop s2503_0 s2504_0) in
+(*val _s3457_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3457_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3458_0=
+ (let s3459_0 = s3458_0 in
+ if ((string_startswith s3459_0 "rem")) then
+ (case ((string_drop s3459_0 ((string_length "rem")))) of
+ s3460_0 =>
+ (case ((maybe_not_u_matches_prefix s3460_0)) of
+ SOME ((s, s3461_0)) =>
+ let s3462_0 = (string_drop s3460_0 s3461_0) in
+ if ((string_startswith s3462_0 "w")) then
+ (case ((string_drop s3462_0 ((string_length "w")))) of
+ s3463_0 =>
+ (case ((spc_matches_prefix0 s3463_0)) of
+ SOME ((() , s3464_0)) =>
+ (case ((string_drop s3463_0 s3464_0)) of
+ s3465_0 =>
+ (case ((reg_name_matches_prefix s3465_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3466_0)) =>
+ (case ((string_drop s3465_0 s3466_0)) of
+ s3467_0 =>
+ (case ((sep_matches_prefix s3467_0)) of
+ SOME ((() , s3468_0)) =>
+ (case ((string_drop s3467_0 s3468_0)) of
+ s3469_0 =>
+ (case ((reg_name_matches_prefix s3469_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3470_0)) =>
+ (case ((string_drop s3469_0 s3470_0)) of
+ s3471_0 =>
+ (case ((sep_matches_prefix s3471_0)) of
+ SOME ((() , s3472_0)) =>
+ (case ((string_drop s3471_0 s3472_0)) of
+ s3473_0 =>
+ (case ((reg_name_matches_prefix s3473_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3474_0)) =>
+ let p0_ = (string_drop s3473_0 s3474_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -27913,43 +39546,43 @@ val _ = Define `
else NONE))`;
-(*val _s2468_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2468_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2469_0=
- (let s2470_0 = s2469_0 in
- if ((string_startswith s2470_0 "div")) then
- (case ((string_drop s2470_0 ((string_length "div")))) of
- s2471_0 =>
- (case ((maybe_not_u_matches_prefix s2471_0)) of
- SOME ((s, s2472_0)) =>
- let s2473_0 = (string_drop s2471_0 s2472_0) in
- if ((string_startswith s2473_0 "w")) then
- (case ((string_drop s2473_0 ((string_length "w")))) of
- s2474_0 =>
- (case ((spc_matches_prefix0 s2474_0)) of
- SOME ((() , s2475_0)) =>
- (case ((string_drop s2474_0 s2475_0)) of
- s2476_0 =>
- (case ((reg_name_matches_prefix s2476_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2477_0)) =>
- (case ((string_drop s2476_0 s2477_0)) of
- s2478_0 =>
- (case ((sep_matches_prefix s2478_0)) of
- SOME ((() , s2479_0)) =>
- (case ((string_drop s2478_0 s2479_0)) of
- s2480_0 =>
- (case ((reg_name_matches_prefix s2480_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2481_0)) =>
- (case ((string_drop s2480_0 s2481_0)) of
- s2482_0 =>
- (case ((sep_matches_prefix s2482_0)) of
- SOME ((() , s2483_0)) =>
- (case ((string_drop s2482_0 s2483_0)) of
- s2484_0 =>
- (case ((reg_name_matches_prefix s2484_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2485_0)) =>
- let p0_ = (string_drop s2484_0 s2485_0) in
+(*val _s3438_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3438_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3439_0=
+ (let s3440_0 = s3439_0 in
+ if ((string_startswith s3440_0 "div")) then
+ (case ((string_drop s3440_0 ((string_length "div")))) of
+ s3441_0 =>
+ (case ((maybe_not_u_matches_prefix s3441_0)) of
+ SOME ((s, s3442_0)) =>
+ let s3443_0 = (string_drop s3441_0 s3442_0) in
+ if ((string_startswith s3443_0 "w")) then
+ (case ((string_drop s3443_0 ((string_length "w")))) of
+ s3444_0 =>
+ (case ((spc_matches_prefix0 s3444_0)) of
+ SOME ((() , s3445_0)) =>
+ (case ((string_drop s3444_0 s3445_0)) of
+ s3446_0 =>
+ (case ((reg_name_matches_prefix s3446_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3447_0)) =>
+ (case ((string_drop s3446_0 s3447_0)) of
+ s3448_0 =>
+ (case ((sep_matches_prefix s3448_0)) of
+ SOME ((() , s3449_0)) =>
+ (case ((string_drop s3448_0 s3449_0)) of
+ s3450_0 =>
+ (case ((reg_name_matches_prefix s3450_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3451_0)) =>
+ (case ((string_drop s3450_0 s3451_0)) of
+ s3452_0 =>
+ (case ((sep_matches_prefix s3452_0)) of
+ SOME ((() , s3453_0)) =>
+ (case ((string_drop s3452_0 s3453_0)) of
+ s3454_0 =>
+ (case ((reg_name_matches_prefix s3454_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3455_0)) =>
+ let p0_ = (string_drop s3454_0 s3455_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -27975,37 +39608,37 @@ val _ = Define `
else NONE))`;
-(*val _s2452_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2452_:string ->((5)words$word#(5)words$word#(5)words$word)option) s2453_0=
- (let s2454_0 = s2453_0 in
- if ((string_startswith s2454_0 "mulw")) then
- (case ((string_drop s2454_0 ((string_length "mulw")))) of
- s2455_0 =>
- (case ((spc_matches_prefix0 s2455_0)) of
- SOME ((() , s2456_0)) =>
- (case ((string_drop s2455_0 s2456_0)) of
- s2457_0 =>
- (case ((reg_name_matches_prefix s2457_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2458_0)) =>
- (case ((string_drop s2457_0 s2458_0)) of
- s2459_0 =>
- (case ((sep_matches_prefix s2459_0)) of
- SOME ((() , s2460_0)) =>
- (case ((string_drop s2459_0 s2460_0)) of
- s2461_0 =>
- (case ((reg_name_matches_prefix s2461_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2462_0)) =>
- (case ((string_drop s2461_0 s2462_0)) of
- s2463_0 =>
- (case ((sep_matches_prefix s2463_0)) of
- SOME ((() , s2464_0)) =>
- (case ((string_drop s2463_0 s2464_0)) of
- s2465_0 =>
- (case ((reg_name_matches_prefix s2465_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2466_0)) =>
- let p0_ = (string_drop s2465_0 s2466_0) in
+(*val _s3422_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3422_:string ->((5)words$word#(5)words$word#(5)words$word)option) s3423_0=
+ (let s3424_0 = s3423_0 in
+ if ((string_startswith s3424_0 "mulw")) then
+ (case ((string_drop s3424_0 ((string_length "mulw")))) of
+ s3425_0 =>
+ (case ((spc_matches_prefix0 s3425_0)) of
+ SOME ((() , s3426_0)) =>
+ (case ((string_drop s3425_0 s3426_0)) of
+ s3427_0 =>
+ (case ((reg_name_matches_prefix s3427_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3428_0)) =>
+ (case ((string_drop s3427_0 s3428_0)) of
+ s3429_0 =>
+ (case ((sep_matches_prefix s3429_0)) of
+ SOME ((() , s3430_0)) =>
+ (case ((string_drop s3429_0 s3430_0)) of
+ s3431_0 =>
+ (case ((reg_name_matches_prefix s3431_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3432_0)) =>
+ (case ((string_drop s3431_0 s3432_0)) of
+ s3433_0 =>
+ (case ((sep_matches_prefix s3433_0)) of
+ SOME ((() , s3434_0)) =>
+ (case ((string_drop s3433_0 s3434_0)) of
+ s3435_0 =>
+ (case ((reg_name_matches_prefix s3435_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3436_0)) =>
+ let p0_ = (string_drop s3435_0 s3436_0) in
if (((p0_ = ""))) then SOME (rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28028,41 +39661,41 @@ val _ = Define `
else NONE))`;
-(*val _s2434_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3404_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2434_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2435_0=
- (let s2436_0 = s2435_0 in
- if ((string_startswith s2436_0 "rem")) then
- (case ((string_drop s2436_0 ((string_length "rem")))) of
- s2437_0 =>
- (case ((maybe_not_u_matches_prefix s2437_0)) of
- SOME ((s, s2438_0)) =>
- (case ((string_drop s2437_0 s2438_0)) of
- s2439_0 =>
- (case ((spc_matches_prefix0 s2439_0)) of
- SOME ((() , s2440_0)) =>
- (case ((string_drop s2439_0 s2440_0)) of
- s2441_0 =>
- (case ((reg_name_matches_prefix s2441_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2442_0)) =>
- (case ((string_drop s2441_0 s2442_0)) of
- s2443_0 =>
- (case ((sep_matches_prefix s2443_0)) of
- SOME ((() , s2444_0)) =>
- (case ((string_drop s2443_0 s2444_0)) of
- s2445_0 =>
- (case ((reg_name_matches_prefix s2445_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2446_0)) =>
- (case ((string_drop s2445_0 s2446_0)) of
- s2447_0 =>
- (case ((sep_matches_prefix s2447_0)) of
- SOME ((() , s2448_0)) =>
- (case ((string_drop s2447_0 s2448_0)) of
- s2449_0 =>
- (case ((reg_name_matches_prefix s2449_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2450_0)) =>
- let p0_ = (string_drop s2449_0 s2450_0) in
+ ((s3404_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3405_0=
+ (let s3406_0 = s3405_0 in
+ if ((string_startswith s3406_0 "rem")) then
+ (case ((string_drop s3406_0 ((string_length "rem")))) of
+ s3407_0 =>
+ (case ((maybe_not_u_matches_prefix s3407_0)) of
+ SOME ((s, s3408_0)) =>
+ (case ((string_drop s3407_0 s3408_0)) of
+ s3409_0 =>
+ (case ((spc_matches_prefix0 s3409_0)) of
+ SOME ((() , s3410_0)) =>
+ (case ((string_drop s3409_0 s3410_0)) of
+ s3411_0 =>
+ (case ((reg_name_matches_prefix s3411_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3412_0)) =>
+ (case ((string_drop s3411_0 s3412_0)) of
+ s3413_0 =>
+ (case ((sep_matches_prefix s3413_0)) of
+ SOME ((() , s3414_0)) =>
+ (case ((string_drop s3413_0 s3414_0)) of
+ s3415_0 =>
+ (case ((reg_name_matches_prefix s3415_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3416_0)) =>
+ (case ((string_drop s3415_0 s3416_0)) of
+ s3417_0 =>
+ (case ((sep_matches_prefix s3417_0)) of
+ SOME ((() , s3418_0)) =>
+ (case ((string_drop s3417_0 s3418_0)) of
+ s3419_0 =>
+ (case ((reg_name_matches_prefix s3419_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3420_0)) =>
+ let p0_ = (string_drop s3419_0 s3420_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28088,41 +39721,41 @@ val _ = Define `
else NONE))`;
-(*val _s2416_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3386_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2416_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2417_0=
- (let s2418_0 = s2417_0 in
- if ((string_startswith s2418_0 "div")) then
- (case ((string_drop s2418_0 ((string_length "div")))) of
- s2419_0 =>
- (case ((maybe_not_u_matches_prefix s2419_0)) of
- SOME ((s, s2420_0)) =>
- (case ((string_drop s2419_0 s2420_0)) of
- s2421_0 =>
- (case ((spc_matches_prefix0 s2421_0)) of
- SOME ((() , s2422_0)) =>
- (case ((string_drop s2421_0 s2422_0)) of
- s2423_0 =>
- (case ((reg_name_matches_prefix s2423_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2424_0)) =>
- (case ((string_drop s2423_0 s2424_0)) of
- s2425_0 =>
- (case ((sep_matches_prefix s2425_0)) of
- SOME ((() , s2426_0)) =>
- (case ((string_drop s2425_0 s2426_0)) of
- s2427_0 =>
- (case ((reg_name_matches_prefix s2427_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2428_0)) =>
- (case ((string_drop s2427_0 s2428_0)) of
- s2429_0 =>
- (case ((sep_matches_prefix s2429_0)) of
- SOME ((() , s2430_0)) =>
- (case ((string_drop s2429_0 s2430_0)) of
- s2431_0 =>
- (case ((reg_name_matches_prefix s2431_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2432_0)) =>
- let p0_ = (string_drop s2431_0 s2432_0) in
+ ((s3386_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3387_0=
+ (let s3388_0 = s3387_0 in
+ if ((string_startswith s3388_0 "div")) then
+ (case ((string_drop s3388_0 ((string_length "div")))) of
+ s3389_0 =>
+ (case ((maybe_not_u_matches_prefix s3389_0)) of
+ SOME ((s, s3390_0)) =>
+ (case ((string_drop s3389_0 s3390_0)) of
+ s3391_0 =>
+ (case ((spc_matches_prefix0 s3391_0)) of
+ SOME ((() , s3392_0)) =>
+ (case ((string_drop s3391_0 s3392_0)) of
+ s3393_0 =>
+ (case ((reg_name_matches_prefix s3393_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3394_0)) =>
+ (case ((string_drop s3393_0 s3394_0)) of
+ s3395_0 =>
+ (case ((sep_matches_prefix s3395_0)) of
+ SOME ((() , s3396_0)) =>
+ (case ((string_drop s3395_0 s3396_0)) of
+ s3397_0 =>
+ (case ((reg_name_matches_prefix s3397_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3398_0)) =>
+ (case ((string_drop s3397_0 s3398_0)) of
+ s3399_0 =>
+ (case ((sep_matches_prefix s3399_0)) of
+ SOME ((() , s3400_0)) =>
+ (case ((string_drop s3399_0 s3400_0)) of
+ s3401_0 =>
+ (case ((reg_name_matches_prefix s3401_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3402_0)) =>
+ let p0_ = (string_drop s3401_0 s3402_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28148,39 +39781,39 @@ val _ = Define `
else NONE))`;
-(*val _s2399_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3369_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2399_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s2400_0=
- ((case s2400_0 of
- s2401_0 =>
- (case ((mul_mnemonic_matches_prefix s2401_0)) of
- SOME (((high, signed1, signed2), s2402_0)) =>
- (case ((string_drop s2401_0 s2402_0)) of
- s2403_0 =>
- (case ((spc_matches_prefix0 s2403_0)) of
- SOME ((() , s2404_0)) =>
- (case ((string_drop s2403_0 s2404_0)) of
- s2405_0 =>
- (case ((reg_name_matches_prefix s2405_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2406_0)) =>
- (case ((string_drop s2405_0 s2406_0)) of
- s2407_0 =>
- (case ((sep_matches_prefix s2407_0)) of
- SOME ((() , s2408_0)) =>
- (case ((string_drop s2407_0 s2408_0)) of
- s2409_0 =>
- (case ((reg_name_matches_prefix s2409_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2410_0)) =>
- (case ((string_drop s2409_0 s2410_0)) of
- s2411_0 =>
- (case ((sep_matches_prefix s2411_0)) of
- SOME ((() , s2412_0)) =>
- (case ((string_drop s2411_0 s2412_0)) of
- s2413_0 =>
- (case ((reg_name_matches_prefix s2413_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2414_0)) =>
- let p0_ = (string_drop s2413_0 s2414_0) in
+ ((s3369_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s3370_0=
+ ((case s3370_0 of
+ s3371_0 =>
+ (case ((mul_mnemonic_matches_prefix s3371_0)) of
+ SOME (((high, signed1, signed2), s3372_0)) =>
+ (case ((string_drop s3371_0 s3372_0)) of
+ s3373_0 =>
+ (case ((spc_matches_prefix0 s3373_0)) of
+ SOME ((() , s3374_0)) =>
+ (case ((string_drop s3373_0 s3374_0)) of
+ s3375_0 =>
+ (case ((reg_name_matches_prefix s3375_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3376_0)) =>
+ (case ((string_drop s3375_0 s3376_0)) of
+ s3377_0 =>
+ (case ((sep_matches_prefix s3377_0)) of
+ SOME ((() , s3378_0)) =>
+ (case ((string_drop s3377_0 s3378_0)) of
+ s3379_0 =>
+ (case ((reg_name_matches_prefix s3379_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3380_0)) =>
+ (case ((string_drop s3379_0 s3380_0)) of
+ s3381_0 =>
+ (case ((sep_matches_prefix s3381_0)) of
+ SOME ((() , s3382_0)) =>
+ (case ((string_drop s3381_0 s3382_0)) of
+ s3383_0 =>
+ (case ((reg_name_matches_prefix s3383_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3384_0)) =>
+ let p0_ = (string_drop s3383_0 s3384_0) in
if (((p0_ = ""))) then SOME (high, signed1, signed2, rd, rs1, rs2) else
NONE
| _ => NONE
@@ -28206,29 +39839,29 @@ val _ = Define `
)))`;
-(*val _s2387_ : string -> maybe ((mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2387_:string ->((5)words$word#(5)words$word)option) s2388_0=
- (let s2389_0 = s2388_0 in
- if ((string_startswith s2389_0 "c.add")) then
- (case ((string_drop s2389_0 ((string_length "c.add")))) of
- s2390_0 =>
- (case ((spc_matches_prefix0 s2390_0)) of
- SOME ((() , s2391_0)) =>
- (case ((string_drop s2390_0 s2391_0)) of
- s2392_0 =>
- (case ((reg_name_matches_prefix s2392_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2393_0)) =>
- (case ((string_drop s2392_0 s2393_0)) of
- s2394_0 =>
- (case ((sep_matches_prefix s2394_0)) of
- SOME ((() , s2395_0)) =>
- (case ((string_drop s2394_0 s2395_0)) of
- s2396_0 =>
- (case ((reg_name_matches_prefix s2396_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2397_0)) =>
- let p0_ = (string_drop s2396_0 s2397_0) in
+(*val _s3357_ : string -> maybe ((mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3357_:string ->((5)words$word#(5)words$word)option) s3358_0=
+ (let s3359_0 = s3358_0 in
+ if ((string_startswith s3359_0 "c.add")) then
+ (case ((string_drop s3359_0 ((string_length "c.add")))) of
+ s3360_0 =>
+ (case ((spc_matches_prefix0 s3360_0)) of
+ SOME ((() , s3361_0)) =>
+ (case ((string_drop s3360_0 s3361_0)) of
+ s3362_0 =>
+ (case ((reg_name_matches_prefix s3362_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3363_0)) =>
+ (case ((string_drop s3362_0 s3363_0)) of
+ s3364_0 =>
+ (case ((sep_matches_prefix s3364_0)) of
+ SOME ((() , s3365_0)) =>
+ (case ((string_drop s3364_0 s3365_0)) of
+ s3366_0 =>
+ (case ((reg_name_matches_prefix s3366_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3367_0)) =>
+ let p0_ = (string_drop s3366_0 s3367_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28245,29 +39878,29 @@ val _ = Define `
else NONE))`;
-(*val _s2375_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s3345_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s2375_:string ->((5)words$word#(5)words$word)option) s2376_0=
- (let s2377_0 = s2376_0 in
- if ((string_startswith s2377_0 "c.mv")) then
- (case ((string_drop s2377_0 ((string_length "c.mv")))) of
- s2378_0 =>
- (case ((spc_matches_prefix0 s2378_0)) of
- SOME ((() , s2379_0)) =>
- (case ((string_drop s2378_0 s2379_0)) of
- s2380_0 =>
- (case ((reg_name_matches_prefix s2380_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2381_0)) =>
- (case ((string_drop s2380_0 s2381_0)) of
- s2382_0 =>
- (case ((sep_matches_prefix s2382_0)) of
- SOME ((() , s2383_0)) =>
- (case ((string_drop s2382_0 s2383_0)) of
- s2384_0 =>
- (case ((reg_name_matches_prefix s2384_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2385_0)) =>
- let p0_ = (string_drop s2384_0 s2385_0) in
+ ((s3345_:string ->((5)words$word#(5)words$word)option) s3346_0=
+ (let s3347_0 = s3346_0 in
+ if ((string_startswith s3347_0 "c.mv")) then
+ (case ((string_drop s3347_0 ((string_length "c.mv")))) of
+ s3348_0 =>
+ (case ((spc_matches_prefix0 s3348_0)) of
+ SOME ((() , s3349_0)) =>
+ (case ((string_drop s3348_0 s3349_0)) of
+ s3350_0 =>
+ (case ((reg_name_matches_prefix s3350_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3351_0)) =>
+ (case ((string_drop s3350_0 s3351_0)) of
+ s3352_0 =>
+ (case ((sep_matches_prefix s3352_0)) of
+ SOME ((() , s3353_0)) =>
+ (case ((string_drop s3352_0 s3353_0)) of
+ s3354_0 =>
+ (case ((reg_name_matches_prefix s3354_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3355_0)) =>
+ let p0_ = (string_drop s3354_0 s3355_0) in
if (((p0_ = ""))) then SOME (rd, rs2) else NONE
| _ => NONE
)
@@ -28284,21 +39917,21 @@ val _ = Define `
else NONE))`;
-(*val _s2367_ : string -> maybe (mword ty5)*)
+(*val _s3337_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s2367_:string ->((5)words$word)option) s2368_0=
- (let s2369_0 = s2368_0 in
- if ((string_startswith s2369_0 "c.jalr")) then
- (case ((string_drop s2369_0 ((string_length "c.jalr")))) of
- s2370_0 =>
- (case ((spc_matches_prefix0 s2370_0)) of
- SOME ((() , s2371_0)) =>
- (case ((string_drop s2370_0 s2371_0)) of
- s2372_0 =>
- (case ((reg_name_matches_prefix s2372_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2373_0)) =>
- let p0_ = (string_drop s2372_0 s2373_0) in
+ ((s3337_:string ->((5)words$word)option) s3338_0=
+ (let s3339_0 = s3338_0 in
+ if ((string_startswith s3339_0 "c.jalr")) then
+ (case ((string_drop s3339_0 ((string_length "c.jalr")))) of
+ s3340_0 =>
+ (case ((spc_matches_prefix0 s3340_0)) of
+ SOME ((() , s3341_0)) =>
+ (case ((string_drop s3340_0 s3341_0)) of
+ s3342_0 =>
+ (case ((reg_name_matches_prefix s3342_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3343_0)) =>
+ let p0_ = (string_drop s3342_0 s3343_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -28309,21 +39942,21 @@ val _ = Define `
else NONE))`;
-(*val _s2359_ : string -> maybe (mword ty5)*)
+(*val _s3329_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s2359_:string ->((5)words$word)option) s2360_0=
- (let s2361_0 = s2360_0 in
- if ((string_startswith s2361_0 "c.jr")) then
- (case ((string_drop s2361_0 ((string_length "c.jr")))) of
- s2362_0 =>
- (case ((spc_matches_prefix0 s2362_0)) of
- SOME ((() , s2363_0)) =>
- (case ((string_drop s2362_0 s2363_0)) of
- s2364_0 =>
- (case ((reg_name_matches_prefix s2364_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2365_0)) =>
- let p0_ = (string_drop s2364_0 s2365_0) in
+ ((s3329_:string ->((5)words$word)option) s3330_0=
+ (let s3331_0 = s3330_0 in
+ if ((string_startswith s3331_0 "c.jr")) then
+ (case ((string_drop s3331_0 ((string_length "c.jr")))) of
+ s3332_0 =>
+ (case ((spc_matches_prefix0 s3332_0)) of
+ SOME ((() , s3333_0)) =>
+ (case ((string_drop s3332_0 s3333_0)) of
+ s3334_0 =>
+ (case ((reg_name_matches_prefix s3334_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3335_0)) =>
+ let p0_ = (string_drop s3334_0 s3335_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -28334,30 +39967,30 @@ val _ = Define `
else NONE))`;
-(*val _s2347_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3317_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2347_:string ->((5)words$word#(6)words$word)option) s2348_0=
- (let s2349_0 = s2348_0 in
- if ((string_startswith s2349_0 "c.sdsp")) then
- (case ((string_drop s2349_0 ((string_length "c.sdsp")))) of
- s2350_0 =>
- (case ((spc_matches_prefix0 s2350_0)) of
- SOME ((() , s2351_0)) =>
- (case ((string_drop s2350_0 s2351_0)) of
- s2352_0 =>
- (case ((reg_name_matches_prefix s2352_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2353_0)) =>
- (case ((string_drop s2352_0 s2353_0)) of
- s2354_0 =>
- (case ((sep_matches_prefix s2354_0)) of
- SOME ((() , s2355_0)) =>
- (case ((string_drop s2354_0 s2355_0)) of
- s2356_0 =>
+ ((s3317_:string ->((5)words$word#(6)words$word)option) s3318_0=
+ (let s3319_0 = s3318_0 in
+ if ((string_startswith s3319_0 "c.sdsp")) then
+ (case ((string_drop s3319_0 ((string_length "c.sdsp")))) of
+ s3320_0 =>
+ (case ((spc_matches_prefix0 s3320_0)) of
+ SOME ((() , s3321_0)) =>
+ (case ((string_drop s3320_0 s3321_0)) of
+ s3322_0 =>
+ (case ((reg_name_matches_prefix s3322_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3323_0)) =>
+ (case ((string_drop s3322_0 s3323_0)) of
+ s3324_0 =>
+ (case ((sep_matches_prefix s3324_0)) of
+ SOME ((() , s3325_0)) =>
+ (case ((string_drop s3324_0 s3325_0)) of
+ s3326_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2356_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2357_0)) =>
- let p0_ = (string_drop s2356_0 s2357_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3326_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3327_0)) =>
+ let p0_ = (string_drop s3326_0 s3327_0) in
if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
| _ => NONE
)
@@ -28374,30 +40007,30 @@ val _ = Define `
else NONE))`;
-(*val _s2335_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3305_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2335_:string ->((5)words$word#(6)words$word)option) s2336_0=
- (let s2337_0 = s2336_0 in
- if ((string_startswith s2337_0 "c.swsp")) then
- (case ((string_drop s2337_0 ((string_length "c.swsp")))) of
- s2338_0 =>
- (case ((spc_matches_prefix0 s2338_0)) of
- SOME ((() , s2339_0)) =>
- (case ((string_drop s2338_0 s2339_0)) of
- s2340_0 =>
- (case ((reg_name_matches_prefix s2340_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2341_0)) =>
- (case ((string_drop s2340_0 s2341_0)) of
- s2342_0 =>
- (case ((sep_matches_prefix s2342_0)) of
- SOME ((() , s2343_0)) =>
- (case ((string_drop s2342_0 s2343_0)) of
- s2344_0 =>
+ ((s3305_:string ->((5)words$word#(6)words$word)option) s3306_0=
+ (let s3307_0 = s3306_0 in
+ if ((string_startswith s3307_0 "c.swsp")) then
+ (case ((string_drop s3307_0 ((string_length "c.swsp")))) of
+ s3308_0 =>
+ (case ((spc_matches_prefix0 s3308_0)) of
+ SOME ((() , s3309_0)) =>
+ (case ((string_drop s3308_0 s3309_0)) of
+ s3310_0 =>
+ (case ((reg_name_matches_prefix s3310_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3311_0)) =>
+ (case ((string_drop s3310_0 s3311_0)) of
+ s3312_0 =>
+ (case ((sep_matches_prefix s3312_0)) of
+ SOME ((() , s3313_0)) =>
+ (case ((string_drop s3312_0 s3313_0)) of
+ s3314_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2344_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2345_0)) =>
- let p0_ = (string_drop s2344_0 s2345_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3314_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3315_0)) =>
+ let p0_ = (string_drop s3314_0 s3315_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28414,30 +40047,30 @@ val _ = Define `
else NONE))`;
-(*val _s2323_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3293_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2323_:string ->((5)words$word#(6)words$word)option) s2324_0=
- (let s2325_0 = s2324_0 in
- if ((string_startswith s2325_0 "c.ldsp")) then
- (case ((string_drop s2325_0 ((string_length "c.ldsp")))) of
- s2326_0 =>
- (case ((spc_matches_prefix0 s2326_0)) of
- SOME ((() , s2327_0)) =>
- (case ((string_drop s2326_0 s2327_0)) of
- s2328_0 =>
- (case ((reg_name_matches_prefix s2328_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2329_0)) =>
- (case ((string_drop s2328_0 s2329_0)) of
- s2330_0 =>
- (case ((sep_matches_prefix s2330_0)) of
- SOME ((() , s2331_0)) =>
- (case ((string_drop s2330_0 s2331_0)) of
- s2332_0 =>
+ ((s3293_:string ->((5)words$word#(6)words$word)option) s3294_0=
+ (let s3295_0 = s3294_0 in
+ if ((string_startswith s3295_0 "c.ldsp")) then
+ (case ((string_drop s3295_0 ((string_length "c.ldsp")))) of
+ s3296_0 =>
+ (case ((spc_matches_prefix0 s3296_0)) of
+ SOME ((() , s3297_0)) =>
+ (case ((string_drop s3296_0 s3297_0)) of
+ s3298_0 =>
+ (case ((reg_name_matches_prefix s3298_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3299_0)) =>
+ (case ((string_drop s3298_0 s3299_0)) of
+ s3300_0 =>
+ (case ((sep_matches_prefix s3300_0)) of
+ SOME ((() , s3301_0)) =>
+ (case ((string_drop s3300_0 s3301_0)) of
+ s3302_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2332_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2333_0)) =>
- let p0_ = (string_drop s2332_0 s2333_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3302_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3303_0)) =>
+ let p0_ = (string_drop s3302_0 s3303_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28454,30 +40087,30 @@ val _ = Define `
else NONE))`;
-(*val _s2311_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3281_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2311_:string ->((5)words$word#(6)words$word)option) s2312_0=
- (let s2313_0 = s2312_0 in
- if ((string_startswith s2313_0 "c.lwsp")) then
- (case ((string_drop s2313_0 ((string_length "c.lwsp")))) of
- s2314_0 =>
- (case ((spc_matches_prefix0 s2314_0)) of
- SOME ((() , s2315_0)) =>
- (case ((string_drop s2314_0 s2315_0)) of
- s2316_0 =>
- (case ((reg_name_matches_prefix s2316_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2317_0)) =>
- (case ((string_drop s2316_0 s2317_0)) of
- s2318_0 =>
- (case ((sep_matches_prefix s2318_0)) of
- SOME ((() , s2319_0)) =>
- (case ((string_drop s2318_0 s2319_0)) of
- s2320_0 =>
+ ((s3281_:string ->((5)words$word#(6)words$word)option) s3282_0=
+ (let s3283_0 = s3282_0 in
+ if ((string_startswith s3283_0 "c.lwsp")) then
+ (case ((string_drop s3283_0 ((string_length "c.lwsp")))) of
+ s3284_0 =>
+ (case ((spc_matches_prefix0 s3284_0)) of
+ SOME ((() , s3285_0)) =>
+ (case ((string_drop s3284_0 s3285_0)) of
+ s3286_0 =>
+ (case ((reg_name_matches_prefix s3286_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3287_0)) =>
+ (case ((string_drop s3286_0 s3287_0)) of
+ s3288_0 =>
+ (case ((sep_matches_prefix s3288_0)) of
+ SOME ((() , s3289_0)) =>
+ (case ((string_drop s3288_0 s3289_0)) of
+ s3290_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2320_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2321_0)) =>
- let p0_ = (string_drop s2320_0 s2321_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3290_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3291_0)) =>
+ let p0_ = (string_drop s3290_0 s3291_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28494,30 +40127,30 @@ val _ = Define `
else NONE))`;
-(*val _s2299_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3269_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2299_:string ->((5)words$word#(6)words$word)option) s2300_0=
- (let s2301_0 = s2300_0 in
- if ((string_startswith s2301_0 "c.slli")) then
- (case ((string_drop s2301_0 ((string_length "c.slli")))) of
- s2302_0 =>
- (case ((spc_matches_prefix0 s2302_0)) of
- SOME ((() , s2303_0)) =>
- (case ((string_drop s2302_0 s2303_0)) of
- s2304_0 =>
- (case ((reg_name_matches_prefix s2304_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2305_0)) =>
- (case ((string_drop s2304_0 s2305_0)) of
- s2306_0 =>
- (case ((sep_matches_prefix s2306_0)) of
- SOME ((() , s2307_0)) =>
- (case ((string_drop s2306_0 s2307_0)) of
- s2308_0 =>
+ ((s3269_:string ->((5)words$word#(6)words$word)option) s3270_0=
+ (let s3271_0 = s3270_0 in
+ if ((string_startswith s3271_0 "c.slli")) then
+ (case ((string_drop s3271_0 ((string_length "c.slli")))) of
+ s3272_0 =>
+ (case ((spc_matches_prefix0 s3272_0)) of
+ SOME ((() , s3273_0)) =>
+ (case ((string_drop s3272_0 s3273_0)) of
+ s3274_0 =>
+ (case ((reg_name_matches_prefix s3274_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3275_0)) =>
+ (case ((string_drop s3274_0 s3275_0)) of
+ s3276_0 =>
+ (case ((sep_matches_prefix s3276_0)) of
+ SOME ((() , s3277_0)) =>
+ (case ((string_drop s3276_0 s3277_0)) of
+ s3278_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2308_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2309_0)) =>
- let p0_ = (string_drop s2308_0 s2309_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3278_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3279_0)) =>
+ let p0_ = (string_drop s3278_0 s3279_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -28534,30 +40167,30 @@ val _ = Define `
else NONE))`;
-(*val _s2287_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s3257_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2287_:string ->((3)words$word#(8)words$word)option) s2288_0=
- (let s2289_0 = s2288_0 in
- if ((string_startswith s2289_0 "c.bnez")) then
- (case ((string_drop s2289_0 ((string_length "c.bnez")))) of
- s2290_0 =>
- (case ((spc_matches_prefix0 s2290_0)) of
- SOME ((() , s2291_0)) =>
- (case ((string_drop s2290_0 s2291_0)) of
- s2292_0 =>
- (case ((creg_name_matches_prefix s2292_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s2293_0)) =>
- (case ((string_drop s2292_0 s2293_0)) of
- s2294_0 =>
- (case ((sep_matches_prefix s2294_0)) of
- SOME ((() , s2295_0)) =>
- (case ((string_drop s2294_0 s2295_0)) of
- s2296_0 =>
+ ((s3257_:string ->((3)words$word#(8)words$word)option) s3258_0=
+ (let s3259_0 = s3258_0 in
+ if ((string_startswith s3259_0 "c.bnez")) then
+ (case ((string_drop s3259_0 ((string_length "c.bnez")))) of
+ s3260_0 =>
+ (case ((spc_matches_prefix0 s3260_0)) of
+ SOME ((() , s3261_0)) =>
+ (case ((string_drop s3260_0 s3261_0)) of
+ s3262_0 =>
+ (case ((creg_name_matches_prefix s3262_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s3263_0)) =>
+ (case ((string_drop s3262_0 s3263_0)) of
+ s3264_0 =>
+ (case ((sep_matches_prefix s3264_0)) of
+ SOME ((() , s3265_0)) =>
+ (case ((string_drop s3264_0 s3265_0)) of
+ s3266_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2296_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s2297_0)) =>
- let p0_ = (string_drop s2296_0 s2297_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3266_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s3267_0)) =>
+ let p0_ = (string_drop s3266_0 s3267_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -28574,30 +40207,30 @@ val _ = Define `
else NONE))`;
-(*val _s2275_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s3245_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2275_:string ->((3)words$word#(8)words$word)option) s2276_0=
- (let s2277_0 = s2276_0 in
- if ((string_startswith s2277_0 "c.beqz")) then
- (case ((string_drop s2277_0 ((string_length "c.beqz")))) of
- s2278_0 =>
- (case ((spc_matches_prefix0 s2278_0)) of
- SOME ((() , s2279_0)) =>
- (case ((string_drop s2278_0 s2279_0)) of
- s2280_0 =>
- (case ((creg_name_matches_prefix s2280_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s2281_0)) =>
- (case ((string_drop s2280_0 s2281_0)) of
- s2282_0 =>
- (case ((sep_matches_prefix s2282_0)) of
- SOME ((() , s2283_0)) =>
- (case ((string_drop s2282_0 s2283_0)) of
- s2284_0 =>
+ ((s3245_:string ->((3)words$word#(8)words$word)option) s3246_0=
+ (let s3247_0 = s3246_0 in
+ if ((string_startswith s3247_0 "c.beqz")) then
+ (case ((string_drop s3247_0 ((string_length "c.beqz")))) of
+ s3248_0 =>
+ (case ((spc_matches_prefix0 s3248_0)) of
+ SOME ((() , s3249_0)) =>
+ (case ((string_drop s3248_0 s3249_0)) of
+ s3250_0 =>
+ (case ((creg_name_matches_prefix s3250_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s3251_0)) =>
+ (case ((string_drop s3250_0 s3251_0)) of
+ s3252_0 =>
+ (case ((sep_matches_prefix s3252_0)) of
+ SOME ((() , s3253_0)) =>
+ (case ((string_drop s3252_0 s3253_0)) of
+ s3254_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2284_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s2285_0)) =>
- let p0_ = (string_drop s2284_0 s2285_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3254_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s3255_0)) =>
+ let p0_ = (string_drop s3254_0 s3255_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -28614,22 +40247,22 @@ val _ = Define `
else NONE))`;
-(*val _s2267_ : string -> maybe (mword ty11)*)
+(*val _s3237_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s2267_:string ->((11)words$word)option) s2268_0=
- (let s2269_0 = s2268_0 in
- if ((string_startswith s2269_0 "c.j")) then
- (case ((string_drop s2269_0 ((string_length "c.j")))) of
- s2270_0 =>
- (case ((spc_matches_prefix0 s2270_0)) of
- SOME ((() , s2271_0)) =>
- (case ((string_drop s2270_0 s2271_0)) of
- s2272_0 =>
+ ((s3237_:string ->((11)words$word)option) s3238_0=
+ (let s3239_0 = s3238_0 in
+ if ((string_startswith s3239_0 "c.j")) then
+ (case ((string_drop s3239_0 ((string_length "c.j")))) of
+ s3240_0 =>
+ (case ((spc_matches_prefix0 s3240_0)) of
+ SOME ((() , s3241_0)) =>
+ (case ((string_drop s3240_0 s3241_0)) of
+ s3242_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2272_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s2273_0)) =>
- let p0_ = (string_drop s2272_0 s2273_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3242_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s3243_0)) =>
+ let p0_ = (string_drop s3242_0 s3243_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -28640,29 +40273,29 @@ val _ = Define `
else NONE))`;
-(*val _s2255_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3225_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2255_:string ->((3)words$word#(3)words$word)option) s2256_0=
- (let s2257_0 = s2256_0 in
- if ((string_startswith s2257_0 "c.addw")) then
- (case ((string_drop s2257_0 ((string_length "c.addw")))) of
- s2258_0 =>
- (case ((spc_matches_prefix0 s2258_0)) of
- SOME ((() , s2259_0)) =>
- (case ((string_drop s2258_0 s2259_0)) of
- s2260_0 =>
- (case ((creg_name_matches_prefix s2260_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2261_0)) =>
- (case ((string_drop s2260_0 s2261_0)) of
- s2262_0 =>
- (case ((sep_matches_prefix s2262_0)) of
- SOME ((() , s2263_0)) =>
- (case ((string_drop s2262_0 s2263_0)) of
- s2264_0 =>
- (case ((creg_name_matches_prefix s2264_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2265_0)) =>
- let p0_ = (string_drop s2264_0 s2265_0) in
+ ((s3225_:string ->((3)words$word#(3)words$word)option) s3226_0=
+ (let s3227_0 = s3226_0 in
+ if ((string_startswith s3227_0 "c.addw")) then
+ (case ((string_drop s3227_0 ((string_length "c.addw")))) of
+ s3228_0 =>
+ (case ((spc_matches_prefix0 s3228_0)) of
+ SOME ((() , s3229_0)) =>
+ (case ((string_drop s3228_0 s3229_0)) of
+ s3230_0 =>
+ (case ((creg_name_matches_prefix s3230_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3231_0)) =>
+ (case ((string_drop s3230_0 s3231_0)) of
+ s3232_0 =>
+ (case ((sep_matches_prefix s3232_0)) of
+ SOME ((() , s3233_0)) =>
+ (case ((string_drop s3232_0 s3233_0)) of
+ s3234_0 =>
+ (case ((creg_name_matches_prefix s3234_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3235_0)) =>
+ let p0_ = (string_drop s3234_0 s3235_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28679,29 +40312,29 @@ val _ = Define `
else NONE))`;
-(*val _s2243_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3213_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2243_:string ->((3)words$word#(3)words$word)option) s2244_0=
- (let s2245_0 = s2244_0 in
- if ((string_startswith s2245_0 "c.subw")) then
- (case ((string_drop s2245_0 ((string_length "c.subw")))) of
- s2246_0 =>
- (case ((spc_matches_prefix0 s2246_0)) of
- SOME ((() , s2247_0)) =>
- (case ((string_drop s2246_0 s2247_0)) of
- s2248_0 =>
- (case ((creg_name_matches_prefix s2248_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2249_0)) =>
- (case ((string_drop s2248_0 s2249_0)) of
- s2250_0 =>
- (case ((sep_matches_prefix s2250_0)) of
- SOME ((() , s2251_0)) =>
- (case ((string_drop s2250_0 s2251_0)) of
- s2252_0 =>
- (case ((creg_name_matches_prefix s2252_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2253_0)) =>
- let p0_ = (string_drop s2252_0 s2253_0) in
+ ((s3213_:string ->((3)words$word#(3)words$word)option) s3214_0=
+ (let s3215_0 = s3214_0 in
+ if ((string_startswith s3215_0 "c.subw")) then
+ (case ((string_drop s3215_0 ((string_length "c.subw")))) of
+ s3216_0 =>
+ (case ((spc_matches_prefix0 s3216_0)) of
+ SOME ((() , s3217_0)) =>
+ (case ((string_drop s3216_0 s3217_0)) of
+ s3218_0 =>
+ (case ((creg_name_matches_prefix s3218_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3219_0)) =>
+ (case ((string_drop s3218_0 s3219_0)) of
+ s3220_0 =>
+ (case ((sep_matches_prefix s3220_0)) of
+ SOME ((() , s3221_0)) =>
+ (case ((string_drop s3220_0 s3221_0)) of
+ s3222_0 =>
+ (case ((creg_name_matches_prefix s3222_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3223_0)) =>
+ let p0_ = (string_drop s3222_0 s3223_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28718,29 +40351,29 @@ val _ = Define `
else NONE))`;
-(*val _s2231_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3201_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2231_:string ->((3)words$word#(3)words$word)option) s2232_0=
- (let s2233_0 = s2232_0 in
- if ((string_startswith s2233_0 "c.and")) then
- (case ((string_drop s2233_0 ((string_length "c.and")))) of
- s2234_0 =>
- (case ((spc_matches_prefix0 s2234_0)) of
- SOME ((() , s2235_0)) =>
- (case ((string_drop s2234_0 s2235_0)) of
- s2236_0 =>
- (case ((creg_name_matches_prefix s2236_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2237_0)) =>
- (case ((string_drop s2236_0 s2237_0)) of
- s2238_0 =>
- (case ((sep_matches_prefix s2238_0)) of
- SOME ((() , s2239_0)) =>
- (case ((string_drop s2238_0 s2239_0)) of
- s2240_0 =>
- (case ((creg_name_matches_prefix s2240_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2241_0)) =>
- let p0_ = (string_drop s2240_0 s2241_0) in
+ ((s3201_:string ->((3)words$word#(3)words$word)option) s3202_0=
+ (let s3203_0 = s3202_0 in
+ if ((string_startswith s3203_0 "c.and")) then
+ (case ((string_drop s3203_0 ((string_length "c.and")))) of
+ s3204_0 =>
+ (case ((spc_matches_prefix0 s3204_0)) of
+ SOME ((() , s3205_0)) =>
+ (case ((string_drop s3204_0 s3205_0)) of
+ s3206_0 =>
+ (case ((creg_name_matches_prefix s3206_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3207_0)) =>
+ (case ((string_drop s3206_0 s3207_0)) of
+ s3208_0 =>
+ (case ((sep_matches_prefix s3208_0)) of
+ SOME ((() , s3209_0)) =>
+ (case ((string_drop s3208_0 s3209_0)) of
+ s3210_0 =>
+ (case ((creg_name_matches_prefix s3210_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3211_0)) =>
+ let p0_ = (string_drop s3210_0 s3211_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28757,29 +40390,29 @@ val _ = Define `
else NONE))`;
-(*val _s2219_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3189_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2219_:string ->((3)words$word#(3)words$word)option) s2220_0=
- (let s2221_0 = s2220_0 in
- if ((string_startswith s2221_0 "c.or")) then
- (case ((string_drop s2221_0 ((string_length "c.or")))) of
- s2222_0 =>
- (case ((spc_matches_prefix0 s2222_0)) of
- SOME ((() , s2223_0)) =>
- (case ((string_drop s2222_0 s2223_0)) of
- s2224_0 =>
- (case ((creg_name_matches_prefix s2224_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2225_0)) =>
- (case ((string_drop s2224_0 s2225_0)) of
- s2226_0 =>
- (case ((sep_matches_prefix s2226_0)) of
- SOME ((() , s2227_0)) =>
- (case ((string_drop s2226_0 s2227_0)) of
- s2228_0 =>
- (case ((creg_name_matches_prefix s2228_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2229_0)) =>
- let p0_ = (string_drop s2228_0 s2229_0) in
+ ((s3189_:string ->((3)words$word#(3)words$word)option) s3190_0=
+ (let s3191_0 = s3190_0 in
+ if ((string_startswith s3191_0 "c.or")) then
+ (case ((string_drop s3191_0 ((string_length "c.or")))) of
+ s3192_0 =>
+ (case ((spc_matches_prefix0 s3192_0)) of
+ SOME ((() , s3193_0)) =>
+ (case ((string_drop s3192_0 s3193_0)) of
+ s3194_0 =>
+ (case ((creg_name_matches_prefix s3194_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3195_0)) =>
+ (case ((string_drop s3194_0 s3195_0)) of
+ s3196_0 =>
+ (case ((sep_matches_prefix s3196_0)) of
+ SOME ((() , s3197_0)) =>
+ (case ((string_drop s3196_0 s3197_0)) of
+ s3198_0 =>
+ (case ((creg_name_matches_prefix s3198_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3199_0)) =>
+ let p0_ = (string_drop s3198_0 s3199_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28796,29 +40429,29 @@ val _ = Define `
else NONE))`;
-(*val _s2207_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3177_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2207_:string ->((3)words$word#(3)words$word)option) s2208_0=
- (let s2209_0 = s2208_0 in
- if ((string_startswith s2209_0 "c.xor")) then
- (case ((string_drop s2209_0 ((string_length "c.xor")))) of
- s2210_0 =>
- (case ((spc_matches_prefix0 s2210_0)) of
- SOME ((() , s2211_0)) =>
- (case ((string_drop s2210_0 s2211_0)) of
- s2212_0 =>
- (case ((creg_name_matches_prefix s2212_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2213_0)) =>
- (case ((string_drop s2212_0 s2213_0)) of
- s2214_0 =>
- (case ((sep_matches_prefix s2214_0)) of
- SOME ((() , s2215_0)) =>
- (case ((string_drop s2214_0 s2215_0)) of
- s2216_0 =>
- (case ((creg_name_matches_prefix s2216_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2217_0)) =>
- let p0_ = (string_drop s2216_0 s2217_0) in
+ ((s3177_:string ->((3)words$word#(3)words$word)option) s3178_0=
+ (let s3179_0 = s3178_0 in
+ if ((string_startswith s3179_0 "c.xor")) then
+ (case ((string_drop s3179_0 ((string_length "c.xor")))) of
+ s3180_0 =>
+ (case ((spc_matches_prefix0 s3180_0)) of
+ SOME ((() , s3181_0)) =>
+ (case ((string_drop s3180_0 s3181_0)) of
+ s3182_0 =>
+ (case ((creg_name_matches_prefix s3182_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3183_0)) =>
+ (case ((string_drop s3182_0 s3183_0)) of
+ s3184_0 =>
+ (case ((sep_matches_prefix s3184_0)) of
+ SOME ((() , s3185_0)) =>
+ (case ((string_drop s3184_0 s3185_0)) of
+ s3186_0 =>
+ (case ((creg_name_matches_prefix s3186_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3187_0)) =>
+ let p0_ = (string_drop s3186_0 s3187_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28835,29 +40468,29 @@ val _ = Define `
else NONE))`;
-(*val _s2195_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3165_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2195_:string ->((3)words$word#(3)words$word)option) s2196_0=
- (let s2197_0 = s2196_0 in
- if ((string_startswith s2197_0 "c.sub")) then
- (case ((string_drop s2197_0 ((string_length "c.sub")))) of
- s2198_0 =>
- (case ((spc_matches_prefix0 s2198_0)) of
- SOME ((() , s2199_0)) =>
- (case ((string_drop s2198_0 s2199_0)) of
- s2200_0 =>
- (case ((creg_name_matches_prefix s2200_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2201_0)) =>
- (case ((string_drop s2200_0 s2201_0)) of
- s2202_0 =>
- (case ((sep_matches_prefix s2202_0)) of
- SOME ((() , s2203_0)) =>
- (case ((string_drop s2202_0 s2203_0)) of
- s2204_0 =>
- (case ((creg_name_matches_prefix s2204_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2205_0)) =>
- let p0_ = (string_drop s2204_0 s2205_0) in
+ ((s3165_:string ->((3)words$word#(3)words$word)option) s3166_0=
+ (let s3167_0 = s3166_0 in
+ if ((string_startswith s3167_0 "c.sub")) then
+ (case ((string_drop s3167_0 ((string_length "c.sub")))) of
+ s3168_0 =>
+ (case ((spc_matches_prefix0 s3168_0)) of
+ SOME ((() , s3169_0)) =>
+ (case ((string_drop s3168_0 s3169_0)) of
+ s3170_0 =>
+ (case ((creg_name_matches_prefix s3170_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3171_0)) =>
+ (case ((string_drop s3170_0 s3171_0)) of
+ s3172_0 =>
+ (case ((sep_matches_prefix s3172_0)) of
+ SOME ((() , s3173_0)) =>
+ (case ((string_drop s3172_0 s3173_0)) of
+ s3174_0 =>
+ (case ((creg_name_matches_prefix s3174_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3175_0)) =>
+ let p0_ = (string_drop s3174_0 s3175_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28874,30 +40507,30 @@ val _ = Define `
else NONE))`;
-(*val _s2183_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3153_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2183_:string ->((3)words$word#(6)words$word)option) s2184_0=
- (let s2185_0 = s2184_0 in
- if ((string_startswith s2185_0 "c.andi")) then
- (case ((string_drop s2185_0 ((string_length "c.andi")))) of
- s2186_0 =>
- (case ((spc_matches_prefix0 s2186_0)) of
- SOME ((() , s2187_0)) =>
- (case ((string_drop s2186_0 s2187_0)) of
- s2188_0 =>
- (case ((creg_name_matches_prefix s2188_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2189_0)) =>
- (case ((string_drop s2188_0 s2189_0)) of
- s2190_0 =>
- (case ((sep_matches_prefix s2190_0)) of
- SOME ((() , s2191_0)) =>
- (case ((string_drop s2190_0 s2191_0)) of
- s2192_0 =>
+ ((s3153_:string ->((3)words$word#(6)words$word)option) s3154_0=
+ (let s3155_0 = s3154_0 in
+ if ((string_startswith s3155_0 "c.andi")) then
+ (case ((string_drop s3155_0 ((string_length "c.andi")))) of
+ s3156_0 =>
+ (case ((spc_matches_prefix0 s3156_0)) of
+ SOME ((() , s3157_0)) =>
+ (case ((string_drop s3156_0 s3157_0)) of
+ s3158_0 =>
+ (case ((creg_name_matches_prefix s3158_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3159_0)) =>
+ (case ((string_drop s3158_0 s3159_0)) of
+ s3160_0 =>
+ (case ((sep_matches_prefix s3160_0)) of
+ SOME ((() , s3161_0)) =>
+ (case ((string_drop s3160_0 s3161_0)) of
+ s3162_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2192_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2193_0)) =>
- let p0_ = (string_drop s2192_0 s2193_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3162_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3163_0)) =>
+ let p0_ = (string_drop s3162_0 s3163_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -28914,30 +40547,30 @@ val _ = Define `
else NONE))`;
-(*val _s2171_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3141_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2171_:string ->((3)words$word#(6)words$word)option) s2172_0=
- (let s2173_0 = s2172_0 in
- if ((string_startswith s2173_0 "c.srai")) then
- (case ((string_drop s2173_0 ((string_length "c.srai")))) of
- s2174_0 =>
- (case ((spc_matches_prefix0 s2174_0)) of
- SOME ((() , s2175_0)) =>
- (case ((string_drop s2174_0 s2175_0)) of
- s2176_0 =>
- (case ((creg_name_matches_prefix s2176_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2177_0)) =>
- (case ((string_drop s2176_0 s2177_0)) of
- s2178_0 =>
- (case ((sep_matches_prefix s2178_0)) of
- SOME ((() , s2179_0)) =>
- (case ((string_drop s2178_0 s2179_0)) of
- s2180_0 =>
+ ((s3141_:string ->((3)words$word#(6)words$word)option) s3142_0=
+ (let s3143_0 = s3142_0 in
+ if ((string_startswith s3143_0 "c.srai")) then
+ (case ((string_drop s3143_0 ((string_length "c.srai")))) of
+ s3144_0 =>
+ (case ((spc_matches_prefix0 s3144_0)) of
+ SOME ((() , s3145_0)) =>
+ (case ((string_drop s3144_0 s3145_0)) of
+ s3146_0 =>
+ (case ((creg_name_matches_prefix s3146_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3147_0)) =>
+ (case ((string_drop s3146_0 s3147_0)) of
+ s3148_0 =>
+ (case ((sep_matches_prefix s3148_0)) of
+ SOME ((() , s3149_0)) =>
+ (case ((string_drop s3148_0 s3149_0)) of
+ s3150_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2180_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2181_0)) =>
- let p0_ = (string_drop s2180_0 s2181_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3150_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3151_0)) =>
+ let p0_ = (string_drop s3150_0 s3151_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -28954,30 +40587,30 @@ val _ = Define `
else NONE))`;
-(*val _s2159_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3129_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2159_:string ->((3)words$word#(6)words$word)option) s2160_0=
- (let s2161_0 = s2160_0 in
- if ((string_startswith s2161_0 "c.srli")) then
- (case ((string_drop s2161_0 ((string_length "c.srli")))) of
- s2162_0 =>
- (case ((spc_matches_prefix0 s2162_0)) of
- SOME ((() , s2163_0)) =>
- (case ((string_drop s2162_0 s2163_0)) of
- s2164_0 =>
- (case ((creg_name_matches_prefix s2164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2165_0)) =>
- (case ((string_drop s2164_0 s2165_0)) of
- s2166_0 =>
- (case ((sep_matches_prefix s2166_0)) of
- SOME ((() , s2167_0)) =>
- (case ((string_drop s2166_0 s2167_0)) of
- s2168_0 =>
+ ((s3129_:string ->((3)words$word#(6)words$word)option) s3130_0=
+ (let s3131_0 = s3130_0 in
+ if ((string_startswith s3131_0 "c.srli")) then
+ (case ((string_drop s3131_0 ((string_length "c.srli")))) of
+ s3132_0 =>
+ (case ((spc_matches_prefix0 s3132_0)) of
+ SOME ((() , s3133_0)) =>
+ (case ((string_drop s3132_0 s3133_0)) of
+ s3134_0 =>
+ (case ((creg_name_matches_prefix s3134_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3135_0)) =>
+ (case ((string_drop s3134_0 s3135_0)) of
+ s3136_0 =>
+ (case ((sep_matches_prefix s3136_0)) of
+ SOME ((() , s3137_0)) =>
+ (case ((string_drop s3136_0 s3137_0)) of
+ s3138_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2168_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2169_0)) =>
- let p0_ = (string_drop s2168_0 s2169_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3138_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3139_0)) =>
+ let p0_ = (string_drop s3138_0 s3139_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -28994,30 +40627,30 @@ val _ = Define `
else NONE))`;
-(*val _s2147_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3117_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2147_:string ->((5)words$word#(6)words$word)option) s2148_0=
- (let s2149_0 = s2148_0 in
- if ((string_startswith s2149_0 "c.lui")) then
- (case ((string_drop s2149_0 ((string_length "c.lui")))) of
- s2150_0 =>
- (case ((spc_matches_prefix0 s2150_0)) of
- SOME ((() , s2151_0)) =>
- (case ((string_drop s2150_0 s2151_0)) of
- s2152_0 =>
- (case ((reg_name_matches_prefix s2152_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2153_0)) =>
- (case ((string_drop s2152_0 s2153_0)) of
- s2154_0 =>
- (case ((sep_matches_prefix s2154_0)) of
- SOME ((() , s2155_0)) =>
- (case ((string_drop s2154_0 s2155_0)) of
- s2156_0 =>
+ ((s3117_:string ->((5)words$word#(6)words$word)option) s3118_0=
+ (let s3119_0 = s3118_0 in
+ if ((string_startswith s3119_0 "c.lui")) then
+ (case ((string_drop s3119_0 ((string_length "c.lui")))) of
+ s3120_0 =>
+ (case ((spc_matches_prefix0 s3120_0)) of
+ SOME ((() , s3121_0)) =>
+ (case ((string_drop s3120_0 s3121_0)) of
+ s3122_0 =>
+ (case ((reg_name_matches_prefix s3122_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3123_0)) =>
+ (case ((string_drop s3122_0 s3123_0)) of
+ s3124_0 =>
+ (case ((sep_matches_prefix s3124_0)) of
+ SOME ((() , s3125_0)) =>
+ (case ((string_drop s3124_0 s3125_0)) of
+ s3126_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2156_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2157_0)) =>
- let p0_ = (string_drop s2156_0 s2157_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3126_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3127_0)) =>
+ let p0_ = (string_drop s3126_0 s3127_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -29034,22 +40667,22 @@ val _ = Define `
else NONE))`;
-(*val _s2139_ : string -> maybe (mword ty6)*)
+(*val _s3109_ : string -> maybe (mword ty6)*)
val _ = Define `
- ((s2139_:string ->((6)words$word)option) s2140_0=
- (let s2141_0 = s2140_0 in
- if ((string_startswith s2141_0 "c.addi16sp")) then
- (case ((string_drop s2141_0 ((string_length "c.addi16sp")))) of
- s2142_0 =>
- (case ((spc_matches_prefix0 s2142_0)) of
- SOME ((() , s2143_0)) =>
- (case ((string_drop s2142_0 s2143_0)) of
- s2144_0 =>
+ ((s3109_:string ->((6)words$word)option) s3110_0=
+ (let s3111_0 = s3110_0 in
+ if ((string_startswith s3111_0 "c.addi16sp")) then
+ (case ((string_drop s3111_0 ((string_length "c.addi16sp")))) of
+ s3112_0 =>
+ (case ((spc_matches_prefix0 s3112_0)) of
+ SOME ((() , s3113_0)) =>
+ (case ((string_drop s3112_0 s3113_0)) of
+ s3114_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2144_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2145_0)) =>
- let p0_ = (string_drop s2144_0 s2145_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3114_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3115_0)) =>
+ let p0_ = (string_drop s3114_0 s3115_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -29060,30 +40693,30 @@ val _ = Define `
else NONE))`;
-(*val _s2127_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3097_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2127_:string ->((5)words$word#(6)words$word)option) s2128_0=
- (let s2129_0 = s2128_0 in
- if ((string_startswith s2129_0 "c.li")) then
- (case ((string_drop s2129_0 ((string_length "c.li")))) of
- s2130_0 =>
- (case ((spc_matches_prefix0 s2130_0)) of
- SOME ((() , s2131_0)) =>
- (case ((string_drop s2130_0 s2131_0)) of
- s2132_0 =>
- (case ((reg_name_matches_prefix s2132_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2133_0)) =>
- (case ((string_drop s2132_0 s2133_0)) of
- s2134_0 =>
- (case ((sep_matches_prefix s2134_0)) of
- SOME ((() , s2135_0)) =>
- (case ((string_drop s2134_0 s2135_0)) of
- s2136_0 =>
+ ((s3097_:string ->((5)words$word#(6)words$word)option) s3098_0=
+ (let s3099_0 = s3098_0 in
+ if ((string_startswith s3099_0 "c.li")) then
+ (case ((string_drop s3099_0 ((string_length "c.li")))) of
+ s3100_0 =>
+ (case ((spc_matches_prefix0 s3100_0)) of
+ SOME ((() , s3101_0)) =>
+ (case ((string_drop s3100_0 s3101_0)) of
+ s3102_0 =>
+ (case ((reg_name_matches_prefix s3102_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3103_0)) =>
+ (case ((string_drop s3102_0 s3103_0)) of
+ s3104_0 =>
+ (case ((sep_matches_prefix s3104_0)) of
+ SOME ((() , s3105_0)) =>
+ (case ((string_drop s3104_0 s3105_0)) of
+ s3106_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2136_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2137_0)) =>
- let p0_ = (string_drop s2136_0 s2137_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3106_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3107_0)) =>
+ let p0_ = (string_drop s3106_0 s3107_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -29100,30 +40733,30 @@ val _ = Define `
else NONE))`;
-(*val _s2115_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3085_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2115_:string ->((5)words$word#(6)words$word)option) s2116_0=
- (let s2117_0 = s2116_0 in
- if ((string_startswith s2117_0 "c.addiw")) then
- (case ((string_drop s2117_0 ((string_length "c.addiw")))) of
- s2118_0 =>
- (case ((spc_matches_prefix0 s2118_0)) of
- SOME ((() , s2119_0)) =>
- (case ((string_drop s2118_0 s2119_0)) of
- s2120_0 =>
- (case ((reg_name_matches_prefix s2120_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2121_0)) =>
- (case ((string_drop s2120_0 s2121_0)) of
- s2122_0 =>
- (case ((sep_matches_prefix s2122_0)) of
- SOME ((() , s2123_0)) =>
- (case ((string_drop s2122_0 s2123_0)) of
- s2124_0 =>
+ ((s3085_:string ->((5)words$word#(6)words$word)option) s3086_0=
+ (let s3087_0 = s3086_0 in
+ if ((string_startswith s3087_0 "c.addiw")) then
+ (case ((string_drop s3087_0 ((string_length "c.addiw")))) of
+ s3088_0 =>
+ (case ((spc_matches_prefix0 s3088_0)) of
+ SOME ((() , s3089_0)) =>
+ (case ((string_drop s3088_0 s3089_0)) of
+ s3090_0 =>
+ (case ((reg_name_matches_prefix s3090_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3091_0)) =>
+ (case ((string_drop s3090_0 s3091_0)) of
+ s3092_0 =>
+ (case ((sep_matches_prefix s3092_0)) of
+ SOME ((() , s3093_0)) =>
+ (case ((string_drop s3092_0 s3093_0)) of
+ s3094_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2124_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2125_0)) =>
- let p0_ = (string_drop s2124_0 s2125_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3094_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3095_0)) =>
+ let p0_ = (string_drop s3094_0 s3095_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -29140,28 +40773,27 @@ val _ = Define `
else NONE))`;
-(*val _s2107_ : string -> maybe (mword ty11)*)
+(*val _s3077_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s2107_:string ->((11)words$word)option) s2108_0=
- (let s2109_0 = s2108_0 in
- if ((string_startswith s2109_0 "c.jal")) then
- (case ((string_drop s2109_0 ((string_length "c.jal")))) of
- s2110_0 =>
- (case ((spc_matches_prefix0 s2110_0)) of
- SOME ((() , s2111_0)) =>
- (case ((string_drop s2110_0 s2111_0)) of
- s2112_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2112_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__814, s2113_0)) =>
- if (((((subrange_vec_dec v__814 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__814 (( 11 : int): ii)
+ ((s3077_:string ->((11)words$word)option) s3078_0=
+ (let s3079_0 = s3078_0 in
+ if ((string_startswith s3079_0 "c.jal")) then
+ (case ((string_drop s3079_0 ((string_length "c.jal")))) of
+ s3080_0 =>
+ (case ((spc_matches_prefix0 s3080_0)) of
+ SOME ((() , s3081_0)) =>
+ (case ((string_drop s3080_0 s3081_0)) of
+ s3082_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3082_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1200, s3083_0)) =>
+ if (((((subrange_vec_dec v__1200 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1200 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__814 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1200 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let p0_ = (string_drop s2112_0 s2113_0) in
+ let p0_ = (string_drop s3082_0 s3083_0) in
if (((p0_ = ""))) then SOME imm else NONE else NONE
| _ => NONE
)
@@ -29172,30 +40804,30 @@ val _ = Define `
else NONE))`;
-(*val _s2095_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3065_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2095_:string ->((5)words$word#(6)words$word)option) s2096_0=
- (let s2097_0 = s2096_0 in
- if ((string_startswith s2097_0 "c.addi")) then
- (case ((string_drop s2097_0 ((string_length "c.addi")))) of
- s2098_0 =>
- (case ((spc_matches_prefix0 s2098_0)) of
- SOME ((() , s2099_0)) =>
- (case ((string_drop s2098_0 s2099_0)) of
- s2100_0 =>
- (case ((reg_name_matches_prefix s2100_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2101_0)) =>
- (case ((string_drop s2100_0 s2101_0)) of
- s2102_0 =>
- (case ((sep_matches_prefix s2102_0)) of
- SOME ((() , s2103_0)) =>
- (case ((string_drop s2102_0 s2103_0)) of
- s2104_0 =>
+ ((s3065_:string ->((5)words$word#(6)words$word)option) s3066_0=
+ (let s3067_0 = s3066_0 in
+ if ((string_startswith s3067_0 "c.addi")) then
+ (case ((string_drop s3067_0 ((string_length "c.addi")))) of
+ s3068_0 =>
+ (case ((spc_matches_prefix0 s3068_0)) of
+ SOME ((() , s3069_0)) =>
+ (case ((string_drop s3068_0 s3069_0)) of
+ s3070_0 =>
+ (case ((reg_name_matches_prefix s3070_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3071_0)) =>
+ (case ((string_drop s3070_0 s3071_0)) of
+ s3072_0 =>
+ (case ((sep_matches_prefix s3072_0)) of
+ SOME ((() , s3073_0)) =>
+ (case ((string_drop s3072_0 s3073_0)) of
+ s3074_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2104_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s2105_0)) =>
- let p0_ = (string_drop s2104_0 s2105_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3074_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s3075_0)) =>
+ let p0_ = (string_drop s3074_0 s3075_0) in
if (((p0_ = ""))) then SOME (rsd, nzi) else NONE
| _ => NONE
)
@@ -29212,45 +40844,45 @@ val _ = Define `
else NONE))`;
-(*val _s2079_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3049_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2079_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2080_0=
- (let s2081_0 = s2080_0 in
- if ((string_startswith s2081_0 "c.sd")) then
- (case ((string_drop s2081_0 ((string_length "c.sd")))) of
- s2082_0 =>
- (case ((spc_matches_prefix0 s2082_0)) of
- SOME ((() , s2083_0)) =>
- (case ((string_drop s2082_0 s2083_0)) of
- s2084_0 =>
- (case ((creg_name_matches_prefix s2084_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2085_0)) =>
- (case ((string_drop s2084_0 s2085_0)) of
- s2086_0 =>
- (case ((sep_matches_prefix s2086_0)) of
- SOME ((() , s2087_0)) =>
- (case ((string_drop s2086_0 s2087_0)) of
- s2088_0 =>
- (case ((creg_name_matches_prefix s2088_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2089_0)) =>
- (case ((string_drop s2088_0 s2089_0)) of
- s2090_0 =>
- (case ((sep_matches_prefix s2090_0)) of
- SOME ((() , s2091_0)) =>
- (case ((string_drop s2090_0 s2091_0)) of
- s2092_0 =>
+ ((s3049_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3050_0=
+ (let s3051_0 = s3050_0 in
+ if ((string_startswith s3051_0 "c.sd")) then
+ (case ((string_drop s3051_0 ((string_length "c.sd")))) of
+ s3052_0 =>
+ (case ((spc_matches_prefix0 s3052_0)) of
+ SOME ((() , s3053_0)) =>
+ (case ((string_drop s3052_0 s3053_0)) of
+ s3054_0 =>
+ (case ((creg_name_matches_prefix s3054_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s3055_0)) =>
+ (case ((string_drop s3054_0 s3055_0)) of
+ s3056_0 =>
+ (case ((sep_matches_prefix s3056_0)) of
+ SOME ((() , s3057_0)) =>
+ (case ((string_drop s3056_0 s3057_0)) of
+ s3058_0 =>
+ (case ((creg_name_matches_prefix s3058_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s3059_0)) =>
+ (case ((string_drop s3058_0 s3059_0)) of
+ s3060_0 =>
+ (case ((sep_matches_prefix s3060_0)) of
+ SOME ((() , s3061_0)) =>
+ (case ((string_drop s3060_0 s3061_0)) of
+ s3062_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2092_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3062_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__816, s2093_0)) =>
- if (((((subrange_vec_dec v__816 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1202, s3063_0)) =>
+ if (((((subrange_vec_dec v__1202 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__816 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1202 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__816 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2092_0 s2093_0) in
+ ((subrange_vec_dec v__1202 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3062_0 s3063_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -29273,45 +40905,45 @@ val _ = Define `
else NONE))`;
-(*val _s2063_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3033_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2063_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2064_0=
- (let s2065_0 = s2064_0 in
- if ((string_startswith s2065_0 "c.sw")) then
- (case ((string_drop s2065_0 ((string_length "c.sw")))) of
- s2066_0 =>
- (case ((spc_matches_prefix0 s2066_0)) of
- SOME ((() , s2067_0)) =>
- (case ((string_drop s2066_0 s2067_0)) of
- s2068_0 =>
- (case ((creg_name_matches_prefix s2068_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2069_0)) =>
- (case ((string_drop s2068_0 s2069_0)) of
- s2070_0 =>
- (case ((sep_matches_prefix s2070_0)) of
- SOME ((() , s2071_0)) =>
- (case ((string_drop s2070_0 s2071_0)) of
- s2072_0 =>
- (case ((creg_name_matches_prefix s2072_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2073_0)) =>
- (case ((string_drop s2072_0 s2073_0)) of
- s2074_0 =>
- (case ((sep_matches_prefix s2074_0)) of
- SOME ((() , s2075_0)) =>
- (case ((string_drop s2074_0 s2075_0)) of
- s2076_0 =>
+ ((s3033_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3034_0=
+ (let s3035_0 = s3034_0 in
+ if ((string_startswith s3035_0 "c.sw")) then
+ (case ((string_drop s3035_0 ((string_length "c.sw")))) of
+ s3036_0 =>
+ (case ((spc_matches_prefix0 s3036_0)) of
+ SOME ((() , s3037_0)) =>
+ (case ((string_drop s3036_0 s3037_0)) of
+ s3038_0 =>
+ (case ((creg_name_matches_prefix s3038_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s3039_0)) =>
+ (case ((string_drop s3038_0 s3039_0)) of
+ s3040_0 =>
+ (case ((sep_matches_prefix s3040_0)) of
+ SOME ((() , s3041_0)) =>
+ (case ((string_drop s3040_0 s3041_0)) of
+ s3042_0 =>
+ (case ((creg_name_matches_prefix s3042_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s3043_0)) =>
+ (case ((string_drop s3042_0 s3043_0)) of
+ s3044_0 =>
+ (case ((sep_matches_prefix s3044_0)) of
+ SOME ((() , s3045_0)) =>
+ (case ((string_drop s3044_0 s3045_0)) of
+ s3046_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2076_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3046_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__818, s2077_0)) =>
- if (((((subrange_vec_dec v__818 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1204, s3047_0)) =>
+ if (((((subrange_vec_dec v__1204 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__818 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1204 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__818 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2076_0 s2077_0) in
+ ((subrange_vec_dec v__1204 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3046_0 s3047_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -29334,45 +40966,45 @@ val _ = Define `
else NONE))`;
-(*val _s2047_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3017_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2047_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2048_0=
- (let s2049_0 = s2048_0 in
- if ((string_startswith s2049_0 "c.ld")) then
- (case ((string_drop s2049_0 ((string_length "c.ld")))) of
- s2050_0 =>
- (case ((spc_matches_prefix0 s2050_0)) of
- SOME ((() , s2051_0)) =>
- (case ((string_drop s2050_0 s2051_0)) of
- s2052_0 =>
- (case ((creg_name_matches_prefix s2052_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2053_0)) =>
- (case ((string_drop s2052_0 s2053_0)) of
- s2054_0 =>
- (case ((sep_matches_prefix s2054_0)) of
- SOME ((() , s2055_0)) =>
- (case ((string_drop s2054_0 s2055_0)) of
- s2056_0 =>
- (case ((creg_name_matches_prefix s2056_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2057_0)) =>
- (case ((string_drop s2056_0 s2057_0)) of
- s2058_0 =>
- (case ((sep_matches_prefix s2058_0)) of
- SOME ((() , s2059_0)) =>
- (case ((string_drop s2058_0 s2059_0)) of
- s2060_0 =>
+ ((s3017_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3018_0=
+ (let s3019_0 = s3018_0 in
+ if ((string_startswith s3019_0 "c.ld")) then
+ (case ((string_drop s3019_0 ((string_length "c.ld")))) of
+ s3020_0 =>
+ (case ((spc_matches_prefix0 s3020_0)) of
+ SOME ((() , s3021_0)) =>
+ (case ((string_drop s3020_0 s3021_0)) of
+ s3022_0 =>
+ (case ((creg_name_matches_prefix s3022_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3023_0)) =>
+ (case ((string_drop s3022_0 s3023_0)) of
+ s3024_0 =>
+ (case ((sep_matches_prefix s3024_0)) of
+ SOME ((() , s3025_0)) =>
+ (case ((string_drop s3024_0 s3025_0)) of
+ s3026_0 =>
+ (case ((creg_name_matches_prefix s3026_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s3027_0)) =>
+ (case ((string_drop s3026_0 s3027_0)) of
+ s3028_0 =>
+ (case ((sep_matches_prefix s3028_0)) of
+ SOME ((() , s3029_0)) =>
+ (case ((string_drop s3028_0 s3029_0)) of
+ s3030_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2060_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3030_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__820, s2061_0)) =>
- if (((((subrange_vec_dec v__820 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1206, s3031_0)) =>
+ if (((((subrange_vec_dec v__1206 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__820 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1206 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__820 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2060_0 s2061_0) in
+ ((subrange_vec_dec v__1206 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3030_0 s3031_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -29395,45 +41027,45 @@ val _ = Define `
else NONE))`;
-(*val _s2031_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3001_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2031_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2032_0=
- (let s2033_0 = s2032_0 in
- if ((string_startswith s2033_0 "c.lw")) then
- (case ((string_drop s2033_0 ((string_length "c.lw")))) of
- s2034_0 =>
- (case ((spc_matches_prefix0 s2034_0)) of
- SOME ((() , s2035_0)) =>
- (case ((string_drop s2034_0 s2035_0)) of
- s2036_0 =>
- (case ((creg_name_matches_prefix s2036_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2037_0)) =>
- (case ((string_drop s2036_0 s2037_0)) of
- s2038_0 =>
- (case ((sep_matches_prefix s2038_0)) of
- SOME ((() , s2039_0)) =>
- (case ((string_drop s2038_0 s2039_0)) of
- s2040_0 =>
- (case ((creg_name_matches_prefix s2040_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2041_0)) =>
- (case ((string_drop s2040_0 s2041_0)) of
- s2042_0 =>
- (case ((sep_matches_prefix s2042_0)) of
- SOME ((() , s2043_0)) =>
- (case ((string_drop s2042_0 s2043_0)) of
- s2044_0 =>
+ ((s3001_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3002_0=
+ (let s3003_0 = s3002_0 in
+ if ((string_startswith s3003_0 "c.lw")) then
+ (case ((string_drop s3003_0 ((string_length "c.lw")))) of
+ s3004_0 =>
+ (case ((spc_matches_prefix0 s3004_0)) of
+ SOME ((() , s3005_0)) =>
+ (case ((string_drop s3004_0 s3005_0)) of
+ s3006_0 =>
+ (case ((creg_name_matches_prefix s3006_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3007_0)) =>
+ (case ((string_drop s3006_0 s3007_0)) of
+ s3008_0 =>
+ (case ((sep_matches_prefix s3008_0)) of
+ SOME ((() , s3009_0)) =>
+ (case ((string_drop s3008_0 s3009_0)) of
+ s3010_0 =>
+ (case ((creg_name_matches_prefix s3010_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s3011_0)) =>
+ (case ((string_drop s3010_0 s3011_0)) of
+ s3012_0 =>
+ (case ((sep_matches_prefix s3012_0)) of
+ SOME ((() , s3013_0)) =>
+ (case ((string_drop s3012_0 s3013_0)) of
+ s3014_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2044_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3014_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__822, s2045_0)) =>
- if (((((subrange_vec_dec v__822 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1208, s3015_0)) =>
+ if (((((subrange_vec_dec v__1208 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__822 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1208 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__822 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2044_0 s2045_0) in
+ ((subrange_vec_dec v__1208 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3014_0 s3015_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -29456,36 +41088,36 @@ val _ = Define `
else NONE))`;
-(*val _s2019_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s2989_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2019_:string ->((3)words$word#(8)words$word)option) s2020_0=
- (let s2021_0 = s2020_0 in
- if ((string_startswith s2021_0 "c.addi4spn")) then
- (case ((string_drop s2021_0 ((string_length "c.addi4spn")))) of
- s2022_0 =>
- (case ((spc_matches_prefix0 s2022_0)) of
- SOME ((() , s2023_0)) =>
- (case ((string_drop s2022_0 s2023_0)) of
- s2024_0 =>
- (case ((creg_name_matches_prefix s2024_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2025_0)) =>
- (case ((string_drop s2024_0 s2025_0)) of
- s2026_0 =>
- (case ((sep_matches_prefix s2026_0)) of
- SOME ((() , s2027_0)) =>
- (case ((string_drop s2026_0 s2027_0)) of
- s2028_0 =>
+ ((s2989_:string ->((3)words$word#(8)words$word)option) s2990_0=
+ (let s2991_0 = s2990_0 in
+ if ((string_startswith s2991_0 "c.addi4spn")) then
+ (case ((string_drop s2991_0 ((string_length "c.addi4spn")))) of
+ s2992_0 =>
+ (case ((spc_matches_prefix0 s2992_0)) of
+ SOME ((() , s2993_0)) =>
+ (case ((string_drop s2992_0 s2993_0)) of
+ s2994_0 =>
+ (case ((creg_name_matches_prefix s2994_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s2995_0)) =>
+ (case ((string_drop s2994_0 s2995_0)) of
+ s2996_0 =>
+ (case ((sep_matches_prefix s2996_0)) of
+ SOME ((() , s2997_0)) =>
+ (case ((string_drop s2996_0 s2997_0)) of
+ s2998_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2028_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__824, s2029_0)) =>
- if (((((subrange_vec_dec v__824 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2998_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1210, s2999_0)) =>
+ if (((((subrange_vec_dec v__1210 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__824 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1210 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__824 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- let p0_ = (string_drop s2028_0 s2029_0) in
+ ((subrange_vec_dec v__1210 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ let p0_ = (string_drop s2998_0 s2999_0) in
if (((p0_ = ""))) then SOME (rdc, nzimm) else NONE else NONE
| _ => NONE
)
@@ -29502,57 +41134,63 @@ val _ = Define `
else NONE))`;
-(*val _s1995_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1995_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1996_0=
- ((case s1996_0 of
- s1997_0 =>
- (case ((amo_mnemonic_matches_prefix s1997_0)) of
- SOME ((op, s1998_0)) =>
- let s1999_0 = (string_drop s1997_0 s1998_0) in
- if ((string_startswith s1999_0 ".")) then
- (case ((string_drop s1999_0 ((string_length ".")))) of
- s2000_0 =>
- (case ((size_mnemonic_matches_prefix s2000_0)) of
- SOME ((width, s2001_0)) =>
- (case ((string_drop s2000_0 s2001_0)) of
- s2002_0 =>
- (case ((maybe_aq_matches_prefix s2002_0)) of
- SOME ((aq, s2003_0)) =>
- (case ((string_drop s2002_0 s2003_0)) of
- s2004_0 =>
- (case ((maybe_rl_matches_prefix s2004_0)) of
- SOME ((rl, s2005_0)) =>
- (case ((string_drop s2004_0 s2005_0)) of
- s2006_0 =>
- (case ((spc_matches_prefix0 s2006_0)) of
- SOME ((() , s2007_0)) =>
- (case ((string_drop s2006_0 s2007_0)) of
- s2008_0 =>
- (case ((reg_name_matches_prefix s2008_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2009_0)) =>
- (case ((string_drop s2008_0 s2009_0)) of
- s2010_0 =>
- (case ((sep_matches_prefix s2010_0)) of
- SOME ((() , s2011_0)) =>
- (case ((string_drop s2010_0 s2011_0)) of
- s2012_0 =>
- (case ((reg_name_matches_prefix s2012_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2013_0)) =>
- (case ((string_drop s2012_0 s2013_0)) of
- s2014_0 =>
- (case ((sep_matches_prefix s2014_0)) of
- SOME ((() , s2015_0)) =>
- (case ((string_drop s2014_0 s2015_0)) of
- s2016_0 =>
- (case ((reg_name_matches_prefix s2016_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2017_0)) =>
- let p0_ = (string_drop s2016_0 s2017_0) in
- if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs1, rs2) else NONE
- | _ => NONE
- )
- )
+(*val _s2963_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2963_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s2964_0=
+ ((case s2964_0 of
+ s2965_0 =>
+ (case ((amo_mnemonic_matches_prefix s2965_0)) of
+ SOME ((op, s2966_0)) =>
+ let s2967_0 = (string_drop s2965_0 s2966_0) in
+ if ((string_startswith s2967_0 ".")) then
+ (case ((string_drop s2967_0 ((string_length ".")))) of
+ s2968_0 =>
+ (case ((size_mnemonic_matches_prefix s2968_0)) of
+ SOME ((width, s2969_0)) =>
+ (case ((string_drop s2968_0 s2969_0)) of
+ s2970_0 =>
+ (case ((maybe_aq_matches_prefix s2970_0)) of
+ SOME ((aq, s2971_0)) =>
+ (case ((string_drop s2970_0 s2971_0)) of
+ s2972_0 =>
+ (case ((maybe_rl_matches_prefix s2972_0)) of
+ SOME ((rl, s2973_0)) =>
+ (case ((string_drop s2972_0 s2973_0)) of
+ s2974_0 =>
+ (case ((spc_matches_prefix0 s2974_0)) of
+ SOME ((() , s2975_0)) =>
+ (case ((string_drop s2974_0 s2975_0)) of
+ s2976_0 =>
+ (case ((reg_name_matches_prefix s2976_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2977_0)) =>
+ (case ((string_drop s2976_0 s2977_0)) of
+ s2978_0 =>
+ (case ((sep_matches_prefix s2978_0)) of
+ SOME ((() , s2979_0)) =>
+ (case ((string_drop s2978_0 s2979_0)) of
+ s2980_0 =>
+ (case ((reg_name_matches_prefix s2980_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2981_0)) =>
+ (case ((string_drop s2980_0 s2981_0)) of
+ s2982_0 =>
+ (case ((sep_matches_prefix s2982_0)) of
+ SOME ((() , s2983_0)) =>
+ let s2984_0 = (string_drop s2982_0 s2983_0) in
+ if ((string_startswith s2984_0 "(")) then
+ (case ((string_drop s2984_0 ((string_length "(")))) of
+ s2985_0 =>
+ (case ((reg_name_matches_prefix s2985_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2986_0)) =>
+ let s2987_0 = (string_drop s2985_0 s2986_0) in
+ if ((string_startswith s2987_0 ")")) then
+ let p0_ = (string_drop s2987_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs2, rs1) else
+ NONE else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -29582,49 +41220,49 @@ val _ = Define `
)))`;
-(*val _s1973_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2941_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1973_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1974_0=
- (let s1975_0 = s1974_0 in
- if ((string_startswith s1975_0 "sc.")) then
- (case ((string_drop s1975_0 ((string_length "sc.")))) of
- s1976_0 =>
- (case ((size_mnemonic_matches_prefix s1976_0)) of
- SOME ((size1, s1977_0)) =>
- (case ((string_drop s1976_0 s1977_0)) of
- s1978_0 =>
- (case ((maybe_aq_matches_prefix s1978_0)) of
- SOME ((aq, s1979_0)) =>
- (case ((string_drop s1978_0 s1979_0)) of
- s1980_0 =>
- (case ((maybe_rl_matches_prefix s1980_0)) of
- SOME ((rl, s1981_0)) =>
- (case ((string_drop s1980_0 s1981_0)) of
- s1982_0 =>
- (case ((spc_matches_prefix0 s1982_0)) of
- SOME ((() , s1983_0)) =>
- (case ((string_drop s1982_0 s1983_0)) of
- s1984_0 =>
- (case ((reg_name_matches_prefix s1984_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1985_0)) =>
- (case ((string_drop s1984_0 s1985_0)) of
- s1986_0 =>
- (case ((sep_matches_prefix s1986_0)) of
- SOME ((() , s1987_0)) =>
- (case ((string_drop s1986_0 s1987_0)) of
- s1988_0 =>
- (case ((reg_name_matches_prefix s1988_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1989_0)) =>
- (case ((string_drop s1988_0 s1989_0)) of
- s1990_0 =>
- (case ((sep_matches_prefix s1990_0)) of
- SOME ((() , s1991_0)) =>
- (case ((string_drop s1990_0 s1991_0)) of
- s1992_0 =>
- (case ((reg_name_matches_prefix s1992_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1993_0)) =>
- let p0_ = (string_drop s1992_0 s1993_0) in
+ ((s2941_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s2942_0=
+ (let s2943_0 = s2942_0 in
+ if ((string_startswith s2943_0 "sc.")) then
+ (case ((string_drop s2943_0 ((string_length "sc.")))) of
+ s2944_0 =>
+ (case ((size_mnemonic_matches_prefix s2944_0)) of
+ SOME ((size1, s2945_0)) =>
+ (case ((string_drop s2944_0 s2945_0)) of
+ s2946_0 =>
+ (case ((maybe_aq_matches_prefix s2946_0)) of
+ SOME ((aq, s2947_0)) =>
+ (case ((string_drop s2946_0 s2947_0)) of
+ s2948_0 =>
+ (case ((maybe_rl_matches_prefix s2948_0)) of
+ SOME ((rl, s2949_0)) =>
+ (case ((string_drop s2948_0 s2949_0)) of
+ s2950_0 =>
+ (case ((spc_matches_prefix0 s2950_0)) of
+ SOME ((() , s2951_0)) =>
+ (case ((string_drop s2950_0 s2951_0)) of
+ s2952_0 =>
+ (case ((reg_name_matches_prefix s2952_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2953_0)) =>
+ (case ((string_drop s2952_0 s2953_0)) of
+ s2954_0 =>
+ (case ((sep_matches_prefix s2954_0)) of
+ SOME ((() , s2955_0)) =>
+ (case ((string_drop s2954_0 s2955_0)) of
+ s2956_0 =>
+ (case ((reg_name_matches_prefix s2956_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2957_0)) =>
+ (case ((string_drop s2956_0 s2957_0)) of
+ s2958_0 =>
+ (case ((sep_matches_prefix s2958_0)) of
+ SOME ((() , s2959_0)) =>
+ (case ((string_drop s2958_0 s2959_0)) of
+ s2960_0 =>
+ (case ((reg_name_matches_prefix s2960_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2961_0)) =>
+ let p0_ = (string_drop s2960_0 s2961_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -29656,41 +41294,41 @@ val _ = Define `
else NONE))`;
-(*val _s1955_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
+(*val _s2923_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1955_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1956_0=
- (let s1957_0 = s1956_0 in
- if ((string_startswith s1957_0 "lr.")) then
- (case ((string_drop s1957_0 ((string_length "lr.")))) of
- s1958_0 =>
- (case ((size_mnemonic_matches_prefix s1958_0)) of
- SOME ((size1, s1959_0)) =>
- (case ((string_drop s1958_0 s1959_0)) of
- s1960_0 =>
- (case ((maybe_aq_matches_prefix s1960_0)) of
- SOME ((aq, s1961_0)) =>
- (case ((string_drop s1960_0 s1961_0)) of
- s1962_0 =>
- (case ((maybe_rl_matches_prefix s1962_0)) of
- SOME ((rl, s1963_0)) =>
- (case ((string_drop s1962_0 s1963_0)) of
- s1964_0 =>
- (case ((spc_matches_prefix0 s1964_0)) of
- SOME ((() , s1965_0)) =>
- (case ((string_drop s1964_0 s1965_0)) of
- s1966_0 =>
- (case ((reg_name_matches_prefix s1966_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1967_0)) =>
- (case ((string_drop s1966_0 s1967_0)) of
- s1968_0 =>
- (case ((sep_matches_prefix s1968_0)) of
- SOME ((() , s1969_0)) =>
- (case ((string_drop s1968_0 s1969_0)) of
- s1970_0 =>
- (case ((reg_name_matches_prefix s1970_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1971_0)) =>
- let p0_ = (string_drop s1970_0 s1971_0) in
+ ((s2923_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s2924_0=
+ (let s2925_0 = s2924_0 in
+ if ((string_startswith s2925_0 "lr.")) then
+ (case ((string_drop s2925_0 ((string_length "lr.")))) of
+ s2926_0 =>
+ (case ((size_mnemonic_matches_prefix s2926_0)) of
+ SOME ((size1, s2927_0)) =>
+ (case ((string_drop s2926_0 s2927_0)) of
+ s2928_0 =>
+ (case ((maybe_aq_matches_prefix s2928_0)) of
+ SOME ((aq, s2929_0)) =>
+ (case ((string_drop s2928_0 s2929_0)) of
+ s2930_0 =>
+ (case ((maybe_rl_matches_prefix s2930_0)) of
+ SOME ((rl, s2931_0)) =>
+ (case ((string_drop s2930_0 s2931_0)) of
+ s2932_0 =>
+ (case ((spc_matches_prefix0 s2932_0)) of
+ SOME ((() , s2933_0)) =>
+ (case ((string_drop s2932_0 s2933_0)) of
+ s2934_0 =>
+ (case ((reg_name_matches_prefix s2934_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2935_0)) =>
+ (case ((string_drop s2934_0 s2935_0)) of
+ s2936_0 =>
+ (case ((sep_matches_prefix s2936_0)) of
+ SOME ((() , s2937_0)) =>
+ (case ((string_drop s2936_0 s2937_0)) of
+ s2938_0 =>
+ (case ((reg_name_matches_prefix s2938_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2939_0)) =>
+ let p0_ = (string_drop s2938_0 s2939_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1) else NONE
| _ => NONE
)
@@ -29716,29 +41354,29 @@ val _ = Define `
else NONE))`;
-(*val _s1943_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s2911_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1943_:string ->((5)words$word#(5)words$word)option) s1944_0=
- (let s1945_0 = s1944_0 in
- if ((string_startswith s1945_0 "sfence.vma")) then
- (case ((string_drop s1945_0 ((string_length "sfence.vma")))) of
- s1946_0 =>
- (case ((spc_matches_prefix0 s1946_0)) of
- SOME ((() , s1947_0)) =>
- (case ((string_drop s1946_0 s1947_0)) of
- s1948_0 =>
- (case ((reg_name_matches_prefix s1948_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1949_0)) =>
- (case ((string_drop s1948_0 s1949_0)) of
- s1950_0 =>
- (case ((sep_matches_prefix s1950_0)) of
- SOME ((() , s1951_0)) =>
- (case ((string_drop s1950_0 s1951_0)) of
- s1952_0 =>
- (case ((reg_name_matches_prefix s1952_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1953_0)) =>
- let p0_ = (string_drop s1952_0 s1953_0) in
+ ((s2911_:string ->((5)words$word#(5)words$word)option) s2912_0=
+ (let s2913_0 = s2912_0 in
+ if ((string_startswith s2913_0 "sfence.vma")) then
+ (case ((string_drop s2913_0 ((string_length "sfence.vma")))) of
+ s2914_0 =>
+ (case ((spc_matches_prefix0 s2914_0)) of
+ SOME ((() , s2915_0)) =>
+ (case ((string_drop s2914_0 s2915_0)) of
+ s2916_0 =>
+ (case ((reg_name_matches_prefix s2916_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2917_0)) =>
+ (case ((string_drop s2916_0 s2917_0)) of
+ s2918_0 =>
+ (case ((sep_matches_prefix s2918_0)) of
+ SOME ((() , s2919_0)) =>
+ (case ((string_drop s2918_0 s2919_0)) of
+ s2920_0 =>
+ (case ((reg_name_matches_prefix s2920_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2921_0)) =>
+ let p0_ = (string_drop s2920_0 s2921_0) in
if (((p0_ = ""))) then SOME (rs1, rs2) else NONE
| _ => NONE
)
@@ -29755,29 +41393,29 @@ val _ = Define `
else NONE))`;
-(*val _s1931_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s2899_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1931_:string ->((4)words$word#(4)words$word)option) s1932_0=
- (let s1933_0 = s1932_0 in
- if ((string_startswith s1933_0 "fence.tso")) then
- (case ((string_drop s1933_0 ((string_length "fence.tso")))) of
- s1934_0 =>
- (case ((spc_matches_prefix0 s1934_0)) of
- SOME ((() , s1935_0)) =>
- (case ((string_drop s1934_0 s1935_0)) of
- s1936_0 =>
- (case ((fence_bits_matches_prefix s1936_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1937_0)) =>
- (case ((string_drop s1936_0 s1937_0)) of
- s1938_0 =>
- (case ((sep_matches_prefix s1938_0)) of
- SOME ((() , s1939_0)) =>
- (case ((string_drop s1938_0 s1939_0)) of
- s1940_0 =>
- (case ((fence_bits_matches_prefix s1940_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1941_0)) =>
- let p0_ = (string_drop s1940_0 s1941_0) in
+ ((s2899_:string ->((4)words$word#(4)words$word)option) s2900_0=
+ (let s2901_0 = s2900_0 in
+ if ((string_startswith s2901_0 "fence.tso")) then
+ (case ((string_drop s2901_0 ((string_length "fence.tso")))) of
+ s2902_0 =>
+ (case ((spc_matches_prefix0 s2902_0)) of
+ SOME ((() , s2903_0)) =>
+ (case ((string_drop s2902_0 s2903_0)) of
+ s2904_0 =>
+ (case ((fence_bits_matches_prefix s2904_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s2905_0)) =>
+ (case ((string_drop s2904_0 s2905_0)) of
+ s2906_0 =>
+ (case ((sep_matches_prefix s2906_0)) of
+ SOME ((() , s2907_0)) =>
+ (case ((string_drop s2906_0 s2907_0)) of
+ s2908_0 =>
+ (case ((fence_bits_matches_prefix s2908_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s2909_0)) =>
+ let p0_ = (string_drop s2908_0 s2909_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -29794,29 +41432,29 @@ val _ = Define `
else NONE))`;
-(*val _s1919_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s2887_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1919_:string ->((4)words$word#(4)words$word)option) s1920_0=
- (let s1921_0 = s1920_0 in
- if ((string_startswith s1921_0 "fence")) then
- (case ((string_drop s1921_0 ((string_length "fence")))) of
- s1922_0 =>
- (case ((spc_matches_prefix0 s1922_0)) of
- SOME ((() , s1923_0)) =>
- (case ((string_drop s1922_0 s1923_0)) of
- s1924_0 =>
- (case ((fence_bits_matches_prefix s1924_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1925_0)) =>
- (case ((string_drop s1924_0 s1925_0)) of
- s1926_0 =>
- (case ((sep_matches_prefix s1926_0)) of
- SOME ((() , s1927_0)) =>
- (case ((string_drop s1926_0 s1927_0)) of
- s1928_0 =>
- (case ((fence_bits_matches_prefix s1928_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1929_0)) =>
- let p0_ = (string_drop s1928_0 s1929_0) in
+ ((s2887_:string ->((4)words$word#(4)words$word)option) s2888_0=
+ (let s2889_0 = s2888_0 in
+ if ((string_startswith s2889_0 "fence")) then
+ (case ((string_drop s2889_0 ((string_length "fence")))) of
+ s2890_0 =>
+ (case ((spc_matches_prefix0 s2890_0)) of
+ SOME ((() , s2891_0)) =>
+ (case ((string_drop s2890_0 s2891_0)) of
+ s2892_0 =>
+ (case ((fence_bits_matches_prefix s2892_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s2893_0)) =>
+ (case ((string_drop s2892_0 s2893_0)) of
+ s2894_0 =>
+ (case ((sep_matches_prefix s2894_0)) of
+ SOME ((() , s2895_0)) =>
+ (case ((string_drop s2894_0 s2895_0)) of
+ s2896_0 =>
+ (case ((fence_bits_matches_prefix s2896_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s2897_0)) =>
+ let p0_ = (string_drop s2896_0 s2897_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -29833,41 +41471,41 @@ val _ = Define `
else NONE))`;
-(*val _s1902_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2870_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1902_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1903_0=
- ((case s1903_0 of
- s1904_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s1904_0)) of
- SOME ((op, s1905_0)) =>
- (case ((string_drop s1904_0 s1905_0)) of
- s1906_0 =>
- (case ((spc_matches_prefix0 s1906_0)) of
- SOME ((() , s1907_0)) =>
- (case ((string_drop s1906_0 s1907_0)) of
- s1908_0 =>
- (case ((reg_name_matches_prefix s1908_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1909_0)) =>
- (case ((string_drop s1908_0 s1909_0)) of
- s1910_0 =>
- (case ((sep_matches_prefix s1910_0)) of
- SOME ((() , s1911_0)) =>
- (case ((string_drop s1910_0 s1911_0)) of
- s1912_0 =>
- (case ((reg_name_matches_prefix s1912_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1913_0)) =>
- (case ((string_drop s1912_0 s1913_0)) of
- s1914_0 =>
- (case ((sep_matches_prefix s1914_0)) of
- SOME ((() , s1915_0)) =>
- (case ((string_drop s1914_0 s1915_0)) of
- s1916_0 =>
+ ((s2870_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s2871_0=
+ ((case s2871_0 of
+ s2872_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s2872_0)) of
+ SOME ((op, s2873_0)) =>
+ (case ((string_drop s2872_0 s2873_0)) of
+ s2874_0 =>
+ (case ((spc_matches_prefix0 s2874_0)) of
+ SOME ((() , s2875_0)) =>
+ (case ((string_drop s2874_0 s2875_0)) of
+ s2876_0 =>
+ (case ((reg_name_matches_prefix s2876_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2877_0)) =>
+ (case ((string_drop s2876_0 s2877_0)) of
+ s2878_0 =>
+ (case ((sep_matches_prefix s2878_0)) of
+ SOME ((() , s2879_0)) =>
+ (case ((string_drop s2878_0 s2879_0)) of
+ s2880_0 =>
+ (case ((reg_name_matches_prefix s2880_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2881_0)) =>
+ (case ((string_drop s2880_0 s2881_0)) of
+ s2882_0 =>
+ (case ((sep_matches_prefix s2882_0)) of
+ SOME ((() , s2883_0)) =>
+ (case ((string_drop s2882_0 s2883_0)) of
+ s2884_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1916_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1917_0)) =>
- let p0_ = (string_drop s1916_0 s1917_0) in
+ s2884_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s2885_0)) =>
+ let p0_ = (string_drop s2884_0 s2885_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -29892,39 +41530,39 @@ val _ = Define `
)))`;
-(*val _s1885_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1885_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1886_0=
- ((case s1886_0 of
- s1887_0 =>
- (case ((rtypew_mnemonic_matches_prefix s1887_0)) of
- SOME ((op, s1888_0)) =>
- (case ((string_drop s1887_0 s1888_0)) of
- s1889_0 =>
- (case ((spc_matches_prefix0 s1889_0)) of
- SOME ((() , s1890_0)) =>
- (case ((string_drop s1889_0 s1890_0)) of
- s1891_0 =>
- (case ((reg_name_matches_prefix s1891_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1892_0)) =>
- (case ((string_drop s1891_0 s1892_0)) of
- s1893_0 =>
- (case ((sep_matches_prefix s1893_0)) of
- SOME ((() , s1894_0)) =>
- (case ((string_drop s1893_0 s1894_0)) of
- s1895_0 =>
- (case ((reg_name_matches_prefix s1895_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1896_0)) =>
- (case ((string_drop s1895_0 s1896_0)) of
- s1897_0 =>
- (case ((sep_matches_prefix s1897_0)) of
- SOME ((() , s1898_0)) =>
- (case ((string_drop s1897_0 s1898_0)) of
- s1899_0 =>
- (case ((reg_name_matches_prefix s1899_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1900_0)) =>
- let p0_ = (string_drop s1899_0 s1900_0) in
+(*val _s2853_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2853_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s2854_0=
+ ((case s2854_0 of
+ s2855_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s2855_0)) of
+ SOME ((op, s2856_0)) =>
+ (case ((string_drop s2855_0 s2856_0)) of
+ s2857_0 =>
+ (case ((spc_matches_prefix0 s2857_0)) of
+ SOME ((() , s2858_0)) =>
+ (case ((string_drop s2857_0 s2858_0)) of
+ s2859_0 =>
+ (case ((reg_name_matches_prefix s2859_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2860_0)) =>
+ (case ((string_drop s2859_0 s2860_0)) of
+ s2861_0 =>
+ (case ((sep_matches_prefix s2861_0)) of
+ SOME ((() , s2862_0)) =>
+ (case ((string_drop s2861_0 s2862_0)) of
+ s2863_0 =>
+ (case ((reg_name_matches_prefix s2863_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2864_0)) =>
+ (case ((string_drop s2863_0 s2864_0)) of
+ s2865_0 =>
+ (case ((sep_matches_prefix s2865_0)) of
+ SOME ((() , s2866_0)) =>
+ (case ((string_drop s2865_0 s2866_0)) of
+ s2867_0 =>
+ (case ((reg_name_matches_prefix s2867_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2868_0)) =>
+ let p0_ = (string_drop s2867_0 s2868_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -29949,41 +41587,41 @@ val _ = Define `
)))`;
-(*val _s1868_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1868_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s1869_0=
- ((case s1869_0 of
- s1870_0 =>
- (case ((shiftw_mnemonic_matches_prefix s1870_0)) of
- SOME ((op, s1871_0)) =>
- (case ((string_drop s1870_0 s1871_0)) of
- s1872_0 =>
- (case ((spc_matches_prefix0 s1872_0)) of
- SOME ((() , s1873_0)) =>
- (case ((string_drop s1872_0 s1873_0)) of
- s1874_0 =>
- (case ((reg_name_matches_prefix s1874_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1875_0)) =>
- (case ((string_drop s1874_0 s1875_0)) of
- s1876_0 =>
- (case ((sep_matches_prefix s1876_0)) of
- SOME ((() , s1877_0)) =>
- (case ((string_drop s1876_0 s1877_0)) of
- s1878_0 =>
- (case ((reg_name_matches_prefix s1878_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1879_0)) =>
- (case ((string_drop s1878_0 s1879_0)) of
- s1880_0 =>
- (case ((sep_matches_prefix s1880_0)) of
- SOME ((() , s1881_0)) =>
- (case ((string_drop s1880_0 s1881_0)) of
- s1882_0 =>
+(*val _s2836_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2836_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s2837_0=
+ ((case s2837_0 of
+ s2838_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s2838_0)) of
+ SOME ((op, s2839_0)) =>
+ (case ((string_drop s2838_0 s2839_0)) of
+ s2840_0 =>
+ (case ((spc_matches_prefix0 s2840_0)) of
+ SOME ((() , s2841_0)) =>
+ (case ((string_drop s2840_0 s2841_0)) of
+ s2842_0 =>
+ (case ((reg_name_matches_prefix s2842_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2843_0)) =>
+ (case ((string_drop s2842_0 s2843_0)) of
+ s2844_0 =>
+ (case ((sep_matches_prefix s2844_0)) of
+ SOME ((() , s2845_0)) =>
+ (case ((string_drop s2844_0 s2845_0)) of
+ s2846_0 =>
+ (case ((reg_name_matches_prefix s2846_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2847_0)) =>
+ (case ((string_drop s2846_0 s2847_0)) of
+ s2848_0 =>
+ (case ((sep_matches_prefix s2848_0)) of
+ SOME ((() , s2849_0)) =>
+ (case ((string_drop s2848_0 s2849_0)) of
+ s2850_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1882_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1883_0)) =>
- let p0_ = (string_drop s1882_0 s1883_0) in
+ s2850_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s2851_0)) =>
+ let p0_ = (string_drop s2850_0 s2851_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -30008,39 +41646,38 @@ val _ = Define `
)))`;
-(*val _s1852_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s1852_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1853_0=
- (let s1854_0 = s1853_0 in
- if ((string_startswith s1854_0 "addiw")) then
- (case ((string_drop s1854_0 ((string_length "addiw")))) of
- s1855_0 =>
- (case ((spc_matches_prefix0 s1855_0)) of
- SOME ((() , s1856_0)) =>
- (case ((string_drop s1855_0 s1856_0)) of
- s1857_0 =>
- (case ((reg_name_matches_prefix s1857_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1858_0)) =>
- (case ((string_drop s1857_0 s1858_0)) of
- s1859_0 =>
- (case ((sep_matches_prefix s1859_0)) of
- SOME ((() , s1860_0)) =>
- (case ((string_drop s1859_0 s1860_0)) of
- s1861_0 =>
- (case ((reg_name_matches_prefix s1861_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1862_0)) =>
- (case ((string_drop s1861_0 s1862_0)) of
- s1863_0 =>
- (case ((sep_matches_prefix s1863_0)) of
- SOME ((() , s1864_0)) =>
- (case ((string_drop s1863_0 s1864_0)) of
- s1865_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1865_0
+(*val _s2820_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s2820_:string ->((5)words$word#(5)words$word#(12)words$word)option) s2821_0=
+ (let s2822_0 = s2821_0 in
+ if ((string_startswith s2822_0 "addiw")) then
+ (case ((string_drop s2822_0 ((string_length "addiw")))) of
+ s2823_0 =>
+ (case ((spc_matches_prefix0 s2823_0)) of
+ SOME ((() , s2824_0)) =>
+ (case ((string_drop s2823_0 s2824_0)) of
+ s2825_0 =>
+ (case ((reg_name_matches_prefix s2825_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2826_0)) =>
+ (case ((string_drop s2825_0 s2826_0)) of
+ s2827_0 =>
+ (case ((sep_matches_prefix s2827_0)) of
+ SOME ((() , s2828_0)) =>
+ (case ((string_drop s2827_0 s2828_0)) of
+ s2829_0 =>
+ (case ((reg_name_matches_prefix s2829_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2830_0)) =>
+ (case ((string_drop s2829_0 s2830_0)) of
+ s2831_0 =>
+ (case ((sep_matches_prefix s2831_0)) of
+ SOME ((() , s2832_0)) =>
+ (case ((string_drop s2831_0 s2832_0)) of
+ s2833_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2833_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1866_0)) =>
- let p0_ = (string_drop s1865_0 s1866_0) in
+ SOME ((imm, s2834_0)) =>
+ let p0_ = (string_drop s2833_0 s2834_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30063,63 +41700,62 @@ val _ = Define `
else NONE))`;
-(*val _s1824_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s2792_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1824_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1825_0=
- (let s1826_0 = s1825_0 in
- if ((string_startswith s1826_0 "s")) then
- (case ((string_drop s1826_0 ((string_length "s")))) of
- s1827_0 =>
- (case ((size_mnemonic_matches_prefix s1827_0)) of
- SOME ((size1, s1828_0)) =>
- (case ((string_drop s1827_0 s1828_0)) of
- s1829_0 =>
- (case ((maybe_aq_matches_prefix s1829_0)) of
- SOME ((aq, s1830_0)) =>
- (case ((string_drop s1829_0 s1830_0)) of
- s1831_0 =>
- (case ((maybe_rl_matches_prefix s1831_0)) of
- SOME ((rl, s1832_0)) =>
- (case ((string_drop s1831_0 s1832_0)) of
- s1833_0 =>
- (case ((spc_matches_prefix0 s1833_0)) of
- SOME ((() , s1834_0)) =>
- (case ((string_drop s1833_0 s1834_0)) of
- s1835_0 =>
- (case ((reg_name_matches_prefix s1835_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1836_0)) =>
- (case ((string_drop s1835_0 s1836_0)) of
- s1837_0 =>
- (case ((sep_matches_prefix s1837_0)) of
- SOME ((() , s1838_0)) =>
- (case ((string_drop s1837_0 s1838_0)) of
- s1839_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1839_0
+ ((s2792_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s2793_0=
+ (let s2794_0 = s2793_0 in
+ if ((string_startswith s2794_0 "s")) then
+ (case ((string_drop s2794_0 ((string_length "s")))) of
+ s2795_0 =>
+ (case ((size_mnemonic_matches_prefix s2795_0)) of
+ SOME ((size1, s2796_0)) =>
+ (case ((string_drop s2795_0 s2796_0)) of
+ s2797_0 =>
+ (case ((maybe_aq_matches_prefix s2797_0)) of
+ SOME ((aq, s2798_0)) =>
+ (case ((string_drop s2797_0 s2798_0)) of
+ s2799_0 =>
+ (case ((maybe_rl_matches_prefix s2799_0)) of
+ SOME ((rl, s2800_0)) =>
+ (case ((string_drop s2799_0 s2800_0)) of
+ s2801_0 =>
+ (case ((spc_matches_prefix0 s2801_0)) of
+ SOME ((() , s2802_0)) =>
+ (case ((string_drop s2801_0 s2802_0)) of
+ s2803_0 =>
+ (case ((reg_name_matches_prefix s2803_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2804_0)) =>
+ (case ((string_drop s2803_0 s2804_0)) of
+ s2805_0 =>
+ (case ((sep_matches_prefix s2805_0)) of
+ SOME ((() , s2806_0)) =>
+ (case ((string_drop s2805_0 s2806_0)) of
+ s2807_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2807_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1840_0)) =>
- (case ((string_drop s1839_0 s1840_0)) of
- s1841_0 =>
- (case ((opt_spc_matches_prefix0 s1841_0)) of
- SOME ((() , s1842_0)) =>
- let s1843_0 = (string_drop s1841_0 s1842_0) in
- if ((string_startswith s1843_0 "(")) then
- (case ((string_drop s1843_0 ((string_length "(")))) of
- s1844_0 =>
- (case ((opt_spc_matches_prefix0 s1844_0)) of
- SOME ((() , s1845_0)) =>
- (case ((string_drop s1844_0 s1845_0)) of
- s1846_0 =>
- (case ((reg_name_matches_prefix s1846_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1847_0)) =>
- (case ((string_drop s1846_0 s1847_0)) of
- s1848_0 =>
- (case ((opt_spc_matches_prefix0 s1848_0)) of
- SOME ((() , s1849_0)) =>
- let s1850_0 = (string_drop s1848_0 s1849_0) in
- if ((string_startswith s1850_0 ")")) then
- let p0_ = (string_drop s1850_0 ((string_length ")"))) in
+ SOME ((imm, s2808_0)) =>
+ (case ((string_drop s2807_0 s2808_0)) of
+ s2809_0 =>
+ (case ((opt_spc_matches_prefix0 s2809_0)) of
+ SOME ((() , s2810_0)) =>
+ let s2811_0 = (string_drop s2809_0 s2810_0) in
+ if ((string_startswith s2811_0 "(")) then
+ (case ((string_drop s2811_0 ((string_length "(")))) of
+ s2812_0 =>
+ (case ((opt_spc_matches_prefix0 s2812_0)) of
+ SOME ((() , s2813_0)) =>
+ (case ((string_drop s2812_0 s2813_0)) of
+ s2814_0 =>
+ (case ((reg_name_matches_prefix s2814_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2815_0)) =>
+ (case ((string_drop s2814_0 s2815_0)) of
+ s2816_0 =>
+ (case ((opt_spc_matches_prefix0 s2816_0)) of
+ SOME ((() , s2817_0)) =>
+ let s2818_0 = (string_drop s2816_0 s2817_0) in
+ if ((string_startswith s2818_0 ")")) then
+ let p0_ = (string_drop s2818_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rs2, imm, rs1) else NONE
else NONE
| _ => NONE
@@ -30158,67 +41794,66 @@ val _ = Define `
else NONE))`;
-(*val _s1794_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s2762_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1794_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1795_0=
- (let s1796_0 = s1795_0 in
- if ((string_startswith s1796_0 "l")) then
- (case ((string_drop s1796_0 ((string_length "l")))) of
- s1797_0 =>
- (case ((size_mnemonic_matches_prefix s1797_0)) of
- SOME ((size1, s1798_0)) =>
- (case ((string_drop s1797_0 s1798_0)) of
- s1799_0 =>
- (case ((maybe_u_matches_prefix s1799_0)) of
- SOME ((is_unsigned, s1800_0)) =>
- (case ((string_drop s1799_0 s1800_0)) of
- s1801_0 =>
- (case ((maybe_aq_matches_prefix s1801_0)) of
- SOME ((aq, s1802_0)) =>
- (case ((string_drop s1801_0 s1802_0)) of
- s1803_0 =>
- (case ((maybe_rl_matches_prefix s1803_0)) of
- SOME ((rl, s1804_0)) =>
- (case ((string_drop s1803_0 s1804_0)) of
- s1805_0 =>
- (case ((spc_matches_prefix0 s1805_0)) of
- SOME ((() , s1806_0)) =>
- (case ((string_drop s1805_0 s1806_0)) of
- s1807_0 =>
- (case ((reg_name_matches_prefix s1807_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1808_0)) =>
- (case ((string_drop s1807_0 s1808_0)) of
- s1809_0 =>
- (case ((sep_matches_prefix s1809_0)) of
- SOME ((() , s1810_0)) =>
- (case ((string_drop s1809_0 s1810_0)) of
- s1811_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1811_0
+ ((s2762_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s2763_0=
+ (let s2764_0 = s2763_0 in
+ if ((string_startswith s2764_0 "l")) then
+ (case ((string_drop s2764_0 ((string_length "l")))) of
+ s2765_0 =>
+ (case ((size_mnemonic_matches_prefix s2765_0)) of
+ SOME ((size1, s2766_0)) =>
+ (case ((string_drop s2765_0 s2766_0)) of
+ s2767_0 =>
+ (case ((maybe_u_matches_prefix s2767_0)) of
+ SOME ((is_unsigned, s2768_0)) =>
+ (case ((string_drop s2767_0 s2768_0)) of
+ s2769_0 =>
+ (case ((maybe_aq_matches_prefix s2769_0)) of
+ SOME ((aq, s2770_0)) =>
+ (case ((string_drop s2769_0 s2770_0)) of
+ s2771_0 =>
+ (case ((maybe_rl_matches_prefix s2771_0)) of
+ SOME ((rl, s2772_0)) =>
+ (case ((string_drop s2771_0 s2772_0)) of
+ s2773_0 =>
+ (case ((spc_matches_prefix0 s2773_0)) of
+ SOME ((() , s2774_0)) =>
+ (case ((string_drop s2773_0 s2774_0)) of
+ s2775_0 =>
+ (case ((reg_name_matches_prefix s2775_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2776_0)) =>
+ (case ((string_drop s2775_0 s2776_0)) of
+ s2777_0 =>
+ (case ((sep_matches_prefix s2777_0)) of
+ SOME ((() , s2778_0)) =>
+ (case ((string_drop s2777_0 s2778_0)) of
+ s2779_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2779_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1812_0)) =>
- (case ((string_drop s1811_0 s1812_0)) of
- s1813_0 =>
- (case ((opt_spc_matches_prefix0 s1813_0)) of
- SOME ((() , s1814_0)) =>
- let s1815_0 = (string_drop s1813_0 s1814_0) in
- if ((string_startswith s1815_0 "(")) then
- (case ((string_drop s1815_0 ((string_length "(")))) of
- s1816_0 =>
- (case ((opt_spc_matches_prefix0 s1816_0)) of
- SOME ((() , s1817_0)) =>
- (case ((string_drop s1816_0 s1817_0)) of
- s1818_0 =>
- (case ((reg_name_matches_prefix s1818_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1819_0)) =>
- (case ((string_drop s1818_0 s1819_0)) of
- s1820_0 =>
- (case ((opt_spc_matches_prefix0 s1820_0)) of
- SOME ((() , s1821_0)) =>
- let s1822_0 = (string_drop s1820_0 s1821_0) in
- if ((string_startswith s1822_0 ")")) then
- let p0_ = (string_drop s1822_0 ((string_length ")"))) in
+ SOME ((imm, s2780_0)) =>
+ (case ((string_drop s2779_0 s2780_0)) of
+ s2781_0 =>
+ (case ((opt_spc_matches_prefix0 s2781_0)) of
+ SOME ((() , s2782_0)) =>
+ let s2783_0 = (string_drop s2781_0 s2782_0) in
+ if ((string_startswith s2783_0 "(")) then
+ (case ((string_drop s2783_0 ((string_length "(")))) of
+ s2784_0 =>
+ (case ((opt_spc_matches_prefix0 s2784_0)) of
+ SOME ((() , s2785_0)) =>
+ (case ((string_drop s2784_0 s2785_0)) of
+ s2786_0 =>
+ (case ((reg_name_matches_prefix s2786_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2787_0)) =>
+ (case ((string_drop s2786_0 s2787_0)) of
+ s2788_0 =>
+ (case ((opt_spc_matches_prefix0 s2788_0)) of
+ SOME ((() , s2789_0)) =>
+ let s2790_0 = (string_drop s2788_0 s2789_0) in
+ if ((string_startswith s2790_0 ")")) then
+ let p0_ = (string_drop s2790_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, is_unsigned, aq, rl, rd, imm, rs1)
else NONE else NONE
| _ => NONE
@@ -30260,39 +41895,39 @@ val _ = Define `
else NONE))`;
-(*val _s1777_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2745_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1777_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s1778_0=
- ((case s1778_0 of
- s1779_0 =>
- (case ((rtype_mnemonic_matches_prefix s1779_0)) of
- SOME ((op, s1780_0)) =>
- (case ((string_drop s1779_0 s1780_0)) of
- s1781_0 =>
- (case ((spc_matches_prefix0 s1781_0)) of
- SOME ((() , s1782_0)) =>
- (case ((string_drop s1781_0 s1782_0)) of
- s1783_0 =>
- (case ((reg_name_matches_prefix s1783_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1784_0)) =>
- (case ((string_drop s1783_0 s1784_0)) of
- s1785_0 =>
- (case ((sep_matches_prefix s1785_0)) of
- SOME ((() , s1786_0)) =>
- (case ((string_drop s1785_0 s1786_0)) of
- s1787_0 =>
- (case ((reg_name_matches_prefix s1787_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1788_0)) =>
- (case ((string_drop s1787_0 s1788_0)) of
- s1789_0 =>
- (case ((sep_matches_prefix s1789_0)) of
- SOME ((() , s1790_0)) =>
- (case ((string_drop s1789_0 s1790_0)) of
- s1791_0 =>
- (case ((reg_name_matches_prefix s1791_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1792_0)) =>
- let p0_ = (string_drop s1791_0 s1792_0) in
+ ((s2745_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s2746_0=
+ ((case s2746_0 of
+ s2747_0 =>
+ (case ((rtype_mnemonic_matches_prefix s2747_0)) of
+ SOME ((op, s2748_0)) =>
+ (case ((string_drop s2747_0 s2748_0)) of
+ s2749_0 =>
+ (case ((spc_matches_prefix0 s2749_0)) of
+ SOME ((() , s2750_0)) =>
+ (case ((string_drop s2749_0 s2750_0)) of
+ s2751_0 =>
+ (case ((reg_name_matches_prefix s2751_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2752_0)) =>
+ (case ((string_drop s2751_0 s2752_0)) of
+ s2753_0 =>
+ (case ((sep_matches_prefix s2753_0)) of
+ SOME ((() , s2754_0)) =>
+ (case ((string_drop s2753_0 s2754_0)) of
+ s2755_0 =>
+ (case ((reg_name_matches_prefix s2755_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2756_0)) =>
+ (case ((string_drop s2755_0 s2756_0)) of
+ s2757_0 =>
+ (case ((sep_matches_prefix s2757_0)) of
+ SOME ((() , s2758_0)) =>
+ (case ((string_drop s2757_0 s2758_0)) of
+ s2759_0 =>
+ (case ((reg_name_matches_prefix s2759_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2760_0)) =>
+ let p0_ = (string_drop s2759_0 s2760_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -30317,41 +41952,41 @@ val _ = Define `
)))`;
-(*val _s1760_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
-
-val _ = Define `
- ((s1760_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s1761_0=
- ((case s1761_0 of
- s1762_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s1762_0)) of
- SOME ((op, s1763_0)) =>
- (case ((string_drop s1762_0 s1763_0)) of
- s1764_0 =>
- (case ((spc_matches_prefix0 s1764_0)) of
- SOME ((() , s1765_0)) =>
- (case ((string_drop s1764_0 s1765_0)) of
- s1766_0 =>
- (case ((reg_name_matches_prefix s1766_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1767_0)) =>
- (case ((string_drop s1766_0 s1767_0)) of
- s1768_0 =>
- (case ((sep_matches_prefix s1768_0)) of
- SOME ((() , s1769_0)) =>
- (case ((string_drop s1768_0 s1769_0)) of
- s1770_0 =>
- (case ((reg_name_matches_prefix s1770_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1771_0)) =>
- (case ((string_drop s1770_0 s1771_0)) of
- s1772_0 =>
- (case ((sep_matches_prefix s1772_0)) of
- SOME ((() , s1773_0)) =>
- (case ((string_drop s1772_0 s1773_0)) of
- s1774_0 =>
+(*val _s2728_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2728_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s2729_0=
+ ((case s2729_0 of
+ s2730_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s2730_0)) of
+ SOME ((op, s2731_0)) =>
+ (case ((string_drop s2730_0 s2731_0)) of
+ s2732_0 =>
+ (case ((spc_matches_prefix0 s2732_0)) of
+ SOME ((() , s2733_0)) =>
+ (case ((string_drop s2732_0 s2733_0)) of
+ s2734_0 =>
+ (case ((reg_name_matches_prefix s2734_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2735_0)) =>
+ (case ((string_drop s2734_0 s2735_0)) of
+ s2736_0 =>
+ (case ((sep_matches_prefix s2736_0)) of
+ SOME ((() , s2737_0)) =>
+ (case ((string_drop s2736_0 s2737_0)) of
+ s2738_0 =>
+ (case ((reg_name_matches_prefix s2738_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2739_0)) =>
+ (case ((string_drop s2738_0 s2739_0)) of
+ s2740_0 =>
+ (case ((sep_matches_prefix s2740_0)) of
+ SOME ((() , s2741_0)) =>
+ (case ((string_drop s2740_0 s2741_0)) of
+ s2742_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1774_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1775_0)) =>
- let p0_ = (string_drop s1774_0 s1775_0) in
+ s2742_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s2743_0)) =>
+ let p0_ = (string_drop s2742_0 s2743_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -30376,41 +42011,40 @@ val _ = Define `
)))`;
-(*val _s1743_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s1743_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s1744_0=
- ((case s1744_0 of
- s1745_0 =>
- (case ((itype_mnemonic_matches_prefix s1745_0)) of
- SOME ((op, s1746_0)) =>
- (case ((string_drop s1745_0 s1746_0)) of
- s1747_0 =>
- (case ((spc_matches_prefix0 s1747_0)) of
- SOME ((() , s1748_0)) =>
- (case ((string_drop s1747_0 s1748_0)) of
- s1749_0 =>
- (case ((reg_name_matches_prefix s1749_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1750_0)) =>
- (case ((string_drop s1749_0 s1750_0)) of
- s1751_0 =>
- (case ((sep_matches_prefix s1751_0)) of
- SOME ((() , s1752_0)) =>
- (case ((string_drop s1751_0 s1752_0)) of
- s1753_0 =>
- (case ((reg_name_matches_prefix s1753_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1754_0)) =>
- (case ((string_drop s1753_0 s1754_0)) of
- s1755_0 =>
- (case ((sep_matches_prefix s1755_0)) of
- SOME ((() , s1756_0)) =>
- (case ((string_drop s1755_0 s1756_0)) of
- s1757_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1757_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s1758_0)) =>
- let p0_ = (string_drop s1757_0 s1758_0) in
+(*val _s2711_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s2711_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s2712_0=
+ ((case s2712_0 of
+ s2713_0 =>
+ (case ((itype_mnemonic_matches_prefix s2713_0)) of
+ SOME ((op, s2714_0)) =>
+ (case ((string_drop s2713_0 s2714_0)) of
+ s2715_0 =>
+ (case ((spc_matches_prefix0 s2715_0)) of
+ SOME ((() , s2716_0)) =>
+ (case ((string_drop s2715_0 s2716_0)) of
+ s2717_0 =>
+ (case ((reg_name_matches_prefix s2717_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2718_0)) =>
+ (case ((string_drop s2717_0 s2718_0)) of
+ s2719_0 =>
+ (case ((sep_matches_prefix s2719_0)) of
+ SOME ((() , s2720_0)) =>
+ (case ((string_drop s2719_0 s2720_0)) of
+ s2721_0 =>
+ (case ((reg_name_matches_prefix s2721_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2722_0)) =>
+ (case ((string_drop s2721_0 s2722_0)) of
+ s2723_0 =>
+ (case ((sep_matches_prefix s2723_0)) of
+ SOME ((() , s2724_0)) =>
+ (case ((string_drop s2723_0 s2724_0)) of
+ s2725_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2725_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2726_0)) =>
+ let p0_ = (string_drop s2725_0 s2726_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30435,41 +42069,41 @@ val _ = Define `
)))`;
-(*val _s1726_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
-
-val _ = Define `
- ((s1726_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s1727_0=
- ((case s1727_0 of
- s1728_0 =>
- (case ((btype_mnemonic_matches_prefix s1728_0)) of
- SOME ((op, s1729_0)) =>
- (case ((string_drop s1728_0 s1729_0)) of
- s1730_0 =>
- (case ((spc_matches_prefix0 s1730_0)) of
- SOME ((() , s1731_0)) =>
- (case ((string_drop s1730_0 s1731_0)) of
- s1732_0 =>
- (case ((reg_name_matches_prefix s1732_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1733_0)) =>
- (case ((string_drop s1732_0 s1733_0)) of
- s1734_0 =>
- (case ((sep_matches_prefix s1734_0)) of
- SOME ((() , s1735_0)) =>
- (case ((string_drop s1734_0 s1735_0)) of
- s1736_0 =>
- (case ((reg_name_matches_prefix s1736_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1737_0)) =>
- (case ((string_drop s1736_0 s1737_0)) of
- s1738_0 =>
- (case ((sep_matches_prefix s1738_0)) of
- SOME ((() , s1739_0)) =>
- (case ((string_drop s1738_0 s1739_0)) of
- s1740_0 =>
+(*val _s2694_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
+
+val _ = Define `
+ ((s2694_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s2695_0=
+ ((case s2695_0 of
+ s2696_0 =>
+ (case ((btype_mnemonic_matches_prefix s2696_0)) of
+ SOME ((op, s2697_0)) =>
+ (case ((string_drop s2696_0 s2697_0)) of
+ s2698_0 =>
+ (case ((spc_matches_prefix0 s2698_0)) of
+ SOME ((() , s2699_0)) =>
+ (case ((string_drop s2698_0 s2699_0)) of
+ s2700_0 =>
+ (case ((reg_name_matches_prefix s2700_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2701_0)) =>
+ (case ((string_drop s2700_0 s2701_0)) of
+ s2702_0 =>
+ (case ((sep_matches_prefix s2702_0)) of
+ SOME ((() , s2703_0)) =>
+ (case ((string_drop s2702_0 s2703_0)) of
+ s2704_0 =>
+ (case ((reg_name_matches_prefix s2704_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2705_0)) =>
+ (case ((string_drop s2704_0 s2705_0)) of
+ s2706_0 =>
+ (case ((sep_matches_prefix s2706_0)) of
+ SOME ((() , s2707_0)) =>
+ (case ((string_drop s2706_0 s2707_0)) of
+ s2708_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1740_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s1741_0)) =>
- let p0_ = (string_drop s1740_0 s1741_0) in
+ s2708_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s2709_0)) =>
+ let p0_ = (string_drop s2708_0 s2709_0) in
if (((p0_ = ""))) then SOME (op, rs1, rs2, imm) else NONE
| _ => NONE
)
@@ -30494,39 +42128,38 @@ val _ = Define `
)))`;
-(*val _s1710_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+(*val _s2678_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
val _ = Define `
- ((s1710_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1711_0=
- (let s1712_0 = s1711_0 in
- if ((string_startswith s1712_0 "jalr")) then
- (case ((string_drop s1712_0 ((string_length "jalr")))) of
- s1713_0 =>
- (case ((spc_matches_prefix0 s1713_0)) of
- SOME ((() , s1714_0)) =>
- (case ((string_drop s1713_0 s1714_0)) of
- s1715_0 =>
- (case ((reg_name_matches_prefix s1715_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1716_0)) =>
- (case ((string_drop s1715_0 s1716_0)) of
- s1717_0 =>
- (case ((sep_matches_prefix s1717_0)) of
- SOME ((() , s1718_0)) =>
- (case ((string_drop s1717_0 s1718_0)) of
- s1719_0 =>
- (case ((reg_name_matches_prefix s1719_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1720_0)) =>
- (case ((string_drop s1719_0 s1720_0)) of
- s1721_0 =>
- (case ((sep_matches_prefix s1721_0)) of
- SOME ((() , s1722_0)) =>
- (case ((string_drop s1721_0 s1722_0)) of
- s1723_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1723_0
+ ((s2678_:string ->((5)words$word#(5)words$word#(12)words$word)option) s2679_0=
+ (let s2680_0 = s2679_0 in
+ if ((string_startswith s2680_0 "jalr")) then
+ (case ((string_drop s2680_0 ((string_length "jalr")))) of
+ s2681_0 =>
+ (case ((spc_matches_prefix0 s2681_0)) of
+ SOME ((() , s2682_0)) =>
+ (case ((string_drop s2681_0 s2682_0)) of
+ s2683_0 =>
+ (case ((reg_name_matches_prefix s2683_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2684_0)) =>
+ (case ((string_drop s2683_0 s2684_0)) of
+ s2685_0 =>
+ (case ((sep_matches_prefix s2685_0)) of
+ SOME ((() , s2686_0)) =>
+ (case ((string_drop s2685_0 s2686_0)) of
+ s2687_0 =>
+ (case ((reg_name_matches_prefix s2687_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2688_0)) =>
+ (case ((string_drop s2687_0 s2688_0)) of
+ s2689_0 =>
+ (case ((sep_matches_prefix s2689_0)) of
+ SOME ((() , s2690_0)) =>
+ (case ((string_drop s2689_0 s2690_0)) of
+ s2691_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2691_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1724_0)) =>
- let p0_ = (string_drop s1723_0 s1724_0) in
+ SOME ((imm, s2692_0)) =>
+ let p0_ = (string_drop s2691_0 s2692_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30549,30 +42182,30 @@ val _ = Define `
else NONE))`;
-(*val _s1698_ : string -> maybe ((mword ty5 * mword ty21))*)
+(*val _s2666_ : string -> maybe ((mword ty5 * mword ty21))*)
val _ = Define `
- ((s1698_:string ->((5)words$word#(21)words$word)option) s1699_0=
- (let s1700_0 = s1699_0 in
- if ((string_startswith s1700_0 "jal")) then
- (case ((string_drop s1700_0 ((string_length "jal")))) of
- s1701_0 =>
- (case ((spc_matches_prefix0 s1701_0)) of
- SOME ((() , s1702_0)) =>
- (case ((string_drop s1701_0 s1702_0)) of
- s1703_0 =>
- (case ((reg_name_matches_prefix s1703_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1704_0)) =>
- (case ((string_drop s1703_0 s1704_0)) of
- s1705_0 =>
- (case ((sep_matches_prefix s1705_0)) of
- SOME ((() , s1706_0)) =>
- (case ((string_drop s1705_0 s1706_0)) of
- s1707_0 =>
+ ((s2666_:string ->((5)words$word#(21)words$word)option) s2667_0=
+ (let s2668_0 = s2667_0 in
+ if ((string_startswith s2668_0 "jal")) then
+ (case ((string_drop s2668_0 ((string_length "jal")))) of
+ s2669_0 =>
+ (case ((spc_matches_prefix0 s2669_0)) of
+ SOME ((() , s2670_0)) =>
+ (case ((string_drop s2669_0 s2670_0)) of
+ s2671_0 =>
+ (case ((reg_name_matches_prefix s2671_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2672_0)) =>
+ (case ((string_drop s2671_0 s2672_0)) of
+ s2673_0 =>
+ (case ((sep_matches_prefix s2673_0)) of
+ SOME ((() , s2674_0)) =>
+ (case ((string_drop s2673_0 s2674_0)) of
+ s2675_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1707_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s1708_0)) =>
- let p0_ = (string_drop s1707_0 s1708_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2675_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s2676_0)) =>
+ let p0_ = (string_drop s2675_0 s2676_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -30589,33 +42222,33 @@ val _ = Define `
else NONE))`;
-(*val _s1685_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
+(*val _s2653_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
val _ = Define `
- ((s1685_:string ->(uop#(5)words$word#(20)words$word)option) s1686_0=
- ((case s1686_0 of
- s1687_0 =>
- (case ((utype_mnemonic_matches_prefix s1687_0)) of
- SOME ((op, s1688_0)) =>
- (case ((string_drop s1687_0 s1688_0)) of
- s1689_0 =>
- (case ((spc_matches_prefix0 s1689_0)) of
- SOME ((() , s1690_0)) =>
- (case ((string_drop s1689_0 s1690_0)) of
- s1691_0 =>
- (case ((reg_name_matches_prefix s1691_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1692_0)) =>
- (case ((string_drop s1691_0 s1692_0)) of
- s1693_0 =>
- (case ((sep_matches_prefix s1693_0)) of
- SOME ((() , s1694_0)) =>
- (case ((string_drop s1693_0 s1694_0)) of
- s1695_0 =>
+ ((s2653_:string ->(uop#(5)words$word#(20)words$word)option) s2654_0=
+ ((case s2654_0 of
+ s2655_0 =>
+ (case ((utype_mnemonic_matches_prefix s2655_0)) of
+ SOME ((op, s2656_0)) =>
+ (case ((string_drop s2655_0 s2656_0)) of
+ s2657_0 =>
+ (case ((spc_matches_prefix0 s2657_0)) of
+ SOME ((() , s2658_0)) =>
+ (case ((string_drop s2657_0 s2658_0)) of
+ s2659_0 =>
+ (case ((reg_name_matches_prefix s2659_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2660_0)) =>
+ (case ((string_drop s2659_0 s2660_0)) of
+ s2661_0 =>
+ (case ((sep_matches_prefix s2661_0)) of
+ SOME ((() , s2662_0)) =>
+ (case ((string_drop s2661_0 s2662_0)) of
+ s2663_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1695_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s1696_0)) =>
- let p0_ = (string_drop s1695_0 s1696_0) in
+ s2663_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s2664_0)) =>
+ let p0_ = (string_drop s2663_0 s2664_0) in
if (((p0_ = ""))) then SOME (op, rd, imm) else NONE
| _ => NONE
)
@@ -30636,475 +42269,760 @@ val _ = Define `
val _ = Define `
((assembly_backwards_matches:string -> bool) arg_=
- (let s1697_0 = arg_ in
- if ((case ((s1685_ s1697_0 : ((uop # 5 words$word # 20 words$word))option)) of
+ (let s2665_0 = arg_ in
+ if ((case ((s2653_ s2665_0 : ((uop # 5 words$word # 20 words$word))option)) of
SOME ((op, rd, imm)) => T
| _ => F
- )) then (case (s1685_ s1697_0 : (( uop # 5 words$word # 20 words$word)) option) of
+ )) then (case (s2653_ s2665_0 : (( uop # 5 words$word # 20 words$word)) option) of
(SOME ((op, rd, imm))) =>
T
)
- else if ((case ((s1698_ s1697_0 : (( 5 words$word # 21 words$word))option)) of
+ else if ((case ((s2666_ s2665_0 : (( 5 words$word # 21 words$word))option)) of
SOME ((rd, imm)) => T
| _ => F
- )) then (case (s1698_ s1697_0 : (( 5 words$word # 21 words$word)) option) of
+ )) then (case (s2666_ s2665_0 : (( 5 words$word # 21 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s1710_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s2678_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => T
| _ => F
- )) then (case (s1710_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s2678_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
T
)
- else if ((case ((s1726_ s1697_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
+ else if ((case ((s2694_ s2665_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
SOME ((op, rs1, rs2, imm)) => T
| _ => F
)) then (case
- (s1726_ s1697_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
+ (s2694_ s2665_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
(SOME ((op, rs1, rs2, imm))) =>
T
)
- else if ((case ((s1743_ s1697_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s2711_ s2665_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((op, rd, rs1, imm)) => T
| _ => F
)) then (case
- (s1743_ s1697_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
+ (s2711_ s2665_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((op, rd, rs1, imm))) =>
T
)
- else if ((case ((s1760_ s1697_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
+ else if ((case ((s2728_ s2665_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => T
| _ => F
)) then (case
- (s1760_ s1697_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
+ (s2728_ s2665_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1777_ s1697_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2745_ s2665_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1777_ s1697_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2745_ s2665_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1794_ s1697_0
+ else if ((case ((s2762_ s2665_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1)) => T
| _ => F
)) then (case
- (s1794_ s1697_0
+ (s2762_ s2665_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1))) =>
T
)
- else if ((case ((s1824_ s1697_0
+ else if ((case ((s2792_ s2665_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1)) => T
| _ => F
)) then (case
- (s1824_ s1697_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (s2792_ s2665_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1))) =>
T
)
- else if ((case ((s1852_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s2820_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1852_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s2820_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
T
)
- else if ((case ((s1868_ s1697_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2836_ s2665_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1868_ s1697_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2836_ s2665_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1885_ s1697_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2853_ s2665_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1885_ s1697_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2853_ s2665_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1902_ s1697_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2870_ s2665_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1902_ s1697_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2870_ s2665_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1919_ s1697_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s2887_ s2665_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1919_ s1697_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s2887_ s2665_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
T
)
- else if ((case ((s1931_ s1697_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s2899_ s2665_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1931_ s1697_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s2899_ s2665_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
T
)
- else if (((s1697_0 = "fence.i"))) then T
- else if (((s1697_0 = "ecall"))) then T
- else if (((s1697_0 = "mret"))) then T
- else if (((s1697_0 = "sret"))) then T
- else if (((s1697_0 = "ebreak"))) then T
- else if (((s1697_0 = "wfi"))) then T
- else if ((case ((s1943_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
+ else if (((s2665_0 = "fence.i"))) then T
+ else if (((s2665_0 = "ecall"))) then T
+ else if (((s2665_0 = "mret"))) then T
+ else if (((s2665_0 = "sret"))) then T
+ else if (((s2665_0 = "ebreak"))) then T
+ else if (((s2665_0 = "wfi"))) then T
+ else if ((case ((s2911_ s2665_0 : (( 5 words$word # 5 words$word))option)) of
SOME ((rs1, rs2)) => T
| _ => F
- )) then (case (s1943_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s2911_ s2665_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rs1, rs2))) =>
T
)
- else if ((case ((s1955_ s1697_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2923_ s2665_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1)) => T
| _ => F
)) then (case
- (s1955_ s1697_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
+ (s2923_ s2665_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1))) =>
T
)
- else if ((case ((s1973_ s1697_0
+ else if ((case ((s2941_ s2665_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1973_ s1697_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2941_ s2665_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1995_ s1697_0
+ else if ((case ((s2963_ s2665_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1)) => T
| _ => F
)) then (case
- (s1995_ s1697_0
+ (s2963_ s2665_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1))) =>
T
)
- else if (((s1697_0 = "c.nop"))) then T
- else if ((case ((s2019_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
- SOME ((rdc, nzimm)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if (((s2665_0 = "c.nop"))) then T
+ else if ((case ((s2989_ s2665_0 : (( 3 words$word # 8 words$word))option)) of
+ SOME ((rdc, nzimm)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s2019_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s2989_ s2665_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rdc, nzimm))) =>
T
)
- else if ((case ((s2031_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3001_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => T
| _ => F
)) then (case
- (s2031_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3001_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
T
)
- else if ((case ((s2047_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3017_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2047_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3017_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
T
)
- else if ((case ((s2063_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3033_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => T
| _ => F
)) then (case
- (s2063_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3033_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
T
)
- else if ((case ((s2079_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3049_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2079_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3049_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
T
)
- else if ((case ((s2095_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, nzi)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s3065_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, nzi)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2095_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3065_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, nzi))) =>
T
)
- else if ((case ((s2107_ s1697_0 : ( 11 words$word)option)) of
+ else if ((case ((s3077_ s2665_0 : ( 11 words$word)option)) of
SOME (imm) => ((( 32 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s2107_ s1697_0 : ( 11 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2115_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ )) then (case (s3077_ s2665_0 : ( 11 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3085_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2115_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3085_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
T
)
- else if ((case ((s2127_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, imm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3097_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => (rd <> zreg)
| _ => F
- )) then (case (s2127_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3097_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s2139_ s1697_0 : ( 6 words$word)option)) of
- SOME (imm) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3109_ s2665_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2139_ s1697_0 : ( 6 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2147_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ )) then (case (s3109_ s2665_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3117_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, imm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s2147_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3117_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s2159_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3129_ s2665_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2159_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3129_ s2665_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2171_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3141_ s2665_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2171_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3141_ s2665_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2183_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
+ else if ((case ((s3153_ s2665_0 : (( 3 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => T
| _ => F
- )) then (case (s2183_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3153_ s2665_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
T
)
- else if ((case ((s2195_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3165_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2195_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3165_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2207_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3177_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2207_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3177_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2219_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3189_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2219_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3189_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2231_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3201_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2231_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3201_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2243_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3213_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2243_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3213_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2255_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3225_ s2665_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2255_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3225_ s2665_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2267_ s1697_0 : ( 11 words$word)option)) of
+ else if ((case ((s3237_ s2665_0 : ( 11 words$word)option)) of
SOME (imm) => T
| _ => F
- )) then (case (s2267_ s1697_0 : ( 11 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2275_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
+ )) then (case (s3237_ s2665_0 : ( 11 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3245_ s2665_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s2275_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s3245_ s2665_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
T
)
- else if ((case ((s2287_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s3257_ s2665_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s2287_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s3257_ s2665_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
T
)
- else if ((case ((s2299_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s3269_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2299_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3269_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2311_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3281_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (rd <> zreg)
| _ => F
- )) then (case (s2311_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3281_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2323_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s3293_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s2323_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3293_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2335_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s3305_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, uimm)) => T
| _ => F
- )) then (case (s2335_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3305_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2347_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s3317_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rs2, uimm)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2347_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3317_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rs2, uimm))) =>
T
)
- else if ((case ((s2359_ s1697_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3329_ s2665_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s2359_ s1697_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
- else if ((case ((s2367_ s1697_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ )) then (case (s3329_ s2665_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
+ else if ((case ((s3337_ s2665_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s2367_ s1697_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
- else if ((case ((s2375_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rd, rs2)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ )) then (case (s3337_ s2665_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
+ else if ((case ((s3345_ s2665_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rd, rs2)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s2375_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s3345_ s2665_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs2))) =>
T
)
- else if (((s1697_0 = "c.ebreak"))) then T
- else if ((case ((s2387_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rsd, rs2)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if (((s2665_0 = "c.ebreak"))) then T
+ else if ((case ((s3357_ s2665_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rsd, rs2)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s2387_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s3357_ s2665_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2399_ s1697_0
+ else if ((case ((s3369_ s2665_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2399_ s1697_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3369_ s2665_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2416_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3386_ s2665_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2416_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3386_ s2665_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2434_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3404_ s2665_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2434_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3404_ s2665_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2452_ s1697_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3422_ s2665_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2452_ s1697_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
+ )) then (case (s3422_ s2665_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs1, rs2))) =>
T
)
- else if ((case ((s2468_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3438_ s2665_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2468_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3438_ s2665_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2487_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3457_ s2665_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2487_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3457_ s2665_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2506_ s1697_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s3476_ s2665_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3476_ s2665_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
+ T
+ )
+ else if ((case ((s3494_ s2665_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3494_ s2665_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
+ T
+ )
+ else if (((s2665_0 = "uret"))) then T
+ else if ((case ((s3511_ s2665_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s3511_ s2665_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3517_ s2665_0 : ( 5 words$word)option)) of
+ SOME (rsd) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s3517_ s2665_0 : ( 5 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s3523_ s2665_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s3523_ s2665_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3529_ s2665_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s3529_ s2665_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3535_ s2665_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s3535_ s2665_0 : ( 5 words$word) option) of (SOME (rs2)) => T )
+ else if ((case ((s3541_ s2665_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s3541_ s2665_0 : ( 5 words$word) option) of (SOME (rs2)) => T )
+ else if ((case ((s3547_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s3547_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rsd, shamt))) =>
+ T
+ )
+ else if ((case ((s3556_ s2665_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s3556_ s2665_0 : ( 3 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s3562_ s2665_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s3562_ s2665_0 : ( 3 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s3568_ s2665_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word))option)) of
+ SOME ((pred, succ, rs, rd, fm)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s3568_ s2665_0 : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word)) option) of
+ (SOME ((pred, succ, rs, rd, fm))) =>
+ T
+ )
+ else if ((case ((s3586_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ SOME ((rd, rs, imm)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case (s3586_ s2665_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ (SOME ((rd, rs, imm))) =>
+ T
+ )
+ else if ((case ((s3598_ s2665_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rd, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3598_ s2665_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rd, imm, rs1))) =>
+ T
+ )
+ else if ((case ((s3622_ s2665_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rs2, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3622_ s2665_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rs2, imm, rs1))) =>
+ T
+ )
+ else if ((case ((s3646_ s2665_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s3646_ s2665_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ T
+ )
+ else if ((case ((s3671_ s2665_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s3671_ s2665_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ T
+ )
+ else if ((case ((s3692_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3692_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3709_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3709_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3726_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3726_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3743_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3743_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3760_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3760_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3777_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3777_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3794_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3794_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3811_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3811_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3828_ s2665_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s3828_ s2665_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s3845_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3845_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3862_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3862_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3879_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3879_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3896_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3896_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3913_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3913_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3930_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2506_ s1697_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s3930_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2524_ s1697_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s3947_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_S, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2524_ s1697_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s3947_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2))) =>
T
)
- else if (((s1697_0 = "uret"))) then T
- else if ((case ((s2541_ s1697_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s2541_ s1697_0 : ( 32 words$word) option) of (SOME (s)) => T )
- else if ((case ((s2549_ s1697_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s2549_ s1697_0 : ( 16 words$word) option) of (SOME (s)) => T )
+ else if ((case ((s3964_ s2665_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3964_ s2665_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s3981_ s2665_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_W, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3981_ s2665_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_W, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s3994_ s2665_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_W_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3994_ s2665_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_W_X, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s4007_ s2665_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_S, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4007_ s2665_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_S, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s4020_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s4020_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, imm))) =>
+ T
+ )
+ else if ((case ((s4032_ s2665_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s4032_ s2665_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ T
+ )
+ else if ((case ((s4044_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s4044_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ T
+ )
+ else if ((case ((s4060_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s4060_ s2665_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ T
+ )
+ else if ((case ((s4076_ s2665_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s4076_ s2665_0 : ( 32 words$word) option) of (SOME (s)) => T )
+ else if ((case ((s4084_ s2665_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s4084_ s2665_0 : ( 16 words$word) option) of (SOME (s)) => T )
else F))`;
-(*val assembly_matches_prefix : string -> maybe ((ast * ii))*)
-
-(*val _s3457_ : string -> maybe ((mword ty16 * string))*)
+(*val _s5559_ : string -> maybe ((mword ty16 * string))*)
val _ = Define `
- ((s3457_:string ->((16)words$word#string)option) s3458_0=
- (let s3459_0 = s3458_0 in
- if ((string_startswith s3459_0 "c.illegal")) then
- (case ((string_drop s3459_0 ((string_length "c.illegal")))) of
- s3460_0 =>
- (case ((spc_matches_prefix0 s3460_0)) of
- SOME ((() , s3461_0)) =>
- (case ((string_drop s3460_0 s3461_0)) of
- s3462_0 =>
+ ((s5559_:string ->((16)words$word#string)option) s5560_0=
+ (let s5561_0 = s5560_0 in
+ if ((string_startswith s5561_0 "c.illegal")) then
+ (case ((string_drop s5561_0 ((string_length "c.illegal")))) of
+ s5562_0 =>
+ (case ((spc_matches_prefix0 s5562_0)) of
+ SOME ((() , s5563_0)) =>
+ (case ((string_drop s5562_0 s5563_0)) of
+ s5564_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3462_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s3463_0)) =>
- (case ((string_drop s3462_0 s3463_0)) of s_ => SOME (s, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5564_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s5565_0)) =>
+ (case ((string_drop s5564_0 s5565_0)) of s_ => SOME (s, s_) )
| _ => NONE
)
)
@@ -31114,22 +43032,22 @@ val _ = Define `
else NONE))`;
-(*val _s3449_ : string -> maybe ((mword ty32 * string))*)
+(*val _s5551_ : string -> maybe ((mword ty32 * string))*)
val _ = Define `
- ((s3449_:string ->((32)words$word#string)option) s3450_0=
- (let s3451_0 = s3450_0 in
- if ((string_startswith s3451_0 "illegal")) then
- (case ((string_drop s3451_0 ((string_length "illegal")))) of
- s3452_0 =>
- (case ((spc_matches_prefix0 s3452_0)) of
- SOME ((() , s3453_0)) =>
- (case ((string_drop s3452_0 s3453_0)) of
- s3454_0 =>
+ ((s5551_:string ->((32)words$word#string)option) s5552_0=
+ (let s5553_0 = s5552_0 in
+ if ((string_startswith s5553_0 "illegal")) then
+ (case ((string_drop s5553_0 ((string_length "illegal")))) of
+ s5554_0 =>
+ (case ((spc_matches_prefix0 s5554_0)) of
+ SOME ((() , s5555_0)) =>
+ (case ((string_drop s5554_0 s5555_0)) of
+ s5556_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3454_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s3455_0)) =>
- (case ((string_drop s3454_0 s3455_0)) of s_ => SOME (s, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5556_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s5557_0)) =>
+ (case ((string_drop s5556_0 s5557_0)) of s_ => SOME (s, s_) )
| _ => NONE
)
)
@@ -31139,51 +43057,1461 @@ val _ = Define `
else NONE))`;
-(*val _s3445_ : string -> maybe string*)
+(*val _s5535_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s3445_:string ->(string)option) s3446_0=
- (let s3447_0 = s3446_0 in
- if ((string_startswith s3447_0 "uret")) then
- (case ((string_drop s3447_0 ((string_length "uret")))) of s_ => SOME s_ )
+ ((s5535_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5536_0=
+ (let s5537_0 = s5536_0 in
+ if ((string_startswith s5537_0 "c.fsw")) then
+ (case ((string_drop s5537_0 ((string_length "c.fsw")))) of
+ s5538_0 =>
+ (case ((spc_matches_prefix0 s5538_0)) of
+ SOME ((() , s5539_0)) =>
+ (case ((string_drop s5538_0 s5539_0)) of
+ s5540_0 =>
+ (case ((creg_name_matches_prefix s5540_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s5541_0)) =>
+ (case ((string_drop s5540_0 s5541_0)) of
+ s5542_0 =>
+ (case ((sep_matches_prefix s5542_0)) of
+ SOME ((() , s5543_0)) =>
+ (case ((string_drop s5542_0 s5543_0)) of
+ s5544_0 =>
+ (case ((creg_name_matches_prefix s5544_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s5545_0)) =>
+ (case ((string_drop s5544_0 s5545_0)) of
+ s5546_0 =>
+ (case ((sep_matches_prefix s5546_0)) of
+ SOME ((() , s5547_0)) =>
+ (case ((string_drop s5546_0 s5547_0)) of
+ s5548_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5548_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1212, s5549_0)) =>
+ if (((((subrange_vec_dec v__1212 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1212 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1212 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5548_0 s5549_0)) of
+ s_ => SOME (rsc1, rsc2, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
else NONE))`;
-(*val _s3428_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12 * string))*)
+(*val _s5519_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s3428_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word#string)option) s3429_0=
- ((case s3429_0 of
- s3430_0 =>
- (case ((csr_mnemonic_matches_prefix s3430_0)) of
- SOME ((op, s3431_0)) =>
- (case ((string_drop s3430_0 s3431_0)) of
- s3432_0 =>
- (case ((spc_matches_prefix0 s3432_0)) of
- SOME ((() , s3433_0)) =>
- (case ((string_drop s3432_0 s3433_0)) of
- s3434_0 =>
- (case ((reg_name_matches_prefix s3434_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3435_0)) =>
- (case ((string_drop s3434_0 s3435_0)) of
- s3436_0 =>
- (case ((sep_matches_prefix s3436_0)) of
- SOME ((() , s3437_0)) =>
- (case ((string_drop s3436_0 s3437_0)) of
- s3438_0 =>
- (case ((reg_name_matches_prefix s3438_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3439_0)) =>
- (case ((string_drop s3438_0 s3439_0)) of
- s3440_0 =>
- (case ((sep_matches_prefix s3440_0)) of
- SOME ((() , s3441_0)) =>
- (case ((string_drop s3440_0 s3441_0)) of
- s3442_0 =>
- (case ((csr_name_map_matches_prefix s3442_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s3443_0)) =>
- (case ((string_drop s3442_0 s3443_0)) of
- s_ => SOME (op, rd, rs1, csr, s_)
+ ((s5519_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5520_0=
+ (let s5521_0 = s5520_0 in
+ if ((string_startswith s5521_0 "c.flw")) then
+ (case ((string_drop s5521_0 ((string_length "c.flw")))) of
+ s5522_0 =>
+ (case ((spc_matches_prefix0 s5522_0)) of
+ SOME ((() , s5523_0)) =>
+ (case ((string_drop s5522_0 s5523_0)) of
+ s5524_0 =>
+ (case ((creg_name_matches_prefix s5524_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s5525_0)) =>
+ (case ((string_drop s5524_0 s5525_0)) of
+ s5526_0 =>
+ (case ((sep_matches_prefix s5526_0)) of
+ SOME ((() , s5527_0)) =>
+ (case ((string_drop s5526_0 s5527_0)) of
+ s5528_0 =>
+ (case ((creg_name_matches_prefix s5528_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s5529_0)) =>
+ (case ((string_drop s5528_0 s5529_0)) of
+ s5530_0 =>
+ (case ((sep_matches_prefix s5530_0)) of
+ SOME ((() , s5531_0)) =>
+ (case ((string_drop s5530_0 s5531_0)) of
+ s5532_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5532_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1214, s5533_0)) =>
+ if (((((subrange_vec_dec v__1214 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1214 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1214 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5532_0 s5533_0)) of
+ s_ => SOME (rdc, rsc, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5507_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s5507_:string ->((5)words$word#(6)words$word#string)option) s5508_0=
+ (let s5509_0 = s5508_0 in
+ if ((string_startswith s5509_0 "c.fswsp")) then
+ (case ((string_drop s5509_0 ((string_length "c.fswsp")))) of
+ s5510_0 =>
+ (case ((spc_matches_prefix0 s5510_0)) of
+ SOME ((() , s5511_0)) =>
+ (case ((string_drop s5510_0 s5511_0)) of
+ s5512_0 =>
+ (case ((reg_name_matches_prefix s5512_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5513_0)) =>
+ (case ((string_drop s5512_0 s5513_0)) of
+ s5514_0 =>
+ (case ((sep_matches_prefix s5514_0)) of
+ SOME ((() , s5515_0)) =>
+ (case ((string_drop s5514_0 s5515_0)) of
+ s5516_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5516_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5517_0)) =>
+ (case ((string_drop s5516_0 s5517_0)) of s_ => SOME (rd, uimm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5495_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s5495_:string ->((5)words$word#(6)words$word#string)option) s5496_0=
+ (let s5497_0 = s5496_0 in
+ if ((string_startswith s5497_0 "c.flwsp")) then
+ (case ((string_drop s5497_0 ((string_length "c.flwsp")))) of
+ s5498_0 =>
+ (case ((spc_matches_prefix0 s5498_0)) of
+ SOME ((() , s5499_0)) =>
+ (case ((string_drop s5498_0 s5499_0)) of
+ s5500_0 =>
+ (case ((reg_name_matches_prefix s5500_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5501_0)) =>
+ (case ((string_drop s5500_0 s5501_0)) of
+ s5502_0 =>
+ (case ((sep_matches_prefix s5502_0)) of
+ SOME ((() , s5503_0)) =>
+ (case ((string_drop s5502_0 s5503_0)) of
+ s5504_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5504_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5505_0)) =>
+ (case ((string_drop s5504_0 s5505_0)) of s_ => SOME (rd, imm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5482_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5482_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s5483_0=
+ ((case s5483_0 of
+ s5484_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s5484_0)) of
+ SOME ((FCLASS_S, s5485_0)) =>
+ (case ((string_drop s5484_0 s5485_0)) of
+ s5486_0 =>
+ (case ((spc_matches_prefix0 s5486_0)) of
+ SOME ((() , s5487_0)) =>
+ (case ((string_drop s5486_0 s5487_0)) of
+ s5488_0 =>
+ (case ((reg_name_matches_prefix s5488_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5489_0)) =>
+ (case ((string_drop s5488_0 s5489_0)) of
+ s5490_0 =>
+ (case ((sep_matches_prefix s5490_0)) of
+ SOME ((() , s5491_0)) =>
+ (case ((string_drop s5490_0 s5491_0)) of
+ s5492_0 =>
+ (case ((freg_name_matches_prefix s5492_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5493_0)) =>
+ (case ((string_drop s5492_0 s5493_0)) of
+ s_ => SOME (FCLASS_S, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5469_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5469_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s5470_0=
+ ((case s5470_0 of
+ s5471_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s5471_0)) of
+ SOME ((FMV_W_X, s5472_0)) =>
+ (case ((string_drop s5471_0 s5472_0)) of
+ s5473_0 =>
+ (case ((spc_matches_prefix0 s5473_0)) of
+ SOME ((() , s5474_0)) =>
+ (case ((string_drop s5473_0 s5474_0)) of
+ s5475_0 =>
+ (case ((freg_name_matches_prefix s5475_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5476_0)) =>
+ (case ((string_drop s5475_0 s5476_0)) of
+ s5477_0 =>
+ (case ((sep_matches_prefix s5477_0)) of
+ SOME ((() , s5478_0)) =>
+ (case ((string_drop s5477_0 s5478_0)) of
+ s5479_0 =>
+ (case ((reg_name_matches_prefix s5479_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5480_0)) =>
+ (case ((string_drop s5479_0 s5480_0)) of
+ s_ => SOME (FMV_W_X, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5456_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5456_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s5457_0=
+ ((case s5457_0 of
+ s5458_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s5458_0)) of
+ SOME ((FMV_X_W, s5459_0)) =>
+ (case ((string_drop s5458_0 s5459_0)) of
+ s5460_0 =>
+ (case ((spc_matches_prefix0 s5460_0)) of
+ SOME ((() , s5461_0)) =>
+ (case ((string_drop s5460_0 s5461_0)) of
+ s5462_0 =>
+ (case ((reg_name_matches_prefix s5462_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5463_0)) =>
+ (case ((string_drop s5462_0 s5463_0)) of
+ s5464_0 =>
+ (case ((sep_matches_prefix s5464_0)) of
+ SOME ((() , s5465_0)) =>
+ (case ((string_drop s5464_0 s5465_0)) of
+ s5466_0 =>
+ (case ((freg_name_matches_prefix s5466_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5467_0)) =>
+ (case ((string_drop s5466_0 s5467_0)) of
+ s_ => SOME (FMV_X_W, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5439_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5439_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5440_0=
+ ((case s5440_0 of
+ s5441_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5441_0)) of
+ SOME ((FLE_S, s5442_0)) =>
+ (case ((string_drop s5441_0 s5442_0)) of
+ s5443_0 =>
+ (case ((spc_matches_prefix0 s5443_0)) of
+ SOME ((() , s5444_0)) =>
+ (case ((string_drop s5443_0 s5444_0)) of
+ s5445_0 =>
+ (case ((reg_name_matches_prefix s5445_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5446_0)) =>
+ (case ((string_drop s5445_0 s5446_0)) of
+ s5447_0 =>
+ (case ((sep_matches_prefix s5447_0)) of
+ SOME ((() , s5448_0)) =>
+ (case ((string_drop s5447_0 s5448_0)) of
+ s5449_0 =>
+ (case ((freg_name_matches_prefix s5449_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5450_0)) =>
+ (case ((string_drop s5449_0 s5450_0)) of
+ s5451_0 =>
+ (case ((sep_matches_prefix s5451_0)) of
+ SOME ((() , s5452_0)) =>
+ (case ((string_drop s5451_0 s5452_0)) of
+ s5453_0 =>
+ (case ((freg_name_matches_prefix s5453_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5454_0)) =>
+ (case ((string_drop s5453_0 s5454_0)) of
+ s_ => SOME (FLE_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5422_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5422_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5423_0=
+ ((case s5423_0 of
+ s5424_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5424_0)) of
+ SOME ((FLT_S, s5425_0)) =>
+ (case ((string_drop s5424_0 s5425_0)) of
+ s5426_0 =>
+ (case ((spc_matches_prefix0 s5426_0)) of
+ SOME ((() , s5427_0)) =>
+ (case ((string_drop s5426_0 s5427_0)) of
+ s5428_0 =>
+ (case ((reg_name_matches_prefix s5428_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5429_0)) =>
+ (case ((string_drop s5428_0 s5429_0)) of
+ s5430_0 =>
+ (case ((sep_matches_prefix s5430_0)) of
+ SOME ((() , s5431_0)) =>
+ (case ((string_drop s5430_0 s5431_0)) of
+ s5432_0 =>
+ (case ((freg_name_matches_prefix s5432_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5433_0)) =>
+ (case ((string_drop s5432_0 s5433_0)) of
+ s5434_0 =>
+ (case ((sep_matches_prefix s5434_0)) of
+ SOME ((() , s5435_0)) =>
+ (case ((string_drop s5434_0 s5435_0)) of
+ s5436_0 =>
+ (case ((freg_name_matches_prefix s5436_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5437_0)) =>
+ (case ((string_drop s5436_0 s5437_0)) of
+ s_ => SOME (FLT_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5405_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5405_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5406_0=
+ ((case s5406_0 of
+ s5407_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5407_0)) of
+ SOME ((FEQ_S, s5408_0)) =>
+ (case ((string_drop s5407_0 s5408_0)) of
+ s5409_0 =>
+ (case ((spc_matches_prefix0 s5409_0)) of
+ SOME ((() , s5410_0)) =>
+ (case ((string_drop s5409_0 s5410_0)) of
+ s5411_0 =>
+ (case ((reg_name_matches_prefix s5411_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5412_0)) =>
+ (case ((string_drop s5411_0 s5412_0)) of
+ s5413_0 =>
+ (case ((sep_matches_prefix s5413_0)) of
+ SOME ((() , s5414_0)) =>
+ (case ((string_drop s5413_0 s5414_0)) of
+ s5415_0 =>
+ (case ((freg_name_matches_prefix s5415_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5416_0)) =>
+ (case ((string_drop s5415_0 s5416_0)) of
+ s5417_0 =>
+ (case ((sep_matches_prefix s5417_0)) of
+ SOME ((() , s5418_0)) =>
+ (case ((string_drop s5417_0 s5418_0)) of
+ s5419_0 =>
+ (case ((freg_name_matches_prefix s5419_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5420_0)) =>
+ (case ((string_drop s5419_0 s5420_0)) of
+ s_ => SOME (FEQ_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5388_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5388_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5389_0=
+ ((case s5389_0 of
+ s5390_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5390_0)) of
+ SOME ((FMAX_S, s5391_0)) =>
+ (case ((string_drop s5390_0 s5391_0)) of
+ s5392_0 =>
+ (case ((spc_matches_prefix0 s5392_0)) of
+ SOME ((() , s5393_0)) =>
+ (case ((string_drop s5392_0 s5393_0)) of
+ s5394_0 =>
+ (case ((freg_name_matches_prefix s5394_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5395_0)) =>
+ (case ((string_drop s5394_0 s5395_0)) of
+ s5396_0 =>
+ (case ((sep_matches_prefix s5396_0)) of
+ SOME ((() , s5397_0)) =>
+ (case ((string_drop s5396_0 s5397_0)) of
+ s5398_0 =>
+ (case ((freg_name_matches_prefix s5398_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5399_0)) =>
+ (case ((string_drop s5398_0 s5399_0)) of
+ s5400_0 =>
+ (case ((sep_matches_prefix s5400_0)) of
+ SOME ((() , s5401_0)) =>
+ (case ((string_drop s5400_0 s5401_0)) of
+ s5402_0 =>
+ (case ((freg_name_matches_prefix s5402_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5403_0)) =>
+ (case ((string_drop s5402_0 s5403_0)) of
+ s_ => SOME (FMAX_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5371_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5371_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5372_0=
+ ((case s5372_0 of
+ s5373_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5373_0)) of
+ SOME ((FMIN_S, s5374_0)) =>
+ (case ((string_drop s5373_0 s5374_0)) of
+ s5375_0 =>
+ (case ((spc_matches_prefix0 s5375_0)) of
+ SOME ((() , s5376_0)) =>
+ (case ((string_drop s5375_0 s5376_0)) of
+ s5377_0 =>
+ (case ((freg_name_matches_prefix s5377_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5378_0)) =>
+ (case ((string_drop s5377_0 s5378_0)) of
+ s5379_0 =>
+ (case ((sep_matches_prefix s5379_0)) of
+ SOME ((() , s5380_0)) =>
+ (case ((string_drop s5379_0 s5380_0)) of
+ s5381_0 =>
+ (case ((freg_name_matches_prefix s5381_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5382_0)) =>
+ (case ((string_drop s5381_0 s5382_0)) of
+ s5383_0 =>
+ (case ((sep_matches_prefix s5383_0)) of
+ SOME ((() , s5384_0)) =>
+ (case ((string_drop s5383_0 s5384_0)) of
+ s5385_0 =>
+ (case ((freg_name_matches_prefix s5385_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5386_0)) =>
+ (case ((string_drop s5385_0 s5386_0)) of
+ s_ => SOME (FMIN_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5354_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5354_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5355_0=
+ ((case s5355_0 of
+ s5356_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5356_0)) of
+ SOME ((FSGNJX_S, s5357_0)) =>
+ (case ((string_drop s5356_0 s5357_0)) of
+ s5358_0 =>
+ (case ((spc_matches_prefix0 s5358_0)) of
+ SOME ((() , s5359_0)) =>
+ (case ((string_drop s5358_0 s5359_0)) of
+ s5360_0 =>
+ (case ((freg_name_matches_prefix s5360_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5361_0)) =>
+ (case ((string_drop s5360_0 s5361_0)) of
+ s5362_0 =>
+ (case ((sep_matches_prefix s5362_0)) of
+ SOME ((() , s5363_0)) =>
+ (case ((string_drop s5362_0 s5363_0)) of
+ s5364_0 =>
+ (case ((freg_name_matches_prefix s5364_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5365_0)) =>
+ (case ((string_drop s5364_0 s5365_0)) of
+ s5366_0 =>
+ (case ((sep_matches_prefix s5366_0)) of
+ SOME ((() , s5367_0)) =>
+ (case ((string_drop s5366_0 s5367_0)) of
+ s5368_0 =>
+ (case ((freg_name_matches_prefix s5368_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5369_0)) =>
+ (case ((string_drop s5368_0 s5369_0)) of
+ s_ => SOME (FSGNJX_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5337_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5337_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5338_0=
+ ((case s5338_0 of
+ s5339_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5339_0)) of
+ SOME ((FSGNJN_S, s5340_0)) =>
+ (case ((string_drop s5339_0 s5340_0)) of
+ s5341_0 =>
+ (case ((spc_matches_prefix0 s5341_0)) of
+ SOME ((() , s5342_0)) =>
+ (case ((string_drop s5341_0 s5342_0)) of
+ s5343_0 =>
+ (case ((freg_name_matches_prefix s5343_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5344_0)) =>
+ (case ((string_drop s5343_0 s5344_0)) of
+ s5345_0 =>
+ (case ((sep_matches_prefix s5345_0)) of
+ SOME ((() , s5346_0)) =>
+ (case ((string_drop s5345_0 s5346_0)) of
+ s5347_0 =>
+ (case ((freg_name_matches_prefix s5347_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5348_0)) =>
+ (case ((string_drop s5347_0 s5348_0)) of
+ s5349_0 =>
+ (case ((sep_matches_prefix s5349_0)) of
+ SOME ((() , s5350_0)) =>
+ (case ((string_drop s5349_0 s5350_0)) of
+ s5351_0 =>
+ (case ((freg_name_matches_prefix s5351_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5352_0)) =>
+ (case ((string_drop s5351_0 s5352_0)) of
+ s_ => SOME (FSGNJN_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5320_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5320_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s5321_0=
+ ((case s5321_0 of
+ s5322_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s5322_0)) of
+ SOME ((FSGNJ_S, s5323_0)) =>
+ (case ((string_drop s5322_0 s5323_0)) of
+ s5324_0 =>
+ (case ((spc_matches_prefix0 s5324_0)) of
+ SOME ((() , s5325_0)) =>
+ (case ((string_drop s5324_0 s5325_0)) of
+ s5326_0 =>
+ (case ((freg_name_matches_prefix s5326_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5327_0)) =>
+ (case ((string_drop s5326_0 s5327_0)) of
+ s5328_0 =>
+ (case ((sep_matches_prefix s5328_0)) of
+ SOME ((() , s5329_0)) =>
+ (case ((string_drop s5328_0 s5329_0)) of
+ s5330_0 =>
+ (case ((freg_name_matches_prefix s5330_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5331_0)) =>
+ (case ((string_drop s5330_0 s5331_0)) of
+ s5332_0 =>
+ (case ((sep_matches_prefix s5332_0)) of
+ SOME ((() , s5333_0)) =>
+ (case ((string_drop s5332_0 s5333_0)) of
+ s5334_0 =>
+ (case ((freg_name_matches_prefix s5334_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5335_0)) =>
+ (case ((string_drop s5334_0 s5335_0)) of
+ s_ => SOME (FSGNJ_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5303_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5303_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5304_0=
+ ((case s5304_0 of
+ s5305_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5305_0)) of
+ SOME ((FCVT_S_LU, s5306_0)) =>
+ (case ((string_drop s5305_0 s5306_0)) of
+ s5307_0 =>
+ (case ((spc_matches_prefix0 s5307_0)) of
+ SOME ((() , s5308_0)) =>
+ (case ((string_drop s5307_0 s5308_0)) of
+ s5309_0 =>
+ (case ((freg_name_matches_prefix s5309_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5310_0)) =>
+ (case ((string_drop s5309_0 s5310_0)) of
+ s5311_0 =>
+ (case ((sep_matches_prefix s5311_0)) of
+ SOME ((() , s5312_0)) =>
+ (case ((string_drop s5311_0 s5312_0)) of
+ s5313_0 =>
+ (case ((reg_name_matches_prefix s5313_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5314_0)) =>
+ (case ((string_drop s5313_0 s5314_0)) of
+ s5315_0 =>
+ (case ((sep_matches_prefix s5315_0)) of
+ SOME ((() , s5316_0)) =>
+ (case ((string_drop s5315_0 s5316_0)) of
+ s5317_0 =>
+ (case ((frm_mnemonic_matches_prefix s5317_0)) of
+ SOME ((rm, s5318_0)) =>
+ (case ((string_drop s5317_0 s5318_0)) of
+ s_ => SOME (FCVT_S_LU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5286_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5286_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5287_0=
+ ((case s5287_0 of
+ s5288_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5288_0)) of
+ SOME ((FCVT_S_L, s5289_0)) =>
+ (case ((string_drop s5288_0 s5289_0)) of
+ s5290_0 =>
+ (case ((spc_matches_prefix0 s5290_0)) of
+ SOME ((() , s5291_0)) =>
+ (case ((string_drop s5290_0 s5291_0)) of
+ s5292_0 =>
+ (case ((freg_name_matches_prefix s5292_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5293_0)) =>
+ (case ((string_drop s5292_0 s5293_0)) of
+ s5294_0 =>
+ (case ((sep_matches_prefix s5294_0)) of
+ SOME ((() , s5295_0)) =>
+ (case ((string_drop s5294_0 s5295_0)) of
+ s5296_0 =>
+ (case ((reg_name_matches_prefix s5296_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5297_0)) =>
+ (case ((string_drop s5296_0 s5297_0)) of
+ s5298_0 =>
+ (case ((sep_matches_prefix s5298_0)) of
+ SOME ((() , s5299_0)) =>
+ (case ((string_drop s5298_0 s5299_0)) of
+ s5300_0 =>
+ (case ((frm_mnemonic_matches_prefix s5300_0)) of
+ SOME ((rm, s5301_0)) =>
+ (case ((string_drop s5300_0 s5301_0)) of
+ s_ => SOME (FCVT_S_L, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5269_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5269_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5270_0=
+ ((case s5270_0 of
+ s5271_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5271_0)) of
+ SOME ((FCVT_LU_S, s5272_0)) =>
+ (case ((string_drop s5271_0 s5272_0)) of
+ s5273_0 =>
+ (case ((spc_matches_prefix0 s5273_0)) of
+ SOME ((() , s5274_0)) =>
+ (case ((string_drop s5273_0 s5274_0)) of
+ s5275_0 =>
+ (case ((reg_name_matches_prefix s5275_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5276_0)) =>
+ (case ((string_drop s5275_0 s5276_0)) of
+ s5277_0 =>
+ (case ((sep_matches_prefix s5277_0)) of
+ SOME ((() , s5278_0)) =>
+ (case ((string_drop s5277_0 s5278_0)) of
+ s5279_0 =>
+ (case ((freg_name_matches_prefix s5279_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5280_0)) =>
+ (case ((string_drop s5279_0 s5280_0)) of
+ s5281_0 =>
+ (case ((sep_matches_prefix s5281_0)) of
+ SOME ((() , s5282_0)) =>
+ (case ((string_drop s5281_0 s5282_0)) of
+ s5283_0 =>
+ (case ((frm_mnemonic_matches_prefix s5283_0)) of
+ SOME ((rm, s5284_0)) =>
+ (case ((string_drop s5283_0 s5284_0)) of
+ s_ => SOME (FCVT_LU_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5252_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5252_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5253_0=
+ ((case s5253_0 of
+ s5254_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5254_0)) of
+ SOME ((FCVT_L_S, s5255_0)) =>
+ (case ((string_drop s5254_0 s5255_0)) of
+ s5256_0 =>
+ (case ((spc_matches_prefix0 s5256_0)) of
+ SOME ((() , s5257_0)) =>
+ (case ((string_drop s5256_0 s5257_0)) of
+ s5258_0 =>
+ (case ((reg_name_matches_prefix s5258_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5259_0)) =>
+ (case ((string_drop s5258_0 s5259_0)) of
+ s5260_0 =>
+ (case ((sep_matches_prefix s5260_0)) of
+ SOME ((() , s5261_0)) =>
+ (case ((string_drop s5260_0 s5261_0)) of
+ s5262_0 =>
+ (case ((freg_name_matches_prefix s5262_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5263_0)) =>
+ (case ((string_drop s5262_0 s5263_0)) of
+ s5264_0 =>
+ (case ((sep_matches_prefix s5264_0)) of
+ SOME ((() , s5265_0)) =>
+ (case ((string_drop s5264_0 s5265_0)) of
+ s5266_0 =>
+ (case ((frm_mnemonic_matches_prefix s5266_0)) of
+ SOME ((rm, s5267_0)) =>
+ (case ((string_drop s5266_0 s5267_0)) of
+ s_ => SOME (FCVT_L_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5235_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5235_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5236_0=
+ ((case s5236_0 of
+ s5237_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5237_0)) of
+ SOME ((FCVT_S_WU, s5238_0)) =>
+ (case ((string_drop s5237_0 s5238_0)) of
+ s5239_0 =>
+ (case ((spc_matches_prefix0 s5239_0)) of
+ SOME ((() , s5240_0)) =>
+ (case ((string_drop s5239_0 s5240_0)) of
+ s5241_0 =>
+ (case ((freg_name_matches_prefix s5241_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5242_0)) =>
+ (case ((string_drop s5241_0 s5242_0)) of
+ s5243_0 =>
+ (case ((sep_matches_prefix s5243_0)) of
+ SOME ((() , s5244_0)) =>
+ (case ((string_drop s5243_0 s5244_0)) of
+ s5245_0 =>
+ (case ((reg_name_matches_prefix s5245_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5246_0)) =>
+ (case ((string_drop s5245_0 s5246_0)) of
+ s5247_0 =>
+ (case ((sep_matches_prefix s5247_0)) of
+ SOME ((() , s5248_0)) =>
+ (case ((string_drop s5247_0 s5248_0)) of
+ s5249_0 =>
+ (case ((frm_mnemonic_matches_prefix s5249_0)) of
+ SOME ((rm, s5250_0)) =>
+ (case ((string_drop s5249_0 s5250_0)) of
+ s_ => SOME (FCVT_S_WU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5218_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5218_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5219_0=
+ ((case s5219_0 of
+ s5220_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5220_0)) of
+ SOME ((FCVT_S_W, s5221_0)) =>
+ (case ((string_drop s5220_0 s5221_0)) of
+ s5222_0 =>
+ (case ((spc_matches_prefix0 s5222_0)) of
+ SOME ((() , s5223_0)) =>
+ (case ((string_drop s5222_0 s5223_0)) of
+ s5224_0 =>
+ (case ((freg_name_matches_prefix s5224_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5225_0)) =>
+ (case ((string_drop s5224_0 s5225_0)) of
+ s5226_0 =>
+ (case ((sep_matches_prefix s5226_0)) of
+ SOME ((() , s5227_0)) =>
+ (case ((string_drop s5226_0 s5227_0)) of
+ s5228_0 =>
+ (case ((reg_name_matches_prefix s5228_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5229_0)) =>
+ (case ((string_drop s5228_0 s5229_0)) of
+ s5230_0 =>
+ (case ((sep_matches_prefix s5230_0)) of
+ SOME ((() , s5231_0)) =>
+ (case ((string_drop s5230_0 s5231_0)) of
+ s5232_0 =>
+ (case ((frm_mnemonic_matches_prefix s5232_0)) of
+ SOME ((rm, s5233_0)) =>
+ (case ((string_drop s5232_0 s5233_0)) of
+ s_ => SOME (FCVT_S_W, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5201_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5201_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5202_0=
+ ((case s5202_0 of
+ s5203_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5203_0)) of
+ SOME ((FCVT_WU_S, s5204_0)) =>
+ (case ((string_drop s5203_0 s5204_0)) of
+ s5205_0 =>
+ (case ((spc_matches_prefix0 s5205_0)) of
+ SOME ((() , s5206_0)) =>
+ (case ((string_drop s5205_0 s5206_0)) of
+ s5207_0 =>
+ (case ((reg_name_matches_prefix s5207_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5208_0)) =>
+ (case ((string_drop s5207_0 s5208_0)) of
+ s5209_0 =>
+ (case ((sep_matches_prefix s5209_0)) of
+ SOME ((() , s5210_0)) =>
+ (case ((string_drop s5209_0 s5210_0)) of
+ s5211_0 =>
+ (case ((freg_name_matches_prefix s5211_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5212_0)) =>
+ (case ((string_drop s5211_0 s5212_0)) of
+ s5213_0 =>
+ (case ((sep_matches_prefix s5213_0)) of
+ SOME ((() , s5214_0)) =>
+ (case ((string_drop s5213_0 s5214_0)) of
+ s5215_0 =>
+ (case ((frm_mnemonic_matches_prefix s5215_0)) of
+ SOME ((rm, s5216_0)) =>
+ (case ((string_drop s5215_0 s5216_0)) of
+ s_ => SOME (FCVT_WU_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5184_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5184_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5185_0=
+ ((case s5185_0 of
+ s5186_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5186_0)) of
+ SOME ((FCVT_W_S, s5187_0)) =>
+ (case ((string_drop s5186_0 s5187_0)) of
+ s5188_0 =>
+ (case ((spc_matches_prefix0 s5188_0)) of
+ SOME ((() , s5189_0)) =>
+ (case ((string_drop s5188_0 s5189_0)) of
+ s5190_0 =>
+ (case ((reg_name_matches_prefix s5190_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5191_0)) =>
+ (case ((string_drop s5190_0 s5191_0)) of
+ s5192_0 =>
+ (case ((sep_matches_prefix s5192_0)) of
+ SOME ((() , s5193_0)) =>
+ (case ((string_drop s5192_0 s5193_0)) of
+ s5194_0 =>
+ (case ((freg_name_matches_prefix s5194_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5195_0)) =>
+ (case ((string_drop s5194_0 s5195_0)) of
+ s5196_0 =>
+ (case ((sep_matches_prefix s5196_0)) of
+ SOME ((() , s5197_0)) =>
+ (case ((string_drop s5196_0 s5197_0)) of
+ s5198_0 =>
+ (case ((frm_mnemonic_matches_prefix s5198_0)) of
+ SOME ((rm, s5199_0)) =>
+ (case ((string_drop s5198_0 s5199_0)) of
+ s_ => SOME (FCVT_W_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5167_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5167_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s5168_0=
+ ((case s5168_0 of
+ s5169_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s5169_0)) of
+ SOME ((FSQRT_S, s5170_0)) =>
+ (case ((string_drop s5169_0 s5170_0)) of
+ s5171_0 =>
+ (case ((spc_matches_prefix0 s5171_0)) of
+ SOME ((() , s5172_0)) =>
+ (case ((string_drop s5171_0 s5172_0)) of
+ s5173_0 =>
+ (case ((freg_name_matches_prefix s5173_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5174_0)) =>
+ (case ((string_drop s5173_0 s5174_0)) of
+ s5175_0 =>
+ (case ((sep_matches_prefix s5175_0)) of
+ SOME ((() , s5176_0)) =>
+ (case ((string_drop s5175_0 s5176_0)) of
+ s5177_0 =>
+ (case ((freg_name_matches_prefix s5177_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5178_0)) =>
+ (case ((string_drop s5177_0 s5178_0)) of
+ s5179_0 =>
+ (case ((sep_matches_prefix s5179_0)) of
+ SOME ((() , s5180_0)) =>
+ (case ((string_drop s5179_0 s5180_0)) of
+ s5181_0 =>
+ (case ((frm_mnemonic_matches_prefix s5181_0)) of
+ SOME ((rm, s5182_0)) =>
+ (case ((string_drop s5181_0 s5182_0)) of
+ s_ => SOME (FSQRT_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5146_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5146_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s5147_0=
+ ((case s5147_0 of
+ s5148_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s5148_0)) of
+ SOME ((op, s5149_0)) =>
+ (case ((string_drop s5148_0 s5149_0)) of
+ s5150_0 =>
+ (case ((spc_matches_prefix0 s5150_0)) of
+ SOME ((() , s5151_0)) =>
+ (case ((string_drop s5150_0 s5151_0)) of
+ s5152_0 =>
+ (case ((freg_name_matches_prefix s5152_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5153_0)) =>
+ (case ((string_drop s5152_0 s5153_0)) of
+ s5154_0 =>
+ (case ((sep_matches_prefix s5154_0)) of
+ SOME ((() , s5155_0)) =>
+ (case ((string_drop s5154_0 s5155_0)) of
+ s5156_0 =>
+ (case ((freg_name_matches_prefix s5156_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5157_0)) =>
+ (case ((string_drop s5156_0 s5157_0)) of
+ s5158_0 =>
+ (case ((sep_matches_prefix s5158_0)) of
+ SOME ((() , s5159_0)) =>
+ (case ((string_drop s5158_0 s5159_0)) of
+ s5160_0 =>
+ (case ((freg_name_matches_prefix s5160_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5161_0)) =>
+ (case ((string_drop s5160_0 s5161_0)) of
+ s5162_0 =>
+ (case ((sep_matches_prefix s5162_0)) of
+ SOME ((() , s5163_0)) =>
+ (case ((string_drop s5162_0 s5163_0)) of
+ s5164_0 =>
+ (case ((frm_mnemonic_matches_prefix s5164_0)) of
+ SOME ((rm, s5165_0)) =>
+ (case ((string_drop s5164_0 s5165_0)) of
+ s_ => SOME (op, rd, rs1, rs2, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5121_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s5121_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s5122_0=
+ ((case s5122_0 of
+ s5123_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s5123_0)) of
+ SOME ((op, s5124_0)) =>
+ (case ((string_drop s5123_0 s5124_0)) of
+ s5125_0 =>
+ (case ((spc_matches_prefix0 s5125_0)) of
+ SOME ((() , s5126_0)) =>
+ (case ((string_drop s5125_0 s5126_0)) of
+ s5127_0 =>
+ (case ((freg_name_matches_prefix s5127_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5128_0)) =>
+ (case ((string_drop s5127_0 s5128_0)) of
+ s5129_0 =>
+ (case ((sep_matches_prefix s5129_0)) of
+ SOME ((() , s5130_0)) =>
+ (case ((string_drop s5129_0 s5130_0)) of
+ s5131_0 =>
+ (case ((freg_name_matches_prefix s5131_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5132_0)) =>
+ (case ((string_drop s5131_0 s5132_0)) of
+ s5133_0 =>
+ (case ((sep_matches_prefix s5133_0)) of
+ SOME ((() , s5134_0)) =>
+ (case ((string_drop s5133_0 s5134_0)) of
+ s5135_0 =>
+ (case ((freg_name_matches_prefix s5135_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5136_0)) =>
+ (case ((string_drop s5135_0 s5136_0)) of
+ s5137_0 =>
+ (case ((sep_matches_prefix s5137_0)) of
+ SOME ((() , s5138_0)) =>
+ (case ((string_drop s5137_0 s5138_0)) of
+ s5139_0 =>
+ (case ((freg_name_matches_prefix s5139_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s5140_0)) =>
+ (case ((string_drop s5139_0 s5140_0)) of
+ s5141_0 =>
+ (case ((sep_matches_prefix s5141_0)) of
+ SOME ((() , s5142_0)) =>
+ (case ((string_drop s5141_0 s5142_0)) of
+ s5143_0 =>
+ (case ((frm_mnemonic_matches_prefix s5143_0)) of
+ SOME ((rm, s5144_0)) =>
+ (case ((string_drop s5143_0 s5144_0)) of
+ s_ =>
+ SOME (op, rd, rs1, rs2, rs3, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
)
| _ => NONE
)
@@ -31208,45 +44536,537 @@ val _ = Define `
)))`;
-(*val _s3410_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12 * string))*)
+(*val _s5097_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5097_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word#string)option) s5098_0=
+ (let s5099_0 = s5098_0 in
+ if ((string_startswith s5099_0 "fs")) then
+ (case ((string_drop s5099_0 ((string_length "fs")))) of
+ s5100_0 =>
+ (case ((size_mnemonic_matches_prefix s5100_0)) of
+ SOME ((width, s5101_0)) =>
+ (case ((string_drop s5100_0 s5101_0)) of
+ s5102_0 =>
+ (case ((spc_matches_prefix0 s5102_0)) of
+ SOME ((() , s5103_0)) =>
+ (case ((string_drop s5102_0 s5103_0)) of
+ s5104_0 =>
+ (case ((freg_name_matches_prefix s5104_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5105_0)) =>
+ (case ((string_drop s5104_0 s5105_0)) of
+ s5106_0 =>
+ (case ((sep_matches_prefix s5106_0)) of
+ SOME ((() , s5107_0)) =>
+ (case ((string_drop s5106_0 s5107_0)) of
+ s5108_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5108_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s5109_0)) =>
+ (case ((string_drop s5108_0 s5109_0)) of
+ s5110_0 =>
+ (case ((opt_spc_matches_prefix0 s5110_0)) of
+ SOME ((() , s5111_0)) =>
+ let s5112_0 = (string_drop s5110_0 s5111_0) in
+ if ((string_startswith s5112_0 "(")) then
+ (case ((string_drop s5112_0 ((string_length "(")))) of
+ s5113_0 =>
+ (case ((opt_spc_matches_prefix0 s5113_0)) of
+ SOME ((() , s5114_0)) =>
+ (case ((string_drop s5113_0 s5114_0)) of
+ s5115_0 =>
+ (case ((reg_name_matches_prefix s5115_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5116_0)) =>
+ (case ((string_drop s5115_0 s5116_0)) of
+ s5117_0 =>
+ (case ((opt_spc_matches_prefix0 s5117_0)) of
+ SOME ((() , s5118_0)) =>
+ let s5119_0 = (string_drop s5117_0 s5118_0) in
+ if ((string_startswith s5119_0 ")")) then
+ (case ((string_drop s5119_0 ((string_length ")")))) of
+ s_ =>
+ SOME (width, rs2, imm, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5073_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5073_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word#string)option) s5074_0=
+ (let s5075_0 = s5074_0 in
+ if ((string_startswith s5075_0 "fl")) then
+ (case ((string_drop s5075_0 ((string_length "fl")))) of
+ s5076_0 =>
+ (case ((size_mnemonic_matches_prefix s5076_0)) of
+ SOME ((width, s5077_0)) =>
+ (case ((string_drop s5076_0 s5077_0)) of
+ s5078_0 =>
+ (case ((spc_matches_prefix0 s5078_0)) of
+ SOME ((() , s5079_0)) =>
+ (case ((string_drop s5078_0 s5079_0)) of
+ s5080_0 =>
+ (case ((freg_name_matches_prefix s5080_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5081_0)) =>
+ (case ((string_drop s5080_0 s5081_0)) of
+ s5082_0 =>
+ (case ((sep_matches_prefix s5082_0)) of
+ SOME ((() , s5083_0)) =>
+ (case ((string_drop s5082_0 s5083_0)) of
+ s5084_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5084_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s5085_0)) =>
+ (case ((string_drop s5084_0 s5085_0)) of
+ s5086_0 =>
+ (case ((opt_spc_matches_prefix0 s5086_0)) of
+ SOME ((() , s5087_0)) =>
+ let s5088_0 = (string_drop s5086_0 s5087_0) in
+ if ((string_startswith s5088_0 "(")) then
+ (case ((string_drop s5088_0 ((string_length "(")))) of
+ s5089_0 =>
+ (case ((opt_spc_matches_prefix0 s5089_0)) of
+ SOME ((() , s5090_0)) =>
+ (case ((string_drop s5089_0 s5090_0)) of
+ s5091_0 =>
+ (case ((reg_name_matches_prefix s5091_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5092_0)) =>
+ (case ((string_drop s5091_0 s5092_0)) of
+ s5093_0 =>
+ (case ((opt_spc_matches_prefix0 s5093_0)) of
+ SOME ((() , s5094_0)) =>
+ let s5095_0 = (string_drop s5093_0 s5094_0) in
+ if ((string_startswith s5095_0 ")")) then
+ (case ((string_drop s5095_0 ((string_length ")")))) of
+ s_ =>
+ SOME (width, rd, imm, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5061_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s5061_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s5062_0=
+ (let s5063_0 = s5062_0 in
+ if ((string_startswith s5063_0 "fence.i.reserved.")) then
+ (case ((string_drop s5063_0 ((string_length "fence.i.reserved.")))) of
+ s5064_0 =>
+ (case ((reg_name_matches_prefix s5064_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5065_0)) =>
+ let s5066_0 = (string_drop s5064_0 s5065_0) in
+ if ((string_startswith s5066_0 ".")) then
+ (case ((string_drop s5066_0 ((string_length ".")))) of
+ s5067_0 =>
+ (case ((reg_name_matches_prefix s5067_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s5068_0)) =>
+ let s5069_0 = (string_drop s5067_0 s5068_0) in
+ if ((string_startswith s5069_0 ".")) then
+ (case ((string_drop s5069_0 ((string_length ".")))) of
+ s5070_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5070_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s5071_0)) =>
+ (case ((string_drop s5070_0 s5071_0)) of
+ s_ => SOME (rd, rs, imm, s_)
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5043_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4 * string))*)
+
+val _ = Define `
+ ((s5043_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word#string)option) s5044_0=
+ (let s5045_0 = s5044_0 in
+ if ((string_startswith s5045_0 "fence.reserved.")) then
+ (case ((string_drop s5045_0 ((string_length "fence.reserved.")))) of
+ s5046_0 =>
+ (case ((fence_bits_matches_prefix s5046_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s5047_0)) =>
+ let s5048_0 = (string_drop s5046_0 s5047_0) in
+ if ((string_startswith s5048_0 ".")) then
+ (case ((string_drop s5048_0 ((string_length ".")))) of
+ s5049_0 =>
+ (case ((fence_bits_matches_prefix s5049_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s5050_0)) =>
+ let s5051_0 = (string_drop s5049_0 s5050_0) in
+ if ((string_startswith s5051_0 ".")) then
+ (case ((string_drop s5051_0 ((string_length ".")))) of
+ s5052_0 =>
+ (case ((reg_name_matches_prefix s5052_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s5053_0)) =>
+ let s5054_0 = (string_drop s5052_0 s5053_0) in
+ if ((string_startswith s5054_0 ".")) then
+ (case ((string_drop s5054_0 ((string_length ".")))) of
+ s5055_0 =>
+ (case ((reg_name_matches_prefix s5055_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5056_0)) =>
+ let s5057_0 = (string_drop s5055_0 s5056_0) in
+ if ((string_startswith s5057_0 ".")) then
+ (case ((string_drop s5057_0 ((string_length ".")))) of
+ s5058_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s5058_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s5059_0)) =>
+ (case ((string_drop s5058_0 s5059_0)) of
+ s_ => SOME (pred, succ, rs, rd, fm, s_)
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5037_ : string -> maybe ((mword ty3 * string))*)
+
+val _ = Define `
+ ((s5037_:string ->((3)words$word#string)option) s5038_0=
+ (let s5039_0 = s5038_0 in
+ if ((string_startswith s5039_0 "c.srai.hint.")) then
+ (case ((string_drop s5039_0 ((string_length "c.srai.hint.")))) of
+ s5040_0 =>
+ (case ((creg_name_matches_prefix s5040_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5041_0)) =>
+ (case ((string_drop s5040_0 s5041_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5031_ : string -> maybe ((mword ty3 * string))*)
+
+val _ = Define `
+ ((s5031_:string ->((3)words$word#string)option) s5032_0=
+ (let s5033_0 = s5032_0 in
+ if ((string_startswith s5033_0 "c.srli.hint.")) then
+ (case ((string_drop s5033_0 ((string_length "c.srli.hint.")))) of
+ s5034_0 =>
+ (case ((creg_name_matches_prefix s5034_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5035_0)) =>
+ (case ((string_drop s5034_0 s5035_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5022_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s5022_:string ->((5)words$word#(6)words$word#string)option) s5023_0=
+ (let s5024_0 = s5023_0 in
+ if ((string_startswith s5024_0 "c.slli.hint.")) then
+ (case ((string_drop s5024_0 ((string_length "c.slli.hint.")))) of
+ s5025_0 =>
+ (case ((reg_name_matches_prefix s5025_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s5026_0)) =>
+ let s5027_0 = (string_drop s5025_0 s5026_0) in
+ if ((string_startswith s5027_0 ".")) then
+ (case ((string_drop s5027_0 ((string_length ".")))) of
+ s5028_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s5028_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s5029_0)) =>
+ (case ((string_drop s5028_0 s5029_0)) of s_ => SOME (rsd, shamt, s_) )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5016_ : string -> maybe ((mword ty5 * string))*)
+
+val _ = Define `
+ ((s5016_:string ->((5)words$word#string)option) s5017_0=
+ (let s5018_0 = s5017_0 in
+ if ((string_startswith s5018_0 "c.add.hint.")) then
+ (case ((string_drop s5018_0 ((string_length "c.add.hint.")))) of
+ s5019_0 =>
+ (case ((reg_name_matches_prefix s5019_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5020_0)) =>
+ (case ((string_drop s5019_0 s5020_0)) of s_ => SOME (rs2, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5010_ : string -> maybe ((mword ty5 * string))*)
+
+val _ = Define `
+ ((s5010_:string ->((5)words$word#string)option) s5011_0=
+ (let s5012_0 = s5011_0 in
+ if ((string_startswith s5012_0 "c.mv.hint.")) then
+ (case ((string_drop s5012_0 ((string_length "c.mv.hint.")))) of
+ s5013_0 =>
+ (case ((reg_name_matches_prefix s5013_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5014_0)) =>
+ (case ((string_drop s5013_0 s5014_0)) of s_ => SOME (rs2, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5004_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s5004_:string ->((6)words$word#string)option) s5005_0=
+ (let s5006_0 = s5005_0 in
+ if ((string_startswith s5006_0 "c.lui.hint.")) then
+ (case ((string_drop s5006_0 ((string_length "c.lui.hint.")))) of
+ s5007_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5007_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5008_0)) =>
+ (case ((string_drop s5007_0 s5008_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4998_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s4998_:string ->((6)words$word#string)option) s4999_0=
+ (let s5000_0 = s4999_0 in
+ if ((string_startswith s5000_0 "c.li.hint.")) then
+ (case ((string_drop s5000_0 ((string_length "c.li.hint.")))) of
+ s5001_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5001_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5002_0)) =>
+ (case ((string_drop s5001_0 s5002_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4992_ : string -> maybe ((mword ty5 * string))*)
val _ = Define `
- ((s3410_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word#string)option) s3411_0=
- ((case s3411_0 of
- s3412_0 =>
- (case ((csr_mnemonic_matches_prefix s3412_0)) of
- SOME ((op, s3413_0)) =>
- let s3414_0 = (string_drop s3412_0 s3413_0) in
- if ((string_startswith s3414_0 "i")) then
- (case ((string_drop s3414_0 ((string_length "i")))) of
- s3415_0 =>
- (case ((spc_matches_prefix0 s3415_0)) of
- SOME ((() , s3416_0)) =>
- (case ((string_drop s3415_0 s3416_0)) of
- s3417_0 =>
- (case ((reg_name_matches_prefix s3417_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3418_0)) =>
- (case ((string_drop s3417_0 s3418_0)) of
- s3419_0 =>
- (case ((sep_matches_prefix s3419_0)) of
- SOME ((() , s3420_0)) =>
- (case ((string_drop s3419_0 s3420_0)) of
- s3421_0 =>
+ ((s4992_:string ->((5)words$word#string)option) s4993_0=
+ (let s4994_0 = s4993_0 in
+ if ((string_startswith s4994_0 "c.addi.hint.")) then
+ (case ((string_drop s4994_0 ((string_length "c.addi.hint.")))) of
+ s4995_0 =>
+ (case ((reg_name_matches_prefix s4995_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4996_0)) =>
+ (case ((string_drop s4995_0 s4996_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4986_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s4986_:string ->((6)words$word#string)option) s4987_0=
+ (let s4988_0 = s4987_0 in
+ if ((string_startswith s4988_0 "c.nop.hint.")) then
+ (case ((string_drop s4988_0 ((string_length "c.nop.hint.")))) of
+ s4989_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4989_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4990_0)) =>
+ (case ((string_drop s4989_0 s4990_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4982_ : string -> maybe string*)
+
+val _ = Define `
+ ((s4982_:string ->(string)option) s4983_0=
+ (let s4984_0 = s4983_0 in
+ if ((string_startswith s4984_0 "uret")) then
+ (case ((string_drop s4984_0 ((string_length "uret")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s4965_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4965_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word#string)option) s4966_0=
+ ((case s4966_0 of
+ s4967_0 =>
+ (case ((csr_mnemonic_matches_prefix s4967_0)) of
+ SOME ((op, s4968_0)) =>
+ (case ((string_drop s4967_0 s4968_0)) of
+ s4969_0 =>
+ (case ((spc_matches_prefix0 s4969_0)) of
+ SOME ((() , s4970_0)) =>
+ (case ((string_drop s4969_0 s4970_0)) of
+ s4971_0 =>
+ (case ((reg_name_matches_prefix s4971_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4972_0)) =>
+ (case ((string_drop s4971_0 s4972_0)) of
+ s4973_0 =>
+ (case ((sep_matches_prefix s4973_0)) of
+ SOME ((() , s4974_0)) =>
+ (case ((string_drop s4973_0 s4974_0)) of
+ s4975_0 =>
+ (case ((csr_name_map_matches_prefix s4975_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s4976_0)) =>
+ (case ((string_drop s4975_0 s4976_0)) of
+ s4977_0 =>
+ (case ((sep_matches_prefix s4977_0)) of
+ SOME ((() , s4978_0)) =>
+ (case ((string_drop s4977_0 s4978_0)) of
+ s4979_0 =>
+ (case ((reg_name_matches_prefix s4979_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4980_0)) =>
+ (case ((string_drop s4979_0 s4980_0)) of
+ s_ => SOME (op, rd, csr, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4947_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4947_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word#string)option) s4948_0=
+ ((case s4948_0 of
+ s4949_0 =>
+ (case ((csr_mnemonic_matches_prefix s4949_0)) of
+ SOME ((op, s4950_0)) =>
+ let s4951_0 = (string_drop s4949_0 s4950_0) in
+ if ((string_startswith s4951_0 "i")) then
+ (case ((string_drop s4951_0 ((string_length "i")))) of
+ s4952_0 =>
+ (case ((spc_matches_prefix0 s4952_0)) of
+ SOME ((() , s4953_0)) =>
+ (case ((string_drop s4952_0 s4953_0)) of
+ s4954_0 =>
+ (case ((reg_name_matches_prefix s4954_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4955_0)) =>
+ (case ((string_drop s4954_0 s4955_0)) of
+ s4956_0 =>
+ (case ((sep_matches_prefix s4956_0)) of
+ SOME ((() , s4957_0)) =>
+ (case ((string_drop s4956_0 s4957_0)) of
+ s4958_0 =>
+ (case ((csr_name_map_matches_prefix s4958_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s4959_0)) =>
+ (case ((string_drop s4958_0 s4959_0)) of
+ s4960_0 =>
+ (case ((sep_matches_prefix s4960_0)) of
+ SOME ((() , s4961_0)) =>
+ (case ((string_drop s4960_0 s4961_0)) of
+ s4962_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s3421_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3422_0)) =>
- (case ((string_drop s3421_0 s3422_0)) of
- s3423_0 =>
- (case ((sep_matches_prefix s3423_0)) of
- SOME ((() , s3424_0)) =>
- (case ((string_drop s3423_0 s3424_0)) of
- s3425_0 =>
- (case ((csr_name_map_matches_prefix s3425_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s3426_0)) =>
- (case ((string_drop s3425_0 s3426_0)) of
- s_ => SOME (op, rd, rs1, csr, s_)
+ s4962_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4963_0)) =>
+ (case ((string_drop s4962_0 s4963_0)) of
+ s_ => SOME (op, rd, csr, rs1, s_)
)
| _ => NONE
)
@@ -31271,43 +45091,43 @@ val _ = Define `
)))`;
-(*val _s3391_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s3391_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3392_0=
- (let s3393_0 = s3392_0 in
- if ((string_startswith s3393_0 "rem")) then
- (case ((string_drop s3393_0 ((string_length "rem")))) of
- s3394_0 =>
- (case ((maybe_not_u_matches_prefix s3394_0)) of
- SOME ((s, s3395_0)) =>
- let s3396_0 = (string_drop s3394_0 s3395_0) in
- if ((string_startswith s3396_0 "w")) then
- (case ((string_drop s3396_0 ((string_length "w")))) of
- s3397_0 =>
- (case ((spc_matches_prefix0 s3397_0)) of
- SOME ((() , s3398_0)) =>
- (case ((string_drop s3397_0 s3398_0)) of
- s3399_0 =>
- (case ((reg_name_matches_prefix s3399_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3400_0)) =>
- (case ((string_drop s3399_0 s3400_0)) of
- s3401_0 =>
- (case ((sep_matches_prefix s3401_0)) of
- SOME ((() , s3402_0)) =>
- (case ((string_drop s3401_0 s3402_0)) of
- s3403_0 =>
- (case ((reg_name_matches_prefix s3403_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3404_0)) =>
- (case ((string_drop s3403_0 s3404_0)) of
- s3405_0 =>
- (case ((sep_matches_prefix s3405_0)) of
- SOME ((() , s3406_0)) =>
- (case ((string_drop s3405_0 s3406_0)) of
- s3407_0 =>
- (case ((reg_name_matches_prefix s3407_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3408_0)) =>
- (case ((string_drop s3407_0 s3408_0)) of
+(*val _s4928_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4928_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4929_0=
+ (let s4930_0 = s4929_0 in
+ if ((string_startswith s4930_0 "rem")) then
+ (case ((string_drop s4930_0 ((string_length "rem")))) of
+ s4931_0 =>
+ (case ((maybe_not_u_matches_prefix s4931_0)) of
+ SOME ((s, s4932_0)) =>
+ let s4933_0 = (string_drop s4931_0 s4932_0) in
+ if ((string_startswith s4933_0 "w")) then
+ (case ((string_drop s4933_0 ((string_length "w")))) of
+ s4934_0 =>
+ (case ((spc_matches_prefix0 s4934_0)) of
+ SOME ((() , s4935_0)) =>
+ (case ((string_drop s4934_0 s4935_0)) of
+ s4936_0 =>
+ (case ((reg_name_matches_prefix s4936_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4937_0)) =>
+ (case ((string_drop s4936_0 s4937_0)) of
+ s4938_0 =>
+ (case ((sep_matches_prefix s4938_0)) of
+ SOME ((() , s4939_0)) =>
+ (case ((string_drop s4938_0 s4939_0)) of
+ s4940_0 =>
+ (case ((reg_name_matches_prefix s4940_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4941_0)) =>
+ (case ((string_drop s4940_0 s4941_0)) of
+ s4942_0 =>
+ (case ((sep_matches_prefix s4942_0)) of
+ SOME ((() , s4943_0)) =>
+ (case ((string_drop s4942_0 s4943_0)) of
+ s4944_0 =>
+ (case ((reg_name_matches_prefix s4944_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4945_0)) =>
+ (case ((string_drop s4944_0 s4945_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31334,43 +45154,43 @@ val _ = Define `
else NONE))`;
-(*val _s3372_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s3372_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3373_0=
- (let s3374_0 = s3373_0 in
- if ((string_startswith s3374_0 "div")) then
- (case ((string_drop s3374_0 ((string_length "div")))) of
- s3375_0 =>
- (case ((maybe_not_u_matches_prefix s3375_0)) of
- SOME ((s, s3376_0)) =>
- let s3377_0 = (string_drop s3375_0 s3376_0) in
- if ((string_startswith s3377_0 "w")) then
- (case ((string_drop s3377_0 ((string_length "w")))) of
- s3378_0 =>
- (case ((spc_matches_prefix0 s3378_0)) of
- SOME ((() , s3379_0)) =>
- (case ((string_drop s3378_0 s3379_0)) of
- s3380_0 =>
- (case ((reg_name_matches_prefix s3380_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3381_0)) =>
- (case ((string_drop s3380_0 s3381_0)) of
- s3382_0 =>
- (case ((sep_matches_prefix s3382_0)) of
- SOME ((() , s3383_0)) =>
- (case ((string_drop s3382_0 s3383_0)) of
- s3384_0 =>
- (case ((reg_name_matches_prefix s3384_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3385_0)) =>
- (case ((string_drop s3384_0 s3385_0)) of
- s3386_0 =>
- (case ((sep_matches_prefix s3386_0)) of
- SOME ((() , s3387_0)) =>
- (case ((string_drop s3386_0 s3387_0)) of
- s3388_0 =>
- (case ((reg_name_matches_prefix s3388_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3389_0)) =>
- (case ((string_drop s3388_0 s3389_0)) of
+(*val _s4909_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4909_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4910_0=
+ (let s4911_0 = s4910_0 in
+ if ((string_startswith s4911_0 "div")) then
+ (case ((string_drop s4911_0 ((string_length "div")))) of
+ s4912_0 =>
+ (case ((maybe_not_u_matches_prefix s4912_0)) of
+ SOME ((s, s4913_0)) =>
+ let s4914_0 = (string_drop s4912_0 s4913_0) in
+ if ((string_startswith s4914_0 "w")) then
+ (case ((string_drop s4914_0 ((string_length "w")))) of
+ s4915_0 =>
+ (case ((spc_matches_prefix0 s4915_0)) of
+ SOME ((() , s4916_0)) =>
+ (case ((string_drop s4915_0 s4916_0)) of
+ s4917_0 =>
+ (case ((reg_name_matches_prefix s4917_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4918_0)) =>
+ (case ((string_drop s4917_0 s4918_0)) of
+ s4919_0 =>
+ (case ((sep_matches_prefix s4919_0)) of
+ SOME ((() , s4920_0)) =>
+ (case ((string_drop s4919_0 s4920_0)) of
+ s4921_0 =>
+ (case ((reg_name_matches_prefix s4921_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4922_0)) =>
+ (case ((string_drop s4921_0 s4922_0)) of
+ s4923_0 =>
+ (case ((sep_matches_prefix s4923_0)) of
+ SOME ((() , s4924_0)) =>
+ (case ((string_drop s4923_0 s4924_0)) of
+ s4925_0 =>
+ (case ((reg_name_matches_prefix s4925_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4926_0)) =>
+ (case ((string_drop s4925_0 s4926_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31397,37 +45217,37 @@ val _ = Define `
else NONE))`;
-(*val _s3356_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4893_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3356_:string ->((5)words$word#(5)words$word#(5)words$word#string)option) s3357_0=
- (let s3358_0 = s3357_0 in
- if ((string_startswith s3358_0 "mulw")) then
- (case ((string_drop s3358_0 ((string_length "mulw")))) of
- s3359_0 =>
- (case ((spc_matches_prefix0 s3359_0)) of
- SOME ((() , s3360_0)) =>
- (case ((string_drop s3359_0 s3360_0)) of
- s3361_0 =>
- (case ((reg_name_matches_prefix s3361_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3362_0)) =>
- (case ((string_drop s3361_0 s3362_0)) of
- s3363_0 =>
- (case ((sep_matches_prefix s3363_0)) of
- SOME ((() , s3364_0)) =>
- (case ((string_drop s3363_0 s3364_0)) of
- s3365_0 =>
- (case ((reg_name_matches_prefix s3365_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3366_0)) =>
- (case ((string_drop s3365_0 s3366_0)) of
- s3367_0 =>
- (case ((sep_matches_prefix s3367_0)) of
- SOME ((() , s3368_0)) =>
- (case ((string_drop s3367_0 s3368_0)) of
- s3369_0 =>
- (case ((reg_name_matches_prefix s3369_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3370_0)) =>
- (case ((string_drop s3369_0 s3370_0)) of s_ => SOME (rd, rs1, rs2, s_) )
+ ((s4893_:string ->((5)words$word#(5)words$word#(5)words$word#string)option) s4894_0=
+ (let s4895_0 = s4894_0 in
+ if ((string_startswith s4895_0 "mulw")) then
+ (case ((string_drop s4895_0 ((string_length "mulw")))) of
+ s4896_0 =>
+ (case ((spc_matches_prefix0 s4896_0)) of
+ SOME ((() , s4897_0)) =>
+ (case ((string_drop s4896_0 s4897_0)) of
+ s4898_0 =>
+ (case ((reg_name_matches_prefix s4898_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4899_0)) =>
+ (case ((string_drop s4898_0 s4899_0)) of
+ s4900_0 =>
+ (case ((sep_matches_prefix s4900_0)) of
+ SOME ((() , s4901_0)) =>
+ (case ((string_drop s4900_0 s4901_0)) of
+ s4902_0 =>
+ (case ((reg_name_matches_prefix s4902_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4903_0)) =>
+ (case ((string_drop s4902_0 s4903_0)) of
+ s4904_0 =>
+ (case ((sep_matches_prefix s4904_0)) of
+ SOME ((() , s4905_0)) =>
+ (case ((string_drop s4904_0 s4905_0)) of
+ s4906_0 =>
+ (case ((reg_name_matches_prefix s4906_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4907_0)) =>
+ (case ((string_drop s4906_0 s4907_0)) of s_ => SOME (rd, rs1, rs2, s_) )
| _ => NONE
)
)
@@ -31449,41 +45269,41 @@ val _ = Define `
else NONE))`;
-(*val _s3338_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4875_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3338_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3339_0=
- (let s3340_0 = s3339_0 in
- if ((string_startswith s3340_0 "rem")) then
- (case ((string_drop s3340_0 ((string_length "rem")))) of
- s3341_0 =>
- (case ((maybe_not_u_matches_prefix s3341_0)) of
- SOME ((s, s3342_0)) =>
- (case ((string_drop s3341_0 s3342_0)) of
- s3343_0 =>
- (case ((spc_matches_prefix0 s3343_0)) of
- SOME ((() , s3344_0)) =>
- (case ((string_drop s3343_0 s3344_0)) of
- s3345_0 =>
- (case ((reg_name_matches_prefix s3345_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3346_0)) =>
- (case ((string_drop s3345_0 s3346_0)) of
- s3347_0 =>
- (case ((sep_matches_prefix s3347_0)) of
- SOME ((() , s3348_0)) =>
- (case ((string_drop s3347_0 s3348_0)) of
- s3349_0 =>
- (case ((reg_name_matches_prefix s3349_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3350_0)) =>
- (case ((string_drop s3349_0 s3350_0)) of
- s3351_0 =>
- (case ((sep_matches_prefix s3351_0)) of
- SOME ((() , s3352_0)) =>
- (case ((string_drop s3351_0 s3352_0)) of
- s3353_0 =>
- (case ((reg_name_matches_prefix s3353_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3354_0)) =>
- (case ((string_drop s3353_0 s3354_0)) of
+ ((s4875_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4876_0=
+ (let s4877_0 = s4876_0 in
+ if ((string_startswith s4877_0 "rem")) then
+ (case ((string_drop s4877_0 ((string_length "rem")))) of
+ s4878_0 =>
+ (case ((maybe_not_u_matches_prefix s4878_0)) of
+ SOME ((s, s4879_0)) =>
+ (case ((string_drop s4878_0 s4879_0)) of
+ s4880_0 =>
+ (case ((spc_matches_prefix0 s4880_0)) of
+ SOME ((() , s4881_0)) =>
+ (case ((string_drop s4880_0 s4881_0)) of
+ s4882_0 =>
+ (case ((reg_name_matches_prefix s4882_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4883_0)) =>
+ (case ((string_drop s4882_0 s4883_0)) of
+ s4884_0 =>
+ (case ((sep_matches_prefix s4884_0)) of
+ SOME ((() , s4885_0)) =>
+ (case ((string_drop s4884_0 s4885_0)) of
+ s4886_0 =>
+ (case ((reg_name_matches_prefix s4886_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4887_0)) =>
+ (case ((string_drop s4886_0 s4887_0)) of
+ s4888_0 =>
+ (case ((sep_matches_prefix s4888_0)) of
+ SOME ((() , s4889_0)) =>
+ (case ((string_drop s4888_0 s4889_0)) of
+ s4890_0 =>
+ (case ((reg_name_matches_prefix s4890_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4891_0)) =>
+ (case ((string_drop s4890_0 s4891_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31510,41 +45330,41 @@ val _ = Define `
else NONE))`;
-(*val _s3320_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4857_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3320_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3321_0=
- (let s3322_0 = s3321_0 in
- if ((string_startswith s3322_0 "div")) then
- (case ((string_drop s3322_0 ((string_length "div")))) of
- s3323_0 =>
- (case ((maybe_not_u_matches_prefix s3323_0)) of
- SOME ((s, s3324_0)) =>
- (case ((string_drop s3323_0 s3324_0)) of
- s3325_0 =>
- (case ((spc_matches_prefix0 s3325_0)) of
- SOME ((() , s3326_0)) =>
- (case ((string_drop s3325_0 s3326_0)) of
- s3327_0 =>
- (case ((reg_name_matches_prefix s3327_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3328_0)) =>
- (case ((string_drop s3327_0 s3328_0)) of
- s3329_0 =>
- (case ((sep_matches_prefix s3329_0)) of
- SOME ((() , s3330_0)) =>
- (case ((string_drop s3329_0 s3330_0)) of
- s3331_0 =>
- (case ((reg_name_matches_prefix s3331_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3332_0)) =>
- (case ((string_drop s3331_0 s3332_0)) of
- s3333_0 =>
- (case ((sep_matches_prefix s3333_0)) of
- SOME ((() , s3334_0)) =>
- (case ((string_drop s3333_0 s3334_0)) of
- s3335_0 =>
- (case ((reg_name_matches_prefix s3335_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3336_0)) =>
- (case ((string_drop s3335_0 s3336_0)) of
+ ((s4857_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4858_0=
+ (let s4859_0 = s4858_0 in
+ if ((string_startswith s4859_0 "div")) then
+ (case ((string_drop s4859_0 ((string_length "div")))) of
+ s4860_0 =>
+ (case ((maybe_not_u_matches_prefix s4860_0)) of
+ SOME ((s, s4861_0)) =>
+ (case ((string_drop s4860_0 s4861_0)) of
+ s4862_0 =>
+ (case ((spc_matches_prefix0 s4862_0)) of
+ SOME ((() , s4863_0)) =>
+ (case ((string_drop s4862_0 s4863_0)) of
+ s4864_0 =>
+ (case ((reg_name_matches_prefix s4864_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4865_0)) =>
+ (case ((string_drop s4864_0 s4865_0)) of
+ s4866_0 =>
+ (case ((sep_matches_prefix s4866_0)) of
+ SOME ((() , s4867_0)) =>
+ (case ((string_drop s4866_0 s4867_0)) of
+ s4868_0 =>
+ (case ((reg_name_matches_prefix s4868_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4869_0)) =>
+ (case ((string_drop s4868_0 s4869_0)) of
+ s4870_0 =>
+ (case ((sep_matches_prefix s4870_0)) of
+ SOME ((() , s4871_0)) =>
+ (case ((string_drop s4870_0 s4871_0)) of
+ s4872_0 =>
+ (case ((reg_name_matches_prefix s4872_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4873_0)) =>
+ (case ((string_drop s4872_0 s4873_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31571,39 +45391,39 @@ val _ = Define `
else NONE))`;
-(*val _s3303_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4840_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3303_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3304_0=
- ((case s3304_0 of
- s3305_0 =>
- (case ((mul_mnemonic_matches_prefix s3305_0)) of
- SOME (((high, signed1, signed2), s3306_0)) =>
- (case ((string_drop s3305_0 s3306_0)) of
- s3307_0 =>
- (case ((spc_matches_prefix0 s3307_0)) of
- SOME ((() , s3308_0)) =>
- (case ((string_drop s3307_0 s3308_0)) of
- s3309_0 =>
- (case ((reg_name_matches_prefix s3309_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3310_0)) =>
- (case ((string_drop s3309_0 s3310_0)) of
- s3311_0 =>
- (case ((sep_matches_prefix s3311_0)) of
- SOME ((() , s3312_0)) =>
- (case ((string_drop s3311_0 s3312_0)) of
- s3313_0 =>
- (case ((reg_name_matches_prefix s3313_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3314_0)) =>
- (case ((string_drop s3313_0 s3314_0)) of
- s3315_0 =>
- (case ((sep_matches_prefix s3315_0)) of
- SOME ((() , s3316_0)) =>
- (case ((string_drop s3315_0 s3316_0)) of
- s3317_0 =>
- (case ((reg_name_matches_prefix s3317_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3318_0)) =>
- (case ((string_drop s3317_0 s3318_0)) of
+ ((s4840_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4841_0=
+ ((case s4841_0 of
+ s4842_0 =>
+ (case ((mul_mnemonic_matches_prefix s4842_0)) of
+ SOME (((high, signed1, signed2), s4843_0)) =>
+ (case ((string_drop s4842_0 s4843_0)) of
+ s4844_0 =>
+ (case ((spc_matches_prefix0 s4844_0)) of
+ SOME ((() , s4845_0)) =>
+ (case ((string_drop s4844_0 s4845_0)) of
+ s4846_0 =>
+ (case ((reg_name_matches_prefix s4846_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4847_0)) =>
+ (case ((string_drop s4846_0 s4847_0)) of
+ s4848_0 =>
+ (case ((sep_matches_prefix s4848_0)) of
+ SOME ((() , s4849_0)) =>
+ (case ((string_drop s4848_0 s4849_0)) of
+ s4850_0 =>
+ (case ((reg_name_matches_prefix s4850_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4851_0)) =>
+ (case ((string_drop s4850_0 s4851_0)) of
+ s4852_0 =>
+ (case ((sep_matches_prefix s4852_0)) of
+ SOME ((() , s4853_0)) =>
+ (case ((string_drop s4852_0 s4853_0)) of
+ s4854_0 =>
+ (case ((reg_name_matches_prefix s4854_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4855_0)) =>
+ (case ((string_drop s4854_0 s4855_0)) of
s_ => SOME (high, signed1, signed2, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31629,29 +45449,29 @@ val _ = Define `
)))`;
-(*val _s3291_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s4828_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3291_:string ->((5)words$word#(5)words$word#string)option) s3292_0=
- (let s3293_0 = s3292_0 in
- if ((string_startswith s3293_0 "c.add")) then
- (case ((string_drop s3293_0 ((string_length "c.add")))) of
- s3294_0 =>
- (case ((spc_matches_prefix0 s3294_0)) of
- SOME ((() , s3295_0)) =>
- (case ((string_drop s3294_0 s3295_0)) of
- s3296_0 =>
- (case ((reg_name_matches_prefix s3296_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3297_0)) =>
- (case ((string_drop s3296_0 s3297_0)) of
- s3298_0 =>
- (case ((sep_matches_prefix s3298_0)) of
- SOME ((() , s3299_0)) =>
- (case ((string_drop s3298_0 s3299_0)) of
- s3300_0 =>
- (case ((reg_name_matches_prefix s3300_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3301_0)) =>
- (case ((string_drop s3300_0 s3301_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4828_:string ->((5)words$word#(5)words$word#string)option) s4829_0=
+ (let s4830_0 = s4829_0 in
+ if ((string_startswith s4830_0 "c.add")) then
+ (case ((string_drop s4830_0 ((string_length "c.add")))) of
+ s4831_0 =>
+ (case ((spc_matches_prefix0 s4831_0)) of
+ SOME ((() , s4832_0)) =>
+ (case ((string_drop s4831_0 s4832_0)) of
+ s4833_0 =>
+ (case ((reg_name_matches_prefix s4833_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4834_0)) =>
+ (case ((string_drop s4833_0 s4834_0)) of
+ s4835_0 =>
+ (case ((sep_matches_prefix s4835_0)) of
+ SOME ((() , s4836_0)) =>
+ (case ((string_drop s4835_0 s4836_0)) of
+ s4837_0 =>
+ (case ((reg_name_matches_prefix s4837_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4838_0)) =>
+ (case ((string_drop s4837_0 s4838_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -31667,41 +45487,41 @@ val _ = Define `
else NONE))`;
-(*val _s3287_ : string -> maybe string*)
+(*val _s4824_ : string -> maybe string*)
val _ = Define `
- ((s3287_:string ->(string)option) s3288_0=
- (let s3289_0 = s3288_0 in
- if ((string_startswith s3289_0 "c.ebreak")) then
- (case ((string_drop s3289_0 ((string_length "c.ebreak")))) of
+ ((s4824_:string ->(string)option) s4825_0=
+ (let s4826_0 = s4825_0 in
+ if ((string_startswith s4826_0 "c.ebreak")) then
+ (case ((string_drop s4826_0 ((string_length "c.ebreak")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s3275_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s4812_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3275_:string ->((5)words$word#(5)words$word#string)option) s3276_0=
- (let s3277_0 = s3276_0 in
- if ((string_startswith s3277_0 "c.mv")) then
- (case ((string_drop s3277_0 ((string_length "c.mv")))) of
- s3278_0 =>
- (case ((spc_matches_prefix0 s3278_0)) of
- SOME ((() , s3279_0)) =>
- (case ((string_drop s3278_0 s3279_0)) of
- s3280_0 =>
- (case ((reg_name_matches_prefix s3280_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3281_0)) =>
- (case ((string_drop s3280_0 s3281_0)) of
- s3282_0 =>
- (case ((sep_matches_prefix s3282_0)) of
- SOME ((() , s3283_0)) =>
- (case ((string_drop s3282_0 s3283_0)) of
- s3284_0 =>
- (case ((reg_name_matches_prefix s3284_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3285_0)) =>
- (case ((string_drop s3284_0 s3285_0)) of s_ => SOME (rd, rs2, s_) )
+ ((s4812_:string ->((5)words$word#(5)words$word#string)option) s4813_0=
+ (let s4814_0 = s4813_0 in
+ if ((string_startswith s4814_0 "c.mv")) then
+ (case ((string_drop s4814_0 ((string_length "c.mv")))) of
+ s4815_0 =>
+ (case ((spc_matches_prefix0 s4815_0)) of
+ SOME ((() , s4816_0)) =>
+ (case ((string_drop s4815_0 s4816_0)) of
+ s4817_0 =>
+ (case ((reg_name_matches_prefix s4817_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4818_0)) =>
+ (case ((string_drop s4817_0 s4818_0)) of
+ s4819_0 =>
+ (case ((sep_matches_prefix s4819_0)) of
+ SOME ((() , s4820_0)) =>
+ (case ((string_drop s4819_0 s4820_0)) of
+ s4821_0 =>
+ (case ((reg_name_matches_prefix s4821_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4822_0)) =>
+ (case ((string_drop s4821_0 s4822_0)) of s_ => SOME (rd, rs2, s_) )
| _ => NONE
)
)
@@ -31717,21 +45537,21 @@ val _ = Define `
else NONE))`;
-(*val _s3267_ : string -> maybe ((mword ty5 * string))*)
+(*val _s4804_ : string -> maybe ((mword ty5 * string))*)
val _ = Define `
- ((s3267_:string ->((5)words$word#string)option) s3268_0=
- (let s3269_0 = s3268_0 in
- if ((string_startswith s3269_0 "c.jalr")) then
- (case ((string_drop s3269_0 ((string_length "c.jalr")))) of
- s3270_0 =>
- (case ((spc_matches_prefix0 s3270_0)) of
- SOME ((() , s3271_0)) =>
- (case ((string_drop s3270_0 s3271_0)) of
- s3272_0 =>
- (case ((reg_name_matches_prefix s3272_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3273_0)) =>
- (case ((string_drop s3272_0 s3273_0)) of s_ => SOME (rs1, s_) )
+ ((s4804_:string ->((5)words$word#string)option) s4805_0=
+ (let s4806_0 = s4805_0 in
+ if ((string_startswith s4806_0 "c.jalr")) then
+ (case ((string_drop s4806_0 ((string_length "c.jalr")))) of
+ s4807_0 =>
+ (case ((spc_matches_prefix0 s4807_0)) of
+ SOME ((() , s4808_0)) =>
+ (case ((string_drop s4807_0 s4808_0)) of
+ s4809_0 =>
+ (case ((reg_name_matches_prefix s4809_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4810_0)) =>
+ (case ((string_drop s4809_0 s4810_0)) of s_ => SOME (rs1, s_) )
| _ => NONE
)
)
@@ -31741,21 +45561,21 @@ val _ = Define `
else NONE))`;
-(*val _s3259_ : string -> maybe ((mword ty5 * string))*)
+(*val _s4796_ : string -> maybe ((mword ty5 * string))*)
val _ = Define `
- ((s3259_:string ->((5)words$word#string)option) s3260_0=
- (let s3261_0 = s3260_0 in
- if ((string_startswith s3261_0 "c.jr")) then
- (case ((string_drop s3261_0 ((string_length "c.jr")))) of
- s3262_0 =>
- (case ((spc_matches_prefix0 s3262_0)) of
- SOME ((() , s3263_0)) =>
- (case ((string_drop s3262_0 s3263_0)) of
- s3264_0 =>
- (case ((reg_name_matches_prefix s3264_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3265_0)) =>
- (case ((string_drop s3264_0 s3265_0)) of s_ => SOME (rs1, s_) )
+ ((s4796_:string ->((5)words$word#string)option) s4797_0=
+ (let s4798_0 = s4797_0 in
+ if ((string_startswith s4798_0 "c.jr")) then
+ (case ((string_drop s4798_0 ((string_length "c.jr")))) of
+ s4799_0 =>
+ (case ((spc_matches_prefix0 s4799_0)) of
+ SOME ((() , s4800_0)) =>
+ (case ((string_drop s4799_0 s4800_0)) of
+ s4801_0 =>
+ (case ((reg_name_matches_prefix s4801_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4802_0)) =>
+ (case ((string_drop s4801_0 s4802_0)) of s_ => SOME (rs1, s_) )
| _ => NONE
)
)
@@ -31765,30 +45585,30 @@ val _ = Define `
else NONE))`;
-(*val _s3247_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4784_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3247_:string ->((5)words$word#(6)words$word#string)option) s3248_0=
- (let s3249_0 = s3248_0 in
- if ((string_startswith s3249_0 "c.sdsp")) then
- (case ((string_drop s3249_0 ((string_length "c.sdsp")))) of
- s3250_0 =>
- (case ((spc_matches_prefix0 s3250_0)) of
- SOME ((() , s3251_0)) =>
- (case ((string_drop s3250_0 s3251_0)) of
- s3252_0 =>
- (case ((reg_name_matches_prefix s3252_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3253_0)) =>
- (case ((string_drop s3252_0 s3253_0)) of
- s3254_0 =>
- (case ((sep_matches_prefix s3254_0)) of
- SOME ((() , s3255_0)) =>
- (case ((string_drop s3254_0 s3255_0)) of
- s3256_0 =>
+ ((s4784_:string ->((5)words$word#(6)words$word#string)option) s4785_0=
+ (let s4786_0 = s4785_0 in
+ if ((string_startswith s4786_0 "c.sdsp")) then
+ (case ((string_drop s4786_0 ((string_length "c.sdsp")))) of
+ s4787_0 =>
+ (case ((spc_matches_prefix0 s4787_0)) of
+ SOME ((() , s4788_0)) =>
+ (case ((string_drop s4787_0 s4788_0)) of
+ s4789_0 =>
+ (case ((reg_name_matches_prefix s4789_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4790_0)) =>
+ (case ((string_drop s4789_0 s4790_0)) of
+ s4791_0 =>
+ (case ((sep_matches_prefix s4791_0)) of
+ SOME ((() , s4792_0)) =>
+ (case ((string_drop s4791_0 s4792_0)) of
+ s4793_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3256_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3257_0)) =>
- (case ((string_drop s3256_0 s3257_0)) of s_ => SOME (rs2, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4793_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4794_0)) =>
+ (case ((string_drop s4793_0 s4794_0)) of s_ => SOME (rs2, uimm, s_) )
| _ => NONE
)
)
@@ -31804,30 +45624,30 @@ val _ = Define `
else NONE))`;
-(*val _s3235_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4772_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3235_:string ->((5)words$word#(6)words$word#string)option) s3236_0=
- (let s3237_0 = s3236_0 in
- if ((string_startswith s3237_0 "c.swsp")) then
- (case ((string_drop s3237_0 ((string_length "c.swsp")))) of
- s3238_0 =>
- (case ((spc_matches_prefix0 s3238_0)) of
- SOME ((() , s3239_0)) =>
- (case ((string_drop s3238_0 s3239_0)) of
- s3240_0 =>
- (case ((reg_name_matches_prefix s3240_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3241_0)) =>
- (case ((string_drop s3240_0 s3241_0)) of
- s3242_0 =>
- (case ((sep_matches_prefix s3242_0)) of
- SOME ((() , s3243_0)) =>
- (case ((string_drop s3242_0 s3243_0)) of
- s3244_0 =>
+ ((s4772_:string ->((5)words$word#(6)words$word#string)option) s4773_0=
+ (let s4774_0 = s4773_0 in
+ if ((string_startswith s4774_0 "c.swsp")) then
+ (case ((string_drop s4774_0 ((string_length "c.swsp")))) of
+ s4775_0 =>
+ (case ((spc_matches_prefix0 s4775_0)) of
+ SOME ((() , s4776_0)) =>
+ (case ((string_drop s4775_0 s4776_0)) of
+ s4777_0 =>
+ (case ((reg_name_matches_prefix s4777_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4778_0)) =>
+ (case ((string_drop s4777_0 s4778_0)) of
+ s4779_0 =>
+ (case ((sep_matches_prefix s4779_0)) of
+ SOME ((() , s4780_0)) =>
+ (case ((string_drop s4779_0 s4780_0)) of
+ s4781_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3244_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3245_0)) =>
- (case ((string_drop s3244_0 s3245_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4781_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4782_0)) =>
+ (case ((string_drop s4781_0 s4782_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -31843,30 +45663,30 @@ val _ = Define `
else NONE))`;
-(*val _s3223_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4760_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3223_:string ->((5)words$word#(6)words$word#string)option) s3224_0=
- (let s3225_0 = s3224_0 in
- if ((string_startswith s3225_0 "c.ldsp")) then
- (case ((string_drop s3225_0 ((string_length "c.ldsp")))) of
- s3226_0 =>
- (case ((spc_matches_prefix0 s3226_0)) of
- SOME ((() , s3227_0)) =>
- (case ((string_drop s3226_0 s3227_0)) of
- s3228_0 =>
- (case ((reg_name_matches_prefix s3228_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3229_0)) =>
- (case ((string_drop s3228_0 s3229_0)) of
- s3230_0 =>
- (case ((sep_matches_prefix s3230_0)) of
- SOME ((() , s3231_0)) =>
- (case ((string_drop s3230_0 s3231_0)) of
- s3232_0 =>
+ ((s4760_:string ->((5)words$word#(6)words$word#string)option) s4761_0=
+ (let s4762_0 = s4761_0 in
+ if ((string_startswith s4762_0 "c.ldsp")) then
+ (case ((string_drop s4762_0 ((string_length "c.ldsp")))) of
+ s4763_0 =>
+ (case ((spc_matches_prefix0 s4763_0)) of
+ SOME ((() , s4764_0)) =>
+ (case ((string_drop s4763_0 s4764_0)) of
+ s4765_0 =>
+ (case ((reg_name_matches_prefix s4765_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4766_0)) =>
+ (case ((string_drop s4765_0 s4766_0)) of
+ s4767_0 =>
+ (case ((sep_matches_prefix s4767_0)) of
+ SOME ((() , s4768_0)) =>
+ (case ((string_drop s4767_0 s4768_0)) of
+ s4769_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3232_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3233_0)) =>
- (case ((string_drop s3232_0 s3233_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4769_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4770_0)) =>
+ (case ((string_drop s4769_0 s4770_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -31882,30 +45702,30 @@ val _ = Define `
else NONE))`;
-(*val _s3211_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4748_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3211_:string ->((5)words$word#(6)words$word#string)option) s3212_0=
- (let s3213_0 = s3212_0 in
- if ((string_startswith s3213_0 "c.lwsp")) then
- (case ((string_drop s3213_0 ((string_length "c.lwsp")))) of
- s3214_0 =>
- (case ((spc_matches_prefix0 s3214_0)) of
- SOME ((() , s3215_0)) =>
- (case ((string_drop s3214_0 s3215_0)) of
- s3216_0 =>
- (case ((reg_name_matches_prefix s3216_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3217_0)) =>
- (case ((string_drop s3216_0 s3217_0)) of
- s3218_0 =>
- (case ((sep_matches_prefix s3218_0)) of
- SOME ((() , s3219_0)) =>
- (case ((string_drop s3218_0 s3219_0)) of
- s3220_0 =>
+ ((s4748_:string ->((5)words$word#(6)words$word#string)option) s4749_0=
+ (let s4750_0 = s4749_0 in
+ if ((string_startswith s4750_0 "c.lwsp")) then
+ (case ((string_drop s4750_0 ((string_length "c.lwsp")))) of
+ s4751_0 =>
+ (case ((spc_matches_prefix0 s4751_0)) of
+ SOME ((() , s4752_0)) =>
+ (case ((string_drop s4751_0 s4752_0)) of
+ s4753_0 =>
+ (case ((reg_name_matches_prefix s4753_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4754_0)) =>
+ (case ((string_drop s4753_0 s4754_0)) of
+ s4755_0 =>
+ (case ((sep_matches_prefix s4755_0)) of
+ SOME ((() , s4756_0)) =>
+ (case ((string_drop s4755_0 s4756_0)) of
+ s4757_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3220_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3221_0)) =>
- (case ((string_drop s3220_0 s3221_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4757_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4758_0)) =>
+ (case ((string_drop s4757_0 s4758_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -31921,30 +45741,30 @@ val _ = Define `
else NONE))`;
-(*val _s3199_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4736_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3199_:string ->((5)words$word#(6)words$word#string)option) s3200_0=
- (let s3201_0 = s3200_0 in
- if ((string_startswith s3201_0 "c.slli")) then
- (case ((string_drop s3201_0 ((string_length "c.slli")))) of
- s3202_0 =>
- (case ((spc_matches_prefix0 s3202_0)) of
- SOME ((() , s3203_0)) =>
- (case ((string_drop s3202_0 s3203_0)) of
- s3204_0 =>
- (case ((reg_name_matches_prefix s3204_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3205_0)) =>
- (case ((string_drop s3204_0 s3205_0)) of
- s3206_0 =>
- (case ((sep_matches_prefix s3206_0)) of
- SOME ((() , s3207_0)) =>
- (case ((string_drop s3206_0 s3207_0)) of
- s3208_0 =>
+ ((s4736_:string ->((5)words$word#(6)words$word#string)option) s4737_0=
+ (let s4738_0 = s4737_0 in
+ if ((string_startswith s4738_0 "c.slli")) then
+ (case ((string_drop s4738_0 ((string_length "c.slli")))) of
+ s4739_0 =>
+ (case ((spc_matches_prefix0 s4739_0)) of
+ SOME ((() , s4740_0)) =>
+ (case ((string_drop s4739_0 s4740_0)) of
+ s4741_0 =>
+ (case ((reg_name_matches_prefix s4741_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4742_0)) =>
+ (case ((string_drop s4741_0 s4742_0)) of
+ s4743_0 =>
+ (case ((sep_matches_prefix s4743_0)) of
+ SOME ((() , s4744_0)) =>
+ (case ((string_drop s4743_0 s4744_0)) of
+ s4745_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3208_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3209_0)) =>
- (case ((string_drop s3208_0 s3209_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4745_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s4746_0)) =>
+ (case ((string_drop s4745_0 s4746_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -31960,30 +45780,30 @@ val _ = Define `
else NONE))`;
-(*val _s3187_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s4724_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s3187_:string ->((3)words$word#(8)words$word#string)option) s3188_0=
- (let s3189_0 = s3188_0 in
- if ((string_startswith s3189_0 "c.bnez")) then
- (case ((string_drop s3189_0 ((string_length "c.bnez")))) of
- s3190_0 =>
- (case ((spc_matches_prefix0 s3190_0)) of
- SOME ((() , s3191_0)) =>
- (case ((string_drop s3190_0 s3191_0)) of
- s3192_0 =>
- (case ((creg_name_matches_prefix s3192_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s3193_0)) =>
- (case ((string_drop s3192_0 s3193_0)) of
- s3194_0 =>
- (case ((sep_matches_prefix s3194_0)) of
- SOME ((() , s3195_0)) =>
- (case ((string_drop s3194_0 s3195_0)) of
- s3196_0 =>
+ ((s4724_:string ->((3)words$word#(8)words$word#string)option) s4725_0=
+ (let s4726_0 = s4725_0 in
+ if ((string_startswith s4726_0 "c.bnez")) then
+ (case ((string_drop s4726_0 ((string_length "c.bnez")))) of
+ s4727_0 =>
+ (case ((spc_matches_prefix0 s4727_0)) of
+ SOME ((() , s4728_0)) =>
+ (case ((string_drop s4727_0 s4728_0)) of
+ s4729_0 =>
+ (case ((creg_name_matches_prefix s4729_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s4730_0)) =>
+ (case ((string_drop s4729_0 s4730_0)) of
+ s4731_0 =>
+ (case ((sep_matches_prefix s4731_0)) of
+ SOME ((() , s4732_0)) =>
+ (case ((string_drop s4731_0 s4732_0)) of
+ s4733_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3196_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s3197_0)) =>
- (case ((string_drop s3196_0 s3197_0)) of s_ => SOME (rs, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4733_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s4734_0)) =>
+ (case ((string_drop s4733_0 s4734_0)) of s_ => SOME (rs, imm, s_) )
| _ => NONE
)
)
@@ -31999,30 +45819,30 @@ val _ = Define `
else NONE))`;
-(*val _s3175_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s4712_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s3175_:string ->((3)words$word#(8)words$word#string)option) s3176_0=
- (let s3177_0 = s3176_0 in
- if ((string_startswith s3177_0 "c.beqz")) then
- (case ((string_drop s3177_0 ((string_length "c.beqz")))) of
- s3178_0 =>
- (case ((spc_matches_prefix0 s3178_0)) of
- SOME ((() , s3179_0)) =>
- (case ((string_drop s3178_0 s3179_0)) of
- s3180_0 =>
- (case ((creg_name_matches_prefix s3180_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s3181_0)) =>
- (case ((string_drop s3180_0 s3181_0)) of
- s3182_0 =>
- (case ((sep_matches_prefix s3182_0)) of
- SOME ((() , s3183_0)) =>
- (case ((string_drop s3182_0 s3183_0)) of
- s3184_0 =>
+ ((s4712_:string ->((3)words$word#(8)words$word#string)option) s4713_0=
+ (let s4714_0 = s4713_0 in
+ if ((string_startswith s4714_0 "c.beqz")) then
+ (case ((string_drop s4714_0 ((string_length "c.beqz")))) of
+ s4715_0 =>
+ (case ((spc_matches_prefix0 s4715_0)) of
+ SOME ((() , s4716_0)) =>
+ (case ((string_drop s4715_0 s4716_0)) of
+ s4717_0 =>
+ (case ((creg_name_matches_prefix s4717_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s4718_0)) =>
+ (case ((string_drop s4717_0 s4718_0)) of
+ s4719_0 =>
+ (case ((sep_matches_prefix s4719_0)) of
+ SOME ((() , s4720_0)) =>
+ (case ((string_drop s4719_0 s4720_0)) of
+ s4721_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3184_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s3185_0)) =>
- (case ((string_drop s3184_0 s3185_0)) of s_ => SOME (rs, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4721_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s4722_0)) =>
+ (case ((string_drop s4721_0 s4722_0)) of s_ => SOME (rs, imm, s_) )
| _ => NONE
)
)
@@ -32038,22 +45858,22 @@ val _ = Define `
else NONE))`;
-(*val _s3167_ : string -> maybe ((mword ty11 * string))*)
+(*val _s4704_ : string -> maybe ((mword ty11 * string))*)
val _ = Define `
- ((s3167_:string ->((11)words$word#string)option) s3168_0=
- (let s3169_0 = s3168_0 in
- if ((string_startswith s3169_0 "c.j")) then
- (case ((string_drop s3169_0 ((string_length "c.j")))) of
- s3170_0 =>
- (case ((spc_matches_prefix0 s3170_0)) of
- SOME ((() , s3171_0)) =>
- (case ((string_drop s3170_0 s3171_0)) of
- s3172_0 =>
+ ((s4704_:string ->((11)words$word#string)option) s4705_0=
+ (let s4706_0 = s4705_0 in
+ if ((string_startswith s4706_0 "c.j")) then
+ (case ((string_drop s4706_0 ((string_length "c.j")))) of
+ s4707_0 =>
+ (case ((spc_matches_prefix0 s4707_0)) of
+ SOME ((() , s4708_0)) =>
+ (case ((string_drop s4707_0 s4708_0)) of
+ s4709_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3172_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s3173_0)) =>
- (case ((string_drop s3172_0 s3173_0)) of s_ => SOME (imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4709_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s4710_0)) =>
+ (case ((string_drop s4709_0 s4710_0)) of s_ => SOME (imm, s_) )
| _ => NONE
)
)
@@ -32063,29 +45883,29 @@ val _ = Define `
else NONE))`;
-(*val _s3155_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4692_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3155_:string ->((3)words$word#(3)words$word#string)option) s3156_0=
- (let s3157_0 = s3156_0 in
- if ((string_startswith s3157_0 "c.addw")) then
- (case ((string_drop s3157_0 ((string_length "c.addw")))) of
- s3158_0 =>
- (case ((spc_matches_prefix0 s3158_0)) of
- SOME ((() , s3159_0)) =>
- (case ((string_drop s3158_0 s3159_0)) of
- s3160_0 =>
- (case ((creg_name_matches_prefix s3160_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3161_0)) =>
- (case ((string_drop s3160_0 s3161_0)) of
- s3162_0 =>
- (case ((sep_matches_prefix s3162_0)) of
- SOME ((() , s3163_0)) =>
- (case ((string_drop s3162_0 s3163_0)) of
- s3164_0 =>
- (case ((creg_name_matches_prefix s3164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3165_0)) =>
- (case ((string_drop s3164_0 s3165_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4692_:string ->((3)words$word#(3)words$word#string)option) s4693_0=
+ (let s4694_0 = s4693_0 in
+ if ((string_startswith s4694_0 "c.addw")) then
+ (case ((string_drop s4694_0 ((string_length "c.addw")))) of
+ s4695_0 =>
+ (case ((spc_matches_prefix0 s4695_0)) of
+ SOME ((() , s4696_0)) =>
+ (case ((string_drop s4695_0 s4696_0)) of
+ s4697_0 =>
+ (case ((creg_name_matches_prefix s4697_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4698_0)) =>
+ (case ((string_drop s4697_0 s4698_0)) of
+ s4699_0 =>
+ (case ((sep_matches_prefix s4699_0)) of
+ SOME ((() , s4700_0)) =>
+ (case ((string_drop s4699_0 s4700_0)) of
+ s4701_0 =>
+ (case ((creg_name_matches_prefix s4701_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4702_0)) =>
+ (case ((string_drop s4701_0 s4702_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32101,29 +45921,29 @@ val _ = Define `
else NONE))`;
-(*val _s3143_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4680_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3143_:string ->((3)words$word#(3)words$word#string)option) s3144_0=
- (let s3145_0 = s3144_0 in
- if ((string_startswith s3145_0 "c.subw")) then
- (case ((string_drop s3145_0 ((string_length "c.subw")))) of
- s3146_0 =>
- (case ((spc_matches_prefix0 s3146_0)) of
- SOME ((() , s3147_0)) =>
- (case ((string_drop s3146_0 s3147_0)) of
- s3148_0 =>
- (case ((creg_name_matches_prefix s3148_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3149_0)) =>
- (case ((string_drop s3148_0 s3149_0)) of
- s3150_0 =>
- (case ((sep_matches_prefix s3150_0)) of
- SOME ((() , s3151_0)) =>
- (case ((string_drop s3150_0 s3151_0)) of
- s3152_0 =>
- (case ((creg_name_matches_prefix s3152_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3153_0)) =>
- (case ((string_drop s3152_0 s3153_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4680_:string ->((3)words$word#(3)words$word#string)option) s4681_0=
+ (let s4682_0 = s4681_0 in
+ if ((string_startswith s4682_0 "c.subw")) then
+ (case ((string_drop s4682_0 ((string_length "c.subw")))) of
+ s4683_0 =>
+ (case ((spc_matches_prefix0 s4683_0)) of
+ SOME ((() , s4684_0)) =>
+ (case ((string_drop s4683_0 s4684_0)) of
+ s4685_0 =>
+ (case ((creg_name_matches_prefix s4685_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4686_0)) =>
+ (case ((string_drop s4685_0 s4686_0)) of
+ s4687_0 =>
+ (case ((sep_matches_prefix s4687_0)) of
+ SOME ((() , s4688_0)) =>
+ (case ((string_drop s4687_0 s4688_0)) of
+ s4689_0 =>
+ (case ((creg_name_matches_prefix s4689_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4690_0)) =>
+ (case ((string_drop s4689_0 s4690_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32139,29 +45959,29 @@ val _ = Define `
else NONE))`;
-(*val _s3131_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4668_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3131_:string ->((3)words$word#(3)words$word#string)option) s3132_0=
- (let s3133_0 = s3132_0 in
- if ((string_startswith s3133_0 "c.and")) then
- (case ((string_drop s3133_0 ((string_length "c.and")))) of
- s3134_0 =>
- (case ((spc_matches_prefix0 s3134_0)) of
- SOME ((() , s3135_0)) =>
- (case ((string_drop s3134_0 s3135_0)) of
- s3136_0 =>
- (case ((creg_name_matches_prefix s3136_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3137_0)) =>
- (case ((string_drop s3136_0 s3137_0)) of
- s3138_0 =>
- (case ((sep_matches_prefix s3138_0)) of
- SOME ((() , s3139_0)) =>
- (case ((string_drop s3138_0 s3139_0)) of
- s3140_0 =>
- (case ((creg_name_matches_prefix s3140_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3141_0)) =>
- (case ((string_drop s3140_0 s3141_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4668_:string ->((3)words$word#(3)words$word#string)option) s4669_0=
+ (let s4670_0 = s4669_0 in
+ if ((string_startswith s4670_0 "c.and")) then
+ (case ((string_drop s4670_0 ((string_length "c.and")))) of
+ s4671_0 =>
+ (case ((spc_matches_prefix0 s4671_0)) of
+ SOME ((() , s4672_0)) =>
+ (case ((string_drop s4671_0 s4672_0)) of
+ s4673_0 =>
+ (case ((creg_name_matches_prefix s4673_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4674_0)) =>
+ (case ((string_drop s4673_0 s4674_0)) of
+ s4675_0 =>
+ (case ((sep_matches_prefix s4675_0)) of
+ SOME ((() , s4676_0)) =>
+ (case ((string_drop s4675_0 s4676_0)) of
+ s4677_0 =>
+ (case ((creg_name_matches_prefix s4677_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4678_0)) =>
+ (case ((string_drop s4677_0 s4678_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32177,29 +45997,29 @@ val _ = Define `
else NONE))`;
-(*val _s3119_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4656_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3119_:string ->((3)words$word#(3)words$word#string)option) s3120_0=
- (let s3121_0 = s3120_0 in
- if ((string_startswith s3121_0 "c.or")) then
- (case ((string_drop s3121_0 ((string_length "c.or")))) of
- s3122_0 =>
- (case ((spc_matches_prefix0 s3122_0)) of
- SOME ((() , s3123_0)) =>
- (case ((string_drop s3122_0 s3123_0)) of
- s3124_0 =>
- (case ((creg_name_matches_prefix s3124_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3125_0)) =>
- (case ((string_drop s3124_0 s3125_0)) of
- s3126_0 =>
- (case ((sep_matches_prefix s3126_0)) of
- SOME ((() , s3127_0)) =>
- (case ((string_drop s3126_0 s3127_0)) of
- s3128_0 =>
- (case ((creg_name_matches_prefix s3128_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3129_0)) =>
- (case ((string_drop s3128_0 s3129_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4656_:string ->((3)words$word#(3)words$word#string)option) s4657_0=
+ (let s4658_0 = s4657_0 in
+ if ((string_startswith s4658_0 "c.or")) then
+ (case ((string_drop s4658_0 ((string_length "c.or")))) of
+ s4659_0 =>
+ (case ((spc_matches_prefix0 s4659_0)) of
+ SOME ((() , s4660_0)) =>
+ (case ((string_drop s4659_0 s4660_0)) of
+ s4661_0 =>
+ (case ((creg_name_matches_prefix s4661_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4662_0)) =>
+ (case ((string_drop s4661_0 s4662_0)) of
+ s4663_0 =>
+ (case ((sep_matches_prefix s4663_0)) of
+ SOME ((() , s4664_0)) =>
+ (case ((string_drop s4663_0 s4664_0)) of
+ s4665_0 =>
+ (case ((creg_name_matches_prefix s4665_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4666_0)) =>
+ (case ((string_drop s4665_0 s4666_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32215,29 +46035,29 @@ val _ = Define `
else NONE))`;
-(*val _s3107_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4644_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3107_:string ->((3)words$word#(3)words$word#string)option) s3108_0=
- (let s3109_0 = s3108_0 in
- if ((string_startswith s3109_0 "c.xor")) then
- (case ((string_drop s3109_0 ((string_length "c.xor")))) of
- s3110_0 =>
- (case ((spc_matches_prefix0 s3110_0)) of
- SOME ((() , s3111_0)) =>
- (case ((string_drop s3110_0 s3111_0)) of
- s3112_0 =>
- (case ((creg_name_matches_prefix s3112_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3113_0)) =>
- (case ((string_drop s3112_0 s3113_0)) of
- s3114_0 =>
- (case ((sep_matches_prefix s3114_0)) of
- SOME ((() , s3115_0)) =>
- (case ((string_drop s3114_0 s3115_0)) of
- s3116_0 =>
- (case ((creg_name_matches_prefix s3116_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3117_0)) =>
- (case ((string_drop s3116_0 s3117_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4644_:string ->((3)words$word#(3)words$word#string)option) s4645_0=
+ (let s4646_0 = s4645_0 in
+ if ((string_startswith s4646_0 "c.xor")) then
+ (case ((string_drop s4646_0 ((string_length "c.xor")))) of
+ s4647_0 =>
+ (case ((spc_matches_prefix0 s4647_0)) of
+ SOME ((() , s4648_0)) =>
+ (case ((string_drop s4647_0 s4648_0)) of
+ s4649_0 =>
+ (case ((creg_name_matches_prefix s4649_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4650_0)) =>
+ (case ((string_drop s4649_0 s4650_0)) of
+ s4651_0 =>
+ (case ((sep_matches_prefix s4651_0)) of
+ SOME ((() , s4652_0)) =>
+ (case ((string_drop s4651_0 s4652_0)) of
+ s4653_0 =>
+ (case ((creg_name_matches_prefix s4653_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4654_0)) =>
+ (case ((string_drop s4653_0 s4654_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32253,29 +46073,29 @@ val _ = Define `
else NONE))`;
-(*val _s3095_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s4632_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3095_:string ->((3)words$word#(3)words$word#string)option) s3096_0=
- (let s3097_0 = s3096_0 in
- if ((string_startswith s3097_0 "c.sub")) then
- (case ((string_drop s3097_0 ((string_length "c.sub")))) of
- s3098_0 =>
- (case ((spc_matches_prefix0 s3098_0)) of
- SOME ((() , s3099_0)) =>
- (case ((string_drop s3098_0 s3099_0)) of
- s3100_0 =>
- (case ((creg_name_matches_prefix s3100_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3101_0)) =>
- (case ((string_drop s3100_0 s3101_0)) of
- s3102_0 =>
- (case ((sep_matches_prefix s3102_0)) of
- SOME ((() , s3103_0)) =>
- (case ((string_drop s3102_0 s3103_0)) of
- s3104_0 =>
- (case ((creg_name_matches_prefix s3104_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3105_0)) =>
- (case ((string_drop s3104_0 s3105_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s4632_:string ->((3)words$word#(3)words$word#string)option) s4633_0=
+ (let s4634_0 = s4633_0 in
+ if ((string_startswith s4634_0 "c.sub")) then
+ (case ((string_drop s4634_0 ((string_length "c.sub")))) of
+ s4635_0 =>
+ (case ((spc_matches_prefix0 s4635_0)) of
+ SOME ((() , s4636_0)) =>
+ (case ((string_drop s4635_0 s4636_0)) of
+ s4637_0 =>
+ (case ((creg_name_matches_prefix s4637_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4638_0)) =>
+ (case ((string_drop s4637_0 s4638_0)) of
+ s4639_0 =>
+ (case ((sep_matches_prefix s4639_0)) of
+ SOME ((() , s4640_0)) =>
+ (case ((string_drop s4639_0 s4640_0)) of
+ s4641_0 =>
+ (case ((creg_name_matches_prefix s4641_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s4642_0)) =>
+ (case ((string_drop s4641_0 s4642_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32291,30 +46111,30 @@ val _ = Define `
else NONE))`;
-(*val _s3083_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s4620_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3083_:string ->((3)words$word#(6)words$word#string)option) s3084_0=
- (let s3085_0 = s3084_0 in
- if ((string_startswith s3085_0 "c.andi")) then
- (case ((string_drop s3085_0 ((string_length "c.andi")))) of
- s3086_0 =>
- (case ((spc_matches_prefix0 s3086_0)) of
- SOME ((() , s3087_0)) =>
- (case ((string_drop s3086_0 s3087_0)) of
- s3088_0 =>
- (case ((creg_name_matches_prefix s3088_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3089_0)) =>
- (case ((string_drop s3088_0 s3089_0)) of
- s3090_0 =>
- (case ((sep_matches_prefix s3090_0)) of
- SOME ((() , s3091_0)) =>
- (case ((string_drop s3090_0 s3091_0)) of
- s3092_0 =>
+ ((s4620_:string ->((3)words$word#(6)words$word#string)option) s4621_0=
+ (let s4622_0 = s4621_0 in
+ if ((string_startswith s4622_0 "c.andi")) then
+ (case ((string_drop s4622_0 ((string_length "c.andi")))) of
+ s4623_0 =>
+ (case ((spc_matches_prefix0 s4623_0)) of
+ SOME ((() , s4624_0)) =>
+ (case ((string_drop s4623_0 s4624_0)) of
+ s4625_0 =>
+ (case ((creg_name_matches_prefix s4625_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4626_0)) =>
+ (case ((string_drop s4625_0 s4626_0)) of
+ s4627_0 =>
+ (case ((sep_matches_prefix s4627_0)) of
+ SOME ((() , s4628_0)) =>
+ (case ((string_drop s4627_0 s4628_0)) of
+ s4629_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3092_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3093_0)) =>
- (case ((string_drop s3092_0 s3093_0)) of s_ => SOME (rsd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4629_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4630_0)) =>
+ (case ((string_drop s4629_0 s4630_0)) of s_ => SOME (rsd, imm, s_) )
| _ => NONE
)
)
@@ -32330,30 +46150,30 @@ val _ = Define `
else NONE))`;
-(*val _s3071_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s4608_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3071_:string ->((3)words$word#(6)words$word#string)option) s3072_0=
- (let s3073_0 = s3072_0 in
- if ((string_startswith s3073_0 "c.srai")) then
- (case ((string_drop s3073_0 ((string_length "c.srai")))) of
- s3074_0 =>
- (case ((spc_matches_prefix0 s3074_0)) of
- SOME ((() , s3075_0)) =>
- (case ((string_drop s3074_0 s3075_0)) of
- s3076_0 =>
- (case ((creg_name_matches_prefix s3076_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3077_0)) =>
- (case ((string_drop s3076_0 s3077_0)) of
- s3078_0 =>
- (case ((sep_matches_prefix s3078_0)) of
- SOME ((() , s3079_0)) =>
- (case ((string_drop s3078_0 s3079_0)) of
- s3080_0 =>
+ ((s4608_:string ->((3)words$word#(6)words$word#string)option) s4609_0=
+ (let s4610_0 = s4609_0 in
+ if ((string_startswith s4610_0 "c.srai")) then
+ (case ((string_drop s4610_0 ((string_length "c.srai")))) of
+ s4611_0 =>
+ (case ((spc_matches_prefix0 s4611_0)) of
+ SOME ((() , s4612_0)) =>
+ (case ((string_drop s4611_0 s4612_0)) of
+ s4613_0 =>
+ (case ((creg_name_matches_prefix s4613_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4614_0)) =>
+ (case ((string_drop s4613_0 s4614_0)) of
+ s4615_0 =>
+ (case ((sep_matches_prefix s4615_0)) of
+ SOME ((() , s4616_0)) =>
+ (case ((string_drop s4615_0 s4616_0)) of
+ s4617_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3080_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3081_0)) =>
- (case ((string_drop s3080_0 s3081_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4617_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s4618_0)) =>
+ (case ((string_drop s4617_0 s4618_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -32369,30 +46189,30 @@ val _ = Define `
else NONE))`;
-(*val _s3059_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s4596_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3059_:string ->((3)words$word#(6)words$word#string)option) s3060_0=
- (let s3061_0 = s3060_0 in
- if ((string_startswith s3061_0 "c.srli")) then
- (case ((string_drop s3061_0 ((string_length "c.srli")))) of
- s3062_0 =>
- (case ((spc_matches_prefix0 s3062_0)) of
- SOME ((() , s3063_0)) =>
- (case ((string_drop s3062_0 s3063_0)) of
- s3064_0 =>
- (case ((creg_name_matches_prefix s3064_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3065_0)) =>
- (case ((string_drop s3064_0 s3065_0)) of
- s3066_0 =>
- (case ((sep_matches_prefix s3066_0)) of
- SOME ((() , s3067_0)) =>
- (case ((string_drop s3066_0 s3067_0)) of
- s3068_0 =>
+ ((s4596_:string ->((3)words$word#(6)words$word#string)option) s4597_0=
+ (let s4598_0 = s4597_0 in
+ if ((string_startswith s4598_0 "c.srli")) then
+ (case ((string_drop s4598_0 ((string_length "c.srli")))) of
+ s4599_0 =>
+ (case ((spc_matches_prefix0 s4599_0)) of
+ SOME ((() , s4600_0)) =>
+ (case ((string_drop s4599_0 s4600_0)) of
+ s4601_0 =>
+ (case ((creg_name_matches_prefix s4601_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4602_0)) =>
+ (case ((string_drop s4601_0 s4602_0)) of
+ s4603_0 =>
+ (case ((sep_matches_prefix s4603_0)) of
+ SOME ((() , s4604_0)) =>
+ (case ((string_drop s4603_0 s4604_0)) of
+ s4605_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3068_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3069_0)) =>
- (case ((string_drop s3068_0 s3069_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4605_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s4606_0)) =>
+ (case ((string_drop s4605_0 s4606_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -32408,30 +46228,30 @@ val _ = Define `
else NONE))`;
-(*val _s3047_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4584_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3047_:string ->((5)words$word#(6)words$word#string)option) s3048_0=
- (let s3049_0 = s3048_0 in
- if ((string_startswith s3049_0 "c.lui")) then
- (case ((string_drop s3049_0 ((string_length "c.lui")))) of
- s3050_0 =>
- (case ((spc_matches_prefix0 s3050_0)) of
- SOME ((() , s3051_0)) =>
- (case ((string_drop s3050_0 s3051_0)) of
- s3052_0 =>
- (case ((reg_name_matches_prefix s3052_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3053_0)) =>
- (case ((string_drop s3052_0 s3053_0)) of
- s3054_0 =>
- (case ((sep_matches_prefix s3054_0)) of
- SOME ((() , s3055_0)) =>
- (case ((string_drop s3054_0 s3055_0)) of
- s3056_0 =>
+ ((s4584_:string ->((5)words$word#(6)words$word#string)option) s4585_0=
+ (let s4586_0 = s4585_0 in
+ if ((string_startswith s4586_0 "c.lui")) then
+ (case ((string_drop s4586_0 ((string_length "c.lui")))) of
+ s4587_0 =>
+ (case ((spc_matches_prefix0 s4587_0)) of
+ SOME ((() , s4588_0)) =>
+ (case ((string_drop s4587_0 s4588_0)) of
+ s4589_0 =>
+ (case ((reg_name_matches_prefix s4589_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4590_0)) =>
+ (case ((string_drop s4589_0 s4590_0)) of
+ s4591_0 =>
+ (case ((sep_matches_prefix s4591_0)) of
+ SOME ((() , s4592_0)) =>
+ (case ((string_drop s4591_0 s4592_0)) of
+ s4593_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3056_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3057_0)) =>
- (case ((string_drop s3056_0 s3057_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4593_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4594_0)) =>
+ (case ((string_drop s4593_0 s4594_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -32447,22 +46267,22 @@ val _ = Define `
else NONE))`;
-(*val _s3039_ : string -> maybe ((mword ty6 * string))*)
+(*val _s4576_ : string -> maybe ((mword ty6 * string))*)
val _ = Define `
- ((s3039_:string ->((6)words$word#string)option) s3040_0=
- (let s3041_0 = s3040_0 in
- if ((string_startswith s3041_0 "c.addi16sp")) then
- (case ((string_drop s3041_0 ((string_length "c.addi16sp")))) of
- s3042_0 =>
- (case ((spc_matches_prefix0 s3042_0)) of
- SOME ((() , s3043_0)) =>
- (case ((string_drop s3042_0 s3043_0)) of
- s3044_0 =>
+ ((s4576_:string ->((6)words$word#string)option) s4577_0=
+ (let s4578_0 = s4577_0 in
+ if ((string_startswith s4578_0 "c.addi16sp")) then
+ (case ((string_drop s4578_0 ((string_length "c.addi16sp")))) of
+ s4579_0 =>
+ (case ((spc_matches_prefix0 s4579_0)) of
+ SOME ((() , s4580_0)) =>
+ (case ((string_drop s4579_0 s4580_0)) of
+ s4581_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3044_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3045_0)) =>
- (case ((string_drop s3044_0 s3045_0)) of s_ => SOME (imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4581_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4582_0)) =>
+ (case ((string_drop s4581_0 s4582_0)) of s_ => SOME (imm, s_) )
| _ => NONE
)
)
@@ -32472,30 +46292,30 @@ val _ = Define `
else NONE))`;
-(*val _s3027_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4564_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3027_:string ->((5)words$word#(6)words$word#string)option) s3028_0=
- (let s3029_0 = s3028_0 in
- if ((string_startswith s3029_0 "c.li")) then
- (case ((string_drop s3029_0 ((string_length "c.li")))) of
- s3030_0 =>
- (case ((spc_matches_prefix0 s3030_0)) of
- SOME ((() , s3031_0)) =>
- (case ((string_drop s3030_0 s3031_0)) of
- s3032_0 =>
- (case ((reg_name_matches_prefix s3032_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3033_0)) =>
- (case ((string_drop s3032_0 s3033_0)) of
- s3034_0 =>
- (case ((sep_matches_prefix s3034_0)) of
- SOME ((() , s3035_0)) =>
- (case ((string_drop s3034_0 s3035_0)) of
- s3036_0 =>
+ ((s4564_:string ->((5)words$word#(6)words$word#string)option) s4565_0=
+ (let s4566_0 = s4565_0 in
+ if ((string_startswith s4566_0 "c.li")) then
+ (case ((string_drop s4566_0 ((string_length "c.li")))) of
+ s4567_0 =>
+ (case ((spc_matches_prefix0 s4567_0)) of
+ SOME ((() , s4568_0)) =>
+ (case ((string_drop s4567_0 s4568_0)) of
+ s4569_0 =>
+ (case ((reg_name_matches_prefix s4569_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4570_0)) =>
+ (case ((string_drop s4569_0 s4570_0)) of
+ s4571_0 =>
+ (case ((sep_matches_prefix s4571_0)) of
+ SOME ((() , s4572_0)) =>
+ (case ((string_drop s4571_0 s4572_0)) of
+ s4573_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3036_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3037_0)) =>
- (case ((string_drop s3036_0 s3037_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4573_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4574_0)) =>
+ (case ((string_drop s4573_0 s4574_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -32511,30 +46331,30 @@ val _ = Define `
else NONE))`;
-(*val _s3015_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4552_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3015_:string ->((5)words$word#(6)words$word#string)option) s3016_0=
- (let s3017_0 = s3016_0 in
- if ((string_startswith s3017_0 "c.addiw")) then
- (case ((string_drop s3017_0 ((string_length "c.addiw")))) of
- s3018_0 =>
- (case ((spc_matches_prefix0 s3018_0)) of
- SOME ((() , s3019_0)) =>
- (case ((string_drop s3018_0 s3019_0)) of
- s3020_0 =>
- (case ((reg_name_matches_prefix s3020_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3021_0)) =>
- (case ((string_drop s3020_0 s3021_0)) of
- s3022_0 =>
- (case ((sep_matches_prefix s3022_0)) of
- SOME ((() , s3023_0)) =>
- (case ((string_drop s3022_0 s3023_0)) of
- s3024_0 =>
+ ((s4552_:string ->((5)words$word#(6)words$word#string)option) s4553_0=
+ (let s4554_0 = s4553_0 in
+ if ((string_startswith s4554_0 "c.addiw")) then
+ (case ((string_drop s4554_0 ((string_length "c.addiw")))) of
+ s4555_0 =>
+ (case ((spc_matches_prefix0 s4555_0)) of
+ SOME ((() , s4556_0)) =>
+ (case ((string_drop s4555_0 s4556_0)) of
+ s4557_0 =>
+ (case ((reg_name_matches_prefix s4557_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4558_0)) =>
+ (case ((string_drop s4557_0 s4558_0)) of
+ s4559_0 =>
+ (case ((sep_matches_prefix s4559_0)) of
+ SOME ((() , s4560_0)) =>
+ (case ((string_drop s4559_0 s4560_0)) of
+ s4561_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3024_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3025_0)) =>
- (case ((string_drop s3024_0 s3025_0)) of s_ => SOME (rsd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4561_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4562_0)) =>
+ (case ((string_drop s4561_0 s4562_0)) of s_ => SOME (rsd, imm, s_) )
| _ => NONE
)
)
@@ -32550,28 +46370,27 @@ val _ = Define `
else NONE))`;
-(*val _s3007_ : string -> maybe ((mword ty11 * string))*)
+(*val _s4544_ : string -> maybe ((mword ty11 * string))*)
val _ = Define `
- ((s3007_:string ->((11)words$word#string)option) s3008_0=
- (let s3009_0 = s3008_0 in
- if ((string_startswith s3009_0 "c.jal")) then
- (case ((string_drop s3009_0 ((string_length "c.jal")))) of
- s3010_0 =>
- (case ((spc_matches_prefix0 s3010_0)) of
- SOME ((() , s3011_0)) =>
- (case ((string_drop s3010_0 s3011_0)) of
- s3012_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3012_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__826, s3013_0)) =>
- if (((((subrange_vec_dec v__826 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__826 (( 11 : int): ii)
+ ((s4544_:string ->((11)words$word#string)option) s4545_0=
+ (let s4546_0 = s4545_0 in
+ if ((string_startswith s4546_0 "c.jal")) then
+ (case ((string_drop s4546_0 ((string_length "c.jal")))) of
+ s4547_0 =>
+ (case ((spc_matches_prefix0 s4547_0)) of
+ SOME ((() , s4548_0)) =>
+ (case ((string_drop s4547_0 s4548_0)) of
+ s4549_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4549_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1216, s4550_0)) =>
+ if (((((subrange_vec_dec v__1216 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1216 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__826 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1216 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- (case ((string_drop s3012_0 s3013_0)) of s_ => SOME (imm, s_) ) else
+ (case ((string_drop s4549_0 s4550_0)) of s_ => SOME (imm, s_) ) else
NONE
| _ => NONE
)
@@ -32582,30 +46401,30 @@ val _ = Define `
else NONE))`;
-(*val _s2995_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s4532_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s2995_:string ->((5)words$word#(6)words$word#string)option) s2996_0=
- (let s2997_0 = s2996_0 in
- if ((string_startswith s2997_0 "c.addi")) then
- (case ((string_drop s2997_0 ((string_length "c.addi")))) of
- s2998_0 =>
- (case ((spc_matches_prefix0 s2998_0)) of
- SOME ((() , s2999_0)) =>
- (case ((string_drop s2998_0 s2999_0)) of
- s3000_0 =>
- (case ((reg_name_matches_prefix s3000_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3001_0)) =>
- (case ((string_drop s3000_0 s3001_0)) of
- s3002_0 =>
- (case ((sep_matches_prefix s3002_0)) of
- SOME ((() , s3003_0)) =>
- (case ((string_drop s3002_0 s3003_0)) of
- s3004_0 =>
+ ((s4532_:string ->((5)words$word#(6)words$word#string)option) s4533_0=
+ (let s4534_0 = s4533_0 in
+ if ((string_startswith s4534_0 "c.addi")) then
+ (case ((string_drop s4534_0 ((string_length "c.addi")))) of
+ s4535_0 =>
+ (case ((spc_matches_prefix0 s4535_0)) of
+ SOME ((() , s4536_0)) =>
+ (case ((string_drop s4535_0 s4536_0)) of
+ s4537_0 =>
+ (case ((reg_name_matches_prefix s4537_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4538_0)) =>
+ (case ((string_drop s4537_0 s4538_0)) of
+ s4539_0 =>
+ (case ((sep_matches_prefix s4539_0)) of
+ SOME ((() , s4540_0)) =>
+ (case ((string_drop s4539_0 s4540_0)) of
+ s4541_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3004_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s3005_0)) =>
- (case ((string_drop s3004_0 s3005_0)) of s_ => SOME (rsd, nzi, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4541_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s4542_0)) =>
+ (case ((string_drop s4541_0 s4542_0)) of s_ => SOME (rsd, nzi, s_) )
| _ => NONE
)
)
@@ -32621,45 +46440,45 @@ val _ = Define `
else NONE))`;
-(*val _s2979_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s4516_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2979_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2980_0=
- (let s2981_0 = s2980_0 in
- if ((string_startswith s2981_0 "c.sd")) then
- (case ((string_drop s2981_0 ((string_length "c.sd")))) of
- s2982_0 =>
- (case ((spc_matches_prefix0 s2982_0)) of
- SOME ((() , s2983_0)) =>
- (case ((string_drop s2982_0 s2983_0)) of
- s2984_0 =>
- (case ((creg_name_matches_prefix s2984_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2985_0)) =>
- (case ((string_drop s2984_0 s2985_0)) of
- s2986_0 =>
- (case ((sep_matches_prefix s2986_0)) of
- SOME ((() , s2987_0)) =>
- (case ((string_drop s2986_0 s2987_0)) of
- s2988_0 =>
- (case ((creg_name_matches_prefix s2988_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2989_0)) =>
- (case ((string_drop s2988_0 s2989_0)) of
- s2990_0 =>
- (case ((sep_matches_prefix s2990_0)) of
- SOME ((() , s2991_0)) =>
- (case ((string_drop s2990_0 s2991_0)) of
- s2992_0 =>
+ ((s4516_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s4517_0=
+ (let s4518_0 = s4517_0 in
+ if ((string_startswith s4518_0 "c.sd")) then
+ (case ((string_drop s4518_0 ((string_length "c.sd")))) of
+ s4519_0 =>
+ (case ((spc_matches_prefix0 s4519_0)) of
+ SOME ((() , s4520_0)) =>
+ (case ((string_drop s4519_0 s4520_0)) of
+ s4521_0 =>
+ (case ((creg_name_matches_prefix s4521_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s4522_0)) =>
+ (case ((string_drop s4521_0 s4522_0)) of
+ s4523_0 =>
+ (case ((sep_matches_prefix s4523_0)) of
+ SOME ((() , s4524_0)) =>
+ (case ((string_drop s4523_0 s4524_0)) of
+ s4525_0 =>
+ (case ((creg_name_matches_prefix s4525_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s4526_0)) =>
+ (case ((string_drop s4525_0 s4526_0)) of
+ s4527_0 =>
+ (case ((sep_matches_prefix s4527_0)) of
+ SOME ((() , s4528_0)) =>
+ (case ((string_drop s4527_0 s4528_0)) of
+ s4529_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2992_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4529_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__828, s2993_0)) =>
- if (((((subrange_vec_dec v__828 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1218, s4530_0)) =>
+ if (((((subrange_vec_dec v__1218 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__828 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1218 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__828 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- (case ((string_drop s2992_0 s2993_0)) of
+ ((subrange_vec_dec v__1218 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s4529_0 s4530_0)) of
s_ => SOME (rsc1, rsc2, uimm, s_)
) else NONE
| _ => NONE
@@ -32683,45 +46502,45 @@ val _ = Define `
else NONE))`;
-(*val _s2963_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s4500_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2963_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2964_0=
- (let s2965_0 = s2964_0 in
- if ((string_startswith s2965_0 "c.sw")) then
- (case ((string_drop s2965_0 ((string_length "c.sw")))) of
- s2966_0 =>
- (case ((spc_matches_prefix0 s2966_0)) of
- SOME ((() , s2967_0)) =>
- (case ((string_drop s2966_0 s2967_0)) of
- s2968_0 =>
- (case ((creg_name_matches_prefix s2968_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2969_0)) =>
- (case ((string_drop s2968_0 s2969_0)) of
- s2970_0 =>
- (case ((sep_matches_prefix s2970_0)) of
- SOME ((() , s2971_0)) =>
- (case ((string_drop s2970_0 s2971_0)) of
- s2972_0 =>
- (case ((creg_name_matches_prefix s2972_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2973_0)) =>
- (case ((string_drop s2972_0 s2973_0)) of
- s2974_0 =>
- (case ((sep_matches_prefix s2974_0)) of
- SOME ((() , s2975_0)) =>
- (case ((string_drop s2974_0 s2975_0)) of
- s2976_0 =>
+ ((s4500_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s4501_0=
+ (let s4502_0 = s4501_0 in
+ if ((string_startswith s4502_0 "c.sw")) then
+ (case ((string_drop s4502_0 ((string_length "c.sw")))) of
+ s4503_0 =>
+ (case ((spc_matches_prefix0 s4503_0)) of
+ SOME ((() , s4504_0)) =>
+ (case ((string_drop s4503_0 s4504_0)) of
+ s4505_0 =>
+ (case ((creg_name_matches_prefix s4505_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s4506_0)) =>
+ (case ((string_drop s4505_0 s4506_0)) of
+ s4507_0 =>
+ (case ((sep_matches_prefix s4507_0)) of
+ SOME ((() , s4508_0)) =>
+ (case ((string_drop s4507_0 s4508_0)) of
+ s4509_0 =>
+ (case ((creg_name_matches_prefix s4509_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s4510_0)) =>
+ (case ((string_drop s4509_0 s4510_0)) of
+ s4511_0 =>
+ (case ((sep_matches_prefix s4511_0)) of
+ SOME ((() , s4512_0)) =>
+ (case ((string_drop s4511_0 s4512_0)) of
+ s4513_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2976_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4513_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__830, s2977_0)) =>
- if (((((subrange_vec_dec v__830 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1220, s4514_0)) =>
+ if (((((subrange_vec_dec v__1220 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__830 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1220 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__830 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- (case ((string_drop s2976_0 s2977_0)) of
+ ((subrange_vec_dec v__1220 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s4513_0 s4514_0)) of
s_ => SOME (rsc1, rsc2, uimm, s_)
) else NONE
| _ => NONE
@@ -32745,45 +46564,45 @@ val _ = Define `
else NONE))`;
-(*val _s2947_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s4484_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2947_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2948_0=
- (let s2949_0 = s2948_0 in
- if ((string_startswith s2949_0 "c.ld")) then
- (case ((string_drop s2949_0 ((string_length "c.ld")))) of
- s2950_0 =>
- (case ((spc_matches_prefix0 s2950_0)) of
- SOME ((() , s2951_0)) =>
- (case ((string_drop s2950_0 s2951_0)) of
- s2952_0 =>
- (case ((creg_name_matches_prefix s2952_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2953_0)) =>
- (case ((string_drop s2952_0 s2953_0)) of
- s2954_0 =>
- (case ((sep_matches_prefix s2954_0)) of
- SOME ((() , s2955_0)) =>
- (case ((string_drop s2954_0 s2955_0)) of
- s2956_0 =>
- (case ((creg_name_matches_prefix s2956_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2957_0)) =>
- (case ((string_drop s2956_0 s2957_0)) of
- s2958_0 =>
- (case ((sep_matches_prefix s2958_0)) of
- SOME ((() , s2959_0)) =>
- (case ((string_drop s2958_0 s2959_0)) of
- s2960_0 =>
+ ((s4484_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s4485_0=
+ (let s4486_0 = s4485_0 in
+ if ((string_startswith s4486_0 "c.ld")) then
+ (case ((string_drop s4486_0 ((string_length "c.ld")))) of
+ s4487_0 =>
+ (case ((spc_matches_prefix0 s4487_0)) of
+ SOME ((() , s4488_0)) =>
+ (case ((string_drop s4487_0 s4488_0)) of
+ s4489_0 =>
+ (case ((creg_name_matches_prefix s4489_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s4490_0)) =>
+ (case ((string_drop s4489_0 s4490_0)) of
+ s4491_0 =>
+ (case ((sep_matches_prefix s4491_0)) of
+ SOME ((() , s4492_0)) =>
+ (case ((string_drop s4491_0 s4492_0)) of
+ s4493_0 =>
+ (case ((creg_name_matches_prefix s4493_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s4494_0)) =>
+ (case ((string_drop s4493_0 s4494_0)) of
+ s4495_0 =>
+ (case ((sep_matches_prefix s4495_0)) of
+ SOME ((() , s4496_0)) =>
+ (case ((string_drop s4495_0 s4496_0)) of
+ s4497_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2960_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4497_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__832, s2961_0)) =>
- if (((((subrange_vec_dec v__832 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1222, s4498_0)) =>
+ if (((((subrange_vec_dec v__1222 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__832 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1222 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__832 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- (case ((string_drop s2960_0 s2961_0)) of
+ ((subrange_vec_dec v__1222 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s4497_0 s4498_0)) of
s_ => SOME (rdc, rsc, uimm, s_)
) else NONE
| _ => NONE
@@ -32807,45 +46626,45 @@ val _ = Define `
else NONE))`;
-(*val _s2931_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s4468_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2931_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2932_0=
- (let s2933_0 = s2932_0 in
- if ((string_startswith s2933_0 "c.lw")) then
- (case ((string_drop s2933_0 ((string_length "c.lw")))) of
- s2934_0 =>
- (case ((spc_matches_prefix0 s2934_0)) of
- SOME ((() , s2935_0)) =>
- (case ((string_drop s2934_0 s2935_0)) of
- s2936_0 =>
- (case ((creg_name_matches_prefix s2936_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2937_0)) =>
- (case ((string_drop s2936_0 s2937_0)) of
- s2938_0 =>
- (case ((sep_matches_prefix s2938_0)) of
- SOME ((() , s2939_0)) =>
- (case ((string_drop s2938_0 s2939_0)) of
- s2940_0 =>
- (case ((creg_name_matches_prefix s2940_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2941_0)) =>
- (case ((string_drop s2940_0 s2941_0)) of
- s2942_0 =>
- (case ((sep_matches_prefix s2942_0)) of
- SOME ((() , s2943_0)) =>
- (case ((string_drop s2942_0 s2943_0)) of
- s2944_0 =>
+ ((s4468_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s4469_0=
+ (let s4470_0 = s4469_0 in
+ if ((string_startswith s4470_0 "c.lw")) then
+ (case ((string_drop s4470_0 ((string_length "c.lw")))) of
+ s4471_0 =>
+ (case ((spc_matches_prefix0 s4471_0)) of
+ SOME ((() , s4472_0)) =>
+ (case ((string_drop s4471_0 s4472_0)) of
+ s4473_0 =>
+ (case ((creg_name_matches_prefix s4473_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s4474_0)) =>
+ (case ((string_drop s4473_0 s4474_0)) of
+ s4475_0 =>
+ (case ((sep_matches_prefix s4475_0)) of
+ SOME ((() , s4476_0)) =>
+ (case ((string_drop s4475_0 s4476_0)) of
+ s4477_0 =>
+ (case ((creg_name_matches_prefix s4477_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s4478_0)) =>
+ (case ((string_drop s4477_0 s4478_0)) of
+ s4479_0 =>
+ (case ((sep_matches_prefix s4479_0)) of
+ SOME ((() , s4480_0)) =>
+ (case ((string_drop s4479_0 s4480_0)) of
+ s4481_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2944_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4481_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__834, s2945_0)) =>
- if (((((subrange_vec_dec v__834 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1224, s4482_0)) =>
+ if (((((subrange_vec_dec v__1224 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__834 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1224 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__834 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- (case ((string_drop s2944_0 s2945_0)) of
+ ((subrange_vec_dec v__1224 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s4481_0 s4482_0)) of
s_ => SOME (rdc, rsc, uimm, s_)
) else NONE
| _ => NONE
@@ -32869,36 +46688,36 @@ val _ = Define `
else NONE))`;
-(*val _s2919_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s4456_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s2919_:string ->((3)words$word#(8)words$word#string)option) s2920_0=
- (let s2921_0 = s2920_0 in
- if ((string_startswith s2921_0 "c.addi4spn")) then
- (case ((string_drop s2921_0 ((string_length "c.addi4spn")))) of
- s2922_0 =>
- (case ((spc_matches_prefix0 s2922_0)) of
- SOME ((() , s2923_0)) =>
- (case ((string_drop s2922_0 s2923_0)) of
- s2924_0 =>
- (case ((creg_name_matches_prefix s2924_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2925_0)) =>
- (case ((string_drop s2924_0 s2925_0)) of
- s2926_0 =>
- (case ((sep_matches_prefix s2926_0)) of
- SOME ((() , s2927_0)) =>
- (case ((string_drop s2926_0 s2927_0)) of
- s2928_0 =>
+ ((s4456_:string ->((3)words$word#(8)words$word#string)option) s4457_0=
+ (let s4458_0 = s4457_0 in
+ if ((string_startswith s4458_0 "c.addi4spn")) then
+ (case ((string_drop s4458_0 ((string_length "c.addi4spn")))) of
+ s4459_0 =>
+ (case ((spc_matches_prefix0 s4459_0)) of
+ SOME ((() , s4460_0)) =>
+ (case ((string_drop s4459_0 s4460_0)) of
+ s4461_0 =>
+ (case ((creg_name_matches_prefix s4461_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s4462_0)) =>
+ (case ((string_drop s4461_0 s4462_0)) of
+ s4463_0 =>
+ (case ((sep_matches_prefix s4463_0)) of
+ SOME ((() , s4464_0)) =>
+ (case ((string_drop s4463_0 s4464_0)) of
+ s4465_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2928_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__836, s2929_0)) =>
- if (((((subrange_vec_dec v__836 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4465_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1226, s4466_0)) =>
+ if (((((subrange_vec_dec v__1226 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__836 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1226 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__836 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- (case ((string_drop s2928_0 s2929_0)) of s_ => SOME (rdc, nzimm, s_) )
+ ((subrange_vec_dec v__1226 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ (case ((string_drop s4465_0 s4466_0)) of s_ => SOME (rdc, nzimm, s_) )
else NONE
| _ => NONE
)
@@ -32915,69 +46734,74 @@ val _ = Define `
else NONE))`;
-(*val _s2915_ : string -> maybe string*)
+(*val _s4452_ : string -> maybe string*)
val _ = Define `
- ((s2915_:string ->(string)option) s2916_0=
- (let s2917_0 = s2916_0 in
- if ((string_startswith s2917_0 "c.nop")) then
- (case ((string_drop s2917_0 ((string_length "c.nop")))) of s_ => SOME s_ )
+ ((s4452_:string ->(string)option) s4453_0=
+ (let s4454_0 = s4453_0 in
+ if ((string_startswith s4454_0 "c.nop")) then
+ (case ((string_drop s4454_0 ((string_length "c.nop")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2891_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4426_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2891_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s2892_0=
- ((case s2892_0 of
- s2893_0 =>
- (case ((amo_mnemonic_matches_prefix s2893_0)) of
- SOME ((op, s2894_0)) =>
- let s2895_0 = (string_drop s2893_0 s2894_0) in
- if ((string_startswith s2895_0 ".")) then
- (case ((string_drop s2895_0 ((string_length ".")))) of
- s2896_0 =>
- (case ((size_mnemonic_matches_prefix s2896_0)) of
- SOME ((width, s2897_0)) =>
- (case ((string_drop s2896_0 s2897_0)) of
- s2898_0 =>
- (case ((maybe_aq_matches_prefix s2898_0)) of
- SOME ((aq, s2899_0)) =>
- (case ((string_drop s2898_0 s2899_0)) of
- s2900_0 =>
- (case ((maybe_rl_matches_prefix s2900_0)) of
- SOME ((rl, s2901_0)) =>
- (case ((string_drop s2900_0 s2901_0)) of
- s2902_0 =>
- (case ((spc_matches_prefix0 s2902_0)) of
- SOME ((() , s2903_0)) =>
- (case ((string_drop s2902_0 s2903_0)) of
- s2904_0 =>
- (case ((reg_name_matches_prefix s2904_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2905_0)) =>
- (case ((string_drop s2904_0 s2905_0)) of
- s2906_0 =>
- (case ((sep_matches_prefix s2906_0)) of
- SOME ((() , s2907_0)) =>
- (case ((string_drop s2906_0 s2907_0)) of
- s2908_0 =>
- (case ((reg_name_matches_prefix s2908_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2909_0)) =>
- (case ((string_drop s2908_0 s2909_0)) of
- s2910_0 =>
- (case ((sep_matches_prefix s2910_0)) of
- SOME ((() , s2911_0)) =>
- (case ((string_drop s2910_0 s2911_0)) of
- s2912_0 =>
- (case ((reg_name_matches_prefix s2912_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2913_0)) =>
- (case ((string_drop s2912_0 s2913_0)) of
- s_ =>
- SOME (op, width, aq, rl, rd, rs1, rs2, s_)
- )
- | _ => NONE
- )
- )
+ ((s4426_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4427_0=
+ ((case s4427_0 of
+ s4428_0 =>
+ (case ((amo_mnemonic_matches_prefix s4428_0)) of
+ SOME ((op, s4429_0)) =>
+ let s4430_0 = (string_drop s4428_0 s4429_0) in
+ if ((string_startswith s4430_0 ".")) then
+ (case ((string_drop s4430_0 ((string_length ".")))) of
+ s4431_0 =>
+ (case ((size_mnemonic_matches_prefix s4431_0)) of
+ SOME ((width, s4432_0)) =>
+ (case ((string_drop s4431_0 s4432_0)) of
+ s4433_0 =>
+ (case ((maybe_aq_matches_prefix s4433_0)) of
+ SOME ((aq, s4434_0)) =>
+ (case ((string_drop s4433_0 s4434_0)) of
+ s4435_0 =>
+ (case ((maybe_rl_matches_prefix s4435_0)) of
+ SOME ((rl, s4436_0)) =>
+ (case ((string_drop s4435_0 s4436_0)) of
+ s4437_0 =>
+ (case ((spc_matches_prefix0 s4437_0)) of
+ SOME ((() , s4438_0)) =>
+ (case ((string_drop s4437_0 s4438_0)) of
+ s4439_0 =>
+ (case ((reg_name_matches_prefix s4439_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4440_0)) =>
+ (case ((string_drop s4439_0 s4440_0)) of
+ s4441_0 =>
+ (case ((sep_matches_prefix s4441_0)) of
+ SOME ((() , s4442_0)) =>
+ (case ((string_drop s4441_0 s4442_0)) of
+ s4443_0 =>
+ (case ((reg_name_matches_prefix s4443_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4444_0)) =>
+ (case ((string_drop s4443_0 s4444_0)) of
+ s4445_0 =>
+ (case ((sep_matches_prefix s4445_0)) of
+ SOME ((() , s4446_0)) =>
+ let s4447_0 = (string_drop s4445_0 s4446_0) in
+ if ((string_startswith s4447_0 "(")) then
+ (case ((string_drop s4447_0 ((string_length "(")))) of
+ s4448_0 =>
+ (case ((reg_name_matches_prefix s4448_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4449_0)) =>
+ let s4450_0 = (string_drop s4448_0 s4449_0) in
+ if ((string_startswith s4450_0 ")")) then
+ (case ((string_drop s4450_0 ((string_length ")")))) of
+ s_ =>
+ SOME (op, width, aq, rl, rd, rs2, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -33007,49 +46831,49 @@ val _ = Define `
)))`;
-(*val _s2869_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2869_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s2870_0=
- (let s2871_0 = s2870_0 in
- if ((string_startswith s2871_0 "sc.")) then
- (case ((string_drop s2871_0 ((string_length "sc.")))) of
- s2872_0 =>
- (case ((size_mnemonic_matches_prefix s2872_0)) of
- SOME ((size1, s2873_0)) =>
- (case ((string_drop s2872_0 s2873_0)) of
- s2874_0 =>
- (case ((maybe_aq_matches_prefix s2874_0)) of
- SOME ((aq, s2875_0)) =>
- (case ((string_drop s2874_0 s2875_0)) of
- s2876_0 =>
- (case ((maybe_rl_matches_prefix s2876_0)) of
- SOME ((rl, s2877_0)) =>
- (case ((string_drop s2876_0 s2877_0)) of
- s2878_0 =>
- (case ((spc_matches_prefix0 s2878_0)) of
- SOME ((() , s2879_0)) =>
- (case ((string_drop s2878_0 s2879_0)) of
- s2880_0 =>
- (case ((reg_name_matches_prefix s2880_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2881_0)) =>
- (case ((string_drop s2880_0 s2881_0)) of
- s2882_0 =>
- (case ((sep_matches_prefix s2882_0)) of
- SOME ((() , s2883_0)) =>
- (case ((string_drop s2882_0 s2883_0)) of
- s2884_0 =>
- (case ((reg_name_matches_prefix s2884_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2885_0)) =>
- (case ((string_drop s2884_0 s2885_0)) of
- s2886_0 =>
- (case ((sep_matches_prefix s2886_0)) of
- SOME ((() , s2887_0)) =>
- (case ((string_drop s2886_0 s2887_0)) of
- s2888_0 =>
- (case ((reg_name_matches_prefix s2888_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2889_0)) =>
- (case ((string_drop s2888_0 s2889_0)) of
+(*val _s4404_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4404_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s4405_0=
+ (let s4406_0 = s4405_0 in
+ if ((string_startswith s4406_0 "sc.")) then
+ (case ((string_drop s4406_0 ((string_length "sc.")))) of
+ s4407_0 =>
+ (case ((size_mnemonic_matches_prefix s4407_0)) of
+ SOME ((size1, s4408_0)) =>
+ (case ((string_drop s4407_0 s4408_0)) of
+ s4409_0 =>
+ (case ((maybe_aq_matches_prefix s4409_0)) of
+ SOME ((aq, s4410_0)) =>
+ (case ((string_drop s4409_0 s4410_0)) of
+ s4411_0 =>
+ (case ((maybe_rl_matches_prefix s4411_0)) of
+ SOME ((rl, s4412_0)) =>
+ (case ((string_drop s4411_0 s4412_0)) of
+ s4413_0 =>
+ (case ((spc_matches_prefix0 s4413_0)) of
+ SOME ((() , s4414_0)) =>
+ (case ((string_drop s4413_0 s4414_0)) of
+ s4415_0 =>
+ (case ((reg_name_matches_prefix s4415_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4416_0)) =>
+ (case ((string_drop s4415_0 s4416_0)) of
+ s4417_0 =>
+ (case ((sep_matches_prefix s4417_0)) of
+ SOME ((() , s4418_0)) =>
+ (case ((string_drop s4417_0 s4418_0)) of
+ s4419_0 =>
+ (case ((reg_name_matches_prefix s4419_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4420_0)) =>
+ (case ((string_drop s4419_0 s4420_0)) of
+ s4421_0 =>
+ (case ((sep_matches_prefix s4421_0)) of
+ SOME ((() , s4422_0)) =>
+ (case ((string_drop s4421_0 s4422_0)) of
+ s4423_0 =>
+ (case ((reg_name_matches_prefix s4423_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4424_0)) =>
+ (case ((string_drop s4423_0 s4424_0)) of
s_ =>
SOME (size1, aq, rl, rd, rs1, rs2, s_)
)
@@ -33083,41 +46907,41 @@ val _ = Define `
else NONE))`;
-(*val _s2851_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * string))*)
+(*val _s4386_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2851_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#string)option) s2852_0=
- (let s2853_0 = s2852_0 in
- if ((string_startswith s2853_0 "lr.")) then
- (case ((string_drop s2853_0 ((string_length "lr.")))) of
- s2854_0 =>
- (case ((size_mnemonic_matches_prefix s2854_0)) of
- SOME ((size1, s2855_0)) =>
- (case ((string_drop s2854_0 s2855_0)) of
- s2856_0 =>
- (case ((maybe_aq_matches_prefix s2856_0)) of
- SOME ((aq, s2857_0)) =>
- (case ((string_drop s2856_0 s2857_0)) of
- s2858_0 =>
- (case ((maybe_rl_matches_prefix s2858_0)) of
- SOME ((rl, s2859_0)) =>
- (case ((string_drop s2858_0 s2859_0)) of
- s2860_0 =>
- (case ((spc_matches_prefix0 s2860_0)) of
- SOME ((() , s2861_0)) =>
- (case ((string_drop s2860_0 s2861_0)) of
- s2862_0 =>
- (case ((reg_name_matches_prefix s2862_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2863_0)) =>
- (case ((string_drop s2862_0 s2863_0)) of
- s2864_0 =>
- (case ((sep_matches_prefix s2864_0)) of
- SOME ((() , s2865_0)) =>
- (case ((string_drop s2864_0 s2865_0)) of
- s2866_0 =>
- (case ((reg_name_matches_prefix s2866_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2867_0)) =>
- (case ((string_drop s2866_0 s2867_0)) of
+ ((s4386_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#string)option) s4387_0=
+ (let s4388_0 = s4387_0 in
+ if ((string_startswith s4388_0 "lr.")) then
+ (case ((string_drop s4388_0 ((string_length "lr.")))) of
+ s4389_0 =>
+ (case ((size_mnemonic_matches_prefix s4389_0)) of
+ SOME ((size1, s4390_0)) =>
+ (case ((string_drop s4389_0 s4390_0)) of
+ s4391_0 =>
+ (case ((maybe_aq_matches_prefix s4391_0)) of
+ SOME ((aq, s4392_0)) =>
+ (case ((string_drop s4391_0 s4392_0)) of
+ s4393_0 =>
+ (case ((maybe_rl_matches_prefix s4393_0)) of
+ SOME ((rl, s4394_0)) =>
+ (case ((string_drop s4393_0 s4394_0)) of
+ s4395_0 =>
+ (case ((spc_matches_prefix0 s4395_0)) of
+ SOME ((() , s4396_0)) =>
+ (case ((string_drop s4395_0 s4396_0)) of
+ s4397_0 =>
+ (case ((reg_name_matches_prefix s4397_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4398_0)) =>
+ (case ((string_drop s4397_0 s4398_0)) of
+ s4399_0 =>
+ (case ((sep_matches_prefix s4399_0)) of
+ SOME ((() , s4400_0)) =>
+ (case ((string_drop s4399_0 s4400_0)) of
+ s4401_0 =>
+ (case ((reg_name_matches_prefix s4401_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4402_0)) =>
+ (case ((string_drop s4401_0 s4402_0)) of
s_ => SOME (size1, aq, rl, rd, rs1, s_)
)
| _ => NONE
@@ -33144,29 +46968,29 @@ val _ = Define `
else NONE))`;
-(*val _s2839_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s4374_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2839_:string ->((5)words$word#(5)words$word#string)option) s2840_0=
- (let s2841_0 = s2840_0 in
- if ((string_startswith s2841_0 "sfence.vma")) then
- (case ((string_drop s2841_0 ((string_length "sfence.vma")))) of
- s2842_0 =>
- (case ((spc_matches_prefix0 s2842_0)) of
- SOME ((() , s2843_0)) =>
- (case ((string_drop s2842_0 s2843_0)) of
- s2844_0 =>
- (case ((reg_name_matches_prefix s2844_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2845_0)) =>
- (case ((string_drop s2844_0 s2845_0)) of
- s2846_0 =>
- (case ((sep_matches_prefix s2846_0)) of
- SOME ((() , s2847_0)) =>
- (case ((string_drop s2846_0 s2847_0)) of
- s2848_0 =>
- (case ((reg_name_matches_prefix s2848_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2849_0)) =>
- (case ((string_drop s2848_0 s2849_0)) of s_ => SOME (rs1, rs2, s_) )
+ ((s4374_:string ->((5)words$word#(5)words$word#string)option) s4375_0=
+ (let s4376_0 = s4375_0 in
+ if ((string_startswith s4376_0 "sfence.vma")) then
+ (case ((string_drop s4376_0 ((string_length "sfence.vma")))) of
+ s4377_0 =>
+ (case ((spc_matches_prefix0 s4377_0)) of
+ SOME ((() , s4378_0)) =>
+ (case ((string_drop s4377_0 s4378_0)) of
+ s4379_0 =>
+ (case ((reg_name_matches_prefix s4379_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4380_0)) =>
+ (case ((string_drop s4379_0 s4380_0)) of
+ s4381_0 =>
+ (case ((sep_matches_prefix s4381_0)) of
+ SOME ((() , s4382_0)) =>
+ (case ((string_drop s4381_0 s4382_0)) of
+ s4383_0 =>
+ (case ((reg_name_matches_prefix s4383_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4384_0)) =>
+ (case ((string_drop s4383_0 s4384_0)) of s_ => SOME (rs1, rs2, s_) )
| _ => NONE
)
)
@@ -33182,93 +47006,93 @@ val _ = Define `
else NONE))`;
-(*val _s2835_ : string -> maybe string*)
+(*val _s4370_ : string -> maybe string*)
val _ = Define `
- ((s2835_:string ->(string)option) s2836_0=
- (let s2837_0 = s2836_0 in
- if ((string_startswith s2837_0 "wfi")) then
- (case ((string_drop s2837_0 ((string_length "wfi")))) of s_ => SOME s_ )
+ ((s4370_:string ->(string)option) s4371_0=
+ (let s4372_0 = s4371_0 in
+ if ((string_startswith s4372_0 "wfi")) then
+ (case ((string_drop s4372_0 ((string_length "wfi")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2831_ : string -> maybe string*)
+(*val _s4366_ : string -> maybe string*)
val _ = Define `
- ((s2831_:string ->(string)option) s2832_0=
- (let s2833_0 = s2832_0 in
- if ((string_startswith s2833_0 "ebreak")) then
- (case ((string_drop s2833_0 ((string_length "ebreak")))) of
+ ((s4366_:string ->(string)option) s4367_0=
+ (let s4368_0 = s4367_0 in
+ if ((string_startswith s4368_0 "ebreak")) then
+ (case ((string_drop s4368_0 ((string_length "ebreak")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s2827_ : string -> maybe string*)
+(*val _s4362_ : string -> maybe string*)
val _ = Define `
- ((s2827_:string ->(string)option) s2828_0=
- (let s2829_0 = s2828_0 in
- if ((string_startswith s2829_0 "sret")) then
- (case ((string_drop s2829_0 ((string_length "sret")))) of s_ => SOME s_ )
+ ((s4362_:string ->(string)option) s4363_0=
+ (let s4364_0 = s4363_0 in
+ if ((string_startswith s4364_0 "sret")) then
+ (case ((string_drop s4364_0 ((string_length "sret")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2823_ : string -> maybe string*)
+(*val _s4358_ : string -> maybe string*)
val _ = Define `
- ((s2823_:string ->(string)option) s2824_0=
- (let s2825_0 = s2824_0 in
- if ((string_startswith s2825_0 "mret")) then
- (case ((string_drop s2825_0 ((string_length "mret")))) of s_ => SOME s_ )
+ ((s4358_:string ->(string)option) s4359_0=
+ (let s4360_0 = s4359_0 in
+ if ((string_startswith s4360_0 "mret")) then
+ (case ((string_drop s4360_0 ((string_length "mret")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2819_ : string -> maybe string*)
+(*val _s4354_ : string -> maybe string*)
val _ = Define `
- ((s2819_:string ->(string)option) s2820_0=
- (let s2821_0 = s2820_0 in
- if ((string_startswith s2821_0 "ecall")) then
- (case ((string_drop s2821_0 ((string_length "ecall")))) of s_ => SOME s_ )
+ ((s4354_:string ->(string)option) s4355_0=
+ (let s4356_0 = s4355_0 in
+ if ((string_startswith s4356_0 "ecall")) then
+ (case ((string_drop s4356_0 ((string_length "ecall")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2815_ : string -> maybe string*)
+(*val _s4350_ : string -> maybe string*)
val _ = Define `
- ((s2815_:string ->(string)option) s2816_0=
- (let s2817_0 = s2816_0 in
- if ((string_startswith s2817_0 "fence.i")) then
- (case ((string_drop s2817_0 ((string_length "fence.i")))) of
+ ((s4350_:string ->(string)option) s4351_0=
+ (let s4352_0 = s4351_0 in
+ if ((string_startswith s4352_0 "fence.i")) then
+ (case ((string_drop s4352_0 ((string_length "fence.i")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s2803_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
+(*val _s4338_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
val _ = Define `
- ((s2803_:string ->((4)words$word#(4)words$word#string)option) s2804_0=
- (let s2805_0 = s2804_0 in
- if ((string_startswith s2805_0 "fence.tso")) then
- (case ((string_drop s2805_0 ((string_length "fence.tso")))) of
- s2806_0 =>
- (case ((spc_matches_prefix0 s2806_0)) of
- SOME ((() , s2807_0)) =>
- (case ((string_drop s2806_0 s2807_0)) of
- s2808_0 =>
- (case ((fence_bits_matches_prefix s2808_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s2809_0)) =>
- (case ((string_drop s2808_0 s2809_0)) of
- s2810_0 =>
- (case ((sep_matches_prefix s2810_0)) of
- SOME ((() , s2811_0)) =>
- (case ((string_drop s2810_0 s2811_0)) of
- s2812_0 =>
- (case ((fence_bits_matches_prefix s2812_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s2813_0)) =>
- (case ((string_drop s2812_0 s2813_0)) of s_ => SOME (pred, succ, s_) )
+ ((s4338_:string ->((4)words$word#(4)words$word#string)option) s4339_0=
+ (let s4340_0 = s4339_0 in
+ if ((string_startswith s4340_0 "fence.tso")) then
+ (case ((string_drop s4340_0 ((string_length "fence.tso")))) of
+ s4341_0 =>
+ (case ((spc_matches_prefix0 s4341_0)) of
+ SOME ((() , s4342_0)) =>
+ (case ((string_drop s4341_0 s4342_0)) of
+ s4343_0 =>
+ (case ((fence_bits_matches_prefix s4343_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s4344_0)) =>
+ (case ((string_drop s4343_0 s4344_0)) of
+ s4345_0 =>
+ (case ((sep_matches_prefix s4345_0)) of
+ SOME ((() , s4346_0)) =>
+ (case ((string_drop s4345_0 s4346_0)) of
+ s4347_0 =>
+ (case ((fence_bits_matches_prefix s4347_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s4348_0)) =>
+ (case ((string_drop s4347_0 s4348_0)) of s_ => SOME (pred, succ, s_) )
| _ => NONE
)
)
@@ -33284,29 +47108,29 @@ val _ = Define `
else NONE))`;
-(*val _s2791_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
+(*val _s4326_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
val _ = Define `
- ((s2791_:string ->((4)words$word#(4)words$word#string)option) s2792_0=
- (let s2793_0 = s2792_0 in
- if ((string_startswith s2793_0 "fence")) then
- (case ((string_drop s2793_0 ((string_length "fence")))) of
- s2794_0 =>
- (case ((spc_matches_prefix0 s2794_0)) of
- SOME ((() , s2795_0)) =>
- (case ((string_drop s2794_0 s2795_0)) of
- s2796_0 =>
- (case ((fence_bits_matches_prefix s2796_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s2797_0)) =>
- (case ((string_drop s2796_0 s2797_0)) of
- s2798_0 =>
- (case ((sep_matches_prefix s2798_0)) of
- SOME ((() , s2799_0)) =>
- (case ((string_drop s2798_0 s2799_0)) of
- s2800_0 =>
- (case ((fence_bits_matches_prefix s2800_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s2801_0)) =>
- (case ((string_drop s2800_0 s2801_0)) of s_ => SOME (pred, succ, s_) )
+ ((s4326_:string ->((4)words$word#(4)words$word#string)option) s4327_0=
+ (let s4328_0 = s4327_0 in
+ if ((string_startswith s4328_0 "fence")) then
+ (case ((string_drop s4328_0 ((string_length "fence")))) of
+ s4329_0 =>
+ (case ((spc_matches_prefix0 s4329_0)) of
+ SOME ((() , s4330_0)) =>
+ (case ((string_drop s4329_0 s4330_0)) of
+ s4331_0 =>
+ (case ((fence_bits_matches_prefix s4331_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s4332_0)) =>
+ (case ((string_drop s4331_0 s4332_0)) of
+ s4333_0 =>
+ (case ((sep_matches_prefix s4333_0)) of
+ SOME ((() , s4334_0)) =>
+ (case ((string_drop s4333_0 s4334_0)) of
+ s4335_0 =>
+ (case ((fence_bits_matches_prefix s4335_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s4336_0)) =>
+ (case ((string_drop s4335_0 s4336_0)) of s_ => SOME (pred, succ, s_) )
| _ => NONE
)
)
@@ -33322,41 +47146,41 @@ val _ = Define `
else NONE))`;
-(*val _s2774_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4309_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2774_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word#string)option) s2775_0=
- ((case s2775_0 of
- s2776_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s2776_0)) of
- SOME ((op, s2777_0)) =>
- (case ((string_drop s2776_0 s2777_0)) of
- s2778_0 =>
- (case ((spc_matches_prefix0 s2778_0)) of
- SOME ((() , s2779_0)) =>
- (case ((string_drop s2778_0 s2779_0)) of
- s2780_0 =>
- (case ((reg_name_matches_prefix s2780_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2781_0)) =>
- (case ((string_drop s2780_0 s2781_0)) of
- s2782_0 =>
- (case ((sep_matches_prefix s2782_0)) of
- SOME ((() , s2783_0)) =>
- (case ((string_drop s2782_0 s2783_0)) of
- s2784_0 =>
- (case ((reg_name_matches_prefix s2784_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2785_0)) =>
- (case ((string_drop s2784_0 s2785_0)) of
- s2786_0 =>
- (case ((sep_matches_prefix s2786_0)) of
- SOME ((() , s2787_0)) =>
- (case ((string_drop s2786_0 s2787_0)) of
- s2788_0 =>
+ ((s4309_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word#string)option) s4310_0=
+ ((case s4310_0 of
+ s4311_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s4311_0)) of
+ SOME ((op, s4312_0)) =>
+ (case ((string_drop s4311_0 s4312_0)) of
+ s4313_0 =>
+ (case ((spc_matches_prefix0 s4313_0)) of
+ SOME ((() , s4314_0)) =>
+ (case ((string_drop s4313_0 s4314_0)) of
+ s4315_0 =>
+ (case ((reg_name_matches_prefix s4315_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4316_0)) =>
+ (case ((string_drop s4315_0 s4316_0)) of
+ s4317_0 =>
+ (case ((sep_matches_prefix s4317_0)) of
+ SOME ((() , s4318_0)) =>
+ (case ((string_drop s4317_0 s4318_0)) of
+ s4319_0 =>
+ (case ((reg_name_matches_prefix s4319_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4320_0)) =>
+ (case ((string_drop s4319_0 s4320_0)) of
+ s4321_0 =>
+ (case ((sep_matches_prefix s4321_0)) of
+ SOME ((() , s4322_0)) =>
+ (case ((string_drop s4321_0 s4322_0)) of
+ s4323_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2788_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s2789_0)) =>
- (case ((string_drop s2788_0 s2789_0)) of
+ s4323_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s4324_0)) =>
+ (case ((string_drop s4323_0 s4324_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -33382,39 +47206,39 @@ val _ = Define `
)))`;
-(*val _s2757_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2757_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word#string)option) s2758_0=
- ((case s2758_0 of
- s2759_0 =>
- (case ((rtypew_mnemonic_matches_prefix s2759_0)) of
- SOME ((op, s2760_0)) =>
- (case ((string_drop s2759_0 s2760_0)) of
- s2761_0 =>
- (case ((spc_matches_prefix0 s2761_0)) of
- SOME ((() , s2762_0)) =>
- (case ((string_drop s2761_0 s2762_0)) of
- s2763_0 =>
- (case ((reg_name_matches_prefix s2763_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2764_0)) =>
- (case ((string_drop s2763_0 s2764_0)) of
- s2765_0 =>
- (case ((sep_matches_prefix s2765_0)) of
- SOME ((() , s2766_0)) =>
- (case ((string_drop s2765_0 s2766_0)) of
- s2767_0 =>
- (case ((reg_name_matches_prefix s2767_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2768_0)) =>
- (case ((string_drop s2767_0 s2768_0)) of
- s2769_0 =>
- (case ((sep_matches_prefix s2769_0)) of
- SOME ((() , s2770_0)) =>
- (case ((string_drop s2769_0 s2770_0)) of
- s2771_0 =>
- (case ((reg_name_matches_prefix s2771_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2772_0)) =>
- (case ((string_drop s2771_0 s2772_0)) of
+(*val _s4292_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4292_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word#string)option) s4293_0=
+ ((case s4293_0 of
+ s4294_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s4294_0)) of
+ SOME ((op, s4295_0)) =>
+ (case ((string_drop s4294_0 s4295_0)) of
+ s4296_0 =>
+ (case ((spc_matches_prefix0 s4296_0)) of
+ SOME ((() , s4297_0)) =>
+ (case ((string_drop s4296_0 s4297_0)) of
+ s4298_0 =>
+ (case ((reg_name_matches_prefix s4298_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4299_0)) =>
+ (case ((string_drop s4298_0 s4299_0)) of
+ s4300_0 =>
+ (case ((sep_matches_prefix s4300_0)) of
+ SOME ((() , s4301_0)) =>
+ (case ((string_drop s4300_0 s4301_0)) of
+ s4302_0 =>
+ (case ((reg_name_matches_prefix s4302_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4303_0)) =>
+ (case ((string_drop s4302_0 s4303_0)) of
+ s4304_0 =>
+ (case ((sep_matches_prefix s4304_0)) of
+ SOME ((() , s4305_0)) =>
+ (case ((string_drop s4304_0 s4305_0)) of
+ s4306_0 =>
+ (case ((reg_name_matches_prefix s4306_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4307_0)) =>
+ (case ((string_drop s4306_0 s4307_0)) of
s_ => SOME (op, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -33440,41 +47264,41 @@ val _ = Define `
)))`;
-(*val _s2740_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2740_:string ->(sop#(5)words$word#(5)words$word#(5)words$word#string)option) s2741_0=
- ((case s2741_0 of
- s2742_0 =>
- (case ((shiftw_mnemonic_matches_prefix s2742_0)) of
- SOME ((op, s2743_0)) =>
- (case ((string_drop s2742_0 s2743_0)) of
- s2744_0 =>
- (case ((spc_matches_prefix0 s2744_0)) of
- SOME ((() , s2745_0)) =>
- (case ((string_drop s2744_0 s2745_0)) of
- s2746_0 =>
- (case ((reg_name_matches_prefix s2746_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2747_0)) =>
- (case ((string_drop s2746_0 s2747_0)) of
- s2748_0 =>
- (case ((sep_matches_prefix s2748_0)) of
- SOME ((() , s2749_0)) =>
- (case ((string_drop s2748_0 s2749_0)) of
- s2750_0 =>
- (case ((reg_name_matches_prefix s2750_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2751_0)) =>
- (case ((string_drop s2750_0 s2751_0)) of
- s2752_0 =>
- (case ((sep_matches_prefix s2752_0)) of
- SOME ((() , s2753_0)) =>
- (case ((string_drop s2752_0 s2753_0)) of
- s2754_0 =>
+(*val _s4275_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s4275_:string ->(sop#(5)words$word#(5)words$word#(5)words$word#string)option) s4276_0=
+ ((case s4276_0 of
+ s4277_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s4277_0)) of
+ SOME ((op, s4278_0)) =>
+ (case ((string_drop s4277_0 s4278_0)) of
+ s4279_0 =>
+ (case ((spc_matches_prefix0 s4279_0)) of
+ SOME ((() , s4280_0)) =>
+ (case ((string_drop s4279_0 s4280_0)) of
+ s4281_0 =>
+ (case ((reg_name_matches_prefix s4281_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4282_0)) =>
+ (case ((string_drop s4281_0 s4282_0)) of
+ s4283_0 =>
+ (case ((sep_matches_prefix s4283_0)) of
+ SOME ((() , s4284_0)) =>
+ (case ((string_drop s4283_0 s4284_0)) of
+ s4285_0 =>
+ (case ((reg_name_matches_prefix s4285_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4286_0)) =>
+ (case ((string_drop s4285_0 s4286_0)) of
+ s4287_0 =>
+ (case ((sep_matches_prefix s4287_0)) of
+ SOME ((() , s4288_0)) =>
+ (case ((string_drop s4287_0 s4288_0)) of
+ s4289_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2754_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s2755_0)) =>
- (case ((string_drop s2754_0 s2755_0)) of
+ s4289_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s4290_0)) =>
+ (case ((string_drop s4289_0 s4290_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -33500,39 +47324,38 @@ val _ = Define `
)))`;
-(*val _s2724_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2724_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s2725_0=
- (let s2726_0 = s2725_0 in
- if ((string_startswith s2726_0 "addiw")) then
- (case ((string_drop s2726_0 ((string_length "addiw")))) of
- s2727_0 =>
- (case ((spc_matches_prefix0 s2727_0)) of
- SOME ((() , s2728_0)) =>
- (case ((string_drop s2727_0 s2728_0)) of
- s2729_0 =>
- (case ((reg_name_matches_prefix s2729_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2730_0)) =>
- (case ((string_drop s2729_0 s2730_0)) of
- s2731_0 =>
- (case ((sep_matches_prefix s2731_0)) of
- SOME ((() , s2732_0)) =>
- (case ((string_drop s2731_0 s2732_0)) of
- s2733_0 =>
- (case ((reg_name_matches_prefix s2733_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2734_0)) =>
- (case ((string_drop s2733_0 s2734_0)) of
- s2735_0 =>
- (case ((sep_matches_prefix s2735_0)) of
- SOME ((() , s2736_0)) =>
- (case ((string_drop s2735_0 s2736_0)) of
- s2737_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2737_0
+(*val _s4259_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s4259_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s4260_0=
+ (let s4261_0 = s4260_0 in
+ if ((string_startswith s4261_0 "addiw")) then
+ (case ((string_drop s4261_0 ((string_length "addiw")))) of
+ s4262_0 =>
+ (case ((spc_matches_prefix0 s4262_0)) of
+ SOME ((() , s4263_0)) =>
+ (case ((string_drop s4262_0 s4263_0)) of
+ s4264_0 =>
+ (case ((reg_name_matches_prefix s4264_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4265_0)) =>
+ (case ((string_drop s4264_0 s4265_0)) of
+ s4266_0 =>
+ (case ((sep_matches_prefix s4266_0)) of
+ SOME ((() , s4267_0)) =>
+ (case ((string_drop s4266_0 s4267_0)) of
+ s4268_0 =>
+ (case ((reg_name_matches_prefix s4268_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4269_0)) =>
+ (case ((string_drop s4268_0 s4269_0)) of
+ s4270_0 =>
+ (case ((sep_matches_prefix s4270_0)) of
+ SOME ((() , s4271_0)) =>
+ (case ((string_drop s4270_0 s4271_0)) of
+ s4272_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4272_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2738_0)) =>
- (case ((string_drop s2737_0 s2738_0)) of s_ => SOME (rd, rs1, imm, s_) )
+ SOME ((imm, s4273_0)) =>
+ (case ((string_drop s4272_0 s4273_0)) of s_ => SOME (rd, rs1, imm, s_) )
| _ => NONE
)
)
@@ -33554,63 +47377,62 @@ val _ = Define `
else NONE))`;
-(*val _s2696_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
+(*val _s4231_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
val _ = Define `
- ((s2696_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s2697_0=
- (let s2698_0 = s2697_0 in
- if ((string_startswith s2698_0 "s")) then
- (case ((string_drop s2698_0 ((string_length "s")))) of
- s2699_0 =>
- (case ((size_mnemonic_matches_prefix s2699_0)) of
- SOME ((size1, s2700_0)) =>
- (case ((string_drop s2699_0 s2700_0)) of
- s2701_0 =>
- (case ((maybe_aq_matches_prefix s2701_0)) of
- SOME ((aq, s2702_0)) =>
- (case ((string_drop s2701_0 s2702_0)) of
- s2703_0 =>
- (case ((maybe_rl_matches_prefix s2703_0)) of
- SOME ((rl, s2704_0)) =>
- (case ((string_drop s2703_0 s2704_0)) of
- s2705_0 =>
- (case ((spc_matches_prefix0 s2705_0)) of
- SOME ((() , s2706_0)) =>
- (case ((string_drop s2705_0 s2706_0)) of
- s2707_0 =>
- (case ((reg_name_matches_prefix s2707_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2708_0)) =>
- (case ((string_drop s2707_0 s2708_0)) of
- s2709_0 =>
- (case ((sep_matches_prefix s2709_0)) of
- SOME ((() , s2710_0)) =>
- (case ((string_drop s2709_0 s2710_0)) of
- s2711_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2711_0
+ ((s4231_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s4232_0=
+ (let s4233_0 = s4232_0 in
+ if ((string_startswith s4233_0 "s")) then
+ (case ((string_drop s4233_0 ((string_length "s")))) of
+ s4234_0 =>
+ (case ((size_mnemonic_matches_prefix s4234_0)) of
+ SOME ((size1, s4235_0)) =>
+ (case ((string_drop s4234_0 s4235_0)) of
+ s4236_0 =>
+ (case ((maybe_aq_matches_prefix s4236_0)) of
+ SOME ((aq, s4237_0)) =>
+ (case ((string_drop s4236_0 s4237_0)) of
+ s4238_0 =>
+ (case ((maybe_rl_matches_prefix s4238_0)) of
+ SOME ((rl, s4239_0)) =>
+ (case ((string_drop s4238_0 s4239_0)) of
+ s4240_0 =>
+ (case ((spc_matches_prefix0 s4240_0)) of
+ SOME ((() , s4241_0)) =>
+ (case ((string_drop s4240_0 s4241_0)) of
+ s4242_0 =>
+ (case ((reg_name_matches_prefix s4242_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4243_0)) =>
+ (case ((string_drop s4242_0 s4243_0)) of
+ s4244_0 =>
+ (case ((sep_matches_prefix s4244_0)) of
+ SOME ((() , s4245_0)) =>
+ (case ((string_drop s4244_0 s4245_0)) of
+ s4246_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4246_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2712_0)) =>
- (case ((string_drop s2711_0 s2712_0)) of
- s2713_0 =>
- (case ((opt_spc_matches_prefix0 s2713_0)) of
- SOME ((() , s2714_0)) =>
- let s2715_0 = (string_drop s2713_0 s2714_0) in
- if ((string_startswith s2715_0 "(")) then
- (case ((string_drop s2715_0 ((string_length "(")))) of
- s2716_0 =>
- (case ((opt_spc_matches_prefix0 s2716_0)) of
- SOME ((() , s2717_0)) =>
- (case ((string_drop s2716_0 s2717_0)) of
- s2718_0 =>
- (case ((reg_name_matches_prefix s2718_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2719_0)) =>
- (case ((string_drop s2718_0 s2719_0)) of
- s2720_0 =>
- (case ((opt_spc_matches_prefix0 s2720_0)) of
- SOME ((() , s2721_0)) =>
- let s2722_0 = (string_drop s2720_0 s2721_0) in
- if ((string_startswith s2722_0 ")")) then
- (case ((string_drop s2722_0 ((string_length ")")))) of
+ SOME ((imm, s4247_0)) =>
+ (case ((string_drop s4246_0 s4247_0)) of
+ s4248_0 =>
+ (case ((opt_spc_matches_prefix0 s4248_0)) of
+ SOME ((() , s4249_0)) =>
+ let s4250_0 = (string_drop s4248_0 s4249_0) in
+ if ((string_startswith s4250_0 "(")) then
+ (case ((string_drop s4250_0 ((string_length "(")))) of
+ s4251_0 =>
+ (case ((opt_spc_matches_prefix0 s4251_0)) of
+ SOME ((() , s4252_0)) =>
+ (case ((string_drop s4251_0 s4252_0)) of
+ s4253_0 =>
+ (case ((reg_name_matches_prefix s4253_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4254_0)) =>
+ (case ((string_drop s4253_0 s4254_0)) of
+ s4255_0 =>
+ (case ((opt_spc_matches_prefix0 s4255_0)) of
+ SOME ((() , s4256_0)) =>
+ let s4257_0 = (string_drop s4255_0 s4256_0) in
+ if ((string_startswith s4257_0 ")")) then
+ (case ((string_drop s4257_0 ((string_length ")")))) of
s_ =>
SOME (size1, aq, rl, rs2, imm, rs1, s_)
) else NONE
@@ -33650,67 +47472,66 @@ val _ = Define `
else NONE))`;
-(*val _s2666_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
+(*val _s4201_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
val _ = Define `
- ((s2666_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s2667_0=
- (let s2668_0 = s2667_0 in
- if ((string_startswith s2668_0 "l")) then
- (case ((string_drop s2668_0 ((string_length "l")))) of
- s2669_0 =>
- (case ((size_mnemonic_matches_prefix s2669_0)) of
- SOME ((size1, s2670_0)) =>
- (case ((string_drop s2669_0 s2670_0)) of
- s2671_0 =>
- (case ((maybe_u_matches_prefix s2671_0)) of
- SOME ((is_unsigned, s2672_0)) =>
- (case ((string_drop s2671_0 s2672_0)) of
- s2673_0 =>
- (case ((maybe_aq_matches_prefix s2673_0)) of
- SOME ((aq, s2674_0)) =>
- (case ((string_drop s2673_0 s2674_0)) of
- s2675_0 =>
- (case ((maybe_rl_matches_prefix s2675_0)) of
- SOME ((rl, s2676_0)) =>
- (case ((string_drop s2675_0 s2676_0)) of
- s2677_0 =>
- (case ((spc_matches_prefix0 s2677_0)) of
- SOME ((() , s2678_0)) =>
- (case ((string_drop s2677_0 s2678_0)) of
- s2679_0 =>
- (case ((reg_name_matches_prefix s2679_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2680_0)) =>
- (case ((string_drop s2679_0 s2680_0)) of
- s2681_0 =>
- (case ((sep_matches_prefix s2681_0)) of
- SOME ((() , s2682_0)) =>
- (case ((string_drop s2681_0 s2682_0)) of
- s2683_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2683_0
+ ((s4201_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s4202_0=
+ (let s4203_0 = s4202_0 in
+ if ((string_startswith s4203_0 "l")) then
+ (case ((string_drop s4203_0 ((string_length "l")))) of
+ s4204_0 =>
+ (case ((size_mnemonic_matches_prefix s4204_0)) of
+ SOME ((size1, s4205_0)) =>
+ (case ((string_drop s4204_0 s4205_0)) of
+ s4206_0 =>
+ (case ((maybe_u_matches_prefix s4206_0)) of
+ SOME ((is_unsigned, s4207_0)) =>
+ (case ((string_drop s4206_0 s4207_0)) of
+ s4208_0 =>
+ (case ((maybe_aq_matches_prefix s4208_0)) of
+ SOME ((aq, s4209_0)) =>
+ (case ((string_drop s4208_0 s4209_0)) of
+ s4210_0 =>
+ (case ((maybe_rl_matches_prefix s4210_0)) of
+ SOME ((rl, s4211_0)) =>
+ (case ((string_drop s4210_0 s4211_0)) of
+ s4212_0 =>
+ (case ((spc_matches_prefix0 s4212_0)) of
+ SOME ((() , s4213_0)) =>
+ (case ((string_drop s4212_0 s4213_0)) of
+ s4214_0 =>
+ (case ((reg_name_matches_prefix s4214_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4215_0)) =>
+ (case ((string_drop s4214_0 s4215_0)) of
+ s4216_0 =>
+ (case ((sep_matches_prefix s4216_0)) of
+ SOME ((() , s4217_0)) =>
+ (case ((string_drop s4216_0 s4217_0)) of
+ s4218_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4218_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2684_0)) =>
- (case ((string_drop s2683_0 s2684_0)) of
- s2685_0 =>
- (case ((opt_spc_matches_prefix0 s2685_0)) of
- SOME ((() , s2686_0)) =>
- let s2687_0 = (string_drop s2685_0 s2686_0) in
- if ((string_startswith s2687_0 "(")) then
- (case ((string_drop s2687_0 ((string_length "(")))) of
- s2688_0 =>
- (case ((opt_spc_matches_prefix0 s2688_0)) of
- SOME ((() , s2689_0)) =>
- (case ((string_drop s2688_0 s2689_0)) of
- s2690_0 =>
- (case ((reg_name_matches_prefix s2690_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2691_0)) =>
- (case ((string_drop s2690_0 s2691_0)) of
- s2692_0 =>
- (case ((opt_spc_matches_prefix0 s2692_0)) of
- SOME ((() , s2693_0)) =>
- let s2694_0 = (string_drop s2692_0 s2693_0) in
- if ((string_startswith s2694_0 ")")) then
- (case ((string_drop s2694_0 ((string_length ")")))) of
+ SOME ((imm, s4219_0)) =>
+ (case ((string_drop s4218_0 s4219_0)) of
+ s4220_0 =>
+ (case ((opt_spc_matches_prefix0 s4220_0)) of
+ SOME ((() , s4221_0)) =>
+ let s4222_0 = (string_drop s4220_0 s4221_0) in
+ if ((string_startswith s4222_0 "(")) then
+ (case ((string_drop s4222_0 ((string_length "(")))) of
+ s4223_0 =>
+ (case ((opt_spc_matches_prefix0 s4223_0)) of
+ SOME ((() , s4224_0)) =>
+ (case ((string_drop s4223_0 s4224_0)) of
+ s4225_0 =>
+ (case ((reg_name_matches_prefix s4225_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4226_0)) =>
+ (case ((string_drop s4225_0 s4226_0)) of
+ s4227_0 =>
+ (case ((opt_spc_matches_prefix0 s4227_0)) of
+ SOME ((() , s4228_0)) =>
+ let s4229_0 = (string_drop s4227_0 s4228_0) in
+ if ((string_startswith s4229_0 ")")) then
+ (case ((string_drop s4229_0 ((string_length ")")))) of
s_ =>
SOME (size1, is_unsigned, aq, rl, rd, imm, rs1, s_)
) else NONE
@@ -33753,39 +47574,39 @@ val _ = Define `
else NONE))`;
-(*val _s2649_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s4184_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2649_:string ->(rop#(5)words$word#(5)words$word#(5)words$word#string)option) s2650_0=
- ((case s2650_0 of
- s2651_0 =>
- (case ((rtype_mnemonic_matches_prefix s2651_0)) of
- SOME ((op, s2652_0)) =>
- (case ((string_drop s2651_0 s2652_0)) of
- s2653_0 =>
- (case ((spc_matches_prefix0 s2653_0)) of
- SOME ((() , s2654_0)) =>
- (case ((string_drop s2653_0 s2654_0)) of
- s2655_0 =>
- (case ((reg_name_matches_prefix s2655_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2656_0)) =>
- (case ((string_drop s2655_0 s2656_0)) of
- s2657_0 =>
- (case ((sep_matches_prefix s2657_0)) of
- SOME ((() , s2658_0)) =>
- (case ((string_drop s2657_0 s2658_0)) of
- s2659_0 =>
- (case ((reg_name_matches_prefix s2659_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2660_0)) =>
- (case ((string_drop s2659_0 s2660_0)) of
- s2661_0 =>
- (case ((sep_matches_prefix s2661_0)) of
- SOME ((() , s2662_0)) =>
- (case ((string_drop s2661_0 s2662_0)) of
- s2663_0 =>
- (case ((reg_name_matches_prefix s2663_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2664_0)) =>
- (case ((string_drop s2663_0 s2664_0)) of
+ ((s4184_:string ->(rop#(5)words$word#(5)words$word#(5)words$word#string)option) s4185_0=
+ ((case s4185_0 of
+ s4186_0 =>
+ (case ((rtype_mnemonic_matches_prefix s4186_0)) of
+ SOME ((op, s4187_0)) =>
+ (case ((string_drop s4186_0 s4187_0)) of
+ s4188_0 =>
+ (case ((spc_matches_prefix0 s4188_0)) of
+ SOME ((() , s4189_0)) =>
+ (case ((string_drop s4188_0 s4189_0)) of
+ s4190_0 =>
+ (case ((reg_name_matches_prefix s4190_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4191_0)) =>
+ (case ((string_drop s4190_0 s4191_0)) of
+ s4192_0 =>
+ (case ((sep_matches_prefix s4192_0)) of
+ SOME ((() , s4193_0)) =>
+ (case ((string_drop s4192_0 s4193_0)) of
+ s4194_0 =>
+ (case ((reg_name_matches_prefix s4194_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4195_0)) =>
+ (case ((string_drop s4194_0 s4195_0)) of
+ s4196_0 =>
+ (case ((sep_matches_prefix s4196_0)) of
+ SOME ((() , s4197_0)) =>
+ (case ((string_drop s4196_0 s4197_0)) of
+ s4198_0 =>
+ (case ((reg_name_matches_prefix s4198_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4199_0)) =>
+ (case ((string_drop s4198_0 s4199_0)) of
s_ => SOME (op, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -33811,41 +47632,41 @@ val _ = Define `
)))`;
-(*val _s2632_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6 * string))*)
-
-val _ = Define `
- ((s2632_:string ->(sop#(5)words$word#(5)words$word#(6)words$word#string)option) s2633_0=
- ((case s2633_0 of
- s2634_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s2634_0)) of
- SOME ((op, s2635_0)) =>
- (case ((string_drop s2634_0 s2635_0)) of
- s2636_0 =>
- (case ((spc_matches_prefix0 s2636_0)) of
- SOME ((() , s2637_0)) =>
- (case ((string_drop s2636_0 s2637_0)) of
- s2638_0 =>
- (case ((reg_name_matches_prefix s2638_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2639_0)) =>
- (case ((string_drop s2638_0 s2639_0)) of
- s2640_0 =>
- (case ((sep_matches_prefix s2640_0)) of
- SOME ((() , s2641_0)) =>
- (case ((string_drop s2640_0 s2641_0)) of
- s2642_0 =>
- (case ((reg_name_matches_prefix s2642_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2643_0)) =>
- (case ((string_drop s2642_0 s2643_0)) of
- s2644_0 =>
- (case ((sep_matches_prefix s2644_0)) of
- SOME ((() , s2645_0)) =>
- (case ((string_drop s2644_0 s2645_0)) of
- s2646_0 =>
+(*val _s4167_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s4167_:string ->(sop#(5)words$word#(5)words$word#(6)words$word#string)option) s4168_0=
+ ((case s4168_0 of
+ s4169_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s4169_0)) of
+ SOME ((op, s4170_0)) =>
+ (case ((string_drop s4169_0 s4170_0)) of
+ s4171_0 =>
+ (case ((spc_matches_prefix0 s4171_0)) of
+ SOME ((() , s4172_0)) =>
+ (case ((string_drop s4171_0 s4172_0)) of
+ s4173_0 =>
+ (case ((reg_name_matches_prefix s4173_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4174_0)) =>
+ (case ((string_drop s4173_0 s4174_0)) of
+ s4175_0 =>
+ (case ((sep_matches_prefix s4175_0)) of
+ SOME ((() , s4176_0)) =>
+ (case ((string_drop s4175_0 s4176_0)) of
+ s4177_0 =>
+ (case ((reg_name_matches_prefix s4177_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4178_0)) =>
+ (case ((string_drop s4177_0 s4178_0)) of
+ s4179_0 =>
+ (case ((sep_matches_prefix s4179_0)) of
+ SOME ((() , s4180_0)) =>
+ (case ((string_drop s4179_0 s4180_0)) of
+ s4181_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2646_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2647_0)) =>
- (case ((string_drop s2646_0 s2647_0)) of
+ s4181_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s4182_0)) =>
+ (case ((string_drop s4181_0 s4182_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -33871,41 +47692,40 @@ val _ = Define `
)))`;
-(*val _s2615_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2615_:string ->(iop#(5)words$word#(5)words$word#(12)words$word#string)option) s2616_0=
- ((case s2616_0 of
- s2617_0 =>
- (case ((itype_mnemonic_matches_prefix s2617_0)) of
- SOME ((op, s2618_0)) =>
- (case ((string_drop s2617_0 s2618_0)) of
- s2619_0 =>
- (case ((spc_matches_prefix0 s2619_0)) of
- SOME ((() , s2620_0)) =>
- (case ((string_drop s2619_0 s2620_0)) of
- s2621_0 =>
- (case ((reg_name_matches_prefix s2621_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2622_0)) =>
- (case ((string_drop s2621_0 s2622_0)) of
- s2623_0 =>
- (case ((sep_matches_prefix s2623_0)) of
- SOME ((() , s2624_0)) =>
- (case ((string_drop s2623_0 s2624_0)) of
- s2625_0 =>
- (case ((reg_name_matches_prefix s2625_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2626_0)) =>
- (case ((string_drop s2625_0 s2626_0)) of
- s2627_0 =>
- (case ((sep_matches_prefix s2627_0)) of
- SOME ((() , s2628_0)) =>
- (case ((string_drop s2627_0 s2628_0)) of
- s2629_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2629_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s2630_0)) =>
- (case ((string_drop s2629_0 s2630_0)) of
+(*val _s4150_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s4150_:string ->(iop#(5)words$word#(5)words$word#(12)words$word#string)option) s4151_0=
+ ((case s4151_0 of
+ s4152_0 =>
+ (case ((itype_mnemonic_matches_prefix s4152_0)) of
+ SOME ((op, s4153_0)) =>
+ (case ((string_drop s4152_0 s4153_0)) of
+ s4154_0 =>
+ (case ((spc_matches_prefix0 s4154_0)) of
+ SOME ((() , s4155_0)) =>
+ (case ((string_drop s4154_0 s4155_0)) of
+ s4156_0 =>
+ (case ((reg_name_matches_prefix s4156_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4157_0)) =>
+ (case ((string_drop s4156_0 s4157_0)) of
+ s4158_0 =>
+ (case ((sep_matches_prefix s4158_0)) of
+ SOME ((() , s4159_0)) =>
+ (case ((string_drop s4158_0 s4159_0)) of
+ s4160_0 =>
+ (case ((reg_name_matches_prefix s4160_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4161_0)) =>
+ (case ((string_drop s4160_0 s4161_0)) of
+ s4162_0 =>
+ (case ((sep_matches_prefix s4162_0)) of
+ SOME ((() , s4163_0)) =>
+ (case ((string_drop s4162_0 s4163_0)) of
+ s4164_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4164_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s4165_0)) =>
+ (case ((string_drop s4164_0 s4165_0)) of
s_ => SOME (op, rd, rs1, imm, s_)
)
| _ => NONE
@@ -33931,41 +47751,41 @@ val _ = Define `
)))`;
-(*val _s2598_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13 * string))*)
-
-val _ = Define `
- ((s2598_:string ->(bop#(5)words$word#(5)words$word#(13)words$word#string)option) s2599_0=
- ((case s2599_0 of
- s2600_0 =>
- (case ((btype_mnemonic_matches_prefix s2600_0)) of
- SOME ((op, s2601_0)) =>
- (case ((string_drop s2600_0 s2601_0)) of
- s2602_0 =>
- (case ((spc_matches_prefix0 s2602_0)) of
- SOME ((() , s2603_0)) =>
- (case ((string_drop s2602_0 s2603_0)) of
- s2604_0 =>
- (case ((reg_name_matches_prefix s2604_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2605_0)) =>
- (case ((string_drop s2604_0 s2605_0)) of
- s2606_0 =>
- (case ((sep_matches_prefix s2606_0)) of
- SOME ((() , s2607_0)) =>
- (case ((string_drop s2606_0 s2607_0)) of
- s2608_0 =>
- (case ((reg_name_matches_prefix s2608_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2609_0)) =>
- (case ((string_drop s2608_0 s2609_0)) of
- s2610_0 =>
- (case ((sep_matches_prefix s2610_0)) of
- SOME ((() , s2611_0)) =>
- (case ((string_drop s2610_0 s2611_0)) of
- s2612_0 =>
+(*val _s4133_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13 * string))*)
+
+val _ = Define `
+ ((s4133_:string ->(bop#(5)words$word#(5)words$word#(13)words$word#string)option) s4134_0=
+ ((case s4134_0 of
+ s4135_0 =>
+ (case ((btype_mnemonic_matches_prefix s4135_0)) of
+ SOME ((op, s4136_0)) =>
+ (case ((string_drop s4135_0 s4136_0)) of
+ s4137_0 =>
+ (case ((spc_matches_prefix0 s4137_0)) of
+ SOME ((() , s4138_0)) =>
+ (case ((string_drop s4137_0 s4138_0)) of
+ s4139_0 =>
+ (case ((reg_name_matches_prefix s4139_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4140_0)) =>
+ (case ((string_drop s4139_0 s4140_0)) of
+ s4141_0 =>
+ (case ((sep_matches_prefix s4141_0)) of
+ SOME ((() , s4142_0)) =>
+ (case ((string_drop s4141_0 s4142_0)) of
+ s4143_0 =>
+ (case ((reg_name_matches_prefix s4143_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4144_0)) =>
+ (case ((string_drop s4143_0 s4144_0)) of
+ s4145_0 =>
+ (case ((sep_matches_prefix s4145_0)) of
+ SOME ((() , s4146_0)) =>
+ (case ((string_drop s4145_0 s4146_0)) of
+ s4147_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2612_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s2613_0)) =>
- (case ((string_drop s2612_0 s2613_0)) of
+ s4147_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s4148_0)) =>
+ (case ((string_drop s4147_0 s4148_0)) of
s_ => SOME (op, rs1, rs2, imm, s_)
)
| _ => NONE
@@ -33991,39 +47811,38 @@ val _ = Define `
)))`;
-(*val _s2582_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2582_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s2583_0=
- (let s2584_0 = s2583_0 in
- if ((string_startswith s2584_0 "jalr")) then
- (case ((string_drop s2584_0 ((string_length "jalr")))) of
- s2585_0 =>
- (case ((spc_matches_prefix0 s2585_0)) of
- SOME ((() , s2586_0)) =>
- (case ((string_drop s2585_0 s2586_0)) of
- s2587_0 =>
- (case ((reg_name_matches_prefix s2587_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2588_0)) =>
- (case ((string_drop s2587_0 s2588_0)) of
- s2589_0 =>
- (case ((sep_matches_prefix s2589_0)) of
- SOME ((() , s2590_0)) =>
- (case ((string_drop s2589_0 s2590_0)) of
- s2591_0 =>
- (case ((reg_name_matches_prefix s2591_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2592_0)) =>
- (case ((string_drop s2591_0 s2592_0)) of
- s2593_0 =>
- (case ((sep_matches_prefix s2593_0)) of
- SOME ((() , s2594_0)) =>
- (case ((string_drop s2593_0 s2594_0)) of
- s2595_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2595_0
+(*val _s4117_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s4117_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s4118_0=
+ (let s4119_0 = s4118_0 in
+ if ((string_startswith s4119_0 "jalr")) then
+ (case ((string_drop s4119_0 ((string_length "jalr")))) of
+ s4120_0 =>
+ (case ((spc_matches_prefix0 s4120_0)) of
+ SOME ((() , s4121_0)) =>
+ (case ((string_drop s4120_0 s4121_0)) of
+ s4122_0 =>
+ (case ((reg_name_matches_prefix s4122_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4123_0)) =>
+ (case ((string_drop s4122_0 s4123_0)) of
+ s4124_0 =>
+ (case ((sep_matches_prefix s4124_0)) of
+ SOME ((() , s4125_0)) =>
+ (case ((string_drop s4124_0 s4125_0)) of
+ s4126_0 =>
+ (case ((reg_name_matches_prefix s4126_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4127_0)) =>
+ (case ((string_drop s4126_0 s4127_0)) of
+ s4128_0 =>
+ (case ((sep_matches_prefix s4128_0)) of
+ SOME ((() , s4129_0)) =>
+ (case ((string_drop s4128_0 s4129_0)) of
+ s4130_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4130_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2596_0)) =>
- (case ((string_drop s2595_0 s2596_0)) of s_ => SOME (rd, rs1, imm, s_) )
+ SOME ((imm, s4131_0)) =>
+ (case ((string_drop s4130_0 s4131_0)) of s_ => SOME (rd, rs1, imm, s_) )
| _ => NONE
)
)
@@ -34045,30 +47864,30 @@ val _ = Define `
else NONE))`;
-(*val _s2570_ : string -> maybe ((mword ty5 * mword ty21 * string))*)
+(*val _s4105_ : string -> maybe ((mword ty5 * mword ty21 * string))*)
val _ = Define `
- ((s2570_:string ->((5)words$word#(21)words$word#string)option) s2571_0=
- (let s2572_0 = s2571_0 in
- if ((string_startswith s2572_0 "jal")) then
- (case ((string_drop s2572_0 ((string_length "jal")))) of
- s2573_0 =>
- (case ((spc_matches_prefix0 s2573_0)) of
- SOME ((() , s2574_0)) =>
- (case ((string_drop s2573_0 s2574_0)) of
- s2575_0 =>
- (case ((reg_name_matches_prefix s2575_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2576_0)) =>
- (case ((string_drop s2575_0 s2576_0)) of
- s2577_0 =>
- (case ((sep_matches_prefix s2577_0)) of
- SOME ((() , s2578_0)) =>
- (case ((string_drop s2577_0 s2578_0)) of
- s2579_0 =>
+ ((s4105_:string ->((5)words$word#(21)words$word#string)option) s4106_0=
+ (let s4107_0 = s4106_0 in
+ if ((string_startswith s4107_0 "jal")) then
+ (case ((string_drop s4107_0 ((string_length "jal")))) of
+ s4108_0 =>
+ (case ((spc_matches_prefix0 s4108_0)) of
+ SOME ((() , s4109_0)) =>
+ (case ((string_drop s4108_0 s4109_0)) of
+ s4110_0 =>
+ (case ((reg_name_matches_prefix s4110_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4111_0)) =>
+ (case ((string_drop s4110_0 s4111_0)) of
+ s4112_0 =>
+ (case ((sep_matches_prefix s4112_0)) of
+ SOME ((() , s4113_0)) =>
+ (case ((string_drop s4112_0 s4113_0)) of
+ s4114_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2579_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s2580_0)) =>
- (case ((string_drop s2579_0 s2580_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4114_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s4115_0)) =>
+ (case ((string_drop s4114_0 s4115_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -34084,33 +47903,33 @@ val _ = Define `
else NONE))`;
-(*val _s2557_ : string -> maybe ((uop * mword ty5 * mword ty20 * string))*)
+(*val _s4092_ : string -> maybe ((uop * mword ty5 * mword ty20 * string))*)
val _ = Define `
- ((s2557_:string ->(uop#(5)words$word#(20)words$word#string)option) s2558_0=
- ((case s2558_0 of
- s2559_0 =>
- (case ((utype_mnemonic_matches_prefix s2559_0)) of
- SOME ((op, s2560_0)) =>
- (case ((string_drop s2559_0 s2560_0)) of
- s2561_0 =>
- (case ((spc_matches_prefix0 s2561_0)) of
- SOME ((() , s2562_0)) =>
- (case ((string_drop s2561_0 s2562_0)) of
- s2563_0 =>
- (case ((reg_name_matches_prefix s2563_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2564_0)) =>
- (case ((string_drop s2563_0 s2564_0)) of
- s2565_0 =>
- (case ((sep_matches_prefix s2565_0)) of
- SOME ((() , s2566_0)) =>
- (case ((string_drop s2565_0 s2566_0)) of
- s2567_0 =>
+ ((s4092_:string ->(uop#(5)words$word#(20)words$word#string)option) s4093_0=
+ ((case s4093_0 of
+ s4094_0 =>
+ (case ((utype_mnemonic_matches_prefix s4094_0)) of
+ SOME ((op, s4095_0)) =>
+ (case ((string_drop s4094_0 s4095_0)) of
+ s4096_0 =>
+ (case ((spc_matches_prefix0 s4096_0)) of
+ SOME ((() , s4097_0)) =>
+ (case ((string_drop s4096_0 s4097_0)) of
+ s4098_0 =>
+ (case ((reg_name_matches_prefix s4098_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4099_0)) =>
+ (case ((string_drop s4098_0 s4099_0)) of
+ s4100_0 =>
+ (case ((sep_matches_prefix s4100_0)) of
+ SOME ((() , s4101_0)) =>
+ (case ((string_drop s4100_0 s4101_0)) of
+ s4102_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2567_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s2568_0)) =>
- (case ((string_drop s2567_0 s2568_0)) of s_ => SOME (op, rd, imm, s_) )
+ s4102_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s4103_0)) =>
+ (case ((string_drop s4102_0 s4103_0)) of s_ => SOME (op, rd, imm, s_) )
| _ => NONE
)
)
@@ -34130,547 +47949,926 @@ val _ = Define `
val _ = Define `
((assembly_matches_prefix:string ->(ast#int)option) arg_=
- (let s2569_0 = arg_ in
- if ((case ((s2557_ s2569_0 : ((uop # 5 words$word # 20 words$word # string))option)) of
+ (let s4104_0 = arg_ in
+ if ((case ((s4092_ s4104_0 : ((uop # 5 words$word # 20 words$word # string))option)) of
SOME ((op, rd, imm, s_)) => T
| _ => F
)) then (case
- (s2557_ s2569_0 : (( uop # 5 words$word # 20 words$word # string)) option) of
+ (s4092_ s4104_0 : (( uop # 5 words$word # 20 words$word # string)) option) of
(SOME ((op, rd, imm, s_))) =>
SOME (UTYPE (imm, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2570_ s2569_0 : (( 5 words$word # 21 words$word # string))option)) of
+ else if ((case ((s4105_ s4104_0 : (( 5 words$word # 21 words$word # string))option)) of
SOME ((rd, imm, s_)) => T
| _ => F
- )) then (case (s2570_ s2569_0 : (( 5 words$word # 21 words$word # string)) option) of
+ )) then (case (s4105_ s4104_0 : (( 5 words$word # 21 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (RISCV_JAL (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2582_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s4117_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((rd, rs1, imm, s_)) => T
| _ => F
)) then (case
- (s2582_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s4117_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((rd, rs1, imm, s_))) =>
SOME
(RISCV_JALR (imm, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2598_ s2569_0 : ((bop # 5 words$word # 5 words$word # 13 words$word # string))option)) of
+ else if ((case ((s4133_ s4104_0 : ((bop # 5 words$word # 5 words$word # 13 words$word # string))option)) of
SOME ((op, rs1, rs2, imm, s_)) => T
| _ => F
)) then (case
- (s2598_ s2569_0 : (( bop # 5 words$word # 5 words$word # 13 words$word # string)) option) of
+ (s4133_ s4104_0 : (( bop # 5 words$word # 5 words$word # 13 words$word # string)) option) of
(SOME ((op, rs1, rs2, imm, s_))) =>
SOME
(BTYPE (imm, rs2, rs1, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2615_ s2569_0 : ((iop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s4150_ s4104_0 : ((iop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((op, rd, rs1, imm, s_)) => T
| _ => F
)) then (case
- (s2615_ s2569_0 : (( iop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s4150_ s4104_0 : (( iop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((op, rd, rs1, imm, s_))) =>
SOME
(ITYPE (imm, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2632_ s2569_0 : ((sop # 5 words$word # 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4167_ s4104_0 : ((sop # 5 words$word # 5 words$word # 6 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => T
| _ => F
)) then (case
- (s2632_ s2569_0 : (( sop # 5 words$word # 5 words$word # 6 words$word # string)) option) of
+ (s4167_ s4104_0 : (( sop # 5 words$word # 5 words$word # 6 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTIOP (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2649_ s2569_0 : ((rop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4184_ s4104_0 : ((rop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s2649_ s2569_0 : (( rop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4184_ s4104_0 : (( rop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, rs2, s_))) =>
SOME
(RTYPE (rs2, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2666_ s2569_0
+ else if ((case ((s4201_ s4104_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word # string))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1, s_)) => T
| _ => F
)) then (case
- (s2666_ s2569_0
+ (s4201_ s4104_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word # string)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1, s_))) =>
SOME
(LOAD (imm, rs1, rd, is_unsigned, size1, aq, rl),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2696_ s2569_0
+ else if ((case ((s4231_ s4104_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1, s_)) => T
| _ => F
)) then (case
- (s2696_ s2569_0
+ (s4231_ s4104_0
: (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1, s_))) =>
SOME
(STORE (imm, rs2, rs1, size1, aq, rl),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2724_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s4259_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((rd, rs1, imm, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2724_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s4259_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((rd, rs1, imm, s_))) =>
SOME (ADDIW (imm, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2740_ s2569_0 : ((sop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4275_ s4104_0 : ((sop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2740_ s2569_0 : (( sop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4275_ s4104_0 : (( sop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTW (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2757_ s2569_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4292_ s4104_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2757_ s2569_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4292_ s4104_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, rs2, s_))) =>
SOME
(RTYPEW (rs2, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2774_ s2569_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4309_ s4104_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2774_ s2569_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4309_ s4104_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTIWOP (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2791_ s2569_0 : (( 4 words$word # 4 words$word # string))option)) of
+ else if ((case ((s4326_ s4104_0 : (( 4 words$word # 4 words$word # string))option)) of
SOME ((pred, succ, s_)) => T
| _ => F
- )) then (case (s2791_ s2569_0 : (( 4 words$word # 4 words$word # string)) option) of
+ )) then (case (s4326_ s4104_0 : (( 4 words$word # 4 words$word # string)) option) of
(SOME ((pred, succ, s_))) =>
SOME (FENCE (pred, succ), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2803_ s2569_0 : (( 4 words$word # 4 words$word # string))option)) of
+ else if ((case ((s4338_ s4104_0 : (( 4 words$word # 4 words$word # string))option)) of
SOME ((pred, succ, s_)) => T
| _ => F
- )) then (case (s2803_ s2569_0 : (( 4 words$word # 4 words$word # string)) option) of
+ )) then (case (s4338_ s4104_0 : (( 4 words$word # 4 words$word # string)) option) of
(SOME ((pred, succ, s_))) =>
SOME (FENCE_TSO (pred, succ), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2815_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2815_ s2569_0 of
+ else if ((case ((s4350_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4350_ s4104_0 of
(SOME (s_)) =>
SOME (FENCEI () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2819_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2819_ s2569_0 of
+ else if ((case ((s4354_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4354_ s4104_0 of
(SOME (s_)) =>
SOME (ECALL () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2823_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2823_ s2569_0 of
+ else if ((case ((s4358_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4358_ s4104_0 of
(SOME (s_)) =>
SOME (MRET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2827_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2827_ s2569_0 of
+ else if ((case ((s4362_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4362_ s4104_0 of
(SOME (s_)) =>
SOME (SRET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2831_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2831_ s2569_0 of
+ else if ((case ((s4366_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4366_ s4104_0 of
(SOME (s_)) =>
SOME (EBREAK () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2835_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2835_ s2569_0 of
+ else if ((case ((s4370_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4370_ s4104_0 of
(SOME (s_)) =>
SOME (WFI () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2839_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4374_ s4104_0 : (( 5 words$word # 5 words$word # string))option)) of
SOME ((rs1, rs2, s_)) => T
| _ => F
- )) then (case (s2839_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s4374_ s4104_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rs1, rs2, s_))) =>
SOME (SFENCE_VMA (rs1, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2851_ s2569_0
+ else if ((case ((s4386_ s4104_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rd, rs1, s_)) => T
| _ => F
)) then (case
- (s2851_ s2569_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # string)) option) of
+ (s4386_ s4104_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rd, rs1, s_))) =>
SOME
(LOADRES (aq, rl, rs1, size1, rd), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2869_ s2569_0
+ else if ((case ((s4404_ s4104_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s2869_ s2569_0
+ (s4404_ s4104_0
: (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2, s_))) =>
SOME
(STORECON (aq, rl, rs2, rs1, size1, rd),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2891_ s2569_0
+ else if ((case ((s4426_ s4104_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2, s_)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1, s_)) => T
| _ => F
)) then (case
- (s2891_ s2569_0
+ (s4426_ s4104_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2, s_))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1, s_))) =>
SOME
(AMO (op, aq, rl, rs2, rs1, width, rd),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2915_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2915_ s2569_0 of
+ else if ((case ((s4452_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4452_ s4104_0 of
(SOME (s_)) =>
SOME (C_NOP () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2919_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
- SOME ((rdc, nzimm, s_)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if ((case ((s4456_ s4104_0 : (( 3 words$word # 8 words$word # string))option)) of
+ SOME ((rdc, nzimm, s_)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s2919_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s4456_ s4104_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rdc, nzimm, s_))) =>
SOME
(C_ADDI4SPN (rdc, nzimm), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2931_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4468_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rdc, rsc, uimm, s_)) => T
| _ => F
)) then (case
- (s2931_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s4468_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rdc, rsc, uimm, s_))) =>
SOME (C_LW (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2947_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4484_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rdc, rsc, uimm, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2947_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s4484_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rdc, rsc, uimm, s_))) =>
SOME (C_LD (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2963_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4500_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rsc1, rsc2, uimm, s_)) => T
| _ => F
)) then (case
- (s2963_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s4500_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rsc1, rsc2, uimm, s_))) =>
SOME
(C_SW (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2979_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4516_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rsc1, rsc2, uimm, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2979_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s4516_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rsc1, rsc2, uimm, s_))) =>
SOME
(C_SD (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2995_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rsd, nzi, s_)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s4532_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, nzi, s_)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2995_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4532_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, nzi, s_))) =>
SOME (C_ADDI (nzi, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3007_ s2569_0 : (( 11 words$word # string))option)) of
+ else if ((case ((s4544_ s4104_0 : (( 11 words$word # string))option)) of
SOME ((imm, s_)) => ((( 32 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s3007_ s2569_0 : (( 11 words$word # string)) option) of
+ )) then (case (s4544_ s4104_0 : (( 11 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_JAL imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3015_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4552_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rsd, imm, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3015_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4552_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, imm, s_))) =>
SOME (C_ADDIW (imm, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3027_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, imm, s_)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s4564_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, imm, s_)) => (rd <> zreg)
| _ => F
- )) then (case (s3027_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4564_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (C_LI (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3039_ s2569_0 : (( 6 words$word # string))option)) of
- SOME ((imm, s_)) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s4576_ s4104_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3039_ s2569_0 : (( 6 words$word # string)) option) of
+ )) then (case (s4576_ s4104_0 : (( 6 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_ADDI16SP imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3047_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4584_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rd, imm, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s3047_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4584_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (C_LUI (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3059_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
- SOME ((rsd, shamt, s_)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s4596_ s4104_0 : (( 3 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3059_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s4596_ s4104_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SRLI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3071_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
- SOME ((rsd, shamt, s_)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s4608_ s4104_0 : (( 3 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3071_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s4608_ s4104_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SRAI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3083_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4620_ s4104_0 : (( 3 words$word # 6 words$word # string))option)) of
SOME ((rsd, imm, s_)) => T
| _ => F
- )) then (case (s3083_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s4620_ s4104_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, imm, s_))) =>
SOME (C_ANDI (imm, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3095_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4632_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3095_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4632_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_SUB (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3107_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4644_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3107_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4644_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_XOR (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3119_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4656_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3119_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4656_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_OR (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3131_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4668_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3131_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4668_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_AND (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3143_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4680_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3143_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4680_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_SUBW (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3155_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s4692_ s4104_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3155_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s4692_ s4104_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_ADDW (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3167_ s2569_0 : (( 11 words$word # string))option)) of
+ else if ((case ((s4704_ s4104_0 : (( 11 words$word # string))option)) of
SOME ((imm, s_)) => T
| _ => F
- )) then (case (s3167_ s2569_0 : (( 11 words$word # string)) option) of
+ )) then (case (s4704_ s4104_0 : (( 11 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_J imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3175_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
+ else if ((case ((s4712_ s4104_0 : (( 3 words$word # 8 words$word # string))option)) of
SOME ((rs, imm, s_)) => T
| _ => F
- )) then (case (s3175_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s4712_ s4104_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rs, imm, s_))) =>
SOME (C_BEQZ (imm, rs), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3187_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
+ else if ((case ((s4724_ s4104_0 : (( 3 words$word # 8 words$word # string))option)) of
SOME ((rs, imm, s_)) => T
| _ => F
- )) then (case (s3187_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s4724_ s4104_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rs, imm, s_))) =>
SOME (C_BNEZ (imm, rs), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3199_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4736_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rsd, shamt, s_)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s3199_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4736_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SLLI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3211_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, uimm, s_)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s4748_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => (rd <> zreg)
| _ => F
- )) then (case (s3211_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4748_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_LWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3223_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, uimm, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s4760_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => ((((rd <> zreg))) /\ ((((( 32 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s3223_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4760_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_LDSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3235_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4772_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rd, uimm, s_)) => T
| _ => F
- )) then (case (s3235_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4772_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_SWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3247_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s4784_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rs2, uimm, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3247_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s4784_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rs2, uimm, s_))) =>
SOME (C_SDSP (uimm, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3259_ s2569_0 : (( 5 words$word # string))option)) of
- SOME ((rs1, s_)) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s4796_ s4104_0 : (( 5 words$word # string))option)) of
+ SOME ((rs1, s_)) => (rs1 <> zreg)
| _ => F
- )) then (case (s3259_ s2569_0 : (( 5 words$word # string)) option) of
+ )) then (case (s4796_ s4104_0 : (( 5 words$word # string)) option) of
(SOME ((rs1, s_))) =>
SOME (C_JR rs1, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3267_ s2569_0 : (( 5 words$word # string))option)) of
- SOME ((rs1, s_)) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s4804_ s4104_0 : (( 5 words$word # string))option)) of
+ SOME ((rs1, s_)) => (rs1 <> zreg)
| _ => F
- )) then (case (s3267_ s2569_0 : (( 5 words$word # string)) option) of
+ )) then (case (s4804_ s4104_0 : (( 5 words$word # string)) option) of
(SOME ((rs1, s_))) =>
SOME (C_JALR rs1, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3275_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
- SOME ((rd, rs2, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s4812_ s4104_0 : (( 5 words$word # 5 words$word # string))option)) of
+ SOME ((rd, rs2, s_)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s3275_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s4812_ s4104_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rd, rs2, s_))) =>
SOME (C_MV (rd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3287_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s3287_ s2569_0 of
+ else if ((case ((s4824_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4824_ s4104_0 of
(SOME (s_)) =>
SOME (C_EBREAK () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3291_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
- SOME ((rsd, rs2, s_)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s4828_ s4104_0 : (( 5 words$word # 5 words$word # string))option)) of
+ SOME ((rsd, rs2, s_)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s3291_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s4828_ s4104_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_ADD (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3303_ s2569_0
+ else if ((case ((s4840_ s4104_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3303_ s2569_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4840_ s4104_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2, s_))) =>
SOME
(MUL (rs2, rs1, rd, high, signed1, signed2),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3320_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4857_ s4104_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3320_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4857_ s4104_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (DIV0 (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3338_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4875_ s4104_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3338_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4875_ s4104_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (REM (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3356_ s2569_0 : (( 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4893_ s4104_0 : (( 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((rd, rs1, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3356_ s2569_0 : (( 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4893_ s4104_0 : (( 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((rd, rs1, rs2, s_))) =>
SOME (MULW (rs2, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3372_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4909_ s4104_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3372_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4909_ s4104_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (DIVW (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3391_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s4928_ s4104_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => ((( 32 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3391_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s4928_ s4104_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (REMW (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3410_ s2569_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
- SOME ((op, rd, rs1, csr, s_)) => T
+ else if ((case ((s4947_ s4104_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((op, rd, csr, rs1, s_)) => T
| _ => F
)) then (case
- (s3410_ s2569_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
- (SOME ((op, rd, rs1, csr, s_))) =>
+ (s4947_ s4104_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((op, rd, csr, rs1, s_))) =>
SOME
(CSR (csr, rs1, rd, T, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3428_ s2569_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
- SOME ((op, rd, rs1, csr, s_)) => T
+ else if ((case ((s4965_ s4104_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((op, rd, csr, rs1, s_)) => T
| _ => F
)) then (case
- (s3428_ s2569_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
- (SOME ((op, rd, rs1, csr, s_))) =>
+ (s4965_ s4104_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((op, rd, csr, rs1, s_))) =>
SOME
(CSR (csr, rs1, rd, F, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3445_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s3445_ s2569_0 of
+ else if ((case ((s4982_ s4104_0)) of SOME (s_) => T | _ => F )) then
+ (case s4982_ s4104_0 of
(SOME (s_)) =>
SOME (URET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3449_ s2569_0 : (( 32 words$word # string))option)) of
+ else if ((case ((s4986_ s4104_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => T
+ | _ => F
+ )) then (case (s4986_ s4104_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_NOP_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s4992_ s4104_0 : (( 5 words$word # string))option)) of
+ SOME ((rsd, s_)) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s4992_ s4104_0 : (( 5 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_ADDI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s4998_ s4104_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => T
+ | _ => F
+ )) then (case (s4998_ s4104_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_LI_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5004_ s4104_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s5004_ s4104_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_LUI_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5010_ s4104_0 : (( 5 words$word # string))option)) of
+ SOME ((rs2, s_)) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s5010_ s4104_0 : (( 5 words$word # string)) option) of
+ (SOME ((rs2, s_))) =>
+ SOME (C_MV_HINT rs2, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5016_ s4104_0 : (( 5 words$word # string))option)) of
+ SOME ((rs2, s_)) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s5016_ s4104_0 : (( 5 words$word # string)) option) of
+ (SOME ((rs2, s_))) =>
+ SOME (C_ADD_HINT rs2, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5022_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) =>
+ ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s5022_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rsd, shamt, s_))) =>
+ SOME
+ (C_SLLI_HINT (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5031_ s4104_0 : (( 3 words$word # string))option)) of
+ SOME ((rsd, s_)) => T
+ | _ => F
+ )) then (case (s5031_ s4104_0 : (( 3 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_SRLI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5037_ s4104_0 : (( 3 words$word # string))option)) of
+ SOME ((rsd, s_)) => T
+ | _ => F
+ )) then (case (s5037_ s4104_0 : (( 3 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_SRAI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5043_ s4104_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word # string))option)) of
+ SOME ((pred, succ, rs, rd, fm, s_)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s5043_ s4104_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word # string)) option) of
+ (SOME ((pred, succ, rs, rd, fm, s_))) =>
+ SOME
+ (FENCE_RESERVED (fm, pred, succ, rs, rd),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5061_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ SOME ((rd, rs, imm, s_)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case
+ (s5061_ s4104_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (SOME ((rd, rs, imm, s_))) =>
+ SOME
+ (FENCEI_RESERVED (imm, rs, rd), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5073_ s4104_0
+ : ((word_width # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((width, rd, imm, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s5073_ s4104_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((width, rd, imm, rs1, s_))) =>
+ SOME
+ (LOAD_FP (imm, rs1, rd, width), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5097_ s4104_0
+ : ((word_width # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((width, rs2, imm, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s5097_ s4104_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((width, rs2, imm, rs1, s_))) =>
+ SOME
+ (STORE_FP (imm, rs2, rs1, width), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5121_ s4104_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5121_ s4104_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm, s_))) =>
+ SOME
+ (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5146_ s4104_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5146_ s4104_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rm, s_))) =>
+ SOME
+ (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5167_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5167_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5184_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5184_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5201_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5201_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5218_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5218_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5235_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5235_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_WU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5252_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5252_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_L_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5269_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5269_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_LU_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5286_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5286_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_L),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5303_ s4104_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s5303_ s4104_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_LU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5320_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5320_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJ_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5337_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5337_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJN_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5354_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5354_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJX_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5371_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5371_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FMIN_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5388_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5388_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FMAX_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5405_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5405_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FEQ_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5422_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLT_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5422_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FLT_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5439_ s4104_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLE_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s5439_ s4104_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FLE_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5456_ s4104_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_X_W, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s5456_ s4104_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_X_W, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FMV_X_W), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5469_ s4104_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_W_X, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s5469_ s4104_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_W_X, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FMV_W_X), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5482_ s4104_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FCLASS_S, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s5482_ s4104_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FCLASS_S, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FCLASS_S), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s5495_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, imm, s_)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s5495_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rd, imm, s_))) =>
+ SOME (C_FLWSP (imm, rd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5507_ s4104_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s5507_ s4104_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rd, uimm, s_))) =>
+ SOME (C_FSWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5519_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rdc, rsc, uimm, s_)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s5519_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rdc, rsc, uimm, s_))) =>
+ SOME (C_FLW (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5535_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rsc1, rsc2, uimm, s_)) => ((( 32 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s5535_ s4104_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rsc1, rsc2, uimm, s_))) =>
+ SOME
+ (C_FSW (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s5551_ s4104_0 : (( 32 words$word # string))option)) of
SOME ((s, s_)) => T
| _ => F
- )) then (case (s3449_ s2569_0 : (( 32 words$word # string)) option) of
+ )) then (case (s5551_ s4104_0 : (( 32 words$word # string)) option) of
(SOME ((s, s_))) =>
SOME (ILLEGAL s, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3457_ s2569_0 : (( 16 words$word # string))option)) of
+ else if ((case ((s5559_ s4104_0 : (( 16 words$word # string))option)) of
SOME ((s, s_)) => T
| _ => F
- )) then (case (s3457_ s2569_0 : (( 16 words$word # string)) option) of
+ )) then (case (s5559_ s4104_0 : (( 16 words$word # string)) option) of
(SOME ((s, s_))) =>
SOME (C_ILLEGAL s, ((string_length arg_)) - ((string_length s_)))
)
@@ -34687,10 +48885,10 @@ val _ = Define `
((decode:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bv= (encdec_backwards bv))`;
-(*val decodeCompressed : mword ty16 -> ast*)
+(*val decodeCompressed : mword ty16 -> M ast*)
val _ = Define `
- ((decodeCompressed:(16)words$word -> ast) bv= (encdec_compressed_backwards bv))`;
+ ((decodeCompressed:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bv= (encdec_compressed_backwards bv))`;
(*val ext_init : unit -> unit*)
@@ -34726,8 +48924,7 @@ val _ = Define `
(*val isRVC : mword ty16 -> bool*)
val _ = Define `
- ((isRVC:(16)words$word -> bool) h=
- (~ (((((subrange_vec_dec h (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))`;
+ ((isRVC:(16)words$word -> bool) h= (~ (((((subrange_vec_dec h (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))`;
(*val fetch : unit -> M FetchResult*)
@@ -34739,28 +48936,26 @@ val _ = Define `
(case ((ext_fetch_check_pc w__0 w__1)) of
Ext_FetchAddr_Error (e) => sail2_state_monad$returnS (F_Ext_Error e)
| Ext_FetchAddr_OK (use_pc) => sail2_state_monad$bindS
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((cast_unit_vec0 ((access_vec_dec use_pc (( 0 : int):ii))) : 1 words$word)) <> (vec_of_bits [B0] : 1 words$word)))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((cast_unit_vec0 ((access_vec_dec use_pc (( 1 : int):ii))) : 1 words$word)) <> (vec_of_bits [B0] : 1 words$word)))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((((access_vec_dec use_pc (( 0 : int):ii))) <> B0))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((access_vec_dec use_pc (( 1 : int):ii))) <> B0))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__2 : bool) . sail2_state_monad$returnS ((~ w__2)))))) (\ (w__4 : bool) .
if w__4 then sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__5 : 32 words$word) .
- sail2_state_monad$returnS (F_Error (E_Fetch_Addr_Align, w__5)))
+ sail2_state_monad$returnS (F_Error (E_Fetch_Addr_Align () , w__5)))
else sail2_state_monad$bindS
- (translateAddr use_pc Execute : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__6 : (( 32 words$word), ExceptionType)
+ (translateAddr use_pc (Execute () ) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__6 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__6 of
- TR_Failure (e) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__7 : 32 words$word) .
sail2_state_monad$returnS (F_Error (e, w__7)))
- | TR_Address (ppclo) => sail2_state_monad$bindS
- (mem_read Execute ppclo (( 2 : int):ii) F F F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__8 : ( 16 words$word)
+ | TR_Address ((ppclo, _)) => sail2_state_monad$bindS
+ (mem_read (Execute () ) ppclo (( 2 : int):ii) F F F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__8 : ( 16 words$word)
MemoryOpResult) .
(case w__8 of
MemException (e) => sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__9 : 32 words$word) .
- sail2_state_monad$returnS (F_Error (E_Fetch_Access_Fault, w__9)))
+ sail2_state_monad$returnS (F_Error (e, w__9)))
| MemValue (ilo) =>
if ((isRVC ilo)) then sail2_state_monad$returnS (F_RVC ilo)
else sail2_state_monad$bindS
@@ -34770,16 +48965,16 @@ val _ = Define `
(case ((ext_fetch_check_pc w__11 PC_hi)) of
Ext_FetchAddr_Error (e) => sail2_state_monad$returnS (F_Ext_Error e)
| Ext_FetchAddr_OK (use_pc_hi) => sail2_state_monad$bindS
- (translateAddr use_pc_hi Execute : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__12 : (( 32 words$word), ExceptionType)
+ (translateAddr use_pc_hi (Execute () ) : ( (( 32 words$word), ExceptionType)TR_Result) M) (\ (w__12 : (( 32 words$word), ExceptionType)
TR_Result) .
(case w__12 of
- TR_Failure (e) => sail2_state_monad$returnS (F_Error (e, PC_hi))
- | TR_Address (ppchi) => sail2_state_monad$bindS
- (mem_read Execute ppchi (( 2 : int):ii) F F F
+ TR_Failure ((e, _)) => sail2_state_monad$returnS (F_Error (e, PC_hi))
+ | TR_Address ((ppchi, _)) => sail2_state_monad$bindS
+ (mem_read (Execute () ) ppchi (( 2 : int):ii) F F F
: ( ( 16 words$word)MemoryOpResult) M) (\ (w__13 : ( 16 words$word)
MemoryOpResult) .
sail2_state_monad$returnS ((case w__13 of
- MemException (e) => F_Error (E_Fetch_Access_Fault, PC_hi)
+ MemException (e) => F_Error (e, PC_hi)
| MemValue (ihi) => F_Base ((concat_vec ihi ilo : 32 words$word))
)))
))
@@ -34812,8 +49007,8 @@ val _ = Define `
let (_ : unit) = (ext_handle_fetch_check_error e) in
sail2_state_monad$returnS (RETIRE_FAIL, F)
| F_Error ((e, addr)) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS (RETIRE_FAIL, F))
- | F_RVC (h) =>
- let ast = (decodeCompressed h) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ | F_RVC (h) => sail2_state_monad$bindS
+ (decodeCompressed h) (\ ast . sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_instr () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__3 : Privilege) . sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 32 words$word) M) (\ (w__4 : 32 words$word) . sail2_state_monad$bindS
@@ -34835,7 +49030,7 @@ val _ = Define `
(sail2_state_monad$write_regS nextPC_ref ((add_vec_int w__7 (( 2 : int):ii) : 32 words$word)))
(ext_post_decode_hook ast)) (\ (w__8 : ast) . sail2_state_monad$bindS
(execute w__8) (\ (w__9 : Retired) . sail2_state_monad$returnS (w__9, T))))
- else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS (RETIRE_FAIL, T)))
+ else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS (RETIRE_FAIL, T))))
| F_Base (w) => sail2_state_monad$bindS
(decode w) (\ ast . sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_instr () )) then sail2_state_monad$bindS
@@ -34882,7 +49077,7 @@ val _ = Define `
(if w__1 then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_exit_code_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
let exit_val = (lem$w2ui w__2) in
- sail2_state_monad$returnS (let _ =
+ sail2_state_monad$returnS (let (_ : unit) =
(if (((exit_val = (( 0 : int):ii)))) then print_endline "SUCCESS"
else print_int "FAILURE: " exit_val) in
i))
diff --git a/prover_snapshots/hol4/RV32/riscv_extrasScript.sml b/prover_snapshots/hol4/RV32/riscv_extrasScript.sml
index c6d4fe2..6d00d57 100644
--- a/prover_snapshots/hol4/RV32/riscv_extrasScript.sml
+++ b/prover_snapshots/hol4/RV32/riscv_extrasScript.sml
@@ -1,4 +1,4 @@
-(*Generated by Lem from handwritten_support/riscv_extras.lem.*)
+(*Generated by Lem from handwritten_support/0.11/riscv_extras.lem.*)
open HolKernel Parse boolLib bossLib;
open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
@@ -19,37 +19,37 @@ val _ = new_theory "riscv_extras"
val _ = type_abbrev((* 'a *) "bitvector" , ``: 'a words$word``);
val _ = Define `
- ((MEM_fence_rw_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_rw))`;
+ ((MEM_fence_rw_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_rw () )))`;
val _ = Define `
- ((MEM_fence_r_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_rw))`;
+ ((MEM_fence_r_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_rw () )))`;
val _ = Define `
- ((MEM_fence_r_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_r))`;
+ ((MEM_fence_r_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_r () )))`;
val _ = Define `
- ((MEM_fence_rw_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_w))`;
+ ((MEM_fence_rw_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_w () )))`;
val _ = Define `
- ((MEM_fence_w_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_w))`;
+ ((MEM_fence_w_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_w () )))`;
val _ = Define `
- ((MEM_fence_w_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_rw))`;
+ ((MEM_fence_w_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_rw () )))`;
val _ = Define `
- ((MEM_fence_rw_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_r))`;
+ ((MEM_fence_rw_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_r () )))`;
val _ = Define `
- ((MEM_fence_r_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_w))`;
+ ((MEM_fence_r_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_w () )))`;
val _ = Define `
- ((MEM_fence_w_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_r))`;
+ ((MEM_fence_w_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_r () )))`;
val _ = Define `
- ((MEM_fence_tso:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_tso))`;
+ ((MEM_fence_tso:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_tso () )))`;
val _ = Define `
- ((MEM_fence_i:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_i))`;
+ ((MEM_fence_i:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_i () )))`;
(*val MEMea : forall 'rv 'a 'e. Size 'a => bitvector 'a -> integer -> monad 'rv unit 'e*)
@@ -169,6 +169,16 @@ val _ = Define `
((sys_enable_rvc:unit -> bool) () = T)`;
+(*val sys_enable_next : unit -> bool*)
+val _ = Define `
+ ((sys_enable_next:unit -> bool) () = T)`;
+
+
+(*val sys_enable_fdext : unit -> bool*)
+val _ = Define `
+ ((sys_enable_fdext:unit -> bool) () = T)`;
+
+
(*val plat_ram_base : forall 'a. Size 'a => unit -> bitvector 'a*)
val _ = Define `
((plat_ram_base:unit -> 'a words$word) () = (integer_word$i2w(( 0 : int))))`;
diff --git a/prover_snapshots/hol4/RV32/riscv_extras_fdextScript.sml b/prover_snapshots/hol4/RV32/riscv_extras_fdextScript.sml
new file mode 100644
index 0000000..ab68323
--- /dev/null
+++ b/prover_snapshots/hol4/RV32/riscv_extras_fdextScript.sml
@@ -0,0 +1,209 @@
+(*Generated by Lem from handwritten_support/0.11/riscv_extras_fdext.lem.*)
+open HolKernel Parse boolLib bossLib;
+open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
+
+val _ = numLib.prefer_num();
+
+
+
+val _ = new_theory "riscv_extras_fdext"
+
+(*open import Pervasives*)
+(*open import Pervasives_extra*)
+(*open import Sail2_instr_kinds*)
+(*open import Sail2_values*)
+(*open import Sail2_operators_mwords*)
+(*open import Sail2_prompt_monad*)
+(*open import Sail2_prompt*)
+
+val _ = type_abbrev((* 'a *) "bitvector0" , ``: 'a words$word``);
+
+(* stub functions emulating the C softfloat interface *)
+
+(*val softfloat_f32_add : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_add:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_sub : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_sub:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_mul : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_mul:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_div : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_div:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_add : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_add:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_sub : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_sub:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_mul : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_mul:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_div : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_div:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+
+(*val softfloat_f32_muladd : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_muladd:'rm words$word -> 's words$word -> 's words$word -> 's words$word -> unit) _ _ _ _= () )`;
+
+
+(*val softfloat_f64_muladd : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_muladd:'rm words$word -> 's words$word -> 's words$word -> 's words$word -> unit) _ _ _ _= () )`;
+
+
+
+(*val softfloat_f32_sqrt : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_sqrt:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_sqrt : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_sqrt:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_to_i32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_i32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_ui32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_ui32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i32_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i32_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui32_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui32_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_i64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_i64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_ui64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_ui64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f64_to_i32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_i32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_ui32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_ui32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_i64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_i64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_ui64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_ui64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i64_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i64_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui64_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui64_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_lt : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_lt:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_le : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_le:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_eq : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_eq:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_lt : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_lt:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_le : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_le:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_eq : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_eq:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+val _ = export_theory()
+
diff --git a/prover_snapshots/hol4/RV32/riscv_typesScript.sml b/prover_snapshots/hol4/RV32/riscv_typesScript.sml
index 14b1a48..ba52ffb 100644
--- a/prover_snapshots/hol4/RV32/riscv_typesScript.sml
+++ b/prover_snapshots/hol4/RV32/riscv_typesScript.sml
@@ -65,12 +65,32 @@ val _ = Hol_datatype `
+
+
+
+
val _ = type_abbrev( "xlenbits" , ``: 32 bits``);
+
+
+
+
+val _ = type_abbrev( "flenbits" , ``: 32 bits``);
+
val _ = type_abbrev( "mem_meta" , ``: unit``);
+val _ = type_abbrev( "exc_code" , ``: 8 bits``);
+
+val _ = type_abbrev( "ext_ptw" , ``: unit``);
+
+val _ = type_abbrev( "ext_ptw_fail" , ``: unit``);
+
+val _ = type_abbrev( "ext_ptw_error" , ``: unit``);
+
+val _ = type_abbrev( "ext_exc_type" , ``: unit``);
+
val _ = type_abbrev( "half" , ``: 16 bits``);
val _ = type_abbrev( "word" , ``: 32 bits``);
@@ -92,7 +112,7 @@ val _ = type_abbrev( "imm20" , ``: 20 bits``);
val _ = type_abbrev( "amo" , ``: 1 bits``);
val _ = Hol_datatype `
- Architecture = RV32 | RV64 | RV128`;
+ Architecture = RV32 | RV64 | RV128`;
@@ -102,38 +122,106 @@ val _ = type_abbrev( "arch_xlen" , ``: 2 bits``);
val _ = type_abbrev( "priv_level" , ``: 2 bits``);
val _ = Hol_datatype `
- Privilege = User | Supervisor | Machine`;
+ Privilege = User | Supervisor | Machine`;
+
+
+
+
+val _ = Hol_datatype `
+ AccessType = Read of ('a) | Write of ('a) | ReadWrite of (('a # 'a)) | Execute of (unit)`;
+
+
+
+
+val _ = Hol_datatype `
+ ExceptionType =
+ E_Fetch_Addr_Align of (unit)
+ | E_Fetch_Access_Fault of (unit)
+ | E_Illegal_Instr of (unit)
+ | E_Breakpoint of (unit)
+ | E_Load_Addr_Align of (unit)
+ | E_Load_Access_Fault of (unit)
+ | E_SAMO_Addr_Align of (unit)
+ | E_SAMO_Access_Fault of (unit)
+ | E_U_EnvCall of (unit)
+ | E_S_EnvCall of (unit)
+ | E_Reserved_10 of (unit)
+ | E_M_EnvCall of (unit)
+ | E_Fetch_Page_Fault of (unit)
+ | E_Load_Page_Fault of (unit)
+ | E_Reserved_14 of (unit)
+ | E_SAMO_Page_Fault of (unit)
+ | E_Extension of (ext_exc_type)`;
+
+
+
+
+val _ = Hol_datatype `
+ amoop = AMOSWAP | AMOADD | AMOXOR | AMOAND | AMOOR | AMOMIN | AMOMAX | AMOMINU | AMOMAXU`;
+
+
+
+
+val _ = Hol_datatype `
+ bop = RISCV_BEQ | RISCV_BNE | RISCV_BLT | RISCV_BGE | RISCV_BLTU | RISCV_BGEU`;
+
+
+
+
+val _ = Hol_datatype `
+ csrop = CSRRW | CSRRS | CSRRC`;
+
+
+
+
+val _ = Hol_datatype `
+ f_bin_op_S = FSGNJ_S | FSGNJN_S | FSGNJX_S | FMIN_S | FMAX_S | FEQ_S | FLT_S | FLE_S`;
+
+
+
+
+val _ = Hol_datatype `
+ f_bin_rm_op_S = FADD_S | FSUB_S | FMUL_S | FDIV_S`;
val _ = Hol_datatype `
- amoop = AMOSWAP | AMOADD | AMOXOR | AMOAND | AMOOR | AMOMIN | AMOMAX | AMOMINU | AMOMAXU`;
+ f_madd_op_S = FMADD_S | FMSUB_S | FNMSUB_S | FNMADD_S`;
val _ = Hol_datatype `
- bop = RISCV_BEQ | RISCV_BNE | RISCV_BLT | RISCV_BGE | RISCV_BLTU | RISCV_BGEU`;
+ f_un_op_S = FCLASS_S | FMV_X_W | FMV_W_X`;
val _ = Hol_datatype `
- csrop = CSRRW | CSRRS | CSRRC`;
+ f_un_rm_op_S =
+ FSQRT_S
+ | FCVT_W_S
+ | FCVT_WU_S
+ | FCVT_S_W
+ | FCVT_S_WU
+ | FCVT_L_S
+ | FCVT_LU_S
+ | FCVT_S_L
+ | FCVT_S_LU`;
val _ = Hol_datatype `
- iop = RISCV_ADDI | RISCV_SLTI | RISCV_SLTIU | RISCV_XORI | RISCV_ORI | RISCV_ANDI`;
+ iop = RISCV_ADDI | RISCV_SLTI | RISCV_SLTIU | RISCV_XORI | RISCV_ORI | RISCV_ANDI`;
val _ = Hol_datatype `
rop =
- RISCV_ADD
+ RISCV_ADD
| RISCV_SUB
| RISCV_SLL
| RISCV_SLT
@@ -148,31 +236,37 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- ropw = RISCV_ADDW | RISCV_SUBW | RISCV_SLLW | RISCV_SRLW | RISCV_SRAW`;
+ ropw = RISCV_ADDW | RISCV_SUBW | RISCV_SLLW | RISCV_SRLW | RISCV_SRAW`;
val _ = Hol_datatype `
- sop = RISCV_SLLI | RISCV_SRLI | RISCV_SRAI`;
+ rounding_mode = RM_RNE | RM_RTZ | RM_RDN | RM_RUP | RM_RMM | RM_DYN`;
val _ = Hol_datatype `
- sopw = RISCV_SLLIW | RISCV_SRLIW | RISCV_SRAIW`;
+ sop = RISCV_SLLI | RISCV_SRLI | RISCV_SRAI`;
val _ = Hol_datatype `
- uop = RISCV_LUI | RISCV_AUIPC`;
+ sopw = RISCV_SLLIW | RISCV_SRLIW | RISCV_SRAIW`;
val _ = Hol_datatype `
- word_width = BYTE | HALF | WORD | DOUBLE`;
+ uop = RISCV_LUI | RISCV_AUIPC`;
+
+
+
+
+val _ = Hol_datatype `
+ word_width = BYTE | HALF | WORD | DOUBLE`;
@@ -246,6 +340,28 @@ val _ = Hol_datatype `
| REMW of ((regidx # regidx # regidx # bool))
| CSR of (( 12 bits # regidx # regidx # bool # csrop))
| URET of (unit)
+ | C_NOP_HINT of ( 6 bits)
+ | C_ADDI_HINT of (regidx)
+ | C_LI_HINT of ( 6 bits)
+ | C_LUI_HINT of ( 6 bits)
+ | C_MV_HINT of (regidx)
+ | C_ADD_HINT of (regidx)
+ | C_SLLI_HINT of (( 6 bits # regidx))
+ | C_SRLI_HINT of (cregidx)
+ | C_SRAI_HINT of (cregidx)
+ | FENCE_RESERVED of (( 4 bits # 4 bits # 4 bits # regidx # regidx))
+ | FENCEI_RESERVED of (( 12 bits # regidx # regidx))
+ | LOAD_FP of (( 12 bits # regidx # regidx # word_width))
+ | STORE_FP of (( 12 bits # regidx # regidx # word_width))
+ | F_MADD_TYPE_S of ((regidx # regidx # regidx # rounding_mode # regidx # f_madd_op_S))
+ | F_BIN_RM_TYPE_S of ((regidx # regidx # rounding_mode # regidx # f_bin_rm_op_S))
+ | F_UN_RM_TYPE_S of ((regidx # rounding_mode # regidx # f_un_rm_op_S))
+ | F_BIN_TYPE_S of ((regidx # regidx # regidx # f_bin_op_S))
+ | F_UN_TYPE_S of ((regidx # regidx # f_un_op_S))
+ | C_FLWSP of (( 6 bits # regidx))
+ | C_FSWSP of (( 6 bits # regidx))
+ | C_FLW of (( 5 bits # cregidx # cregidx))
+ | C_FSW of (( 5 bits # cregidx # cregidx))
| ILLEGAL of (word)
| C_ILLEGAL of (half)`;
@@ -253,22 +369,27 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- Retired = RETIRE_SUCCESS | RETIRE_FAIL`;
+ PTW_Error =
+ PTW_Invalid_Addr of (unit)
+ | PTW_Access of (unit)
+ | PTW_Invalid_PTE of (unit)
+ | PTW_No_Permission of (unit)
+ | PTW_Misaligned of (unit)
+ | PTW_PTE_Update of (unit)
+ | PTW_Ext_Error of (ext_ptw_error)`;
val _ = Hol_datatype `
- AccessType = Read | Write | ReadWrite | Execute`;
+ Retired = RETIRE_SUCCESS | RETIRE_FAIL`;
-val _ = type_abbrev( "exc_code" , ``: 8 bits``);
-
val _ = Hol_datatype `
InterruptType =
- I_U_Software
+ I_U_Software
| I_S_Software
| I_M_Software
| I_U_Timer
@@ -282,29 +403,6 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- ExceptionType =
- E_Fetch_Addr_Align
- | E_Fetch_Access_Fault
- | E_Illegal_Instr
- | E_Breakpoint
- | E_Load_Addr_Align
- | E_Load_Access_Fault
- | E_SAMO_Addr_Align
- | E_SAMO_Access_Fault
- | E_U_EnvCall
- | E_S_EnvCall
- | E_Reserved_10
- | E_M_EnvCall
- | E_Fetch_Page_Fault
- | E_Load_Page_Fault
- | E_Reserved_14
- | E_SAMO_Page_Fault
- | E_CHERI`;
-
-
-
-
-val _ = Hol_datatype `
exception = Error_not_implemented of (string) | Error_internal_error of (unit)`;
@@ -313,7 +411,7 @@ val _ = Hol_datatype `
val _ = type_abbrev( "tv_mode" , ``: 2 bits``);
val _ = Hol_datatype `
- TrapVectorMode = TV_Direct | TV_Vector | TV_Reserved`;
+ TrapVectorMode = TV_Direct | TV_Vector | TV_Reserved`;
@@ -321,7 +419,7 @@ val _ = Hol_datatype `
val _ = type_abbrev( "ext_status" , ``: 2 bits``);
val _ = Hol_datatype `
- ExtStatus = Off | Initial | Clean | Dirty`;
+ ExtStatus = Off | Initial | Clean | Dirty`;
@@ -329,62 +427,82 @@ val _ = Hol_datatype `
val _ = type_abbrev( "satp_mode" , ``: 4 bits``);
val _ = Hol_datatype `
- SATPMode = Sbare | Sv32 | Sv39 | Sv48`;
+ SATPMode = Sbare | Sv32 | Sv39 | Sv48`;
val _ = type_abbrev( "csrRW" , ``: 2 bits``);
+val _ = type_abbrev( "ext_access_type" , ``: unit``);
+
val _ = type_abbrev( "regtype" , ``: xlenbits``);
+val _ = type_abbrev( "fregtype" , ``: flenbits``);
+
val _ = Hol_datatype `
- Misa = <| Misa_Misa_chunk_0 : 32 words$word |>`;
+ f_madd_op_D = FMADD_D | FMSUB_D | FNMSUB_D | FNMADD_D`;
+
val _ = Hol_datatype `
- SV48_PTE = <| SV48_PTE_SV48_PTE_chunk_0 : 64 words$word |>`;
+ f_bin_rm_op_D = FADD_D | FSUB_D | FMUL_D | FDIV_D`;
+
val _ = Hol_datatype `
- PTE_Bits = <| PTE_Bits_PTE_Bits_chunk_0 : 8 words$word |>`;
+ f_un_rm_op_D =
+ FSQRT_D
+ | FCVT_W_D
+ | FCVT_WU_D
+ | FCVT_D_W
+ | FCVT_D_WU
+ | FCVT_S_D
+ | FCVT_D_S
+ | FCVT_L_D
+ | FCVT_LU_D
+ | FCVT_D_L
+ | FCVT_D_LU`;
+
val _ = Hol_datatype `
- Pmpcfg_ent = <| Pmpcfg_ent_Pmpcfg_ent_chunk_0 : 8 words$word |>`;
+ f_bin_op_D = FSGNJ_D | FSGNJN_D | FSGNJX_D | FMIN_D | FMAX_D | FEQ_D | FLT_D | FLE_D`;
+
val _ = Hol_datatype `
- Mstatus = <| Mstatus_Mstatus_chunk_0 : 32 words$word |>`;
+ f_un_op_D = FCLASS_D | FMV_X_D | FMV_D_X`;
+
val _ = Hol_datatype `
- Sstatus = <| Sstatus_Sstatus_chunk_0 : 32 words$word |>`;
+ Misa = <| Misa_Misa_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Ustatus = <| Ustatus_Ustatus_chunk_0 : 32 words$word |>`;
+ Counteren = <| Counteren_Counteren_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Minterrupts = <| Minterrupts_Minterrupts_chunk_0 : 32 words$word |>`;
+ Counterin = <| Counterin_Counterin_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Sinterrupts = <| Sinterrupts_Sinterrupts_chunk_0 : 32 words$word |>`;
+ Fcsr = <| Fcsr_Fcsr_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Uinterrupts = <| Uinterrupts_Uinterrupts_chunk_0 : 32 words$word |>`;
+ Mcause = <| Mcause_Mcause_chunk_0 : 32 words$word |>`;
@@ -394,191 +512,257 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- Sedeleg = <| Sedeleg_Sedeleg_chunk_0 : 32 words$word |>`;
+ Minterrupts = <| Minterrupts_Minterrupts_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Mtvec = <| Mtvec_Mtvec_chunk_0 : 32 words$word |>`;
+ Mstatus = <| Mstatus_Mstatus_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Satp32 = <| Satp32_Satp32_chunk_0 : 32 words$word |>`;
+ Mstatush = <| Mstatush_Mstatush_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Mcause = <| Mcause_Mcause_chunk_0 : 32 words$word |>`;
+ Mtvec = <| Mtvec_Mtvec_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Counteren = <| Counteren_Counteren_chunk_0 : 32 words$word |>`;
+ PTE_Bits = <| PTE_Bits_PTE_Bits_chunk_0 : 8 words$word |>`;
val _ = Hol_datatype `
- Satp64 = <| Satp64_Satp64_chunk_0 : 64 words$word |>`;
+ Pmpcfg_ent = <| Pmpcfg_ent_Pmpcfg_ent_chunk_0 : 8 words$word |>`;
val _ = Hol_datatype `
- PmpAddrMatchType = OFF | TOR | NA4 | NAPOT`;
+ SV32_PTE = <| SV32_PTE_SV32_PTE_chunk_0 : 32 words$word |>`;
+val _ = Hol_datatype `
+ SV32_Paddr = <| SV32_Paddr_SV32_Paddr_chunk_0 : 34 words$word |>`;
-val _ = type_abbrev( "pmp_addr_range" , ``: ((xlenbits # xlenbits))option``);
-val _ = Hol_datatype `
- pmpAddrMatch = PMP_NoMatch | PMP_PartialMatch | PMP_Match`;
+val _ = Hol_datatype `
+ SV32_Vaddr = <| SV32_Vaddr_SV32_Vaddr_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- pmpMatch = PMP_Success | PMP_Continue | PMP_Fail`;
+ SV39_PTE = <| SV39_PTE_SV39_PTE_chunk_0 : 64 words$word |>`;
+
+val _ = Hol_datatype `
+ SV39_Paddr = <| SV39_Paddr_SV39_Paddr_chunk_0 : 56 words$word |>`;
+
val _ = Hol_datatype `
- Ext_FetchAddr_Check = Ext_FetchAddr_OK of (xlenbits) | Ext_FetchAddr_Error of ('a)`;
+ SV39_Vaddr = <| SV39_Vaddr_SV39_Vaddr_chunk_0 : 39 words$word |>`;
+
+val _ = Hol_datatype `
+ SV48_PTE = <| SV48_PTE_SV48_PTE_chunk_0 : 64 words$word |>`;
+
val _ = Hol_datatype `
- Ext_ControlAddr_Check = Ext_ControlAddr_OK of (xlenbits) | Ext_ControlAddr_Error of ('a)`;
+ SV48_Paddr = <| SV48_Paddr_SV48_Paddr_chunk_0 : 56 words$word |>`;
+
+val _ = Hol_datatype `
+ SV48_Vaddr = <| SV48_Vaddr_SV48_Vaddr_chunk_0 : 48 words$word |>`;
+
val _ = Hol_datatype `
- Ext_DataAddr_Check = Ext_DataAddr_OK of (xlenbits) | Ext_DataAddr_Error of ('a)`;
+ Satp32 = <| Satp32_Satp32_chunk_0 : 32 words$word |>`;
+val _ = Hol_datatype `
+ Satp64 = <| Satp64_Satp64_chunk_0 : 64 words$word |>`;
-val _ = type_abbrev( "ext_fetch_addr_error" , ``: unit``);
-val _ = type_abbrev( "ext_control_addr_error" , ``: unit``);
-val _ = type_abbrev( "ext_data_addr_error" , ``: unit``);
+val _ = Hol_datatype `
+ Sedeleg = <| Sedeleg_Sedeleg_chunk_0 : 32 words$word |>`;
+
-val _ = type_abbrev( "ext_exception" , ``: unit``);
val _ = Hol_datatype `
- sync_exception =
- <| sync_exception_trap : ExceptionType;
- sync_exception_excinfo : xlenbits option;
- sync_exception_ext : ext_exception option |>`;
+ Sinterrupts = <| Sinterrupts_Sinterrupts_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- interrupt_set =
- Ints_Pending of (xlenbits) | Ints_Delegated of (xlenbits) | Ints_Empty of (unit)`;
+ Sstatus = <| Sstatus_Sstatus_chunk_0 : 32 words$word |>`;
+
+
+val _ = Hol_datatype `
+ Uinterrupts = <| Uinterrupts_Uinterrupts_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- ctl_result =
- CTL_TRAP of (sync_exception) | CTL_SRET of (unit) | CTL_MRET of (unit) | CTL_URET of (unit)`;
+ Ustatus = <| Ustatus_Ustatus_chunk_0 : 32 words$word |>`;
+
+val _ = Hol_datatype `
+ htif_cmd = <| htif_cmd_htif_cmd_chunk_0 : 64 words$word |>`;
+
val _ = Hol_datatype `
- MemoryOpResult = MemValue of ('a) | MemException of (ExceptionType)`;
+ PmpAddrMatchType = OFF | TOR | NA4 | NAPOT`;
+
+val _ = type_abbrev( "pmp_addr_range" , ``: ((xlenbits # xlenbits))option``);
val _ = Hol_datatype `
- htif_cmd = <| htif_cmd_htif_cmd_chunk_0 : 64 words$word |>`;
+ pmpAddrMatch = PMP_NoMatch | PMP_PartialMatch | PMP_Match`;
-val _ = type_abbrev( "pteAttribs" , ``: 8 bits``);
val _ = Hol_datatype `
- PTW_Error = PTW_Access | PTW_Invalid_PTE | PTW_No_Permission | PTW_Misaligned | PTW_PTE_Update`;
+ pmpMatch = PMP_Success | PMP_Continue | PMP_Fail`;
-val _ = type_abbrev( "vaddr32" , ``: 32 bits``);
+val _ = Hol_datatype `
+ Ext_FetchAddr_Check = Ext_FetchAddr_OK of (xlenbits) | Ext_FetchAddr_Error of ('a)`;
-val _ = type_abbrev( "paddr32" , ``: 34 bits``);
-val _ = type_abbrev( "pte32" , ``: 32 bits``);
-val _ = type_abbrev( "asid32" , ``: 9 bits``);
val _ = Hol_datatype `
- SV32_Vaddr = <| SV32_Vaddr_SV32_Vaddr_chunk_0 : 32 words$word |>`;
+ Ext_ControlAddr_Check = Ext_ControlAddr_OK of (xlenbits) | Ext_ControlAddr_Error of ('a)`;
+
val _ = Hol_datatype `
- SV48_Vaddr = <| SV48_Vaddr_SV48_Vaddr_chunk_0 : 48 words$word |>`;
+ Ext_DataAddr_Check = Ext_DataAddr_OK of (xlenbits) | Ext_DataAddr_Error of ('a)`;
+
val _ = Hol_datatype `
- SV48_Paddr = <| SV48_Paddr_SV48_Paddr_chunk_0 : 56 words$word |>`;
+ Ext_PhysAddr_Check = Ext_PhysAddr_OK of (unit) | Ext_PhysAddr_Error of (ExceptionType)`;
-val _ = Hol_datatype `
- SV32_Paddr = <| SV32_Paddr_SV32_Paddr_chunk_0 : 34 words$word |>`;
+val _ = type_abbrev( "ext_fetch_addr_error" , ``: unit``);
+
+val _ = type_abbrev( "ext_control_addr_error" , ``: unit``);
+
+val _ = type_abbrev( "ext_data_addr_error" , ``: unit``);
+val _ = type_abbrev( "ext_exception" , ``: unit``);
val _ = Hol_datatype `
- SV32_PTE = <| SV32_PTE_SV32_PTE_chunk_0 : 32 words$word |>`;
+ sync_exception =
+ <| sync_exception_trap : ExceptionType;
+ sync_exception_excinfo : xlenbits option;
+ sync_exception_ext : ext_exception option |>`;
-val _ = type_abbrev( "paddr64" , ``: 56 bits``);
+val _ = type_abbrev( "bits_rm" , ``: 3 bits``);
-val _ = type_abbrev( "pte64" , ``: 64 bits``);
+val _ = type_abbrev( "bits_fflags" , ``: 5 bits``);
-val _ = type_abbrev( "asid64" , ``: 16 bits``);
+val _ = type_abbrev( "bits_S" , ``: 32 bits``);
-val _ = type_abbrev( "vaddr39" , ``: 39 bits``);
+val _ = type_abbrev( "bits_D" , ``: 64 bits``);
+
+val _ = type_abbrev( "bits_W" , ``: 32 bits``);
+
+val _ = type_abbrev( "bits_WU" , ``: 32 bits``);
+
+val _ = type_abbrev( "bits_L" , ``: 64 bits``);
+
+val _ = type_abbrev( "bits_LU" , ``: 64 bits``);
val _ = Hol_datatype `
- SV39_Vaddr = <| SV39_Vaddr_SV39_Vaddr_chunk_0 : 39 words$word |>`;
+ interrupt_set =
+ Ints_Pending of (xlenbits) | Ints_Delegated of (xlenbits) | Ints_Empty of (unit)`;
+
val _ = Hol_datatype `
- SV39_Paddr = <| SV39_Paddr_SV39_Paddr_chunk_0 : 56 words$word |>`;
+ ctl_result =
+ CTL_TRAP of (sync_exception) | CTL_SRET of (unit) | CTL_MRET of (unit) | CTL_URET of (unit)`;
+
val _ = Hol_datatype `
- SV39_PTE = <| SV39_PTE_SV39_PTE_chunk_0 : 64 words$word |>`;
+ MemoryOpResult = MemValue of ('a) | MemException of (ExceptionType)`;
+
+val _ = type_abbrev( "pteAttribs" , ``: 8 bits``);
+
+val _ = type_abbrev( "extPte" , ``: 10 bits``);
+
+val _ = Hol_datatype `
+ PTE_Check = PTE_Check_Success of (ext_ptw) | PTE_Check_Failure of ((ext_ptw # ext_ptw_fail))`;
+
+
+
+
+val _ = type_abbrev( "vaddr32" , ``: 32 bits``);
+
+val _ = type_abbrev( "paddr32" , ``: 34 bits``);
+
+val _ = type_abbrev( "pte32" , ``: 32 bits``);
+
+val _ = type_abbrev( "asid32" , ``: 9 bits``);
+
+val _ = type_abbrev( "paddr64" , ``: 56 bits``);
+
+val _ = type_abbrev( "pte64" , ``: 64 bits``);
+
+val _ = type_abbrev( "asid64" , ``: 16 bits``);
+
+val _ = type_abbrev( "vaddr39" , ``: 39 bits``);
+
val _ = type_abbrev( "vaddr48" , ``: 48 bits``);
val _ = type_abbrev( "pte48" , ``: 64 bits``);
val _ = Hol_datatype `
PTW_Result =
- PTW_Success of (('paddr # 'pte # 'paddr # ii # bool)) | PTW_Failure of (PTW_Error)`;
+ PTW_Success of (('paddr # 'pte # 'paddr # ii # bool # ext_ptw))
+ | PTW_Failure of ((PTW_Error # ext_ptw))`;
val _ = Hol_datatype `
- TR_Result = TR_Address of ('a_paddr) | TR_Failure of ('b_failure)`;
+ TR_Result =
+ TR_Address of (('a_paddr # ext_ptw)) | TR_Failure of (('b_failure # ext_ptw))`;
@@ -611,139 +795,55 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
register_value =
- Regval_vector of ((ii # bool # register_value list))
+ Regval_vector of ( register_value list)
| Regval_list of ( register_value list)
| Regval_option of ( register_value option)
| Regval_Counteren of (Counteren)
+ | Regval_Counterin of (Counterin)
+ | Regval_Fcsr of (Fcsr)
| Regval_Mcause of (Mcause)
| Regval_Medeleg of (Medeleg)
| Regval_Minterrupts of (Minterrupts)
| Regval_Misa of (Misa)
| Regval_Mstatus of (Mstatus)
+ | Regval_Mstatush of (Mstatush)
| Regval_Mtvec of (Mtvec)
| Regval_Pmpcfg_ent of (Pmpcfg_ent)
| Regval_Privilege of (Privilege)
| Regval_Sedeleg of (Sedeleg)
| Regval_Sinterrupts of (Sinterrupts)
| Regval_TLB_Entry_9_32_34_32 of ( (9, 32, 34, 32)TLB_Entry)
- | Regval_bool of (bool)
- | Regval_vector_32_dec_bit of ( 32 words$word)
- | Regval_vector_64_dec_bit of ( 64 words$word)`;
+ | Regval_bit of (bitU)
+ | Regval_bitvector_32_dec of ( 32 words$word)
+ | Regval_bitvector_4_dec of ( 4 words$word)
+ | Regval_bitvector_64_dec of ( 64 words$word)
+ | Regval_bool of (bool)`;
val _ = Hol_datatype `
regstate =
- <| satp : 32 words$word;
- tlb32 : ( (9, 32, 34, 32)TLB_Entry)option;
- htif_exit_code : 64 words$word;
- htif_done : bool;
- htif_tohost : 64 words$word;
- mtimecmp : 64 words$word;
- utval : 32 words$word;
- ucause : Mcause;
- uepc : 32 words$word;
- uscratch : 32 words$word;
- utvec : Mtvec;
- pmpaddr15 : 32 words$word;
- pmpaddr14 : 32 words$word;
- pmpaddr13 : 32 words$word;
- pmpaddr12 : 32 words$word;
- pmpaddr11 : 32 words$word;
- pmpaddr10 : 32 words$word;
- pmpaddr9 : 32 words$word;
- pmpaddr8 : 32 words$word;
- pmpaddr7 : 32 words$word;
- pmpaddr6 : 32 words$word;
- pmpaddr5 : 32 words$word;
- pmpaddr4 : 32 words$word;
- pmpaddr3 : 32 words$word;
- pmpaddr2 : 32 words$word;
- pmpaddr1 : 32 words$word;
- pmpaddr0 : 32 words$word;
- pmp15cfg : Pmpcfg_ent;
- pmp14cfg : Pmpcfg_ent;
- pmp13cfg : Pmpcfg_ent;
- pmp12cfg : Pmpcfg_ent;
- pmp11cfg : Pmpcfg_ent;
- pmp10cfg : Pmpcfg_ent;
- pmp9cfg : Pmpcfg_ent;
- pmp8cfg : Pmpcfg_ent;
- pmp7cfg : Pmpcfg_ent;
- pmp6cfg : Pmpcfg_ent;
- pmp5cfg : Pmpcfg_ent;
- pmp4cfg : Pmpcfg_ent;
- pmp3cfg : Pmpcfg_ent;
- pmp2cfg : Pmpcfg_ent;
- pmp1cfg : Pmpcfg_ent;
- pmp0cfg : Pmpcfg_ent;
- tselect : 32 words$word;
- stval : 32 words$word;
- scause : Mcause;
- sepc : 32 words$word;
- sscratch : 32 words$word;
- stvec : Mtvec;
- sideleg : Sinterrupts;
- sedeleg : Sedeleg;
- mhartid : 32 words$word;
- marchid : 32 words$word;
- mimpid : 32 words$word;
- mvendorid : 32 words$word;
- minstret_written : bool;
- minstret : 64 words$word;
- mtime : 64 words$word;
- mcycle : 64 words$word;
- scounteren : Counteren;
- mcounteren : Counteren;
- mscratch : 32 words$word;
- mtval : 32 words$word;
- mepc : 32 words$word;
- mcause : Mcause;
- mtvec : Mtvec;
- medeleg : Medeleg;
- mideleg : Minterrupts;
- mie : Minterrupts;
- mip : Minterrupts;
- mstatus : Mstatus;
- misa : Misa;
- cur_inst : 32 words$word;
- cur_privilege : Privilege;
- x31 : 32 words$word;
- x30 : 32 words$word;
- x29 : 32 words$word;
- x28 : 32 words$word;
- x27 : 32 words$word;
- x26 : 32 words$word;
- x25 : 32 words$word;
- x24 : 32 words$word;
- x23 : 32 words$word;
- x22 : 32 words$word;
- x21 : 32 words$word;
- x20 : 32 words$word;
- x19 : 32 words$word;
- x18 : 32 words$word;
- x17 : 32 words$word;
- x16 : 32 words$word;
- x15 : 32 words$word;
- x14 : 32 words$word;
- x13 : 32 words$word;
- x12 : 32 words$word;
- x11 : 32 words$word;
- x10 : 32 words$word;
- x9 : 32 words$word;
- x8 : 32 words$word;
- x7 : 32 words$word;
- x6 : 32 words$word;
- x5 : 32 words$word;
- x4 : 32 words$word;
- x3 : 32 words$word;
- x2 : 32 words$word;
- x1 : 32 words$word;
- Xs : ( 32 words$word) list;
- instbits : 32 words$word;
- nextPC : 32 words$word;
- PC : 32 words$word |>`;
+ <| Counteren_reg : string -> Counteren;
+ Counterin_reg : string -> Counterin;
+ Fcsr_reg : string -> Fcsr;
+ Mcause_reg : string -> Mcause;
+ Medeleg_reg : string -> Medeleg;
+ Minterrupts_reg : string -> Minterrupts;
+ Misa_reg : string -> Misa;
+ Mstatus_reg : string -> Mstatus;
+ Mstatush_reg : string -> Mstatush;
+ Mtvec_reg : string -> Mtvec;
+ Pmpcfg_ent_reg : string -> Pmpcfg_ent;
+ Privilege_reg : string -> Privilege;
+ Sedeleg_reg : string -> Sedeleg;
+ Sinterrupts_reg : string -> Sinterrupts;
+ bit_reg : string -> bitU;
+ bitvector_32_dec_reg : string -> 32 words$word;
+ bitvector_4_dec_reg : string -> 4 words$word;
+ bitvector_64_dec_reg : string -> 64 words$word;
+ bool_reg : string -> bool;
+ option_TLB_Entry_9_32_34_32_reg : string -> ( (9, 32, 34, 32)TLB_Entry)option |>`;
@@ -762,6 +862,31 @@ val _ = Define `
((regval_of_Counteren:Counteren -> register_value) v= (Regval_Counteren v))`;
+(*val Counterin_of_regval : register_value -> maybe Counterin*)
+
+val _ = Define `
+ ((Counterin_of_regval:register_value ->(Counterin)option) merge_var=
+ ((case merge_var of Regval_Counterin (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Counterin : Counterin -> register_value*)
+
+val _ = Define `
+ ((regval_of_Counterin:Counterin -> register_value) v= (Regval_Counterin v))`;
+
+
+(*val Fcsr_of_regval : register_value -> maybe Fcsr*)
+
+val _ = Define `
+ ((Fcsr_of_regval:register_value ->(Fcsr)option) merge_var= ((case merge_var of Regval_Fcsr (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Fcsr : Fcsr -> register_value*)
+
+val _ = Define `
+ ((regval_of_Fcsr:Fcsr -> register_value) v= (Regval_Fcsr v))`;
+
+
(*val Mcause_of_regval : register_value -> maybe Mcause*)
val _ = Define `
@@ -826,6 +951,19 @@ val _ = Define `
((regval_of_Mstatus:Mstatus -> register_value) v= (Regval_Mstatus v))`;
+(*val Mstatush_of_regval : register_value -> maybe Mstatush*)
+
+val _ = Define `
+ ((Mstatush_of_regval:register_value ->(Mstatush)option) merge_var=
+ ((case merge_var of Regval_Mstatush (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Mstatush : Mstatush -> register_value*)
+
+val _ = Define `
+ ((regval_of_Mstatush:Mstatush -> register_value) v= (Regval_Mstatush v))`;
+
+
(*val Mtvec_of_regval : register_value -> maybe Mtvec*)
val _ = Define `
@@ -903,42 +1041,67 @@ val _ = Define `
((regval_of_TLB_Entry_9_32_34_32:((9),(32),(34),(32))TLB_Entry -> register_value) v= (Regval_TLB_Entry_9_32_34_32 v))`;
-(*val bool_of_regval : register_value -> maybe bool*)
+(*val bit_of_regval : register_value -> maybe bitU*)
val _ = Define `
- ((bool_of_regval:register_value ->(bool)option) merge_var= ((case merge_var of Regval_bool (v) => SOME v | _ => NONE )))`;
+ ((bit_of_regval:register_value ->(bitU)option) merge_var= ((case merge_var of Regval_bit (v) => SOME v | _ => NONE )))`;
-(*val regval_of_bool : bool -> register_value*)
+(*val regval_of_bit : bitU -> register_value*)
val _ = Define `
- ((regval_of_bool:bool -> register_value) v= (Regval_bool v))`;
+ ((regval_of_bit:bitU -> register_value) v= (Regval_bit v))`;
+
+
+(*val bitvector_32_dec_of_regval : register_value -> maybe (mword ty32)*)
+
+val _ = Define `
+ ((bitvector_32_dec_of_regval:register_value ->((32)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_32_dec (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_bitvector_32_dec : mword ty32 -> register_value*)
+
+val _ = Define `
+ ((regval_of_bitvector_32_dec:(32)words$word -> register_value) v= (Regval_bitvector_32_dec v))`;
+
+
+(*val bitvector_4_dec_of_regval : register_value -> maybe (mword ty4)*)
+
+val _ = Define `
+ ((bitvector_4_dec_of_regval:register_value ->((4)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_4_dec (v) => SOME v | _ => NONE )))`;
+
+(*val regval_of_bitvector_4_dec : mword ty4 -> register_value*)
-(*val vector_32_dec_bit_of_regval : register_value -> maybe (mword ty32)*)
+val _ = Define `
+ ((regval_of_bitvector_4_dec:(4)words$word -> register_value) v= (Regval_bitvector_4_dec v))`;
+
+
+(*val bitvector_64_dec_of_regval : register_value -> maybe (mword ty64)*)
val _ = Define `
- ((vector_32_dec_bit_of_regval:register_value ->((32)words$word)option) merge_var=
- ((case merge_var of Regval_vector_32_dec_bit (v) => SOME v | _ => NONE )))`;
+ ((bitvector_64_dec_of_regval:register_value ->((64)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_64_dec (v) => SOME v | _ => NONE )))`;
-(*val regval_of_vector_32_dec_bit : mword ty32 -> register_value*)
+(*val regval_of_bitvector_64_dec : mword ty64 -> register_value*)
val _ = Define `
- ((regval_of_vector_32_dec_bit:(32)words$word -> register_value) v= (Regval_vector_32_dec_bit v))`;
+ ((regval_of_bitvector_64_dec:(64)words$word -> register_value) v= (Regval_bitvector_64_dec v))`;
-(*val vector_64_dec_bit_of_regval : register_value -> maybe (mword ty64)*)
+(*val bool_of_regval : register_value -> maybe bool*)
val _ = Define `
- ((vector_64_dec_bit_of_regval:register_value ->((64)words$word)option) merge_var=
- ((case merge_var of Regval_vector_64_dec_bit (v) => SOME v | _ => NONE )))`;
+ ((bool_of_regval:register_value ->(bool)option) merge_var= ((case merge_var of Regval_bool (v) => SOME v | _ => NONE )))`;
-(*val regval_of_vector_64_dec_bit : mword ty64 -> register_value*)
+(*val regval_of_bool : bool -> register_value*)
val _ = Define `
- ((regval_of_vector_64_dec_bit:(64)words$word -> register_value) v= (Regval_vector_64_dec_bit v))`;
+ ((regval_of_bool:bool -> register_value) v= (Regval_bool v))`;
@@ -947,14 +1110,14 @@ val _ = Define `
val _ = Define `
((vector_of_regval:(register_value -> 'a option) -> register_value ->('a list)option) of_regval1=
(\x . (case x of
- Regval_vector (_, _, v) => just_list (MAP of_regval1 v)
+ Regval_vector v => just_list (MAP of_regval1 v)
| _ => NONE
)))`;
-(*val regval_of_vector : forall 'a. ('a -> register_value) -> integer -> bool -> list 'a -> register_value*)
+(*val regval_of_vector : forall 'a. ('a -> register_value) -> list 'a -> register_value*)
val _ = Define `
- ((regval_of_vector:('a -> register_value) -> int -> bool -> 'a list -> register_value) regval_of1 size1 is_inc xs= (Regval_vector (size1, is_inc, MAP regval_of1 xs)))`;
+ ((regval_of_vector:('a -> register_value) -> 'a list -> register_value) regval_of1 xs= (Regval_vector (MAP regval_of1 xs)))`;
(*val list_of_regval : forall 'a. (register_value -> maybe 'a) -> register_value -> maybe (list 'a)*)
@@ -989,35 +1152,59 @@ val _ = Define `
val _ = Define `
((satp_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "satp";
- read_from := (\ s . s.satp);
- write_to := (\ v s . (( s with<| satp := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "satp");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "satp" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((tlb32_ref:((regstate),(register_value),((((9),(32),(34),(32))TLB_Entry)option))register_ref)= (<|
name := "tlb32";
- read_from := (\ s . s.tlb32);
- write_to := (\ v s . (( s with<| tlb32 := v |>)));
+ read_from := (\ s . s.option_TLB_Entry_9_32_34_32_reg "tlb32");
+ write_to := (\ v s . (( s with<| option_TLB_Entry_9_32_34_32_reg :=
+ (\ reg . if reg = "tlb32" then v else s.option_TLB_Entry_9_32_34_32_reg reg) |>)));
of_regval := (\ v . option_of_regval (\ v . TLB_Entry_9_32_34_32_of_regval v) v);
regval_of := (\ v . regval_of_option (\ v . regval_of_TLB_Entry_9_32_34_32 v) v) |>))`;
val _ = Define `
+ ((htif_payload_writes_ref:((regstate),(register_value),((4)words$word))register_ref)= (<|
+ name := "htif_payload_writes";
+ read_from := (\ s . s.bitvector_4_dec_reg "htif_payload_writes");
+ write_to := (\ v s . (( s with<| bitvector_4_dec_reg :=
+ (\ reg . if reg = "htif_payload_writes" then v else s.bitvector_4_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_4_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_4_dec v) |>))`;
+
+
+val _ = Define `
+ ((htif_cmd_write_ref:((regstate),(register_value),(bitU))register_ref)= (<|
+ name := "htif_cmd_write";
+ read_from := (\ s . s.bit_reg "htif_cmd_write");
+ write_to := (\ v s . (( s with<| bit_reg :=
+ (\ reg . if reg = "htif_cmd_write" then v else s.bit_reg reg) |>)));
+ of_regval := (\ v . bit_of_regval v);
+ regval_of := (\ v . regval_of_bit v) |>))`;
+
+
+val _ = Define `
((htif_exit_code_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "htif_exit_code";
- read_from := (\ s . s.htif_exit_code);
- write_to := (\ v s . (( s with<| htif_exit_code := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "htif_exit_code");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "htif_exit_code" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((htif_done_ref:((regstate),(register_value),(bool))register_ref)= (<|
name := "htif_done";
- read_from := (\ s . s.htif_done);
- write_to := (\ v s . (( s with<| htif_done := v |>)));
+ read_from := (\ s . s.bool_reg "htif_done");
+ write_to := (\ v s . (( s with<| bool_reg :=
+ (\ reg . if reg = "htif_done" then v else s.bool_reg reg) |>)));
of_regval := (\ v . bool_of_regval v);
regval_of := (\ v . regval_of_bool v) |>))`;
@@ -1025,35 +1212,389 @@ val _ = Define `
val _ = Define `
((htif_tohost_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "htif_tohost";
- read_from := (\ s . s.htif_tohost);
- write_to := (\ v s . (( s with<| htif_tohost := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "htif_tohost");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "htif_tohost" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mtimecmp_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mtimecmp";
- read_from := (\ s . s.mtimecmp);
- write_to := (\ v s . (( s with<| mtimecmp := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mtimecmp");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mtimecmp" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((fcsr_ref:((regstate),(register_value),(Fcsr))register_ref)= (<|
+ name := "fcsr";
+ read_from := (\ s . s.Fcsr_reg "fcsr");
+ write_to := (\ v s . (( s with<| Fcsr_reg :=
+ (\ reg . if reg = "fcsr" then v else s.Fcsr_reg reg) |>)));
+ of_regval := (\ v . Fcsr_of_regval v);
+ regval_of := (\ v . regval_of_Fcsr v) |>))`;
+
+
+val _ = Define `
+ ((f31_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f31";
+ read_from := (\ s . s.bitvector_32_dec_reg "f31");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f31" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f30_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f30";
+ read_from := (\ s . s.bitvector_32_dec_reg "f30");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f30" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f29_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f29";
+ read_from := (\ s . s.bitvector_32_dec_reg "f29");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f29" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f28_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f28";
+ read_from := (\ s . s.bitvector_32_dec_reg "f28");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f28" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f27_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f27";
+ read_from := (\ s . s.bitvector_32_dec_reg "f27");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f27" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f26_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f26";
+ read_from := (\ s . s.bitvector_32_dec_reg "f26");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f26" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f25_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f25";
+ read_from := (\ s . s.bitvector_32_dec_reg "f25");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f25" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f24_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f24";
+ read_from := (\ s . s.bitvector_32_dec_reg "f24");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f24" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f23_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f23";
+ read_from := (\ s . s.bitvector_32_dec_reg "f23");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f23" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f22_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f22";
+ read_from := (\ s . s.bitvector_32_dec_reg "f22");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f22" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f21_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f21";
+ read_from := (\ s . s.bitvector_32_dec_reg "f21");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f21" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f20_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f20";
+ read_from := (\ s . s.bitvector_32_dec_reg "f20");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f20" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f19_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f19";
+ read_from := (\ s . s.bitvector_32_dec_reg "f19");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f19" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f18_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f18";
+ read_from := (\ s . s.bitvector_32_dec_reg "f18");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f18" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f17_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f17";
+ read_from := (\ s . s.bitvector_32_dec_reg "f17");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f17" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f16_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f16";
+ read_from := (\ s . s.bitvector_32_dec_reg "f16");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f16" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f15_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f15";
+ read_from := (\ s . s.bitvector_32_dec_reg "f15");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f15" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f14_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f14";
+ read_from := (\ s . s.bitvector_32_dec_reg "f14");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f14" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f13_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f13";
+ read_from := (\ s . s.bitvector_32_dec_reg "f13");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f13" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f12_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f12";
+ read_from := (\ s . s.bitvector_32_dec_reg "f12");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f12" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f11_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f11";
+ read_from := (\ s . s.bitvector_32_dec_reg "f11");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f11" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f10_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f10";
+ read_from := (\ s . s.bitvector_32_dec_reg "f10");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f10" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f9_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f9";
+ read_from := (\ s . s.bitvector_32_dec_reg "f9");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f9" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f8_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f8";
+ read_from := (\ s . s.bitvector_32_dec_reg "f8");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f8" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f7_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f7";
+ read_from := (\ s . s.bitvector_32_dec_reg "f7");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f7" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f6_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f6";
+ read_from := (\ s . s.bitvector_32_dec_reg "f6");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f6" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f5_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f5";
+ read_from := (\ s . s.bitvector_32_dec_reg "f5");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f5" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f4_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f4";
+ read_from := (\ s . s.bitvector_32_dec_reg "f4");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f4" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f3_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f3";
+ read_from := (\ s . s.bitvector_32_dec_reg "f3");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f3" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f2_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f2";
+ read_from := (\ s . s.bitvector_32_dec_reg "f2");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f2" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f1_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f1";
+ read_from := (\ s . s.bitvector_32_dec_reg "f1");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f1" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((f0_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
+ name := "f0";
+ read_from := (\ s . s.bitvector_32_dec_reg "f0");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "f0" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
+
+
+val _ = Define `
+ ((float_fflags_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "float_fflags";
+ read_from := (\ s . s.bitvector_64_dec_reg "float_fflags");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "float_fflags" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((float_result_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "float_result";
+ read_from := (\ s . s.bitvector_64_dec_reg "float_result");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "float_result" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((utval_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "utval";
- read_from := (\ s . s.utval);
- write_to := (\ v s . (( s with<| utval := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "utval");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "utval" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((ucause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "ucause";
- read_from := (\ s . s.ucause);
- write_to := (\ v s . (( s with<| ucause := v |>)));
+ read_from := (\ s . s.Mcause_reg "ucause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "ucause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1061,26 +1602,29 @@ val _ = Define `
val _ = Define `
((uepc_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "uepc";
- read_from := (\ s . s.uepc);
- write_to := (\ v s . (( s with<| uepc := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "uepc");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "uepc" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((uscratch_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "uscratch";
- read_from := (\ s . s.uscratch);
- write_to := (\ v s . (( s with<| uscratch := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "uscratch");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "uscratch" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((utvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "utvec";
- read_from := (\ s . s.utvec);
- write_to := (\ v s . (( s with<| utvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "utvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "utvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1088,152 +1632,169 @@ val _ = Define `
val _ = Define `
((pmpaddr15_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr15";
- read_from := (\ s . s.pmpaddr15);
- write_to := (\ v s . (( s with<| pmpaddr15 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr15");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr15" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr14_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr14";
- read_from := (\ s . s.pmpaddr14);
- write_to := (\ v s . (( s with<| pmpaddr14 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr14");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr14" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr13_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr13";
- read_from := (\ s . s.pmpaddr13);
- write_to := (\ v s . (( s with<| pmpaddr13 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr13");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr13" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr12_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr12";
- read_from := (\ s . s.pmpaddr12);
- write_to := (\ v s . (( s with<| pmpaddr12 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr12");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr12" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr11_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr11";
- read_from := (\ s . s.pmpaddr11);
- write_to := (\ v s . (( s with<| pmpaddr11 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr11");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr11" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr10_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr10";
- read_from := (\ s . s.pmpaddr10);
- write_to := (\ v s . (( s with<| pmpaddr10 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr10");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr10" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr9_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr9";
- read_from := (\ s . s.pmpaddr9);
- write_to := (\ v s . (( s with<| pmpaddr9 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr9");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr9" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr8_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr8";
- read_from := (\ s . s.pmpaddr8);
- write_to := (\ v s . (( s with<| pmpaddr8 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr8");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr8" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr7_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr7";
- read_from := (\ s . s.pmpaddr7);
- write_to := (\ v s . (( s with<| pmpaddr7 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr7");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr7" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr6_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr6";
- read_from := (\ s . s.pmpaddr6);
- write_to := (\ v s . (( s with<| pmpaddr6 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr6");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr6" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr5_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr5";
- read_from := (\ s . s.pmpaddr5);
- write_to := (\ v s . (( s with<| pmpaddr5 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr5");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr5" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr4_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr4";
- read_from := (\ s . s.pmpaddr4);
- write_to := (\ v s . (( s with<| pmpaddr4 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr4");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr4" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr3_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr3";
- read_from := (\ s . s.pmpaddr3);
- write_to := (\ v s . (( s with<| pmpaddr3 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr3");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr3" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr2_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr2";
- read_from := (\ s . s.pmpaddr2);
- write_to := (\ v s . (( s with<| pmpaddr2 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr2");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr2" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr1_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr1";
- read_from := (\ s . s.pmpaddr1);
- write_to := (\ v s . (( s with<| pmpaddr1 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr1");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr1" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmpaddr0_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "pmpaddr0";
- read_from := (\ s . s.pmpaddr0);
- write_to := (\ v s . (( s with<| pmpaddr0 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "pmpaddr0");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "pmpaddr0" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((pmp15cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp15cfg";
- read_from := (\ s . s.pmp15cfg);
- write_to := (\ v s . (( s with<| pmp15cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp15cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp15cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1241,8 +1802,9 @@ val _ = Define `
val _ = Define `
((pmp14cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp14cfg";
- read_from := (\ s . s.pmp14cfg);
- write_to := (\ v s . (( s with<| pmp14cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp14cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp14cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1250,8 +1812,9 @@ val _ = Define `
val _ = Define `
((pmp13cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp13cfg";
- read_from := (\ s . s.pmp13cfg);
- write_to := (\ v s . (( s with<| pmp13cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp13cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp13cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1259,8 +1822,9 @@ val _ = Define `
val _ = Define `
((pmp12cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp12cfg";
- read_from := (\ s . s.pmp12cfg);
- write_to := (\ v s . (( s with<| pmp12cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp12cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp12cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1268,8 +1832,9 @@ val _ = Define `
val _ = Define `
((pmp11cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp11cfg";
- read_from := (\ s . s.pmp11cfg);
- write_to := (\ v s . (( s with<| pmp11cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp11cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp11cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1277,8 +1842,9 @@ val _ = Define `
val _ = Define `
((pmp10cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp10cfg";
- read_from := (\ s . s.pmp10cfg);
- write_to := (\ v s . (( s with<| pmp10cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp10cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp10cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1286,8 +1852,9 @@ val _ = Define `
val _ = Define `
((pmp9cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp9cfg";
- read_from := (\ s . s.pmp9cfg);
- write_to := (\ v s . (( s with<| pmp9cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp9cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp9cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1295,8 +1862,9 @@ val _ = Define `
val _ = Define `
((pmp8cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp8cfg";
- read_from := (\ s . s.pmp8cfg);
- write_to := (\ v s . (( s with<| pmp8cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp8cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp8cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1304,8 +1872,9 @@ val _ = Define `
val _ = Define `
((pmp7cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp7cfg";
- read_from := (\ s . s.pmp7cfg);
- write_to := (\ v s . (( s with<| pmp7cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp7cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp7cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1313,8 +1882,9 @@ val _ = Define `
val _ = Define `
((pmp6cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp6cfg";
- read_from := (\ s . s.pmp6cfg);
- write_to := (\ v s . (( s with<| pmp6cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp6cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp6cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1322,8 +1892,9 @@ val _ = Define `
val _ = Define `
((pmp5cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp5cfg";
- read_from := (\ s . s.pmp5cfg);
- write_to := (\ v s . (( s with<| pmp5cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp5cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp5cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1331,8 +1902,9 @@ val _ = Define `
val _ = Define `
((pmp4cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp4cfg";
- read_from := (\ s . s.pmp4cfg);
- write_to := (\ v s . (( s with<| pmp4cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp4cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp4cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1340,8 +1912,9 @@ val _ = Define `
val _ = Define `
((pmp3cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp3cfg";
- read_from := (\ s . s.pmp3cfg);
- write_to := (\ v s . (( s with<| pmp3cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp3cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp3cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1349,8 +1922,9 @@ val _ = Define `
val _ = Define `
((pmp2cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp2cfg";
- read_from := (\ s . s.pmp2cfg);
- write_to := (\ v s . (( s with<| pmp2cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp2cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp2cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1358,8 +1932,9 @@ val _ = Define `
val _ = Define `
((pmp1cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp1cfg";
- read_from := (\ s . s.pmp1cfg);
- write_to := (\ v s . (( s with<| pmp1cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp1cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp1cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1367,8 +1942,9 @@ val _ = Define `
val _ = Define `
((pmp0cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp0cfg";
- read_from := (\ s . s.pmp0cfg);
- write_to := (\ v s . (( s with<| pmp0cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp0cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp0cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1376,26 +1952,29 @@ val _ = Define `
val _ = Define `
((tselect_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "tselect";
- read_from := (\ s . s.tselect);
- write_to := (\ v s . (( s with<| tselect := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "tselect");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "tselect" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((stval_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "stval";
- read_from := (\ s . s.stval);
- write_to := (\ v s . (( s with<| stval := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "stval");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "stval" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((scause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "scause";
- read_from := (\ s . s.scause);
- write_to := (\ v s . (( s with<| scause := v |>)));
+ read_from := (\ s . s.Mcause_reg "scause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "scause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1403,26 +1982,29 @@ val _ = Define `
val _ = Define `
((sepc_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "sepc";
- read_from := (\ s . s.sepc);
- write_to := (\ v s . (( s with<| sepc := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "sepc");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "sepc" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((sscratch_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "sscratch";
- read_from := (\ s . s.sscratch);
- write_to := (\ v s . (( s with<| sscratch := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "sscratch");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "sscratch" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((stvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "stvec";
- read_from := (\ s . s.stvec);
- write_to := (\ v s . (( s with<| stvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "stvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "stvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1430,8 +2012,9 @@ val _ = Define `
val _ = Define `
((sideleg_ref:((regstate),(register_value),(Sinterrupts))register_ref)= (<|
name := "sideleg";
- read_from := (\ s . s.sideleg);
- write_to := (\ v s . (( s with<| sideleg := v |>)));
+ read_from := (\ s . s.Sinterrupts_reg "sideleg");
+ write_to := (\ v s . (( s with<| Sinterrupts_reg :=
+ (\ reg . if reg = "sideleg" then v else s.Sinterrupts_reg reg) |>)));
of_regval := (\ v . Sinterrupts_of_regval v);
regval_of := (\ v . regval_of_Sinterrupts v) |>))`;
@@ -1439,8 +2022,9 @@ val _ = Define `
val _ = Define `
((sedeleg_ref:((regstate),(register_value),(Sedeleg))register_ref)= (<|
name := "sedeleg";
- read_from := (\ s . s.sedeleg);
- write_to := (\ v s . (( s with<| sedeleg := v |>)));
+ read_from := (\ s . s.Sedeleg_reg "sedeleg");
+ write_to := (\ v s . (( s with<| Sedeleg_reg :=
+ (\ reg . if reg = "sedeleg" then v else s.Sedeleg_reg reg) |>)));
of_regval := (\ v . Sedeleg_of_regval v);
regval_of := (\ v . regval_of_Sedeleg v) |>))`;
@@ -1448,44 +2032,49 @@ val _ = Define `
val _ = Define `
((mhartid_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mhartid";
- read_from := (\ s . s.mhartid);
- write_to := (\ v s . (( s with<| mhartid := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mhartid");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mhartid" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((marchid_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "marchid";
- read_from := (\ s . s.marchid);
- write_to := (\ v s . (( s with<| marchid := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "marchid");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "marchid" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((mimpid_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mimpid";
- read_from := (\ s . s.mimpid);
- write_to := (\ v s . (( s with<| mimpid := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mimpid");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mimpid" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((mvendorid_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mvendorid";
- read_from := (\ s . s.mvendorid);
- write_to := (\ v s . (( s with<| mvendorid := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mvendorid");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mvendorid" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((minstret_written_ref:((regstate),(register_value),(bool))register_ref)= (<|
name := "minstret_written";
- read_from := (\ s . s.minstret_written);
- write_to := (\ v s . (( s with<| minstret_written := v |>)));
+ read_from := (\ s . s.bool_reg "minstret_written");
+ write_to := (\ v s . (( s with<| bool_reg :=
+ (\ reg . if reg = "minstret_written" then v else s.bool_reg reg) |>)));
of_regval := (\ v . bool_of_regval v);
regval_of := (\ v . regval_of_bool v) |>))`;
@@ -1493,35 +2082,49 @@ val _ = Define `
val _ = Define `
((minstret_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "minstret";
- read_from := (\ s . s.minstret);
- write_to := (\ v s . (( s with<| minstret := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "minstret");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "minstret" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mtime_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mtime";
- read_from := (\ s . s.mtime);
- write_to := (\ v s . (( s with<| mtime := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mtime");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mtime" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mcycle_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mcycle";
- read_from := (\ s . s.mcycle);
- write_to := (\ v s . (( s with<| mcycle := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mcycle");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mcycle" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((mcountinhibit_ref:((regstate),(register_value),(Counterin))register_ref)= (<|
+ name := "mcountinhibit";
+ read_from := (\ s . s.Counterin_reg "mcountinhibit");
+ write_to := (\ v s . (( s with<| Counterin_reg :=
+ (\ reg . if reg = "mcountinhibit" then v else s.Counterin_reg reg) |>)));
+ of_regval := (\ v . Counterin_of_regval v);
+ regval_of := (\ v . regval_of_Counterin v) |>))`;
val _ = Define `
((scounteren_ref:((regstate),(register_value),(Counteren))register_ref)= (<|
name := "scounteren";
- read_from := (\ s . s.scounteren);
- write_to := (\ v s . (( s with<| scounteren := v |>)));
+ read_from := (\ s . s.Counteren_reg "scounteren");
+ write_to := (\ v s . (( s with<| Counteren_reg :=
+ (\ reg . if reg = "scounteren" then v else s.Counteren_reg reg) |>)));
of_regval := (\ v . Counteren_of_regval v);
regval_of := (\ v . regval_of_Counteren v) |>))`;
@@ -1529,8 +2132,9 @@ val _ = Define `
val _ = Define `
((mcounteren_ref:((regstate),(register_value),(Counteren))register_ref)= (<|
name := "mcounteren";
- read_from := (\ s . s.mcounteren);
- write_to := (\ v s . (( s with<| mcounteren := v |>)));
+ read_from := (\ s . s.Counteren_reg "mcounteren");
+ write_to := (\ v s . (( s with<| Counteren_reg :=
+ (\ reg . if reg = "mcounteren" then v else s.Counteren_reg reg) |>)));
of_regval := (\ v . Counteren_of_regval v);
regval_of := (\ v . regval_of_Counteren v) |>))`;
@@ -1538,35 +2142,39 @@ val _ = Define `
val _ = Define `
((mscratch_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mscratch";
- read_from := (\ s . s.mscratch);
- write_to := (\ v s . (( s with<| mscratch := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mscratch");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mscratch" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((mtval_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mtval";
- read_from := (\ s . s.mtval);
- write_to := (\ v s . (( s with<| mtval := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mtval");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mtval" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((mepc_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mepc";
- read_from := (\ s . s.mepc);
- write_to := (\ v s . (( s with<| mepc := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mepc");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mepc" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((mcause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "mcause";
- read_from := (\ s . s.mcause);
- write_to := (\ v s . (( s with<| mcause := v |>)));
+ read_from := (\ s . s.Mcause_reg "mcause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "mcause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1574,8 +2182,9 @@ val _ = Define `
val _ = Define `
((mtvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "mtvec";
- read_from := (\ s . s.mtvec);
- write_to := (\ v s . (( s with<| mtvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "mtvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "mtvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1583,8 +2192,9 @@ val _ = Define `
val _ = Define `
((medeleg_ref:((regstate),(register_value),(Medeleg))register_ref)= (<|
name := "medeleg";
- read_from := (\ s . s.medeleg);
- write_to := (\ v s . (( s with<| medeleg := v |>)));
+ read_from := (\ s . s.Medeleg_reg "medeleg");
+ write_to := (\ v s . (( s with<| Medeleg_reg :=
+ (\ reg . if reg = "medeleg" then v else s.Medeleg_reg reg) |>)));
of_regval := (\ v . Medeleg_of_regval v);
regval_of := (\ v . regval_of_Medeleg v) |>))`;
@@ -1592,8 +2202,9 @@ val _ = Define `
val _ = Define `
((mideleg_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mideleg";
- read_from := (\ s . s.mideleg);
- write_to := (\ v s . (( s with<| mideleg := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mideleg");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mideleg" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1601,8 +2212,9 @@ val _ = Define `
val _ = Define `
((mie_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mie";
- read_from := (\ s . s.mie);
- write_to := (\ v s . (( s with<| mie := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mie");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mie" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1610,8 +2222,9 @@ val _ = Define `
val _ = Define `
((mip_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mip";
- read_from := (\ s . s.mip);
- write_to := (\ v s . (( s with<| mip := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mip");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mip" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1619,17 +2232,29 @@ val _ = Define `
val _ = Define `
((mstatus_ref:((regstate),(register_value),(Mstatus))register_ref)= (<|
name := "mstatus";
- read_from := (\ s . s.mstatus);
- write_to := (\ v s . (( s with<| mstatus := v |>)));
+ read_from := (\ s . s.Mstatus_reg "mstatus");
+ write_to := (\ v s . (( s with<| Mstatus_reg :=
+ (\ reg . if reg = "mstatus" then v else s.Mstatus_reg reg) |>)));
of_regval := (\ v . Mstatus_of_regval v);
regval_of := (\ v . regval_of_Mstatus v) |>))`;
val _ = Define `
+ ((mstatush_ref:((regstate),(register_value),(Mstatush))register_ref)= (<|
+ name := "mstatush";
+ read_from := (\ s . s.Mstatush_reg "mstatush");
+ write_to := (\ v s . (( s with<| Mstatush_reg :=
+ (\ reg . if reg = "mstatush" then v else s.Mstatush_reg reg) |>)));
+ of_regval := (\ v . Mstatush_of_regval v);
+ regval_of := (\ v . regval_of_Mstatush v) |>))`;
+
+
+val _ = Define `
((misa_ref:((regstate),(register_value),(Misa))register_ref)= (<|
name := "misa";
- read_from := (\ s . s.misa);
- write_to := (\ v s . (( s with<| misa := v |>)));
+ read_from := (\ s . s.Misa_reg "misa");
+ write_to := (\ v s . (( s with<| Misa_reg :=
+ (\ reg . if reg = "misa" then v else s.Misa_reg reg) |>)));
of_regval := (\ v . Misa_of_regval v);
regval_of := (\ v . regval_of_Misa v) |>))`;
@@ -1637,17 +2262,19 @@ val _ = Define `
val _ = Define `
((cur_inst_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "cur_inst";
- read_from := (\ s . s.cur_inst);
- write_to := (\ v s . (( s with<| cur_inst := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "cur_inst");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "cur_inst" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((cur_privilege_ref:((regstate),(register_value),(Privilege))register_ref)= (<|
name := "cur_privilege";
- read_from := (\ s . s.cur_privilege);
- write_to := (\ v s . (( s with<| cur_privilege := v |>)));
+ read_from := (\ s . s.Privilege_reg "cur_privilege");
+ write_to := (\ v s . (( s with<| Privilege_reg :=
+ (\ reg . if reg = "cur_privilege" then v else s.Privilege_reg reg) |>)));
of_regval := (\ v . Privilege_of_regval v);
regval_of := (\ v . regval_of_Privilege v) |>))`;
@@ -1655,316 +2282,341 @@ val _ = Define `
val _ = Define `
((x31_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x31";
- read_from := (\ s . s.x31);
- write_to := (\ v s . (( s with<| x31 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x31");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x31" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x30_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x30";
- read_from := (\ s . s.x30);
- write_to := (\ v s . (( s with<| x30 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x30");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x30" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x29_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x29";
- read_from := (\ s . s.x29);
- write_to := (\ v s . (( s with<| x29 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x29");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x29" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x28_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x28";
- read_from := (\ s . s.x28);
- write_to := (\ v s . (( s with<| x28 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x28");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x28" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x27_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x27";
- read_from := (\ s . s.x27);
- write_to := (\ v s . (( s with<| x27 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x27");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x27" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x26_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x26";
- read_from := (\ s . s.x26);
- write_to := (\ v s . (( s with<| x26 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x26");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x26" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x25_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x25";
- read_from := (\ s . s.x25);
- write_to := (\ v s . (( s with<| x25 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x25");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x25" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x24_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x24";
- read_from := (\ s . s.x24);
- write_to := (\ v s . (( s with<| x24 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x24");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x24" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x23_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x23";
- read_from := (\ s . s.x23);
- write_to := (\ v s . (( s with<| x23 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x23");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x23" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x22_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x22";
- read_from := (\ s . s.x22);
- write_to := (\ v s . (( s with<| x22 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x22");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x22" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x21_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x21";
- read_from := (\ s . s.x21);
- write_to := (\ v s . (( s with<| x21 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x21");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x21" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x20_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x20";
- read_from := (\ s . s.x20);
- write_to := (\ v s . (( s with<| x20 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x20");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x20" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x19_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x19";
- read_from := (\ s . s.x19);
- write_to := (\ v s . (( s with<| x19 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x19");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x19" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x18_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x18";
- read_from := (\ s . s.x18);
- write_to := (\ v s . (( s with<| x18 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x18");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x18" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x17_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x17";
- read_from := (\ s . s.x17);
- write_to := (\ v s . (( s with<| x17 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x17");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x17" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x16_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x16";
- read_from := (\ s . s.x16);
- write_to := (\ v s . (( s with<| x16 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x16");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x16" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x15_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x15";
- read_from := (\ s . s.x15);
- write_to := (\ v s . (( s with<| x15 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x15");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x15" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x14_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x14";
- read_from := (\ s . s.x14);
- write_to := (\ v s . (( s with<| x14 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x14");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x14" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x13_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x13";
- read_from := (\ s . s.x13);
- write_to := (\ v s . (( s with<| x13 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x13");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x13" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x12_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x12";
- read_from := (\ s . s.x12);
- write_to := (\ v s . (( s with<| x12 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x12");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x12" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x11_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x11";
- read_from := (\ s . s.x11);
- write_to := (\ v s . (( s with<| x11 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x11");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x11" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x10_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x10";
- read_from := (\ s . s.x10);
- write_to := (\ v s . (( s with<| x10 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x10");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x10" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x9_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x9";
- read_from := (\ s . s.x9);
- write_to := (\ v s . (( s with<| x9 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x9");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x9" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x8_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x8";
- read_from := (\ s . s.x8);
- write_to := (\ v s . (( s with<| x8 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x8");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x8" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x7_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x7";
- read_from := (\ s . s.x7);
- write_to := (\ v s . (( s with<| x7 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x7");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x7" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x6_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x6";
- read_from := (\ s . s.x6);
- write_to := (\ v s . (( s with<| x6 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x6");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x6" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x5_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x5";
- read_from := (\ s . s.x5);
- write_to := (\ v s . (( s with<| x5 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x5");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x5" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x4_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x4";
- read_from := (\ s . s.x4);
- write_to := (\ v s . (( s with<| x4 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x4");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x4" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x3_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x3";
- read_from := (\ s . s.x3);
- write_to := (\ v s . (( s with<| x3 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x3");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x3" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x2_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x2";
- read_from := (\ s . s.x2);
- write_to := (\ v s . (( s with<| x2 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x2");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x2" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((x1_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "x1";
- read_from := (\ s . s.x1);
- write_to := (\ v s . (( s with<| x1 := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
-
-
-val _ = Define `
- ((Xs_ref:((regstate),(register_value),(((32)words$word)list))register_ref)= (<|
- name := "Xs";
- read_from := (\ s . s.Xs);
- write_to := (\ v s . (( s with<| Xs := v |>)));
- of_regval := (\ v . vector_of_regval (\ v . vector_32_dec_bit_of_regval v) v);
- regval_of := (\ v . regval_of_vector (\ v . regval_of_vector_32_dec_bit v)(( 32 : int)) F v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "x1");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "x1" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((instbits_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "instbits";
- read_from := (\ s . s.instbits);
- write_to := (\ v s . (( s with<| instbits := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "instbits");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "instbits" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((nextPC_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "nextPC";
- read_from := (\ s . s.nextPC);
- write_to := (\ v s . (( s with<| nextPC := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "nextPC");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "nextPC" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((PC_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "PC";
- read_from := (\ s . s.PC);
- write_to := (\ v s . (( s with<| PC := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "PC");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "PC" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
(*val get_regval : string -> regstate -> maybe register_value*)
@@ -1972,10 +2624,47 @@ val _ = Define `
((get_regval:string -> regstate ->(register_value)option) reg_name s=
(if reg_name = "satp" then SOME (satp_ref.regval_of (satp_ref.read_from s)) else
if reg_name = "tlb32" then SOME (tlb32_ref.regval_of (tlb32_ref.read_from s)) else
+ if reg_name = "htif_payload_writes" then SOME (htif_payload_writes_ref.regval_of (htif_payload_writes_ref.read_from s)) else
+ if reg_name = "htif_cmd_write" then SOME (htif_cmd_write_ref.regval_of (htif_cmd_write_ref.read_from s)) else
if reg_name = "htif_exit_code" then SOME (htif_exit_code_ref.regval_of (htif_exit_code_ref.read_from s)) else
if reg_name = "htif_done" then SOME (htif_done_ref.regval_of (htif_done_ref.read_from s)) else
if reg_name = "htif_tohost" then SOME (htif_tohost_ref.regval_of (htif_tohost_ref.read_from s)) else
if reg_name = "mtimecmp" then SOME (mtimecmp_ref.regval_of (mtimecmp_ref.read_from s)) else
+ if reg_name = "fcsr" then SOME (fcsr_ref.regval_of (fcsr_ref.read_from s)) else
+ if reg_name = "f31" then SOME (f31_ref.regval_of (f31_ref.read_from s)) else
+ if reg_name = "f30" then SOME (f30_ref.regval_of (f30_ref.read_from s)) else
+ if reg_name = "f29" then SOME (f29_ref.regval_of (f29_ref.read_from s)) else
+ if reg_name = "f28" then SOME (f28_ref.regval_of (f28_ref.read_from s)) else
+ if reg_name = "f27" then SOME (f27_ref.regval_of (f27_ref.read_from s)) else
+ if reg_name = "f26" then SOME (f26_ref.regval_of (f26_ref.read_from s)) else
+ if reg_name = "f25" then SOME (f25_ref.regval_of (f25_ref.read_from s)) else
+ if reg_name = "f24" then SOME (f24_ref.regval_of (f24_ref.read_from s)) else
+ if reg_name = "f23" then SOME (f23_ref.regval_of (f23_ref.read_from s)) else
+ if reg_name = "f22" then SOME (f22_ref.regval_of (f22_ref.read_from s)) else
+ if reg_name = "f21" then SOME (f21_ref.regval_of (f21_ref.read_from s)) else
+ if reg_name = "f20" then SOME (f20_ref.regval_of (f20_ref.read_from s)) else
+ if reg_name = "f19" then SOME (f19_ref.regval_of (f19_ref.read_from s)) else
+ if reg_name = "f18" then SOME (f18_ref.regval_of (f18_ref.read_from s)) else
+ if reg_name = "f17" then SOME (f17_ref.regval_of (f17_ref.read_from s)) else
+ if reg_name = "f16" then SOME (f16_ref.regval_of (f16_ref.read_from s)) else
+ if reg_name = "f15" then SOME (f15_ref.regval_of (f15_ref.read_from s)) else
+ if reg_name = "f14" then SOME (f14_ref.regval_of (f14_ref.read_from s)) else
+ if reg_name = "f13" then SOME (f13_ref.regval_of (f13_ref.read_from s)) else
+ if reg_name = "f12" then SOME (f12_ref.regval_of (f12_ref.read_from s)) else
+ if reg_name = "f11" then SOME (f11_ref.regval_of (f11_ref.read_from s)) else
+ if reg_name = "f10" then SOME (f10_ref.regval_of (f10_ref.read_from s)) else
+ if reg_name = "f9" then SOME (f9_ref.regval_of (f9_ref.read_from s)) else
+ if reg_name = "f8" then SOME (f8_ref.regval_of (f8_ref.read_from s)) else
+ if reg_name = "f7" then SOME (f7_ref.regval_of (f7_ref.read_from s)) else
+ if reg_name = "f6" then SOME (f6_ref.regval_of (f6_ref.read_from s)) else
+ if reg_name = "f5" then SOME (f5_ref.regval_of (f5_ref.read_from s)) else
+ if reg_name = "f4" then SOME (f4_ref.regval_of (f4_ref.read_from s)) else
+ if reg_name = "f3" then SOME (f3_ref.regval_of (f3_ref.read_from s)) else
+ if reg_name = "f2" then SOME (f2_ref.regval_of (f2_ref.read_from s)) else
+ if reg_name = "f1" then SOME (f1_ref.regval_of (f1_ref.read_from s)) else
+ if reg_name = "f0" then SOME (f0_ref.regval_of (f0_ref.read_from s)) else
+ if reg_name = "float_fflags" then SOME (float_fflags_ref.regval_of (float_fflags_ref.read_from s)) else
+ if reg_name = "float_result" then SOME (float_result_ref.regval_of (float_result_ref.read_from s)) else
if reg_name = "utval" then SOME (utval_ref.regval_of (utval_ref.read_from s)) else
if reg_name = "ucause" then SOME (ucause_ref.regval_of (ucause_ref.read_from s)) else
if reg_name = "uepc" then SOME (uepc_ref.regval_of (uepc_ref.read_from s)) else
@@ -2029,6 +2718,7 @@ val _ = Define `
if reg_name = "minstret" then SOME (minstret_ref.regval_of (minstret_ref.read_from s)) else
if reg_name = "mtime" then SOME (mtime_ref.regval_of (mtime_ref.read_from s)) else
if reg_name = "mcycle" then SOME (mcycle_ref.regval_of (mcycle_ref.read_from s)) else
+ if reg_name = "mcountinhibit" then SOME (mcountinhibit_ref.regval_of (mcountinhibit_ref.read_from s)) else
if reg_name = "scounteren" then SOME (scounteren_ref.regval_of (scounteren_ref.read_from s)) else
if reg_name = "mcounteren" then SOME (mcounteren_ref.regval_of (mcounteren_ref.read_from s)) else
if reg_name = "mscratch" then SOME (mscratch_ref.regval_of (mscratch_ref.read_from s)) else
@@ -2041,6 +2731,7 @@ val _ = Define `
if reg_name = "mie" then SOME (mie_ref.regval_of (mie_ref.read_from s)) else
if reg_name = "mip" then SOME (mip_ref.regval_of (mip_ref.read_from s)) else
if reg_name = "mstatus" then SOME (mstatus_ref.regval_of (mstatus_ref.read_from s)) else
+ if reg_name = "mstatush" then SOME (mstatush_ref.regval_of (mstatush_ref.read_from s)) else
if reg_name = "misa" then SOME (misa_ref.regval_of (misa_ref.read_from s)) else
if reg_name = "cur_inst" then SOME (cur_inst_ref.regval_of (cur_inst_ref.read_from s)) else
if reg_name = "cur_privilege" then SOME (cur_privilege_ref.regval_of (cur_privilege_ref.read_from s)) else
@@ -2075,7 +2766,6 @@ val _ = Define `
if reg_name = "x3" then SOME (x3_ref.regval_of (x3_ref.read_from s)) else
if reg_name = "x2" then SOME (x2_ref.regval_of (x2_ref.read_from s)) else
if reg_name = "x1" then SOME (x1_ref.regval_of (x1_ref.read_from s)) else
- if reg_name = "Xs" then SOME (Xs_ref.regval_of (Xs_ref.read_from s)) else
if reg_name = "instbits" then SOME (instbits_ref.regval_of (instbits_ref.read_from s)) else
if reg_name = "nextPC" then SOME (nextPC_ref.regval_of (nextPC_ref.read_from s)) else
if reg_name = "PC" then SOME (PC_ref.regval_of (PC_ref.read_from s)) else
@@ -2087,10 +2777,47 @@ val _ = Define `
((set_regval:string -> register_value -> regstate ->(regstate)option) reg_name v s=
(if reg_name = "satp" then OPTION_MAP (\ v . satp_ref.write_to v s) (satp_ref.of_regval v) else
if reg_name = "tlb32" then OPTION_MAP (\ v . tlb32_ref.write_to v s) (tlb32_ref.of_regval v) else
+ if reg_name = "htif_payload_writes" then OPTION_MAP (\ v . htif_payload_writes_ref.write_to v s) (htif_payload_writes_ref.of_regval v) else
+ if reg_name = "htif_cmd_write" then OPTION_MAP (\ v . htif_cmd_write_ref.write_to v s) (htif_cmd_write_ref.of_regval v) else
if reg_name = "htif_exit_code" then OPTION_MAP (\ v . htif_exit_code_ref.write_to v s) (htif_exit_code_ref.of_regval v) else
if reg_name = "htif_done" then OPTION_MAP (\ v . htif_done_ref.write_to v s) (htif_done_ref.of_regval v) else
if reg_name = "htif_tohost" then OPTION_MAP (\ v . htif_tohost_ref.write_to v s) (htif_tohost_ref.of_regval v) else
if reg_name = "mtimecmp" then OPTION_MAP (\ v . mtimecmp_ref.write_to v s) (mtimecmp_ref.of_regval v) else
+ if reg_name = "fcsr" then OPTION_MAP (\ v . fcsr_ref.write_to v s) (fcsr_ref.of_regval v) else
+ if reg_name = "f31" then OPTION_MAP (\ v . f31_ref.write_to v s) (f31_ref.of_regval v) else
+ if reg_name = "f30" then OPTION_MAP (\ v . f30_ref.write_to v s) (f30_ref.of_regval v) else
+ if reg_name = "f29" then OPTION_MAP (\ v . f29_ref.write_to v s) (f29_ref.of_regval v) else
+ if reg_name = "f28" then OPTION_MAP (\ v . f28_ref.write_to v s) (f28_ref.of_regval v) else
+ if reg_name = "f27" then OPTION_MAP (\ v . f27_ref.write_to v s) (f27_ref.of_regval v) else
+ if reg_name = "f26" then OPTION_MAP (\ v . f26_ref.write_to v s) (f26_ref.of_regval v) else
+ if reg_name = "f25" then OPTION_MAP (\ v . f25_ref.write_to v s) (f25_ref.of_regval v) else
+ if reg_name = "f24" then OPTION_MAP (\ v . f24_ref.write_to v s) (f24_ref.of_regval v) else
+ if reg_name = "f23" then OPTION_MAP (\ v . f23_ref.write_to v s) (f23_ref.of_regval v) else
+ if reg_name = "f22" then OPTION_MAP (\ v . f22_ref.write_to v s) (f22_ref.of_regval v) else
+ if reg_name = "f21" then OPTION_MAP (\ v . f21_ref.write_to v s) (f21_ref.of_regval v) else
+ if reg_name = "f20" then OPTION_MAP (\ v . f20_ref.write_to v s) (f20_ref.of_regval v) else
+ if reg_name = "f19" then OPTION_MAP (\ v . f19_ref.write_to v s) (f19_ref.of_regval v) else
+ if reg_name = "f18" then OPTION_MAP (\ v . f18_ref.write_to v s) (f18_ref.of_regval v) else
+ if reg_name = "f17" then OPTION_MAP (\ v . f17_ref.write_to v s) (f17_ref.of_regval v) else
+ if reg_name = "f16" then OPTION_MAP (\ v . f16_ref.write_to v s) (f16_ref.of_regval v) else
+ if reg_name = "f15" then OPTION_MAP (\ v . f15_ref.write_to v s) (f15_ref.of_regval v) else
+ if reg_name = "f14" then OPTION_MAP (\ v . f14_ref.write_to v s) (f14_ref.of_regval v) else
+ if reg_name = "f13" then OPTION_MAP (\ v . f13_ref.write_to v s) (f13_ref.of_regval v) else
+ if reg_name = "f12" then OPTION_MAP (\ v . f12_ref.write_to v s) (f12_ref.of_regval v) else
+ if reg_name = "f11" then OPTION_MAP (\ v . f11_ref.write_to v s) (f11_ref.of_regval v) else
+ if reg_name = "f10" then OPTION_MAP (\ v . f10_ref.write_to v s) (f10_ref.of_regval v) else
+ if reg_name = "f9" then OPTION_MAP (\ v . f9_ref.write_to v s) (f9_ref.of_regval v) else
+ if reg_name = "f8" then OPTION_MAP (\ v . f8_ref.write_to v s) (f8_ref.of_regval v) else
+ if reg_name = "f7" then OPTION_MAP (\ v . f7_ref.write_to v s) (f7_ref.of_regval v) else
+ if reg_name = "f6" then OPTION_MAP (\ v . f6_ref.write_to v s) (f6_ref.of_regval v) else
+ if reg_name = "f5" then OPTION_MAP (\ v . f5_ref.write_to v s) (f5_ref.of_regval v) else
+ if reg_name = "f4" then OPTION_MAP (\ v . f4_ref.write_to v s) (f4_ref.of_regval v) else
+ if reg_name = "f3" then OPTION_MAP (\ v . f3_ref.write_to v s) (f3_ref.of_regval v) else
+ if reg_name = "f2" then OPTION_MAP (\ v . f2_ref.write_to v s) (f2_ref.of_regval v) else
+ if reg_name = "f1" then OPTION_MAP (\ v . f1_ref.write_to v s) (f1_ref.of_regval v) else
+ if reg_name = "f0" then OPTION_MAP (\ v . f0_ref.write_to v s) (f0_ref.of_regval v) else
+ if reg_name = "float_fflags" then OPTION_MAP (\ v . float_fflags_ref.write_to v s) (float_fflags_ref.of_regval v) else
+ if reg_name = "float_result" then OPTION_MAP (\ v . float_result_ref.write_to v s) (float_result_ref.of_regval v) else
if reg_name = "utval" then OPTION_MAP (\ v . utval_ref.write_to v s) (utval_ref.of_regval v) else
if reg_name = "ucause" then OPTION_MAP (\ v . ucause_ref.write_to v s) (ucause_ref.of_regval v) else
if reg_name = "uepc" then OPTION_MAP (\ v . uepc_ref.write_to v s) (uepc_ref.of_regval v) else
@@ -2144,6 +2871,7 @@ val _ = Define `
if reg_name = "minstret" then OPTION_MAP (\ v . minstret_ref.write_to v s) (minstret_ref.of_regval v) else
if reg_name = "mtime" then OPTION_MAP (\ v . mtime_ref.write_to v s) (mtime_ref.of_regval v) else
if reg_name = "mcycle" then OPTION_MAP (\ v . mcycle_ref.write_to v s) (mcycle_ref.of_regval v) else
+ if reg_name = "mcountinhibit" then OPTION_MAP (\ v . mcountinhibit_ref.write_to v s) (mcountinhibit_ref.of_regval v) else
if reg_name = "scounteren" then OPTION_MAP (\ v . scounteren_ref.write_to v s) (scounteren_ref.of_regval v) else
if reg_name = "mcounteren" then OPTION_MAP (\ v . mcounteren_ref.write_to v s) (mcounteren_ref.of_regval v) else
if reg_name = "mscratch" then OPTION_MAP (\ v . mscratch_ref.write_to v s) (mscratch_ref.of_regval v) else
@@ -2156,6 +2884,7 @@ val _ = Define `
if reg_name = "mie" then OPTION_MAP (\ v . mie_ref.write_to v s) (mie_ref.of_regval v) else
if reg_name = "mip" then OPTION_MAP (\ v . mip_ref.write_to v s) (mip_ref.of_regval v) else
if reg_name = "mstatus" then OPTION_MAP (\ v . mstatus_ref.write_to v s) (mstatus_ref.of_regval v) else
+ if reg_name = "mstatush" then OPTION_MAP (\ v . mstatush_ref.write_to v s) (mstatush_ref.of_regval v) else
if reg_name = "misa" then OPTION_MAP (\ v . misa_ref.write_to v s) (misa_ref.of_regval v) else
if reg_name = "cur_inst" then OPTION_MAP (\ v . cur_inst_ref.write_to v s) (cur_inst_ref.of_regval v) else
if reg_name = "cur_privilege" then OPTION_MAP (\ v . cur_privilege_ref.write_to v s) (cur_privilege_ref.of_regval v) else
@@ -2190,7 +2919,6 @@ val _ = Define `
if reg_name = "x3" then OPTION_MAP (\ v . x3_ref.write_to v s) (x3_ref.of_regval v) else
if reg_name = "x2" then OPTION_MAP (\ v . x2_ref.write_to v s) (x2_ref.of_regval v) else
if reg_name = "x1" then OPTION_MAP (\ v . x1_ref.write_to v s) (x1_ref.of_regval v) else
- if reg_name = "Xs" then OPTION_MAP (\ v . Xs_ref.write_to v s) (Xs_ref.of_regval v) else
if reg_name = "instbits" then OPTION_MAP (\ v . instbits_ref.write_to v s) (instbits_ref.of_regval v) else
if reg_name = "nextPC" then OPTION_MAP (\ v . nextPC_ref.write_to v s) (nextPC_ref.of_regval v) else
if reg_name = "PC" then OPTION_MAP (\ v . PC_ref.write_to v s) (PC_ref.of_regval v) else
diff --git a/prover_snapshots/hol4/RV64/mem_metadataScript.sml b/prover_snapshots/hol4/RV64/mem_metadataScript.sml
new file mode 100644
index 0000000..b90d93e
--- /dev/null
+++ b/prover_snapshots/hol4/RV64/mem_metadataScript.sml
@@ -0,0 +1,34 @@
+(*Generated by Lem from handwritten_support/0.11/mem_metadata.lem.*)
+open HolKernel Parse boolLib bossLib;
+open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
+
+val _ = numLib.prefer_num();
+
+
+
+val _ = new_theory "mem_metadata"
+
+(*open import Pervasives*)
+(*open import Pervasives_extra*)
+(*open import Sail2_instr_kinds*)
+(*open import Sail2_values*)
+(*open import Sail2_operators_mwords*)
+(*open import Sail2_prompt_monad*)
+(*open import Sail2_prompt*)
+
+(*val write_ram : forall 'rv 'e 'a 'n. Size 'a, Size 'n => write_kind -> mword 'a -> integer -> mword 'n -> unit -> monad 'rv bool 'e*)
+val _ = Define `
+ ((write_ram:write_kind -> 'a words$word -> int -> 'n words$word -> unit -> 'rv sail2_state_monad$sequential_state ->(((bool),'e)sail2_state_monad$result#'rv sail2_state_monad$sequential_state)set) wk addr width data meta=
+ (sail2_state_monad$write_memS
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict wk () addr width data))`;
+
+
+(*val read_ram : forall 'rv 'e 'a 'n. Size 'a, Size 'n => read_kind -> mword 'a -> integer -> bool -> monad 'rv (mword 'n * unit) 'e*)
+val _ = Define `
+ ((read_ram:read_kind -> 'a words$word -> int -> bool -> 'rv sail2_state_monad$sequential_state ->((('n words$word#unit),'e)sail2_state_monad$result#'rv sail2_state_monad$sequential_state)set) rk addr width read_tag= (sail2_state_monad$bindS
+ (sail2_state_monad$read_memS
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict rk () addr width) (\ (data : 'n words$word) .
+ sail2_state_monad$returnS (data, () ))))`;
+
+val _ = export_theory()
+
diff --git a/prover_snapshots/hol4/RV64/riscvAuxiliaryScript.sml b/prover_snapshots/hol4/RV64/riscvAuxiliaryScript.sml
index abcd699..6381e39 100644
--- a/prover_snapshots/hol4/RV64/riscvAuxiliaryScript.sml
+++ b/prover_snapshots/hol4/RV64/riscvAuxiliaryScript.sml
@@ -1,6 +1,6 @@
(*Generated by Lem from generated_definitions/lem/RV64/riscv.lem.*)
open HolKernel Parse boolLib bossLib;
-open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory riscv_extrasTheory riscvTheory;
+open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory mem_metadataTheory riscv_extras_fdextTheory riscv_extrasTheory riscvTheory;
val _ = numLib.prefer_num();
diff --git a/prover_snapshots/hol4/RV64/riscvScript.sml b/prover_snapshots/hol4/RV64/riscvScript.sml
index 25de446..1910c35 100644
--- a/prover_snapshots/hol4/RV64/riscvScript.sml
+++ b/prover_snapshots/hol4/RV64/riscvScript.sml
@@ -1,6 +1,6 @@
(*Generated by Lem from generated_definitions/lem/RV64/riscv.lem.*)
open HolKernel Parse boolLib bossLib;
-open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory riscv_extrasTheory;
+open lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory sail2_stringTheory riscv_typesTheory mem_metadataTheory riscv_extras_fdextTheory riscv_extrasTheory;
val _ = numLib.prefer_num();
@@ -17,6 +17,8 @@ val _ = new_theory "riscv"
(*open import Sail2_prompt_monad*)
(*open import Sail2_prompt*)
(*open import Riscv_types*)
+(*open import Mem_metadata*)
+(*open import Riscv_extras_fdext*)
(*open import Riscv_extras*)
(*val is_none : forall 'a. maybe 'a -> bool*)
@@ -51,6 +53,39 @@ val _ = Define `
((id:int -> int) x= x)`;
+(*val _shl_int_general : ii -> ii -> ii*)
+
+val _ = Define `
+ ((shl_int_general:int -> int -> int) (m : ii) (n : ii)=
+ (if ((n >= (( 0 : int):ii))) then shl_int m n
+ else shr_int m ((~ n))))`;
+
+
+(*val _shr_int_general : ii -> ii -> ii*)
+
+val _ = Define `
+ ((shr_int_general:int -> int -> int) (m : ii) (n : ii)=
+ (if ((n >= (( 0 : int):ii))) then shr_int m n
+ else shl_int m ((~ n))))`;
+
+
+(*val fdiv_int : ii -> ii -> ii*)
+
+val _ = Define `
+ ((fdiv_int:int -> int -> int) (n : ii) (m : ii)=
+ (if (((((n < (( 0 : int):ii))) /\ ((m > (( 0 : int):ii)))))) then
+ ((tdiv_int ((n + (( 1 : int):ii))) m)) - (( 1 : int):ii)
+ else if (((((n > (( 0 : int):ii))) /\ ((m < (( 0 : int):ii)))))) then
+ ((tdiv_int ((n - (( 1 : int):ii))) m)) - (( 1 : int):ii)
+ else tdiv_int n m))`;
+
+
+(*val fmod_int : ii -> ii -> ii*)
+
+val _ = Define `
+ ((fmod_int:int -> int -> int) (n : ii) (m : ii)= (n - ((m * ((fdiv_int n m))))))`;
+
+
(*val concat_str_bits : forall 'n. Size 'n => string -> mword 'n -> string*)
val _ = Define `
@@ -85,7 +120,7 @@ val _ = Define `
((slice_mask:int -> int -> int -> 'n words$word) n i l=
(if ((l >= n)) then (shiftl ((sail_ones n : 'n words$word)) i : 'n words$word)
else
- let one1 = ((sail_mask n (vec_of_bits [B1] : 1 words$word) : 'n words$word)) in
+ let (one1 : 'n words$word) = ((sail_mask n (0b1w : 1 words$word) : 'n words$word)) in
(shiftl ((sub_vec ((shiftl one1 l : 'n words$word)) one1 : 'n words$word)) i : 'n words$word)))`;
@@ -93,18 +128,18 @@ val _ = Define `
val _ = Define `
((read_kind_of_num:int -> read_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Read_plain
- else if (((p0_ = (( 1 : int):ii)))) then Read_reserve
- else if (((p0_ = (( 2 : int):ii)))) then Read_acquire
- else if (((p0_ = (( 3 : int):ii)))) then Read_exclusive
- else if (((p0_ = (( 4 : int):ii)))) then Read_exclusive_acquire
- else if (((p0_ = (( 5 : int):ii)))) then Read_stream
- else if (((p0_ = (( 6 : int):ii)))) then Read_RISCV_acquire
- else if (((p0_ = (( 7 : int):ii)))) then Read_RISCV_strong_acquire
- else if (((p0_ = (( 8 : int):ii)))) then Read_RISCV_reserved
- else if (((p0_ = (( 9 : int):ii)))) then Read_RISCV_reserved_acquire
- else if (((p0_ = (( 10 : int):ii)))) then Read_RISCV_reserved_strong_acquire
+ (let l__292 = arg_ in
+ if (((l__292 = (( 0 : int):ii)))) then Read_plain
+ else if (((l__292 = (( 1 : int):ii)))) then Read_reserve
+ else if (((l__292 = (( 2 : int):ii)))) then Read_acquire
+ else if (((l__292 = (( 3 : int):ii)))) then Read_exclusive
+ else if (((l__292 = (( 4 : int):ii)))) then Read_exclusive_acquire
+ else if (((l__292 = (( 5 : int):ii)))) then Read_stream
+ else if (((l__292 = (( 6 : int):ii)))) then Read_RISCV_acquire
+ else if (((l__292 = (( 7 : int):ii)))) then Read_RISCV_strong_acquire
+ else if (((l__292 = (( 8 : int):ii)))) then Read_RISCV_reserved
+ else if (((l__292 = (( 9 : int):ii)))) then Read_RISCV_reserved_acquire
+ else if (((l__292 = (( 10 : int):ii)))) then Read_RISCV_reserved_strong_acquire
else Read_X86_locked))`;
@@ -132,17 +167,17 @@ val _ = Define `
val _ = Define `
((write_kind_of_num:int -> write_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Write_plain
- else if (((p0_ = (( 1 : int):ii)))) then Write_conditional
- else if (((p0_ = (( 2 : int):ii)))) then Write_release
- else if (((p0_ = (( 3 : int):ii)))) then Write_exclusive
- else if (((p0_ = (( 4 : int):ii)))) then Write_exclusive_release
- else if (((p0_ = (( 5 : int):ii)))) then Write_RISCV_release
- else if (((p0_ = (( 6 : int):ii)))) then Write_RISCV_strong_release
- else if (((p0_ = (( 7 : int):ii)))) then Write_RISCV_conditional
- else if (((p0_ = (( 8 : int):ii)))) then Write_RISCV_conditional_release
- else if (((p0_ = (( 9 : int):ii)))) then Write_RISCV_conditional_strong_release
+ (let l__282 = arg_ in
+ if (((l__282 = (( 0 : int):ii)))) then Write_plain
+ else if (((l__282 = (( 1 : int):ii)))) then Write_conditional
+ else if (((l__282 = (( 2 : int):ii)))) then Write_release
+ else if (((l__282 = (( 3 : int):ii)))) then Write_exclusive
+ else if (((l__282 = (( 4 : int):ii)))) then Write_exclusive_release
+ else if (((l__282 = (( 5 : int):ii)))) then Write_RISCV_release
+ else if (((l__282 = (( 6 : int):ii)))) then Write_RISCV_strong_release
+ else if (((l__282 = (( 7 : int):ii)))) then Write_RISCV_conditional
+ else if (((l__282 = (( 8 : int):ii)))) then Write_RISCV_conditional_release
+ else if (((l__282 = (( 9 : int):ii)))) then Write_RISCV_conditional_strong_release
else Write_X86_locked))`;
@@ -165,66 +200,47 @@ val _ = Define `
)))`;
-(*val barrier_kind_of_num : integer -> barrier_kind*)
+(*val a64_barrier_domain_of_num : integer -> a64_barrier_domain*)
val _ = Define `
- ((barrier_kind_of_num:int -> barrier_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Barrier_Sync
- else if (((p0_ = (( 1 : int):ii)))) then Barrier_LwSync
- else if (((p0_ = (( 2 : int):ii)))) then Barrier_Eieio
- else if (((p0_ = (( 3 : int):ii)))) then Barrier_Isync
- else if (((p0_ = (( 4 : int):ii)))) then Barrier_DMB
- else if (((p0_ = (( 5 : int):ii)))) then Barrier_DMB_ST
- else if (((p0_ = (( 6 : int):ii)))) then Barrier_DMB_LD
- else if (((p0_ = (( 7 : int):ii)))) then Barrier_DSB
- else if (((p0_ = (( 8 : int):ii)))) then Barrier_DSB_ST
- else if (((p0_ = (( 9 : int):ii)))) then Barrier_DSB_LD
- else if (((p0_ = (( 10 : int):ii)))) then Barrier_ISB
- else if (((p0_ = (( 11 : int):ii)))) then Barrier_MIPS_SYNC
- else if (((p0_ = (( 12 : int):ii)))) then Barrier_RISCV_rw_rw
- else if (((p0_ = (( 13 : int):ii)))) then Barrier_RISCV_r_rw
- else if (((p0_ = (( 14 : int):ii)))) then Barrier_RISCV_r_r
- else if (((p0_ = (( 15 : int):ii)))) then Barrier_RISCV_rw_w
- else if (((p0_ = (( 16 : int):ii)))) then Barrier_RISCV_w_w
- else if (((p0_ = (( 17 : int):ii)))) then Barrier_RISCV_w_rw
- else if (((p0_ = (( 18 : int):ii)))) then Barrier_RISCV_rw_r
- else if (((p0_ = (( 19 : int):ii)))) then Barrier_RISCV_r_w
- else if (((p0_ = (( 20 : int):ii)))) then Barrier_RISCV_w_r
- else if (((p0_ = (( 21 : int):ii)))) then Barrier_RISCV_tso
- else if (((p0_ = (( 22 : int):ii)))) then Barrier_RISCV_i
- else Barrier_x86_MFENCE))`;
-
-
-(*val num_of_barrier_kind : barrier_kind -> integer*)
-
-val _ = Define `
- ((num_of_barrier_kind:barrier_kind -> int) arg_=
+ ((a64_barrier_domain_of_num:int -> a64_barrier_domain) arg_=
+ (let l__279 = arg_ in
+ if (((l__279 = (( 0 : int):ii)))) then A64_FullShare
+ else if (((l__279 = (( 1 : int):ii)))) then A64_InnerShare
+ else if (((l__279 = (( 2 : int):ii)))) then A64_OuterShare
+ else A64_NonShare))`;
+
+
+(*val num_of_a64_barrier_domain : a64_barrier_domain -> integer*)
+
+val _ = Define `
+ ((num_of_a64_barrier_domain:a64_barrier_domain -> int) arg_=
((case arg_ of
- Barrier_Sync => (( 0 : int):ii)
- | Barrier_LwSync => (( 1 : int):ii)
- | Barrier_Eieio => (( 2 : int):ii)
- | Barrier_Isync => (( 3 : int):ii)
- | Barrier_DMB => (( 4 : int):ii)
- | Barrier_DMB_ST => (( 5 : int):ii)
- | Barrier_DMB_LD => (( 6 : int):ii)
- | Barrier_DSB => (( 7 : int):ii)
- | Barrier_DSB_ST => (( 8 : int):ii)
- | Barrier_DSB_LD => (( 9 : int):ii)
- | Barrier_ISB => (( 10 : int):ii)
- | Barrier_MIPS_SYNC => (( 11 : int):ii)
- | Barrier_RISCV_rw_rw => (( 12 : int):ii)
- | Barrier_RISCV_r_rw => (( 13 : int):ii)
- | Barrier_RISCV_r_r => (( 14 : int):ii)
- | Barrier_RISCV_rw_w => (( 15 : int):ii)
- | Barrier_RISCV_w_w => (( 16 : int):ii)
- | Barrier_RISCV_w_rw => (( 17 : int):ii)
- | Barrier_RISCV_rw_r => (( 18 : int):ii)
- | Barrier_RISCV_r_w => (( 19 : int):ii)
- | Barrier_RISCV_w_r => (( 20 : int):ii)
- | Barrier_RISCV_tso => (( 21 : int):ii)
- | Barrier_RISCV_i => (( 22 : int):ii)
- | Barrier_x86_MFENCE => (( 23 : int):ii)
+ A64_FullShare => (( 0 : int):ii)
+ | A64_InnerShare => (( 1 : int):ii)
+ | A64_OuterShare => (( 2 : int):ii)
+ | A64_NonShare => (( 3 : int):ii)
+ )))`;
+
+
+(*val a64_barrier_type_of_num : integer -> a64_barrier_type*)
+
+val _ = Define `
+ ((a64_barrier_type_of_num:int -> a64_barrier_type) arg_=
+ (let l__277 = arg_ in
+ if (((l__277 = (( 0 : int):ii)))) then A64_barrier_all
+ else if (((l__277 = (( 1 : int):ii)))) then A64_barrier_LD
+ else A64_barrier_ST))`;
+
+
+(*val num_of_a64_barrier_type : a64_barrier_type -> integer*)
+
+val _ = Define `
+ ((num_of_a64_barrier_type:a64_barrier_type -> int) arg_=
+ ((case arg_ of
+ A64_barrier_all => (( 0 : int):ii)
+ | A64_barrier_LD => (( 1 : int):ii)
+ | A64_barrier_ST => (( 2 : int):ii)
)))`;
@@ -232,9 +248,9 @@ val _ = Define `
val _ = Define `
((trans_kind_of_num:int -> trans_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Transaction_start
- else if (((p0_ = (( 1 : int):ii)))) then Transaction_commit
+ (let l__275 = arg_ in
+ if (((l__275 = (( 0 : int):ii)))) then Transaction_start
+ else if (((l__275 = (( 1 : int):ii)))) then Transaction_commit
else Transaction_abort))`;
@@ -253,17 +269,17 @@ val _ = Define `
val _ = Define `
((cache_op_kind_of_num:int -> cache_op_kind) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Cache_op_D_IVAC
- else if (((p0_ = (( 1 : int):ii)))) then Cache_op_D_ISW
- else if (((p0_ = (( 2 : int):ii)))) then Cache_op_D_CSW
- else if (((p0_ = (( 3 : int):ii)))) then Cache_op_D_CISW
- else if (((p0_ = (( 4 : int):ii)))) then Cache_op_D_ZVA
- else if (((p0_ = (( 5 : int):ii)))) then Cache_op_D_CVAC
- else if (((p0_ = (( 6 : int):ii)))) then Cache_op_D_CVAU
- else if (((p0_ = (( 7 : int):ii)))) then Cache_op_D_CIVAC
- else if (((p0_ = (( 8 : int):ii)))) then Cache_op_I_IALLUIS
- else if (((p0_ = (( 9 : int):ii)))) then Cache_op_I_IALLU
+ (let l__265 = arg_ in
+ if (((l__265 = (( 0 : int):ii)))) then Cache_op_D_IVAC
+ else if (((l__265 = (( 1 : int):ii)))) then Cache_op_D_ISW
+ else if (((l__265 = (( 2 : int):ii)))) then Cache_op_D_CSW
+ else if (((l__265 = (( 3 : int):ii)))) then Cache_op_D_CISW
+ else if (((l__265 = (( 4 : int):ii)))) then Cache_op_D_ZVA
+ else if (((l__265 = (( 5 : int):ii)))) then Cache_op_D_CVAC
+ else if (((l__265 = (( 6 : int):ii)))) then Cache_op_D_CVAU
+ else if (((l__265 = (( 7 : int):ii)))) then Cache_op_D_CIVAC
+ else if (((l__265 = (( 8 : int):ii)))) then Cache_op_I_IALLUIS
+ else if (((l__265 = (( 9 : int):ii)))) then Cache_op_I_IALLU
else Cache_op_I_IVAU))`;
@@ -286,15 +302,20 @@ val _ = Define `
)))`;
+(*val not_bit : bitU -> bitU*)
+
+val _ = Define `
+ ((not_bit0:bitU -> bitU) b= (if (((b = B1))) then B0 else B1))`;
+
+
-(*val cast_unit_vec : bitU -> mword ty1*)
+(*val string_of_bit : bitU -> string*)
val _ = Define `
- ((cast_unit_vec0:bitU ->(1)words$word) b=
- ((case b of B0 => (vec_of_bits [B0] : 1 words$word) | B1 => (vec_of_bits [B1] : 1 words$word) )))`;
+ ((string_of_bit:bitU -> string) b= ((case b of B0 => "0b0" | B1 => "0b1" )))`;
(*val get_config_print_instr : unit -> bool*)
@@ -348,7 +369,7 @@ val _ = Define `
(*val bool_to_bits : bool -> mword ty1*)
val _ = Define `
- ((bool_to_bits:bool ->(1)words$word) x= (if x then (vec_of_bits [B1] : 1 words$word) else (vec_of_bits [B0] : 1 words$word)))`;
+ ((bool_to_bits:bool ->(1)words$word) x= (if x then (0b1w : 1 words$word) else (0b0w : 1 words$word)))`;
(*val bit_to_bool : bitU -> bool*)
@@ -409,6 +430,46 @@ val _ = Define `
(subrange_vec_dec ((shift_bits_right v64 shift : 64 words$word)) (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+(*val spc_forwards : unit -> string*)
+
+(*val spc_backwards : string -> unit*)
+
+(*val spc_forwards_matches : unit -> bool*)
+
+(*val spc_backwards_matches : string -> bool*)
+
+(*val spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val opt_spc_forwards : unit -> string*)
+
+(*val opt_spc_backwards : string -> unit*)
+
+(*val opt_spc_forwards_matches : unit -> bool*)
+
+(*val opt_spc_backwards_matches : string -> bool*)
+
+(*val opt_spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val def_spc_forwards : unit -> string*)
+
+(*val def_spc_backwards : string -> unit*)
+
+(*val def_spc_forwards_matches : unit -> bool*)
+
+(*val def_spc_backwards_matches : string -> bool*)
+
+(*val def_spc_matches_prefix : string -> maybe ((unit * ii))*)
+
+(*val hex_bits_forwards : forall 'n. Size 'n => (integer * mword 'n) -> string*)
+
+(*val hex_bits_backwards : forall 'n. Size 'n => string -> (integer * mword 'n)*)
+
+(*val hex_bits_forwards_matches : forall 'n. Size 'n => (integer * mword 'n) -> bool*)
+
+(*val hex_bits_backwards_matches : string -> bool*)
+
+(*val hex_bits_matches_prefix : forall 'n. Size 'n => string -> maybe (((integer * mword 'n) * ii))*)
+
(*val n_leading_spaces : string -> ii*)
val n_leading_spaces0_defn = Hol_defn "n_leading_spaces0" `
@@ -422,72 +483,56 @@ val _ = Define `
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn n_leading_spaces0_defn;
-(*val spc_forwards : unit -> string*)
-
val _ = Define `
((spc_forwards:unit -> string) () = " ")`;
-(*val spc_backwards : string -> unit*)
-
val _ = Define `
((spc_backwards:string -> unit) s= () )`;
-(*val spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((spc_matches_prefix0:string ->(unit#int)option) s=
(let n = (n_leading_spaces0 s) in
- let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then NONE
+ let l__264 = n in
+ if (((l__264 = (( 0 : int):ii)))) then NONE
else SOME (() , n)))`;
-(*val opt_spc_forwards : unit -> string*)
-
val _ = Define `
((opt_spc_forwards:unit -> string) () = "")`;
-(*val opt_spc_backwards : string -> unit*)
-
val _ = Define `
((opt_spc_backwards:string -> unit) s= () )`;
-(*val opt_spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((opt_spc_matches_prefix0:string ->(unit#int)option) s= (SOME (() , n_leading_spaces0 s)))`;
-(*val def_spc_forwards : unit -> string*)
-
val _ = Define `
((def_spc_forwards:unit -> string) () = " ")`;
-(*val def_spc_backwards : string -> unit*)
-
val _ = Define `
((def_spc_backwards:string -> unit) s= () )`;
-(*val def_spc_matches_prefix : string -> maybe ((unit * ii))*)
-
val _ = Define `
((def_spc_matches_prefix:string ->(unit#ii)option) s= (opt_spc_matches_prefix0 s))`;
+(*val hex_bits_1_backwards : string -> M (mword ty1)*)
+
(*val hex_bits_1_forwards_matches : mword ty1 -> bool*)
+(*val hex_bits_1_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_1_forwards_matches:(1)words$word -> bool) bv= T)`;
-(*val hex_bits_1_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_1_backwards_matches:string -> bool) s=
((case s of
@@ -495,15 +540,13 @@ val _ = Define `
if ((case ((hex_bits_1_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 1 words$word # ii)) option)) of
- SOME ((g__51, n)) =>
+ SOME ((g__373, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_1_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((hex_bits_1_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_1_matches_prefix
@@ -518,14 +561,16 @@ val _ = Define `
)))`;
+(*val hex_bits_2_backwards : string -> M (mword ty2)*)
+
(*val hex_bits_2_forwards_matches : mword ty2 -> bool*)
+(*val hex_bits_2_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_2_forwards_matches:(2)words$word -> bool) bv= T)`;
-(*val hex_bits_2_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_2_backwards_matches:string -> bool) s=
((case s of
@@ -533,15 +578,13 @@ val _ = Define `
if ((case ((hex_bits_2_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 2 words$word # ii)) option)) of
- SOME ((g__50, n)) =>
+ SOME ((g__372, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_2_backwards : string -> M (mword ty2)*)
-
val _ = Define `
((hex_bits_2_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((2)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_2_matches_prefix
@@ -556,14 +599,16 @@ val _ = Define `
)))`;
+(*val hex_bits_3_backwards : string -> M (mword ty3)*)
+
(*val hex_bits_3_forwards_matches : mword ty3 -> bool*)
+(*val hex_bits_3_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_3_forwards_matches:(3)words$word -> bool) bv= T)`;
-(*val hex_bits_3_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_3_backwards_matches:string -> bool) s=
((case s of
@@ -571,15 +616,13 @@ val _ = Define `
if ((case ((hex_bits_3_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 3 words$word # ii)) option)) of
- SOME ((g__49, n)) =>
+ SOME ((g__371, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_3_backwards : string -> M (mword ty3)*)
-
val _ = Define `
((hex_bits_3_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((3)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_3_matches_prefix
@@ -594,14 +637,16 @@ val _ = Define `
)))`;
+(*val hex_bits_4_backwards : string -> M (mword ty4)*)
+
(*val hex_bits_4_forwards_matches : mword ty4 -> bool*)
+(*val hex_bits_4_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_4_forwards_matches:(4)words$word -> bool) bv= T)`;
-(*val hex_bits_4_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_4_backwards_matches:string -> bool) s=
((case s of
@@ -609,15 +654,13 @@ val _ = Define `
if ((case ((hex_bits_4_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 4 words$word # ii)) option)) of
- SOME ((g__48, n)) =>
+ SOME ((g__370, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_4_backwards : string -> M (mword ty4)*)
-
val _ = Define `
((hex_bits_4_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((4)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_4_matches_prefix
@@ -633,14 +676,16 @@ val _ = Define `
)))`;
+(*val hex_bits_5_backwards : string -> M (mword ty5)*)
+
(*val hex_bits_5_forwards_matches : mword ty5 -> bool*)
+(*val hex_bits_5_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_5_forwards_matches:(5)words$word -> bool) bv= T)`;
-(*val hex_bits_5_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_5_backwards_matches:string -> bool) s=
((case s of
@@ -648,15 +693,13 @@ val _ = Define `
if ((case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 5 words$word # ii)) option)) of
- SOME ((g__47, n)) =>
+ SOME ((g__369, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_5_backwards : string -> M (mword ty5)*)
-
val _ = Define `
((hex_bits_5_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_5_matches_prefix
@@ -672,14 +715,16 @@ val _ = Define `
)))`;
+(*val hex_bits_6_backwards : string -> M (mword ty6)*)
+
(*val hex_bits_6_forwards_matches : mword ty6 -> bool*)
+(*val hex_bits_6_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_6_forwards_matches:(6)words$word -> bool) bv= T)`;
-(*val hex_bits_6_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_6_backwards_matches:string -> bool) s=
((case s of
@@ -687,15 +732,13 @@ val _ = Define `
if ((case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 6 words$word # ii)) option)) of
- SOME ((g__46, n)) =>
+ SOME ((g__368, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_6_backwards : string -> M (mword ty6)*)
-
val _ = Define `
((hex_bits_6_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((6)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_6_matches_prefix
@@ -711,14 +754,16 @@ val _ = Define `
)))`;
+(*val hex_bits_7_backwards : string -> M (mword ty7)*)
+
(*val hex_bits_7_forwards_matches : mword ty7 -> bool*)
+(*val hex_bits_7_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_7_forwards_matches:(7)words$word -> bool) bv= T)`;
-(*val hex_bits_7_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_7_backwards_matches:string -> bool) s=
((case s of
@@ -726,15 +771,13 @@ val _ = Define `
if ((case ((hex_bits_7_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 7 words$word # ii)) option)) of
- SOME ((g__45, n)) =>
+ SOME ((g__367, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_7_backwards : string -> M (mword ty7)*)
-
val _ = Define `
((hex_bits_7_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((7)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_7_matches_prefix
@@ -750,14 +793,16 @@ val _ = Define `
)))`;
+(*val hex_bits_8_backwards : string -> M (mword ty8)*)
+
(*val hex_bits_8_forwards_matches : mword ty8 -> bool*)
+(*val hex_bits_8_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_8_forwards_matches:(8)words$word -> bool) bv= T)`;
-(*val hex_bits_8_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_8_backwards_matches:string -> bool) s=
((case s of
@@ -765,15 +810,13 @@ val _ = Define `
if ((case ((hex_bits_8_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 8 words$word # ii)) option)) of
- SOME ((g__44, n)) =>
+ SOME ((g__366, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_8_backwards : string -> M (mword ty8)*)
-
val _ = Define `
((hex_bits_8_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((8)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_8_matches_prefix
@@ -789,14 +832,16 @@ val _ = Define `
)))`;
+(*val hex_bits_9_backwards : string -> M (mword ty9)*)
+
(*val hex_bits_9_forwards_matches : mword ty9 -> bool*)
+(*val hex_bits_9_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_9_forwards_matches:(9)words$word -> bool) bv= T)`;
-(*val hex_bits_9_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_9_backwards_matches:string -> bool) s=
((case s of
@@ -804,15 +849,13 @@ val _ = Define `
if ((case ((hex_bits_9_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 9 words$word # ii)) option)) of
- SOME ((g__43, n)) =>
+ SOME ((g__365, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_9_backwards : string -> M (mword ty9)*)
-
val _ = Define `
((hex_bits_9_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((9)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_9_matches_prefix
@@ -828,14 +871,16 @@ val _ = Define `
)))`;
+(*val hex_bits_10_backwards : string -> M (mword ty10)*)
+
(*val hex_bits_10_forwards_matches : mword ty10 -> bool*)
+(*val hex_bits_10_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_10_forwards_matches:(10)words$word -> bool) bv= T)`;
-(*val hex_bits_10_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_10_backwards_matches:string -> bool) s=
((case s of
@@ -843,15 +888,13 @@ val _ = Define `
if ((case ((hex_bits_10_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 10 words$word # ii)) option)) of
- SOME ((g__42, n)) =>
+ SOME ((g__364, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_10_backwards : string -> M (mword ty10)*)
-
val _ = Define `
((hex_bits_10_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((10)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_10_matches_prefix
@@ -867,14 +910,16 @@ val _ = Define `
)))`;
+(*val hex_bits_11_backwards : string -> M (mword ty11)*)
+
(*val hex_bits_11_forwards_matches : mword ty11 -> bool*)
+(*val hex_bits_11_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_11_forwards_matches:(11)words$word -> bool) bv= T)`;
-(*val hex_bits_11_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_11_backwards_matches:string -> bool) s=
((case s of
@@ -882,15 +927,13 @@ val _ = Define `
if ((case ((hex_bits_11_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 11 words$word # ii)) option)) of
- SOME ((g__41, n)) =>
+ SOME ((g__363, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_11_backwards : string -> M (mword ty11)*)
-
val _ = Define `
((hex_bits_11_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((11)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_11_matches_prefix
@@ -906,53 +949,58 @@ val _ = Define `
)))`;
+(*val hex_bits_12_backwards : string -> M (mword ty12)*)
+
(*val hex_bits_12_forwards_matches : mword ty12 -> bool*)
+(*val hex_bits_12_backwards_matches : string -> bool*)
+
+(*val hex_bits_12_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+
val _ = Define `
((hex_bits_12_forwards_matches:(12)words$word -> bool) bv= T)`;
-(*val hex_bits_12_backwards_matches : string -> bool*)
+val _ = Define `
+ ((hex_bits_12_matches_prefix0:string ->((12)words$word#ii)option) s= NONE)`;
+
val _ = Define `
((hex_bits_12_backwards_matches:string -> bool) s=
((case s of
s =>
- if ((case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s : (( 12 words$word # ii)) option)) of
- SOME ((g__40, n)) =>
+ if ((case ((hex_bits_12_matches_prefix0 s : (( 12 words$word # ii)) option)) of
+ SOME ((g__362, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_12_backwards : string -> M (mword ty12)*)
-
val _ = Define `
((hex_bits_12_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
- ((case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s : (( 12 words$word # ii))option)) of
+ ((case ((hex_bits_12_matches_prefix0 s : (( 12 words$word # ii))option)) of
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 258:2 - 260:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 262:2 - 264:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 258:2 - 260:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 262:2 - 264:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_13_backwards : string -> M (mword ty13)*)
+
(*val hex_bits_13_forwards_matches : mword ty13 -> bool*)
+(*val hex_bits_13_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_13_forwards_matches:(13)words$word -> bool) bv= T)`;
-(*val hex_bits_13_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_13_backwards_matches:string -> bool) s=
((case s of
@@ -960,15 +1008,13 @@ val _ = Define `
if ((case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 13 words$word # ii)) option)) of
- SOME ((g__39, n)) =>
+ SOME ((g__361, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_13_backwards : string -> M (mword ty13)*)
-
val _ = Define `
((hex_bits_13_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((13)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_13_matches_prefix
@@ -976,22 +1022,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 277:2 - 279:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 281:2 - 283:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 277:2 - 279:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 281:2 - 283:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_14_backwards : string -> M (mword ty14)*)
+
(*val hex_bits_14_forwards_matches : mword ty14 -> bool*)
+(*val hex_bits_14_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_14_forwards_matches:(14)words$word -> bool) bv= T)`;
-(*val hex_bits_14_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_14_backwards_matches:string -> bool) s=
((case s of
@@ -999,15 +1047,13 @@ val _ = Define `
if ((case ((hex_bits_14_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 14 words$word # ii)) option)) of
- SOME ((g__38, n)) =>
+ SOME ((g__360, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_14_backwards : string -> M (mword ty14)*)
-
val _ = Define `
((hex_bits_14_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((14)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_14_matches_prefix
@@ -1015,22 +1061,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 296:2 - 298:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 300:2 - 302:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 296:2 - 298:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 300:2 - 302:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_15_backwards : string -> M (mword ty15)*)
+
(*val hex_bits_15_forwards_matches : mword ty15 -> bool*)
+(*val hex_bits_15_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_15_forwards_matches:(15)words$word -> bool) bv= T)`;
-(*val hex_bits_15_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_15_backwards_matches:string -> bool) s=
((case s of
@@ -1038,15 +1086,13 @@ val _ = Define `
if ((case ((hex_bits_15_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 15 words$word # ii)) option)) of
- SOME ((g__37, n)) =>
+ SOME ((g__359, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_15_backwards : string -> M (mword ty15)*)
-
val _ = Define `
((hex_bits_15_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((15)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_15_matches_prefix
@@ -1054,22 +1100,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 315:2 - 317:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 319:2 - 321:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 315:2 - 317:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 319:2 - 321:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_16_backwards : string -> M (mword ty16)*)
+
(*val hex_bits_16_forwards_matches : mword ty16 -> bool*)
+(*val hex_bits_16_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_16_forwards_matches:(16)words$word -> bool) bv= T)`;
-(*val hex_bits_16_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_16_backwards_matches:string -> bool) s=
((case s of
@@ -1077,15 +1125,13 @@ val _ = Define `
if ((case ((hex_bits_16_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 16 words$word # ii)) option)) of
- SOME ((g__36, n)) =>
+ SOME ((g__358, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_16_backwards : string -> M (mword ty16)*)
-
val _ = Define `
((hex_bits_16_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((16)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_16_matches_prefix
@@ -1093,22 +1139,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 334:2 - 336:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 338:2 - 340:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 334:2 - 336:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 338:2 - 340:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_17_backwards : string -> M (mword ty17)*)
+
(*val hex_bits_17_forwards_matches : mword ty17 -> bool*)
+(*val hex_bits_17_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_17_forwards_matches:(17)words$word -> bool) bv= T)`;
-(*val hex_bits_17_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_17_backwards_matches:string -> bool) s=
((case s of
@@ -1116,15 +1164,13 @@ val _ = Define `
if ((case ((hex_bits_17_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 17 words$word # ii)) option)) of
- SOME ((g__35, n)) =>
+ SOME ((g__357, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_17_backwards : string -> M (mword ty17)*)
-
val _ = Define `
((hex_bits_17_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((17)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_17_matches_prefix
@@ -1132,22 +1178,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 353:2 - 355:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 357:2 - 359:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 353:2 - 355:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 357:2 - 359:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_18_backwards : string -> M (mword ty18)*)
+
(*val hex_bits_18_forwards_matches : mword ty18 -> bool*)
+(*val hex_bits_18_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_18_forwards_matches:(18)words$word -> bool) bv= T)`;
-(*val hex_bits_18_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_18_backwards_matches:string -> bool) s=
((case s of
@@ -1155,15 +1203,13 @@ val _ = Define `
if ((case ((hex_bits_18_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 18 words$word # ii)) option)) of
- SOME ((g__34, n)) =>
+ SOME ((g__356, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_18_backwards : string -> M (mword ty18)*)
-
val _ = Define `
((hex_bits_18_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((18)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_18_matches_prefix
@@ -1171,22 +1217,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 372:2 - 374:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 376:2 - 378:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 372:2 - 374:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 376:2 - 378:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_19_backwards : string -> M (mword ty19)*)
+
(*val hex_bits_19_forwards_matches : mword ty19 -> bool*)
+(*val hex_bits_19_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_19_forwards_matches:(19)words$word -> bool) bv= T)`;
-(*val hex_bits_19_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_19_backwards_matches:string -> bool) s=
((case s of
@@ -1194,15 +1242,13 @@ val _ = Define `
if ((case ((hex_bits_19_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 19 words$word # ii)) option)) of
- SOME ((g__33, n)) =>
+ SOME ((g__355, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_19_backwards : string -> M (mword ty19)*)
-
val _ = Define `
((hex_bits_19_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((19)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_19_matches_prefix
@@ -1210,22 +1256,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 391:2 - 393:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 395:2 - 397:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 391:2 - 393:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 395:2 - 397:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_20_backwards : string -> M (mword ty20)*)
+
(*val hex_bits_20_forwards_matches : mword ty20 -> bool*)
+(*val hex_bits_20_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_20_forwards_matches:(20)words$word -> bool) bv= T)`;
-(*val hex_bits_20_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_20_backwards_matches:string -> bool) s=
((case s of
@@ -1233,15 +1281,13 @@ val _ = Define `
if ((case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 20 words$word # ii)) option)) of
- SOME ((g__32, n)) =>
+ SOME ((g__354, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_20_backwards : string -> M (mword ty20)*)
-
val _ = Define `
((hex_bits_20_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((20)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_20_matches_prefix
@@ -1249,22 +1295,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 410:2 - 412:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 414:2 - 416:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 410:2 - 412:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 414:2 - 416:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_21_backwards : string -> M (mword ty21)*)
+
(*val hex_bits_21_forwards_matches : mword ty21 -> bool*)
+(*val hex_bits_21_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_21_forwards_matches:(21)words$word -> bool) bv= T)`;
-(*val hex_bits_21_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_21_backwards_matches:string -> bool) s=
((case s of
@@ -1272,15 +1320,13 @@ val _ = Define `
if ((case ((hex_bits_21_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 21 words$word # ii)) option)) of
- SOME ((g__31, n)) =>
+ SOME ((g__353, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_21_backwards : string -> M (mword ty21)*)
-
val _ = Define `
((hex_bits_21_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((21)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_21_matches_prefix
@@ -1288,22 +1334,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 429:2 - 431:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 433:2 - 435:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 429:2 - 431:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 433:2 - 435:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_22_backwards : string -> M (mword ty22)*)
+
(*val hex_bits_22_forwards_matches : mword ty22 -> bool*)
+(*val hex_bits_22_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_22_forwards_matches:(22)words$word -> bool) bv= T)`;
-(*val hex_bits_22_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_22_backwards_matches:string -> bool) s=
((case s of
@@ -1311,15 +1359,13 @@ val _ = Define `
if ((case ((hex_bits_22_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 22 words$word # ii)) option)) of
- SOME ((g__30, n)) =>
+ SOME ((g__352, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_22_backwards : string -> M (mword ty22)*)
-
val _ = Define `
((hex_bits_22_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((22)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_22_matches_prefix
@@ -1327,22 +1373,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 448:2 - 450:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 452:2 - 454:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 448:2 - 450:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 452:2 - 454:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_23_backwards : string -> M (mword ty23)*)
+
(*val hex_bits_23_forwards_matches : mword ty23 -> bool*)
+(*val hex_bits_23_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_23_forwards_matches:(23)words$word -> bool) bv= T)`;
-(*val hex_bits_23_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_23_backwards_matches:string -> bool) s=
((case s of
@@ -1350,15 +1398,13 @@ val _ = Define `
if ((case ((hex_bits_23_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 23 words$word # ii)) option)) of
- SOME ((g__29, n)) =>
+ SOME ((g__351, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_23_backwards : string -> M (mword ty23)*)
-
val _ = Define `
((hex_bits_23_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((23)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_23_matches_prefix
@@ -1366,22 +1412,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 467:2 - 469:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 471:2 - 473:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 467:2 - 469:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 471:2 - 473:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_24_backwards : string -> M (mword ty24)*)
+
(*val hex_bits_24_forwards_matches : mword ty24 -> bool*)
+(*val hex_bits_24_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_24_forwards_matches:(24)words$word -> bool) bv= T)`;
-(*val hex_bits_24_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_24_backwards_matches:string -> bool) s=
((case s of
@@ -1389,15 +1437,13 @@ val _ = Define `
if ((case ((hex_bits_24_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 24 words$word # ii)) option)) of
- SOME ((g__28, n)) =>
+ SOME ((g__350, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_24_backwards : string -> M (mword ty24)*)
-
val _ = Define `
((hex_bits_24_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((24)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_24_matches_prefix
@@ -1405,22 +1451,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 486:2 - 488:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 490:2 - 492:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 486:2 - 488:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 490:2 - 492:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_25_backwards : string -> M (mword ty25)*)
+
(*val hex_bits_25_forwards_matches : mword ty25 -> bool*)
+(*val hex_bits_25_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_25_forwards_matches:(25)words$word -> bool) bv= T)`;
-(*val hex_bits_25_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_25_backwards_matches:string -> bool) s=
((case s of
@@ -1428,15 +1476,13 @@ val _ = Define `
if ((case ((hex_bits_25_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 25 words$word # ii)) option)) of
- SOME ((g__27, n)) =>
+ SOME ((g__349, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_25_backwards : string -> M (mword ty25)*)
-
val _ = Define `
((hex_bits_25_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((25)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_25_matches_prefix
@@ -1444,22 +1490,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 505:2 - 507:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 509:2 - 511:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 505:2 - 507:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 509:2 - 511:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_26_backwards : string -> M (mword ty26)*)
+
(*val hex_bits_26_forwards_matches : mword ty26 -> bool*)
+(*val hex_bits_26_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_26_forwards_matches:(26)words$word -> bool) bv= T)`;
-(*val hex_bits_26_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_26_backwards_matches:string -> bool) s=
((case s of
@@ -1467,15 +1515,13 @@ val _ = Define `
if ((case ((hex_bits_26_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 26 words$word # ii)) option)) of
- SOME ((g__26, n)) =>
+ SOME ((g__348, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_26_backwards : string -> M (mword ty26)*)
-
val _ = Define `
((hex_bits_26_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((26)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_26_matches_prefix
@@ -1483,22 +1529,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 524:2 - 526:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 528:2 - 530:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 524:2 - 526:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 528:2 - 530:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_27_backwards : string -> M (mword ty27)*)
+
(*val hex_bits_27_forwards_matches : mword ty27 -> bool*)
+(*val hex_bits_27_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_27_forwards_matches:(27)words$word -> bool) bv= T)`;
-(*val hex_bits_27_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_27_backwards_matches:string -> bool) s=
((case s of
@@ -1506,15 +1554,13 @@ val _ = Define `
if ((case ((hex_bits_27_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 27 words$word # ii)) option)) of
- SOME ((g__25, n)) =>
+ SOME ((g__347, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_27_backwards : string -> M (mword ty27)*)
-
val _ = Define `
((hex_bits_27_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((27)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_27_matches_prefix
@@ -1522,22 +1568,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 543:2 - 545:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 547:2 - 549:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 543:2 - 545:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 547:2 - 549:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_28_backwards : string -> M (mword ty28)*)
+
(*val hex_bits_28_forwards_matches : mword ty28 -> bool*)
+(*val hex_bits_28_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_28_forwards_matches:(28)words$word -> bool) bv= T)`;
-(*val hex_bits_28_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_28_backwards_matches:string -> bool) s=
((case s of
@@ -1545,15 +1593,13 @@ val _ = Define `
if ((case ((hex_bits_28_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 28 words$word # ii)) option)) of
- SOME ((g__24, n)) =>
+ SOME ((g__346, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_28_backwards : string -> M (mword ty28)*)
-
val _ = Define `
((hex_bits_28_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((28)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_28_matches_prefix
@@ -1561,22 +1607,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 562:2 - 564:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 566:2 - 568:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 562:2 - 564:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 566:2 - 568:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_29_backwards : string -> M (mword ty29)*)
+
(*val hex_bits_29_forwards_matches : mword ty29 -> bool*)
+(*val hex_bits_29_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_29_forwards_matches:(29)words$word -> bool) bv= T)`;
-(*val hex_bits_29_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_29_backwards_matches:string -> bool) s=
((case s of
@@ -1584,15 +1632,13 @@ val _ = Define `
if ((case ((hex_bits_29_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 29 words$word # ii)) option)) of
- SOME ((g__23, n)) =>
+ SOME ((g__345, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_29_backwards : string -> M (mword ty29)*)
-
val _ = Define `
((hex_bits_29_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((29)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_29_matches_prefix
@@ -1600,22 +1646,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 581:2 - 583:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 585:2 - 587:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 581:2 - 583:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 585:2 - 587:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_30_backwards : string -> M (mword ty30)*)
+
(*val hex_bits_30_forwards_matches : mword ty30 -> bool*)
+(*val hex_bits_30_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_30_forwards_matches:(30)words$word -> bool) bv= T)`;
-(*val hex_bits_30_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_30_backwards_matches:string -> bool) s=
((case s of
@@ -1623,15 +1671,13 @@ val _ = Define `
if ((case ((hex_bits_30_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 30 words$word # ii)) option)) of
- SOME ((g__22, n)) =>
+ SOME ((g__344, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_30_backwards : string -> M (mword ty30)*)
-
val _ = Define `
((hex_bits_30_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((30)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_30_matches_prefix
@@ -1639,22 +1685,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 600:2 - 602:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 604:2 - 606:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 600:2 - 602:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 604:2 - 606:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_31_backwards : string -> M (mword ty31)*)
+
(*val hex_bits_31_forwards_matches : mword ty31 -> bool*)
+(*val hex_bits_31_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_31_forwards_matches:(31)words$word -> bool) bv= T)`;
-(*val hex_bits_31_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_31_backwards_matches:string -> bool) s=
((case s of
@@ -1662,15 +1710,13 @@ val _ = Define `
if ((case ((hex_bits_31_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 31 words$word # ii)) option)) of
- SOME ((g__21, n)) =>
+ SOME ((g__343, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_31_backwards : string -> M (mword ty31)*)
-
val _ = Define `
((hex_bits_31_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((31)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_31_matches_prefix
@@ -1678,22 +1724,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 619:2 - 621:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 623:2 - 625:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 619:2 - 621:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 623:2 - 625:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_32_backwards : string -> M (mword ty32)*)
+
(*val hex_bits_32_forwards_matches : mword ty32 -> bool*)
+(*val hex_bits_32_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_32_forwards_matches:(32)words$word -> bool) bv= T)`;
-(*val hex_bits_32_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_32_backwards_matches:string -> bool) s=
((case s of
@@ -1701,15 +1749,13 @@ val _ = Define `
if ((case ((hex_bits_32_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 32 words$word # ii)) option)) of
- SOME ((g__20, n)) =>
+ SOME ((g__342, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_32_backwards : string -> M (mword ty32)*)
-
val _ = Define `
((hex_bits_32_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_32_matches_prefix
@@ -1717,22 +1763,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 638:2 - 640:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 642:2 - 644:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 638:2 - 640:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 642:2 - 644:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_33_backwards : string -> M (mword ty33)*)
+
(*val hex_bits_33_forwards_matches : mword ty33 -> bool*)
+(*val hex_bits_33_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_33_forwards_matches:(33)words$word -> bool) bv= T)`;
-(*val hex_bits_33_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_33_backwards_matches:string -> bool) s=
((case s of
@@ -1740,15 +1788,13 @@ val _ = Define `
if ((case ((hex_bits_33_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 33 words$word # ii)) option)) of
- SOME ((g__19, n)) =>
+ SOME ((g__341, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_33_backwards : string -> M (mword ty33)*)
-
val _ = Define `
((hex_bits_33_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((33)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_33_matches_prefix
@@ -1756,22 +1802,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 657:2 - 659:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 661:2 - 663:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 657:2 - 659:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 661:2 - 663:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_48_backwards : string -> M (mword ty48)*)
+
(*val hex_bits_48_forwards_matches : mword ty48 -> bool*)
+(*val hex_bits_48_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_48_forwards_matches:(48)words$word -> bool) bv= T)`;
-(*val hex_bits_48_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_48_backwards_matches:string -> bool) s=
((case s of
@@ -1779,15 +1827,13 @@ val _ = Define `
if ((case ((hex_bits_48_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 48 words$word # ii)) option)) of
- SOME ((g__18, n)) =>
+ SOME ((g__340, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_48_backwards : string -> M (mword ty48)*)
-
val _ = Define `
((hex_bits_48_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((48)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_48_matches_prefix
@@ -1795,22 +1841,24 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 676:2 - 678:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 680:2 - 682:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 676:2 - 678:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 680:2 - 682:3")
(sail2_state_monad$exitS () )
)))`;
+(*val hex_bits_64_backwards : string -> M (mword ty64)*)
+
(*val hex_bits_64_forwards_matches : mword ty64 -> bool*)
+(*val hex_bits_64_backwards_matches : string -> bool*)
+
val _ = Define `
((hex_bits_64_forwards_matches:(64)words$word -> bool) bv= T)`;
-(*val hex_bits_64_backwards_matches : string -> bool*)
-
val _ = Define `
((hex_bits_64_backwards_matches:string -> bool) s=
((case s of
@@ -1818,15 +1866,13 @@ val _ = Define `
if ((case ((hex_bits_64_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
s : (( 64 words$word # ii)) option)) of
- SOME ((g__17, n)) =>
+ SOME ((g__339, n)) =>
if (((n = ((string_length s))))) then T else F
| _ => F
)) then T else F
)))`;
-(*val hex_bits_64_backwards : string -> M (mword ty64)*)
-
val _ = Define `
((hex_bits_64_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s=
((case ((hex_bits_64_matches_prefix
@@ -1834,10 +1880,10 @@ val _ = Define `
SOME ((bv, n)) =>
if (((n = ((string_length s))))) then sail2_state_monad$returnS bv
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 695:2 - 697:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 699:2 - 701:3")
(sail2_state_monad$exitS () )
| _ => sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 695:2 - 697:3")
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/prelude_mapping.sail 699:2 - 701:3")
(sail2_state_monad$exitS () )
)))`;
@@ -1858,13 +1904,6 @@ val _ = Define `
((ReadRAM_Meta:(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width= (sail2_state_monad$returnS () ))`;
-(*val write_ram : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> unit -> M bool*)
-
-val _ = Define `
- ((write_ram:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) wk addr width data meta= (sail2_state_monad$bindS
- (sail2_state_monad$write_memS
- instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict wk (( 64 : int):ii) addr width data) (\ (ret : bool) . sail2_state_monad$seqS
- (if ret then WriteRAM_Meta addr width meta else sail2_state_monad$returnS () ) (sail2_state_monad$returnS ret))))`;
(*val write_ram_ea : write_kind -> mword ty64 -> integer -> M unit*)
@@ -1873,11 +1912,6 @@ val _ = Define `
((write_ram_ea:write_kind ->(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) wk addr width= (sail2_state_monad$returnS () ))`;
-(*val read_ram : forall 'int8_times_n. Size 'int8_times_n => read_kind -> mword ty64 -> integer -> M (mword 'int8_times_n)*)
-
-val _ = Define `
- ((read_ram:read_kind ->(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->((('int8_times_n words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rk addr width= ((sail2_state_monad$read_memS
- instance_Sail2_values_Bitvector_Machine_word_mword_dict instance_Sail2_values_Bitvector_Machine_word_mword_dict rk (( 64 : int):ii) addr width : ( 'int8_times_n words$word) M)))`;
(*val __TraceMemoryWrite : forall 'm 'int8_times_n. Size 'm, Size 'int8_times_n => integer -> mword 'm -> mword 'int8_times_n -> unit*)
@@ -1885,19 +1919,47 @@ val _ = Define `
(*val __TraceMemoryRead : forall 'm 'int8_times_n. Size 'm, Size 'int8_times_n => integer -> mword 'm -> mword 'int8_times_n -> unit*)
val _ = Define `
- ((xlen_val:int)= ((( 64 : int):ii)))`;
+((init_ext_ptw:unit)= () )`;
+(*val ext_translate_exception : unit -> unit*)
+
val _ = Define `
- ((xlen_max_unsigned:int)= (((pow2 (( 64 : int):ii))) - (( 1 : int):ii)))`;
+ ((ext_translate_exception:unit -> unit) e= e)`;
+
+(*val ext_exc_type_to_bits : unit -> mword ty8*)
val _ = Define `
- ((xlen_max_signed:int)= (((pow2 (((( 64 : int):ii) - (( 1 : int):ii))))) - (( 1 : int):ii)))`;
+ ((ext_exc_type_to_bits:unit ->(8)words$word) e= ((0x18w : 8 words$word)))`;
+(*val num_of_ext_exc_type : unit -> integer*)
+
val _ = Define `
- ((xlen_min_signed:int)= ((( 0 : int):ii) - ((pow2 (((( 64 : int):ii) - (( 1 : int):ii)))))))`;
+ ((num_of_ext_exc_type:unit -> int) e= ((( 24 : int):ii)))`;
+
+
+(*val ext_exc_type_to_str : unit -> string*)
+
+val _ = Define `
+ ((ext_exc_type_to_str:unit -> string) e= "extension-exception")`;
+
+
+val _ = Define `
+((xlen_val:int)= ((( 64 : int):ii)))`;
+
+
+val _ = Define `
+((xlen_max_unsigned:int)= ((( 18446744073709551615 : int):ii)))`;
+
+
+val _ = Define `
+((xlen_max_signed:int)= ((( 9223372036854775807 : int):ii)))`;
+
+
+val _ = Define `
+((xlen_min_signed:int)= (((( 0 : int)-( 9223372036854775808 : int)):ii)))`;
(*val regidx_to_regno : mword ty5 -> integer*)
@@ -1911,28 +1973,28 @@ val _ = Define `
(*val creg2reg_idx : mword ty3 -> mword ty5*)
val _ = Define `
- ((creg2reg_idx:(3)words$word ->(5)words$word) creg= ((concat_vec (vec_of_bits [B0;B1] : 2 words$word) creg : 5 words$word)))`;
+ ((creg2reg_idx:(3)words$word ->(5)words$word) creg= ((concat_vec (0b01w : 2 words$word) creg : 5 words$word)))`;
val _ = Define `
-((zreg:(5)words$word)= ((vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))`;
+((zreg:(5)words$word)= ((0b00000w : 5 words$word)))`;
val _ = Define `
-((ra:(5)words$word)= ((vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))`;
+((ra:(5)words$word)= ((0b00001w : 5 words$word)))`;
val _ = Define `
-((sp:(5)words$word)= ((vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))`;
+((sp:(5)words$word)= ((0b00010w : 5 words$word)))`;
(*val Architecture_of_num : integer -> Architecture*)
val _ = Define `
((Architecture_of_num:int -> Architecture) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RV32
- else if (((p0_ = (( 1 : int):ii)))) then RV64
+ (let l__262 = arg_ in
+ if (((l__262 = (( 0 : int):ii)))) then RV32
+ else if (((l__262 = (( 1 : int):ii)))) then RV64
else RV128))`;
@@ -1948,9 +2010,9 @@ val _ = Define `
val _ = Define `
((architecture:(2)words$word ->(Architecture)option) a=
(let b__0 = a in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then SOME RV32
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then SOME RV64
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then SOME RV128
+ if (((b__0 = (0b01w : 2 words$word)))) then SOME RV32
+ else if (((b__0 = (0b10w : 2 words$word)))) then SOME RV64
+ else if (((b__0 = (0b11w : 2 words$word)))) then SOME RV128
else NONE))`;
@@ -1959,9 +2021,9 @@ val _ = Define `
val _ = Define `
((arch_to_bits:Architecture ->(2)words$word) a=
((case a of
- RV32 => (vec_of_bits [B0;B1] : 2 words$word)
- | RV64 => (vec_of_bits [B1;B0] : 2 words$word)
- | RV128 => (vec_of_bits [B1;B1] : 2 words$word)
+ RV32 => (0b01w : 2 words$word)
+ | RV64 => (0b10w : 2 words$word)
+ | RV128 => (0b11w : 2 words$word)
)))`;
@@ -1969,9 +2031,9 @@ val _ = Define `
val _ = Define `
((Privilege_of_num:int -> Privilege) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then User
- else if (((p0_ = (( 1 : int):ii)))) then Supervisor
+ (let l__260 = arg_ in
+ if (((l__260 = (( 0 : int):ii)))) then User
+ else if (((l__260 = (( 1 : int):ii)))) then Supervisor
else Machine))`;
@@ -1987,9 +2049,9 @@ val _ = Define `
val _ = Define `
((privLevel_to_bits:Privilege ->(2)words$word) p=
((case p of
- User => (vec_of_bits [B0;B0] : 2 words$word)
- | Supervisor => (vec_of_bits [B0;B1] : 2 words$word)
- | Machine => (vec_of_bits [B1;B1] : 2 words$word)
+ User => (0b00w : 2 words$word)
+ | Supervisor => (0b01w : 2 words$word)
+ | Machine => (0b11w : 2 words$word)
)))`;
@@ -1998,9 +2060,9 @@ val _ = Define `
val _ = Define `
((privLevel_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
(let b__0 = p in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS User
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS Supervisor
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS Machine
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS User
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS Supervisor
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS Machine
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 78:2 - 82:3") (sail2_state_monad$exitS () )))`;
@@ -2010,14 +2072,24 @@ val _ = Define `
((privLevel_to_str:Privilege -> string) p= ((case p of User => "U" | Supervisor => "S" | Machine => "M" )))`;
+(*val accessType_to_str : AccessType unit -> string*)
+
+(*val csr_name : mword ty12 -> string*)
+
+(*val exceptionType_to_str : ExceptionType -> string*)
+
(*val print_insn : ast -> M string*)
+(*val ptw_error_to_str : PTW_Error -> string*)
+
+(*val reg_name_abi : mword ty5 -> M string*)
+
(*val Retired_of_num : integer -> Retired*)
val _ = Define `
((Retired_of_num:int -> Retired) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RETIRE_SUCCESS
+ (let l__259 = arg_ in
+ if (((l__259 = (( 0 : int):ii)))) then RETIRE_SUCCESS
else RETIRE_FAIL))`;
@@ -2027,39 +2099,14 @@ val _ = Define `
((num_of_Retired:Retired -> int) arg_= ((case arg_ of RETIRE_SUCCESS => (( 0 : int):ii) | RETIRE_FAIL => (( 1 : int):ii) )))`;
-(*val AccessType_of_num : integer -> AccessType*)
-
-val _ = Define `
- ((AccessType_of_num:int -> AccessType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Read
- else if (((p0_ = (( 1 : int):ii)))) then Write
- else if (((p0_ = (( 2 : int):ii)))) then ReadWrite
- else Execute))`;
-
-
-(*val num_of_AccessType : AccessType -> integer*)
-
-val _ = Define `
- ((num_of_AccessType:AccessType -> int) arg_=
- ((case arg_ of Read => (( 0 : int):ii) | Write => (( 1 : int):ii) | ReadWrite => (( 2 : int):ii) | Execute => (( 3 : int):ii) )))`;
-
-
-(*val accessType_to_str : AccessType -> string*)
-
-val _ = Define `
- ((accessType_to_str:AccessType -> string) a=
- ((case a of Read => "R" | Write => "W" | ReadWrite => "RW" | Execute => "X" )))`;
-
-
(*val word_width_of_num : integer -> word_width*)
val _ = Define `
((word_width_of_num:int -> word_width) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then BYTE
- else if (((p0_ = (( 1 : int):ii)))) then HALF
- else if (((p0_ = (( 2 : int):ii)))) then WORD
+ (let l__256 = arg_ in
+ if (((l__256 = (( 0 : int):ii)))) then BYTE
+ else if (((l__256 = (( 1 : int):ii)))) then HALF
+ else if (((l__256 = (( 2 : int):ii)))) then WORD
else DOUBLE))`;
@@ -2074,15 +2121,15 @@ val _ = Define `
val _ = Define `
((InterruptType_of_num:int -> InterruptType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then I_U_Software
- else if (((p0_ = (( 1 : int):ii)))) then I_S_Software
- else if (((p0_ = (( 2 : int):ii)))) then I_M_Software
- else if (((p0_ = (( 3 : int):ii)))) then I_U_Timer
- else if (((p0_ = (( 4 : int):ii)))) then I_S_Timer
- else if (((p0_ = (( 5 : int):ii)))) then I_M_Timer
- else if (((p0_ = (( 6 : int):ii)))) then I_U_External
- else if (((p0_ = (( 7 : int):ii)))) then I_S_External
+ (let l__248 = arg_ in
+ if (((l__248 = (( 0 : int):ii)))) then I_U_Software
+ else if (((l__248 = (( 1 : int):ii)))) then I_S_Software
+ else if (((l__248 = (( 2 : int):ii)))) then I_M_Software
+ else if (((l__248 = (( 3 : int):ii)))) then I_U_Timer
+ else if (((l__248 = (( 4 : int):ii)))) then I_S_Timer
+ else if (((l__248 = (( 5 : int):ii)))) then I_M_Timer
+ else if (((l__248 = (( 6 : int):ii)))) then I_U_External
+ else if (((l__248 = (( 7 : int):ii)))) then I_S_External
else I_M_External))`;
@@ -2108,114 +2155,88 @@ val _ = Define `
val _ = Define `
((interruptType_to_bits:InterruptType ->(8)words$word) i=
((case i of
- I_U_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)
- | I_S_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)
- | I_M_Software => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B1] : 8 words$word)
- | I_U_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0] : 8 words$word)
- | I_S_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B1] : 8 words$word)
- | I_M_Timer => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B1] : 8 words$word)
- | I_U_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B0] : 8 words$word)
- | I_S_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B1] : 8 words$word)
- | I_M_External => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1] : 8 words$word)
+ I_U_Software => (0x00w : 8 words$word)
+ | I_S_Software => (0x01w : 8 words$word)
+ | I_M_Software => (0x03w : 8 words$word)
+ | I_U_Timer => (0x04w : 8 words$word)
+ | I_S_Timer => (0x05w : 8 words$word)
+ | I_M_Timer => (0x07w : 8 words$word)
+ | I_U_External => (0x08w : 8 words$word)
+ | I_S_External => (0x09w : 8 words$word)
+ | I_M_External => (0x0Bw : 8 words$word)
)))`;
-(*val ExceptionType_of_num : integer -> ExceptionType*)
-
-val _ = Define `
- ((ExceptionType_of_num:int -> ExceptionType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then E_Fetch_Addr_Align
- else if (((p0_ = (( 1 : int):ii)))) then E_Fetch_Access_Fault
- else if (((p0_ = (( 2 : int):ii)))) then E_Illegal_Instr
- else if (((p0_ = (( 3 : int):ii)))) then E_Breakpoint
- else if (((p0_ = (( 4 : int):ii)))) then E_Load_Addr_Align
- else if (((p0_ = (( 5 : int):ii)))) then E_Load_Access_Fault
- else if (((p0_ = (( 6 : int):ii)))) then E_SAMO_Addr_Align
- else if (((p0_ = (( 7 : int):ii)))) then E_SAMO_Access_Fault
- else if (((p0_ = (( 8 : int):ii)))) then E_U_EnvCall
- else if (((p0_ = (( 9 : int):ii)))) then E_S_EnvCall
- else if (((p0_ = (( 10 : int):ii)))) then E_Reserved_10
- else if (((p0_ = (( 11 : int):ii)))) then E_M_EnvCall
- else if (((p0_ = (( 12 : int):ii)))) then E_Fetch_Page_Fault
- else if (((p0_ = (( 13 : int):ii)))) then E_Load_Page_Fault
- else if (((p0_ = (( 14 : int):ii)))) then E_Reserved_14
- else if (((p0_ = (( 15 : int):ii)))) then E_SAMO_Page_Fault
- else E_CHERI))`;
-
-
-(*val num_of_ExceptionType : ExceptionType -> integer*)
+(*val exceptionType_to_bits : ExceptionType -> mword ty8*)
val _ = Define `
- ((num_of_ExceptionType:ExceptionType -> int) arg_=
- ((case arg_ of
- E_Fetch_Addr_Align => (( 0 : int):ii)
- | E_Fetch_Access_Fault => (( 1 : int):ii)
- | E_Illegal_Instr => (( 2 : int):ii)
- | E_Breakpoint => (( 3 : int):ii)
- | E_Load_Addr_Align => (( 4 : int):ii)
- | E_Load_Access_Fault => (( 5 : int):ii)
- | E_SAMO_Addr_Align => (( 6 : int):ii)
- | E_SAMO_Access_Fault => (( 7 : int):ii)
- | E_U_EnvCall => (( 8 : int):ii)
- | E_S_EnvCall => (( 9 : int):ii)
- | E_Reserved_10 => (( 10 : int):ii)
- | E_M_EnvCall => (( 11 : int):ii)
- | E_Fetch_Page_Fault => (( 12 : int):ii)
- | E_Load_Page_Fault => (( 13 : int):ii)
- | E_Reserved_14 => (( 14 : int):ii)
- | E_SAMO_Page_Fault => (( 15 : int):ii)
- | E_CHERI => (( 16 : int):ii)
+ ((exceptionType_to_bits:ExceptionType ->(8)words$word) e=
+ ((case e of
+ E_Fetch_Addr_Align (() ) => (0x00w : 8 words$word)
+ | E_Fetch_Access_Fault (() ) => (0x01w : 8 words$word)
+ | E_Illegal_Instr (() ) => (0x02w : 8 words$word)
+ | E_Breakpoint (() ) => (0x03w : 8 words$word)
+ | E_Load_Addr_Align (() ) => (0x04w : 8 words$word)
+ | E_Load_Access_Fault (() ) => (0x05w : 8 words$word)
+ | E_SAMO_Addr_Align (() ) => (0x06w : 8 words$word)
+ | E_SAMO_Access_Fault (() ) => (0x07w : 8 words$word)
+ | E_U_EnvCall (() ) => (0x08w : 8 words$word)
+ | E_S_EnvCall (() ) => (0x09w : 8 words$word)
+ | E_Reserved_10 (() ) => (0x0Aw : 8 words$word)
+ | E_M_EnvCall (() ) => (0x0Bw : 8 words$word)
+ | E_Fetch_Page_Fault (() ) => (0x0Cw : 8 words$word)
+ | E_Load_Page_Fault (() ) => (0x0Dw : 8 words$word)
+ | E_Reserved_14 (() ) => (0x0Ew : 8 words$word)
+ | E_SAMO_Page_Fault (() ) => (0x0Fw : 8 words$word)
+ | E_Extension (e) => (ext_exc_type_to_bits e : 8 words$word)
)))`;
-(*val exceptionType_to_bits : ExceptionType -> mword ty8*)
+(*val num_of_ExceptionType : ExceptionType -> integer*)
val _ = Define `
- ((exceptionType_to_bits:ExceptionType ->(8)words$word) e=
+ ((num_of_ExceptionType:ExceptionType -> int) e=
((case e of
- E_Fetch_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)
- | E_Fetch_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)
- | E_Illegal_Instr => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B0] : 8 words$word)
- | E_Breakpoint => (vec_of_bits [B0;B0;B0;B0;B0;B0;B1;B1] : 8 words$word)
- | E_Load_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0] : 8 words$word)
- | E_Load_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B1] : 8 words$word)
- | E_SAMO_Addr_Align => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B0] : 8 words$word)
- | E_SAMO_Access_Fault => (vec_of_bits [B0;B0;B0;B0;B0;B1;B1;B1] : 8 words$word)
- | E_U_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B0] : 8 words$word)
- | E_S_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B0;B1] : 8 words$word)
- | E_Reserved_10 => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B0] : 8 words$word)
- | E_M_EnvCall => (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1] : 8 words$word)
- | E_Fetch_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B0;B0] : 8 words$word)
- | E_Load_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B0;B1] : 8 words$word)
- | E_Reserved_14 => (vec_of_bits [B0;B0;B0;B0;B1;B1;B1;B0] : 8 words$word)
- | E_SAMO_Page_Fault => (vec_of_bits [B0;B0;B0;B0;B1;B1;B1;B1] : 8 words$word)
- | E_CHERI => (vec_of_bits [B0;B0;B1;B0;B0;B0;B0;B0] : 8 words$word)
+ E_Fetch_Addr_Align (() ) => (( 0 : int):ii)
+ | E_Fetch_Access_Fault (() ) => (( 1 : int):ii)
+ | E_Illegal_Instr (() ) => (( 2 : int):ii)
+ | E_Breakpoint (() ) => (( 3 : int):ii)
+ | E_Load_Addr_Align (() ) => (( 4 : int):ii)
+ | E_Load_Access_Fault (() ) => (( 5 : int):ii)
+ | E_SAMO_Addr_Align (() ) => (( 6 : int):ii)
+ | E_SAMO_Access_Fault (() ) => (( 7 : int):ii)
+ | E_U_EnvCall (() ) => (( 8 : int):ii)
+ | E_S_EnvCall (() ) => (( 9 : int):ii)
+ | E_Reserved_10 (() ) => (( 10 : int):ii)
+ | E_M_EnvCall (() ) => (( 11 : int):ii)
+ | E_Fetch_Page_Fault (() ) => (( 12 : int):ii)
+ | E_Load_Page_Fault (() ) => (( 13 : int):ii)
+ | E_Reserved_14 (() ) => (( 14 : int):ii)
+ | E_SAMO_Page_Fault (() ) => (( 15 : int):ii)
+ | E_Extension (e) => num_of_ext_exc_type e
)))`;
-(*val exceptionType_to_str : ExceptionType -> string*)
-
val _ = Define `
((exceptionType_to_str:ExceptionType -> string) e=
((case e of
- E_Fetch_Addr_Align => "misaligned-fetch"
- | E_Fetch_Access_Fault => "fetch-access-fault"
- | E_Illegal_Instr => "illegal-instruction"
- | E_Breakpoint => "breakpoint"
- | E_Load_Addr_Align => "misaligned-load"
- | E_Load_Access_Fault => "load-access-fault"
- | E_SAMO_Addr_Align => "misaliged-store/amo"
- | E_SAMO_Access_Fault => "store/amo-access-fault"
- | E_U_EnvCall => "u-call"
- | E_S_EnvCall => "s-call"
- | E_Reserved_10 => "reserved-0"
- | E_M_EnvCall => "m-call"
- | E_Fetch_Page_Fault => "fetch-page-fault"
- | E_Load_Page_Fault => "load-page-fault"
- | E_Reserved_14 => "reserved-1"
- | E_SAMO_Page_Fault => "store/amo-page-fault"
- | E_CHERI => "CHERI"
+ E_Fetch_Addr_Align (() ) => "misaligned-fetch"
+ | E_Fetch_Access_Fault (() ) => "fetch-access-fault"
+ | E_Illegal_Instr (() ) => "illegal-instruction"
+ | E_Breakpoint (() ) => "breakpoint"
+ | E_Load_Addr_Align (() ) => "misaligned-load"
+ | E_Load_Access_Fault (() ) => "load-access-fault"
+ | E_SAMO_Addr_Align (() ) => "misaliged-store/amo"
+ | E_SAMO_Access_Fault (() ) => "store/amo-access-fault"
+ | E_U_EnvCall (() ) => "u-call"
+ | E_S_EnvCall (() ) => "s-call"
+ | E_Reserved_10 (() ) => "reserved-0"
+ | E_M_EnvCall (() ) => "m-call"
+ | E_Fetch_Page_Fault (() ) => "fetch-page-fault"
+ | E_Load_Page_Fault (() ) => "load-page-fault"
+ | E_Reserved_14 (() ) => "reserved-1"
+ | E_SAMO_Page_Fault (() ) => "store/amo-page-fault"
+ | E_Extension (e) => ext_exc_type_to_str e
)))`;
@@ -2235,9 +2256,9 @@ val _ = Define `
val _ = Define `
((TrapVectorMode_of_num:int -> TrapVectorMode) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then TV_Direct
- else if (((p0_ = (( 1 : int):ii)))) then TV_Vector
+ (let l__246 = arg_ in
+ if (((l__246 = (( 0 : int):ii)))) then TV_Direct
+ else if (((l__246 = (( 1 : int):ii)))) then TV_Vector
else TV_Reserved))`;
@@ -2253,8 +2274,8 @@ val _ = Define `
val _ = Define `
((trapVectorMode_of_bits:(2)words$word -> TrapVectorMode) m=
(let b__0 = m in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then TV_Direct
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then TV_Vector
+ if (((b__0 = (0b00w : 2 words$word)))) then TV_Direct
+ else if (((b__0 = (0b01w : 2 words$word)))) then TV_Vector
else TV_Reserved))`;
@@ -2262,10 +2283,10 @@ val _ = Define `
val _ = Define `
((ExtStatus_of_num:int -> ExtStatus) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Off
- else if (((p0_ = (( 1 : int):ii)))) then Initial
- else if (((p0_ = (( 2 : int):ii)))) then Clean
+ (let l__243 = arg_ in
+ if (((l__243 = (( 0 : int):ii)))) then Off
+ else if (((l__243 = (( 1 : int):ii)))) then Initial
+ else if (((l__243 = (( 2 : int):ii)))) then Clean
else Dirty))`;
@@ -2281,10 +2302,10 @@ val _ = Define `
val _ = Define `
((extStatus_to_bits:ExtStatus ->(2)words$word) e=
((case e of
- Off => (vec_of_bits [B0;B0] : 2 words$word)
- | Initial => (vec_of_bits [B0;B1] : 2 words$word)
- | Clean => (vec_of_bits [B1;B0] : 2 words$word)
- | Dirty => (vec_of_bits [B1;B1] : 2 words$word)
+ Off => (0b00w : 2 words$word)
+ | Initial => (0b01w : 2 words$word)
+ | Clean => (0b10w : 2 words$word)
+ | Dirty => (0b11w : 2 words$word)
)))`;
@@ -2293,21 +2314,21 @@ val _ = Define `
val _ = Define `
((extStatus_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ExtStatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) e=
(let b__0 = e in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS Off
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS Initial
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS Clean
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS Dirty
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 264:2 - 269:3") (sail2_state_monad$exitS () )))`;
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS Off
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS Initial
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS Clean
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS Dirty
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_types.sail 281:2 - 286:3") (sail2_state_monad$exitS () )))`;
(*val SATPMode_of_num : integer -> SATPMode*)
val _ = Define `
((SATPMode_of_num:int -> SATPMode) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then Sbare
- else if (((p0_ = (( 1 : int):ii)))) then Sv32
- else if (((p0_ = (( 2 : int):ii)))) then Sv39
+ (let l__240 = arg_ in
+ if (((l__240 = (( 0 : int):ii)))) then Sbare
+ else if (((l__240 = (( 1 : int):ii)))) then Sv32
+ else if (((l__240 = (( 2 : int):ii)))) then Sv39
else Sv48))`;
@@ -2323,16 +2344,16 @@ val _ = Define `
val _ = Define `
((satp64Mode_of_bits:Architecture ->(4)words$word ->(SATPMode)option) (a : Architecture) (m : satp_mode)=
((case (a, m) of
- (g__16, b__0) =>
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) then SOME Sbare
+ (g__338, b__0) =>
+ if (((b__0 = (0x0w : 4 words$word)))) then SOME Sbare
else
- (case (g__16, b__0) of
+ (case (g__338, b__0) of
(RV32, b__0) =>
- if (((b__0 = (vec_of_bits [B0;B0;B0;B1] : 4 words$word)))) then SOME Sv32
+ if (((b__0 = (0x1w : 4 words$word)))) then SOME Sv32
else (case (RV32, b__0) of (_, _) => NONE )
| (RV64, b__0) =>
- if (((b__0 = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) then SOME Sv39
- else if (((b__0 = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) then SOME Sv48
+ if (((b__0 = (0x8w : 4 words$word)))) then SOME Sv39
+ else if (((b__0 = (0x9w : 4 words$word)))) then SOME Sv48
else (case (RV64, b__0) of (_, _) => NONE )
| (_, _) => NONE
)
@@ -2343,8 +2364,8 @@ val _ = Define `
val _ = Define `
((uop_of_num:int -> uop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_LUI
+ (let l__239 = arg_ in
+ if (((l__239 = (( 0 : int):ii)))) then RISCV_LUI
else RISCV_AUIPC))`;
@@ -2358,12 +2379,12 @@ val _ = Define `
val _ = Define `
((bop_of_num:int -> bop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_BEQ
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_BNE
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_BLT
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_BGE
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_BLTU
+ (let l__234 = arg_ in
+ if (((l__234 = (( 0 : int):ii)))) then RISCV_BEQ
+ else if (((l__234 = (( 1 : int):ii)))) then RISCV_BNE
+ else if (((l__234 = (( 2 : int):ii)))) then RISCV_BLT
+ else if (((l__234 = (( 3 : int):ii)))) then RISCV_BGE
+ else if (((l__234 = (( 4 : int):ii)))) then RISCV_BLTU
else RISCV_BGEU))`;
@@ -2385,12 +2406,12 @@ val _ = Define `
val _ = Define `
((iop_of_num:int -> iop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADDI
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SLTI
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLTIU
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_XORI
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_ORI
+ (let l__229 = arg_ in
+ if (((l__229 = (( 0 : int):ii)))) then RISCV_ADDI
+ else if (((l__229 = (( 1 : int):ii)))) then RISCV_SLTI
+ else if (((l__229 = (( 2 : int):ii)))) then RISCV_SLTIU
+ else if (((l__229 = (( 3 : int):ii)))) then RISCV_XORI
+ else if (((l__229 = (( 4 : int):ii)))) then RISCV_ORI
else RISCV_ANDI))`;
@@ -2412,9 +2433,9 @@ val _ = Define `
val _ = Define `
((sop_of_num:int -> sop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_SLLI
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SRLI
+ (let l__227 = arg_ in
+ if (((l__227 = (( 0 : int):ii)))) then RISCV_SLLI
+ else if (((l__227 = (( 1 : int):ii)))) then RISCV_SRLI
else RISCV_SRAI))`;
@@ -2429,16 +2450,16 @@ val _ = Define `
val _ = Define `
((rop_of_num:int -> rop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADD
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SUB
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLL
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_SLT
- else if (((p0_ = (( 4 : int):ii)))) then RISCV_SLTU
- else if (((p0_ = (( 5 : int):ii)))) then RISCV_XOR
- else if (((p0_ = (( 6 : int):ii)))) then RISCV_SRL
- else if (((p0_ = (( 7 : int):ii)))) then RISCV_SRA
- else if (((p0_ = (( 8 : int):ii)))) then RISCV_OR
+ (let l__218 = arg_ in
+ if (((l__218 = (( 0 : int):ii)))) then RISCV_ADD
+ else if (((l__218 = (( 1 : int):ii)))) then RISCV_SUB
+ else if (((l__218 = (( 2 : int):ii)))) then RISCV_SLL
+ else if (((l__218 = (( 3 : int):ii)))) then RISCV_SLT
+ else if (((l__218 = (( 4 : int):ii)))) then RISCV_SLTU
+ else if (((l__218 = (( 5 : int):ii)))) then RISCV_XOR
+ else if (((l__218 = (( 6 : int):ii)))) then RISCV_SRL
+ else if (((l__218 = (( 7 : int):ii)))) then RISCV_SRA
+ else if (((l__218 = (( 8 : int):ii)))) then RISCV_OR
else RISCV_AND))`;
@@ -2464,11 +2485,11 @@ val _ = Define `
val _ = Define `
((ropw_of_num:int -> ropw) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_ADDW
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SUBW
- else if (((p0_ = (( 2 : int):ii)))) then RISCV_SLLW
- else if (((p0_ = (( 3 : int):ii)))) then RISCV_SRLW
+ (let l__214 = arg_ in
+ if (((l__214 = (( 0 : int):ii)))) then RISCV_ADDW
+ else if (((l__214 = (( 1 : int):ii)))) then RISCV_SUBW
+ else if (((l__214 = (( 2 : int):ii)))) then RISCV_SLLW
+ else if (((l__214 = (( 3 : int):ii)))) then RISCV_SRLW
else RISCV_SRAW))`;
@@ -2489,9 +2510,9 @@ val _ = Define `
val _ = Define `
((sopw_of_num:int -> sopw) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then RISCV_SLLIW
- else if (((p0_ = (( 1 : int):ii)))) then RISCV_SRLIW
+ (let l__212 = arg_ in
+ if (((l__212 = (( 0 : int):ii)))) then RISCV_SLLIW
+ else if (((l__212 = (( 1 : int):ii)))) then RISCV_SRLIW
else RISCV_SRAIW))`;
@@ -2506,15 +2527,15 @@ val _ = Define `
val _ = Define `
((amoop_of_num:int -> amoop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then AMOSWAP
- else if (((p0_ = (( 1 : int):ii)))) then AMOADD
- else if (((p0_ = (( 2 : int):ii)))) then AMOXOR
- else if (((p0_ = (( 3 : int):ii)))) then AMOAND
- else if (((p0_ = (( 4 : int):ii)))) then AMOOR
- else if (((p0_ = (( 5 : int):ii)))) then AMOMIN
- else if (((p0_ = (( 6 : int):ii)))) then AMOMAX
- else if (((p0_ = (( 7 : int):ii)))) then AMOMINU
+ (let l__204 = arg_ in
+ if (((l__204 = (( 0 : int):ii)))) then AMOSWAP
+ else if (((l__204 = (( 1 : int):ii)))) then AMOADD
+ else if (((l__204 = (( 2 : int):ii)))) then AMOXOR
+ else if (((l__204 = (( 3 : int):ii)))) then AMOAND
+ else if (((l__204 = (( 4 : int):ii)))) then AMOOR
+ else if (((l__204 = (( 5 : int):ii)))) then AMOMIN
+ else if (((l__204 = (( 6 : int):ii)))) then AMOMAX
+ else if (((l__204 = (( 7 : int):ii)))) then AMOMINU
else AMOMAXU))`;
@@ -2539,9 +2560,9 @@ val _ = Define `
val _ = Define `
((csrop_of_num:int -> csrop) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then CSRRW
- else if (((p0_ = (( 1 : int):ii)))) then CSRRS
+ (let l__202 = arg_ in
+ if (((l__202 = (( 0 : int):ii)))) then CSRRW
+ else if (((l__202 = (( 1 : int):ii)))) then CSRRS
else CSRRC))`;
@@ -2553,6 +2574,14 @@ val _ = Define `
(*val sep_forwards : unit -> string*)
+(*val sep_backwards : string -> M unit*)
+
+(*val sep_forwards_matches : unit -> bool*)
+
+(*val sep_backwards_matches : string -> bool*)
+
+(*val sep_matches_prefix : string -> maybe ((unit * ii))*)
+
val _ = Define `
((sep_forwards:unit -> string) arg_=
((case arg_ of
@@ -2562,8 +2591,6 @@ val _ = Define `
)))`;
-(*val sep_backwards : string -> M unit*)
-
(*val _s0_ : string -> maybe unit*)
val _ = Define `
@@ -2596,15 +2623,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val sep_forwards_matches : unit -> bool*)
-
val _ = Define `
((sep_forwards_matches:unit -> bool) arg_=
((case arg_ of () => T )))`;
-(*val sep_backwards_matches : string -> bool*)
-
(*val _s8_ : string -> maybe unit*)
val _ = Define `
@@ -2637,8 +2660,6 @@ val _ = Define `
else F))`;
-(*val sep_matches_prefix : string -> maybe ((unit * ii))*)
-
(*val _s16_ : string -> maybe string*)
val _ = Define `
@@ -2675,130 +2696,130 @@ val _ = Define `
(*val bool_bits_forwards : bool -> mword ty1*)
+(*val bool_bits_backwards : mword ty1 -> M bool*)
+
+(*val bool_bits_forwards_matches : bool -> bool*)
+
+(*val bool_bits_backwards_matches : mword ty1 -> bool*)
+
val _ = Define `
((bool_bits_forwards:bool ->(1)words$word) arg_=
- ((case arg_ of
- T => (vec_of_bits [B1] : 1 words$word)
- | F => (vec_of_bits [B0] : 1 words$word)
- )))`;
+ ((case arg_ of T => (0b1w : 1 words$word) | F => (0b0w : 1 words$word) )))`;
-(*val bool_bits_backwards : mword ty1 -> M bool*)
-
val _ = Define `
((bool_bits_backwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS F
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS T
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS F
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bool_bits_forwards_matches : bool -> bool*)
-
val _ = Define `
((bool_bits_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val bool_bits_backwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bool_bits_backwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
(*val bool_not_bits_forwards : bool -> mword ty1*)
+(*val bool_not_bits_backwards : mword ty1 -> M bool*)
+
+(*val bool_not_bits_forwards_matches : bool -> bool*)
+
+(*val bool_not_bits_backwards_matches : mword ty1 -> bool*)
+
val _ = Define `
((bool_not_bits_forwards:bool ->(1)words$word) arg_=
- ((case arg_ of
- T => (vec_of_bits [B0] : 1 words$word)
- | F => (vec_of_bits [B1] : 1 words$word)
- )))`;
+ ((case arg_ of T => (0b0w : 1 words$word) | F => (0b1w : 1 words$word) )))`;
-(*val bool_not_bits_backwards : mword ty1 -> M bool*)
-
val _ = Define `
((bool_not_bits_backwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS T
- else if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS F
+ if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS T
+ else if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS F
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bool_not_bits_forwards_matches : bool -> bool*)
-
val _ = Define `
((bool_not_bits_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val bool_not_bits_backwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bool_not_bits_backwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
+ if (((b__0 = (0b0w : 1 words$word)))) then T
+ else if (((b__0 = (0b1w : 1 words$word)))) then T
else F))`;
(*val size_bits_forwards : word_width -> mword ty2*)
+(*val size_bits_backwards : mword ty2 -> M word_width*)
+
+(*val size_bits_forwards_matches : word_width -> bool*)
+
+(*val size_bits_backwards_matches : mword ty2 -> bool*)
+
val _ = Define `
((size_bits_forwards:word_width ->(2)words$word) arg_=
((case arg_ of
- BYTE => (vec_of_bits [B0;B0] : 2 words$word)
- | HALF => (vec_of_bits [B0;B1] : 2 words$word)
- | WORD => (vec_of_bits [B1;B0] : 2 words$word)
- | DOUBLE => (vec_of_bits [B1;B1] : 2 words$word)
+ BYTE => (0b00w : 2 words$word)
+ | HALF => (0b01w : 2 words$word)
+ | WORD => (0b10w : 2 words$word)
+ | DOUBLE => (0b11w : 2 words$word)
)))`;
-(*val size_bits_backwards : mword ty2 -> M word_width*)
-
val _ = Define `
((size_bits_backwards:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((word_width),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS BYTE
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS HALF
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS WORD
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS DOUBLE
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS BYTE
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS HALF
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS WORD
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS DOUBLE
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val size_bits_forwards_matches : word_width -> bool*)
-
val _ = Define `
((size_bits_forwards_matches:word_width -> bool) arg_=
((case arg_ of BYTE => T | HALF => T | WORD => T | DOUBLE => T )))`;
-(*val size_bits_backwards_matches : mword ty2 -> bool*)
-
val _ = Define `
((size_bits_backwards_matches:(2)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then T
+ if (((b__0 = (0b00w : 2 words$word)))) then T
+ else if (((b__0 = (0b01w : 2 words$word)))) then T
+ else if (((b__0 = (0b10w : 2 words$word)))) then T
+ else if (((b__0 = (0b11w : 2 words$word)))) then T
else F))`;
(*val size_mnemonic_forwards : word_width -> string*)
+(*val size_mnemonic_backwards : string -> M word_width*)
+
+(*val size_mnemonic_forwards_matches : word_width -> bool*)
+
+(*val size_mnemonic_backwards_matches : string -> bool*)
+
+(*val size_mnemonic_matches_prefix : string -> maybe ((word_width * ii))*)
+
val _ = Define `
((size_mnemonic_forwards:word_width -> string) arg_=
((case arg_ of BYTE => "b" | HALF => "h" | WORD => "w" | DOUBLE => "d" )))`;
-(*val size_mnemonic_backwards : string -> M word_width*)
-
val _ = Define `
((size_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((word_width),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -2809,15 +2830,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val size_mnemonic_forwards_matches : word_width -> bool*)
-
val _ = Define `
((size_mnemonic_forwards_matches:word_width -> bool) arg_=
((case arg_ of BYTE => T | HALF => T | WORD => T | DOUBLE => T )))`;
-(*val size_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((size_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -2828,8 +2845,6 @@ val _ = Define `
else F))`;
-(*val size_mnemonic_matches_prefix : string -> maybe ((word_width * ii))*)
-
(*val _s36_ : string -> maybe string*)
val _ = Define `
@@ -2904,7 +2919,25 @@ val _ = Define `
val _ = Define `
-((zero_reg:(64)words$word)= ((EXTZ (( 64 : int):ii) (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 64 words$word)))`;
+((Data:unit)= () )`;
+
+
+val _ = Define `
+((default_write_acc:unit)= () )`;
+
+
+val _ = Define `
+ ((accessType_to_str:(unit)AccessType -> string) a=
+ ((case a of
+ Read (_) => "R"
+ | Write (_) => "W"
+ | ReadWrite ((_, _)) => "RW"
+ | Execute (() ) => "X"
+ )))`;
+
+
+val _ = Define `
+((zero_reg:(64)words$word)= ((0x0000000000000000w : 64 words$word)))`;
(*val RegStr : mword ty64 -> string*)
@@ -2925,43 +2958,340 @@ val _ = Define `
((regval_into_reg:(64)words$word ->(64)words$word) v= v)`;
+val _ = Define `
+((zero_freg:(64)words$word)= ((0x0000000000000000w : 64 words$word)))`;
+
+
+(*val FRegStr : mword ty64 -> string*)
+
+val _ = Define `
+ ((FRegStr:(64)words$word -> string) r= (string_of_bits r))`;
+
+
+(*val fregval_from_freg : mword ty64 -> mword ty64*)
+
+val _ = Define `
+ ((fregval_from_freg:(64)words$word ->(64)words$word) r= r)`;
+
+
+(*val fregval_into_freg : mword ty64 -> mword ty64*)
+
+val _ = Define `
+ ((fregval_into_freg:(64)words$word ->(64)words$word) v= v)`;
+
+
+(*val rounding_mode_of_num : integer -> rounding_mode*)
+
+val _ = Define `
+ ((rounding_mode_of_num:int -> rounding_mode) arg_=
+ (let l__197 = arg_ in
+ if (((l__197 = (( 0 : int):ii)))) then RM_RNE
+ else if (((l__197 = (( 1 : int):ii)))) then RM_RTZ
+ else if (((l__197 = (( 2 : int):ii)))) then RM_RDN
+ else if (((l__197 = (( 3 : int):ii)))) then RM_RUP
+ else if (((l__197 = (( 4 : int):ii)))) then RM_RMM
+ else RM_DYN))`;
+
+
+(*val num_of_rounding_mode : rounding_mode -> integer*)
+
+val _ = Define `
+ ((num_of_rounding_mode:rounding_mode -> int) arg_=
+ ((case arg_ of
+ RM_RNE => (( 0 : int):ii)
+ | RM_RTZ => (( 1 : int):ii)
+ | RM_RDN => (( 2 : int):ii)
+ | RM_RUP => (( 3 : int):ii)
+ | RM_RMM => (( 4 : int):ii)
+ | RM_DYN => (( 5 : int):ii)
+ )))`;
+
+
+(*val f_madd_op_S_of_num : integer -> f_madd_op_S*)
+
+val _ = Define `
+ ((f_madd_op_S_of_num:int -> f_madd_op_S) arg_=
+ (let l__194 = arg_ in
+ if (((l__194 = (( 0 : int):ii)))) then FMADD_S
+ else if (((l__194 = (( 1 : int):ii)))) then FMSUB_S
+ else if (((l__194 = (( 2 : int):ii)))) then FNMSUB_S
+ else FNMADD_S))`;
+
+
+(*val num_of_f_madd_op_S : f_madd_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_madd_op_S:f_madd_op_S -> int) arg_=
+ ((case arg_ of
+ FMADD_S => (( 0 : int):ii)
+ | FMSUB_S => (( 1 : int):ii)
+ | FNMSUB_S => (( 2 : int):ii)
+ | FNMADD_S => (( 3 : int):ii)
+ )))`;
+
+
+(*val f_bin_rm_op_S_of_num : integer -> f_bin_rm_op_S*)
+
+val _ = Define `
+ ((f_bin_rm_op_S_of_num:int -> f_bin_rm_op_S) arg_=
+ (let l__191 = arg_ in
+ if (((l__191 = (( 0 : int):ii)))) then FADD_S
+ else if (((l__191 = (( 1 : int):ii)))) then FSUB_S
+ else if (((l__191 = (( 2 : int):ii)))) then FMUL_S
+ else FDIV_S))`;
+
+
+(*val num_of_f_bin_rm_op_S : f_bin_rm_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_rm_op_S:f_bin_rm_op_S -> int) arg_=
+ ((case arg_ of FADD_S => (( 0 : int):ii) | FSUB_S => (( 1 : int):ii) | FMUL_S => (( 2 : int):ii) | FDIV_S => (( 3 : int):ii) )))`;
+
+
+(*val f_un_rm_op_S_of_num : integer -> f_un_rm_op_S*)
+
+val _ = Define `
+ ((f_un_rm_op_S_of_num:int -> f_un_rm_op_S) arg_=
+ (let l__183 = arg_ in
+ if (((l__183 = (( 0 : int):ii)))) then FSQRT_S
+ else if (((l__183 = (( 1 : int):ii)))) then FCVT_W_S
+ else if (((l__183 = (( 2 : int):ii)))) then FCVT_WU_S
+ else if (((l__183 = (( 3 : int):ii)))) then FCVT_S_W
+ else if (((l__183 = (( 4 : int):ii)))) then FCVT_S_WU
+ else if (((l__183 = (( 5 : int):ii)))) then FCVT_L_S
+ else if (((l__183 = (( 6 : int):ii)))) then FCVT_LU_S
+ else if (((l__183 = (( 7 : int):ii)))) then FCVT_S_L
+ else FCVT_S_LU))`;
+
+
+(*val num_of_f_un_rm_op_S : f_un_rm_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_rm_op_S:f_un_rm_op_S -> int) arg_=
+ ((case arg_ of
+ FSQRT_S => (( 0 : int):ii)
+ | FCVT_W_S => (( 1 : int):ii)
+ | FCVT_WU_S => (( 2 : int):ii)
+ | FCVT_S_W => (( 3 : int):ii)
+ | FCVT_S_WU => (( 4 : int):ii)
+ | FCVT_L_S => (( 5 : int):ii)
+ | FCVT_LU_S => (( 6 : int):ii)
+ | FCVT_S_L => (( 7 : int):ii)
+ | FCVT_S_LU => (( 8 : int):ii)
+ )))`;
+
+
+(*val f_un_op_S_of_num : integer -> f_un_op_S*)
+
+val _ = Define `
+ ((f_un_op_S_of_num:int -> f_un_op_S) arg_=
+ (let l__181 = arg_ in
+ if (((l__181 = (( 0 : int):ii)))) then FCLASS_S
+ else if (((l__181 = (( 1 : int):ii)))) then FMV_X_W
+ else FMV_W_X))`;
+
+
+(*val num_of_f_un_op_S : f_un_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_op_S:f_un_op_S -> int) arg_=
+ ((case arg_ of FCLASS_S => (( 0 : int):ii) | FMV_X_W => (( 1 : int):ii) | FMV_W_X => (( 2 : int):ii) )))`;
+
+
+(*val f_bin_op_S_of_num : integer -> f_bin_op_S*)
+
+val _ = Define `
+ ((f_bin_op_S_of_num:int -> f_bin_op_S) arg_=
+ (let l__174 = arg_ in
+ if (((l__174 = (( 0 : int):ii)))) then FSGNJ_S
+ else if (((l__174 = (( 1 : int):ii)))) then FSGNJN_S
+ else if (((l__174 = (( 2 : int):ii)))) then FSGNJX_S
+ else if (((l__174 = (( 3 : int):ii)))) then FMIN_S
+ else if (((l__174 = (( 4 : int):ii)))) then FMAX_S
+ else if (((l__174 = (( 5 : int):ii)))) then FEQ_S
+ else if (((l__174 = (( 6 : int):ii)))) then FLT_S
+ else FLE_S))`;
+
+
+(*val num_of_f_bin_op_S : f_bin_op_S -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_op_S:f_bin_op_S -> int) arg_=
+ ((case arg_ of
+ FSGNJ_S => (( 0 : int):ii)
+ | FSGNJN_S => (( 1 : int):ii)
+ | FSGNJX_S => (( 2 : int):ii)
+ | FMIN_S => (( 3 : int):ii)
+ | FMAX_S => (( 4 : int):ii)
+ | FEQ_S => (( 5 : int):ii)
+ | FLT_S => (( 6 : int):ii)
+ | FLE_S => (( 7 : int):ii)
+ )))`;
+
+
+(*val f_madd_op_D_of_num : integer -> f_madd_op_D*)
+
+val _ = Define `
+ ((f_madd_op_D_of_num:int -> f_madd_op_D) arg_=
+ (let l__171 = arg_ in
+ if (((l__171 = (( 0 : int):ii)))) then FMADD_D
+ else if (((l__171 = (( 1 : int):ii)))) then FMSUB_D
+ else if (((l__171 = (( 2 : int):ii)))) then FNMSUB_D
+ else FNMADD_D))`;
+
+
+(*val num_of_f_madd_op_D : f_madd_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_madd_op_D:f_madd_op_D -> int) arg_=
+ ((case arg_ of
+ FMADD_D => (( 0 : int):ii)
+ | FMSUB_D => (( 1 : int):ii)
+ | FNMSUB_D => (( 2 : int):ii)
+ | FNMADD_D => (( 3 : int):ii)
+ )))`;
+
+
+(*val f_bin_rm_op_D_of_num : integer -> f_bin_rm_op_D*)
+
+val _ = Define `
+ ((f_bin_rm_op_D_of_num:int -> f_bin_rm_op_D) arg_=
+ (let l__168 = arg_ in
+ if (((l__168 = (( 0 : int):ii)))) then FADD_D
+ else if (((l__168 = (( 1 : int):ii)))) then FSUB_D
+ else if (((l__168 = (( 2 : int):ii)))) then FMUL_D
+ else FDIV_D))`;
+
+
+(*val num_of_f_bin_rm_op_D : f_bin_rm_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_rm_op_D:f_bin_rm_op_D -> int) arg_=
+ ((case arg_ of FADD_D => (( 0 : int):ii) | FSUB_D => (( 1 : int):ii) | FMUL_D => (( 2 : int):ii) | FDIV_D => (( 3 : int):ii) )))`;
+
+
+(*val f_un_rm_op_D_of_num : integer -> f_un_rm_op_D*)
+
+val _ = Define `
+ ((f_un_rm_op_D_of_num:int -> f_un_rm_op_D) arg_=
+ (let l__158 = arg_ in
+ if (((l__158 = (( 0 : int):ii)))) then FSQRT_D
+ else if (((l__158 = (( 1 : int):ii)))) then FCVT_W_D
+ else if (((l__158 = (( 2 : int):ii)))) then FCVT_WU_D
+ else if (((l__158 = (( 3 : int):ii)))) then FCVT_D_W
+ else if (((l__158 = (( 4 : int):ii)))) then FCVT_D_WU
+ else if (((l__158 = (( 5 : int):ii)))) then FCVT_S_D
+ else if (((l__158 = (( 6 : int):ii)))) then FCVT_D_S
+ else if (((l__158 = (( 7 : int):ii)))) then FCVT_L_D
+ else if (((l__158 = (( 8 : int):ii)))) then FCVT_LU_D
+ else if (((l__158 = (( 9 : int):ii)))) then FCVT_D_L
+ else FCVT_D_LU))`;
+
+
+(*val num_of_f_un_rm_op_D : f_un_rm_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_rm_op_D:f_un_rm_op_D -> int) arg_=
+ ((case arg_ of
+ FSQRT_D => (( 0 : int):ii)
+ | FCVT_W_D => (( 1 : int):ii)
+ | FCVT_WU_D => (( 2 : int):ii)
+ | FCVT_D_W => (( 3 : int):ii)
+ | FCVT_D_WU => (( 4 : int):ii)
+ | FCVT_S_D => (( 5 : int):ii)
+ | FCVT_D_S => (( 6 : int):ii)
+ | FCVT_L_D => (( 7 : int):ii)
+ | FCVT_LU_D => (( 8 : int):ii)
+ | FCVT_D_L => (( 9 : int):ii)
+ | FCVT_D_LU => (( 10 : int):ii)
+ )))`;
+
+
+(*val f_bin_op_D_of_num : integer -> f_bin_op_D*)
+
+val _ = Define `
+ ((f_bin_op_D_of_num:int -> f_bin_op_D) arg_=
+ (let l__151 = arg_ in
+ if (((l__151 = (( 0 : int):ii)))) then FSGNJ_D
+ else if (((l__151 = (( 1 : int):ii)))) then FSGNJN_D
+ else if (((l__151 = (( 2 : int):ii)))) then FSGNJX_D
+ else if (((l__151 = (( 3 : int):ii)))) then FMIN_D
+ else if (((l__151 = (( 4 : int):ii)))) then FMAX_D
+ else if (((l__151 = (( 5 : int):ii)))) then FEQ_D
+ else if (((l__151 = (( 6 : int):ii)))) then FLT_D
+ else FLE_D))`;
+
+
+(*val num_of_f_bin_op_D : f_bin_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_bin_op_D:f_bin_op_D -> int) arg_=
+ ((case arg_ of
+ FSGNJ_D => (( 0 : int):ii)
+ | FSGNJN_D => (( 1 : int):ii)
+ | FSGNJX_D => (( 2 : int):ii)
+ | FMIN_D => (( 3 : int):ii)
+ | FMAX_D => (( 4 : int):ii)
+ | FEQ_D => (( 5 : int):ii)
+ | FLT_D => (( 6 : int):ii)
+ | FLE_D => (( 7 : int):ii)
+ )))`;
+
+
+(*val f_un_op_D_of_num : integer -> f_un_op_D*)
+
+val _ = Define `
+ ((f_un_op_D_of_num:int -> f_un_op_D) arg_=
+ (let l__149 = arg_ in
+ if (((l__149 = (( 0 : int):ii)))) then FCLASS_D
+ else if (((l__149 = (( 1 : int):ii)))) then FMV_X_D
+ else FMV_D_X))`;
+
+
+(*val num_of_f_un_op_D : f_un_op_D -> integer*)
+
+val _ = Define `
+ ((num_of_f_un_op_D:f_un_op_D -> int) arg_=
+ ((case arg_ of FCLASS_D => (( 0 : int):ii) | FMV_X_D => (( 1 : int):ii) | FMV_D_X => (( 2 : int):ii) )))`;
+
+
(*val rX : integer -> M (mword ty64)*)
val _ = Define `
((rX:int ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
- (let p0_ = r in sail2_state_monad$bindS
- (if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$returnS zero_reg
- else if (((p0_ = (( 1 : int):ii)))) then (sail2_state_monad$read_regS x1_ref : ( 64 words$word) M)
- else if (((p0_ = (( 2 : int):ii)))) then (sail2_state_monad$read_regS x2_ref : ( 64 words$word) M)
- else if (((p0_ = (( 3 : int):ii)))) then (sail2_state_monad$read_regS x3_ref : ( 64 words$word) M)
- else if (((p0_ = (( 4 : int):ii)))) then (sail2_state_monad$read_regS x4_ref : ( 64 words$word) M)
- else if (((p0_ = (( 5 : int):ii)))) then (sail2_state_monad$read_regS x5_ref : ( 64 words$word) M)
- else if (((p0_ = (( 6 : int):ii)))) then (sail2_state_monad$read_regS x6_ref : ( 64 words$word) M)
- else if (((p0_ = (( 7 : int):ii)))) then (sail2_state_monad$read_regS x7_ref : ( 64 words$word) M)
- else if (((p0_ = (( 8 : int):ii)))) then (sail2_state_monad$read_regS x8_ref : ( 64 words$word) M)
- else if (((p0_ = (( 9 : int):ii)))) then (sail2_state_monad$read_regS x9_ref : ( 64 words$word) M)
- else if (((p0_ = (( 10 : int):ii)))) then (sail2_state_monad$read_regS x10_ref : ( 64 words$word) M)
- else if (((p0_ = (( 11 : int):ii)))) then (sail2_state_monad$read_regS x11_ref : ( 64 words$word) M)
- else if (((p0_ = (( 12 : int):ii)))) then (sail2_state_monad$read_regS x12_ref : ( 64 words$word) M)
- else if (((p0_ = (( 13 : int):ii)))) then (sail2_state_monad$read_regS x13_ref : ( 64 words$word) M)
- else if (((p0_ = (( 14 : int):ii)))) then (sail2_state_monad$read_regS x14_ref : ( 64 words$word) M)
- else if (((p0_ = (( 15 : int):ii)))) then (sail2_state_monad$read_regS x15_ref : ( 64 words$word) M)
- else if (((p0_ = (( 16 : int):ii)))) then (sail2_state_monad$read_regS x16_ref : ( 64 words$word) M)
- else if (((p0_ = (( 17 : int):ii)))) then (sail2_state_monad$read_regS x17_ref : ( 64 words$word) M)
- else if (((p0_ = (( 18 : int):ii)))) then (sail2_state_monad$read_regS x18_ref : ( 64 words$word) M)
- else if (((p0_ = (( 19 : int):ii)))) then (sail2_state_monad$read_regS x19_ref : ( 64 words$word) M)
- else if (((p0_ = (( 20 : int):ii)))) then (sail2_state_monad$read_regS x20_ref : ( 64 words$word) M)
- else if (((p0_ = (( 21 : int):ii)))) then (sail2_state_monad$read_regS x21_ref : ( 64 words$word) M)
- else if (((p0_ = (( 22 : int):ii)))) then (sail2_state_monad$read_regS x22_ref : ( 64 words$word) M)
- else if (((p0_ = (( 23 : int):ii)))) then (sail2_state_monad$read_regS x23_ref : ( 64 words$word) M)
- else if (((p0_ = (( 24 : int):ii)))) then (sail2_state_monad$read_regS x24_ref : ( 64 words$word) M)
- else if (((p0_ = (( 25 : int):ii)))) then (sail2_state_monad$read_regS x25_ref : ( 64 words$word) M)
- else if (((p0_ = (( 26 : int):ii)))) then (sail2_state_monad$read_regS x26_ref : ( 64 words$word) M)
- else if (((p0_ = (( 27 : int):ii)))) then (sail2_state_monad$read_regS x27_ref : ( 64 words$word) M)
- else if (((p0_ = (( 28 : int):ii)))) then (sail2_state_monad$read_regS x28_ref : ( 64 words$word) M)
- else if (((p0_ = (( 29 : int):ii)))) then (sail2_state_monad$read_regS x29_ref : ( 64 words$word) M)
- else if (((p0_ = (( 30 : int):ii)))) then (sail2_state_monad$read_regS x30_ref : ( 64 words$word) M)
- else if (((p0_ = (( 31 : int):ii)))) then (sail2_state_monad$read_regS x31_ref : ( 64 words$word) M)
+ (let l__117 = r in sail2_state_monad$bindS
+ (if (((l__117 = (( 0 : int):ii)))) then sail2_state_monad$returnS zero_reg
+ else if (((l__117 = (( 1 : int):ii)))) then (sail2_state_monad$read_regS x1_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 2 : int):ii)))) then (sail2_state_monad$read_regS x2_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 3 : int):ii)))) then (sail2_state_monad$read_regS x3_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 4 : int):ii)))) then (sail2_state_monad$read_regS x4_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 5 : int):ii)))) then (sail2_state_monad$read_regS x5_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 6 : int):ii)))) then (sail2_state_monad$read_regS x6_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 7 : int):ii)))) then (sail2_state_monad$read_regS x7_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 8 : int):ii)))) then (sail2_state_monad$read_regS x8_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 9 : int):ii)))) then (sail2_state_monad$read_regS x9_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 10 : int):ii)))) then (sail2_state_monad$read_regS x10_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 11 : int):ii)))) then (sail2_state_monad$read_regS x11_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 12 : int):ii)))) then (sail2_state_monad$read_regS x12_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 13 : int):ii)))) then (sail2_state_monad$read_regS x13_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 14 : int):ii)))) then (sail2_state_monad$read_regS x14_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 15 : int):ii)))) then (sail2_state_monad$read_regS x15_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 16 : int):ii)))) then (sail2_state_monad$read_regS x16_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 17 : int):ii)))) then (sail2_state_monad$read_regS x17_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 18 : int):ii)))) then (sail2_state_monad$read_regS x18_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 19 : int):ii)))) then (sail2_state_monad$read_regS x19_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 20 : int):ii)))) then (sail2_state_monad$read_regS x20_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 21 : int):ii)))) then (sail2_state_monad$read_regS x21_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 22 : int):ii)))) then (sail2_state_monad$read_regS x22_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 23 : int):ii)))) then (sail2_state_monad$read_regS x23_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 24 : int):ii)))) then (sail2_state_monad$read_regS x24_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 25 : int):ii)))) then (sail2_state_monad$read_regS x25_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 26 : int):ii)))) then (sail2_state_monad$read_regS x26_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 27 : int):ii)))) then (sail2_state_monad$read_regS x27_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 28 : int):ii)))) then (sail2_state_monad$read_regS x28_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 29 : int):ii)))) then (sail2_state_monad$read_regS x29_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 30 : int):ii)))) then (sail2_state_monad$read_regS x30_ref : ( 64 words$word) M)
+ else if (((l__117 = (( 31 : int):ii)))) then (sail2_state_monad$read_regS x31_ref : ( 64 words$word) M)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid register number") (sail2_state_monad$exitS () )) (\ (v : regtype) .
sail2_state_monad$returnS ((regval_from_reg v : 64 words$word)))))`;
@@ -2977,39 +3307,39 @@ val _ = Define `
val _ = Define `
((wX:int ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r in_v=
(let v = ((regval_into_reg in_v : 64 words$word)) in
- let p0_ = r in sail2_state_monad$seqS
- (if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$returnS ()
- else if (((p0_ = (( 1 : int):ii)))) then sail2_state_monad$write_regS x1_ref v
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$write_regS x2_ref v
- else if (((p0_ = (( 3 : int):ii)))) then sail2_state_monad$write_regS x3_ref v
- else if (((p0_ = (( 4 : int):ii)))) then sail2_state_monad$write_regS x4_ref v
- else if (((p0_ = (( 5 : int):ii)))) then sail2_state_monad$write_regS x5_ref v
- else if (((p0_ = (( 6 : int):ii)))) then sail2_state_monad$write_regS x6_ref v
- else if (((p0_ = (( 7 : int):ii)))) then sail2_state_monad$write_regS x7_ref v
- else if (((p0_ = (( 8 : int):ii)))) then sail2_state_monad$write_regS x8_ref v
- else if (((p0_ = (( 9 : int):ii)))) then sail2_state_monad$write_regS x9_ref v
- else if (((p0_ = (( 10 : int):ii)))) then sail2_state_monad$write_regS x10_ref v
- else if (((p0_ = (( 11 : int):ii)))) then sail2_state_monad$write_regS x11_ref v
- else if (((p0_ = (( 12 : int):ii)))) then sail2_state_monad$write_regS x12_ref v
- else if (((p0_ = (( 13 : int):ii)))) then sail2_state_monad$write_regS x13_ref v
- else if (((p0_ = (( 14 : int):ii)))) then sail2_state_monad$write_regS x14_ref v
- else if (((p0_ = (( 15 : int):ii)))) then sail2_state_monad$write_regS x15_ref v
- else if (((p0_ = (( 16 : int):ii)))) then sail2_state_monad$write_regS x16_ref v
- else if (((p0_ = (( 17 : int):ii)))) then sail2_state_monad$write_regS x17_ref v
- else if (((p0_ = (( 18 : int):ii)))) then sail2_state_monad$write_regS x18_ref v
- else if (((p0_ = (( 19 : int):ii)))) then sail2_state_monad$write_regS x19_ref v
- else if (((p0_ = (( 20 : int):ii)))) then sail2_state_monad$write_regS x20_ref v
- else if (((p0_ = (( 21 : int):ii)))) then sail2_state_monad$write_regS x21_ref v
- else if (((p0_ = (( 22 : int):ii)))) then sail2_state_monad$write_regS x22_ref v
- else if (((p0_ = (( 23 : int):ii)))) then sail2_state_monad$write_regS x23_ref v
- else if (((p0_ = (( 24 : int):ii)))) then sail2_state_monad$write_regS x24_ref v
- else if (((p0_ = (( 25 : int):ii)))) then sail2_state_monad$write_regS x25_ref v
- else if (((p0_ = (( 26 : int):ii)))) then sail2_state_monad$write_regS x26_ref v
- else if (((p0_ = (( 27 : int):ii)))) then sail2_state_monad$write_regS x27_ref v
- else if (((p0_ = (( 28 : int):ii)))) then sail2_state_monad$write_regS x28_ref v
- else if (((p0_ = (( 29 : int):ii)))) then sail2_state_monad$write_regS x29_ref v
- else if (((p0_ = (( 30 : int):ii)))) then sail2_state_monad$write_regS x30_ref v
- else if (((p0_ = (( 31 : int):ii)))) then sail2_state_monad$write_regS x31_ref v
+ let l__85 = r in sail2_state_monad$seqS
+ (if (((l__85 = (( 0 : int):ii)))) then sail2_state_monad$returnS ()
+ else if (((l__85 = (( 1 : int):ii)))) then sail2_state_monad$write_regS x1_ref v
+ else if (((l__85 = (( 2 : int):ii)))) then sail2_state_monad$write_regS x2_ref v
+ else if (((l__85 = (( 3 : int):ii)))) then sail2_state_monad$write_regS x3_ref v
+ else if (((l__85 = (( 4 : int):ii)))) then sail2_state_monad$write_regS x4_ref v
+ else if (((l__85 = (( 5 : int):ii)))) then sail2_state_monad$write_regS x5_ref v
+ else if (((l__85 = (( 6 : int):ii)))) then sail2_state_monad$write_regS x6_ref v
+ else if (((l__85 = (( 7 : int):ii)))) then sail2_state_monad$write_regS x7_ref v
+ else if (((l__85 = (( 8 : int):ii)))) then sail2_state_monad$write_regS x8_ref v
+ else if (((l__85 = (( 9 : int):ii)))) then sail2_state_monad$write_regS x9_ref v
+ else if (((l__85 = (( 10 : int):ii)))) then sail2_state_monad$write_regS x10_ref v
+ else if (((l__85 = (( 11 : int):ii)))) then sail2_state_monad$write_regS x11_ref v
+ else if (((l__85 = (( 12 : int):ii)))) then sail2_state_monad$write_regS x12_ref v
+ else if (((l__85 = (( 13 : int):ii)))) then sail2_state_monad$write_regS x13_ref v
+ else if (((l__85 = (( 14 : int):ii)))) then sail2_state_monad$write_regS x14_ref v
+ else if (((l__85 = (( 15 : int):ii)))) then sail2_state_monad$write_regS x15_ref v
+ else if (((l__85 = (( 16 : int):ii)))) then sail2_state_monad$write_regS x16_ref v
+ else if (((l__85 = (( 17 : int):ii)))) then sail2_state_monad$write_regS x17_ref v
+ else if (((l__85 = (( 18 : int):ii)))) then sail2_state_monad$write_regS x18_ref v
+ else if (((l__85 = (( 19 : int):ii)))) then sail2_state_monad$write_regS x19_ref v
+ else if (((l__85 = (( 20 : int):ii)))) then sail2_state_monad$write_regS x20_ref v
+ else if (((l__85 = (( 21 : int):ii)))) then sail2_state_monad$write_regS x21_ref v
+ else if (((l__85 = (( 22 : int):ii)))) then sail2_state_monad$write_regS x22_ref v
+ else if (((l__85 = (( 23 : int):ii)))) then sail2_state_monad$write_regS x23_ref v
+ else if (((l__85 = (( 24 : int):ii)))) then sail2_state_monad$write_regS x24_ref v
+ else if (((l__85 = (( 25 : int):ii)))) then sail2_state_monad$write_regS x25_ref v
+ else if (((l__85 = (( 26 : int):ii)))) then sail2_state_monad$write_regS x26_ref v
+ else if (((l__85 = (( 27 : int):ii)))) then sail2_state_monad$write_regS x27_ref v
+ else if (((l__85 = (( 28 : int):ii)))) then sail2_state_monad$write_regS x28_ref v
+ else if (((l__85 = (( 29 : int):ii)))) then sail2_state_monad$write_regS x29_ref v
+ else if (((l__85 = (( 30 : int):ii)))) then sail2_state_monad$write_regS x30_ref v
+ else if (((l__85 = (( 31 : int):ii)))) then sail2_state_monad$write_regS x31_ref v
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid register number") (sail2_state_monad$exitS () ))
(sail2_state_monad$returnS (if (((r <> (( 0 : int):ii)))) then
let (_ : unit) = (rvfi_wX r in_v) in
@@ -3021,267 +3351,180 @@ val _ = Define `
else () ))))`;
-(*val reg_name_abi : mword ty5 -> M string*)
+(*val rX_bits : mword ty5 -> M (mword ty64)*)
+
+val _ = Define `
+ ((rX_bits:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) i= ((rX ((lem$w2ui i)) : ( 64 words$word) M)))`;
+
+
+(*val wX_bits : mword ty5 -> mword ty64 -> M unit*)
+
+val _ = Define `
+ ((wX_bits:(5)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (i : 5 bits) (data : xlenbits)= (wX ((lem$w2ui i)) data))`;
+
val _ = Define `
((reg_name_abi:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
(let b__0 = r in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- sail2_state_monad$returnS "zero"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "ra"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "sp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "gp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "tp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "fp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s8"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s9"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s10"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s11"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t6"
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_regs.sail 149:2 - 182:3") (sail2_state_monad$exitS () )))`;
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "zero"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ra"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "sp"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "gp"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "tp"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "t0"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "t1"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "t2"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fp"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "a5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "a6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "a7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "s2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "s3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "s4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "s5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "s6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "s7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "s8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "s9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "s10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "s11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "t3"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "t4"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "t5"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "t6"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_regs.sail 154:2 - 187:3") (sail2_state_monad$exitS () )))`;
(*val reg_name_forwards : mword ty5 -> M string*)
+(*val reg_name_backwards : string -> M (mword ty5)*)
+
+(*val reg_name_forwards_matches : mword ty5 -> bool*)
+
+(*val reg_name_backwards_matches : string -> bool*)
+
+(*val reg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
val _ = Define `
((reg_name_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- sail2_state_monad$returnS "zero"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "ra"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "sp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "gp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "tp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "fp"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a0"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a1"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "a6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "a7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s2"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s6"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s7"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s8"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s9"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "s10"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "s11"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t3"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t4"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS "t5"
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- sail2_state_monad$returnS "t6"
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "zero"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ra"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "sp"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "gp"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "tp"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "t0"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "t1"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "t2"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fp"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "a5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "a6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "a7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "s2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "s3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "s4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "s5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "s6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "s7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "s8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "s9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "s10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "s11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "t3"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "t4"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "t5"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "t6"
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val reg_name_backwards : string -> M (mword ty5)*)
-
val _ = Define `
((reg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "zero"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "ra"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "sp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "gp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "tp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "t0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "t1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "t2"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "fp"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "s1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "a0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "a1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "a2"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "a3"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "a4"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "a5"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "a6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "a7"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "s2"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "s3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "s4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "s5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "s6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "s7"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)
- else if (((p0_ = "s8"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)
- else if (((p0_ = "s9"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)
- else if (((p0_ = "s10"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)
- else if (((p0_ = "s11"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)
- else if (((p0_ = "t3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)
- else if (((p0_ = "t4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)
- else if (((p0_ = "t5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)
- else if (((p0_ = "t6"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)
+ if (((p0_ = "zero"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ra"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "sp"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "gp"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "tp"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "t0"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "t1"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "t2"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fp"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "s1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "a0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "a1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "a2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "a3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "a4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "a5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "a6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "a7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "s2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "s3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "s4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "s5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "s6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "s7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "s8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "s9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "s10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "s11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "t3"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "t4"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "t5"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "t6"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val reg_name_forwards_matches : mword ty5 -> bool*)
-
val _ = Define `
((reg_name_forwards_matches:(5)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word))))))
- then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word)))))) then
- T
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
else F))`;
-(*val reg_name_backwards_matches : string -> bool*)
-
val _ = Define `
((reg_name_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -3320,8 +3563,6 @@ val _ = Define `
else F))`;
-(*val reg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
-
(*val _s164_ : string -> maybe string*)
val _ = Define `
@@ -3649,279 +3890,249 @@ val _ = Define `
(case s40_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s44_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s44_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s48_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s48_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s52_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s52_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s56_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s56_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s60_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s60_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s64_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s64_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s68_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s68_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s72_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s72_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s76_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s76_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s80_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s80_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s84_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s84_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s88_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s88_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s92_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s92_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s96_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s96_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s100_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s100_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s104_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s104_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s108_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s108_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s112_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s112_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s116_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s116_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s120_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s120_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s124_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s124_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s128_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s128_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s132_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s132_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s136_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s136_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s140_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s140_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s144_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s144_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s148_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s148_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s152_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s152_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s156_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s156_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B0;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s160_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s160_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s164_ s43_0)) of SOME (s_) => T | _ => F )) then
(case s164_ s43_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B1] : 5 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val creg_name_forwards : mword ty3 -> M string*)
+(*val creg_name_backwards : string -> M (mword ty3)*)
+
+(*val creg_name_forwards_matches : mword ty3 -> bool*)
+
+(*val creg_name_backwards_matches : string -> bool*)
+
+(*val creg_name_matches_prefix : string -> maybe ((mword ty3 * ii))*)
+
val _ = Define `
((creg_name_forwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS "s0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS "s1"
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS "a0"
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS "a1"
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS "a2"
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS "a3"
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS "a4"
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS "a5"
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS "s0"
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS "s1"
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS "a0"
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS "a1"
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS "a2"
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS "a3"
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS "a4"
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS "a5"
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val creg_name_backwards : string -> M (mword ty3)*)
-
val _ = Define `
((creg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((3)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "s0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B0] : 3 words$word)
- else if (((p0_ = "s1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B0;B1] : 3 words$word)
- else if (((p0_ = "a0"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B0] : 3 words$word)
- else if (((p0_ = "a1"))) then sail2_state_monad$returnS (vec_of_bits [B0;B1;B1] : 3 words$word)
- else if (((p0_ = "a2"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B0] : 3 words$word)
- else if (((p0_ = "a3"))) then sail2_state_monad$returnS (vec_of_bits [B1;B0;B1] : 3 words$word)
- else if (((p0_ = "a4"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B0] : 3 words$word)
- else if (((p0_ = "a5"))) then sail2_state_monad$returnS (vec_of_bits [B1;B1;B1] : 3 words$word)
+ if (((p0_ = "s0"))) then sail2_state_monad$returnS (0b000w : 3 words$word)
+ else if (((p0_ = "s1"))) then sail2_state_monad$returnS (0b001w : 3 words$word)
+ else if (((p0_ = "a0"))) then sail2_state_monad$returnS (0b010w : 3 words$word)
+ else if (((p0_ = "a1"))) then sail2_state_monad$returnS (0b011w : 3 words$word)
+ else if (((p0_ = "a2"))) then sail2_state_monad$returnS (0b100w : 3 words$word)
+ else if (((p0_ = "a3"))) then sail2_state_monad$returnS (0b101w : 3 words$word)
+ else if (((p0_ = "a4"))) then sail2_state_monad$returnS (0b110w : 3 words$word)
+ else if (((p0_ = "a5"))) then sail2_state_monad$returnS (0b111w : 3 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val creg_name_forwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((creg_name_forwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
else F))`;
-(*val creg_name_backwards_matches : string -> bool*)
-
val _ = Define `
((creg_name_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -3936,8 +4147,6 @@ val _ = Define `
else F))`;
-(*val creg_name_matches_prefix : string -> maybe ((mword ty3 * ii))*)
-
(*val _s196_ : string -> maybe string*)
val _ = Define `
@@ -4025,57 +4234,49 @@ val _ = Define `
(case s168_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b000w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s172_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s172_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b001w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s176_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s176_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b010w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s180_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s180_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B1;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b011w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s184_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s184_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b100w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s188_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s188_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B0;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b101w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s192_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s192_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b110w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s196_ s171_0)) of SOME (s_) => T | _ => F )) then
(case s196_ s171_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1] : 3 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b111w : 3 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
@@ -4120,7 +4321,7 @@ val _ = Define `
found in the PC register as extensions may choose to override this function.
The value in the PC register is the absolute virtual address of the instruction
to fetch.
- *)
+*)
(*val get_arch_pc : unit -> M (mword ty64)*)
val _ = Define `
@@ -4164,11 +4365,11 @@ val _ = Define `
((set_Misa_bits:((regstate),(register_value),(Misa))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4176,19 +4377,181 @@ val _ = Define `
val _ = Define `
((update_Misa_bits:Misa ->(64)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+
+
+(*val _update_Counteren_bits : Counteren -> mword ty32 -> Counteren*)
+
+(*val _update_Counterin_bits : Counterin -> mword ty32 -> Counterin*)
+
+(*val _update_Fcsr_bits : Fcsr -> mword ty32 -> Fcsr*)
+(*val _update_Mcause_bits : Mcause -> mword ty64 -> Mcause*)
+
+(*val _update_Medeleg_bits : Medeleg -> mword ty64 -> Medeleg*)
+
+(*val _update_Minterrupts_bits : Minterrupts -> mword ty64 -> Minterrupts*)
+
+(*val _update_Mstatus_bits : Mstatus -> mword ty64 -> Mstatus*)
+
+(*val _update_Mstatush_bits : Mstatush -> mword ty32 -> Mstatush*)
+
+(*val _update_Mtvec_bits : Mtvec -> mword ty64 -> Mtvec*)
+
+(*val _update_PTE_Bits_bits : PTE_Bits -> mword ty8 -> PTE_Bits*)
+
+(*val _update_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
+
+(*val _update_SV32_PTE_bits : SV32_PTE -> mword ty32 -> SV32_PTE*)
+
+(*val _update_SV32_Paddr_bits : SV32_Paddr -> mword ty34 -> SV32_Paddr*)
+
+(*val _update_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32 -> SV32_Vaddr*)
+
+(*val _update_SV39_PTE_bits : SV39_PTE -> mword ty64 -> SV39_PTE*)
+
+(*val _update_SV39_Paddr_bits : SV39_Paddr -> mword ty56 -> SV39_Paddr*)
+
+(*val _update_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39 -> SV39_Vaddr*)
(*val _update_SV48_PTE_bits : SV48_PTE -> mword ty64 -> SV48_PTE*)
+(*val _update_SV48_Paddr_bits : SV48_Paddr -> mword ty56 -> SV48_Paddr*)
+
+(*val _update_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48 -> SV48_Vaddr*)
+
+(*val _update_Satp32_bits : Satp32 -> mword ty32 -> Satp32*)
+
+(*val _update_Satp64_bits : Satp64 -> mword ty64 -> Satp64*)
+
+(*val _update_Sedeleg_bits : Sedeleg -> mword ty64 -> Sedeleg*)
+
+(*val _update_Sinterrupts_bits : Sinterrupts -> mword ty64 -> Sinterrupts*)
+
+(*val _update_Sstatus_bits : Sstatus -> mword ty64 -> Sstatus*)
+
+(*val _update_Uinterrupts_bits : Uinterrupts -> mword ty64 -> Uinterrupts*)
+
+(*val _update_Ustatus_bits : Ustatus -> mword ty64 -> Ustatus*)
+
+(*val _update_htif_cmd_bits : htif_cmd -> mword ty64 -> htif_cmd*)
+
+(*val _get_Counteren_bits : Counteren -> mword ty32*)
+
+(*val _get_Counterin_bits : Counterin -> mword ty32*)
+
+(*val _get_Fcsr_bits : Fcsr -> mword ty32*)
+
+(*val _get_Mcause_bits : Mcause -> mword ty64*)
+
+(*val _get_Medeleg_bits : Medeleg -> mword ty64*)
+
+(*val _get_Minterrupts_bits : Minterrupts -> mword ty64*)
+
+(*val _get_Mstatus_bits : Mstatus -> mword ty64*)
+
+(*val _get_Mstatush_bits : Mstatush -> mword ty32*)
+
+(*val _get_Mtvec_bits : Mtvec -> mword ty64*)
+
+(*val _get_PTE_Bits_bits : PTE_Bits -> mword ty8*)
+
+(*val _get_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8*)
+
+(*val _get_SV32_PTE_bits : SV32_PTE -> mword ty32*)
+
+(*val _get_SV32_Paddr_bits : SV32_Paddr -> mword ty34*)
+
+(*val _get_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32*)
+
+(*val _get_SV39_PTE_bits : SV39_PTE -> mword ty64*)
+
+(*val _get_SV39_Paddr_bits : SV39_Paddr -> mword ty56*)
+
+(*val _get_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39*)
+
(*val _get_SV48_PTE_bits : SV48_PTE -> mword ty64*)
+(*val _get_SV48_Paddr_bits : SV48_Paddr -> mword ty56*)
+
+(*val _get_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48*)
+
+(*val _get_Satp32_bits : Satp32 -> mword ty32*)
+
+(*val _get_Satp64_bits : Satp64 -> mword ty64*)
+
+(*val _get_Sedeleg_bits : Sedeleg -> mword ty64*)
+
+(*val _get_Sinterrupts_bits : Sinterrupts -> mword ty64*)
+
+(*val _get_Sstatus_bits : Sstatus -> mword ty64*)
+
+(*val _get_Uinterrupts_bits : Uinterrupts -> mword ty64*)
+
+(*val _get_Ustatus_bits : Ustatus -> mword ty64*)
+
+(*val _get_htif_cmd_bits : htif_cmd -> mword ty64*)
+
+(*val _set_Counteren_bits : register_ref regstate register_value Counteren -> mword ty32 -> M unit*)
+
+(*val _set_Counterin_bits : register_ref regstate register_value Counterin -> mword ty32 -> M unit*)
+
+(*val _set_Fcsr_bits : register_ref regstate register_value Fcsr -> mword ty32 -> M unit*)
+
+(*val _set_Mcause_bits : register_ref regstate register_value Mcause -> mword ty64 -> M unit*)
+
+(*val _set_Medeleg_bits : register_ref regstate register_value Medeleg -> mword ty64 -> M unit*)
+
+(*val _set_Minterrupts_bits : register_ref regstate register_value Minterrupts -> mword ty64 -> M unit*)
+
+(*val _set_Mstatus_bits : register_ref regstate register_value Mstatus -> mword ty64 -> M unit*)
+
+(*val _set_Mstatush_bits : register_ref regstate register_value Mstatush -> mword ty32 -> M unit*)
+
+(*val _set_Mtvec_bits : register_ref regstate register_value Mtvec -> mword ty64 -> M unit*)
+
+(*val _set_PTE_Bits_bits : register_ref regstate register_value PTE_Bits -> mword ty8 -> M unit*)
+
+(*val _set_Pmpcfg_ent_bits : register_ref regstate register_value Pmpcfg_ent -> mword ty8 -> M unit*)
+
+(*val _set_SV32_PTE_bits : register_ref regstate register_value SV32_PTE -> mword ty32 -> M unit*)
+
+(*val _set_SV32_Paddr_bits : register_ref regstate register_value SV32_Paddr -> mword ty34 -> M unit*)
+
+(*val _set_SV32_Vaddr_bits : register_ref regstate register_value SV32_Vaddr -> mword ty32 -> M unit*)
+
+(*val _set_SV39_PTE_bits : register_ref regstate register_value SV39_PTE -> mword ty64 -> M unit*)
+
+(*val _set_SV39_Paddr_bits : register_ref regstate register_value SV39_Paddr -> mword ty56 -> M unit*)
+
+(*val _set_SV39_Vaddr_bits : register_ref regstate register_value SV39_Vaddr -> mword ty39 -> M unit*)
+
(*val _set_SV48_PTE_bits : register_ref regstate register_value SV48_PTE -> mword ty64 -> M unit*)
+(*val _set_SV48_Paddr_bits : register_ref regstate register_value SV48_Paddr -> mword ty56 -> M unit*)
+
+(*val _set_SV48_Vaddr_bits : register_ref regstate register_value SV48_Vaddr -> mword ty48 -> M unit*)
+
+(*val _set_Satp32_bits : register_ref regstate register_value Satp32 -> mword ty32 -> M unit*)
+
+(*val _set_Satp64_bits : register_ref regstate register_value Satp64 -> mword ty64 -> M unit*)
+
+(*val _set_Sedeleg_bits : register_ref regstate register_value Sedeleg -> mword ty64 -> M unit*)
+
+(*val _set_Sinterrupts_bits : register_ref regstate register_value Sinterrupts -> mword ty64 -> M unit*)
+
+(*val _set_Sstatus_bits : register_ref regstate register_value Sstatus -> mword ty64 -> M unit*)
+
+(*val _set_Uinterrupts_bits : register_ref regstate register_value Uinterrupts -> mword ty64 -> M unit*)
+
+(*val _set_Ustatus_bits : register_ref regstate register_value Ustatus -> mword ty64 -> M unit*)
+
+(*val _set_htif_cmd_bits : register_ref regstate register_value htif_cmd -> mword ty64 -> M unit*)
+
(*val _get_Misa_MXL : Misa -> mword ty2*)
val _ = Define `
@@ -4201,11 +4564,11 @@ val _ = Define `
((set_Misa_MXL:((regstate),(register_value),(Misa))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 63 : int):ii) (( 62 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4213,11 +4576,11 @@ val _ = Define `
val _ = Define `
((update_Misa_MXL:Misa ->(2)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 63 : int):ii) (( 62 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_Z : Misa -> mword ty1*)
@@ -4232,11 +4595,11 @@ val _ = Define `
((set_Misa_Z:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 25 : int):ii) (( 25 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4244,11 +4607,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Z:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 25 : int):ii) (( 25 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_Y : Misa -> mword ty1*)
@@ -4263,11 +4626,11 @@ val _ = Define `
((set_Misa_Y:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 24 : int):ii) (( 24 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4275,11 +4638,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Y:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 24 : int):ii) (( 24 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_X : Misa -> mword ty1*)
@@ -4294,11 +4657,11 @@ val _ = Define `
((set_Misa_X:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 23 : int):ii) (( 23 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4306,19 +4669,25 @@ val _ = Define `
val _ = Define `
((update_Misa_X:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 23 : int):ii) (( 23 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_X : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_X : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_X : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_X : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_W : Misa -> mword ty1*)
val _ = Define `
@@ -4331,11 +4700,11 @@ val _ = Define `
((set_Misa_W:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4343,19 +4712,25 @@ val _ = Define `
val _ = Define `
((update_Misa_W:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_W : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_W : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_W : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_W : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_V : Misa -> mword ty1*)
val _ = Define `
@@ -4368,11 +4743,11 @@ val _ = Define `
((set_Misa_V:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4380,11 +4755,11 @@ val _ = Define `
val _ = Define `
((update_Misa_V:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_V : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4405,11 +4780,11 @@ val _ = Define `
((set_Misa_U:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4417,11 +4792,11 @@ val _ = Define `
val _ = Define `
((update_Misa_U:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_U : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4442,11 +4817,11 @@ val _ = Define `
((set_Misa_T:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4454,11 +4829,11 @@ val _ = Define `
val _ = Define `
((update_Misa_T:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_S : Misa -> mword ty1*)
@@ -4473,11 +4848,11 @@ val _ = Define `
((set_Misa_S:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4485,11 +4860,11 @@ val _ = Define `
val _ = Define `
((update_Misa_S:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_R : Misa -> mword ty1*)
@@ -4504,11 +4879,11 @@ val _ = Define `
((set_Misa_R:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4516,19 +4891,25 @@ val _ = Define `
val _ = Define `
((update_Misa_R:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_R : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_R : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1*)
+
(*val _set_PTE_Bits_R : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_R : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
+
(*val _get_Misa_Q : Misa -> mword ty1*)
val _ = Define `
@@ -4541,11 +4922,11 @@ val _ = Define `
((set_Misa_Q:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 16 : int):ii) (( 16 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4553,11 +4934,11 @@ val _ = Define `
val _ = Define `
((update_Misa_Q:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 16 : int):ii) (( 16 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_P : Misa -> mword ty1*)
@@ -4572,11 +4953,11 @@ val _ = Define `
((set_Misa_P:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4584,11 +4965,11 @@ val _ = Define `
val _ = Define `
((update_Misa_P:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_O : Misa -> mword ty1*)
@@ -4603,11 +4984,11 @@ val _ = Define `
((set_Misa_O:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 14 : int):ii) (( 14 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4615,11 +4996,11 @@ val _ = Define `
val _ = Define `
((update_Misa_O:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 14 : int):ii) (( 14 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_N : Misa -> mword ty1*)
@@ -4634,11 +5015,11 @@ val _ = Define `
((set_Misa_N:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4646,11 +5027,11 @@ val _ = Define `
val _ = Define `
((update_Misa_N:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_M : Misa -> mword ty1*)
@@ -4665,11 +5046,11 @@ val _ = Define `
((set_Misa_M:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4677,11 +5058,11 @@ val _ = Define `
val _ = Define `
((update_Misa_M:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_L : Misa -> mword ty1*)
@@ -4696,11 +5077,11 @@ val _ = Define `
((set_Misa_L:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4708,11 +5089,11 @@ val _ = Define `
val _ = Define `
((update_Misa_L:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Pmpcfg_ent_L : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
@@ -4733,11 +5114,11 @@ val _ = Define `
((set_Misa_K:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4745,11 +5126,11 @@ val _ = Define `
val _ = Define `
((update_Misa_K:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_J : Misa -> mword ty1*)
@@ -4764,11 +5145,11 @@ val _ = Define `
((set_Misa_J:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4776,11 +5157,11 @@ val _ = Define `
val _ = Define `
((update_Misa_J:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_I : Misa -> mword ty1*)
@@ -4795,11 +5176,11 @@ val _ = Define `
((set_Misa_I:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4807,11 +5188,11 @@ val _ = Define `
val _ = Define `
((update_Misa_I:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_H : Misa -> mword ty1*)
@@ -4826,11 +5207,11 @@ val _ = Define `
((set_Misa_H:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4838,11 +5219,11 @@ val _ = Define `
val _ = Define `
((update_Misa_H:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_G : Misa -> mword ty1*)
@@ -4857,11 +5238,11 @@ val _ = Define `
((set_Misa_G:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4869,11 +5250,11 @@ val _ = Define `
val _ = Define `
((update_Misa_G:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_G : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4894,11 +5275,11 @@ val _ = Define `
((set_Misa_F:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4906,11 +5287,11 @@ val _ = Define `
val _ = Define `
((update_Misa_F:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_E : Misa -> mword ty1*)
@@ -4925,11 +5306,11 @@ val _ = Define `
((set_Misa_E:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4937,11 +5318,11 @@ val _ = Define `
val _ = Define `
((update_Misa_E:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_D : Misa -> mword ty1*)
@@ -4956,11 +5337,11 @@ val _ = Define `
((set_Misa_D:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -4968,11 +5349,11 @@ val _ = Define `
val _ = Define `
((update_Misa_D:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_D : PTE_Bits -> mword ty1 -> PTE_Bits*)
@@ -4993,11 +5374,11 @@ val _ = Define `
((set_Misa_C:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5005,11 +5386,11 @@ val _ = Define `
val _ = Define `
((update_Misa_C:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_B : Misa -> mword ty1*)
@@ -5024,11 +5405,11 @@ val _ = Define `
((set_Misa_B:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5036,11 +5417,11 @@ val _ = Define `
val _ = Define `
((update_Misa_B:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Misa_A : Misa -> mword ty1*)
@@ -5055,11 +5436,11 @@ val _ = Define `
((set_Misa_A:((regstate),(register_value),(Misa))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec r.Misa_Misa_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5067,31 +5448,49 @@ val _ = Define `
val _ = Define `
((update_Misa_A:Misa ->(1)words$word -> Misa) v x=
- ((v with<|
+ (( v with<|
Misa_Misa_chunk_0 :=
((update_subrange_vec_dec v.Misa_Misa_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_PTE_Bits_A : PTE_Bits -> mword ty1 -> PTE_Bits*)
+(*val _update_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2 -> Pmpcfg_ent*)
+
(*val _get_PTE_Bits_A : PTE_Bits -> mword ty1*)
+(*val _get_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2*)
+
(*val _set_PTE_Bits_A : register_ref regstate register_value PTE_Bits -> mword ty1 -> M unit*)
+(*val _set_Pmpcfg_ent_A : register_ref regstate register_value Pmpcfg_ent -> mword ty2 -> M unit*)
+
+(*val ext_veto_disable_C : unit -> M bool*)
+
(*val legalize_misa : Misa -> mword ty64 -> M Misa*)
val _ = Define `
+ ((ext_veto_disable_C:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$returnS F))`;
+
+
+val _ = Define `
((legalize_misa:Misa ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Misa),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Misa) (v : xlenbits)=
(if ((sys_enable_writable_misa () )) then
let v = (Mk_Misa v) in sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((get_Misa_C v : 1 words$word)) = ((bool_to_bits F : 1 words$word))))))
- ( sail2_state_monad$bindS(sail2_state_monad$read_regS nextPC_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
- sail2_state_monad$returnS (((((bit_to_bool ((access_vec_dec w__0 (( 1 : int):ii))))) = T)))))) (\ (w__1 : bool) .
- sail2_state_monad$returnS (if w__1 then m
- else update_Misa_C m ((get_Misa_C v : 1 words$word))))
+ (sail2_state$or_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((get_Misa_C v : 1 words$word)) = (0b0w : 1 words$word)))))
+ (sail2_state$or_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS nextPC_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ sail2_state_monad$returnS (((((access_vec_dec w__0 (( 1 : int):ii))) = B1))))) ((ext_veto_disable_C () ))))
+ (sail2_state_monad$returnS ((~ ((sys_enable_rvc () )))))) (\ (w__4 : bool) .
+ let m = (if w__4 then m else update_Misa_C m ((get_Misa_C v : 1 words$word))) in
+ sail2_state_monad$returnS (if (((((~ ((sys_enable_fdext () )))) \/ ((((((((get_Misa_D v : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_Misa_F v : 1 words$word)) = (0b0w : 1 words$word)))))))))) then
+ m
+ else
+ update_Misa_D ((update_Misa_F m ((get_Misa_F v : 1 words$word))))
+ ((get_Misa_D v : 1 words$word))))
else sail2_state_monad$returnS m))`;
@@ -5100,7 +5499,7 @@ val _ = Define `
val _ = Define `
((haveAtomics:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_A w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_A w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveRVC : unit -> M bool*)
@@ -5108,7 +5507,7 @@ val _ = Define `
val _ = Define `
((haveRVC:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveMulDiv : unit -> M bool*)
@@ -5116,7 +5515,7 @@ val _ = Define `
val _ = Define `
((haveMulDiv:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_M w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_M w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveSupMode : unit -> M bool*)
@@ -5124,7 +5523,7 @@ val _ = Define `
val _ = Define `
((haveSupMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_S w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_S w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveUsrMode : unit -> M bool*)
@@ -5132,7 +5531,7 @@ val _ = Define `
val _ = Define `
((haveUsrMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_U w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_U w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
(*val haveNExt : unit -> M bool*)
@@ -5140,7 +5539,102 @@ val _ = Define `
val _ = Define `
((haveNExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_N w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))`;
+ sail2_state_monad$returnS (((((get_Misa_N w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))`;
+
+
+(*val Mk_Mstatush : mword ty32 -> Mstatush*)
+
+val _ = Define `
+ ((Mk_Mstatush:(32)words$word -> Mstatush) v=
+ (<| Mstatush_Mstatush_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+
+
+val _ = Define `
+ ((get_Mstatush_bits:Mstatush ->(32)words$word) v=
+ ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
+
+val _ = Define `
+ ((set_Mstatush_bits:((regstate),(register_value),(Mstatush))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Mstatush_bits:Mstatush ->(32)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Mstatush_MBE : Mstatush -> mword ty1*)
+
+val _ = Define `
+ ((get_Mstatush_MBE:Mstatush ->(1)words$word) v= ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)))`;
+
+
+(*val _set_Mstatush_MBE : register_ref regstate register_value Mstatush -> mword ty1 -> M unit*)
+
+val _ = Define `
+ ((set_Mstatush_MBE:((regstate),(register_value),(Mstatush))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Mstatush_MBE : Mstatush -> mword ty1 -> Mstatush*)
+
+val _ = Define `
+ ((update_Mstatush_MBE:Mstatush ->(1)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Mstatush_SBE : Mstatush -> mword ty1*)
+
+val _ = Define `
+ ((get_Mstatush_SBE:Mstatush ->(1)words$word) v= ((subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+
+
+(*val _set_Mstatush_SBE : register_ref regstate register_value Mstatush -> mword ty1 -> M unit*)
+
+val _ = Define `
+ ((set_Mstatush_SBE:((regstate),(register_value),(Mstatush))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec r.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Mstatush_SBE : Mstatush -> mword ty1 -> Mstatush*)
+
+val _ = Define `
+ ((update_Mstatush_SBE:Mstatush ->(1)words$word -> Mstatush) v x=
+ (( v with<|
+ Mstatush_Mstatush_chunk_0 :=
+ ((update_subrange_vec_dec v.Mstatush_Mstatush_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
(*val Mk_Mstatus : mword ty64 -> Mstatus*)
@@ -5150,35 +5644,29 @@ val _ = Define `
(<| Mstatus_Mstatus_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Mstatus_bits : Mstatus -> mword ty64*)
-
val _ = Define `
((get_Mstatus_bits:Mstatus ->(64)words$word) v= ((subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Mstatus_bits : register_ref regstate register_value Mstatus -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Mstatus_bits:((regstate),(register_value),(Mstatus))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mstatus_bits : Mstatus -> mword ty64 -> Mstatus*)
-
val _ = Define `
((update_Mstatus_bits:Mstatus ->(64)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_SD : Mstatus -> mword ty1*)
@@ -5193,11 +5681,11 @@ val _ = Define `
((set_Mstatus_SD:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5205,11 +5693,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SD:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_SD : Sstatus -> mword ty1 -> Sstatus*)
@@ -5230,11 +5718,11 @@ val _ = Define `
((set_Mstatus_TSR:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5242,11 +5730,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TSR:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 22 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_TW : Mstatus -> mword ty1*)
@@ -5261,11 +5749,11 @@ val _ = Define `
((set_Mstatus_TW:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5273,11 +5761,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TW:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 21 : int):ii) (( 21 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_TVM : Mstatus -> mword ty1*)
@@ -5292,11 +5780,11 @@ val _ = Define `
((set_Mstatus_TVM:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5304,11 +5792,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_TVM:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 20 : int):ii) (( 20 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_MXR : Mstatus -> mword ty1*)
@@ -5323,11 +5811,11 @@ val _ = Define `
((set_Mstatus_MXR:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5335,11 +5823,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MXR:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_MXR : Sstatus -> mword ty1 -> Sstatus*)
@@ -5360,11 +5848,11 @@ val _ = Define `
((set_Mstatus_SUM:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5372,11 +5860,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SUM:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_SUM : Sstatus -> mword ty1 -> Sstatus*)
@@ -5397,11 +5885,11 @@ val _ = Define `
((set_Mstatus_MPRV:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5409,11 +5897,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPRV:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 17 : int):ii) (( 17 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_XS : Mstatus -> mword ty2*)
@@ -5428,11 +5916,11 @@ val _ = Define `
((set_Mstatus_XS:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5440,11 +5928,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_XS:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_XS : Sstatus -> mword ty2 -> Sstatus*)
@@ -5465,11 +5953,11 @@ val _ = Define `
((set_Mstatus_FS:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5477,11 +5965,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_FS:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_FS : Sstatus -> mword ty2 -> Sstatus*)
@@ -5502,11 +5990,11 @@ val _ = Define `
((set_Mstatus_MPP:((regstate),(register_value),(Mstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 12 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5514,11 +6002,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPP:Mstatus ->(2)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 12 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_SPP : Mstatus -> mword ty1*)
@@ -5533,11 +6021,11 @@ val _ = Define `
((set_Mstatus_SPP:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5545,11 +6033,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SPP:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_SPP : Sstatus -> mword ty1 -> Sstatus*)
@@ -5570,11 +6058,11 @@ val _ = Define `
((set_Mstatus_MPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5582,11 +6070,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_SPIE : Mstatus -> mword ty1*)
@@ -5601,11 +6089,11 @@ val _ = Define `
((set_Mstatus_SPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5613,11 +6101,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_SPIE : Sstatus -> mword ty1 -> Sstatus*)
@@ -5638,11 +6126,11 @@ val _ = Define `
((set_Mstatus_UPIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5650,17 +6138,23 @@ val _ = Define `
val _ = Define `
((update_Mstatus_UPIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+(*val _update_Sstatus_UPIE : Sstatus -> mword ty1 -> Sstatus*)
+
(*val _update_Ustatus_UPIE : Ustatus -> mword ty1 -> Ustatus*)
+(*val _get_Sstatus_UPIE : Sstatus -> mword ty1*)
+
(*val _get_Ustatus_UPIE : Ustatus -> mword ty1*)
+(*val _set_Sstatus_UPIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
+
(*val _set_Ustatus_UPIE : register_ref regstate register_value Ustatus -> mword ty1 -> M unit*)
(*val _get_Mstatus_MIE : Mstatus -> mword ty1*)
@@ -5675,11 +6169,11 @@ val _ = Define `
((set_Mstatus_MIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5687,11 +6181,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_MIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mstatus_SIE : Mstatus -> mword ty1*)
@@ -5706,11 +6200,11 @@ val _ = Define `
((set_Mstatus_SIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5718,11 +6212,11 @@ val _ = Define `
val _ = Define `
((update_Mstatus_SIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sstatus_SIE : Sstatus -> mword ty1 -> Sstatus*)
@@ -5743,11 +6237,11 @@ val _ = Define `
((set_Mstatus_UIE:((regstate),(register_value),(Mstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec r.Mstatus_Mstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5755,27 +6249,32 @@ val _ = Define `
val _ = Define `
((update_Mstatus_UIE:Mstatus ->(1)words$word -> Mstatus) v x=
- ((v with<|
+ (( v with<|
Mstatus_Mstatus_chunk_0 :=
((update_subrange_vec_dec v.Mstatus_Mstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+(*val _update_Sstatus_UIE : Sstatus -> mword ty1 -> Sstatus*)
+
(*val _update_Ustatus_UIE : Ustatus -> mword ty1 -> Ustatus*)
+(*val _get_Sstatus_UIE : Sstatus -> mword ty1*)
+
(*val _get_Ustatus_UIE : Ustatus -> mword ty1*)
+(*val _set_Sstatus_UIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
+
(*val _set_Ustatus_UIE : register_ref regstate register_value Ustatus -> mword ty1 -> M unit*)
-(*val effectivePrivilege : Mstatus -> Privilege -> M Privilege*)
+(*val effectivePrivilege : AccessType unit -> Mstatus -> Privilege -> M Privilege*)
val _ = Define `
- ((effectivePrivilege:Mstatus -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (priv : Privilege)=
- (if (((((get_Mstatus_MPRV m : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
- privLevel_of_bits ((get_Mstatus_MPP w__0 : 2 words$word)))
- else sail2_state_monad$read_regS cur_privilege_ref))`;
+ ((effectivePrivilege:(ext_access_type)AccessType -> Mstatus -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (m : Mstatus) (priv : Privilege)=
+ (if ((((((t <> (Execute () )))) /\ (((((get_Mstatus_MPRV m : 1 words$word)) = (0b1w : 1 words$word))))))) then
+ privLevel_of_bits ((get_Mstatus_MPP m : 2 words$word))
+ else sail2_state_monad$returnS priv))`;
(*val get_mstatus_SXL : Mstatus -> mword ty2*)
@@ -5814,19 +6313,46 @@ val _ = Define `
val _ = Define `
((legalize_mstatus:Mstatus ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Mstatus) (v : xlenbits)=
- (let (m : Mstatus) = (Mk_Mstatus v) in
+ (let (m : Mstatus) =
+ (Mk_Mstatus
+ ((EXTZ (( 64 : int):ii)
+ ((concat_vec ((subrange_vec_dec v (( 22 : int):ii) (( 11 : int):ii) : 12 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec ((subrange_vec_dec v (( 8 : int):ii) (( 7 : int):ii) : 2 words$word))
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec ((subrange_vec_dec v (( 5 : int):ii) (( 3 : int):ii) : 3 words$word))
+ ((concat_vec (0b0w : 1 words$word)
+ ((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
+ : 3 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 11 words$word))
+ : 23 words$word))
+ : 64 words$word))) in
let m = (update_Mstatus_XS m ((extStatus_to_bits Off : 2 words$word))) in sail2_state_monad$bindS
(sail2_state$or_boolS
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_FS m : 2 words$word))) (\ (w__0 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__0 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))
+ sail2_state_monad$returnS (((w__0 = Dirty)))))
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_XS m : 2 words$word))) (\ (w__1 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__1 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))) (\ (w__2 : bool) .
- let m = (update_Mstatus_SD m ((bool_to_bits w__2 : 1 words$word))) in
+ sail2_state_monad$returnS (((w__1 = Dirty)))))) (\ dirty .
+ let m = (update_Mstatus_SD m ((bool_to_bits dirty : 1 words$word))) in
let m = (set_mstatus_SXL m ((get_mstatus_SXL o1 : 2 words$word))) in
let m = (set_mstatus_UXL m ((get_mstatus_UXL o1 : 2 words$word))) in
- let m = (update_Mstatus_UPIE m ((bool_to_bits F : 1 words$word))) in
- let m = (update_Mstatus_UIE m ((bool_to_bits F : 1 words$word))) in
- sail2_state_monad$returnS m)))`;
+ let m =
+ (Mk_Mstatus
+ ((update_subrange_vec_dec ((get_Mstatus_bits m : 64 words$word)) (( 37 : int):ii) (( 36 : int):ii)
+ (0b00w : 2 words$word)
+ : 64 words$word))) in sail2_state_monad$bindS
+ (haveNExt () ) (\ (w__2 : bool) .
+ let m =
+ (if ((~ w__2)) then
+ let m = (update_Mstatus_UPIE m (0b0w : 1 words$word)) in
+ update_Mstatus_UIE m (0b0w : 1 words$word)
+ else m) in sail2_state_monad$bindS
+ (haveUsrMode () ) (\ (w__3 : bool) .
+ sail2_state_monad$returnS (if ((~ w__3)) then update_Mstatus_MPRV m (0b0w : 1 words$word)
+ else m))))))`;
(*val cur_Architecture : unit -> M Architecture*)
@@ -5854,6 +6380,28 @@ val _ = Define `
((in32BitMode:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (cur_Architecture () ) (\ (w__0 : Architecture) . sail2_state_monad$returnS (((w__0 = RV32))))))`;
+(*val haveFExt : unit -> M bool*)
+
+val _ = Define `
+ ((haveFExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
+ sail2_state_monad$returnS (((((get_Misa_F w__0 : 1 words$word)) = (0b1w : 1 words$word))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ sail2_state_monad$returnS (((((get_Mstatus_FS w__1 : 2 words$word)) <> (0b00w : 2 words$word))))))))`;
+
+
+(*val haveDExt : unit -> M bool*)
+
+val _ = Define `
+ ((haveDExt:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
+ sail2_state_monad$returnS (((((get_Misa_D w__0 : 1 words$word)) = (0b1w : 1 words$word))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ sail2_state_monad$returnS (((((get_Mstatus_FS w__1 : 2 words$word)) <> (0b00w : 2 words$word))))))))`;
+
+
(*val Mk_Minterrupts : mword ty64 -> Minterrupts*)
val _ = Define `
@@ -5861,36 +6409,30 @@ val _ = Define `
(<| Minterrupts_Minterrupts_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Minterrupts_bits : Minterrupts -> mword ty64*)
-
val _ = Define `
((get_Minterrupts_bits:Minterrupts ->(64)words$word) v=
((subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Minterrupts_bits : register_ref regstate register_value Minterrupts -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Minterrupts_bits:((regstate),(register_value),(Minterrupts))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Minterrupts_bits : Minterrupts -> mword ty64 -> Minterrupts*)
-
val _ = Define `
((update_Minterrupts_bits:Minterrupts ->(64)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Minterrupts_MEI : Minterrupts -> mword ty1*)
@@ -5906,11 +6448,11 @@ val _ = Define `
((set_Minterrupts_MEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5918,11 +6460,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 11 : int):ii) (( 11 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Minterrupts_SEI : Minterrupts -> mword ty1*)
@@ -5938,11 +6480,11 @@ val _ = Define `
((set_Minterrupts_SEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5950,11 +6492,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_SEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sinterrupts_SEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -5976,11 +6518,11 @@ val _ = Define `
((set_Minterrupts_UEI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -5988,17 +6530,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_UEI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+
+(*val _update_Sinterrupts_UEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
(*val _update_Uinterrupts_UEI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_UEI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_UEI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_UEI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_UEI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val _get_Minterrupts_MTI : Minterrupts -> mword ty1*)
@@ -6014,11 +6562,11 @@ val _ = Define `
((set_Minterrupts_MTI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6026,11 +6574,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MTI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Minterrupts_STI : Minterrupts -> mword ty1*)
@@ -6046,11 +6594,11 @@ val _ = Define `
((set_Minterrupts_STI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6058,11 +6606,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_STI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sinterrupts_STI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -6084,11 +6632,11 @@ val _ = Define `
((set_Minterrupts_UTI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6096,17 +6644,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_UTI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+(*val _update_Sinterrupts_UTI : Sinterrupts -> mword ty1 -> Sinterrupts*)
+
(*val _update_Uinterrupts_UTI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_UTI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_UTI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_UTI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_UTI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val _get_Minterrupts_MSI : Minterrupts -> mword ty1*)
@@ -6122,11 +6676,11 @@ val _ = Define `
((set_Minterrupts_MSI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6134,11 +6688,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_MSI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Minterrupts_SSI : Minterrupts -> mword ty1*)
@@ -6154,11 +6708,11 @@ val _ = Define `
((set_Minterrupts_SSI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6166,11 +6720,11 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_SSI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sinterrupts_SSI : Sinterrupts -> mword ty1 -> Sinterrupts*)
@@ -6192,11 +6746,11 @@ val _ = Define `
((set_Minterrupts_USI:((regstate),(register_value),(Minterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec r.Minterrupts_Minterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6204,17 +6758,23 @@ val _ = Define `
val _ = Define `
((update_Minterrupts_USI:Minterrupts ->(1)words$word -> Minterrupts) v x=
- ((v with<|
+ (( v with<|
Minterrupts_Minterrupts_chunk_0 :=
((update_subrange_vec_dec v.Minterrupts_Minterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+(*val _update_Sinterrupts_USI : Sinterrupts -> mword ty1 -> Sinterrupts*)
+
(*val _update_Uinterrupts_USI : Uinterrupts -> mword ty1 -> Uinterrupts*)
+(*val _get_Sinterrupts_USI : Sinterrupts -> mword ty1*)
+
(*val _get_Uinterrupts_USI : Uinterrupts -> mword ty1*)
+(*val _set_Sinterrupts_USI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
+
(*val _set_Uinterrupts_USI : register_ref regstate register_value Uinterrupts -> mword ty1 -> M unit*)
(*val legalize_mip : Minterrupts -> mword ty64 -> M Minterrupts*)
@@ -6225,8 +6785,8 @@ val _ = Define `
let m = (update_Minterrupts_SEI o1 ((get_Minterrupts_SEI v : 1 words$word))) in
let m = (update_Minterrupts_STI m ((get_Minterrupts_STI v : 1 words$word))) in
let m = (update_Minterrupts_SSI m ((get_Minterrupts_SSI v : 1 words$word))) in sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) .
- sail2_state_monad$returnS (if w__0 then
+ (sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))) (\ (w__2 : bool) .
+ sail2_state_monad$returnS (if w__2 then
let m = (update_Minterrupts_UEI m ((get_Minterrupts_UEI v : 1 words$word))) in
let m = (update_Minterrupts_UTI m ((get_Minterrupts_UTI v : 1 words$word))) in
update_Minterrupts_USI m ((get_Minterrupts_USI v : 1 words$word))
@@ -6244,8 +6804,8 @@ val _ = Define `
let m = (update_Minterrupts_SEI m ((get_Minterrupts_SEI v : 1 words$word))) in
let m = (update_Minterrupts_STI m ((get_Minterrupts_STI v : 1 words$word))) in
let m = (update_Minterrupts_SSI m ((get_Minterrupts_SSI v : 1 words$word))) in sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) .
- sail2_state_monad$returnS (if w__0 then
+ (sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))) (\ (w__2 : bool) .
+ sail2_state_monad$returnS (if w__2 then
let m = (update_Minterrupts_UEI m ((get_Minterrupts_UEI v : 1 words$word))) in
let m = (update_Minterrupts_UTI m ((get_Minterrupts_UTI v : 1 words$word))) in
update_Minterrupts_USI m ((get_Minterrupts_USI v : 1 words$word))
@@ -6257,9 +6817,9 @@ val _ = Define `
val _ = Define `
((legalize_mideleg:Minterrupts ->(64)words$word -> Minterrupts) (o1 : Minterrupts) (v : xlenbits)=
(let m = (Mk_Minterrupts v) in
- let m = (update_Minterrupts_MEI m ((bool_to_bits F : 1 words$word))) in
- let m = (update_Minterrupts_MTI m ((bool_to_bits F : 1 words$word))) in
- update_Minterrupts_MSI m ((bool_to_bits F : 1 words$word))))`;
+ let m = (update_Minterrupts_MEI m (0b0w : 1 words$word)) in
+ let m = (update_Minterrupts_MTI m (0b0w : 1 words$word)) in
+ update_Minterrupts_MSI m (0b0w : 1 words$word)))`;
(*val Mk_Medeleg : mword ty64 -> Medeleg*)
@@ -6269,35 +6829,29 @@ val _ = Define `
(<| Medeleg_Medeleg_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Medeleg_bits : Medeleg -> mword ty64*)
-
val _ = Define `
((get_Medeleg_bits:Medeleg ->(64)words$word) v= ((subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Medeleg_bits : register_ref regstate register_value Medeleg -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Medeleg_bits:((regstate),(register_value),(Medeleg))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Medeleg_bits : Medeleg -> mword ty64 -> Medeleg*)
-
val _ = Define `
((update_Medeleg_bits:Medeleg ->(64)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_SAMO_Page_Fault : Medeleg -> mword ty1*)
@@ -6313,11 +6867,11 @@ val _ = Define `
((set_Medeleg_SAMO_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6325,11 +6879,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 15 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_Load_Page_Fault : Medeleg -> mword ty1*)
@@ -6345,11 +6899,11 @@ val _ = Define `
((set_Medeleg_Load_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6357,11 +6911,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 13 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_Fetch_Page_Fault : Medeleg -> mword ty1*)
@@ -6377,11 +6931,11 @@ val _ = Define `
((set_Medeleg_Fetch_Page_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6389,11 +6943,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Page_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 12 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_MEnvCall : Medeleg -> mword ty1*)
@@ -6409,11 +6963,11 @@ val _ = Define `
((set_Medeleg_MEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6421,11 +6975,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_MEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 10 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_SEnvCall : Medeleg -> mword ty1*)
@@ -6441,11 +6995,11 @@ val _ = Define `
((set_Medeleg_SEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6453,11 +7007,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Medeleg_UEnvCall : Medeleg -> mword ty1*)
@@ -6473,11 +7027,11 @@ val _ = Define `
((set_Medeleg_UEnvCall:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6485,11 +7039,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_UEnvCall:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_UEnvCall : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6511,11 +7065,11 @@ val _ = Define `
((set_Medeleg_SAMO_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6523,11 +7077,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_SAMO_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6549,11 +7103,11 @@ val _ = Define `
((set_Medeleg_SAMO_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6561,11 +7115,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_SAMO_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_SAMO_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6587,11 +7141,11 @@ val _ = Define `
((set_Medeleg_Load_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6599,11 +7153,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Load_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6625,11 +7179,11 @@ val _ = Define `
((set_Medeleg_Load_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6637,11 +7191,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Load_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Load_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6663,11 +7217,11 @@ val _ = Define `
((set_Medeleg_Breakpoint:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6675,11 +7229,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Breakpoint:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Breakpoint : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6701,11 +7255,11 @@ val _ = Define `
((set_Medeleg_Illegal_Instr:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6713,11 +7267,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Illegal_Instr:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Illegal_Instr : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6739,11 +7293,11 @@ val _ = Define `
((set_Medeleg_Fetch_Access_Fault:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6751,11 +7305,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Access_Fault:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Fetch_Access_Fault : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6777,11 +7331,11 @@ val _ = Define `
((set_Medeleg_Fetch_Addr_Align:((regstate),(register_value),(Medeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec r.Medeleg_Medeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6789,11 +7343,11 @@ val _ = Define `
val _ = Define `
((update_Medeleg_Fetch_Addr_Align:Medeleg ->(1)words$word -> Medeleg) v x=
- ((v with<|
+ (( v with<|
Medeleg_Medeleg_chunk_0 :=
((update_subrange_vec_dec v.Medeleg_Medeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Sedeleg_Fetch_Addr_Align : Sedeleg -> mword ty1 -> Sedeleg*)
@@ -6807,7 +7361,7 @@ val _ = Define `
val _ = Define `
((legalize_medeleg:Medeleg ->(64)words$word -> Medeleg) (o1 : Medeleg) (v : xlenbits)=
(let m = (Mk_Medeleg v) in
- update_Medeleg_MEnvCall m ((bool_to_bits F : 1 words$word))))`;
+ update_Medeleg_MEnvCall m (0b0w : 1 words$word)))`;
(*val Mk_Mtvec : mword ty64 -> Mtvec*)
@@ -6816,35 +7370,29 @@ val _ = Define `
((Mk_Mtvec:(64)words$word -> Mtvec) v= (<| Mtvec_Mtvec_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Mtvec_bits : Mtvec -> mword ty64*)
-
val _ = Define `
((get_Mtvec_bits:Mtvec ->(64)words$word) v= ((subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Mtvec_bits : register_ref regstate register_value Mtvec -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Mtvec_bits:((regstate),(register_value),(Mtvec))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mtvec_bits : Mtvec -> mword ty64 -> Mtvec*)
-
val _ = Define `
((update_Mtvec_bits:Mtvec ->(64)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mtvec_Base : Mtvec -> mword ty62*)
@@ -6859,11 +7407,11 @@ val _ = Define `
((set_Mtvec_Base:((regstate),(register_value),(Mtvec))register_ref ->(62)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 63 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 61 : int):ii) (( 0 : int):ii) : 62 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6871,11 +7419,11 @@ val _ = Define `
val _ = Define `
((update_Mtvec_Base:Mtvec ->(62)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 63 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 61 : int):ii) (( 0 : int):ii) : 62 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mtvec_Mode : Mtvec -> mword ty2*)
@@ -6890,11 +7438,11 @@ val _ = Define `
((set_Mtvec_Mode:((regstate),(register_value),(Mtvec))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec r.Mtvec_Mtvec_chunk_0 (( 1 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6902,19 +7450,25 @@ val _ = Define `
val _ = Define `
((update_Mtvec_Mode:Mtvec ->(2)words$word -> Mtvec) v x=
- ((v with<|
+ (( v with<|
Mtvec_Mtvec_chunk_0 :=
((update_subrange_vec_dec v.Mtvec_Mtvec_chunk_0 (( 1 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Satp32_Mode : Satp32 -> mword ty1 -> Satp32*)
+(*val _update_Satp64_Mode : Satp64 -> mword ty4 -> Satp64*)
+
(*val _get_Satp32_Mode : Satp32 -> mword ty1*)
+(*val _get_Satp64_Mode : Satp64 -> mword ty4*)
+
(*val _set_Satp32_Mode : register_ref regstate register_value Satp32 -> mword ty1 -> M unit*)
+(*val _set_Satp64_Mode : register_ref regstate register_value Satp64 -> mword ty4 -> M unit*)
+
(*val legalize_tvec : Mtvec -> mword ty64 -> Mtvec*)
val _ = Define `
@@ -6933,35 +7487,29 @@ val _ = Define `
((Mk_Mcause:(64)words$word -> Mcause) v= (<| Mcause_Mcause_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Mcause_bits : Mcause -> mword ty64*)
-
val _ = Define `
((get_Mcause_bits:Mcause ->(64)words$word) v= ((subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Mcause_bits : register_ref regstate register_value Mcause -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Mcause_bits:((regstate),(register_value),(Mcause))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Mcause_bits : Mcause -> mword ty64 -> Mcause*)
-
val _ = Define `
((update_Mcause_bits:Mcause ->(64)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mcause_IsInterrupt : Mcause -> mword ty1*)
@@ -6977,11 +7525,11 @@ val _ = Define `
((set_Mcause_IsInterrupt:((regstate),(register_value),(Mcause))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -6989,11 +7537,11 @@ val _ = Define `
val _ = Define `
((update_Mcause_IsInterrupt:Mcause ->(1)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Mcause_Cause : Mcause -> mword ty63*)
@@ -7008,11 +7556,11 @@ val _ = Define `
((set_Mcause_Cause:((regstate),(register_value),(Mcause))register_ref ->(63)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec r.Mcause_Mcause_chunk_0 (( 62 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 62 : int):ii) (( 0 : int):ii) : 63 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7020,11 +7568,11 @@ val _ = Define `
val _ = Define `
((update_Mcause_Cause:Mcause ->(63)words$word -> Mcause) v x=
- ((v with<|
+ (( v with<|
Mcause_Mcause_chunk_0 :=
((update_subrange_vec_dec v.Mcause_Mcause_chunk_0 (( 62 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 62 : int):ii) (( 0 : int):ii) : 63 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val tvec_addr : Mtvec -> Mcause -> maybe (mword ty64)*)
@@ -7032,13 +7580,11 @@ val _ = Define `
val _ = Define `
((tvec_addr:Mtvec -> Mcause ->((64)words$word)option) (m : Mtvec) (c : Mcause)=
(let (base : xlenbits) =
- ((concat_vec ((get_Mtvec_Base m : 62 words$word)) (vec_of_bits [B0;B0] : 2 words$word)
- : 64 words$word)) in
+ ((concat_vec ((get_Mtvec_Base m : 62 words$word)) (0b00w : 2 words$word) : 64 words$word)) in
(case ((trapVectorMode_of_bits ((get_Mtvec_Mode m : 2 words$word)))) of
TV_Direct => SOME base
| TV_Vector =>
- if (((((get_Mcause_IsInterrupt c : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Mcause_IsInterrupt c : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME ((add_vec base
((shiftl ((EXTZ (( 64 : int):ii) ((get_Mcause_Cause c : 63 words$word)) : 64 words$word))
(( 2 : int):ii)
@@ -7053,14 +7599,11 @@ val _ = Define `
val _ = Define `
((legalize_xepc:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v= (sail2_state_monad$bindS
- (sail2_state$or_boolS (sail2_state_monad$returnS ((sys_enable_writable_misa () )))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((((sys_enable_writable_misa () )) /\ ((sys_enable_rvc () ))))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
- sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))) (\ (w__1 :
- bool) .
+ sail2_state_monad$returnS (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word))))))) (\ (w__1 : bool) .
sail2_state_monad$returnS (if w__1 then (update_vec_dec v (( 0 : int):ii) B0 : 64 words$word)
- else
- (and_vec v ((EXTS (( 64 : int):ii) (vec_of_bits [B1;B0;B0] : 3 words$word) : 64 words$word))
- : 64 words$word)))))`;
+ else (and_vec v ((EXTS (( 64 : int):ii) (0b100w : 3 words$word) : 64 words$word)) : 64 words$word)))))`;
(*val pc_alignment_mask : unit -> M (mword ty64)*)
@@ -7070,10 +7613,9 @@ val _ = Define `
(sail2_state_monad$read_regS misa_ref) (\ (w__0 : Misa) .
sail2_state_monad$returnS ((not_vec
((EXTZ (( 64 : int):ii)
- (if (((((get_Misa_C w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- (vec_of_bits [B0;B0] : 2 words$word)
- else (vec_of_bits [B1;B0] : 2 words$word))
+ (if (((((get_Misa_C w__0 : 1 words$word)) = (0b1w : 1 words$word)))) then
+ (0b00w : 2 words$word)
+ else (0b10w : 2 words$word))
: 64 words$word))
: 64 words$word)))))`;
@@ -7085,36 +7627,30 @@ val _ = Define `
(<| Counteren_Counteren_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Counteren_bits : Counteren -> mword ty32*)
-
val _ = Define `
((get_Counteren_bits:Counteren ->(32)words$word) v=
((subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Counteren_bits : register_ref regstate register_value Counteren -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Counteren_bits:((regstate),(register_value),(Counteren))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Counteren_bits : Counteren -> mword ty32 -> Counteren*)
-
val _ = Define `
((update_Counteren_bits:Counteren ->(32)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_HPM : Counteren -> mword ty29*)
@@ -7130,11 +7666,11 @@ val _ = Define `
((set_Counteren_HPM:((regstate),(register_value),(Counteren))register_ref ->(29)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 28 : int):ii) (( 0 : int):ii) : 29 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7142,11 +7678,11 @@ val _ = Define `
val _ = Define `
((update_Counteren_HPM:Counteren ->(29)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 31 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 28 : int):ii) (( 0 : int):ii) : 29 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_IR : Counteren -> mword ty1*)
@@ -7162,11 +7698,11 @@ val _ = Define `
((set_Counteren_IR:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7174,12 +7710,18 @@ val _ = Define `
val _ = Define `
((update_Counteren_IR:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+
+(*val _update_Counterin_IR : Counterin -> mword ty1 -> Counterin*)
+
+(*val _get_Counterin_IR : Counterin -> mword ty1*)
+(*val _set_Counterin_IR : register_ref regstate register_value Counterin -> mword ty1 -> M unit*)
(*val _get_Counteren_TM : Counteren -> mword ty1*)
@@ -7194,11 +7736,11 @@ val _ = Define `
((set_Counteren_TM:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7206,11 +7748,11 @@ val _ = Define `
val _ = Define `
((update_Counteren_TM:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_Counteren_CY : Counteren -> mword ty1*)
@@ -7226,11 +7768,11 @@ val _ = Define `
((set_Counteren_CY:((regstate),(register_value),(Counteren))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec r.Counteren_Counteren_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -7238,29 +7780,128 @@ val _ = Define `
val _ = Define `
((update_Counteren_CY:Counteren ->(1)words$word -> Counteren) v x=
- ((v with<|
+ (( v with<|
Counteren_Counteren_chunk_0 :=
((update_subrange_vec_dec v.Counteren_Counteren_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_Counterin_CY : Counterin -> mword ty1 -> Counterin*)
+
+(*val _get_Counterin_CY : Counterin -> mword ty1*)
+
+(*val _set_Counterin_CY : register_ref regstate register_value Counterin -> mword ty1 -> M unit*)
+
(*val legalize_mcounteren : Counteren -> mword ty64 -> Counteren*)
val _ = Define `
((legalize_mcounteren:Counteren ->(64)words$word -> Counteren) (c : Counteren) (v : xlenbits)=
- (let c = (update_Counteren_IR c ((cast_unit_vec0 ((access_vec_dec v (( 2 : int):ii))) : 1 words$word))) in
- let c = (update_Counteren_TM c ((cast_unit_vec0 ((access_vec_dec v (( 1 : int):ii))) : 1 words$word))) in
- update_Counteren_CY c ((cast_unit_vec0 ((access_vec_dec v (( 0 : int):ii))) : 1 words$word))))`;
+ (let c = (update_Counteren_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ let c = (update_Counteren_TM c (vec_of_bits [access_vec_dec v (( 1 : int):ii)] : 1 words$word)) in
+ update_Counteren_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
(*val legalize_scounteren : Counteren -> mword ty64 -> Counteren*)
val _ = Define `
((legalize_scounteren:Counteren ->(64)words$word -> Counteren) (c : Counteren) (v : xlenbits)=
- (let c = (update_Counteren_IR c ((cast_unit_vec0 ((access_vec_dec v (( 2 : int):ii))) : 1 words$word))) in
- let c = (update_Counteren_TM c ((cast_unit_vec0 ((access_vec_dec v (( 1 : int):ii))) : 1 words$word))) in
- update_Counteren_CY c ((cast_unit_vec0 ((access_vec_dec v (( 0 : int):ii))) : 1 words$word))))`;
+ (let c = (update_Counteren_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ let c = (update_Counteren_TM c (vec_of_bits [access_vec_dec v (( 1 : int):ii)] : 1 words$word)) in
+ update_Counteren_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
+
+
+(*val Mk_Counterin : mword ty32 -> Counterin*)
+
+val _ = Define `
+ ((Mk_Counterin:(32)words$word -> Counterin) v=
+ (<| Counterin_Counterin_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+
+
+val _ = Define `
+ ((get_Counterin_bits:Counterin ->(32)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_bits:((regstate),(register_value),(Counterin))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_bits:Counterin ->(32)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_Counterin_IR:Counterin ->(1)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_IR:((regstate),(register_value),(Counterin))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_IR:Counterin ->(1)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_Counterin_CY:Counterin ->(1)words$word) v=
+ ((subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+
+
+val _ = Define `
+ ((set_Counterin_CY:((regstate),(register_value),(Counterin))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec r.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Counterin_CY:Counterin ->(1)words$word -> Counterin) v x=
+ (( v with<|
+ Counterin_Counterin_chunk_0 :=
+ ((update_subrange_vec_dec v.Counterin_Counterin_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val legalize_mcountinhibit : Counterin -> mword ty64 -> Counterin*)
+
+val _ = Define `
+ ((legalize_mcountinhibit:Counterin ->(64)words$word -> Counterin) (c : Counterin) (v : xlenbits)=
+ (let c = (update_Counterin_IR c (vec_of_bits [access_vec_dec v (( 2 : int):ii)] : 1 words$word)) in
+ update_Counterin_CY c (vec_of_bits [access_vec_dec v (( 0 : int):ii)] : 1 words$word)))`;
(*val retire_instruction : unit -> M unit*)
@@ -7270,8 +7911,11 @@ val _ = Define `
(sail2_state_monad$read_regS minstret_written_ref) (\ (w__0 : bool) .
if (((w__0 = T))) then sail2_state_monad$write_regS minstret_written_ref F
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
- sail2_state_monad$write_regS minstret_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word))))))`;
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__1 : Counterin) .
+ if (((((get_Counterin_IR w__1 : 1 words$word)) = (0b0w : 1 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ sail2_state_monad$write_regS minstret_ref ((add_vec_int w__2 (( 1 : int):ii) : 64 words$word)))
+ else sail2_state_monad$returnS () ))))`;
(*val Mk_Sstatus : mword ty64 -> Sstatus*)
@@ -7281,35 +7925,29 @@ val _ = Define `
(<| Sstatus_Sstatus_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Sstatus_bits : Sstatus -> mword ty64*)
-
val _ = Define `
((get_Sstatus_bits:Sstatus ->(64)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Sstatus_bits : register_ref regstate register_value Sstatus -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Sstatus_bits:((regstate),(register_value),(Sstatus))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_bits : Sstatus -> mword ty64 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_bits:Sstatus ->(64)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7320,21 +7958,21 @@ val _ = Define `
((set_Sstatus_SD:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SD:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 63 : int):ii) (( 63 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7345,21 +7983,21 @@ val _ = Define `
((set_Sstatus_MXR:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_MXR:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 19 : int):ii) (( 19 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7370,21 +8008,21 @@ val _ = Define `
((set_Sstatus_SUM:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SUM:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 18 : int):ii) (( 18 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7395,21 +8033,21 @@ val _ = Define `
((set_Sstatus_XS:((regstate),(register_value),(Sstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_XS:Sstatus ->(2)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 16 : int):ii) (( 15 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7420,21 +8058,21 @@ val _ = Define `
((set_Sstatus_FS:((regstate),(register_value),(Sstatus))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_FS:Sstatus ->(2)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 14 : int):ii) (( 13 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7445,21 +8083,21 @@ val _ = Define `
((set_Sstatus_SPP:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SPP:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7470,52 +8108,46 @@ val _ = Define `
((set_Sstatus_SPIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SPIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_Sstatus_UPIE : Sstatus -> mword ty1*)
val _ = Define `
((get_Sstatus_UPIE:Sstatus ->(1)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val _set_Sstatus_UPIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sstatus_UPIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_UPIE : Sstatus -> mword ty1 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_UPIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7526,52 +8158,46 @@ val _ = Define `
((set_Sstatus_SIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sstatus_SIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_Sstatus_UIE : Sstatus -> mword ty1*)
val _ = Define `
((get_Sstatus_UIE:Sstatus ->(1)words$word) v= ((subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Sstatus_UIE : register_ref regstate register_value Sstatus -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sstatus_UIE:((regstate),(register_value),(Sstatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec r.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sstatus_UIE : Sstatus -> mword ty1 -> Sstatus*)
-
val _ = Define `
((update_Sstatus_UIE:Sstatus ->(1)words$word -> Sstatus) v x=
- ((v with<|
+ (( v with<|
Sstatus_Sstatus_chunk_0 :=
((update_subrange_vec_dec v.Sstatus_Sstatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val get_sstatus_UXL : Sstatus -> mword ty2*)
@@ -7595,7 +8221,7 @@ val _ = Define `
val _ = Define `
((lower_mstatus:Mstatus -> Sstatus) m=
- (let s = (Mk_Sstatus ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
+ (let s = (Mk_Sstatus ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
let s = (update_Sstatus_SD s ((get_Mstatus_SD m : 1 words$word))) in
let s = (set_sstatus_UXL s ((get_mstatus_UXL m : 2 words$word))) in
let s = (update_Sstatus_MXR s ((get_Mstatus_MXR m : 1 words$word))) in
@@ -7619,10 +8245,10 @@ val _ = Define `
let m = (update_Mstatus_FS m ((get_Sstatus_FS s : 2 words$word))) in sail2_state_monad$bindS
(sail2_state$or_boolS
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_FS m : 2 words$word))) (\ (w__0 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__0 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))
+ sail2_state_monad$returnS (((w__0 = Dirty)))))
( sail2_state_monad$bindS(extStatus_of_bits ((get_Mstatus_XS m : 2 words$word))) (\ (w__1 : ExtStatus) .
- sail2_state_monad$returnS (((((extStatus_to_bits w__1 : 2 words$word)) = ((extStatus_to_bits Dirty : 2 words$word)))))))) (\ (w__2 : bool) .
- let m = (update_Mstatus_SD m ((bool_to_bits w__2 : 1 words$word))) in
+ sail2_state_monad$returnS (((w__1 = Dirty)))))) (\ dirty .
+ let m = (update_Mstatus_SD m ((bool_to_bits dirty : 1 words$word))) in
let m = (update_Mstatus_SPP m ((get_Sstatus_SPP s : 1 words$word))) in
let m = (update_Mstatus_SPIE m ((get_Sstatus_SPIE s : 1 words$word))) in
let m = (update_Mstatus_UPIE m ((get_Sstatus_UPIE s : 1 words$word))) in
@@ -7634,7 +8260,9 @@ val _ = Define `
(*val legalize_sstatus : Mstatus -> mword ty64 -> M Mstatus*)
val _ = Define `
- ((legalize_sstatus:Mstatus ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)= (lift_sstatus m ((Mk_Sstatus v))))`;
+ ((legalize_sstatus:Mstatus ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)= (sail2_state_monad$bindS
+ (lift_sstatus m ((Mk_Sstatus v))) (\ (w__0 : Mstatus) .
+ legalize_mstatus m ((get_Mstatus_bits w__0 : 64 words$word)))))`;
(*val Mk_Sedeleg : mword ty64 -> Sedeleg*)
@@ -7644,35 +8272,29 @@ val _ = Define `
(<| Sedeleg_Sedeleg_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Sedeleg_bits : Sedeleg -> mword ty64*)
-
val _ = Define `
((get_Sedeleg_bits:Sedeleg ->(64)words$word) v= ((subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Sedeleg_bits : register_ref regstate register_value Sedeleg -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Sedeleg_bits:((regstate),(register_value),(Sedeleg))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sedeleg_bits : Sedeleg -> mword ty64 -> Sedeleg*)
-
val _ = Define `
((update_Sedeleg_bits:Sedeleg ->(64)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7684,21 +8306,21 @@ val _ = Define `
((set_Sedeleg_UEnvCall:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_UEnvCall:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7710,21 +8332,21 @@ val _ = Define `
((set_Sedeleg_SAMO_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_SAMO_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7736,21 +8358,21 @@ val _ = Define `
((set_Sedeleg_SAMO_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_SAMO_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7762,21 +8384,21 @@ val _ = Define `
((set_Sedeleg_Load_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Load_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7788,21 +8410,21 @@ val _ = Define `
((set_Sedeleg_Load_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Load_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7814,21 +8436,21 @@ val _ = Define `
((set_Sedeleg_Breakpoint:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Breakpoint:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7840,21 +8462,21 @@ val _ = Define `
((set_Sedeleg_Illegal_Instr:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Illegal_Instr:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7866,21 +8488,21 @@ val _ = Define `
((set_Sedeleg_Fetch_Access_Fault:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Fetch_Access_Fault:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7892,21 +8514,21 @@ val _ = Define `
((set_Sedeleg_Fetch_Addr_Align:((regstate),(register_value),(Sedeleg))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec r.Sedeleg_Sedeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sedeleg_Fetch_Addr_Align:Sedeleg ->(1)words$word -> Sedeleg) v x=
- ((v with<|
+ (( v with<|
Sedeleg_Sedeleg_chunk_0 :=
((update_subrange_vec_dec v.Sedeleg_Sedeleg_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val legalize_sedeleg : Sedeleg -> mword ty64 -> Sedeleg*)
@@ -7923,36 +8545,30 @@ val _ = Define `
(<| Sinterrupts_Sinterrupts_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Sinterrupts_bits : Sinterrupts -> mword ty64*)
-
val _ = Define `
((get_Sinterrupts_bits:Sinterrupts ->(64)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Sinterrupts_bits : register_ref regstate register_value Sinterrupts -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_bits:((regstate),(register_value),(Sinterrupts))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_bits : Sinterrupts -> mword ty64 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_bits:Sinterrupts ->(64)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -7964,53 +8580,47 @@ val _ = Define `
((set_Sinterrupts_SEI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_SEI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 9 : int):ii) (( 9 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_Sinterrupts_UEI : Sinterrupts -> mword ty1*)
-
val _ = Define `
((get_Sinterrupts_UEI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_UEI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_UEI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_UEI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_UEI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -8022,53 +8632,47 @@ val _ = Define `
((set_Sinterrupts_STI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_STI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_Sinterrupts_UTI : Sinterrupts -> mword ty1*)
val _ = Define `
((get_Sinterrupts_UTI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_UTI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_UTI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_UTI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_UTI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -8080,61 +8684,54 @@ val _ = Define `
((set_Sinterrupts_SSI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Sinterrupts_SSI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_Sinterrupts_USI : Sinterrupts -> mword ty1*)
val _ = Define `
((get_Sinterrupts_USI:Sinterrupts ->(1)words$word) v=
((subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Sinterrupts_USI : register_ref regstate register_value Sinterrupts -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Sinterrupts_USI:((regstate),(register_value),(Sinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec r.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Sinterrupts_USI : Sinterrupts -> mword ty1 -> Sinterrupts*)
-
val _ = Define `
((update_Sinterrupts_USI:Sinterrupts ->(1)words$word -> Sinterrupts) v x=
- ((v with<|
+ (( v with<|
Sinterrupts_Sinterrupts_chunk_0 :=
((update_subrange_vec_dec v.Sinterrupts_Sinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val lower_mip : Minterrupts -> Minterrupts -> Sinterrupts*)
val _ = Define `
((lower_mip:Minterrupts -> Minterrupts -> Sinterrupts) (m : Minterrupts) (d : Minterrupts)=
- (let (s : Sinterrupts) =
- (Mk_Sinterrupts ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
+ (let (s : Sinterrupts) = (Mk_Sinterrupts ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
let s =
(update_Sinterrupts_SEI s
((and_vec ((get_Minterrupts_SEI m : 1 words$word)) ((get_Minterrupts_SEI d : 1 words$word))
@@ -8164,8 +8761,7 @@ val _ = Define `
val _ = Define `
((lower_mie:Minterrupts -> Minterrupts -> Sinterrupts) (m : Minterrupts) (d : Minterrupts)=
- (let (s : Sinterrupts) =
- (Mk_Sinterrupts ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
+ (let (s : Sinterrupts) = (Mk_Sinterrupts ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
let s =
(update_Sinterrupts_SEI s
((and_vec ((get_Minterrupts_SEI m : 1 words$word)) ((get_Minterrupts_SEI d : 1 words$word))
@@ -8197,17 +8793,16 @@ val _ = Define `
((lift_sip:Minterrupts -> Minterrupts -> Sinterrupts ->(regstate)sail2_state_monad$sequential_state ->(((Minterrupts),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Minterrupts) (d : Minterrupts) (s : Sinterrupts)=
(let (m : Minterrupts) = o1 in
let m =
- (update_Minterrupts_SSI m
- ((and_vec ((get_Sinterrupts_SSI s : 1 words$word)) ((get_Minterrupts_SSI d : 1 words$word))
- : 1 words$word))) in sail2_state_monad$bindS
+ (if (((((get_Minterrupts_SSI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Minterrupts_SSI m ((get_Sinterrupts_SSI s : 1 words$word))
+ else m) in sail2_state_monad$bindS
(haveNExt () ) (\ (w__0 : bool) .
sail2_state_monad$returnS (if w__0 then
let m =
- (if (((((get_Minterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UEI m ((get_Sinterrupts_UEI s : 1 words$word))
else m) in
- if (((((get_Minterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_USI m ((get_Sinterrupts_USI s : 1 words$word))
else m
else m))))`;
@@ -8226,29 +8821,28 @@ val _ = Define `
((lift_sie:Minterrupts -> Minterrupts -> Sinterrupts ->(regstate)sail2_state_monad$sequential_state ->(((Minterrupts),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (o1 : Minterrupts) (d : Minterrupts) (s : Sinterrupts)=
(let (m : Minterrupts) = o1 in
let m =
- (if (((((get_Minterrupts_SEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_SEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_SEI m ((get_Sinterrupts_SEI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_STI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_STI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_STI m ((get_Sinterrupts_STI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_SSI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_SSI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_SSI m ((get_Sinterrupts_SSI s : 1 words$word))
else m) in sail2_state_monad$bindS
(haveNExt () ) (\ (w__0 : bool) .
sail2_state_monad$returnS (if w__0 then
let m =
- (if (((((get_Minterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UEI m ((get_Sinterrupts_UEI s : 1 words$word))
else m) in
let m =
- (if (((((get_Minterrupts_UTI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
+ (if (((((get_Minterrupts_UTI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_UTI m ((get_Sinterrupts_UTI s : 1 words$word))
else m) in
- if (((((get_Minterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
update_Minterrupts_USI m ((get_Sinterrupts_USI s : 1 words$word))
else m
else m))))`;
@@ -8267,66 +8861,54 @@ val _ = Define `
((Mk_Satp64:(64)words$word -> Satp64) v= (<| Satp64_Satp64_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_Satp64_bits : Satp64 -> mword ty64*)
-
val _ = Define `
((get_Satp64_bits:Satp64 ->(64)words$word) v= ((subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_Satp64_bits : register_ref regstate register_value Satp64 -> mword ty64 -> M unit*)
-
val _ = Define `
((set_Satp64_bits:((regstate),(register_value),(Satp64))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp64_bits : Satp64 -> mword ty64 -> Satp64*)
-
val _ = Define `
((update_Satp64_bits:Satp64 ->(64)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_Satp64_Mode : Satp64 -> mword ty4*)
val _ = Define `
((get_Satp64_Mode:Satp64 ->(4)words$word) v= ((subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii) : 4 words$word)))`;
-(*val _set_Satp64_Mode : register_ref regstate register_value Satp64 -> mword ty4 -> M unit*)
-
val _ = Define `
((set_Satp64_Mode:((regstate),(register_value),(Satp64))register_ref ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii)
((subrange_vec_dec v (( 3 : int):ii) (( 0 : int):ii) : 4 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp64_Mode : Satp64 -> mword ty4 -> Satp64*)
-
val _ = Define `
((update_Satp64_Mode:Satp64 ->(4)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 63 : int):ii) (( 60 : int):ii)
((subrange_vec_dec x (( 3 : int):ii) (( 0 : int):ii) : 4 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_Satp64_Asid : Satp64 -> mword ty16*)
@@ -8341,11 +8923,11 @@ val _ = Define `
((set_Satp64_Asid:((regstate),(register_value),(Satp64))register_ref ->(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 59 : int):ii) (( 44 : int):ii)
((subrange_vec_dec v (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -8353,11 +8935,11 @@ val _ = Define `
val _ = Define `
((update_Satp64_Asid:Satp64 ->(16)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 59 : int):ii) (( 44 : int):ii)
((subrange_vec_dec x (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Satp32_Asid : Satp32 -> mword ty9 -> Satp32*)
@@ -8378,11 +8960,11 @@ val _ = Define `
((set_Satp64_PPN:((regstate),(register_value),(Satp64))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec r.Satp64_Satp64_chunk_0 (( 43 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -8390,11 +8972,11 @@ val _ = Define `
val _ = Define `
((update_Satp64_PPN:Satp64 ->(44)words$word -> Satp64) v x=
- ((v with<|
+ (( v with<|
Satp64_Satp64_chunk_0 :=
((update_subrange_vec_dec v.Satp64_Satp64_chunk_0 (( 43 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _update_Satp32_PPN : Satp32 -> mword ty22 -> Satp32*)
@@ -8421,35 +9003,29 @@ val _ = Define `
((Mk_Satp32:(32)words$word -> Satp32) v= (<| Satp32_Satp32_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_Satp32_bits : Satp32 -> mword ty32*)
-
val _ = Define `
((get_Satp32_bits:Satp32 ->(32)words$word) v= ((subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_Satp32_bits : register_ref regstate register_value Satp32 -> mword ty32 -> M unit*)
-
val _ = Define `
((set_Satp32_bits:((regstate),(register_value),(Satp32))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Satp32_bits : Satp32 -> mword ty32 -> Satp32*)
-
val _ = Define `
((update_Satp32_bits:Satp32 ->(32)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8460,21 +9036,21 @@ val _ = Define `
((set_Satp32_Mode:((regstate),(register_value),(Satp32))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_Mode:Satp32 ->(1)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 31 : int):ii) (( 31 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8485,21 +9061,21 @@ val _ = Define `
((set_Satp32_Asid:((regstate),(register_value),(Satp32))register_ref ->(9)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 30 : int):ii) (( 22 : int):ii)
((subrange_vec_dec v (( 8 : int):ii) (( 0 : int):ii) : 9 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_Asid:Satp32 ->(9)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 30 : int):ii) (( 22 : int):ii)
((subrange_vec_dec x (( 8 : int):ii) (( 0 : int):ii) : 9 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
val _ = Define `
@@ -8510,21 +9086,21 @@ val _ = Define `
((set_Satp32_PPN:((regstate),(register_value),(Satp32))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec r.Satp32_Satp32_chunk_0 (( 21 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Satp32_PPN:Satp32 ->(22)words$word -> Satp32) v x=
- ((v with<|
+ (( v with<|
Satp32_Satp32_chunk_0 :=
((update_subrange_vec_dec v.Satp32_Satp32_chunk_0 (( 21 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val legalize_satp32 : Architecture -> mword ty32 -> mword ty32 -> mword ty32*)
@@ -8537,10 +9113,10 @@ val _ = Define `
val _ = Define `
((PmpAddrMatchType_of_num:int -> PmpAddrMatchType) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then OFF
- else if (((p0_ = (( 1 : int):ii)))) then TOR
- else if (((p0_ = (( 2 : int):ii)))) then NA4
+ (let l__82 = arg_ in
+ if (((l__82 = (( 0 : int):ii)))) then OFF
+ else if (((l__82 = (( 1 : int):ii)))) then TOR
+ else if (((l__82 = (( 2 : int):ii)))) then NA4
else NAPOT))`;
@@ -8556,10 +9132,10 @@ val _ = Define `
val _ = Define `
((pmpAddrMatchType_of_bits:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((PmpAddrMatchType),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bs=
(let b__0 = bs in
- if (((b__0 = (vec_of_bits [B0;B0] : 2 words$word)))) then sail2_state_monad$returnS OFF
- else if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS TOR
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS NA4
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS NAPOT
+ if (((b__0 = (0b00w : 2 words$word)))) then sail2_state_monad$returnS OFF
+ else if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS TOR
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS NA4
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS NAPOT
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 7:2 - 12:3") (sail2_state_monad$exitS () )))`;
@@ -8568,10 +9144,10 @@ val _ = Define `
val _ = Define `
((pmpAddrMatchType_to_bits:PmpAddrMatchType ->(2)words$word) bs=
((case bs of
- OFF => (vec_of_bits [B0;B0] : 2 words$word)
- | TOR => (vec_of_bits [B0;B1] : 2 words$word)
- | NA4 => (vec_of_bits [B1;B0] : 2 words$word)
- | NAPOT => (vec_of_bits [B1;B1] : 2 words$word)
+ OFF => (0b00w : 2 words$word)
+ | TOR => (0b01w : 2 words$word)
+ | NA4 => (0b10w : 2 words$word)
+ | NAPOT => (0b11w : 2 words$word)
)))`;
@@ -8582,36 +9158,30 @@ val _ = Define `
(<| Pmpcfg_ent_Pmpcfg_ent_chunk_0 := ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) |>))`;
-(*val _get_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8*)
-
val _ = Define `
((get_Pmpcfg_ent_bits:Pmpcfg_ent ->(8)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_Pmpcfg_ent_bits : register_ref regstate register_value Pmpcfg_ent -> mword ty8 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_bits:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_bits : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_bits:Pmpcfg_ent ->(8)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -8623,157 +9193,133 @@ val _ = Define `
((set_Pmpcfg_ent_L:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_Pmpcfg_ent_L:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
-
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2*)
val _ = Define `
((get_Pmpcfg_ent_A:Pmpcfg_ent ->(2)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)))`;
-(*val _set_Pmpcfg_ent_A : register_ref regstate register_value Pmpcfg_ent -> mword ty2 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_A:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_A : Pmpcfg_ent -> mword ty2 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_A:Pmpcfg_ent ->(2)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 4 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 8 words$word))|>)))`;
-
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1*)
val _ = Define `
((get_Pmpcfg_ent_X:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_X : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_X:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_X : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_X:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1*)
-
val _ = Define `
((get_Pmpcfg_ent_W:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_W : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_W:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_W : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_W:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val _get_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1*)
-
val _ = Define `
((get_Pmpcfg_ent_R:Pmpcfg_ent ->(1)words$word) v=
((subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _set_Pmpcfg_ent_R : register_ref regstate register_value Pmpcfg_ent -> mword ty1 -> M unit*)
-
val _ = Define `
((set_Pmpcfg_ent_R:((regstate),(register_value),(Pmpcfg_ent))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec r.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_Pmpcfg_ent_R : Pmpcfg_ent -> mword ty1 -> Pmpcfg_ent*)
-
val _ = Define `
((update_Pmpcfg_ent_R:Pmpcfg_ent ->(1)words$word -> Pmpcfg_ent) v x=
- ((v with<|
+ (( v with<|
Pmpcfg_ent_Pmpcfg_ent_chunk_0 :=
((update_subrange_vec_dec v.Pmpcfg_ent_Pmpcfg_ent_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
(*val pmpReadCfgReg : integer -> M (mword ty64)*)
val _ = Define `
((pmpReadCfgReg:int ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) n=
- (let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$bindS
+ (let l__80 = n in
+ if (((l__80 = (( 0 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__1 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__2 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8797,7 +9343,7 @@ val _ = Define `
: 48 words$word))
: 56 words$word))
: 64 words$word))))))))))
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$bindS
+ else if (((l__80 = (( 2 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__8 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__9 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS
@@ -8824,20 +9370,36 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 75:2 - 85:8") (sail2_state_monad$exitS () )))`;
+(*val pmpLocked : Pmpcfg_ent -> bool*)
+
+val _ = Define `
+ ((pmpLocked:Pmpcfg_ent -> bool) cfg= (((get_Pmpcfg_ent_L cfg : 1 words$word)) = (0b1w : 1 words$word)))`;
+
+
+(*val pmpTORLocked : Pmpcfg_ent -> M bool*)
+
+val _ = Define `
+ ((pmpTORLocked:Pmpcfg_ent ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) cfg=
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = (0b1w : 1 words$word)))))
+ ( sail2_state_monad$bindS(pmpAddrMatchType_of_bits ((get_Pmpcfg_ent_A cfg : 2 words$word))) (\ (w__0 :
+ PmpAddrMatchType) .
+ sail2_state_monad$returnS (((w__0 = TOR)))))))`;
+
+
(*val pmpWriteCfg : Pmpcfg_ent -> mword ty8 -> Pmpcfg_ent*)
val _ = Define `
((pmpWriteCfg:Pmpcfg_ent ->(8)words$word -> Pmpcfg_ent) (cfg : Pmpcfg_ent) (v : 8 bits)=
- (if (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then cfg
- else Mk_Pmpcfg_ent v))`;
+ (if ((pmpLocked cfg)) then cfg
+ else Mk_Pmpcfg_ent ((and_vec v (0x9Fw : 8 words$word) : 8 words$word))))`;
(*val pmpWriteCfgReg : integer -> mword ty64 -> M unit*)
val _ = Define `
((pmpWriteCfgReg:int ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) n v=
- (let p0_ = n in
- if (((p0_ = (( 0 : int):ii)))) then sail2_state_monad$bindS
+ (let l__78 = n in
+ if (((l__78 = (( 0 : int):ii)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS pmp0cfg_ref ((pmpWriteCfg w__0 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp1cfg_ref)) (\ (w__1 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
@@ -8854,12 +9416,12 @@ val _ = Define `
(sail2_state_monad$write_regS pmp6cfg_ref ((pmpWriteCfg w__6 ((subrange_vec_dec v (( 55 : int):ii) (( 48 : int):ii) : 8 words$word)))))
(sail2_state_monad$read_regS pmp7cfg_ref)) (\ (w__7 : Pmpcfg_ent) .
sail2_state_monad$write_regS pmp7cfg_ref ((pmpWriteCfg w__7 ((subrange_vec_dec v (( 63 : int):ii) (( 56 : int):ii) : 8 words$word))))))))))))
- else if (((p0_ = (( 2 : int):ii)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__8 : Pmpcfg_ent) .
- let pmp8cfg8 = (pmpWriteCfg w__8 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__9 : Pmpcfg_ent) .
- let pmp9cfg9 = (pmpWriteCfg w__9 ((subrange_vec_dec v (( 15 : int):ii) (( 8 : int):ii) : 8 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if (((l__78 = (( 2 : int):ii)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__8 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmp8cfg_ref ((pmpWriteCfg w__8 ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))))
+ (sail2_state_monad$read_regS pmp9cfg_ref)) (\ (w__9 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmp9cfg_ref ((pmpWriteCfg w__9 ((subrange_vec_dec v (( 15 : int):ii) (( 8 : int):ii) : 8 words$word)))))
+ (sail2_state_monad$read_regS pmp10cfg_ref)) (\ (w__10 : Pmpcfg_ent) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
pmp10cfg_ref
((pmpWriteCfg w__10 ((subrange_vec_dec v (( 23 : int):ii) (( 16 : int):ii) : 8 words$word)))))
@@ -8884,14 +9446,14 @@ val _ = Define `
pmp15cfg_ref
((pmpWriteCfg w__15 ((subrange_vec_dec v (( 63 : int):ii) (( 56 : int):ii) : 8 words$word))))))))))))
else sail2_state_monad$seqS
- (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 94:2 - 137:8") (sail2_state_monad$exitS () )))`;
+ (sail2_state_monad$assert_expS F "Pattern match failure at model/riscv_pmp_regs.sail 101:2 - 144:8") (sail2_state_monad$exitS () )))`;
-(*val pmpWriteAddr : Pmpcfg_ent -> mword ty64 -> mword ty64 -> mword ty64*)
+(*val pmpWriteAddr : bool -> bool -> mword ty64 -> mword ty64 -> mword ty64*)
val _ = Define `
- ((pmpWriteAddr:Pmpcfg_ent ->(64)words$word ->(64)words$word ->(64)words$word) (cfg : Pmpcfg_ent) (reg : xlenbits) (v : xlenbits)=
- (if (((((get_Pmpcfg_ent_L cfg : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then reg
+ ((pmpWriteAddr:bool -> bool ->(64)words$word ->(64)words$word ->(64)words$word) (locked : bool) (tor_locked : bool) (reg : xlenbits) (v : xlenbits)=
+ (if (((locked \/ tor_locked))) then reg
else (EXTZ (( 64 : int):ii) ((subrange_vec_dec v (( 53 : int):ii) (( 0 : int):ii) : 54 words$word)) : 64 words$word)))`;
@@ -8915,28 +9477,25 @@ val _ = Define `
)))))`;
-(*val pmpCheckRWX : Pmpcfg_ent -> AccessType -> bool*)
+(*val pmpCheckRWX : Pmpcfg_ent -> AccessType unit -> bool*)
val _ = Define `
- ((pmpCheckRWX:Pmpcfg_ent -> AccessType -> bool) ent acc=
+ ((pmpCheckRWX:Pmpcfg_ent ->(unit)AccessType -> bool) ent acc=
((case acc of
- Read => (((get_Pmpcfg_ent_R ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
- | Write => (((get_Pmpcfg_ent_W ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
- | ReadWrite =>
- ((((((get_Pmpcfg_ent_R ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_Pmpcfg_ent_W ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- | Execute => (((get_Pmpcfg_ent_X ent : 1 words$word)) = ((bool_to_bits T : 1 words$word)))
+ Read (_) => (((get_Pmpcfg_ent_R ent : 1 words$word)) = (0b1w : 1 words$word))
+ | Write (_) => (((get_Pmpcfg_ent_W ent : 1 words$word)) = (0b1w : 1 words$word))
+ | ReadWrite (_) =>
+ ((((((get_Pmpcfg_ent_R ent : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_Pmpcfg_ent_W ent : 1 words$word)) = (0b1w : 1 words$word)))))
+ | Execute (() ) => (((get_Pmpcfg_ent_X ent : 1 words$word)) = (0b1w : 1 words$word))
)))`;
-(*val pmpCheckPerms : Pmpcfg_ent -> AccessType -> Privilege -> bool*)
+(*val pmpCheckPerms : Pmpcfg_ent -> AccessType unit -> Privilege -> bool*)
val _ = Define `
- ((pmpCheckPerms:Pmpcfg_ent -> AccessType -> Privilege -> bool) ent acc priv=
+ ((pmpCheckPerms:Pmpcfg_ent ->(unit)AccessType -> Privilege -> bool) ent acc priv=
((case priv of
- Machine =>
- if (((((get_Pmpcfg_ent_L ent : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- pmpCheckRWX ent acc
- else T
+ Machine => if ((pmpLocked ent)) then pmpCheckRWX ent acc else T
| _ => pmpCheckRWX ent acc
)))`;
@@ -8945,9 +9504,9 @@ val _ = Define `
val _ = Define `
((pmpAddrMatch_of_num:int -> pmpAddrMatch) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PMP_NoMatch
- else if (((p0_ = (( 1 : int):ii)))) then PMP_PartialMatch
+ (let l__76 = arg_ in
+ if (((l__76 = (( 0 : int):ii)))) then PMP_NoMatch
+ else if (((l__76 = (( 1 : int):ii)))) then PMP_PartialMatch
else PMP_Match))`;
@@ -8966,8 +9525,7 @@ val _ = Define `
NONE => PMP_NoMatch
| SOME ((lo, hi)) =>
if ((zopz0zI_u hi lo)) then PMP_NoMatch
- else if (((((zopz0zI_u ((add_vec addr width : 64 words$word)) lo)) \/ ((zopz0zI_u hi addr)))))
- then
+ else if (((((zopz0zIzJ_u ((add_vec addr width : 64 words$word)) lo)) \/ ((zopz0zIzJ_u hi addr))))) then
PMP_NoMatch
else if (((((zopz0zIzJ_u lo addr)) /\ ((zopz0zIzJ_u ((add_vec addr width : 64 words$word)) hi))))) then
PMP_Match
@@ -8979,9 +9537,9 @@ val _ = Define `
val _ = Define `
((pmpMatch_of_num:int -> pmpMatch) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PMP_Success
- else if (((p0_ = (( 1 : int):ii)))) then PMP_Continue
+ (let l__74 = arg_ in
+ if (((l__74 = (( 0 : int):ii)))) then PMP_Success
+ else if (((l__74 = (( 1 : int):ii)))) then PMP_Continue
else PMP_Fail))`;
@@ -8992,11 +9550,11 @@ val _ = Define `
((case arg_ of PMP_Success => (( 0 : int):ii) | PMP_Continue => (( 1 : int):ii) | PMP_Fail => (( 2 : int):ii) )))`;
-(*val pmpMatchEntry : mword ty64 -> mword ty64 -> AccessType -> Privilege -> Pmpcfg_ent -> mword ty64 -> mword ty64 -> M pmpMatch*)
+(*val pmpMatchEntry : mword ty64 -> mword ty64 -> AccessType unit -> Privilege -> Pmpcfg_ent -> mword ty64 -> mword ty64 -> M pmpMatch*)
val _ = Define `
- ((pmpMatchEntry:(64)words$word ->(64)words$word -> AccessType -> Privilege -> Pmpcfg_ent ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((pmpMatch),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : xlenbits) (acc : AccessType) (priv : Privilege) (ent :
- Pmpcfg_ent) (pmpaddr : xlenbits) (prev_pmpaddr : xlenbits)= (sail2_state_monad$bindS
+ ((pmpMatchEntry:(64)words$word ->(64)words$word ->(ext_access_type)AccessType -> Privilege -> Pmpcfg_ent ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((pmpMatch),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : xlenbits) (acc : ext_access_type AccessType) (priv :
+ Privilege) (ent : Pmpcfg_ent) (pmpaddr : xlenbits) (prev_pmpaddr : xlenbits)= (sail2_state_monad$bindS
(pmpAddrRange ent pmpaddr prev_pmpaddr : ( (( 64 words$word # 64 words$word))option) M) (\ rng .
sail2_state_monad$returnS ((case ((pmpMatchAddr addr width rng)) of
PMP_NoMatch => PMP_Continue
@@ -9005,10 +9563,11 @@ val _ = Define `
)))))`;
-(*val pmpCheck : mword ty64 -> integer -> AccessType -> Privilege -> M (maybe ExceptionType)*)
+(*val pmpCheck : mword ty64 -> integer -> AccessType unit -> Privilege -> M (maybe ExceptionType)*)
val _ = Define `
- ((pmpCheck:(64)words$word -> int -> AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((ExceptionType)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) (acc : AccessType) (priv : Privilege)=
+ ((pmpCheck:(64)words$word -> int ->(ext_access_type)AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((ExceptionType)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) (acc : ext_access_type AccessType) (priv :
+ Privilege)=
(let (width : xlenbits) = ((to_bits (( 64 : int):ii) width : 64 words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__0 : Pmpcfg_ent) . sail2_state_monad$bindS
(sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS
@@ -9182,10 +9741,10 @@ val _ = Define `
sail2_state_monad$returnS (if check' then NONE
else
(case acc of
- Read => SOME E_Load_Access_Fault
- | Write => SOME E_SAMO_Access_Fault
- | ReadWrite => SOME E_SAMO_Access_Fault
- | Execute => SOME E_Fetch_Access_Fault
+ Read (_) => SOME (E_Load_Access_Fault () )
+ | Write (_) => SOME (E_SAMO_Access_Fault () )
+ | ReadWrite (_) => SOME (E_SAMO_Access_Fault () )
+ | Execute (() ) => SOME (E_Fetch_Access_Fault () )
))))))))`;
@@ -9249,13 +9808,50 @@ val _ = Define `
This function is called after above when running rvfi and allows the model
to be initialised differently (e.g. CHERI cap regs are initialised
to omnipotent instead of null).
- *)
+*)
(*val ext_rvfi_init : unit -> M unit*)
val _ = Define `
- ((ext_rvfi_init:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$returnS () ))`;
+ ((ext_rvfi_init:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS x1_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$write_regS x1_ref w__0)))`;
+(*
+THIS(csrno, priv, isWrite) allows an extension to block access to csrno,
+at Privilege level priv. It should return true if the access is allowed.
+*)
+(*val ext_check_CSR : mword ty12 -> Privilege -> bool -> bool*)
+
+val _ = Define `
+ ((ext_check_CSR:(12)words$word -> Privilege -> bool -> bool) csrno p isWrite= T)`;
+
+
+(*
+THIS is called if ext_check_CSR returns false. It should
+cause an appropriate RISCV exception.
+*)
+(*val ext_check_CSR_fail : unit -> unit*)
+
+val _ = Define `
+ ((ext_check_CSR_fail:unit -> unit) () = () )`;
+
+
+(*
+Validate a read from physical memory.
+THIS(access_type, paddr, size, aquire, release, reserved, read_meta) should
+return Some(exception) to abort the read or None to allow it to proceed. The
+check is performed after PMP checks and does not apply to MMIO memory.
+*)
+(*val ext_check_phys_mem_read : AccessType unit -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> Ext_PhysAddr_Check*)
+
+(*
+Validate a write to physical memory.
+THIS(write_kind, paddr, size, data, metadata) should return Some(exception)
+to abort the write or None to allow it to proceed. The check is performed
+after PMP checks and does not apply to MMIO memory.
+*)
+(*val ext_check_phys_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> unit -> Ext_PhysAddr_Check*)
+
(*val ext_fetch_check_pc : mword ty64 -> mword ty64 -> Ext_FetchAddr_Check unit*)
val _ = Define `
@@ -9286,11 +9882,12 @@ val _ = Define `
((ext_handle_control_check_error:unit -> unit) err= () )`;
-(*val ext_data_get_addr : mword ty5 -> mword ty64 -> AccessType -> word_width -> M (Ext_DataAddr_Check unit)*)
+(*val ext_data_get_addr : mword ty5 -> mword ty64 -> AccessType unit -> word_width -> M (Ext_DataAddr_Check unit)*)
val _ = Define `
- ((ext_data_get_addr:(5)words$word ->(64)words$word -> AccessType -> word_width ->(regstate)sail2_state_monad$sequential_state ->((((unit)Ext_DataAddr_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (base : regidx) (offset : xlenbits) (acc : AccessType) (width : word_width)= (sail2_state_monad$bindS
- (rX ((regidx_to_regno base)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ ((ext_data_get_addr:(5)words$word ->(64)words$word ->(ext_access_type)AccessType -> word_width ->(regstate)sail2_state_monad$sequential_state ->((((unit)Ext_DataAddr_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (base : regidx) (offset : xlenbits) (acc : ext_access_type AccessType) (width :
+ word_width)= (sail2_state_monad$bindS
+ (rX_bits base : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let addr = ((add_vec w__0 offset : 64 words$word)) in
sail2_state_monad$returnS (Ext_DataAddr_OK addr))))`;
@@ -9301,1130 +9898,1093 @@ val _ = Define `
((ext_handle_data_check_error:unit -> unit) err= () )`;
-(*val csr_name : mword ty12 -> string*)
+val _ = Define `
+ ((ext_check_phys_mem_read:(unit)AccessType ->(64)words$word -> int -> bool -> bool -> bool -> bool -> Ext_PhysAddr_Check) access_type paddr size1 aquire release reserved read_meta=
+ (Ext_PhysAddr_OK () ))`;
+
val _ = Define `
- ((csr_name:(12)words$word -> string) csr=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "ustatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "uie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "utvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "uscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "uepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "ucause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "utval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "uip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "fflags"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "frm"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "fcsr"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "cycle"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "time"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "instret"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "cycleh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "timeh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "instreth"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "sstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "sedeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "sideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "sie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "stvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- "scounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "sscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "sepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "scause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "stval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "sip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "satp"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- "mvendorid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- "marchid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- "mimpid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- "mhartid"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "misa"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "medeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "mideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "mie"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- "mtvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- "mcounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- "mepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "mcause"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- "mtval"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- "mip"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "pmpcfg0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- "pmpaddr0"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mcycle"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "minstret"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "mcycleh"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- "minstreth"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- "tselect"
- else "UNKNOWN"))`;
-
-
-(*val csr_name_map_forwards : mword ty12 -> M string*)
-
-val _ = Define `
- ((csr_name_map_forwards:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "ustatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "utvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "uepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "ucause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "utval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "uip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "fflags"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "frm"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "fcsr"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "cycle"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "time"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "instret"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "cycleh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "timeh"
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "instreth"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sedeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "sideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sie"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "stvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "scounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "sepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "scause"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "stval"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "sip"
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "satp"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mvendorid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "marchid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mimpid"
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mhartid"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mstatus"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "misa"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "medeleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mideleg"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mie"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mtvec"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcounteren"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mscratch"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mepc"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcause"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "mtval"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mip"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg1"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg2"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpcfg3"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr0"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr1"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr2"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr3"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr4"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr5"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr6"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr7"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr8"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr9"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr10"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr11"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr12"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr13"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr14"
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "pmpaddr15"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcycle"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "minstret"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "mcycleh"
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "minstreth"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "tselect"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata1"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata2"
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS "tdata3"
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+ ((ext_check_phys_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit -> Ext_PhysAddr_Check) write_kind paddr size1 data metadata= (Ext_PhysAddr_OK () ))`;
+
+(*val csr_name_map_forwards : mword ty12 -> string*)
(*val csr_name_map_backwards : string -> M (mword ty12)*)
+(*val csr_name_map_forwards_matches : mword ty12 -> bool*)
+
+(*val csr_name_map_backwards_matches : string -> M bool*)
+
+(*val csr_name_map_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+
+(*val ext_is_CSR_defined : mword ty12 -> Privilege -> M bool*)
+
+(*val ext_read_CSR : mword ty12 -> M (maybe (mword ty64))*)
+
+(*val ext_write_CSR : mword ty12 -> mword ty64 -> M (maybe (mword ty64))*)
+
+(*val Mk_Ustatus : mword ty64 -> Ustatus*)
+
val _ = Define `
- ((csr_name_map_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let p0_ = arg_ in
- if (((p0_ = "ustatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "uie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "utvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "uscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "uepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "ucause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "utval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "uip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "fflags"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "frm"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "fcsr"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "cycle"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "time"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "instret"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "cycleh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "timeh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "instreth"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "sstatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "sedeleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "sideleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "sie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "stvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "scounteren"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "sscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "sepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "scause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "stval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "sip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "satp"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "mvendorid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "marchid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mimpid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mhartid"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "mstatus"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "misa"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "medeleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mideleg"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mie"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "mtvec"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "mcounteren"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "mscratch"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "mepc"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "mcause"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mtval"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "mip"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg0"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpcfg2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpcfg3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr0"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr4"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr5"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr6"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr7"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr8"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr9"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr10"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr11"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr12"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr13"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)
- else if (((p0_ = "pmpaddr14"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)
- else if (((p0_ = "pmpaddr15"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)
- else if (((p0_ = "mcycle"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "minstret"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "mcycleh"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "minstreth"))) then
- sail2_state_monad$returnS (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "tselect"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)
- else if (((p0_ = "tdata1"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)
- else if (((p0_ = "tdata2"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)
- else if (((p0_ = "tdata3"))) then
- sail2_state_monad$returnS (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)
- else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+ ((Mk_Ustatus:(64)words$word -> Ustatus) v=
+ (<| Ustatus_Ustatus_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val csr_name_map_forwards_matches : mword ty12 -> bool*)
+val _ = Define `
+ ((get_Ustatus_bits:Ustatus ->(64)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
+
val _ = Define `
- ((csr_name_map_forwards_matches:(12)words$word -> bool) arg_=
- (let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- T
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- T
- else F))`;
+ ((set_Ustatus_bits:((regstate),(register_value),(Ustatus))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+val _ = Define `
+ ((update_Ustatus_bits:Ustatus ->(64)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
+ : 64 words$word)) |>)))`;
-(*val csr_name_map_backwards_matches : string -> bool*)
val _ = Define `
- ((csr_name_map_backwards_matches:string -> bool) arg_=
- (let p0_ = arg_ in
- if (((p0_ = "ustatus"))) then T
- else if (((p0_ = "uie"))) then T
- else if (((p0_ = "utvec"))) then T
- else if (((p0_ = "uscratch"))) then T
- else if (((p0_ = "uepc"))) then T
- else if (((p0_ = "ucause"))) then T
- else if (((p0_ = "utval"))) then T
- else if (((p0_ = "uip"))) then T
- else if (((p0_ = "fflags"))) then T
- else if (((p0_ = "frm"))) then T
- else if (((p0_ = "fcsr"))) then T
- else if (((p0_ = "cycle"))) then T
- else if (((p0_ = "time"))) then T
- else if (((p0_ = "instret"))) then T
- else if (((p0_ = "cycleh"))) then T
- else if (((p0_ = "timeh"))) then T
- else if (((p0_ = "instreth"))) then T
- else if (((p0_ = "sstatus"))) then T
- else if (((p0_ = "sedeleg"))) then T
- else if (((p0_ = "sideleg"))) then T
- else if (((p0_ = "sie"))) then T
- else if (((p0_ = "stvec"))) then T
- else if (((p0_ = "scounteren"))) then T
- else if (((p0_ = "sscratch"))) then T
- else if (((p0_ = "sepc"))) then T
- else if (((p0_ = "scause"))) then T
- else if (((p0_ = "stval"))) then T
- else if (((p0_ = "sip"))) then T
- else if (((p0_ = "satp"))) then T
- else if (((p0_ = "mvendorid"))) then T
- else if (((p0_ = "marchid"))) then T
- else if (((p0_ = "mimpid"))) then T
- else if (((p0_ = "mhartid"))) then T
- else if (((p0_ = "mstatus"))) then T
- else if (((p0_ = "misa"))) then T
- else if (((p0_ = "medeleg"))) then T
- else if (((p0_ = "mideleg"))) then T
- else if (((p0_ = "mie"))) then T
- else if (((p0_ = "mtvec"))) then T
- else if (((p0_ = "mcounteren"))) then T
- else if (((p0_ = "mscratch"))) then T
- else if (((p0_ = "mepc"))) then T
- else if (((p0_ = "mcause"))) then T
- else if (((p0_ = "mtval"))) then T
- else if (((p0_ = "mip"))) then T
- else if (((p0_ = "pmpcfg0"))) then T
- else if (((p0_ = "pmpcfg1"))) then T
- else if (((p0_ = "pmpcfg2"))) then T
- else if (((p0_ = "pmpcfg3"))) then T
- else if (((p0_ = "pmpaddr0"))) then T
- else if (((p0_ = "pmpaddr1"))) then T
- else if (((p0_ = "pmpaddr2"))) then T
- else if (((p0_ = "pmpaddr3"))) then T
- else if (((p0_ = "pmpaddr4"))) then T
- else if (((p0_ = "pmpaddr5"))) then T
- else if (((p0_ = "pmpaddr6"))) then T
- else if (((p0_ = "pmpaddr7"))) then T
- else if (((p0_ = "pmpaddr8"))) then T
- else if (((p0_ = "pmpaddr9"))) then T
- else if (((p0_ = "pmpaddr10"))) then T
- else if (((p0_ = "pmpaddr11"))) then T
- else if (((p0_ = "pmpaddr12"))) then T
- else if (((p0_ = "pmpaddr13"))) then T
- else if (((p0_ = "pmpaddr14"))) then T
- else if (((p0_ = "pmpaddr15"))) then T
- else if (((p0_ = "mcycle"))) then T
- else if (((p0_ = "minstret"))) then T
- else if (((p0_ = "mcycleh"))) then T
- else if (((p0_ = "minstreth"))) then T
- else if (((p0_ = "tselect"))) then T
- else if (((p0_ = "tdata1"))) then T
- else if (((p0_ = "tdata2"))) then T
- else if (((p0_ = "tdata3"))) then T
- else F))`;
+ ((get_Ustatus_UPIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
-(*val csr_name_map_matches_prefix : string -> maybe ((mword ty12 * ii))*)
+val _ = Define `
+ ((set_Ustatus_UPIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s488_ : string -> maybe string*)
val _ = Define `
- ((s488_:string ->(string)option) s489_0=
- (let s490_0 = s489_0 in
- if ((string_startswith s490_0 "tdata3")) then
- (case ((string_drop s490_0 ((string_length "tdata3")))) of s_ => SOME s_ )
- else NONE))`;
+ ((update_Ustatus_UPIE:Ustatus ->(1)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)))`;
-(*val _s484_ : string -> maybe string*)
+val _ = Define `
+ ((get_Ustatus_UIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+
val _ = Define `
- ((s484_:string ->(string)option) s485_0=
- (let s486_0 = s485_0 in
- if ((string_startswith s486_0 "tdata2")) then
- (case ((string_drop s486_0 ((string_length "tdata2")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_Ustatus_UIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s480_ : string -> maybe string*)
+val _ = Define `
+ ((update_Ustatus_UIE:Ustatus ->(1)words$word -> Ustatus) v x=
+ (( v with<|
+ Ustatus_Ustatus_chunk_0 :=
+ ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)))`;
+
+
+(*val lower_sstatus : Sstatus -> Ustatus*)
val _ = Define `
- ((s480_:string ->(string)option) s481_0=
- (let s482_0 = s481_0 in
- if ((string_startswith s482_0 "tdata1")) then
- (case ((string_drop s482_0 ((string_length "tdata1")))) of s_ => SOME s_ )
- else NONE))`;
+ ((lower_sstatus:Sstatus -> Ustatus) s=
+ (let u = (Mk_Ustatus ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
+ let u = (update_Ustatus_UPIE u ((get_Sstatus_UPIE s : 1 words$word))) in
+ update_Ustatus_UIE u ((get_Sstatus_UIE s : 1 words$word))))`;
-(*val _s476_ : string -> maybe string*)
+(*val lift_ustatus : Sstatus -> Ustatus -> Sstatus*)
val _ = Define `
- ((s476_:string ->(string)option) s477_0=
- (let s478_0 = s477_0 in
- if ((string_startswith s478_0 "tselect")) then
- (case ((string_drop s478_0 ((string_length "tselect")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_ustatus:Sstatus -> Ustatus -> Sstatus) (s : Sstatus) (u : Ustatus)=
+ (let s = (update_Sstatus_UPIE s ((get_Ustatus_UPIE u : 1 words$word))) in
+ update_Sstatus_UIE s ((get_Ustatus_UIE u : 1 words$word))))`;
-(*val _s472_ : string -> maybe string*)
+(*val legalize_ustatus : Mstatus -> mword ty64 -> M Mstatus*)
val _ = Define `
- ((s472_:string ->(string)option) s473_0=
- (let s474_0 = s473_0 in
- if ((string_startswith s474_0 "minstreth")) then
- (case ((string_drop s474_0 ((string_length "minstreth")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_ustatus:Mstatus ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)=
+ (let u = (Mk_Ustatus v) in
+ let s = (lower_mstatus m) in
+ let s = (lift_ustatus s u) in
+ lift_sstatus m s))`;
-(*val _s468_ : string -> maybe string*)
+(*val Mk_Uinterrupts : mword ty64 -> Uinterrupts*)
val _ = Define `
- ((s468_:string ->(string)option) s469_0=
- (let s470_0 = s469_0 in
- if ((string_startswith s470_0 "mcycleh")) then
- (case ((string_drop s470_0 ((string_length "mcycleh")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((Mk_Uinterrupts:(64)words$word -> Uinterrupts) v=
+ (<| Uinterrupts_Uinterrupts_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _s464_ : string -> maybe string*)
+val _ = Define `
+ ((get_Uinterrupts_bits:Uinterrupts ->(64)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
+
val _ = Define `
- ((s464_:string ->(string)option) s465_0=
- (let s466_0 = s465_0 in
- if ((string_startswith s466_0 "minstret")) then
- (case ((string_drop s466_0 ((string_length "minstret")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_Uinterrupts_bits:((regstate),(register_value),(Uinterrupts))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s460_ : string -> maybe string*)
+val _ = Define `
+ ((update_Uinterrupts_bits:Uinterrupts ->(64)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
+ : 64 words$word)) |>)))`;
+
val _ = Define `
- ((s460_:string ->(string)option) s461_0=
- (let s462_0 = s461_0 in
- if ((string_startswith s462_0 "mcycle")) then
- (case ((string_drop s462_0 ((string_length "mcycle")))) of s_ => SOME s_ )
- else NONE))`;
+ ((get_Uinterrupts_UEI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
-(*val _s456_ : string -> maybe string*)
+val _ = Define `
+ ((set_Uinterrupts_UEI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
val _ = Define `
- ((s456_:string ->(string)option) s457_0=
- (let s458_0 = s457_0 in
- if ((string_startswith s458_0 "pmpaddr15")) then
- (case ((string_drop s458_0 ((string_length "pmpaddr15")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((update_Uinterrupts_UEI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)))`;
-(*val _s452_ : string -> maybe string*)
+val _ = Define `
+ ((get_Uinterrupts_UTI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+
val _ = Define `
- ((s452_:string ->(string)option) s453_0=
- (let s454_0 = s453_0 in
- if ((string_startswith s454_0 "pmpaddr14")) then
- (case ((string_drop s454_0 ((string_length "pmpaddr14")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_Uinterrupts_UTI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
-(*val _s448_ : string -> maybe string*)
+val _ = Define `
+ ((update_Uinterrupts_UTI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)))`;
+
val _ = Define `
- ((s448_:string ->(string)option) s449_0=
- (let s450_0 = s449_0 in
- if ((string_startswith s450_0 "pmpaddr13")) then
- (case ((string_drop s450_0 ((string_length "pmpaddr13")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_Uinterrupts_USI:Uinterrupts ->(1)words$word) v=
+ ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
-(*val _s444_ : string -> maybe string*)
+val _ = Define `
+ ((set_Uinterrupts_USI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
val _ = Define `
- ((s444_:string ->(string)option) s445_0=
- (let s446_0 = s445_0 in
- if ((string_startswith s446_0 "pmpaddr12")) then
- (case ((string_drop s446_0 ((string_length "pmpaddr12")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((update_Uinterrupts_USI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
+ (( v with<|
+ Uinterrupts_Uinterrupts_chunk_0 :=
+ ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
+ : 64 words$word)) |>)))`;
-(*val _s440_ : string -> maybe string*)
+(*val lower_sip : Sinterrupts -> Sinterrupts -> Uinterrupts*)
val _ = Define `
- ((s440_:string ->(string)option) s441_0=
- (let s442_0 = s441_0 in
- if ((string_startswith s442_0 "pmpaddr11")) then
- (case ((string_drop s442_0 ((string_length "pmpaddr11")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lower_sip:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
+ (let (u : Uinterrupts) = (Mk_Uinterrupts ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
+ let u =
+ (update_Uinterrupts_UEI u
+ ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
+ : 1 words$word))) in
+ let u =
+ (update_Uinterrupts_UTI u
+ ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
+ : 1 words$word))) in
+ update_Uinterrupts_USI u
+ ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
+ : 1 words$word))))`;
-(*val _s436_ : string -> maybe string*)
+(*val lower_sie : Sinterrupts -> Sinterrupts -> Uinterrupts*)
val _ = Define `
- ((s436_:string ->(string)option) s437_0=
- (let s438_0 = s437_0 in
- if ((string_startswith s438_0 "pmpaddr10")) then
- (case ((string_drop s438_0 ((string_length "pmpaddr10")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lower_sie:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
+ (let (u : Uinterrupts) = (Mk_Uinterrupts ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))) in
+ let u =
+ (update_Uinterrupts_UEI u
+ ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
+ : 1 words$word))) in
+ let u =
+ (update_Uinterrupts_UTI u
+ ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
+ : 1 words$word))) in
+ update_Uinterrupts_USI u
+ ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
+ : 1 words$word))))`;
-(*val _s432_ : string -> maybe string*)
+(*val lift_uip : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
val _ = Define `
- ((s432_:string ->(string)option) s433_0=
- (let s434_0 = s433_0 in
- if ((string_startswith s434_0 "pmpaddr9")) then
- (case ((string_drop s434_0 ((string_length "pmpaddr9")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_uip:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
+ (let (s : Sinterrupts) = o1 in
+ if (((((get_Sinterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
+ else s))`;
-(*val _s428_ : string -> maybe string*)
+(*val legalize_uip : Sinterrupts -> Sinterrupts -> mword ty64 -> Sinterrupts*)
val _ = Define `
- ((s428_:string ->(string)option) s429_0=
- (let s430_0 = s429_0 in
- if ((string_startswith s430_0 "pmpaddr8")) then
- (case ((string_drop s430_0 ((string_length "pmpaddr8")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_uip:Sinterrupts -> Sinterrupts ->(64)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
+ (lift_uip s d ((Mk_Uinterrupts v))))`;
-(*val _s424_ : string -> maybe string*)
+(*val lift_uie : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
val _ = Define `
- ((s424_:string ->(string)option) s425_0=
- (let s426_0 = s425_0 in
- if ((string_startswith s426_0 "pmpaddr7")) then
- (case ((string_drop s426_0 ((string_length "pmpaddr7")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((lift_uie:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
+ (let (s : Sinterrupts) = o1 in
+ let s =
+ (if (((((get_Sinterrupts_UEI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_UEI s ((get_Uinterrupts_UEI u : 1 words$word))
+ else s) in
+ let s =
+ (if (((((get_Sinterrupts_UTI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_UTI s ((get_Uinterrupts_UTI u : 1 words$word))
+ else s) in
+ if (((((get_Sinterrupts_USI d : 1 words$word)) = (0b1w : 1 words$word)))) then
+ update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
+ else s))`;
-(*val _s420_ : string -> maybe string*)
+(*val legalize_uie : Sinterrupts -> Sinterrupts -> mword ty64 -> Sinterrupts*)
val _ = Define `
- ((s420_:string ->(string)option) s421_0=
- (let s422_0 = s421_0 in
- if ((string_startswith s422_0 "pmpaddr6")) then
- (case ((string_drop s422_0 ((string_length "pmpaddr6")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((legalize_uie:Sinterrupts -> Sinterrupts ->(64)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
+ (lift_uie s d ((Mk_Uinterrupts v))))`;
-(*val _s416_ : string -> maybe string*)
+(*val ext_check_xret_priv : Privilege -> bool*)
val _ = Define `
- ((s416_:string ->(string)option) s417_0=
- (let s418_0 = s417_0 in
- if ((string_startswith s418_0 "pmpaddr5")) then
- (case ((string_drop s418_0 ((string_length "pmpaddr5")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((ext_check_xret_priv:Privilege -> bool) p= T)`;
-(*val _s412_ : string -> maybe string*)
+(*val ext_fail_xret_priv : unit -> unit*)
val _ = Define `
- ((s412_:string ->(string)option) s413_0=
- (let s414_0 = s413_0 in
- if ((string_startswith s414_0 "pmpaddr4")) then
- (case ((string_drop s414_0 ((string_length "pmpaddr4")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((ext_fail_xret_priv:unit -> unit) () = () )`;
-(*val _s408_ : string -> maybe string*)
+(*val handle_trap_extension : Privilege -> mword ty64 -> maybe unit -> unit*)
val _ = Define `
- ((s408_:string ->(string)option) s409_0=
- (let s410_0 = s409_0 in
- if ((string_startswith s410_0 "pmpaddr3")) then
- (case ((string_drop s410_0 ((string_length "pmpaddr3")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((handle_trap_extension:Privilege ->(64)words$word ->(unit)option -> unit) (p : Privilege) (pc : xlenbits) (u : unit option)= () )`;
-(*val _s404_ : string -> maybe string*)
+(*val prepare_trap_vector : Privilege -> Mcause -> M (mword ty64)*)
val _ = Define `
- ((s404_:string ->(string)option) s405_0=
- (let s406_0 = s405_0 in
- if ((string_startswith s406_0 "pmpaddr2")) then
- (case ((string_drop s406_0 ((string_length "pmpaddr2")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((prepare_trap_vector:Privilege -> Mcause ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (p : Privilege) (cause : Mcause)= (sail2_state_monad$bindS
+ (case p of
+ Machine => sail2_state_monad$read_regS mtvec_ref
+ | Supervisor => sail2_state_monad$read_regS stvec_ref
+ | User => sail2_state_monad$read_regS utvec_ref
+ ) (\ (tvec : Mtvec) .
+ (case ((tvec_addr tvec cause : ( 64 words$word)option)) of
+ SOME (epc) => sail2_state_monad$returnS epc
+ | NONE => (internal_error "Invalid tvec mode" : ( 64 words$word) M)
+ ))))`;
-(*val _s400_ : string -> maybe string*)
+(*val get_xret_target : Privilege -> M (mword ty64)*)
val _ = Define `
- ((s400_:string ->(string)option) s401_0=
- (let s402_0 = s401_0 in
- if ((string_startswith s402_0 "pmpaddr1")) then
- (case ((string_drop s402_0 ((string_length "pmpaddr1")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
+ ((case p of
+ Machine => (sail2_state_monad$read_regS mepc_ref : ( 64 words$word) M)
+ | Supervisor => (sail2_state_monad$read_regS sepc_ref : ( 64 words$word) M)
+ | User => (sail2_state_monad$read_regS uepc_ref : ( 64 words$word) M)
+ )))`;
-(*val _s396_ : string -> maybe string*)
+(*val set_xret_target : Privilege -> mword ty64 -> M (mword ty64)*)
val _ = Define `
- ((s396_:string ->(string)option) s397_0=
- (let s398_0 = s397_0 in
- if ((string_startswith s398_0 "pmpaddr0")) then
- (case ((string_drop s398_0 ((string_length "pmpaddr0")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((set_xret_target:Privilege ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p value= (sail2_state_monad$bindS
+ (legalize_xepc value : ( 64 words$word) M) (\ target . sail2_state_monad$seqS
+ (case p of
+ Machine => sail2_state_monad$write_regS mepc_ref target
+ | Supervisor => sail2_state_monad$write_regS sepc_ref target
+ | User => sail2_state_monad$write_regS uepc_ref target
+ )
+ (sail2_state_monad$returnS target))))`;
-(*val _s392_ : string -> maybe string*)
+(*val prepare_xret_target : Privilege -> M (mword ty64)*)
val _ = Define `
- ((s392_:string ->(string)option) s393_0=
- (let s394_0 = s393_0 in
- if ((string_startswith s394_0 "pmpcfg3")) then
- (case ((string_drop s394_0 ((string_length "pmpcfg3")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((prepare_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p= ((get_xret_target p : ( 64 words$word) M)))`;
-(*val _s388_ : string -> maybe string*)
+(*val get_mtvec : unit -> M (mword ty64)*)
val _ = Define `
- ((s388_:string ->(string)option) s389_0=
- (let s390_0 = s389_0 in
- if ((string_startswith s390_0 "pmpcfg2")) then
- (case ((string_drop s390_0 ((string_length "pmpcfg2")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_mtvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
-(*val _s384_ : string -> maybe string*)
+(*val get_stvec : unit -> M (mword ty64)*)
val _ = Define `
- ((s384_:string ->(string)option) s385_0=
- (let s386_0 = s385_0 in
- if ((string_startswith s386_0 "pmpcfg1")) then
- (case ((string_drop s386_0 ((string_length "pmpcfg1")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_stvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
-(*val _s380_ : string -> maybe string*)
+(*val get_utvec : unit -> M (mword ty64)*)
val _ = Define `
- ((s380_:string ->(string)option) s381_0=
- (let s382_0 = s381_0 in
- if ((string_startswith s382_0 "pmpcfg0")) then
- (case ((string_drop s382_0 ((string_length "pmpcfg0")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((get_utvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
-(*val _s376_ : string -> maybe string*)
+(*val set_mtvec : mword ty64 -> M (mword ty64)*)
val _ = Define `
- ((s376_:string ->(string)option) s377_0=
- (let s378_0 = s377_0 in
- if ((string_startswith s378_0 "mip")) then
- (case ((string_drop s378_0 ((string_length "mip")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_mtvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mtvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS mtvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
-(*val _s372_ : string -> maybe string*)
+(*val set_stvec : mword ty64 -> M (mword ty64)*)
val _ = Define `
- ((s372_:string ->(string)option) s373_0=
- (let s374_0 = s373_0 in
- if ((string_startswith s374_0 "mtval")) then
- (case ((string_drop s374_0 ((string_length "mtval")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_stvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS stvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS stvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
-(*val _s368_ : string -> maybe string*)
+(*val set_utvec : mword ty64 -> M (mword ty64)*)
val _ = Define `
- ((s368_:string ->(string)option) s369_0=
- (let s370_0 = s369_0 in
- if ((string_startswith s370_0 "mcause")) then
- (case ((string_drop s370_0 ((string_length "mcause")))) of s_ => SOME s_ )
- else NONE))`;
+ ((set_utvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS utvec_ref ((legalize_tvec w__0 value)))
+ (sail2_state_monad$read_regS utvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
-(*val _s364_ : string -> maybe string*)
+(*val update_softfloat_fflags : mword ty5 -> M unit*)
val _ = Define `
- ((s364_:string ->(string)option) s365_0=
- (let s366_0 = s365_0 in
- if ((string_startswith s366_0 "mepc")) then
- (case ((string_drop s366_0 ((string_length "mepc")))) of s_ => SOME s_ )
- else NONE))`;
+ ((update_softfloat_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) flags=
+ (sail2_state_monad$write_regS float_fflags_ref ((zero_extend flags (( 64 : int):ii) : 64 words$word))))`;
-(*val _s360_ : string -> maybe string*)
+(*val riscv_f32Add : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s360_:string ->(string)option) s361_0=
- (let s362_0 = s361_0 in
- if ((string_startswith s362_0 "mscratch")) then
- (case ((string_drop s362_0 ((string_length "mscratch")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32Add:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_add rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s356_ : string -> maybe string*)
+(*val riscv_f32Sub : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s356_:string ->(string)option) s357_0=
- (let s358_0 = s357_0 in
- if ((string_startswith s358_0 "mcounteren")) then
- (case ((string_drop s358_0 ((string_length "mcounteren")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32Sub:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_sub rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s352_ : string -> maybe string*)
+(*val riscv_f32Mul : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s352_:string ->(string)option) s353_0=
- (let s354_0 = s353_0 in
- if ((string_startswith s354_0 "mtvec")) then
- (case ((string_drop s354_0 ((string_length "mtvec")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f32Mul:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_mul rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s348_ : string -> maybe string*)
+(*val riscv_f32Div : mword ty3 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s348_:string ->(string)option) s349_0=
- (let s350_0 = s349_0 in
- if ((string_startswith s350_0 "mie")) then
- (case ((string_drop s350_0 ((string_length "mie")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f32Div:(3)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f32_div rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
-(*val _s344_ : string -> maybe string*)
+(*val riscv_f64Add : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s344_:string ->(string)option) s345_0=
- (let s346_0 = s345_0 in
- if ((string_startswith s346_0 "mideleg")) then
- (case ((string_drop s346_0 ((string_length "mideleg")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Add:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_add rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s340_ : string -> maybe string*)
+(*val riscv_f64Sub : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s340_:string ->(string)option) s341_0=
- (let s342_0 = s341_0 in
- if ((string_startswith s342_0 "medeleg")) then
- (case ((string_drop s342_0 ((string_length "medeleg")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Sub:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_sub rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s336_ : string -> maybe string*)
+(*val riscv_f64Mul : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s336_:string ->(string)option) s337_0=
- (let s338_0 = s337_0 in
- if ((string_startswith s338_0 "misa")) then
- (case ((string_drop s338_0 ((string_length "misa")))) of s_ => SOME s_ )
- else NONE))`;
+ ((riscv_f64Mul:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_mul rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s332_ : string -> maybe string*)
+(*val riscv_f64Div : mword ty3 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
val _ = Define `
- ((s332_:string ->(string)option) s333_0=
- (let s334_0 = s333_0 in
- if ((string_startswith s334_0 "mstatus")) then
- (case ((string_drop s334_0 ((string_length "mstatus")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f64Div:(3)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2=
+ (let (_ : unit) = (softfloat_f64_div rm v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
-(*val _s328_ : string -> maybe string*)
+(*val riscv_f32MulAdd : mword ty3 -> mword ty32 -> mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
val _ = Define `
- ((s328_:string ->(string)option) s329_0=
- (let s330_0 = s329_0 in
- if ((string_startswith s330_0 "mhartid")) then
- (case ((string_drop s330_0 ((string_length "mhartid")))) of
- s_ => SOME s_
- )
- else NONE))`;
+ ((riscv_f32MulAdd:(3)words$word ->(32)words$word ->(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2 v3=
+ (let (_ : unit) = (softfloat_f32_muladd rm v1 v2 v3) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64MulAdd : mword ty3 -> mword ty64 -> mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64MulAdd:(3)words$word ->(64)words$word ->(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v1 v2 v3=
+ (let (_ : unit) = (softfloat_f64_muladd rm v1 v2 v3) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32Sqrt : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Sqrt:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_sqrt rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64Sqrt : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Sqrt:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_sqrt rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToI32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32ToI32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_i32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32ToUi32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32ToUi32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_ui32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_i32ToF32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_i32ToF32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i32_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_ui32ToF32 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_ui32ToF32:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui32_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32ToI64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToI64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_i64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToUi64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToUi64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_ui64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_i64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_i64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_ui64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_ui64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64ToI32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToI32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_i32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64ToUi32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToUi32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_ui32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_i32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_i32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_ui32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_ui32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToI64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64ToI64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_i64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToUi64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64ToUi64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_ui64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_i64ToF64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_i64ToF64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_i64_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_ui64ToF64 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_ui64ToF64:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_ui64_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f32ToF64 : mword ty3 -> mword ty32 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f32ToF64:(3)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f32_to_f64 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64ToF32 : mword ty3 -> mword ty64 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f64ToF32:(3)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rm v=
+ (let (_ : unit) = (softfloat_f64_to_f32 rm v) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Lt : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Lt:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_lt v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Le : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Le:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_le v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f32Eq : mword ty32 -> mword ty32 -> M (mword ty5 * mword ty32)*)
+
+val _ = Define `
+ ((riscv_f32Eq:(32)words$word ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f32_eq v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word),
+ (subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))))`;
+
+
+(*val riscv_f64Lt : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Lt:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_lt v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64Le : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Le:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_le v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val riscv_f64Eq : mword ty64 -> mword ty64 -> M (mword ty5 * mword ty64)*)
+
+val _ = Define `
+ ((riscv_f64Eq:(64)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word#(64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) v1 v2=
+ (let (_ : unit) = (softfloat_f64_eq v1 v2) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_fflags_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS float_result_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word), w__1)))))`;
+
+
+(*val dirty_fd_context : unit -> M unit*)
+
+val _ = Define `
+ ((dirty_fd_context:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS
+ (set_Mstatus_FS mstatus_ref ((extStatus_to_bits Dirty : 2 words$word)))
+ (set_Mstatus_SD mstatus_ref (0b1w : 1 words$word))))`;
+
+
+(*val rF : integer -> M (mword ty64)*)
+
+val _ = Define `
+ ((rF:int ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r=
+ (let l__42 = r in sail2_state_monad$bindS
+ (if (((l__42 = (( 0 : int):ii)))) then (sail2_state_monad$read_regS f0_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 1 : int):ii)))) then (sail2_state_monad$read_regS f1_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 2 : int):ii)))) then (sail2_state_monad$read_regS f2_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 3 : int):ii)))) then (sail2_state_monad$read_regS f3_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 4 : int):ii)))) then (sail2_state_monad$read_regS f4_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 5 : int):ii)))) then (sail2_state_monad$read_regS f5_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 6 : int):ii)))) then (sail2_state_monad$read_regS f6_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 7 : int):ii)))) then (sail2_state_monad$read_regS f7_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 8 : int):ii)))) then (sail2_state_monad$read_regS f8_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 9 : int):ii)))) then (sail2_state_monad$read_regS f9_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 10 : int):ii)))) then (sail2_state_monad$read_regS f10_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 11 : int):ii)))) then (sail2_state_monad$read_regS f11_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 12 : int):ii)))) then (sail2_state_monad$read_regS f12_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 13 : int):ii)))) then (sail2_state_monad$read_regS f13_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 14 : int):ii)))) then (sail2_state_monad$read_regS f14_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 15 : int):ii)))) then (sail2_state_monad$read_regS f15_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 16 : int):ii)))) then (sail2_state_monad$read_regS f16_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 17 : int):ii)))) then (sail2_state_monad$read_regS f17_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 18 : int):ii)))) then (sail2_state_monad$read_regS f18_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 19 : int):ii)))) then (sail2_state_monad$read_regS f19_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 20 : int):ii)))) then (sail2_state_monad$read_regS f20_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 21 : int):ii)))) then (sail2_state_monad$read_regS f21_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 22 : int):ii)))) then (sail2_state_monad$read_regS f22_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 23 : int):ii)))) then (sail2_state_monad$read_regS f23_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 24 : int):ii)))) then (sail2_state_monad$read_regS f24_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 25 : int):ii)))) then (sail2_state_monad$read_regS f25_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 26 : int):ii)))) then (sail2_state_monad$read_regS f26_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 27 : int):ii)))) then (sail2_state_monad$read_regS f27_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 28 : int):ii)))) then (sail2_state_monad$read_regS f28_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 29 : int):ii)))) then (sail2_state_monad$read_regS f29_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 30 : int):ii)))) then (sail2_state_monad$read_regS f30_ref : ( 64 words$word) M)
+ else if (((l__42 = (( 31 : int):ii)))) then (sail2_state_monad$read_regS f31_ref : ( 64 words$word) M)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid floating point register number") (sail2_state_monad$exitS () )) (\ (v : fregtype) .
+ sail2_state_monad$returnS ((fregval_from_freg v : 64 words$word)))))`;
+
+
+(*val wF : integer -> mword ty64 -> M unit*)
+
+val _ = Define `
+ ((wF:int ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r in_v=
+ (let v = ((fregval_into_freg in_v : 64 words$word)) in
+ let l__10 = r in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((l__10 = (( 0 : int):ii)))) then sail2_state_monad$write_regS f0_ref v
+ else if (((l__10 = (( 1 : int):ii)))) then sail2_state_monad$write_regS f1_ref v
+ else if (((l__10 = (( 2 : int):ii)))) then sail2_state_monad$write_regS f2_ref v
+ else if (((l__10 = (( 3 : int):ii)))) then sail2_state_monad$write_regS f3_ref v
+ else if (((l__10 = (( 4 : int):ii)))) then sail2_state_monad$write_regS f4_ref v
+ else if (((l__10 = (( 5 : int):ii)))) then sail2_state_monad$write_regS f5_ref v
+ else if (((l__10 = (( 6 : int):ii)))) then sail2_state_monad$write_regS f6_ref v
+ else if (((l__10 = (( 7 : int):ii)))) then sail2_state_monad$write_regS f7_ref v
+ else if (((l__10 = (( 8 : int):ii)))) then sail2_state_monad$write_regS f8_ref v
+ else if (((l__10 = (( 9 : int):ii)))) then sail2_state_monad$write_regS f9_ref v
+ else if (((l__10 = (( 10 : int):ii)))) then sail2_state_monad$write_regS f10_ref v
+ else if (((l__10 = (( 11 : int):ii)))) then sail2_state_monad$write_regS f11_ref v
+ else if (((l__10 = (( 12 : int):ii)))) then sail2_state_monad$write_regS f12_ref v
+ else if (((l__10 = (( 13 : int):ii)))) then sail2_state_monad$write_regS f13_ref v
+ else if (((l__10 = (( 14 : int):ii)))) then sail2_state_monad$write_regS f14_ref v
+ else if (((l__10 = (( 15 : int):ii)))) then sail2_state_monad$write_regS f15_ref v
+ else if (((l__10 = (( 16 : int):ii)))) then sail2_state_monad$write_regS f16_ref v
+ else if (((l__10 = (( 17 : int):ii)))) then sail2_state_monad$write_regS f17_ref v
+ else if (((l__10 = (( 18 : int):ii)))) then sail2_state_monad$write_regS f18_ref v
+ else if (((l__10 = (( 19 : int):ii)))) then sail2_state_monad$write_regS f19_ref v
+ else if (((l__10 = (( 20 : int):ii)))) then sail2_state_monad$write_regS f20_ref v
+ else if (((l__10 = (( 21 : int):ii)))) then sail2_state_monad$write_regS f21_ref v
+ else if (((l__10 = (( 22 : int):ii)))) then sail2_state_monad$write_regS f22_ref v
+ else if (((l__10 = (( 23 : int):ii)))) then sail2_state_monad$write_regS f23_ref v
+ else if (((l__10 = (( 24 : int):ii)))) then sail2_state_monad$write_regS f24_ref v
+ else if (((l__10 = (( 25 : int):ii)))) then sail2_state_monad$write_regS f25_ref v
+ else if (((l__10 = (( 26 : int):ii)))) then sail2_state_monad$write_regS f26_ref v
+ else if (((l__10 = (( 27 : int):ii)))) then sail2_state_monad$write_regS f27_ref v
+ else if (((l__10 = (( 28 : int):ii)))) then sail2_state_monad$write_regS f28_ref v
+ else if (((l__10 = (( 29 : int):ii)))) then sail2_state_monad$write_regS f29_ref v
+ else if (((l__10 = (( 30 : int):ii)))) then sail2_state_monad$write_regS f30_ref v
+ else if (((l__10 = (( 31 : int):ii)))) then sail2_state_monad$write_regS f31_ref v
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "invalid floating point register number") (sail2_state_monad$exitS () ))
+ (dirty_fd_context () ))
+ (sail2_state_monad$returnS (if ((get_config_print_reg () )) then
+ print_dbg
+ ((STRCAT "f"
+ ((STRCAT ((stringFromInteger r)) ((STRCAT " <- " ((FRegStr v))))))))
+ else () ))))`;
+
+
+(*val rF_bits : mword ty5 -> M (mword ty64)*)
+
+val _ = Define `
+ ((rF_bits:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) i= ((rF ((lem$w2ui i)) : ( 64 words$word) M)))`;
+
+
+(*val wF_bits : mword ty5 -> mword ty64 -> M unit*)
+
+val _ = Define `
+ ((wF_bits:(5)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (i : 5 bits) (data : flenbits)= (wF ((lem$w2ui i)) data))`;
+
+
+(*val freg_name_abi_forwards : mword ty5 -> M string*)
+
+(*val freg_name_abi_backwards : string -> M (mword ty5)*)
+
+(*val freg_name_abi_forwards_matches : mword ty5 -> bool*)
+
+(*val freg_name_abi_backwards_matches : string -> bool*)
+
+(*val freg_name_abi_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
+val _ = Define `
+ ((freg_name_abi_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "ft0"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ft1"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "ft2"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "ft3"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "ft4"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "ft5"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "ft6"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "ft7"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fs0"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "fs1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "fa0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "fa1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "fa2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "fa3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "fa4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "fa5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "fa6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "fa7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "fs2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "fs3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "fs4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "fs5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "fs6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "fs7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "fs8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "fs9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "fs10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "fs11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "ft8"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "ft9"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "ft10"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "ft11"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_abi_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ft1"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "ft2"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "ft3"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "ft4"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "ft5"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "ft6"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "ft7"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fs0"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "fs1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "fa0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "fa1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "fa2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "fa3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "fa4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "fa5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "fa6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "fa7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "fs2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "fs3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "fs4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "fs5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "fs6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "fs7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "fs8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "fs9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "fs10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "fs11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "ft8"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "ft9"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "ft10"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "ft11"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_abi_forwards_matches:(5)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
+ else F))`;
+
+
+val _ = Define `
+ ((freg_name_abi_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then T
+ else if (((p0_ = "ft1"))) then T
+ else if (((p0_ = "ft2"))) then T
+ else if (((p0_ = "ft3"))) then T
+ else if (((p0_ = "ft4"))) then T
+ else if (((p0_ = "ft5"))) then T
+ else if (((p0_ = "ft6"))) then T
+ else if (((p0_ = "ft7"))) then T
+ else if (((p0_ = "fs0"))) then T
+ else if (((p0_ = "fs1"))) then T
+ else if (((p0_ = "fa0"))) then T
+ else if (((p0_ = "fa1"))) then T
+ else if (((p0_ = "fa2"))) then T
+ else if (((p0_ = "fa3"))) then T
+ else if (((p0_ = "fa4"))) then T
+ else if (((p0_ = "fa5"))) then T
+ else if (((p0_ = "fa6"))) then T
+ else if (((p0_ = "fa7"))) then T
+ else if (((p0_ = "fs2"))) then T
+ else if (((p0_ = "fs3"))) then T
+ else if (((p0_ = "fs4"))) then T
+ else if (((p0_ = "fs5"))) then T
+ else if (((p0_ = "fs6"))) then T
+ else if (((p0_ = "fs7"))) then T
+ else if (((p0_ = "fs8"))) then T
+ else if (((p0_ = "fs9"))) then T
+ else if (((p0_ = "fs10"))) then T
+ else if (((p0_ = "fs11"))) then T
+ else if (((p0_ = "ft8"))) then T
+ else if (((p0_ = "ft9"))) then T
+ else if (((p0_ = "ft10"))) then T
+ else if (((p0_ = "ft11"))) then T
+ else F))`;
(*val _s324_ : string -> maybe string*)
@@ -10432,8 +10992,8 @@ val _ = Define `
val _ = Define `
((s324_:string ->(string)option) s325_0=
(let s326_0 = s325_0 in
- if ((string_startswith s326_0 "mimpid")) then
- (case ((string_drop s326_0 ((string_length "mimpid")))) of s_ => SOME s_ )
+ if ((string_startswith s326_0 "ft11")) then
+ (case ((string_drop s326_0 ((string_length "ft11")))) of s_ => SOME s_ )
else NONE))`;
@@ -10442,10 +11002,8 @@ val _ = Define `
val _ = Define `
((s320_:string ->(string)option) s321_0=
(let s322_0 = s321_0 in
- if ((string_startswith s322_0 "marchid")) then
- (case ((string_drop s322_0 ((string_length "marchid")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s322_0 "ft10")) then
+ (case ((string_drop s322_0 ((string_length "ft10")))) of s_ => SOME s_ )
else NONE))`;
@@ -10454,10 +11012,8 @@ val _ = Define `
val _ = Define `
((s316_:string ->(string)option) s317_0=
(let s318_0 = s317_0 in
- if ((string_startswith s318_0 "mvendorid")) then
- (case ((string_drop s318_0 ((string_length "mvendorid")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s318_0 "ft9")) then
+ (case ((string_drop s318_0 ((string_length "ft9")))) of s_ => SOME s_ )
else NONE))`;
@@ -10466,8 +11022,8 @@ val _ = Define `
val _ = Define `
((s312_:string ->(string)option) s313_0=
(let s314_0 = s313_0 in
- if ((string_startswith s314_0 "satp")) then
- (case ((string_drop s314_0 ((string_length "satp")))) of s_ => SOME s_ )
+ if ((string_startswith s314_0 "ft8")) then
+ (case ((string_drop s314_0 ((string_length "ft8")))) of s_ => SOME s_ )
else NONE))`;
@@ -10476,8 +11032,8 @@ val _ = Define `
val _ = Define `
((s308_:string ->(string)option) s309_0=
(let s310_0 = s309_0 in
- if ((string_startswith s310_0 "sip")) then
- (case ((string_drop s310_0 ((string_length "sip")))) of s_ => SOME s_ )
+ if ((string_startswith s310_0 "fs11")) then
+ (case ((string_drop s310_0 ((string_length "fs11")))) of s_ => SOME s_ )
else NONE))`;
@@ -10486,8 +11042,8 @@ val _ = Define `
val _ = Define `
((s304_:string ->(string)option) s305_0=
(let s306_0 = s305_0 in
- if ((string_startswith s306_0 "stval")) then
- (case ((string_drop s306_0 ((string_length "stval")))) of s_ => SOME s_ )
+ if ((string_startswith s306_0 "fs10")) then
+ (case ((string_drop s306_0 ((string_length "fs10")))) of s_ => SOME s_ )
else NONE))`;
@@ -10496,8 +11052,8 @@ val _ = Define `
val _ = Define `
((s300_:string ->(string)option) s301_0=
(let s302_0 = s301_0 in
- if ((string_startswith s302_0 "scause")) then
- (case ((string_drop s302_0 ((string_length "scause")))) of s_ => SOME s_ )
+ if ((string_startswith s302_0 "fs9")) then
+ (case ((string_drop s302_0 ((string_length "fs9")))) of s_ => SOME s_ )
else NONE))`;
@@ -10506,8 +11062,8 @@ val _ = Define `
val _ = Define `
((s296_:string ->(string)option) s297_0=
(let s298_0 = s297_0 in
- if ((string_startswith s298_0 "sepc")) then
- (case ((string_drop s298_0 ((string_length "sepc")))) of s_ => SOME s_ )
+ if ((string_startswith s298_0 "fs8")) then
+ (case ((string_drop s298_0 ((string_length "fs8")))) of s_ => SOME s_ )
else NONE))`;
@@ -10516,10 +11072,8 @@ val _ = Define `
val _ = Define `
((s292_:string ->(string)option) s293_0=
(let s294_0 = s293_0 in
- if ((string_startswith s294_0 "sscratch")) then
- (case ((string_drop s294_0 ((string_length "sscratch")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s294_0 "fs7")) then
+ (case ((string_drop s294_0 ((string_length "fs7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10528,10 +11082,8 @@ val _ = Define `
val _ = Define `
((s288_:string ->(string)option) s289_0=
(let s290_0 = s289_0 in
- if ((string_startswith s290_0 "scounteren")) then
- (case ((string_drop s290_0 ((string_length "scounteren")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s290_0 "fs6")) then
+ (case ((string_drop s290_0 ((string_length "fs6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10540,8 +11092,8 @@ val _ = Define `
val _ = Define `
((s284_:string ->(string)option) s285_0=
(let s286_0 = s285_0 in
- if ((string_startswith s286_0 "stvec")) then
- (case ((string_drop s286_0 ((string_length "stvec")))) of s_ => SOME s_ )
+ if ((string_startswith s286_0 "fs5")) then
+ (case ((string_drop s286_0 ((string_length "fs5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10550,8 +11102,8 @@ val _ = Define `
val _ = Define `
((s280_:string ->(string)option) s281_0=
(let s282_0 = s281_0 in
- if ((string_startswith s282_0 "sie")) then
- (case ((string_drop s282_0 ((string_length "sie")))) of s_ => SOME s_ )
+ if ((string_startswith s282_0 "fs4")) then
+ (case ((string_drop s282_0 ((string_length "fs4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10560,10 +11112,8 @@ val _ = Define `
val _ = Define `
((s276_:string ->(string)option) s277_0=
(let s278_0 = s277_0 in
- if ((string_startswith s278_0 "sideleg")) then
- (case ((string_drop s278_0 ((string_length "sideleg")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s278_0 "fs3")) then
+ (case ((string_drop s278_0 ((string_length "fs3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10572,10 +11122,8 @@ val _ = Define `
val _ = Define `
((s272_:string ->(string)option) s273_0=
(let s274_0 = s273_0 in
- if ((string_startswith s274_0 "sedeleg")) then
- (case ((string_drop s274_0 ((string_length "sedeleg")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s274_0 "fs2")) then
+ (case ((string_drop s274_0 ((string_length "fs2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10584,10 +11132,8 @@ val _ = Define `
val _ = Define `
((s268_:string ->(string)option) s269_0=
(let s270_0 = s269_0 in
- if ((string_startswith s270_0 "sstatus")) then
- (case ((string_drop s270_0 ((string_length "sstatus")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s270_0 "fa7")) then
+ (case ((string_drop s270_0 ((string_length "fa7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10596,10 +11142,8 @@ val _ = Define `
val _ = Define `
((s264_:string ->(string)option) s265_0=
(let s266_0 = s265_0 in
- if ((string_startswith s266_0 "instreth")) then
- (case ((string_drop s266_0 ((string_length "instreth")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s266_0 "fa6")) then
+ (case ((string_drop s266_0 ((string_length "fa6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10608,8 +11152,8 @@ val _ = Define `
val _ = Define `
((s260_:string ->(string)option) s261_0=
(let s262_0 = s261_0 in
- if ((string_startswith s262_0 "timeh")) then
- (case ((string_drop s262_0 ((string_length "timeh")))) of s_ => SOME s_ )
+ if ((string_startswith s262_0 "fa5")) then
+ (case ((string_drop s262_0 ((string_length "fa5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10618,8 +11162,8 @@ val _ = Define `
val _ = Define `
((s256_:string ->(string)option) s257_0=
(let s258_0 = s257_0 in
- if ((string_startswith s258_0 "cycleh")) then
- (case ((string_drop s258_0 ((string_length "cycleh")))) of s_ => SOME s_ )
+ if ((string_startswith s258_0 "fa4")) then
+ (case ((string_drop s258_0 ((string_length "fa4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10628,10 +11172,8 @@ val _ = Define `
val _ = Define `
((s252_:string ->(string)option) s253_0=
(let s254_0 = s253_0 in
- if ((string_startswith s254_0 "instret")) then
- (case ((string_drop s254_0 ((string_length "instret")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s254_0 "fa3")) then
+ (case ((string_drop s254_0 ((string_length "fa3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10640,8 +11182,8 @@ val _ = Define `
val _ = Define `
((s248_:string ->(string)option) s249_0=
(let s250_0 = s249_0 in
- if ((string_startswith s250_0 "time")) then
- (case ((string_drop s250_0 ((string_length "time")))) of s_ => SOME s_ )
+ if ((string_startswith s250_0 "fa2")) then
+ (case ((string_drop s250_0 ((string_length "fa2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10650,8 +11192,8 @@ val _ = Define `
val _ = Define `
((s244_:string ->(string)option) s245_0=
(let s246_0 = s245_0 in
- if ((string_startswith s246_0 "cycle")) then
- (case ((string_drop s246_0 ((string_length "cycle")))) of s_ => SOME s_ )
+ if ((string_startswith s246_0 "fa1")) then
+ (case ((string_drop s246_0 ((string_length "fa1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10660,8 +11202,8 @@ val _ = Define `
val _ = Define `
((s240_:string ->(string)option) s241_0=
(let s242_0 = s241_0 in
- if ((string_startswith s242_0 "fcsr")) then
- (case ((string_drop s242_0 ((string_length "fcsr")))) of s_ => SOME s_ )
+ if ((string_startswith s242_0 "fa0")) then
+ (case ((string_drop s242_0 ((string_length "fa0")))) of s_ => SOME s_ )
else NONE))`;
@@ -10670,8 +11212,8 @@ val _ = Define `
val _ = Define `
((s236_:string ->(string)option) s237_0=
(let s238_0 = s237_0 in
- if ((string_startswith s238_0 "frm")) then
- (case ((string_drop s238_0 ((string_length "frm")))) of s_ => SOME s_ )
+ if ((string_startswith s238_0 "fs1")) then
+ (case ((string_drop s238_0 ((string_length "fs1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10680,8 +11222,8 @@ val _ = Define `
val _ = Define `
((s232_:string ->(string)option) s233_0=
(let s234_0 = s233_0 in
- if ((string_startswith s234_0 "fflags")) then
- (case ((string_drop s234_0 ((string_length "fflags")))) of s_ => SOME s_ )
+ if ((string_startswith s234_0 "fs0")) then
+ (case ((string_drop s234_0 ((string_length "fs0")))) of s_ => SOME s_ )
else NONE))`;
@@ -10690,8 +11232,8 @@ val _ = Define `
val _ = Define `
((s228_:string ->(string)option) s229_0=
(let s230_0 = s229_0 in
- if ((string_startswith s230_0 "uip")) then
- (case ((string_drop s230_0 ((string_length "uip")))) of s_ => SOME s_ )
+ if ((string_startswith s230_0 "ft7")) then
+ (case ((string_drop s230_0 ((string_length "ft7")))) of s_ => SOME s_ )
else NONE))`;
@@ -10700,8 +11242,8 @@ val _ = Define `
val _ = Define `
((s224_:string ->(string)option) s225_0=
(let s226_0 = s225_0 in
- if ((string_startswith s226_0 "utval")) then
- (case ((string_drop s226_0 ((string_length "utval")))) of s_ => SOME s_ )
+ if ((string_startswith s226_0 "ft6")) then
+ (case ((string_drop s226_0 ((string_length "ft6")))) of s_ => SOME s_ )
else NONE))`;
@@ -10710,8 +11252,8 @@ val _ = Define `
val _ = Define `
((s220_:string ->(string)option) s221_0=
(let s222_0 = s221_0 in
- if ((string_startswith s222_0 "ucause")) then
- (case ((string_drop s222_0 ((string_length "ucause")))) of s_ => SOME s_ )
+ if ((string_startswith s222_0 "ft5")) then
+ (case ((string_drop s222_0 ((string_length "ft5")))) of s_ => SOME s_ )
else NONE))`;
@@ -10720,8 +11262,8 @@ val _ = Define `
val _ = Define `
((s216_:string ->(string)option) s217_0=
(let s218_0 = s217_0 in
- if ((string_startswith s218_0 "uepc")) then
- (case ((string_drop s218_0 ((string_length "uepc")))) of s_ => SOME s_ )
+ if ((string_startswith s218_0 "ft4")) then
+ (case ((string_drop s218_0 ((string_length "ft4")))) of s_ => SOME s_ )
else NONE))`;
@@ -10730,10 +11272,8 @@ val _ = Define `
val _ = Define `
((s212_:string ->(string)option) s213_0=
(let s214_0 = s213_0 in
- if ((string_startswith s214_0 "uscratch")) then
- (case ((string_drop s214_0 ((string_length "uscratch")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s214_0 "ft3")) then
+ (case ((string_drop s214_0 ((string_length "ft3")))) of s_ => SOME s_ )
else NONE))`;
@@ -10742,8 +11282,8 @@ val _ = Define `
val _ = Define `
((s208_:string ->(string)option) s209_0=
(let s210_0 = s209_0 in
- if ((string_startswith s210_0 "utvec")) then
- (case ((string_drop s210_0 ((string_length "utvec")))) of s_ => SOME s_ )
+ if ((string_startswith s210_0 "ft2")) then
+ (case ((string_drop s210_0 ((string_length "ft2")))) of s_ => SOME s_ )
else NONE))`;
@@ -10752,8 +11292,8 @@ val _ = Define `
val _ = Define `
((s204_:string ->(string)option) s205_0=
(let s206_0 = s205_0 in
- if ((string_startswith s206_0 "uie")) then
- (case ((string_drop s206_0 ((string_length "uie")))) of s_ => SOME s_ )
+ if ((string_startswith s206_0 "ft1")) then
+ (case ((string_drop s206_0 ((string_length "ft1")))) of s_ => SOME s_ )
else NONE))`;
@@ -10762,1081 +11302,2790 @@ val _ = Define `
val _ = Define `
((s200_:string ->(string)option) s201_0=
(let s202_0 = s201_0 in
- if ((string_startswith s202_0 "ustatus")) then
- (case ((string_drop s202_0 ((string_length "ustatus")))) of
- s_ => SOME s_
- )
+ if ((string_startswith s202_0 "ft0")) then
+ (case ((string_drop s202_0 ((string_length "ft0")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
- ((csr_name_map_matches_prefix:string ->((12)words$word#int)option) arg_=
+ ((freg_name_abi_matches_prefix:string ->((5)words$word#int)option) arg_=
(let s203_0 = arg_ in
if ((case ((s200_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s200_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s204_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s204_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s208_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s208_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s212_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s212_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s216_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s216_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s220_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s220_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s224_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s224_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s228_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s228_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s232_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s232_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s236_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s236_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s240_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s240_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s244_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s244_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s248_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s248_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s252_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s252_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s256_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s256_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s260_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s260_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s264_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s264_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s268_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s268_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s272_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s272_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s276_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s276_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s280_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s280_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s284_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s284_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s288_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s288_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s292_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s292_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s296_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s296_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s300_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s300_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s304_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s304_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s308_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s308_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s312_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s312_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s316_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s316_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s320_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s320_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
else if ((case ((s324_ s203_0)) of SOME (s_) => T | _ => F )) then
(case s324_ s203_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s328_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s328_ s203_0 of
+ else NONE))`;
+
+
+(*val freg_name_forwards : mword ty5 -> M string*)
+
+(*val freg_name_backwards : string -> M (mword ty5)*)
+
+(*val freg_name_forwards_matches : mword ty5 -> bool*)
+
+(*val freg_name_backwards_matches : string -> bool*)
+
+(*val freg_name_matches_prefix : string -> maybe ((mword ty5 * ii))*)
+
+val _ = Define `
+ ((freg_name_forwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS "ft0"
+ else if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS "ft1"
+ else if (((b__0 = (0b00010w : 5 words$word)))) then sail2_state_monad$returnS "ft2"
+ else if (((b__0 = (0b00011w : 5 words$word)))) then sail2_state_monad$returnS "ft3"
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS "ft4"
+ else if (((b__0 = (0b00101w : 5 words$word)))) then sail2_state_monad$returnS "ft5"
+ else if (((b__0 = (0b00110w : 5 words$word)))) then sail2_state_monad$returnS "ft6"
+ else if (((b__0 = (0b00111w : 5 words$word)))) then sail2_state_monad$returnS "ft7"
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS "fs0"
+ else if (((b__0 = (0b01001w : 5 words$word)))) then sail2_state_monad$returnS "fs1"
+ else if (((b__0 = (0b01010w : 5 words$word)))) then sail2_state_monad$returnS "fa0"
+ else if (((b__0 = (0b01011w : 5 words$word)))) then sail2_state_monad$returnS "fa1"
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS "fa2"
+ else if (((b__0 = (0b01101w : 5 words$word)))) then sail2_state_monad$returnS "fa3"
+ else if (((b__0 = (0b01110w : 5 words$word)))) then sail2_state_monad$returnS "fa4"
+ else if (((b__0 = (0b01111w : 5 words$word)))) then sail2_state_monad$returnS "fa5"
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS "fa6"
+ else if (((b__0 = (0b10001w : 5 words$word)))) then sail2_state_monad$returnS "fa7"
+ else if (((b__0 = (0b10010w : 5 words$word)))) then sail2_state_monad$returnS "fs2"
+ else if (((b__0 = (0b10011w : 5 words$word)))) then sail2_state_monad$returnS "fs3"
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS "fs4"
+ else if (((b__0 = (0b10101w : 5 words$word)))) then sail2_state_monad$returnS "fs5"
+ else if (((b__0 = (0b10110w : 5 words$word)))) then sail2_state_monad$returnS "fs6"
+ else if (((b__0 = (0b10111w : 5 words$word)))) then sail2_state_monad$returnS "fs7"
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS "fs8"
+ else if (((b__0 = (0b11001w : 5 words$word)))) then sail2_state_monad$returnS "fs9"
+ else if (((b__0 = (0b11010w : 5 words$word)))) then sail2_state_monad$returnS "fs10"
+ else if (((b__0 = (0b11011w : 5 words$word)))) then sail2_state_monad$returnS "fs11"
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS "ft8"
+ else if (((b__0 = (0b11101w : 5 words$word)))) then sail2_state_monad$returnS "ft9"
+ else if (((b__0 = (0b11110w : 5 words$word)))) then sail2_state_monad$returnS "ft10"
+ else if (((b__0 = (0b11111w : 5 words$word)))) then sail2_state_monad$returnS "ft11"
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((5)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then sail2_state_monad$returnS (0b00000w : 5 words$word)
+ else if (((p0_ = "ft1"))) then sail2_state_monad$returnS (0b00001w : 5 words$word)
+ else if (((p0_ = "ft2"))) then sail2_state_monad$returnS (0b00010w : 5 words$word)
+ else if (((p0_ = "ft3"))) then sail2_state_monad$returnS (0b00011w : 5 words$word)
+ else if (((p0_ = "ft4"))) then sail2_state_monad$returnS (0b00100w : 5 words$word)
+ else if (((p0_ = "ft5"))) then sail2_state_monad$returnS (0b00101w : 5 words$word)
+ else if (((p0_ = "ft6"))) then sail2_state_monad$returnS (0b00110w : 5 words$word)
+ else if (((p0_ = "ft7"))) then sail2_state_monad$returnS (0b00111w : 5 words$word)
+ else if (((p0_ = "fs0"))) then sail2_state_monad$returnS (0b01000w : 5 words$word)
+ else if (((p0_ = "fs1"))) then sail2_state_monad$returnS (0b01001w : 5 words$word)
+ else if (((p0_ = "fa0"))) then sail2_state_monad$returnS (0b01010w : 5 words$word)
+ else if (((p0_ = "fa1"))) then sail2_state_monad$returnS (0b01011w : 5 words$word)
+ else if (((p0_ = "fa2"))) then sail2_state_monad$returnS (0b01100w : 5 words$word)
+ else if (((p0_ = "fa3"))) then sail2_state_monad$returnS (0b01101w : 5 words$word)
+ else if (((p0_ = "fa4"))) then sail2_state_monad$returnS (0b01110w : 5 words$word)
+ else if (((p0_ = "fa5"))) then sail2_state_monad$returnS (0b01111w : 5 words$word)
+ else if (((p0_ = "fa6"))) then sail2_state_monad$returnS (0b10000w : 5 words$word)
+ else if (((p0_ = "fa7"))) then sail2_state_monad$returnS (0b10001w : 5 words$word)
+ else if (((p0_ = "fs2"))) then sail2_state_monad$returnS (0b10010w : 5 words$word)
+ else if (((p0_ = "fs3"))) then sail2_state_monad$returnS (0b10011w : 5 words$word)
+ else if (((p0_ = "fs4"))) then sail2_state_monad$returnS (0b10100w : 5 words$word)
+ else if (((p0_ = "fs5"))) then sail2_state_monad$returnS (0b10101w : 5 words$word)
+ else if (((p0_ = "fs6"))) then sail2_state_monad$returnS (0b10110w : 5 words$word)
+ else if (((p0_ = "fs7"))) then sail2_state_monad$returnS (0b10111w : 5 words$word)
+ else if (((p0_ = "fs8"))) then sail2_state_monad$returnS (0b11000w : 5 words$word)
+ else if (((p0_ = "fs9"))) then sail2_state_monad$returnS (0b11001w : 5 words$word)
+ else if (((p0_ = "fs10"))) then sail2_state_monad$returnS (0b11010w : 5 words$word)
+ else if (((p0_ = "fs11"))) then sail2_state_monad$returnS (0b11011w : 5 words$word)
+ else if (((p0_ = "ft8"))) then sail2_state_monad$returnS (0b11100w : 5 words$word)
+ else if (((p0_ = "ft9"))) then sail2_state_monad$returnS (0b11101w : 5 words$word)
+ else if (((p0_ = "ft10"))) then sail2_state_monad$returnS (0b11110w : 5 words$word)
+ else if (((p0_ = "ft11"))) then sail2_state_monad$returnS (0b11111w : 5 words$word)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((freg_name_forwards_matches:(5)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00010w : 5 words$word)))) then T
+ else if (((b__0 = (0b00011w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b00101w : 5 words$word)))) then T
+ else if (((b__0 = (0b00110w : 5 words$word)))) then T
+ else if (((b__0 = (0b00111w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b01001w : 5 words$word)))) then T
+ else if (((b__0 = (0b01010w : 5 words$word)))) then T
+ else if (((b__0 = (0b01011w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01101w : 5 words$word)))) then T
+ else if (((b__0 = (0b01110w : 5 words$word)))) then T
+ else if (((b__0 = (0b01111w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10001w : 5 words$word)))) then T
+ else if (((b__0 = (0b10010w : 5 words$word)))) then T
+ else if (((b__0 = (0b10011w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b10101w : 5 words$word)))) then T
+ else if (((b__0 = (0b10110w : 5 words$word)))) then T
+ else if (((b__0 = (0b10111w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11001w : 5 words$word)))) then T
+ else if (((b__0 = (0b11010w : 5 words$word)))) then T
+ else if (((b__0 = (0b11011w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11101w : 5 words$word)))) then T
+ else if (((b__0 = (0b11110w : 5 words$word)))) then T
+ else if (((b__0 = (0b11111w : 5 words$word)))) then T
+ else F))`;
+
+
+val _ = Define `
+ ((freg_name_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ft0"))) then T
+ else if (((p0_ = "ft1"))) then T
+ else if (((p0_ = "ft2"))) then T
+ else if (((p0_ = "ft3"))) then T
+ else if (((p0_ = "ft4"))) then T
+ else if (((p0_ = "ft5"))) then T
+ else if (((p0_ = "ft6"))) then T
+ else if (((p0_ = "ft7"))) then T
+ else if (((p0_ = "fs0"))) then T
+ else if (((p0_ = "fs1"))) then T
+ else if (((p0_ = "fa0"))) then T
+ else if (((p0_ = "fa1"))) then T
+ else if (((p0_ = "fa2"))) then T
+ else if (((p0_ = "fa3"))) then T
+ else if (((p0_ = "fa4"))) then T
+ else if (((p0_ = "fa5"))) then T
+ else if (((p0_ = "fa6"))) then T
+ else if (((p0_ = "fa7"))) then T
+ else if (((p0_ = "fs2"))) then T
+ else if (((p0_ = "fs3"))) then T
+ else if (((p0_ = "fs4"))) then T
+ else if (((p0_ = "fs5"))) then T
+ else if (((p0_ = "fs6"))) then T
+ else if (((p0_ = "fs7"))) then T
+ else if (((p0_ = "fs8"))) then T
+ else if (((p0_ = "fs9"))) then T
+ else if (((p0_ = "fs10"))) then T
+ else if (((p0_ = "fs11"))) then T
+ else if (((p0_ = "ft8"))) then T
+ else if (((p0_ = "ft9"))) then T
+ else if (((p0_ = "ft10"))) then T
+ else if (((p0_ = "ft11"))) then T
+ else F))`;
+
+
+(*val _s452_ : string -> maybe string*)
+
+val _ = Define `
+ ((s452_:string ->(string)option) s453_0=
+ (let s454_0 = s453_0 in
+ if ((string_startswith s454_0 "ft11")) then
+ (case ((string_drop s454_0 ((string_length "ft11")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s448_ : string -> maybe string*)
+
+val _ = Define `
+ ((s448_:string ->(string)option) s449_0=
+ (let s450_0 = s449_0 in
+ if ((string_startswith s450_0 "ft10")) then
+ (case ((string_drop s450_0 ((string_length "ft10")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s444_ : string -> maybe string*)
+
+val _ = Define `
+ ((s444_:string ->(string)option) s445_0=
+ (let s446_0 = s445_0 in
+ if ((string_startswith s446_0 "ft9")) then
+ (case ((string_drop s446_0 ((string_length "ft9")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s440_ : string -> maybe string*)
+
+val _ = Define `
+ ((s440_:string ->(string)option) s441_0=
+ (let s442_0 = s441_0 in
+ if ((string_startswith s442_0 "ft8")) then
+ (case ((string_drop s442_0 ((string_length "ft8")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s436_ : string -> maybe string*)
+
+val _ = Define `
+ ((s436_:string ->(string)option) s437_0=
+ (let s438_0 = s437_0 in
+ if ((string_startswith s438_0 "fs11")) then
+ (case ((string_drop s438_0 ((string_length "fs11")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s432_ : string -> maybe string*)
+
+val _ = Define `
+ ((s432_:string ->(string)option) s433_0=
+ (let s434_0 = s433_0 in
+ if ((string_startswith s434_0 "fs10")) then
+ (case ((string_drop s434_0 ((string_length "fs10")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s428_ : string -> maybe string*)
+
+val _ = Define `
+ ((s428_:string ->(string)option) s429_0=
+ (let s430_0 = s429_0 in
+ if ((string_startswith s430_0 "fs9")) then
+ (case ((string_drop s430_0 ((string_length "fs9")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s424_ : string -> maybe string*)
+
+val _ = Define `
+ ((s424_:string ->(string)option) s425_0=
+ (let s426_0 = s425_0 in
+ if ((string_startswith s426_0 "fs8")) then
+ (case ((string_drop s426_0 ((string_length "fs8")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s420_ : string -> maybe string*)
+
+val _ = Define `
+ ((s420_:string ->(string)option) s421_0=
+ (let s422_0 = s421_0 in
+ if ((string_startswith s422_0 "fs7")) then
+ (case ((string_drop s422_0 ((string_length "fs7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s416_ : string -> maybe string*)
+
+val _ = Define `
+ ((s416_:string ->(string)option) s417_0=
+ (let s418_0 = s417_0 in
+ if ((string_startswith s418_0 "fs6")) then
+ (case ((string_drop s418_0 ((string_length "fs6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s412_ : string -> maybe string*)
+
+val _ = Define `
+ ((s412_:string ->(string)option) s413_0=
+ (let s414_0 = s413_0 in
+ if ((string_startswith s414_0 "fs5")) then
+ (case ((string_drop s414_0 ((string_length "fs5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s408_ : string -> maybe string*)
+
+val _ = Define `
+ ((s408_:string ->(string)option) s409_0=
+ (let s410_0 = s409_0 in
+ if ((string_startswith s410_0 "fs4")) then
+ (case ((string_drop s410_0 ((string_length "fs4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s404_ : string -> maybe string*)
+
+val _ = Define `
+ ((s404_:string ->(string)option) s405_0=
+ (let s406_0 = s405_0 in
+ if ((string_startswith s406_0 "fs3")) then
+ (case ((string_drop s406_0 ((string_length "fs3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s400_ : string -> maybe string*)
+
+val _ = Define `
+ ((s400_:string ->(string)option) s401_0=
+ (let s402_0 = s401_0 in
+ if ((string_startswith s402_0 "fs2")) then
+ (case ((string_drop s402_0 ((string_length "fs2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s396_ : string -> maybe string*)
+
+val _ = Define `
+ ((s396_:string ->(string)option) s397_0=
+ (let s398_0 = s397_0 in
+ if ((string_startswith s398_0 "fa7")) then
+ (case ((string_drop s398_0 ((string_length "fa7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s392_ : string -> maybe string*)
+
+val _ = Define `
+ ((s392_:string ->(string)option) s393_0=
+ (let s394_0 = s393_0 in
+ if ((string_startswith s394_0 "fa6")) then
+ (case ((string_drop s394_0 ((string_length "fa6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s388_ : string -> maybe string*)
+
+val _ = Define `
+ ((s388_:string ->(string)option) s389_0=
+ (let s390_0 = s389_0 in
+ if ((string_startswith s390_0 "fa5")) then
+ (case ((string_drop s390_0 ((string_length "fa5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s384_ : string -> maybe string*)
+
+val _ = Define `
+ ((s384_:string ->(string)option) s385_0=
+ (let s386_0 = s385_0 in
+ if ((string_startswith s386_0 "fa4")) then
+ (case ((string_drop s386_0 ((string_length "fa4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s380_ : string -> maybe string*)
+
+val _ = Define `
+ ((s380_:string ->(string)option) s381_0=
+ (let s382_0 = s381_0 in
+ if ((string_startswith s382_0 "fa3")) then
+ (case ((string_drop s382_0 ((string_length "fa3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s376_ : string -> maybe string*)
+
+val _ = Define `
+ ((s376_:string ->(string)option) s377_0=
+ (let s378_0 = s377_0 in
+ if ((string_startswith s378_0 "fa2")) then
+ (case ((string_drop s378_0 ((string_length "fa2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s372_ : string -> maybe string*)
+
+val _ = Define `
+ ((s372_:string ->(string)option) s373_0=
+ (let s374_0 = s373_0 in
+ if ((string_startswith s374_0 "fa1")) then
+ (case ((string_drop s374_0 ((string_length "fa1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s368_ : string -> maybe string*)
+
+val _ = Define `
+ ((s368_:string ->(string)option) s369_0=
+ (let s370_0 = s369_0 in
+ if ((string_startswith s370_0 "fa0")) then
+ (case ((string_drop s370_0 ((string_length "fa0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s364_ : string -> maybe string*)
+
+val _ = Define `
+ ((s364_:string ->(string)option) s365_0=
+ (let s366_0 = s365_0 in
+ if ((string_startswith s366_0 "fs1")) then
+ (case ((string_drop s366_0 ((string_length "fs1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s360_ : string -> maybe string*)
+
+val _ = Define `
+ ((s360_:string ->(string)option) s361_0=
+ (let s362_0 = s361_0 in
+ if ((string_startswith s362_0 "fs0")) then
+ (case ((string_drop s362_0 ((string_length "fs0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s356_ : string -> maybe string*)
+
+val _ = Define `
+ ((s356_:string ->(string)option) s357_0=
+ (let s358_0 = s357_0 in
+ if ((string_startswith s358_0 "ft7")) then
+ (case ((string_drop s358_0 ((string_length "ft7")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s352_ : string -> maybe string*)
+
+val _ = Define `
+ ((s352_:string ->(string)option) s353_0=
+ (let s354_0 = s353_0 in
+ if ((string_startswith s354_0 "ft6")) then
+ (case ((string_drop s354_0 ((string_length "ft6")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s348_ : string -> maybe string*)
+
+val _ = Define `
+ ((s348_:string ->(string)option) s349_0=
+ (let s350_0 = s349_0 in
+ if ((string_startswith s350_0 "ft5")) then
+ (case ((string_drop s350_0 ((string_length "ft5")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s344_ : string -> maybe string*)
+
+val _ = Define `
+ ((s344_:string ->(string)option) s345_0=
+ (let s346_0 = s345_0 in
+ if ((string_startswith s346_0 "ft4")) then
+ (case ((string_drop s346_0 ((string_length "ft4")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s340_ : string -> maybe string*)
+
+val _ = Define `
+ ((s340_:string ->(string)option) s341_0=
+ (let s342_0 = s341_0 in
+ if ((string_startswith s342_0 "ft3")) then
+ (case ((string_drop s342_0 ((string_length "ft3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s336_ : string -> maybe string*)
+
+val _ = Define `
+ ((s336_:string ->(string)option) s337_0=
+ (let s338_0 = s337_0 in
+ if ((string_startswith s338_0 "ft2")) then
+ (case ((string_drop s338_0 ((string_length "ft2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s332_ : string -> maybe string*)
+
+val _ = Define `
+ ((s332_:string ->(string)option) s333_0=
+ (let s334_0 = s333_0 in
+ if ((string_startswith s334_0 "ft1")) then
+ (case ((string_drop s334_0 ((string_length "ft1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s328_ : string -> maybe string*)
+
+val _ = Define `
+ ((s328_:string ->(string)option) s329_0=
+ (let s330_0 = s329_0 in
+ if ((string_startswith s330_0 "ft0")) then
+ (case ((string_drop s330_0 ((string_length "ft0")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((freg_name_matches_prefix:string ->((5)words$word#int)option) arg_=
+ (let s331_0 = arg_ in
+ if ((case ((s328_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s328_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s332_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s332_ s203_0 of
+ else if ((case ((s332_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s332_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s336_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s336_ s203_0 of
+ else if ((case ((s336_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s336_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s340_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s340_ s203_0 of
+ else if ((case ((s340_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s340_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s344_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s344_ s203_0 of
+ else if ((case ((s344_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s344_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s348_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s348_ s203_0 of
+ else if ((case ((s348_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s348_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s352_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s352_ s203_0 of
+ else if ((case ((s352_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s352_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s356_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s356_ s203_0 of
+ else if ((case ((s356_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s356_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b00111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s360_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s360_ s203_0 of
+ else if ((case ((s360_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s360_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s364_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s364_ s203_0 of
+ else if ((case ((s364_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s364_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s368_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s368_ s203_0 of
+ else if ((case ((s368_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s368_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s372_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s372_ s203_0 of
+ else if ((case ((s372_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s372_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s376_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s376_ s203_0 of
+ else if ((case ((s376_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s376_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s380_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s380_ s203_0 of
+ else if ((case ((s380_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s380_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s384_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s384_ s203_0 of
+ else if ((case ((s384_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s384_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s388_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s388_ s203_0 of
+ else if ((case ((s388_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s388_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b01111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s392_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s392_ s203_0 of
+ else if ((case ((s392_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s392_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s396_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s396_ s203_0 of
+ else if ((case ((s396_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s396_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s400_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s400_ s203_0 of
+ else if ((case ((s400_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s400_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s404_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s404_ s203_0 of
+ else if ((case ((s404_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s404_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s408_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s408_ s203_0 of
+ else if ((case ((s408_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s408_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s412_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s412_ s203_0 of
+ else if ((case ((s412_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s412_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s416_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s416_ s203_0 of
+ else if ((case ((s416_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s416_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s420_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s420_ s203_0 of
+ else if ((case ((s420_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s420_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b10111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s424_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s424_ s203_0 of
+ else if ((case ((s424_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s424_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11000w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s428_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s428_ s203_0 of
+ else if ((case ((s428_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s428_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11001w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s432_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s432_ s203_0 of
+ else if ((case ((s432_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s432_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11010w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s436_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s436_ s203_0 of
+ else if ((case ((s436_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s436_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11011w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s440_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s440_ s203_0 of
+ else if ((case ((s440_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s440_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11100w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s444_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s444_ s203_0 of
+ else if ((case ((s444_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s444_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11101w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s448_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s448_ s203_0 of
+ else if ((case ((s448_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s448_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11110w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s452_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s452_ s203_0 of
+ else if ((case ((s452_ s331_0)) of SOME (s_) => T | _ => F )) then
+ (case s452_ s331_0 of
(SOME (s_)) =>
SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ ((0b11111w : 5 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s456_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s456_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val init_fdext_regs : unit -> M unit*)
+
+val _ = Define `
+ ((init_fdext_regs:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS f0_ref zero_freg)
+ (sail2_state_monad$write_regS f1_ref zero_freg))
+ (sail2_state_monad$write_regS f2_ref zero_freg))
+ (sail2_state_monad$write_regS f3_ref zero_freg))
+ (sail2_state_monad$write_regS f4_ref zero_freg))
+ (sail2_state_monad$write_regS f5_ref zero_freg))
+ (sail2_state_monad$write_regS f6_ref zero_freg))
+ (sail2_state_monad$write_regS f7_ref zero_freg))
+ (sail2_state_monad$write_regS f8_ref zero_freg))
+ (sail2_state_monad$write_regS f9_ref zero_freg))
+ (sail2_state_monad$write_regS f10_ref zero_freg))
+ (sail2_state_monad$write_regS f11_ref zero_freg))
+ (sail2_state_monad$write_regS f12_ref zero_freg))
+ (sail2_state_monad$write_regS f13_ref zero_freg))
+ (sail2_state_monad$write_regS f14_ref zero_freg))
+ (sail2_state_monad$write_regS f15_ref zero_freg))
+ (sail2_state_monad$write_regS f16_ref zero_freg))
+ (sail2_state_monad$write_regS f17_ref zero_freg))
+ (sail2_state_monad$write_regS f18_ref zero_freg))
+ (sail2_state_monad$write_regS f19_ref zero_freg))
+ (sail2_state_monad$write_regS f20_ref zero_freg))
+ (sail2_state_monad$write_regS f21_ref zero_freg))
+ (sail2_state_monad$write_regS f22_ref zero_freg))
+ (sail2_state_monad$write_regS f23_ref zero_freg))
+ (sail2_state_monad$write_regS f24_ref zero_freg))
+ (sail2_state_monad$write_regS f25_ref zero_freg))
+ (sail2_state_monad$write_regS f26_ref zero_freg))
+ (sail2_state_monad$write_regS f27_ref zero_freg))
+ (sail2_state_monad$write_regS f28_ref zero_freg))
+ (sail2_state_monad$write_regS f29_ref zero_freg)) (sail2_state_monad$write_regS f30_ref zero_freg)) (sail2_state_monad$write_regS f31_ref zero_freg)))`;
+
+
+(*val Mk_Fcsr : mword ty32 -> Fcsr*)
+
+val _ = Define `
+ ((Mk_Fcsr:(32)words$word -> Fcsr) v= (<| Fcsr_Fcsr_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
+
+
+val _ = Define `
+ ((get_Fcsr_bits:Fcsr ->(32)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
+
+
+val _ = Define `
+ ((set_Fcsr_bits:((regstate),(register_value),(Fcsr))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_Fcsr_bits:Fcsr ->(32)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Fcsr_FRM : Fcsr -> mword ty3*)
+
+val _ = Define `
+ ((get_Fcsr_FRM:Fcsr ->(3)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii) : 3 words$word)))`;
+
+
+(*val _set_Fcsr_FRM : register_ref regstate register_value Fcsr -> mword ty3 -> M unit*)
+
+val _ = Define `
+ ((set_Fcsr_FRM:((regstate),(register_value),(Fcsr))register_ref ->(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec v (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Fcsr_FRM : Fcsr -> mword ty3 -> Fcsr*)
+
+val _ = Define `
+ ((update_Fcsr_FRM:Fcsr ->(3)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 7 : int):ii) (( 5 : int):ii)
+ ((subrange_vec_dec x (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val _get_Fcsr_FFLAGS : Fcsr -> mword ty5*)
+
+val _ = Define `
+ ((get_Fcsr_FFLAGS:Fcsr ->(5)words$word) v= ((subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))`;
+
+
+(*val _set_Fcsr_FFLAGS : register_ref regstate register_value Fcsr -> mword ty5 -> M unit*)
+
+val _ = Define `
+ ((set_Fcsr_FFLAGS:((regstate),(register_value),(Fcsr))register_ref ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec r.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec v (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
+ : 32 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_Fcsr_FFLAGS : Fcsr -> mword ty5 -> Fcsr*)
+
+val _ = Define `
+ ((update_Fcsr_FFLAGS:Fcsr ->(5)words$word -> Fcsr) v x=
+ (( v with<|
+ Fcsr_Fcsr_chunk_0 :=
+ ((update_subrange_vec_dec v.Fcsr_Fcsr_chunk_0 (( 4 : int):ii) (( 0 : int):ii)
+ ((subrange_vec_dec x (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
+ : 32 words$word)) |>)))`;
+
+
+(*val ext_write_fcsr : mword ty3 -> mword ty5 -> M unit*)
+
+val _ = Define `
+ ((ext_write_fcsr:(3)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) frm fflags= (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Fcsr_FRM fcsr_ref frm)
+ (set_Fcsr_FFLAGS fcsr_ref fflags)) (update_softfloat_fflags fflags)) (dirty_fd_context () )))`;
+
+
+(*val write_fflags : mword ty5 -> M unit*)
+
+val _ = Define `
+ ((write_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) fflags= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) . sail2_state_monad$seqS
+ (if (((((get_Fcsr_FFLAGS w__0 : 5 words$word)) <> fflags))) then dirty_fd_context ()
+ else sail2_state_monad$returnS () )
+ (set_Fcsr_FFLAGS fcsr_ref fflags))))`;
+
+
+(*val accrue_fflags : mword ty5 -> M unit*)
+
+val _ = Define `
+ ((accrue_fflags:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) flags= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) .
+ let f = ((or_vec ((get_Fcsr_FFLAGS w__0 : 5 words$word)) flags : 5 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__1 : Fcsr) .
+ if (((((get_Fcsr_FFLAGS w__1 : 5 words$word)) <> f))) then sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Fcsr_FFLAGS fcsr_ref f) (update_softfloat_fflags f)) (dirty_fd_context () )
+ else sail2_state_monad$returnS () ))))`;
+
+
+val _ = Define `
+ ((csr_name_map_forwards:(12)words$word -> string) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0x000w : 12 words$word)))) then "ustatus"
+ else if (((b__0 = (0x004w : 12 words$word)))) then "uie"
+ else if (((b__0 = (0x005w : 12 words$word)))) then "utvec"
+ else if (((b__0 = (0x040w : 12 words$word)))) then "uscratch"
+ else if (((b__0 = (0x041w : 12 words$word)))) then "uepc"
+ else if (((b__0 = (0x042w : 12 words$word)))) then "ucause"
+ else if (((b__0 = (0x043w : 12 words$word)))) then "utval"
+ else if (((b__0 = (0x044w : 12 words$word)))) then "uip"
+ else if (((b__0 = (0x001w : 12 words$word)))) then "fflags"
+ else if (((b__0 = (0x002w : 12 words$word)))) then "frm"
+ else if (((b__0 = (0x003w : 12 words$word)))) then "fcsr"
+ else if (((b__0 = (0xC00w : 12 words$word)))) then "cycle"
+ else if (((b__0 = (0xC01w : 12 words$word)))) then "time"
+ else if (((b__0 = (0xC02w : 12 words$word)))) then "instret"
+ else if (((b__0 = (0xC80w : 12 words$word)))) then "cycleh"
+ else if (((b__0 = (0xC81w : 12 words$word)))) then "timeh"
+ else if (((b__0 = (0xC82w : 12 words$word)))) then "instreth"
+ else if (((b__0 = (0x100w : 12 words$word)))) then "sstatus"
+ else if (((b__0 = (0x102w : 12 words$word)))) then "sedeleg"
+ else if (((b__0 = (0x103w : 12 words$word)))) then "sideleg"
+ else if (((b__0 = (0x104w : 12 words$word)))) then "sie"
+ else if (((b__0 = (0x105w : 12 words$word)))) then "stvec"
+ else if (((b__0 = (0x106w : 12 words$word)))) then "scounteren"
+ else if (((b__0 = (0x140w : 12 words$word)))) then "sscratch"
+ else if (((b__0 = (0x141w : 12 words$word)))) then "sepc"
+ else if (((b__0 = (0x142w : 12 words$word)))) then "scause"
+ else if (((b__0 = (0x143w : 12 words$word)))) then "stval"
+ else if (((b__0 = (0x144w : 12 words$word)))) then "sip"
+ else if (((b__0 = (0x180w : 12 words$word)))) then "satp"
+ else if (((b__0 = (0xF11w : 12 words$word)))) then "mvendorid"
+ else if (((b__0 = (0xF12w : 12 words$word)))) then "marchid"
+ else if (((b__0 = (0xF13w : 12 words$word)))) then "mimpid"
+ else if (((b__0 = (0xF14w : 12 words$word)))) then "mhartid"
+ else if (((b__0 = (0x300w : 12 words$word)))) then "mstatus"
+ else if (((b__0 = (0x301w : 12 words$word)))) then "misa"
+ else if (((b__0 = (0x302w : 12 words$word)))) then "medeleg"
+ else if (((b__0 = (0x303w : 12 words$word)))) then "mideleg"
+ else if (((b__0 = (0x304w : 12 words$word)))) then "mie"
+ else if (((b__0 = (0x305w : 12 words$word)))) then "mtvec"
+ else if (((b__0 = (0x306w : 12 words$word)))) then "mcounteren"
+ else if (((b__0 = (0x320w : 12 words$word)))) then "mcountinhibit"
+ else if (((b__0 = (0x340w : 12 words$word)))) then "mscratch"
+ else if (((b__0 = (0x341w : 12 words$word)))) then "mepc"
+ else if (((b__0 = (0x342w : 12 words$word)))) then "mcause"
+ else if (((b__0 = (0x343w : 12 words$word)))) then "mtval"
+ else if (((b__0 = (0x344w : 12 words$word)))) then "mip"
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then "pmpcfg0"
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then "pmpcfg1"
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then "pmpcfg2"
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then "pmpcfg3"
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then "pmpaddr0"
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then "pmpaddr1"
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then "pmpaddr2"
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then "pmpaddr3"
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then "pmpaddr4"
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then "pmpaddr5"
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then "pmpaddr6"
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then "pmpaddr7"
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then "pmpaddr8"
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then "pmpaddr9"
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then "pmpaddr10"
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then "pmpaddr11"
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then "pmpaddr12"
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then "pmpaddr13"
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then "pmpaddr14"
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then "pmpaddr15"
+ else if (((b__0 = (0xB00w : 12 words$word)))) then "mcycle"
+ else if (((b__0 = (0xB02w : 12 words$word)))) then "minstret"
+ else if (((b__0 = (0xB80w : 12 words$word)))) then "mcycleh"
+ else if (((b__0 = (0xB82w : 12 words$word)))) then "minstreth"
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then "tselect"
+ else if (((b__0 = (0x7A1w : 12 words$word)))) then "tdata1"
+ else if (((b__0 = (0x7A2w : 12 words$word)))) then "tdata2"
+ else if (((b__0 = (0x7A3w : 12 words$word)))) then "tdata3"
+ else decimal_string_of_bits b__0))`;
+
+
+val _ = Define `
+ ((csr_name_map_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((12)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ustatus"))) then sail2_state_monad$returnS (0x000w : 12 words$word)
+ else if (((p0_ = "uie"))) then sail2_state_monad$returnS (0x004w : 12 words$word)
+ else if (((p0_ = "utvec"))) then sail2_state_monad$returnS (0x005w : 12 words$word)
+ else if (((p0_ = "uscratch"))) then sail2_state_monad$returnS (0x040w : 12 words$word)
+ else if (((p0_ = "uepc"))) then sail2_state_monad$returnS (0x041w : 12 words$word)
+ else if (((p0_ = "ucause"))) then sail2_state_monad$returnS (0x042w : 12 words$word)
+ else if (((p0_ = "utval"))) then sail2_state_monad$returnS (0x043w : 12 words$word)
+ else if (((p0_ = "uip"))) then sail2_state_monad$returnS (0x044w : 12 words$word)
+ else if (((p0_ = "fflags"))) then sail2_state_monad$returnS (0x001w : 12 words$word)
+ else if (((p0_ = "frm"))) then sail2_state_monad$returnS (0x002w : 12 words$word)
+ else if (((p0_ = "fcsr"))) then sail2_state_monad$returnS (0x003w : 12 words$word)
+ else if (((p0_ = "cycle"))) then sail2_state_monad$returnS (0xC00w : 12 words$word)
+ else if (((p0_ = "time"))) then sail2_state_monad$returnS (0xC01w : 12 words$word)
+ else if (((p0_ = "instret"))) then sail2_state_monad$returnS (0xC02w : 12 words$word)
+ else if (((p0_ = "cycleh"))) then sail2_state_monad$returnS (0xC80w : 12 words$word)
+ else if (((p0_ = "timeh"))) then sail2_state_monad$returnS (0xC81w : 12 words$word)
+ else if (((p0_ = "instreth"))) then sail2_state_monad$returnS (0xC82w : 12 words$word)
+ else if (((p0_ = "sstatus"))) then sail2_state_monad$returnS (0x100w : 12 words$word)
+ else if (((p0_ = "sedeleg"))) then sail2_state_monad$returnS (0x102w : 12 words$word)
+ else if (((p0_ = "sideleg"))) then sail2_state_monad$returnS (0x103w : 12 words$word)
+ else if (((p0_ = "sie"))) then sail2_state_monad$returnS (0x104w : 12 words$word)
+ else if (((p0_ = "stvec"))) then sail2_state_monad$returnS (0x105w : 12 words$word)
+ else if (((p0_ = "scounteren"))) then sail2_state_monad$returnS (0x106w : 12 words$word)
+ else if (((p0_ = "sscratch"))) then sail2_state_monad$returnS (0x140w : 12 words$word)
+ else if (((p0_ = "sepc"))) then sail2_state_monad$returnS (0x141w : 12 words$word)
+ else if (((p0_ = "scause"))) then sail2_state_monad$returnS (0x142w : 12 words$word)
+ else if (((p0_ = "stval"))) then sail2_state_monad$returnS (0x143w : 12 words$word)
+ else if (((p0_ = "sip"))) then sail2_state_monad$returnS (0x144w : 12 words$word)
+ else if (((p0_ = "satp"))) then sail2_state_monad$returnS (0x180w : 12 words$word)
+ else if (((p0_ = "mvendorid"))) then sail2_state_monad$returnS (0xF11w : 12 words$word)
+ else if (((p0_ = "marchid"))) then sail2_state_monad$returnS (0xF12w : 12 words$word)
+ else if (((p0_ = "mimpid"))) then sail2_state_monad$returnS (0xF13w : 12 words$word)
+ else if (((p0_ = "mhartid"))) then sail2_state_monad$returnS (0xF14w : 12 words$word)
+ else if (((p0_ = "mstatus"))) then sail2_state_monad$returnS (0x300w : 12 words$word)
+ else if (((p0_ = "misa"))) then sail2_state_monad$returnS (0x301w : 12 words$word)
+ else if (((p0_ = "medeleg"))) then sail2_state_monad$returnS (0x302w : 12 words$word)
+ else if (((p0_ = "mideleg"))) then sail2_state_monad$returnS (0x303w : 12 words$word)
+ else if (((p0_ = "mie"))) then sail2_state_monad$returnS (0x304w : 12 words$word)
+ else if (((p0_ = "mtvec"))) then sail2_state_monad$returnS (0x305w : 12 words$word)
+ else if (((p0_ = "mcounteren"))) then sail2_state_monad$returnS (0x306w : 12 words$word)
+ else if (((p0_ = "mcountinhibit"))) then sail2_state_monad$returnS (0x320w : 12 words$word)
+ else if (((p0_ = "mscratch"))) then sail2_state_monad$returnS (0x340w : 12 words$word)
+ else if (((p0_ = "mepc"))) then sail2_state_monad$returnS (0x341w : 12 words$word)
+ else if (((p0_ = "mcause"))) then sail2_state_monad$returnS (0x342w : 12 words$word)
+ else if (((p0_ = "mtval"))) then sail2_state_monad$returnS (0x343w : 12 words$word)
+ else if (((p0_ = "mip"))) then sail2_state_monad$returnS (0x344w : 12 words$word)
+ else if (((p0_ = "pmpcfg0"))) then sail2_state_monad$returnS (0x3A0w : 12 words$word)
+ else if (((p0_ = "pmpcfg1"))) then sail2_state_monad$returnS (0x3A1w : 12 words$word)
+ else if (((p0_ = "pmpcfg2"))) then sail2_state_monad$returnS (0x3A2w : 12 words$word)
+ else if (((p0_ = "pmpcfg3"))) then sail2_state_monad$returnS (0x3A3w : 12 words$word)
+ else if (((p0_ = "pmpaddr0"))) then sail2_state_monad$returnS (0x3B0w : 12 words$word)
+ else if (((p0_ = "pmpaddr1"))) then sail2_state_monad$returnS (0x3B1w : 12 words$word)
+ else if (((p0_ = "pmpaddr2"))) then sail2_state_monad$returnS (0x3B2w : 12 words$word)
+ else if (((p0_ = "pmpaddr3"))) then sail2_state_monad$returnS (0x3B3w : 12 words$word)
+ else if (((p0_ = "pmpaddr4"))) then sail2_state_monad$returnS (0x3B4w : 12 words$word)
+ else if (((p0_ = "pmpaddr5"))) then sail2_state_monad$returnS (0x3B5w : 12 words$word)
+ else if (((p0_ = "pmpaddr6"))) then sail2_state_monad$returnS (0x3B6w : 12 words$word)
+ else if (((p0_ = "pmpaddr7"))) then sail2_state_monad$returnS (0x3B7w : 12 words$word)
+ else if (((p0_ = "pmpaddr8"))) then sail2_state_monad$returnS (0x3B8w : 12 words$word)
+ else if (((p0_ = "pmpaddr9"))) then sail2_state_monad$returnS (0x3B9w : 12 words$word)
+ else if (((p0_ = "pmpaddr10"))) then sail2_state_monad$returnS (0x3BAw : 12 words$word)
+ else if (((p0_ = "pmpaddr11"))) then sail2_state_monad$returnS (0x3BBw : 12 words$word)
+ else if (((p0_ = "pmpaddr12"))) then sail2_state_monad$returnS (0x3BCw : 12 words$word)
+ else if (((p0_ = "pmpaddr13"))) then sail2_state_monad$returnS (0x3BDw : 12 words$word)
+ else if (((p0_ = "pmpaddr14"))) then sail2_state_monad$returnS (0x3BEw : 12 words$word)
+ else if (((p0_ = "pmpaddr15"))) then sail2_state_monad$returnS (0x3BFw : 12 words$word)
+ else if (((p0_ = "mcycle"))) then sail2_state_monad$returnS (0xB00w : 12 words$word)
+ else if (((p0_ = "minstret"))) then sail2_state_monad$returnS (0xB02w : 12 words$word)
+ else if (((p0_ = "mcycleh"))) then sail2_state_monad$returnS (0xB80w : 12 words$word)
+ else if (((p0_ = "minstreth"))) then sail2_state_monad$returnS (0xB82w : 12 words$word)
+ else if (((p0_ = "tselect"))) then sail2_state_monad$returnS (0x7A0w : 12 words$word)
+ else if (((p0_ = "tdata1"))) then sail2_state_monad$returnS (0x7A1w : 12 words$word)
+ else if (((p0_ = "tdata2"))) then sail2_state_monad$returnS (0x7A2w : 12 words$word)
+ else if (((p0_ = "tdata3"))) then sail2_state_monad$returnS (0x7A3w : 12 words$word)
+ else if ((hex_bits_12_backwards_matches p0_)) then (hex_bits_12_backwards p0_ : ( 12 words$word) M)
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((csr_name_map_forwards_matches:(12)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0x000w : 12 words$word)))) then T
+ else if (((b__0 = (0x004w : 12 words$word)))) then T
+ else if (((b__0 = (0x005w : 12 words$word)))) then T
+ else if (((b__0 = (0x040w : 12 words$word)))) then T
+ else if (((b__0 = (0x041w : 12 words$word)))) then T
+ else if (((b__0 = (0x042w : 12 words$word)))) then T
+ else if (((b__0 = (0x043w : 12 words$word)))) then T
+ else if (((b__0 = (0x044w : 12 words$word)))) then T
+ else if (((b__0 = (0x001w : 12 words$word)))) then T
+ else if (((b__0 = (0x002w : 12 words$word)))) then T
+ else if (((b__0 = (0x003w : 12 words$word)))) then T
+ else if (((b__0 = (0xC00w : 12 words$word)))) then T
+ else if (((b__0 = (0xC01w : 12 words$word)))) then T
+ else if (((b__0 = (0xC02w : 12 words$word)))) then T
+ else if (((b__0 = (0xC80w : 12 words$word)))) then T
+ else if (((b__0 = (0xC81w : 12 words$word)))) then T
+ else if (((b__0 = (0xC82w : 12 words$word)))) then T
+ else if (((b__0 = (0x100w : 12 words$word)))) then T
+ else if (((b__0 = (0x102w : 12 words$word)))) then T
+ else if (((b__0 = (0x103w : 12 words$word)))) then T
+ else if (((b__0 = (0x104w : 12 words$word)))) then T
+ else if (((b__0 = (0x105w : 12 words$word)))) then T
+ else if (((b__0 = (0x106w : 12 words$word)))) then T
+ else if (((b__0 = (0x140w : 12 words$word)))) then T
+ else if (((b__0 = (0x141w : 12 words$word)))) then T
+ else if (((b__0 = (0x142w : 12 words$word)))) then T
+ else if (((b__0 = (0x143w : 12 words$word)))) then T
+ else if (((b__0 = (0x144w : 12 words$word)))) then T
+ else if (((b__0 = (0x180w : 12 words$word)))) then T
+ else if (((b__0 = (0xF11w : 12 words$word)))) then T
+ else if (((b__0 = (0xF12w : 12 words$word)))) then T
+ else if (((b__0 = (0xF13w : 12 words$word)))) then T
+ else if (((b__0 = (0xF14w : 12 words$word)))) then T
+ else if (((b__0 = (0x300w : 12 words$word)))) then T
+ else if (((b__0 = (0x301w : 12 words$word)))) then T
+ else if (((b__0 = (0x302w : 12 words$word)))) then T
+ else if (((b__0 = (0x303w : 12 words$word)))) then T
+ else if (((b__0 = (0x304w : 12 words$word)))) then T
+ else if (((b__0 = (0x305w : 12 words$word)))) then T
+ else if (((b__0 = (0x306w : 12 words$word)))) then T
+ else if (((b__0 = (0x320w : 12 words$word)))) then T
+ else if (((b__0 = (0x340w : 12 words$word)))) then T
+ else if (((b__0 = (0x341w : 12 words$word)))) then T
+ else if (((b__0 = (0x342w : 12 words$word)))) then T
+ else if (((b__0 = (0x343w : 12 words$word)))) then T
+ else if (((b__0 = (0x344w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then T
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then T
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then T
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then T
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then T
+ else if (((b__0 = (0xB00w : 12 words$word)))) then T
+ else if (((b__0 = (0xB02w : 12 words$word)))) then T
+ else if (((b__0 = (0xB80w : 12 words$word)))) then T
+ else if (((b__0 = (0xB82w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A1w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A2w : 12 words$word)))) then T
+ else if (((b__0 = (0x7A3w : 12 words$word)))) then T
+ else T))`;
+
+
+val _ = Define `
+ ((csr_name_map_backwards_matches:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "ustatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "utvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "ucause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "utval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "uip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "fflags"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "frm"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "fcsr"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "cycle"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "time"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "instret"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "cycleh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "timeh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "instreth"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sstatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sedeleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sideleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "stvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "scounteren"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "scause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "stval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "sip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "satp"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mvendorid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "marchid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mimpid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mhartid"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mstatus"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "misa"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "medeleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mideleg"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mie"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mtvec"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcounteren"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcountinhibit"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mscratch"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mepc"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcause"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mtval"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mip"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg0"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpcfg3"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr0"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr3"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr4"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr5"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr6"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr7"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr8"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr9"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr10"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr11"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr12"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr13"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr14"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "pmpaddr15"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcycle"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "minstret"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "mcycleh"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "minstreth"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tselect"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata1"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata2"))) then sail2_state_monad$returnS T
+ else if (((p0_ = "tdata3"))) then sail2_state_monad$returnS T
+ else if ((hex_bits_12_backwards_matches p0_)) then sail2_state_monad$bindS
+ (hex_bits_12_backwards p0_ : ( 12 words$word) M) (\ reg . sail2_state_monad$returnS T)
+ else sail2_state_monad$returnS F))`;
+
+
+(*val _s752_ : string -> maybe ((mword ty12 * string))*)
+
+val _ = Define `
+ ((s752_:string ->((12)words$word#string)option) s753_0=
+ ((case s753_0 of
+ s754_0 =>
+ (case ((hex_bits_12_matches_prefix0 s754_0 : (( 12 words$word # ii)) option)) of
+ SOME ((reg, s755_0)) =>
+ (case ((string_drop s754_0 s755_0)) of s_ => SOME (reg, s_) )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s748_ : string -> maybe string*)
+
+val _ = Define `
+ ((s748_:string ->(string)option) s749_0=
+ (let s750_0 = s749_0 in
+ if ((string_startswith s750_0 "tdata3")) then
+ (case ((string_drop s750_0 ((string_length "tdata3")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s744_ : string -> maybe string*)
+
+val _ = Define `
+ ((s744_:string ->(string)option) s745_0=
+ (let s746_0 = s745_0 in
+ if ((string_startswith s746_0 "tdata2")) then
+ (case ((string_drop s746_0 ((string_length "tdata2")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s740_ : string -> maybe string*)
+
+val _ = Define `
+ ((s740_:string ->(string)option) s741_0=
+ (let s742_0 = s741_0 in
+ if ((string_startswith s742_0 "tdata1")) then
+ (case ((string_drop s742_0 ((string_length "tdata1")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s736_ : string -> maybe string*)
+
+val _ = Define `
+ ((s736_:string ->(string)option) s737_0=
+ (let s738_0 = s737_0 in
+ if ((string_startswith s738_0 "tselect")) then
+ (case ((string_drop s738_0 ((string_length "tselect")))) of
+ s_ => SOME s_
)
- else if ((case ((s460_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s460_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s732_ : string -> maybe string*)
+
+val _ = Define `
+ ((s732_:string ->(string)option) s733_0=
+ (let s734_0 = s733_0 in
+ if ((string_startswith s734_0 "minstreth")) then
+ (case ((string_drop s734_0 ((string_length "minstreth")))) of
+ s_ => SOME s_
)
- else if ((case ((s464_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s464_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s728_ : string -> maybe string*)
+
+val _ = Define `
+ ((s728_:string ->(string)option) s729_0=
+ (let s730_0 = s729_0 in
+ if ((string_startswith s730_0 "mcycleh")) then
+ (case ((string_drop s730_0 ((string_length "mcycleh")))) of
+ s_ => SOME s_
)
- else if ((case ((s468_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s468_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s724_ : string -> maybe string*)
+
+val _ = Define `
+ ((s724_:string ->(string)option) s725_0=
+ (let s726_0 = s725_0 in
+ if ((string_startswith s726_0 "minstret")) then
+ (case ((string_drop s726_0 ((string_length "minstret")))) of
+ s_ => SOME s_
)
- else if ((case ((s472_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s472_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s720_ : string -> maybe string*)
+
+val _ = Define `
+ ((s720_:string ->(string)option) s721_0=
+ (let s722_0 = s721_0 in
+ if ((string_startswith s722_0 "mcycle")) then
+ (case ((string_drop s722_0 ((string_length "mcycle")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s716_ : string -> maybe string*)
+
+val _ = Define `
+ ((s716_:string ->(string)option) s717_0=
+ (let s718_0 = s717_0 in
+ if ((string_startswith s718_0 "pmpaddr15")) then
+ (case ((string_drop s718_0 ((string_length "pmpaddr15")))) of
+ s_ => SOME s_
)
- else if ((case ((s476_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s476_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s712_ : string -> maybe string*)
+
+val _ = Define `
+ ((s712_:string ->(string)option) s713_0=
+ (let s714_0 = s713_0 in
+ if ((string_startswith s714_0 "pmpaddr14")) then
+ (case ((string_drop s714_0 ((string_length "pmpaddr14")))) of
+ s_ => SOME s_
)
- else if ((case ((s480_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s480_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s708_ : string -> maybe string*)
+
+val _ = Define `
+ ((s708_:string ->(string)option) s709_0=
+ (let s710_0 = s709_0 in
+ if ((string_startswith s710_0 "pmpaddr13")) then
+ (case ((string_drop s710_0 ((string_length "pmpaddr13")))) of
+ s_ => SOME s_
)
- else if ((case ((s484_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s484_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s704_ : string -> maybe string*)
+
+val _ = Define `
+ ((s704_:string ->(string)option) s705_0=
+ (let s706_0 = s705_0 in
+ if ((string_startswith s706_0 "pmpaddr12")) then
+ (case ((string_drop s706_0 ((string_length "pmpaddr12")))) of
+ s_ => SOME s_
)
- else if ((case ((s488_ s203_0)) of SOME (s_) => T | _ => F )) then
- (case s488_ s203_0 of
- (SOME (s_)) =>
- SOME
- ((vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word),
- ((string_length arg_)) - ((string_length s_)))
+ else NONE))`;
+
+
+(*val _s700_ : string -> maybe string*)
+
+val _ = Define `
+ ((s700_:string ->(string)option) s701_0=
+ (let s702_0 = s701_0 in
+ if ((string_startswith s702_0 "pmpaddr11")) then
+ (case ((string_drop s702_0 ((string_length "pmpaddr11")))) of
+ s_ => SOME s_
)
else NONE))`;
-(*val Mk_Ustatus : mword ty64 -> Ustatus*)
+(*val _s696_ : string -> maybe string*)
val _ = Define `
- ((Mk_Ustatus:(64)words$word -> Ustatus) v=
- (<| Ustatus_Ustatus_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
+ ((s696_:string ->(string)option) s697_0=
+ (let s698_0 = s697_0 in
+ if ((string_startswith s698_0 "pmpaddr10")) then
+ (case ((string_drop s698_0 ((string_length "pmpaddr10")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val _get_Ustatus_bits : Ustatus -> mword ty64*)
+(*val _s692_ : string -> maybe string*)
val _ = Define `
- ((get_Ustatus_bits:Ustatus ->(64)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
+ ((s692_:string ->(string)option) s693_0=
+ (let s694_0 = s693_0 in
+ if ((string_startswith s694_0 "pmpaddr9")) then
+ (case ((string_drop s694_0 ((string_length "pmpaddr9")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val _set_Ustatus_bits : register_ref regstate register_value Ustatus -> mword ty64 -> M unit*)
+(*val _s688_ : string -> maybe string*)
val _ = Define `
- ((set_Ustatus_bits:((regstate),(register_value),(Ustatus))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s688_:string ->(string)option) s689_0=
+ (let s690_0 = s689_0 in
+ if ((string_startswith s690_0 "pmpaddr8")) then
+ (case ((string_drop s690_0 ((string_length "pmpaddr8")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val _update_Ustatus_bits : Ustatus -> mword ty64 -> Ustatus*)
+(*val _s684_ : string -> maybe string*)
val _ = Define `
- ((update_Ustatus_bits:Ustatus ->(64)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ ((s684_:string ->(string)option) s685_0=
+ (let s686_0 = s685_0 in
+ if ((string_startswith s686_0 "pmpaddr7")) then
+ (case ((string_drop s686_0 ((string_length "pmpaddr7")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s680_ : string -> maybe string*)
+
val _ = Define `
- ((get_Ustatus_UPIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+ ((s680_:string ->(string)option) s681_0=
+ (let s682_0 = s681_0 in
+ if ((string_startswith s682_0 "pmpaddr6")) then
+ (case ((string_drop s682_0 ((string_length "pmpaddr6")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+(*val _s676_ : string -> maybe string*)
val _ = Define `
- ((set_Ustatus_UPIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s676_:string ->(string)option) s677_0=
+ (let s678_0 = s677_0 in
+ if ((string_startswith s678_0 "pmpaddr5")) then
+ (case ((string_drop s678_0 ((string_length "pmpaddr5")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+(*val _s672_ : string -> maybe string*)
val _ = Define `
- ((update_Ustatus_UPIE:Ustatus ->(1)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ ((s672_:string ->(string)option) s673_0=
+ (let s674_0 = s673_0 in
+ if ((string_startswith s674_0 "pmpaddr4")) then
+ (case ((string_drop s674_0 ((string_length "pmpaddr4")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s668_ : string -> maybe string*)
+
val _ = Define `
- ((get_Ustatus_UIE:Ustatus ->(1)words$word) v= ((subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+ ((s668_:string ->(string)option) s669_0=
+ (let s670_0 = s669_0 in
+ if ((string_startswith s670_0 "pmpaddr3")) then
+ (case ((string_drop s670_0 ((string_length "pmpaddr3")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s664_ : string -> maybe string*)
+
val _ = Define `
- ((set_Ustatus_UIE:((regstate),(register_value),(Ustatus))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec r.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s664_:string ->(string)option) s665_0=
+ (let s666_0 = s665_0 in
+ if ((string_startswith s666_0 "pmpaddr2")) then
+ (case ((string_drop s666_0 ((string_length "pmpaddr2")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s660_ : string -> maybe string*)
+
val _ = Define `
- ((update_Ustatus_UIE:Ustatus ->(1)words$word -> Ustatus) v x=
- ((v with<|
- Ustatus_Ustatus_chunk_0 :=
- ((update_subrange_vec_dec v.Ustatus_Ustatus_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ ((s660_:string ->(string)option) s661_0=
+ (let s662_0 = s661_0 in
+ if ((string_startswith s662_0 "pmpaddr1")) then
+ (case ((string_drop s662_0 ((string_length "pmpaddr1")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lower_sstatus : Sstatus -> Ustatus*)
+(*val _s656_ : string -> maybe string*)
val _ = Define `
- ((lower_sstatus:Sstatus -> Ustatus) s=
- (let u = (Mk_Ustatus ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
- let u = (update_Ustatus_UPIE u ((get_Sstatus_UPIE s : 1 words$word))) in
- update_Ustatus_UIE u ((get_Sstatus_UIE s : 1 words$word))))`;
+ ((s656_:string ->(string)option) s657_0=
+ (let s658_0 = s657_0 in
+ if ((string_startswith s658_0 "pmpaddr0")) then
+ (case ((string_drop s658_0 ((string_length "pmpaddr0")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lift_ustatus : Sstatus -> Ustatus -> Sstatus*)
+(*val _s652_ : string -> maybe string*)
val _ = Define `
- ((lift_ustatus:Sstatus -> Ustatus -> Sstatus) (s : Sstatus) (u : Ustatus)=
- (let s = (update_Sstatus_UPIE s ((get_Ustatus_UPIE u : 1 words$word))) in
- update_Sstatus_UIE s ((get_Ustatus_UIE u : 1 words$word))))`;
+ ((s652_:string ->(string)option) s653_0=
+ (let s654_0 = s653_0 in
+ if ((string_startswith s654_0 "pmpcfg3")) then
+ (case ((string_drop s654_0 ((string_length "pmpcfg3")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val legalize_ustatus : Mstatus -> mword ty64 -> M Mstatus*)
+(*val _s648_ : string -> maybe string*)
val _ = Define `
- ((legalize_ustatus:Mstatus ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Mstatus),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (m : Mstatus) (v : xlenbits)=
- (let u = (Mk_Ustatus v) in
- let s = (lower_mstatus m) in
- let s = (lift_ustatus s u) in
- lift_sstatus m s))`;
+ ((s648_:string ->(string)option) s649_0=
+ (let s650_0 = s649_0 in
+ if ((string_startswith s650_0 "pmpcfg2")) then
+ (case ((string_drop s650_0 ((string_length "pmpcfg2")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val Mk_Uinterrupts : mword ty64 -> Uinterrupts*)
+(*val _s644_ : string -> maybe string*)
val _ = Define `
- ((Mk_Uinterrupts:(64)words$word -> Uinterrupts) v=
- (<| Uinterrupts_Uinterrupts_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
+ ((s644_:string ->(string)option) s645_0=
+ (let s646_0 = s645_0 in
+ if ((string_startswith s646_0 "pmpcfg1")) then
+ (case ((string_drop s646_0 ((string_length "pmpcfg1")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val _get_Uinterrupts_bits : Uinterrupts -> mword ty64*)
+(*val _s640_ : string -> maybe string*)
val _ = Define `
- ((get_Uinterrupts_bits:Uinterrupts ->(64)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
+ ((s640_:string ->(string)option) s641_0=
+ (let s642_0 = s641_0 in
+ if ((string_startswith s642_0 "pmpcfg0")) then
+ (case ((string_drop s642_0 ((string_length "pmpcfg0")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val _set_Uinterrupts_bits : register_ref regstate register_value Uinterrupts -> mword ty64 -> M unit*)
+(*val _s636_ : string -> maybe string*)
val _ = Define `
- ((set_Uinterrupts_bits:((regstate),(register_value),(Uinterrupts))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s636_:string ->(string)option) s637_0=
+ (let s638_0 = s637_0 in
+ if ((string_startswith s638_0 "mip")) then
+ (case ((string_drop s638_0 ((string_length "mip")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val _update_Uinterrupts_bits : Uinterrupts -> mword ty64 -> Uinterrupts*)
+(*val _s632_ : string -> maybe string*)
val _ = Define `
- ((update_Uinterrupts_bits:Uinterrupts ->(64)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ ((s632_:string ->(string)option) s633_0=
+ (let s634_0 = s633_0 in
+ if ((string_startswith s634_0 "mtval")) then
+ (case ((string_drop s634_0 ((string_length "mtval")))) of s_ => SOME s_ )
+ else NONE))`;
+(*val _s628_ : string -> maybe string*)
+
val _ = Define `
- ((get_Uinterrupts_UEI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)))`;
+ ((s628_:string ->(string)option) s629_0=
+ (let s630_0 = s629_0 in
+ if ((string_startswith s630_0 "mcause")) then
+ (case ((string_drop s630_0 ((string_length "mcause")))) of s_ => SOME s_ )
+ else NONE))`;
+(*val _s624_ : string -> maybe string*)
+
val _ = Define `
- ((set_Uinterrupts_UEI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s624_:string ->(string)option) s625_0=
+ (let s626_0 = s625_0 in
+ if ((string_startswith s626_0 "mepc")) then
+ (case ((string_drop s626_0 ((string_length "mepc")))) of s_ => SOME s_ )
+ else NONE))`;
+(*val _s620_ : string -> maybe string*)
+
val _ = Define `
- ((update_Uinterrupts_UEI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 8 : int):ii) (( 8 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ ((s620_:string ->(string)option) s621_0=
+ (let s622_0 = s621_0 in
+ if ((string_startswith s622_0 "mscratch")) then
+ (case ((string_drop s622_0 ((string_length "mscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s616_ : string -> maybe string*)
+
val _ = Define `
- ((get_Uinterrupts_UTI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)))`;
+ ((s616_:string ->(string)option) s617_0=
+ (let s618_0 = s617_0 in
+ if ((string_startswith s618_0 "mcountinhibit")) then
+ (case ((string_drop s618_0 ((string_length "mcountinhibit")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s612_ : string -> maybe string*)
+
val _ = Define `
- ((set_Uinterrupts_UTI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s612_:string ->(string)option) s613_0=
+ (let s614_0 = s613_0 in
+ if ((string_startswith s614_0 "mcounteren")) then
+ (case ((string_drop s614_0 ((string_length "mcounteren")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+(*val _s608_ : string -> maybe string*)
+
val _ = Define `
- ((update_Uinterrupts_UTI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ ((s608_:string ->(string)option) s609_0=
+ (let s610_0 = s609_0 in
+ if ((string_startswith s610_0 "mtvec")) then
+ (case ((string_drop s610_0 ((string_length "mtvec")))) of s_ => SOME s_ )
+ else NONE))`;
+(*val _s604_ : string -> maybe string*)
+
val _ = Define `
- ((get_Uinterrupts_USI:Uinterrupts ->(1)words$word) v=
- ((subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)))`;
+ ((s604_:string ->(string)option) s605_0=
+ (let s606_0 = s605_0 in
+ if ((string_startswith s606_0 "mie")) then
+ (case ((string_drop s606_0 ((string_length "mie")))) of s_ => SOME s_ )
+ else NONE))`;
+
+(*val _s600_ : string -> maybe string*)
val _ = Define `
- ((set_Uinterrupts_USI:((regstate),(register_value),(Uinterrupts))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS r_ref) (\ r .
- let r =
- ((r with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec r.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)) in
- sail2_state_monad$write_regS r_ref r)))`;
+ ((s600_:string ->(string)option) s601_0=
+ (let s602_0 = s601_0 in
+ if ((string_startswith s602_0 "mideleg")) then
+ (case ((string_drop s602_0 ((string_length "mideleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+(*val _s596_ : string -> maybe string*)
val _ = Define `
- ((update_Uinterrupts_USI:Uinterrupts ->(1)words$word -> Uinterrupts) v x=
- ((v with<|
- Uinterrupts_Uinterrupts_chunk_0 :=
- ((update_subrange_vec_dec v.Uinterrupts_Uinterrupts_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
- ((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 64 words$word))|>)))`;
+ ((s596_:string ->(string)option) s597_0=
+ (let s598_0 = s597_0 in
+ if ((string_startswith s598_0 "medeleg")) then
+ (case ((string_drop s598_0 ((string_length "medeleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lower_sip : Sinterrupts -> Sinterrupts -> Uinterrupts*)
+(*val _s592_ : string -> maybe string*)
val _ = Define `
- ((lower_sip:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
- (let (u : Uinterrupts) =
- (Mk_Uinterrupts ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
- let u =
- (update_Uinterrupts_UEI u
- ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
- : 1 words$word))) in
- let u =
- (update_Uinterrupts_UTI u
- ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
- : 1 words$word))) in
- update_Uinterrupts_USI u
- ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
- : 1 words$word))))`;
+ ((s592_:string ->(string)option) s593_0=
+ (let s594_0 = s593_0 in
+ if ((string_startswith s594_0 "misa")) then
+ (case ((string_drop s594_0 ((string_length "misa")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val lower_sie : Sinterrupts -> Sinterrupts -> Uinterrupts*)
+(*val _s588_ : string -> maybe string*)
val _ = Define `
- ((lower_sie:Sinterrupts -> Sinterrupts -> Uinterrupts) (s : Sinterrupts) (d : Sinterrupts)=
- (let (u : Uinterrupts) =
- (Mk_Uinterrupts ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))) in
- let u =
- (update_Uinterrupts_UEI u
- ((and_vec ((get_Sinterrupts_UEI s : 1 words$word)) ((get_Sinterrupts_UEI d : 1 words$word))
- : 1 words$word))) in
- let u =
- (update_Uinterrupts_UTI u
- ((and_vec ((get_Sinterrupts_UTI s : 1 words$word)) ((get_Sinterrupts_UTI d : 1 words$word))
- : 1 words$word))) in
- update_Uinterrupts_USI u
- ((and_vec ((get_Sinterrupts_USI s : 1 words$word)) ((get_Sinterrupts_USI d : 1 words$word))
- : 1 words$word))))`;
+ ((s588_:string ->(string)option) s589_0=
+ (let s590_0 = s589_0 in
+ if ((string_startswith s590_0 "mstatus")) then
+ (case ((string_drop s590_0 ((string_length "mstatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val lift_uip : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
+(*val _s584_ : string -> maybe string*)
val _ = Define `
- ((lift_uip:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
- (let (s : Sinterrupts) = o1 in
- if (((((get_Sinterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
- else s))`;
+ ((s584_:string ->(string)option) s585_0=
+ (let s586_0 = s585_0 in
+ if ((string_startswith s586_0 "mhartid")) then
+ (case ((string_drop s586_0 ((string_length "mhartid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val legalize_uip : Sinterrupts -> Sinterrupts -> mword ty64 -> Sinterrupts*)
+(*val _s580_ : string -> maybe string*)
val _ = Define `
- ((legalize_uip:Sinterrupts -> Sinterrupts ->(64)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
- (lift_uip s d ((Mk_Uinterrupts v))))`;
+ ((s580_:string ->(string)option) s581_0=
+ (let s582_0 = s581_0 in
+ if ((string_startswith s582_0 "mimpid")) then
+ (case ((string_drop s582_0 ((string_length "mimpid")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val lift_uie : Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts*)
+(*val _s576_ : string -> maybe string*)
val _ = Define `
- ((lift_uie:Sinterrupts -> Sinterrupts -> Uinterrupts -> Sinterrupts) (o1 : Sinterrupts) (d : Sinterrupts) (u : Uinterrupts)=
- (let (s : Sinterrupts) = o1 in
- let s =
- (if (((((get_Sinterrupts_UEI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_UEI s ((get_Uinterrupts_UEI u : 1 words$word))
- else s) in
- let s =
- (if (((((get_Sinterrupts_UTI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_UTI s ((get_Uinterrupts_UTI u : 1 words$word))
- else s) in
- if (((((get_Sinterrupts_USI d : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- update_Sinterrupts_USI s ((get_Uinterrupts_USI u : 1 words$word))
- else s))`;
+ ((s576_:string ->(string)option) s577_0=
+ (let s578_0 = s577_0 in
+ if ((string_startswith s578_0 "marchid")) then
+ (case ((string_drop s578_0 ((string_length "marchid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val legalize_uie : Sinterrupts -> Sinterrupts -> mword ty64 -> Sinterrupts*)
+(*val _s572_ : string -> maybe string*)
val _ = Define `
- ((legalize_uie:Sinterrupts -> Sinterrupts ->(64)words$word -> Sinterrupts) (s : Sinterrupts) (d : Sinterrupts) (v : xlenbits)=
- (lift_uie s d ((Mk_Uinterrupts v))))`;
+ ((s572_:string ->(string)option) s573_0=
+ (let s574_0 = s573_0 in
+ if ((string_startswith s574_0 "mvendorid")) then
+ (case ((string_drop s574_0 ((string_length "mvendorid")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val handle_trap_extension : Privilege -> mword ty64 -> maybe unit -> unit*)
+(*val _s568_ : string -> maybe string*)
val _ = Define `
- ((handle_trap_extension:Privilege ->(64)words$word ->(unit)option -> unit) (p : Privilege) (pc : xlenbits) (u : unit option)= () )`;
+ ((s568_:string ->(string)option) s569_0=
+ (let s570_0 = s569_0 in
+ if ((string_startswith s570_0 "satp")) then
+ (case ((string_drop s570_0 ((string_length "satp")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val prepare_trap_vector : Privilege -> Mcause -> M (mword ty64)*)
+(*val _s564_ : string -> maybe string*)
val _ = Define `
- ((prepare_trap_vector:Privilege -> Mcause ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (p : Privilege) (cause : Mcause)= (sail2_state_monad$bindS
- (case p of
- Machine => sail2_state_monad$read_regS mtvec_ref
- | Supervisor => sail2_state_monad$read_regS stvec_ref
- | User => sail2_state_monad$read_regS utvec_ref
- ) (\ (tvec : Mtvec) .
- (case ((tvec_addr tvec cause : ( 64 words$word)option)) of
- SOME (epc) => sail2_state_monad$returnS epc
- | NONE => (internal_error "Invalid tvec mode" : ( 64 words$word) M)
- ))))`;
+ ((s564_:string ->(string)option) s565_0=
+ (let s566_0 = s565_0 in
+ if ((string_startswith s566_0 "sip")) then
+ (case ((string_drop s566_0 ((string_length "sip")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val get_xret_target : Privilege -> M (mword ty64)*)
+(*val _s560_ : string -> maybe string*)
val _ = Define `
- ((get_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p=
- ((case p of
- Machine => (sail2_state_monad$read_regS mepc_ref : ( 64 words$word) M)
- | Supervisor => (sail2_state_monad$read_regS sepc_ref : ( 64 words$word) M)
- | User => (sail2_state_monad$read_regS uepc_ref : ( 64 words$word) M)
- )))`;
+ ((s560_:string ->(string)option) s561_0=
+ (let s562_0 = s561_0 in
+ if ((string_startswith s562_0 "stval")) then
+ (case ((string_drop s562_0 ((string_length "stval")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val set_xret_target : Privilege -> mword ty64 -> M (mword ty64)*)
+(*val _s556_ : string -> maybe string*)
val _ = Define `
- ((set_xret_target:Privilege ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p value= (sail2_state_monad$bindS
- (legalize_xepc value : ( 64 words$word) M) (\ target . sail2_state_monad$seqS
- (case p of
- Machine => sail2_state_monad$write_regS mepc_ref target
- | Supervisor => sail2_state_monad$write_regS sepc_ref target
- | User => sail2_state_monad$write_regS uepc_ref target
- )
- (sail2_state_monad$returnS target))))`;
+ ((s556_:string ->(string)option) s557_0=
+ (let s558_0 = s557_0 in
+ if ((string_startswith s558_0 "scause")) then
+ (case ((string_drop s558_0 ((string_length "scause")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val prepare_xret_target : Privilege -> M (mword ty64)*)
+(*val _s552_ : string -> maybe string*)
val _ = Define `
- ((prepare_xret_target:Privilege ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) p= ((get_xret_target p : ( 64 words$word) M)))`;
+ ((s552_:string ->(string)option) s553_0=
+ (let s554_0 = s553_0 in
+ if ((string_startswith s554_0 "sepc")) then
+ (case ((string_drop s554_0 ((string_length "sepc")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val get_mtvec : unit -> M (mword ty64)*)
+(*val _s548_ : string -> maybe string*)
val _ = Define `
- ((get_mtvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
+ ((s548_:string ->(string)option) s549_0=
+ (let s550_0 = s549_0 in
+ if ((string_startswith s550_0 "sscratch")) then
+ (case ((string_drop s550_0 ((string_length "sscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_stvec : unit -> M (mword ty64)*)
+(*val _s544_ : string -> maybe string*)
val _ = Define `
- ((get_stvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
+ ((s544_:string ->(string)option) s545_0=
+ (let s546_0 = s545_0 in
+ if ((string_startswith s546_0 "scounteren")) then
+ (case ((string_drop s546_0 ((string_length "scounteren")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val get_utvec : unit -> M (mword ty64)*)
+(*val _s540_ : string -> maybe string*)
val _ = Define `
- ((get_utvec:unit ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__0 : 64 words$word)))))`;
+ ((s540_:string ->(string)option) s541_0=
+ (let s542_0 = s541_0 in
+ if ((string_startswith s542_0 "stvec")) then
+ (case ((string_drop s542_0 ((string_length "stvec")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val set_mtvec : mword ty64 -> M (mword ty64)*)
+(*val _s536_ : string -> maybe string*)
val _ = Define `
- ((set_mtvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mtvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS mtvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
+ ((s536_:string ->(string)option) s537_0=
+ (let s538_0 = s537_0 in
+ if ((string_startswith s538_0 "sie")) then
+ (case ((string_drop s538_0 ((string_length "sie")))) of s_ => SOME s_ )
+ else NONE))`;
-(*val set_stvec : mword ty64 -> M (mword ty64)*)
+(*val _s532_ : string -> maybe string*)
val _ = Define `
- ((set_stvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS stvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS stvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS stvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
+ ((s532_:string ->(string)option) s533_0=
+ (let s534_0 = s533_0 in
+ if ((string_startswith s534_0 "sideleg")) then
+ (case ((string_drop s534_0 ((string_length "sideleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val set_utvec : mword ty64 -> M (mword ty64)*)
+(*val _s528_ : string -> maybe string*)
val _ = Define `
- ((set_utvec:(64)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) value= (sail2_state_monad$bindS
- (sail2_state_monad$read_regS utvec_ref) (\ (w__0 : Mtvec) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS utvec_ref ((legalize_tvec w__0 value)))
- (sail2_state_monad$read_regS utvec_ref)) (\ (w__1 : Mtvec) . sail2_state_monad$returnS ((get_Mtvec_bits w__1 : 64 words$word))))))`;
+ ((s528_:string ->(string)option) s529_0=
+ (let s530_0 = s529_0 in
+ if ((string_startswith s530_0 "sedeleg")) then
+ (case ((string_drop s530_0 ((string_length "sedeleg")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val is_NExt_CSR_defined : mword ty12 -> Privilege -> M bool*)
+(*val _s524_ : string -> maybe string*)
val _ = Define `
- ((is_NExt_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : 12 bits) (p : Privilege)=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- haveUsrMode ()
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- haveUsrMode ()
- else sail2_state_monad$returnS F))`;
+ ((s524_:string ->(string)option) s525_0=
+ (let s526_0 = s525_0 in
+ if ((string_startswith s526_0 "sstatus")) then
+ (case ((string_drop s526_0 ((string_length "sstatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s520_ : string -> maybe string*)
+
+val _ = Define `
+ ((s520_:string ->(string)option) s521_0=
+ (let s522_0 = s521_0 in
+ if ((string_startswith s522_0 "instreth")) then
+ (case ((string_drop s522_0 ((string_length "instreth")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
-(*val read_NExt_CSR : mword ty12 -> M (maybe (mword ty64))*)
+(*val _s516_ : string -> maybe string*)
val _ = Define `
- ((read_NExt_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((64)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr=
- (let b__0 = csr in
- if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ ((s516_:string ->(string)option) s517_0=
+ (let s518_0 = s517_0 in
+ if ((string_startswith s518_0 "timeh")) then
+ (case ((string_drop s518_0 ((string_length "timeh")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s512_ : string -> maybe string*)
+
+val _ = Define `
+ ((s512_:string ->(string)option) s513_0=
+ (let s514_0 = s513_0 in
+ if ((string_startswith s514_0 "cycleh")) then
+ (case ((string_drop s514_0 ((string_length "cycleh")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s508_ : string -> maybe string*)
+
+val _ = Define `
+ ((s508_:string ->(string)option) s509_0=
+ (let s510_0 = s509_0 in
+ if ((string_startswith s510_0 "instret")) then
+ (case ((string_drop s510_0 ((string_length "instret")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s504_ : string -> maybe string*)
+
+val _ = Define `
+ ((s504_:string ->(string)option) s505_0=
+ (let s506_0 = s505_0 in
+ if ((string_startswith s506_0 "time")) then
+ (case ((string_drop s506_0 ((string_length "time")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s500_ : string -> maybe string*)
+
+val _ = Define `
+ ((s500_:string ->(string)option) s501_0=
+ (let s502_0 = s501_0 in
+ if ((string_startswith s502_0 "cycle")) then
+ (case ((string_drop s502_0 ((string_length "cycle")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s496_ : string -> maybe string*)
+
+val _ = Define `
+ ((s496_:string ->(string)option) s497_0=
+ (let s498_0 = s497_0 in
+ if ((string_startswith s498_0 "fcsr")) then
+ (case ((string_drop s498_0 ((string_length "fcsr")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s492_ : string -> maybe string*)
+
+val _ = Define `
+ ((s492_:string ->(string)option) s493_0=
+ (let s494_0 = s493_0 in
+ if ((string_startswith s494_0 "frm")) then
+ (case ((string_drop s494_0 ((string_length "frm")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s488_ : string -> maybe string*)
+
+val _ = Define `
+ ((s488_:string ->(string)option) s489_0=
+ (let s490_0 = s489_0 in
+ if ((string_startswith s490_0 "fflags")) then
+ (case ((string_drop s490_0 ((string_length "fflags")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s484_ : string -> maybe string*)
+
+val _ = Define `
+ ((s484_:string ->(string)option) s485_0=
+ (let s486_0 = s485_0 in
+ if ((string_startswith s486_0 "uip")) then
+ (case ((string_drop s486_0 ((string_length "uip")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s480_ : string -> maybe string*)
+
+val _ = Define `
+ ((s480_:string ->(string)option) s481_0=
+ (let s482_0 = s481_0 in
+ if ((string_startswith s482_0 "utval")) then
+ (case ((string_drop s482_0 ((string_length "utval")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s476_ : string -> maybe string*)
+
+val _ = Define `
+ ((s476_:string ->(string)option) s477_0=
+ (let s478_0 = s477_0 in
+ if ((string_startswith s478_0 "ucause")) then
+ (case ((string_drop s478_0 ((string_length "ucause")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s472_ : string -> maybe string*)
+
+val _ = Define `
+ ((s472_:string ->(string)option) s473_0=
+ (let s474_0 = s473_0 in
+ if ((string_startswith s474_0 "uepc")) then
+ (case ((string_drop s474_0 ((string_length "uepc")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s468_ : string -> maybe string*)
+
+val _ = Define `
+ ((s468_:string ->(string)option) s469_0=
+ (let s470_0 = s469_0 in
+ if ((string_startswith s470_0 "uscratch")) then
+ (case ((string_drop s470_0 ((string_length "uscratch")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s464_ : string -> maybe string*)
+
+val _ = Define `
+ ((s464_:string ->(string)option) s465_0=
+ (let s466_0 = s465_0 in
+ if ((string_startswith s466_0 "utvec")) then
+ (case ((string_drop s466_0 ((string_length "utvec")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s460_ : string -> maybe string*)
+
+val _ = Define `
+ ((s460_:string ->(string)option) s461_0=
+ (let s462_0 = s461_0 in
+ if ((string_startswith s462_0 "uie")) then
+ (case ((string_drop s462_0 ((string_length "uie")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s456_ : string -> maybe string*)
+
+val _ = Define `
+ ((s456_:string ->(string)option) s457_0=
+ (let s458_0 = s457_0 in
+ if ((string_startswith s458_0 "ustatus")) then
+ (case ((string_drop s458_0 ((string_length "ustatus")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((csr_name_map_matches_prefix:string ->((12)words$word#int)option) arg_=
+ (let s459_0 = arg_ in
+ if ((case ((s456_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s456_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x000w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s460_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s460_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x004w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s464_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s464_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x005w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s468_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s468_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x040w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s472_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s472_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x041w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s476_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s476_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x042w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s480_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s480_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x043w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s484_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s484_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x044w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s488_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s488_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x001w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s492_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s492_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x002w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s496_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s496_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x003w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s500_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s500_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC00w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s504_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s504_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC01w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s508_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s508_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC02w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s512_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s512_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC80w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s516_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s516_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC81w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s520_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s520_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xC82w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s524_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s524_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x100w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s528_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s528_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x102w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s532_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s532_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x103w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s536_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s536_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x104w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s540_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s540_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x105w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s544_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s544_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x106w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s548_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s548_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x140w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s552_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s552_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x141w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s556_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s556_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x142w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s560_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s560_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x143w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s564_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s564_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x144w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s568_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s568_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x180w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s572_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s572_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF11w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s576_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s576_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF12w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s580_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s580_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF13w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s584_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s584_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xF14w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s588_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s588_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x300w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s592_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s592_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x301w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s596_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s596_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x302w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s600_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s600_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x303w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s604_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s604_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x304w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s608_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s608_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x305w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s612_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s612_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x306w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s616_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s616_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x320w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s620_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s620_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x340w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s624_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s624_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x341w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s628_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s628_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x342w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s632_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s632_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x343w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s636_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s636_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x344w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s640_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s640_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s644_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s644_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s648_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s648_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s652_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s652_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3A3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s656_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s656_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s660_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s660_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s664_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s664_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s668_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s668_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s672_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s672_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B4w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s676_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s676_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B5w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s680_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s680_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B6w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s684_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s684_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B7w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s688_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s688_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B8w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s692_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s692_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3B9w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s696_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s696_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BAw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s700_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s700_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BBw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s704_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s704_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BCw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s708_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s708_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BDw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s712_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s712_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BEw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s716_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s716_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x3BFw : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s720_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s720_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB00w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s724_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s724_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB02w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s728_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s728_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB80w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s732_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s732_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0xB82w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s736_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s736_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A0w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s740_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s740_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A1w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s744_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s744_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A2w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s748_ s459_0)) of SOME (s_) => T | _ => F )) then
+ (case s748_ s459_0 of
+ (SOME (s_)) =>
+ SOME
+ ((0x7A3w : 12 words$word), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s752_ s459_0 : (( 12 words$word # string))option)) of
+ SOME ((reg, s_)) => T
+ | _ => F
+ )) then (case (s752_ s459_0 : (( 12 words$word # string)) option) of
+ (SOME ((reg, s_))) =>
+ SOME (reg, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((csr_name:(12)words$word -> string) csr= (csr_name_map_forwards csr))`;
+
+
+val _ = Define `
+ ((ext_is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0 g__337=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state$and_boolS ((haveUsrMode () )) ((haveNExt () ))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state$or_boolS ((haveFExt () )) ((haveDExt () ))
+ else sail2_state_monad$returnS F))`;
+
+
+val _ = Define `
+ ((ext_read_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((64)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
sail2_state_monad$returnS (SOME ((get_Ustatus_bits ((lower_sstatus ((lower_mstatus w__0)))) : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__1 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__2 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS sideleg_ref) (\ (w__3 : Sinterrupts) .
sail2_state_monad$returnS (SOME ((get_Uinterrupts_bits ((lower_sie ((lower_mie w__1 w__2)) w__3)) : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state_monad$bindS
(get_utvec () : ( 64 words$word) M) (\ (w__4 : 64 words$word) . sail2_state_monad$returnS (SOME w__4))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS uscratch_ref : ( 64 words$word) M) (\ (w__5 : 64 words$word) . sail2_state_monad$returnS (SOME w__5))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state_monad$bindS
(get_xret_target User : ( 64 words$word) M) (\ (w__6 : 64 words$word) . sail2_state_monad$bindS
(pc_alignment_mask () : ( 64 words$word) M) (\ (w__7 : 64 words$word) .
sail2_state_monad$returnS (SOME ((and_vec w__6 w__7 : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS ucause_ref) (\ (w__8 : Mcause) .
sail2_state_monad$returnS (SOME ((get_Mcause_bits w__8 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS utval_ref : ( 64 words$word) M) (\ (w__9 : 64 words$word) . sail2_state_monad$returnS (SOME w__9))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mip_ref) (\ (w__10 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__11 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS sideleg_ref) (\ (w__12 : Sinterrupts) .
sail2_state_monad$returnS (SOME ((get_Uinterrupts_bits ((lower_sip ((lower_mip w__10 w__11)) w__12))
: 64 words$word))))))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__13 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_FFLAGS w__13 : 5 words$word)) : 64 words$word))))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__14 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_FRM w__14 : 3 words$word)) : 64 words$word))))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__15 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_bits w__15 : 32 words$word)) : 64 words$word))))
else sail2_state_monad$returnS NONE))`;
-(*val write_NExt_CSR : mword ty12 -> mword ty64 -> M bool*)
-
-val _ = Define `
- ((write_NExt_CSR:(12)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)=
- (let b__0 = csr in sail2_state_monad$bindS
- (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
- (legalize_ustatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mstatus_ref w__1)
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
- sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__3 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__4 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__5 : Sinterrupts) .
- let sie = (legalize_uie ((lower_mie w__3 w__4)) w__5 value) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) . sail2_state_monad$bindS
- (lift_sie w__6 w__7 sie) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mie_ref w__8)
- (sail2_state_monad$read_regS mie_ref)) (\ (w__9 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 64 words$word))))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_utvec value : ( 64 words$word) M) (\ (w__10 : 64 words$word) . sail2_state_monad$returnS (SOME w__10))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS uscratch_ref value)
- (sail2_state_monad$read_regS uscratch_ref : ( 64 words$word) M)) (\ (w__11 : 64 words$word) . sail2_state_monad$returnS (SOME w__11))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target User value : ( 64 words$word) M) (\ (w__12 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__12))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (set_Mcause_bits ucause_ref value)
- (sail2_state_monad$read_regS ucause_ref)) (\ (w__13 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__13 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS utval_ref value)
- (sail2_state_monad$read_regS utval_ref : ( 64 words$word) M)) (\ (w__14 : 64 words$word) . sail2_state_monad$returnS (SOME w__14))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__15 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__16 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__17 : Sinterrupts) .
- let sip = (legalize_uip ((lower_mip w__15 w__16)) w__17 value) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__18 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__19 : Minterrupts) . sail2_state_monad$bindS
- (lift_sip w__18 w__19 sip) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__20)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__21 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__21 : 64 words$word))))))))))
- else sail2_state_monad$returnS NONE) (\ (res : xlenbits option) .
- sail2_state_monad$returnS ((case res of
- SOME (v) =>
- let (_ : unit) =
- (if ((get_config_print_reg () )) then
- print_dbg
- ((STRCAT "CSR "
- ((STRCAT ((csr_name csr))
- ((STRCAT " <- "
- ((STRCAT ((string_of_bits v))
- ((STRCAT " (input: " ((STRCAT ((string_of_bits value)) ")"))))))))))))
- else () ) in
- T
- | NONE => F
- )))))`;
-
-
-(*val ext_is_CSR_defined : mword ty12 -> Privilege -> M bool*)
-
-val _ = Define `
- ((ext_is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)= (is_NExt_CSR_defined csr p))`;
-
-
-(*val ext_read_CSR : mword ty12 -> M (maybe (mword ty64))*)
-
-val _ = Define `
- ((ext_read_CSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((64)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr= ((read_NExt_CSR csr : ( ( 64 words$word)option) M)))`;
-
-
-(*val ext_write_CSR : mword ty12 -> mword ty64 -> M bool*)
-
val _ = Define `
- ((ext_write_CSR:(12)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)= (write_NExt_CSR csr value))`;
+ ((ext_write_CSR:(12)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((((64)words$word)option),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) b__0 value=
+ (if (((b__0 = (0x000w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (legalize_ustatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mstatus_ref w__1)
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
+ sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 64 words$word))))))
+ else if (((b__0 = (0x004w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__3 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__4 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__5 : Sinterrupts) .
+ let sie = (legalize_uie ((lower_mie w__3 w__4)) w__5 value) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) . sail2_state_monad$bindS
+ (lift_sie w__6 w__7 sie) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mie_ref w__8)
+ (sail2_state_monad$read_regS mie_ref)) (\ (w__9 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 64 words$word))))))))))
+ else if (((b__0 = (0x005w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_utvec value : ( 64 words$word) M) (\ (w__10 : 64 words$word) . sail2_state_monad$returnS (SOME w__10))
+ else if (((b__0 = (0x040w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS uscratch_ref value)
+ (sail2_state_monad$read_regS uscratch_ref : ( 64 words$word) M)) (\ (w__11 : 64 words$word) . sail2_state_monad$returnS (SOME w__11))
+ else if (((b__0 = (0x041w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target User value : ( 64 words$word) M) (\ (w__12 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__12))
+ else if (((b__0 = (0x042w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (set_Mcause_bits ucause_ref value)
+ (sail2_state_monad$read_regS ucause_ref)) (\ (w__13 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__13 : 64 words$word))))
+ else if (((b__0 = (0x043w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS utval_ref value)
+ (sail2_state_monad$read_regS utval_ref : ( 64 words$word) M)) (\ (w__14 : 64 words$word) . sail2_state_monad$returnS (SOME w__14))
+ else if (((b__0 = (0x044w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__15 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__16 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__17 : Sinterrupts) .
+ let sip = (legalize_uip ((lower_mip w__15 w__16)) w__17 value) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__18 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__19 : Minterrupts) . sail2_state_monad$bindS
+ (lift_sip w__18 w__19 sip) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__20)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__21 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__21 : 64 words$word))))))))))
+ else if (((b__0 = (0x001w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__22 : Fcsr) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((get_Fcsr_FRM w__22 : 3 words$word))
+ ((subrange_vec_dec value (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__23 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_FFLAGS w__23 : 5 words$word)) : 64 words$word)))))
+ else if (((b__0 = (0x002w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__24 : Fcsr) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((subrange_vec_dec value (( 2 : int):ii) (( 0 : int):ii) : 3 words$word))
+ ((get_Fcsr_FFLAGS w__24 : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__25 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_FRM w__25 : 3 words$word)) : 64 words$word)))))
+ else if (((b__0 = (0x003w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (ext_write_fcsr ((subrange_vec_dec value (( 7 : int):ii) (( 5 : int):ii) : 3 words$word))
+ ((subrange_vec_dec value (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)))
+ (sail2_state_monad$read_regS fcsr_ref)) (\ (w__26 : Fcsr) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Fcsr_bits w__26 : 32 words$word)) : 64 words$word))))
+ else sail2_state_monad$returnS NONE))`;
(*val csrAccess : mword ty12 -> mword ty2*)
@@ -11856,136 +14105,92 @@ val _ = Define `
val _ = Define `
((is_CSR_defined:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)=
(let b__0 = csr in
- if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then
+ if (((b__0 = (0xF11w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF12w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF13w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xF14w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x302w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) (sail2_state$or_boolS ((haveSupMode () )) ((haveNExt () )))
+ else if (((b__0 = (0x303w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) (sail2_state$or_boolS ((haveSupMode () )) ((haveNExt () )))
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x305w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x306w : 12 words$word)))) then
+ sail2_state$and_boolS (sail2_state_monad$returnS (((p = Machine)))) ((haveUsrMode () ))
+ else if (((b__0 = (0x310w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x340w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x343w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A1w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3A3w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0xB80w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0xB82w : 12 words$word)))) then
+ sail2_state_monad$returnS ((((((p = Machine))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$returnS (((p = Machine)))
+ else if (((b__0 = (0x100w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x102w : 12 words$word)))) then
sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
+ (sail2_state$and_boolS ((haveNExt () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor))))))))
+ else if (((b__0 = (0x103w : 12 words$word)))) then
sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) \/ (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word)))))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word)))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
- sail2_state_monad$returnS ((((((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))) /\ ((((( 64 : int):ii) = (( 32 : int):ii)))))))
+ (sail2_state$and_boolS ((haveNExt () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor))))))))
+ else if (((b__0 = (0x104w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x106w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x140w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x141w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x142w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x143w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x144w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((((((p = Machine))) \/ (((p = Supervisor)))))))
+ else if (((b__0 = (0xC00w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC01w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC02w : 12 words$word)))) then haveUsrMode ()
+ else if (((b__0 = (0xC80w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii)))))
+ else if (((b__0 = (0xC81w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii)))))
+ else if (((b__0 = (0xC82w : 12 words$word)))) then
+ sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii)))))
else ext_is_CSR_defined csr p))`;
@@ -11993,19 +14198,17 @@ val _ = Define `
val _ = Define `
((check_CSR_access:(2)words$word ->(2)words$word -> Privilege -> bool -> bool) csrrw csrpr p isWrite=
- (((~ ((((((isWrite = T))) /\ (((csrrw = (vec_of_bits [B1;B1] : 2 words$word))))))))) /\ ((zopz0zKzJ_u ((privLevel_to_bits p : 2 words$word)) csrpr))))`;
+ (((~ ((((((isWrite = T))) /\ (((csrrw = (0b11w : 2 words$word))))))))) /\ ((zopz0zKzJ_u ((privLevel_to_bits p : 2 words$word)) csrpr))))`;
(*val check_TVM_SATP : mword ty12 -> Privilege -> M bool*)
val _ = Define `
((check_TVM_SATP:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)= (sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((csr = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits p : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word))))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((csr = (0x180w : 12 words$word)))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((p = Supervisor))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_TVM w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ (w__2 :
+ sail2_state_monad$returnS (((((get_Mstatus_TVM w__0 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ (w__2 :
bool) .
sail2_state_monad$returnS ((~ w__2)))))`;
@@ -12016,59 +14219,53 @@ val _ = Define `
((check_Counteren:(12)words$word -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (p : Privilege)=
((case (csr, p) of
(b__0, Supervisor) =>
- if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ if (((b__0 = (0xC00w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__0 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__0 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Counteren_CY w__0 : 1 words$word)) = (0b1w : 1 words$word)))))
+ else if (((b__0 = (0xC01w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__1 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__1 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Counteren_TM w__1 : 1 words$word)) = (0b1w : 1 words$word)))))
+ else if (((b__0 = (0xC02w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__2 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__2 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__2 : 1 words$word)) = (0b1w : 1 words$word)))))
else
sail2_state_monad$returnS ((case (b__0, Supervisor) of
(_, _) =>
- if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T
))
| (b__3, User) =>
- if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
+ if (((b__3 = (0xC00w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__6 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__6 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_CY w__6 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__7 : bool) . sail2_state_monad$returnS ((~ w__7))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__8 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_CY w__8 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- else if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then
+ sail2_state_monad$returnS (((((get_Counteren_CY w__8 : 1 words$word)) = (0b1w : 1 words$word)))))))
+ else if (((b__3 = (0xC01w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__11 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__11 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_TM w__11 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__12 : bool) . sail2_state_monad$returnS ((~ w__12))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__13 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_TM w__13 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- else if (((b__3 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then
+ sail2_state_monad$returnS (((((get_Counteren_TM w__13 : 1 words$word)) = (0b1w : 1 words$word)))))))
+ else if (((b__3 = (0xC02w : 12 words$word)))) then
sail2_state$and_boolS
( sail2_state_monad$bindS(sail2_state_monad$read_regS mcounteren_ref) (\ (w__16 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__16 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__16 : 1 words$word)) = (0b1w : 1 words$word))))))
(sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__17 : bool) . sail2_state_monad$returnS ((~ w__17))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS scounteren_ref) (\ (w__18 : Counteren) .
- sail2_state_monad$returnS (((((get_Counteren_IR w__18 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
+ sail2_state_monad$returnS (((((get_Counteren_IR w__18 : 1 words$word)) = (0b1w : 1 words$word)))))))
else
sail2_state_monad$returnS ((case (b__3, User) of
(_, _) =>
- if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T
))
| (_, _) =>
- sail2_state_monad$returnS (if (((((zopz0zIzJ_u (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)
- csr)) /\ ((zopz0zIzJ_u csr
- (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B1;B1;B1;B1;B1] : 12 words$word)))))) then
+ sail2_state_monad$returnS (if (((((zopz0zIzJ_u (0xC03w : 12 words$word) csr)) /\ ((zopz0zIzJ_u csr (0xC1Fw : 12 words$word)))))) then
F
else T)
)))`;
@@ -12090,18 +14287,18 @@ val _ = Define `
((exception_delegatee:ExceptionType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->(((Privilege),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (e : ExceptionType) (p : Privilege)=
(let idx = (num_of_ExceptionType e) in sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__0 : Medeleg) .
- let super = (access_vec_dec ((get_Medeleg_bits w__0 : 64 words$word)) idx) in sail2_state_monad$bindS
+ let super = (bit_to_bool ((access_vec_dec ((get_Medeleg_bits w__0 : 64 words$word)) idx))) in sail2_state_monad$bindS
(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$bindS
(if w__1 then
- sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool super)))
+ sail2_state$and_boolS (sail2_state_monad$returnS super)
(sail2_state$and_boolS ((haveNExt () ))
( sail2_state_monad$bindS(sail2_state_monad$read_regS sedeleg_ref) (\ (w__3 : Sedeleg) .
sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec ((get_Sedeleg_bits w__3 : 64 words$word)) idx)))))))
- else sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool super))) ((haveNExt () ))) (\ user . sail2_state_monad$bindS
+ else sail2_state$and_boolS (sail2_state_monad$returnS super) ((haveNExt () ))) (\ user . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveUsrMode () )) (sail2_state_monad$returnS user)) (\ w__9 . sail2_state_monad$bindS
(if w__9 then sail2_state_monad$returnS User
else sail2_state_monad$bindS
- (sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS ((bit_to_bool super)))) (\ (w__11 : bool) .
+ (sail2_state$and_boolS ((haveSupMode () )) (sail2_state_monad$returnS super)) (\ w__11 .
sail2_state_monad$returnS (if w__11 then Supervisor
else Machine))) (\ deleg .
sail2_state_monad$returnS (if ((zopz0zI_u ((privLevel_to_bits deleg : 2 words$word))
@@ -12115,32 +14312,20 @@ val _ = Define `
val _ = Define `
((findPendingInterrupt:(64)words$word ->(InterruptType)option) ip=
(let ip = (Mk_Minterrupts ip) in
- if (((((get_Minterrupts_MEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then
- SOME I_M_External
- else if (((((get_Minterrupts_MSI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ if (((((get_Minterrupts_MEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_M_External
+ else if (((((get_Minterrupts_MSI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_M_Software
- else if (((((get_Minterrupts_MTI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_M_Timer
- else if (((((get_Minterrupts_SEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_MTI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_M_Timer
+ else if (((((get_Minterrupts_SEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_S_External
- else if (((((get_Minterrupts_SSI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_SSI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_S_Software
- else if (((((get_Minterrupts_STI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_S_Timer
- else if (((((get_Minterrupts_UEI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_STI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_S_Timer
+ else if (((((get_Minterrupts_UEI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_U_External
- else if (((((get_Minterrupts_USI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
+ else if (((((get_Minterrupts_USI ip : 1 words$word)) = (0b1w : 1 words$word)))) then
SOME I_U_Software
- else if (((((get_Minterrupts_UTI ip : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- SOME I_U_Timer
+ else if (((((get_Minterrupts_UTI ip : 1 words$word)) = (0b1w : 1 words$word)))) then SOME I_U_Timer
else NONE))`;
@@ -12154,11 +14339,9 @@ val _ = Define `
: 64 words$word))
: 64 words$word)) in
let effective_delg = ((and_vec ((get_Minterrupts_bits xip : 64 words$word)) xideleg : 64 words$word)) in
- if (((priv_enabled /\ (((effective_pend <> ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))))))
- then
+ if (((priv_enabled /\ (((effective_pend <> ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))))))) then
Ints_Pending effective_pend
- else if (((effective_delg <> ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))
- then
+ else if (((effective_delg <> ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))) then
Ints_Delegated effective_delg
else Ints_Empty () ))`;
@@ -12175,28 +14358,22 @@ val _ = Define `
((and_vec ((get_Minterrupts_bits w__1 : 64 words$word))
((get_Minterrupts_bits w__2 : 64 words$word))
: 64 words$word)) in
- if (((effective_pending = ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))
- then
+ if (((effective_pending = ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))) then
sail2_state_monad$returnS NONE
else sail2_state_monad$bindS
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) <> ((privLevel_to_bits Machine : 2 words$word))))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((priv <> Machine))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = Machine))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__3 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_MIE w__3 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ mIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_MIE w__3 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ mIE . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveSupMode () ))
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Supervisor : 2 words$word))))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((priv = User))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = Supervisor))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__6 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_SIE w__6 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))))) (\ sIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_SIE w__6 : 1 words$word)) = (0b1w : 1 words$word))))))))) (\ sIE . sail2_state_monad$bindS
(sail2_state$and_boolS ((haveNExt () ))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits User : 2 words$word))))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((priv = User))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__10 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_UIE w__10 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))) (\ uIE . sail2_state_monad$bindS
+ sail2_state_monad$returnS (((((get_Mstatus_UIE w__10 : 1 words$word)) = (0b1w : 1 words$word)))))))) (\ uIE . sail2_state_monad$bindS
(sail2_state_monad$read_regS mip_ref) (\ (w__12 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__13 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__14 : Minterrupts) .
@@ -12238,7 +14415,7 @@ val _ = Define `
(sail2_state$and_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
( sail2_state_monad$bindS(haveNExt () ) (\ (w__2 : bool) . sail2_state_monad$returnS ((~ w__2)))))) (\ (w__4 : bool) .
if w__4 then sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$assert_expS (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word))))) "invalid current privilege")
+ (sail2_state_monad$assert_expS (((priv = Machine))) "invalid current privilege")
(sail2_state_monad$read_regS mip_ref)) (\ (w__5 : Minterrupts) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__6 : Minterrupts) .
let enabled_pending =
@@ -12272,7 +14449,7 @@ val _ = Define `
((tval:((64)words$word)option ->(64)words$word) excinfo=
((case excinfo of
SOME (e) => e
- | NONE => (EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)
+ | NONE => (EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)
)))`;
@@ -12306,7 +14483,7 @@ val _ = Define `
(set_Mcause_Cause mcause_ref ((EXTZ (( 63 : int):ii) c : 63 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__0 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MPIE mstatus_ref ((get_Mstatus_MIE w__0 : 1 words$word)))
- (set_Mstatus_MIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_MIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__1 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MPP mstatus_ref ((privLevel_to_bits w__1 : 2 words$word)))
(sail2_state_monad$write_regS mtval_ref ((tval info : 64 words$word))))
@@ -12328,11 +14505,11 @@ val _ = Define `
(set_Mcause_Cause scause_ref ((EXTZ (( 63 : int):ii) c : 63 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__6 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_SPIE mstatus_ref ((get_Mstatus_SIE w__6 : 1 words$word)))
- (set_Mstatus_SIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_SIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__7 : Privilege) . sail2_state_monad$bindS
(case w__7 of
- User => sail2_state_monad$returnS ((bool_to_bits F : 1 words$word))
- | Supervisor => sail2_state_monad$returnS ((bool_to_bits T : 1 words$word))
+ User => sail2_state_monad$returnS (0b0w : 1 words$word)
+ | Supervisor => sail2_state_monad$returnS (0b1w : 1 words$word)
| Machine => (internal_error "invalid privilege for s-mode trap" : ( 1 words$word) M)
) (\ (w__9 : 1 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_SPP mstatus_ref w__9)
@@ -12355,7 +14532,7 @@ val _ = Define `
(set_Mcause_Cause ucause_ref ((EXTZ (( 63 : int):ii) c : 63 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__14 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_UPIE mstatus_ref ((get_Mstatus_UIE w__14 : 1 words$word)))
- (set_Mstatus_UIE mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_UIE mstatus_ref (0b0w : 1 words$word)))
(sail2_state_monad$write_regS utval_ref ((tval info : 64 words$word))))
(sail2_state_monad$write_regS uepc_ref pc))
(sail2_state_monad$write_regS cur_privilege_ref del_priv))
@@ -12395,83 +14572,87 @@ val _ = Define `
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(set_Mstatus_MIE mstatus_ref ((get_Mstatus_MPIE w__1 : 1 words$word)))
- (set_Mstatus_MPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
+ (set_Mstatus_MPIE mstatus_ref (0b1w : 1 words$word)))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) . sail2_state_monad$bindS
(privLevel_of_bits ((get_Mstatus_MPP w__2 : 2 words$word))) (\ (w__3 : Privilege) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS cur_privilege_ref w__3)
- (haveUsrMode () )) (\ (w__4 : bool) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (haveUsrMode () )) (\ (w__4 : bool) . sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mstatus_MPP mstatus_ref
((privLevel_to_bits (if w__4 then User else Machine) : 2 words$word)))
+ (sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__5 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((w__5 <> Machine))) then set_Mstatus_MPRV mstatus_ref (0b0w : 1 words$word)
+ else sail2_state_monad$returnS () )
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__5 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__6 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__5 : 64 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__6 : 64 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__6 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__7 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__6)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__7)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target Machine : ( 64 words$word) M) (\ (w__7 : 64 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 64 words$word) M) (\ (w__8 : 64 words$word) .
- sail2_state_monad$returnS ((and_vec w__7 w__8 : 64 words$word))))))))))
+ (prepare_xret_target Machine : ( 64 words$word) M) (\ (w__8 : 64 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 64 words$word) M) (\ (w__9 : 64 words$word) .
+ sail2_state_monad$returnS ((and_vec w__8 w__9 : 64 words$word)))))))))))
| (_, CTL_SRET (() )) => sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__9 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Mstatus_SIE mstatus_ref ((get_Mstatus_SPIE w__9 : 1 words$word)))
- (set_Mstatus_SPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__10 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__10 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Mstatus_SIE mstatus_ref ((get_Mstatus_SPIE w__10 : 1 words$word)))
+ (set_Mstatus_SPIE mstatus_ref (0b1w : 1 words$word)))
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__11 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
cur_privilege_ref
- (if (((((get_Mstatus_SPP w__10 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))
- then
- Supervisor
+ (if (((((get_Mstatus_SPP w__11 : 1 words$word)) = (0b1w : 1 words$word)))) then Supervisor
else User))
- (set_Mstatus_SPP mstatus_ref ((bool_to_bits F : 1 words$word))))
+ (set_Mstatus_SPP mstatus_ref (0b0w : 1 words$word)))
+ (sail2_state_monad$read_regS cur_privilege_ref)) (\ (w__12 : Privilege) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((w__12 <> Machine))) then set_Mstatus_MPRV mstatus_ref (0b0w : 1 words$word)
+ else sail2_state_monad$returnS () )
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__11 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__13 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__11 : 64 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__13 : 64 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__12 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__14 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__12)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__14)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target Supervisor : ( 64 words$word) M) (\ (w__13 : 64 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 64 words$word) M) (\ (w__14 : 64 words$word) .
- sail2_state_monad$returnS ((and_vec w__13 w__14 : 64 words$word))))))))
+ (prepare_xret_target Supervisor : ( 64 words$word) M) (\ (w__15 : 64 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 64 words$word) M) (\ (w__16 : 64 words$word) .
+ sail2_state_monad$returnS ((and_vec w__15 w__16 : 64 words$word)))))))))
| (_, CTL_URET (() )) => sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ prev_priv . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__15 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Mstatus_UIE mstatus_ref ((get_Mstatus_UPIE w__15 : 1 words$word)))
- (set_Mstatus_UPIE mstatus_ref ((bool_to_bits T : 1 words$word))))
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__17 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (set_Mstatus_UIE mstatus_ref ((get_Mstatus_UPIE w__17 : 1 words$word)))
+ (set_Mstatus_UPIE mstatus_ref (0b1w : 1 words$word)))
(sail2_state_monad$write_regS cur_privilege_ref User))
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__16 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__18 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((string_of_bits ((get_Mstatus_bits w__16 : 64 words$word)))))))))
+ ((string_of_bits ((get_Mstatus_bits w__18 : 64 words$word)))))))))
else sail2_state_monad$returnS () ))
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__17 : Privilege) .
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__19 : Privilege) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "ret-ing from "
((STRCAT ((privLevel_to_str prev_priv))
- ((STRCAT " to " ((privLevel_to_str w__17)))))))))))
+ ((STRCAT " to " ((privLevel_to_str w__19)))))))))))
else sail2_state_monad$returnS () ))
(let (_ : unit) = (cancel_reservation () ) in sail2_state_monad$bindS
- (prepare_xret_target User : ( 64 words$word) M) (\ (w__18 : 64 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 64 words$word) M) (\ (w__19 : 64 words$word) .
- sail2_state_monad$returnS ((and_vec w__18 w__19 : 64 words$word)))))))
+ (prepare_xret_target User : ( 64 words$word) M) (\ (w__20 : 64 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 64 words$word) M) (\ (w__21 : 64 words$word) .
+ sail2_state_monad$returnS ((and_vec w__20 w__21 : 64 words$word)))))))
)))`;
@@ -12489,6 +14670,20 @@ val _ = Define `
set_next_pc w__2)))))`;
+(*val handle_exception : ExceptionType -> M unit*)
+
+val _ = Define `
+ ((handle_exception:ExceptionType ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) e=
+ (let (t : sync_exception) =
+ (<| sync_exception_trap := e;
+ sync_exception_excinfo := NONE;
+ sync_exception_ext := NONE |>) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS
+ (exception_handler w__0 (CTL_TRAP t) w__1 : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ set_next_pc w__2)))))`;
+
+
(*val handle_interrupt : InterruptType -> Privilege -> M unit*)
val _ = Define `
@@ -12502,49 +14697,72 @@ val _ = Define `
(*val init_sys : unit -> M unit*)
val _ = Define `
- ((init_sys:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ ((init_sys:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS cur_privilege_ref Machine)
- (sail2_state_monad$write_regS mhartid_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mhartid_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
(set_Misa_MXL misa_ref ((arch_to_bits RV64 : 2 words$word))))
- (set_Misa_A misa_ref ((bool_to_bits T : 1 words$word))))
+ (set_Misa_A misa_ref (0b1w : 1 words$word)))
(set_Misa_C misa_ref ((bool_to_bits ((sys_enable_rvc () )) : 1 words$word))))
- (set_Misa_I misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_M misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_U misa_ref ((bool_to_bits T : 1 words$word))))
- (set_Misa_S misa_ref ((bool_to_bits T : 1 words$word))))
+ (set_Misa_I misa_ref (0b1w : 1 words$word)))
+ (set_Misa_M misa_ref (0b1w : 1 words$word)))
+ (set_Misa_U misa_ref (0b1w : 1 words$word)))
+ (set_Misa_S misa_ref (0b1w : 1 words$word)))
+ (set_Misa_F misa_ref ((bool_to_bits ((sys_enable_fdext () )) : 1 words$word))))
+ (set_Misa_D misa_ref ((bool_to_bits ((sys_enable_fdext () )) : 1 words$word))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__1 : Misa) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref ((set_mstatus_SXL w__0 ((get_Misa_MXL w__1 : 2 words$word)))))
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref ((set_mstatus_UXL w__2 ((get_Misa_MXL w__3 : 2 words$word)))))
- (set_Mstatus_SD mstatus_ref ((bool_to_bits F : 1 words$word))))
- (set_Minterrupts_bits mip_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Minterrupts_bits mie_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Minterrupts_bits mideleg_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Medeleg_bits medeleg_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Mtvec_bits mtvec_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Mcause_bits mcause_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mepc_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mtval_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mscratch_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mcycle_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (sail2_state_monad$write_regS mtime_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
- (set_Counteren_bits mcounteren_ref ((EXTZ (( 32 : int):ii) (vec_of_bits [B0] : 1 words$word) : 32 words$word))))
- (sail2_state_monad$write_regS minstret_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
+ (set_Mstatus_SD mstatus_ref (0b0w : 1 words$word)))
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__4 : Mstatus) . sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ mstatus_ref
+ ((Mk_Mstatus
+ ((update_subrange_vec_dec ((get_Mstatus_bits w__4 : 64 words$word)) (( 37 : int):ii) (( 36 : int):ii)
+ (0b00w : 2 words$word)
+ : 64 words$word)))))
+ (set_Mstatush_bits mstatush_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (set_Minterrupts_bits mip_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Minterrupts_bits mie_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Minterrupts_bits mideleg_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Medeleg_bits medeleg_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Mtvec_bits mtvec_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Mcause_bits mcause_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mepc_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mtval_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mscratch_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mcycle_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS mtime_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (set_Counteren_bits mcounteren_ref ((EXTZ (( 32 : int):ii) (0b0w : 1 words$word) : 32 words$word))))
+ (sail2_state_monad$write_regS minstret_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
(sail2_state_monad$write_regS minstret_written_ref F))
(init_pmp () ))
(if ((get_config_print_reg () )) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__5 : Mstatus) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "CSR mstatus <- "
- ((STRCAT ((string_of_bits ((get_Mstatus_bits w__4 : 64 words$word))))
+ ((STRCAT ((string_of_bits ((get_Mstatus_bits w__5 : 64 words$word))))
((STRCAT " (input: "
((STRCAT
- ((string_of_bits
- ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word))))
+ ((string_of_bits ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
")")))))))))))
- else sail2_state_monad$returnS () )))))))`;
+ else sail2_state_monad$returnS () ))))))))`;
+
+
+(*val MemoryOpResult_add_meta : forall 't. MemoryOpResult 't -> unit -> MemoryOpResult (('t * unit))*)
+
+val _ = Define `
+ ((MemoryOpResult_add_meta:'t MemoryOpResult -> unit ->('t#unit)MemoryOpResult) r m=
+ ((case r of MemValue (v) => MemValue (v, m) | MemException (e) => MemException e )))`;
+
+
+(*val MemoryOpResult_drop_meta : forall 't. MemoryOpResult (('t * unit)) -> MemoryOpResult 't*)
+
+val _ = Define `
+ ((MemoryOpResult_drop_meta:('t#unit)MemoryOpResult -> 't MemoryOpResult) r=
+ ((case r of MemValue ((v, m)) => MemValue v | MemException (e) => MemException e )))`;
(*val elf_tohost : unit -> ii*)
@@ -12621,44 +14839,29 @@ val _ = Define `
val _ = Define `
-((MSIP_BASE:(64)words$word)=
- ((EXTZ (( 64 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 20 words$word)
- : 64 words$word)))`;
+((MSIP_BASE:(64)words$word)= ((0x0000000000000000w : 64 words$word)))`;
val _ = Define `
-((MTIMECMP_BASE:(64)words$word)=
- ((EXTZ (( 64 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 20 words$word)
- : 64 words$word)))`;
+((MTIMECMP_BASE:(64)words$word)= ((0x0000000000004000w : 64 words$word)))`;
val _ = Define `
-((MTIMECMP_BASE_HI:(64)words$word)=
- ((EXTZ (( 64 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0] : 20 words$word)
- : 64 words$word)))`;
+((MTIMECMP_BASE_HI:(64)words$word)= ((0x0000000000004004w : 64 words$word)))`;
val _ = Define `
-((MTIME_BASE:(64)words$word)=
- ((EXTZ (( 64 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B0;B0;B0] : 20 words$word)
- : 64 words$word)))`;
+((MTIME_BASE:(64)words$word)= ((0x000000000000BFF8w : 64 words$word)))`;
val _ = Define `
-((MTIME_BASE_HI:(64)words$word)=
- ((EXTZ (( 64 : int):ii)
- (vec_of_bits [B0;B0;B0;B0;B1;B0;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B1;B0;B0] : 20 words$word)
- : 64 words$word)))`;
+((MTIME_BASE_HI:(64)words$word)= ((0x000000000000BFFCw : 64 words$word)))`;
-(*val clint_load : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val clint_load : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
val _ = Define `
- ((clint_load:(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width=
+ ((clint_load:(unit)AccessType ->(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) t addr width=
(let addr = ((sub_vec addr ((plat_clint_base () : 64 words$word)) : 64 words$word)) in
if ((((((addr = MSIP_BASE))) /\ ((((((((id width)) = (( 8 : int):ii)))) \/ (((((id width)) = (( 4 : int):ii)))))))))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
@@ -12760,7 +14963,11 @@ val _ = Define `
print_dbg
((STRCAT "clint[" ((STRCAT ((string_of_bits addr)) "] -> <not-mapped>"))))
else () ) in
- sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
(*val clint_dispatch : unit -> M unit*)
@@ -12771,7 +14978,7 @@ val _ = Define `
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT "clint::tick mtime <- " ((string_of_bits w__0)))))))
else sail2_state_monad$returnS () )
- (set_Minterrupts_MTI mip_ref ((bool_to_bits F : 1 words$word))))
+ (set_Minterrupts_MTI mip_ref (0b0w : 1 words$word)))
(sail2_state_monad$read_regS mtimecmp_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
if ((zopz0zIzJ_u w__1 w__2)) then sail2_state_monad$seqS
@@ -12779,7 +14986,7 @@ val _ = Define `
(sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT " clint timer pending at mtime " ((string_of_bits w__3)))))))
else sail2_state_monad$returnS () )
- (set_Minterrupts_MTI mip_ref ((bool_to_bits T : 1 words$word)))
+ (set_Minterrupts_MTI mip_ref (0b1w : 1 words$word))
else sail2_state_monad$returnS () ))))`;
@@ -12797,15 +15004,9 @@ val _ = Define `
((STRCAT "] <- "
((STRCAT ((string_of_bits data))
((STRCAT " (mip.MSI <- "
- ((STRCAT
- ((string_of_bits
- ((cast_unit_vec0 ((access_vec_dec data (( 0 : int):ii))) : 1 words$word))))
- ")"))))))))))))
+ ((STRCAT ((string_of_bit ((access_vec_dec data (( 0 : int):ii))))) ")"))))))))))))
else () ) in sail2_state_monad$seqS (sail2_state_monad$seqS
- (set_Minterrupts_MSI mip_ref
- ((bool_to_bits
- (((((cast_unit_vec0 ((access_vec_dec data (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B1] : 1 words$word))))
- : 1 words$word)))
+ (set_Minterrupts_MSI mip_ref (vec_of_bits [access_vec_dec data (( 0 : int):ii)] : 1 words$word))
(clint_dispatch () )) (sail2_state_monad$returnS (MemValue T))
else if ((((((addr = MTIMECMP_BASE))) /\ (((((id width)) = (( 8 : int):ii))))))) then
let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in
@@ -12856,17 +15057,20 @@ val _ = Define `
((STRCAT ((string_of_bits addr))
((STRCAT "] <- " ((STRCAT ((string_of_bits data)) " (<unmapped>)"))))))))
else () ) in
- sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
(*val tick_clock : unit -> M unit*)
val _ = Define `
((tick_clock:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mcycle_ref ((add_vec_int w__0 (( 1 : int):ii) : 64 words$word)))
- (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) . sail2_state_monad$seqS
- (sail2_state_monad$write_regS mtime_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word))) (clint_dispatch () )))))`;
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__0 : Counterin) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (if (((((get_Counterin_CY w__0 : 1 words$word)) = (0b0w : 1 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$write_regS mcycle_ref ((add_vec_int w__1 (( 1 : int):ii) : 64 words$word)))
+ else sail2_state_monad$returnS () )
+ (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M)) (\ (w__2 : 64 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mtime_ref ((add_vec_int w__2 (( 1 : int):ii) : 64 words$word))) (clint_dispatch () )))))`;
(*val Mk_htif_cmd : mword ty64 -> htif_cmd*)
@@ -12876,36 +15080,30 @@ val _ = Define `
(<| htif_cmd_htif_cmd_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_htif_cmd_bits : htif_cmd -> mword ty64*)
-
val _ = Define `
((get_htif_cmd_bits:htif_cmd ->(64)words$word) v=
((subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_htif_cmd_bits : register_ref regstate register_value htif_cmd -> mword ty64 -> M unit*)
-
val _ = Define `
((set_htif_cmd_bits:((regstate),(register_value),(htif_cmd))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_htif_cmd_bits : htif_cmd -> mword ty64 -> htif_cmd*)
-
val _ = Define `
((update_htif_cmd_bits:htif_cmd ->(64)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_device : htif_cmd -> mword ty8*)
@@ -12921,11 +15119,11 @@ val _ = Define `
((set_htif_cmd_device:((regstate),(register_value),(htif_cmd))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 56 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12933,11 +15131,11 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_device:htif_cmd ->(8)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 63 : int):ii) (( 56 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_cmd : htif_cmd -> mword ty8*)
@@ -12953,11 +15151,11 @@ val _ = Define `
((set_htif_cmd_cmd:((regstate),(register_value),(htif_cmd))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 55 : int):ii) (( 48 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12965,11 +15163,11 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_cmd:htif_cmd ->(8)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 55 : int):ii) (( 48 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val _get_htif_cmd_payload : htif_cmd -> mword ty48*)
@@ -12985,11 +15183,11 @@ val _ = Define `
((set_htif_cmd_payload:((regstate),(register_value),(htif_cmd))register_ref ->(48)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec r.htif_cmd_htif_cmd_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -12997,28 +15195,37 @@ val _ = Define `
val _ = Define `
((update_htif_cmd_payload:htif_cmd ->(48)words$word -> htif_cmd) v x=
- ((v with<|
+ (( v with<|
htif_cmd_htif_cmd_chunk_0 :=
((update_subrange_vec_dec v.htif_cmd_htif_cmd_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val htif_load : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val reset_htif : unit -> M unit*)
val _ = Define `
- ((htif_load:(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width= (sail2_state_monad$seqS
+ ((reset_htif:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_cmd_write_ref B0)
+ (sail2_state_monad$write_regS htif_payload_writes_ref (0x0w : 4 words$word)))
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))))`;
+
+
+(*val htif_load : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+
+val _ = Define `
+ ((htif_load:(unit)AccessType ->(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) t paddr width= (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg
((STRCAT "htif["
- ((STRCAT ((string_of_bits addr))
+ ((STRCAT ((string_of_bits paddr))
((STRCAT "] -> " ((string_of_bits w__0)))))))))))
else sail2_state_monad$returnS () )
- (if ((((((width = (( 8 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 64 words$word)))))))) then sail2_state_monad$bindS
+ (if ((((((width = (( 8 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 64 words$word)))))))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w ((zero_extend w__1 (( 64 : int):ii) : 64 words$word)) : 'int8_times_n words$word))))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 64 words$word))))))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 64 words$word))))))))
then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w
@@ -13026,7 +15233,7 @@ val _ = Define `
(( 32 : int):ii)
: 32 words$word))
: 'int8_times_n words$word))))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((add_vec_int ((plat_htif_tohost () : 64 words$word)) (( 4 : int):ii) : 64 words$word))))))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((add_vec_int ((plat_htif_tohost () : 64 words$word)) (( 4 : int):ii) : 64 words$word))))))))
then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
sail2_state_monad$returnS (MemValue ((words$w2w
@@ -13034,80 +15241,110 @@ val _ = Define `
(( 32 : int):ii)
: 32 words$word))
: 'int8_times_n words$word))))
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault))))`;
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ )))))`;
(*val htif_store : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> M (MemoryOpResult bool)*)
val _ = Define `
- ((htif_store:(64)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width data=
+ ((htif_store:(64)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width data=
(let (_ : unit) =
(if ((get_config_print_platform () )) then
print_dbg
((STRCAT "htif["
- ((STRCAT ((string_of_bits addr)) ((STRCAT "] <- " ((string_of_bits data))))))))
+ ((STRCAT ((string_of_bits paddr))
+ ((STRCAT "] <- " ((string_of_bits data))))))))
else () ) in sail2_state_monad$bindS (sail2_state_monad$seqS
(if (((width = (( 8 : int):ii)))) then
- let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in
- sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((plat_htif_tohost () : 64 words$word))))))))
+ let (data : 64 words$word) = ((words$w2w data : 64 words$word)) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_cmd_write_ref B1)
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M)) (\ (w__0 : 4 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__0 (( 1 : int):ii) : 4 words$word)))
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((plat_htif_tohost () : 64 words$word))))))))
then
let (data : 32 words$word) = ((words$w2w data : 32 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
- sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) data : 64 words$word)))
- else if ((((((width = (( 4 : int):ii)))) /\ (((addr = ((add_vec_int ((plat_htif_tohost () : 64 words$word)) (( 4 : int):ii) : 64 words$word))))))))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (if (((data = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__2 : 4 words$word) .
+ sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__2 (( 1 : int):ii) : 4 words$word)))
+ else sail2_state_monad$write_regS htif_payload_writes_ref (0x1w : 4 words$word))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__3 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__3 (( 31 : int):ii) (( 0 : int):ii) data : 64 words$word))))
+ else if ((((((width = (( 4 : int):ii)))) /\ (((paddr = ((add_vec_int ((plat_htif_tohost () : 64 words$word)) (( 4 : int):ii) : 64 words$word))))))))
then
let (data : 32 words$word) = ((words$w2w data : 32 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
- sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__1 (( 63 : int):ii) (( 32 : int):ii) data : 64 words$word)))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__4 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if (((((subrange_vec_dec data (( 15 : int):ii) (( 0 : int):ii) : 16 words$word)) = ((subrange_vec_dec w__4 (( 47 : int):ii) (( 32 : int):ii) : 16 words$word))))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__5 : 4 words$word) .
+ sail2_state_monad$write_regS htif_payload_writes_ref ((add_vec_int w__5 (( 1 : int):ii) : 4 words$word)))
+ else sail2_state_monad$write_regS htif_payload_writes_ref (0x1w : 4 words$word))
+ (sail2_state_monad$write_regS htif_cmd_write_ref B1))
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__6 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref ((update_subrange_vec_dec w__6 (( 63 : int):ii) (( 32 : int):ii) data : 64 words$word))))
else sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) data : 64 words$word)))
- (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__2 : 64 words$word) .
- let cmd = (Mk_htif_cmd w__2) in
- let b__0 = ((get_htif_cmd_device cmd : 8 words$word)) in sail2_state_monad$seqS
- (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
- let (_ : unit) =
- (if ((get_config_print_platform () )) then
- print_dbg
- ((STRCAT "htif-syscall-proxy cmd: "
- ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
- else () ) in
- if (((((cast_unit_vec0 ((access_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 0 : int):ii)))
- : 1 words$word)) = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$seqS
- (sail2_state_monad$write_regS htif_done_ref T)
- (sail2_state_monad$write_regS
- htif_exit_code_ref
- ((shiftr ((zero_extend ((get_htif_cmd_payload cmd : 48 words$word)) (( 64 : int):ii) : 64 words$word))
- (( 1 : int):ii)
- : 64 words$word)))
- else sail2_state_monad$returnS ()
- else
- sail2_state_monad$returnS (if (((b__0 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)))) then
- let (_ : unit) =
- (if ((get_config_print_platform () )) then
- print_dbg
- ((STRCAT "htif-term cmd: "
- ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
- else () ) in
- let b__2 = ((get_htif_cmd_cmd cmd : 8 words$word)) in
- if (((b__2 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then ()
- else if (((b__2 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B1] : 8 words$word)))) then
- plat_term_write
- ((subrange_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 7 : int):ii) (( 0 : int):ii)
- : 8 words$word))
- else print_endline ((STRCAT "Unknown term cmd: " ((string_of_bits b__2))))
- else print_endline ((STRCAT "htif-???? cmd: " ((string_of_bits data))))))
+ (sail2_state$or_boolS
+ (sail2_state$and_boolS ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_cmd_write_ref) (\ (w__7 : bitU) . sail2_state_monad$returnS (((w__7 = B1)))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__8 : 4 words$word) .
+ sail2_state_monad$returnS ((((lem$w2ui w__8)) > (( 0 : int):ii))))))
+ ( sail2_state_monad$bindS(sail2_state_monad$read_regS htif_payload_writes_ref : ( 4 words$word) M) (\ (w__10 : 4 words$word) .
+ sail2_state_monad$returnS ((((lem$w2ui w__10)) > (( 2 : int):ii))))))) (\ (w__11 : bool) . sail2_state_monad$seqS
+ (if w__11 then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__12 : 64 words$word) .
+ let cmd = (Mk_htif_cmd w__12) in
+ let b__0 = ((get_htif_cmd_device cmd : 8 words$word)) in
+ if (((b__0 = (0x00w : 8 words$word)))) then
+ let (_ : unit) =
+ (if ((get_config_print_platform () )) then
+ print_dbg
+ ((STRCAT "htif-syscall-proxy cmd: "
+ ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
+ else () ) in
+ if (((((access_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 0 : int):ii))) = B1))) then sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_done_ref T)
+ (sail2_state_monad$write_regS
+ htif_exit_code_ref
+ ((shiftr
+ ((zero_extend ((get_htif_cmd_payload cmd : 48 words$word)) (( 64 : int):ii) : 64 words$word))
+ (( 1 : int):ii)
+ : 64 words$word)))
+ else sail2_state_monad$returnS ()
+ else if (((b__0 = (0x01w : 8 words$word)))) then
+ let (_ : unit) =
+ (if ((get_config_print_platform () )) then
+ print_dbg
+ ((STRCAT "htif-term cmd: "
+ ((string_of_bits ((get_htif_cmd_payload cmd : 48 words$word))))))
+ else () ) in
+ let b__2 = ((get_htif_cmd_cmd cmd : 8 words$word)) in
+ let (_ : unit) =
+ (if (((b__2 = (0x00w : 8 words$word)))) then ()
+ else if (((b__2 = (0x01w : 8 words$word)))) then
+ plat_term_write
+ ((subrange_vec_dec ((get_htif_cmd_payload cmd : 48 words$word)) (( 7 : int):ii) (( 0 : int):ii)
+ : 8 words$word))
+ else print_endline ((STRCAT "Unknown term cmd: " ((string_of_bits b__2))))) in
+ reset_htif ()
+ else sail2_state_monad$returnS ((print_endline ((STRCAT "htif-???? cmd: " ((string_of_bits data)))))))
+ else sail2_state_monad$returnS () )
(sail2_state_monad$returnS (MemValue T)))))`;
(*val htif_tick : unit -> M unit*)
val _ = Define `
- ((htif_tick:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS
+ ((htif_tick:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_platform () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((print_dbg ((STRCAT "htif::tick " ((string_of_bits w__0)))))))
else sail2_state_monad$returnS () )
- (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))`;
+ (sail2_state_monad$read_regS htif_tohost_ref : ( 64 words$word) M)) (\ (w__1 : 64 words$word) .
+ sail2_state_monad$write_regS htif_tohost_ref w__1)))`;
(*val within_mmio_readable : mword ty64 -> integer -> bool*)
@@ -13124,33 +15361,41 @@ val _ = Define `
(((within_clint addr width)) \/ (((((within_htif_writable addr width)) /\ ((((id width)) <= (( 8 : int):ii))))))))`;
-(*val mmio_read : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val mmio_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> M (MemoryOpResult (mword 'int8_times_n))*)
val _ = Define `
- ((mmio_read:(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int)=
- (if ((within_clint addr width)) then (clint_load addr width )
- else if (((((within_htif_readable addr width)) /\ (((( 1 : int):ii) <= ((id width))))))) then
- (htif_load addr width )
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ ((mmio_read:(ext_access_type)AccessType ->(64)words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int)=
+ (if ((within_clint paddr width)) then
+ (clint_load t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M)
+ else if (((((within_htif_readable paddr width)) /\ (((( 1 : int):ii) <= ((id width))))))) then
+ (htif_load t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M)
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
(*val mmio_write : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mmio_write:(64)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (addr : xlenbits) (width : int) data=
- (if ((within_clint addr width)) then clint_store addr width data
- else if (((((within_htif_writable addr width)) /\ ((((id width)) <= (( 8 : int):ii)))))) then
- htif_store addr width data
- else sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ ((mmio_write:(64)words$word -> int -> 'int8_times_n words$word ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (paddr : xlenbits) (width : int) (data : 'int8_times_n words$word)=
+ (if ((within_clint paddr width)) then clint_store paddr width data
+ else if (((((within_htif_writable paddr width)) /\ ((((id width)) <= (( 8 : int):ii)))))) then
+ htif_store paddr width data
+ else sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
(*val init_platform : unit -> M unit*)
val _ = Define `
- ((init_platform:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))
+ ((init_platform:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS htif_tohost_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))
(sail2_state_monad$write_regS htif_done_ref F))
- (sail2_state_monad$write_regS htif_exit_code_ref ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))))`;
+ (sail2_state_monad$write_regS htif_exit_code_ref ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word))))
+ (sail2_state_monad$write_regS htif_cmd_write_ref B0))
+ (sail2_state_monad$write_regS htif_payload_writes_ref ((EXTZ (( 4 : int):ii) (0b0w : 1 words$word) : 4 words$word)))))`;
(*val tick_platform : unit -> M unit*)
@@ -13167,7 +15412,7 @@ val _ = Define `
(sail2_state_monad$read_regS instbits_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$returnS (SOME w__0))
else sail2_state_monad$returnS NONE) (\ info .
let (t : sync_exception) =
- (<| sync_exception_trap := E_Illegal_Instr;
+ (<| sync_exception_trap := (E_Illegal_Instr () );
sync_exception_excinfo := info;
sync_exception_ext := NONE |>) in sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
@@ -13198,113 +15443,157 @@ val _ = Define `
(((((lem$w2ui addr)) % width)) = (( 0 : int):ii)))`;
-(*val phys_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val read_kind_of_flags : bool -> bool -> bool -> maybe read_kind*)
val _ = Define `
- ((phys_mem_read:AccessType ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)= (sail2_state_monad$bindS
- (case (aq, rl, res) of
- (F, F, F) => sail2_state_monad$bindS
- (read_ram Read_plain addr width : ( 'int8_times_n words$word) M) (\ (w__0 :
- 'int8_times_n words$word) .
+ ((read_kind_of_flags:bool -> bool -> bool ->(read_kind)option) (aq : bool) (rl : bool) (res : bool)=
+ ((case (aq, rl, res) of
+ (F, F, F) => SOME Read_plain
+ | (T, F, F) => SOME Read_RISCV_acquire
+ | (T, T, F) => SOME Read_RISCV_strong_acquire
+ | (F, F, T) => SOME Read_RISCV_reserved
+ | (T, F, T) => SOME Read_RISCV_reserved_acquire
+ | (T, T, T) => SOME Read_RISCV_reserved_strong_acquire
+ | (F, T, F) => NONE
+ | (F, T, T) => NONE
+ )))`;
+
+
+(*val phys_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
+
+val _ = Define `
+ ((phys_mem_read:(ext_access_type)AccessType ->(64)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int) (aq : bool) (rl :
+ bool) (res : bool) (meta : bool)= (sail2_state_monad$bindS
+ (case ((read_kind_of_flags aq rl res)) of
+ SOME (rk) => sail2_state_monad$bindS
+ (read_ram rk paddr width meta : (( 'int8_times_n words$word # unit)) M) (\ (w__0 :
+ ( 'int8_times_n words$word # unit)) .
sail2_state_monad$returnS (SOME w__0))
- | (T, F, F) => sail2_state_monad$bindS
- (read_ram Read_RISCV_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__1 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__1))
- | (T, T, F) => sail2_state_monad$bindS
- (read_ram Read_RISCV_strong_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__2 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__2))
- | (F, F, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved addr width : ( 'int8_times_n words$word) M) (\ (w__3 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__3))
- | (T, F, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__4 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__4))
- | (T, T, T) => sail2_state_monad$bindS
- (read_ram Read_RISCV_reserved_strong_acquire addr width : ( 'int8_times_n words$word) M) (\ (w__5 :
- 'int8_times_n words$word) .
- sail2_state_monad$returnS (SOME w__5))
- | (F, T, F) => sail2_state_monad$returnS NONE
- | (F, T, T) => sail2_state_monad$returnS NONE
- ) (\ w__6 .
- let result = w__6 in
+ | NONE => sail2_state_monad$returnS NONE
+ ) (\ (w__1 : (( 'int8_times_n words$word # unit))option) .
+ let result = w__1 in
sail2_state_monad$returnS ((case (t, result) of
- (Execute, NONE) => MemException E_Fetch_Access_Fault
- | (Read, NONE) => MemException E_Load_Access_Fault
- | (_, NONE) => MemException E_SAMO_Access_Fault
- | (_, SOME (v)) =>
+ (Execute (() ), NONE) => MemException (E_Fetch_Access_Fault () )
+ | (Read (Data1), NONE) => MemException (E_Load_Access_Fault () )
+ | (_, NONE) => MemException (E_SAMO_Access_Fault () )
+ | (_, SOME ((v, m))) =>
let (_ : unit) =
(if ((get_config_print_mem () )) then
print_dbg
((STRCAT "mem["
((STRCAT ((accessType_to_str t))
((STRCAT ","
- ((STRCAT ((string_of_bits addr))
+ ((STRCAT ((string_of_bits paddr))
((STRCAT "] -> " ((string_of_bits v))))))))))))
else () ) in
- MemValue v
+ MemValue (v, m)
)))))`;
-(*val checked_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val checked_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((checked_mem_read:AccessType ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)=
- (if ((within_mmio_readable addr width)) then (mmio_read addr width )
- else if ((within_phys_mem addr width)) then (phys_mem_read t addr width aq rl res )
- else sail2_state_monad$returnS (MemException E_Load_Access_Fault)))`;
+ ((checked_mem_read:(ext_access_type)AccessType ->(64)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (paddr : xlenbits) (width : int) (aq :
+ bool) (rl : bool) (res : bool) (meta : bool)=
+ (if ((within_mmio_readable paddr width)) then sail2_state_monad$bindS
+ (mmio_read t paddr width : ( ( 'int8_times_n words$word)MemoryOpResult) M) (\ (w__0 : ( 'int8_times_n words$word)
+ MemoryOpResult) .
+ sail2_state_monad$returnS ((MemoryOpResult_add_meta w__0 default_meta
+ : (( 'int8_times_n words$word # unit)) MemoryOpResult)))
+ else if ((within_phys_mem paddr width)) then
+ (case ((ext_check_phys_mem_read t paddr width aq rl res meta)) of
+ Ext_PhysAddr_OK (() ) =>
+ (phys_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
+ | Ext_PhysAddr_Error (e) => sail2_state_monad$returnS (MemException e)
+ )
+ else
+ sail2_state_monad$returnS ((case t of
+ Execute (() ) => MemException (E_Fetch_Access_Fault () )
+ | Read (Data1) => MemException (E_Load_Access_Fault () )
+ | _ => MemException (E_SAMO_Access_Fault () )
+ ))))`;
-(*val pmp_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val pmp_mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((pmp_mem_read:AccessType ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : AccessType) (addr : xlenbits) (width : int) (aq : bool) (rl : bool) (res :
- bool)=
- (if ((~ ((plat_enable_pmp () )))) then (checked_mem_read t addr width aq rl res )
+ ((pmp_mem_read:(ext_access_type)AccessType -> Privilege ->(64)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (t : ext_access_type AccessType) (p : Privilege) (paddr : xlenbits) (width :
+ int) (aq : bool) (rl : bool) (res : bool) (meta : bool)=
+ (if ((~ ((plat_enable_pmp () )))) then
+ (checked_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
- (effectivePrivilege w__1 w__2) (\ (w__3 : Privilege) . sail2_state_monad$bindS
- (pmpCheck addr width t w__3) (\ (w__4 : ExceptionType option) .
- (case w__4 of
- NONE => (checked_mem_read t addr width aq rl res )
+ (pmpCheck paddr width t p) (\ (w__1 : ExceptionType option) .
+ (case w__1 of
+ NONE =>
+ (checked_mem_read t paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
| SOME (e) => sail2_state_monad$returnS (MemException e)
- )))))))`;
+ ))))`;
-(*val rvfi_read : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> MemoryOpResult (mword 'int8_times_n) -> unit*)
+(*val rvfi_read : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> MemoryOpResult ((mword 'int8_times_n * unit)) -> unit*)
val _ = Define `
- ((rvfi_read:(64)words$word -> int ->('int8_times_n words$word)MemoryOpResult -> unit) addr width value= () )`;
+ ((rvfi_read:(64)words$word -> int ->('int8_times_n words$word#unit)MemoryOpResult -> unit) addr width result= () )`;
+
+
+(*val mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+
+(*val mem_read_priv : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val mem_read_meta : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
-(*val mem_read : forall 'int8_times_n. Size 'int8_times_n => AccessType -> mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult (mword 'int8_times_n))*)
+(*val mem_read_priv_meta : forall 'int8_times_n. Size 'int8_times_n => AccessType unit -> Privilege -> mword ty64 -> integer -> bool -> bool -> bool -> bool -> M (MemoryOpResult ((mword 'int8_times_n * unit)))*)
val _ = Define `
- ((mem_read:AccessType ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ addr width aq rl res= (sail2_state_monad$bindS
- (if ((((((aq \/ res))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_Load_Addr_Align)
+ ((mem_read_priv_meta:(unit)AccessType -> Privilege ->(64)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ priv paddr width aq rl res meta= (sail2_state_monad$bindS
+ (if ((((((aq \/ res))) /\ ((~ ((is_aligned_addr paddr width))))))) then
+ sail2_state_monad$returnS (MemException (E_Load_Addr_Align () ))
else
(case (aq, rl, res) of
(F, T, F) => sail2_state_monad$throwS (Error_not_implemented "load.rl")
| (F, T, T) => sail2_state_monad$throwS (Error_not_implemented "lr.rl")
- | (_, _, _) => (pmp_mem_read typ addr width aq rl res )
- )) (\ result .
- let (_ : unit) = (rvfi_read addr width result) in
+ | (_, _, _) =>
+ (pmp_mem_read typ priv paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M)
+ )) (\ (result : (( 'int8_times_n words$word # unit)) MemoryOpResult) .
+ let (_ : unit) = (rvfi_read paddr width result) in
sail2_state_monad$returnS result)))`;
+val _ = Define `
+ ((mem_read_meta:(unit)AccessType ->(64)words$word -> int -> bool -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word#unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ paddr width aq rl res meta= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ (w__2 : Privilege) .
+ (mem_read_priv_meta typ w__2 paddr width aq rl res meta
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M))))))`;
+
+
+val _ = Define `
+ ((mem_read_priv:(unit)AccessType -> Privilege ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ priv paddr width aq rl res= (sail2_state_monad$bindS
+ (mem_read_priv_meta typ priv paddr width aq rl res F
+ : ( (( 'int8_times_n words$word # unit))MemoryOpResult) M) (\ (w__0 : (( 'int8_times_n words$word # unit))
+ MemoryOpResult) .
+ sail2_state_monad$returnS ((MemoryOpResult_drop_meta w__0 : ( 'int8_times_n words$word) MemoryOpResult)))))`;
+
+
+val _ = Define `
+ ((mem_read:(unit)AccessType ->(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((('int8_times_n words$word)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) typ paddr width aq rel res= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ (w__2 : Privilege) .
+ (mem_read_priv typ w__2 paddr width aq rel res : ( ( 'int8_times_n words$word)MemoryOpResult) M))))))`;
+
+
(*val mem_write_ea : mword ty64 -> integer -> bool -> bool -> bool -> M (MemoryOpResult unit)*)
val _ = Define `
((mem_write_ea:(64)words$word -> int -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((unit)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width aq rl con=
(if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_SAMO_Addr_Align)
+ sail2_state_monad$returnS (MemException (E_SAMO_Addr_Align () ))
else
(case (aq, rl, con) of
(F, F, F) => sail2_state_monad$seqS (write_ram_ea Write_plain addr width) (sail2_state_monad$returnS (MemValue () ))
@@ -13322,24 +15611,26 @@ val _ = Define `
)))`;
-(*val rvfi_write : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> unit*)
+(*val rvfi_write : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> unit -> unit*)
val _ = Define `
- ((rvfi_write:(64)words$word -> int -> 'int8_times_n words$word -> unit) addr width value= () )`;
+ ((rvfi_write:(64)words$word -> int -> 'int8_times_n words$word -> unit -> unit) addr width value meta= () )`;
(*val phys_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((phys_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (let (_ : unit) = (rvfi_write addr width data) in sail2_state_monad$bindS
- (write_ram wk addr width data meta) (\ (w__0 : bool) .
+ ((phys_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data :
+ 'int8_times_n words$word) (meta : mem_meta)=
+ (let (_ : unit) = (rvfi_write paddr width data meta) in sail2_state_monad$bindS
+ (write_ram wk paddr width data meta) (\ (w__0 : bool) .
let result = (MemValue w__0) in
let (_ : unit) =
(if ((get_config_print_mem () )) then
print_dbg
((STRCAT "mem["
- ((STRCAT ((string_of_bits addr)) ((STRCAT "] <- " ((string_of_bits data))))))))
+ ((STRCAT ((string_of_bits paddr))
+ ((STRCAT "] <- " ((string_of_bits data))))))))
else () ) in
sail2_state_monad$returnS result)))`;
@@ -13347,58 +15638,79 @@ val _ = Define `
(*val checked_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((checked_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (if ((within_mmio_writable addr width)) then mmio_write addr width data
- else if ((within_phys_mem addr width)) then phys_mem_write wk addr width data meta
- else sail2_state_monad$returnS (MemException E_SAMO_Access_Fault)))`;
+ ((checked_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data :
+ 'int8_times_n words$word) (meta : mem_meta)=
+ (if ((within_mmio_writable paddr width)) then mmio_write paddr width data
+ else if ((within_phys_mem paddr width)) then
+ (case ((ext_check_phys_mem_write wk paddr width data meta)) of
+ Ext_PhysAddr_OK (() ) => phys_mem_write wk paddr width data meta
+ | Ext_PhysAddr_Error (e) => sail2_state_monad$returnS (MemException e)
+ )
+ else sail2_state_monad$returnS (MemException (E_SAMO_Access_Fault () ))))`;
-(*val pmp_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> unit -> M (MemoryOpResult bool)*)
+(*val pmp_mem_write : forall 'int8_times_n. Size 'int8_times_n => write_kind -> mword ty64 -> integer -> mword 'int8_times_n -> AccessType unit -> Privilege -> unit -> M (MemoryOpResult bool)*)
val _ = Define `
- ((pmp_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (addr : xlenbits) (width : int) data (meta : mem_meta)=
- (if ((~ ((plat_enable_pmp () )))) then checked_mem_write wk addr width data meta
+ ((pmp_mem_write:write_kind ->(64)words$word -> int -> 'int8_times_n words$word ->(ext_access_type)AccessType -> Privilege -> unit ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (wk : write_kind) (paddr : xlenbits) (width : int) (data : 'int8_times_n words$word) (typ : ext_access_type
+ AccessType) (priv : Privilege) (meta : mem_meta)=
+ (if ((~ ((plat_enable_pmp () )))) then checked_mem_write wk paddr width data meta
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
- (effectivePrivilege w__1 w__2) (\ (w__3 : Privilege) . sail2_state_monad$bindS
- (pmpCheck addr width Write w__3) (\ (w__4 : ExceptionType option) .
- (case w__4 of
- NONE => checked_mem_write wk addr width data meta
+ (pmpCheck paddr width typ priv) (\ (w__1 : ExceptionType option) .
+ (case w__1 of
+ NONE => checked_mem_write wk paddr width data meta
| SOME (e) => sail2_state_monad$returnS (MemException e)
- )))))))`;
+ ))))`;
-(*val mem_write_value_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+(*val mem_write_value_priv_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> AccessType unit -> Privilege -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mem_write_value_meta:(64)words$word -> int -> 'int8_times_n words$word -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width value meta aq rl con=
- (let (_ : unit) = (rvfi_write addr width value) in
- if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr addr width))))))) then
- sail2_state_monad$returnS (MemException E_SAMO_Addr_Align)
- else
+ ((mem_write_value_priv_meta:(64)words$word -> int -> 'int8_times_n words$word ->(unit)AccessType -> Privilege -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value typ priv meta aq rl con=
+ (let (_ : unit) = (rvfi_write paddr width value meta) in
+ if ((((((rl \/ con))) /\ ((~ ((is_aligned_addr paddr width))))))) then
+ sail2_state_monad$returnS (MemException (E_SAMO_Addr_Align () ))
+ else sail2_state_monad$bindS
(case (aq, rl, con) of
- (F, F, F) => pmp_mem_write Write_plain addr width value meta
- | (F, T, F) => pmp_mem_write Write_RISCV_release addr width value meta
- | (F, F, T) => pmp_mem_write Write_RISCV_conditional addr width value meta
- | (F, T, T) => pmp_mem_write Write_RISCV_conditional_release addr width value meta
- | (T, T, F) => pmp_mem_write Write_RISCV_strong_release addr width value meta
- | (T, T, T) =>
- pmp_mem_write Write_RISCV_conditional_strong_release addr width value meta
+ (F, F, F) => sail2_state_monad$returnS Write_plain
+ | (F, T, F) => sail2_state_monad$returnS Write_RISCV_release
+ | (F, F, T) => sail2_state_monad$returnS Write_RISCV_conditional
+ | (F, T, T) => sail2_state_monad$returnS Write_RISCV_conditional_release
+ | (T, T, F) => sail2_state_monad$returnS Write_RISCV_strong_release
+ | (T, T, T) => sail2_state_monad$returnS Write_RISCV_conditional_strong_release
| (T, F, F) => sail2_state_monad$throwS (Error_not_implemented "store.aq")
| (T, F, T) => sail2_state_monad$throwS (Error_not_implemented "sc.aq")
- )))`;
+ ) (\ (wk : write_kind) .
+ pmp_mem_write wk paddr width value typ priv meta)))`;
+
+
+(*val mem_write_value_priv : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> Privilege -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+
+val _ = Define `
+ ((mem_write_value_priv:(64)words$word -> int -> 'int8_times_n words$word -> Privilege -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value priv aq rl con=
+ (mem_write_value_priv_meta paddr width value (Write default_write_acc) priv default_meta aq rl con))`;
+
+
+(*val mem_write_value_meta : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> unit -> unit -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
+
+val _ = Define `
+ ((mem_write_value_meta:(64)words$word -> int -> 'int8_times_n words$word -> unit -> unit -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value ext_acc meta aq rl con=
+ (let typ = (Write ext_acc) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege typ w__0 w__1) (\ ep .
+ mem_write_value_priv_meta paddr width value typ ep meta aq rl con)))))`;
(*val mem_write_value : forall 'int8_times_n. Size 'int8_times_n => mword ty64 -> integer -> mword 'int8_times_n -> bool -> bool -> bool -> M (MemoryOpResult bool)*)
val _ = Define `
- ((mem_write_value:(64)words$word -> int -> 'int8_times_n words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) addr width value aq rl con=
- (mem_write_value_meta addr width value default_meta aq rl con))`;
+ ((mem_write_value:(64)words$word -> int -> 'int8_times_n words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->((((bool)MemoryOpResult),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) paddr width value aq rl con=
+ (mem_write_value_meta paddr width value default_write_acc default_meta aq rl con))`;
val _ = Define `
- ((PAGESIZE_BITS:int)= ((( 12 : int):ii)))`;
+((default_sv32_ext_pte:(10)words$word)= ((0b0000000000w : 10 words$word)))`;
(*val Mk_PTE_Bits : mword ty8 -> PTE_Bits*)
@@ -13408,35 +15720,29 @@ val _ = Define `
(<| PTE_Bits_PTE_Bits_chunk_0 := ((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)) |>))`;
-(*val _get_PTE_Bits_bits : PTE_Bits -> mword ty8*)
-
val _ = Define `
((get_PTE_Bits_bits:PTE_Bits ->(8)words$word) v= ((subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_PTE_Bits_bits : register_ref regstate register_value PTE_Bits -> mword ty8 -> M unit*)
-
val _ = Define `
((set_PTE_Bits_bits:((regstate),(register_value),(PTE_Bits))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_PTE_Bits_bits : PTE_Bits -> mword ty8 -> PTE_Bits*)
-
val _ = Define `
((update_PTE_Bits_bits:PTE_Bits ->(8)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13447,21 +15753,21 @@ val _ = Define `
((set_PTE_Bits_D:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_D:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 7 : int):ii) (( 7 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13472,21 +15778,21 @@ val _ = Define `
((set_PTE_Bits_A:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_A:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 6 : int):ii) (( 6 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13497,21 +15803,21 @@ val _ = Define `
((set_PTE_Bits_G:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_G:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 5 : int):ii) (( 5 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13522,21 +15828,21 @@ val _ = Define `
((set_PTE_Bits_U:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_U:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 4 : int):ii) (( 4 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13547,21 +15853,21 @@ val _ = Define `
((set_PTE_Bits_X:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_X:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 3 : int):ii) (( 3 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13572,21 +15878,21 @@ val _ = Define `
((set_PTE_Bits_W:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_W:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 2 : int):ii) (( 2 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13597,21 +15903,21 @@ val _ = Define `
((set_PTE_Bits_R:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_R:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 1 : int):ii) (( 1 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
val _ = Define `
@@ -13622,164 +15928,169 @@ val _ = Define `
((set_PTE_Bits_V:((regstate),(register_value),(PTE_Bits))register_ref ->(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec r.PTE_Bits_PTE_Bits_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)) in
+ : 8 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_PTE_Bits_V:PTE_Bits ->(1)words$word -> PTE_Bits) v x=
- ((v with<|
+ (( v with<|
PTE_Bits_PTE_Bits_chunk_0 :=
((update_subrange_vec_dec v.PTE_Bits_PTE_Bits_chunk_0 (( 0 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 0 : int):ii) (( 0 : int):ii) : 1 words$word))
- : 8 words$word))|>)))`;
+ : 8 words$word)) |>)))`;
-(*val isPTEPtr : mword ty8 -> bool*)
+(*val isPTEPtr : mword ty8 -> mword ty10 -> bool*)
val _ = Define `
- ((isPTEPtr:(8)words$word -> bool) p=
+ ((isPTEPtr:(8)words$word ->(10)words$word -> bool) (p : pteAttribs) (ext : extPte)=
(let a = (Mk_PTE_Bits p) in
- ((((((get_PTE_Bits_R a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ ((((((((get_PTE_Bits_W a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ (((((get_PTE_Bits_X a : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))))))))`;
+ ((((((get_PTE_Bits_R a : 1 words$word)) = (0b0w : 1 words$word)))) /\ ((((((((get_PTE_Bits_W a : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((get_PTE_Bits_X a : 1 words$word)) = (0b0w : 1 words$word))))))))))`;
-(*val isInvalidPTE : mword ty8 -> bool*)
+(*val isInvalidPTE : mword ty8 -> mword ty10 -> bool*)
val _ = Define `
- ((isInvalidPTE:(8)words$word -> bool) p=
+ ((isInvalidPTE:(8)words$word ->(10)words$word -> bool) (p : pteAttribs) (ext : extPte)=
(let a = (Mk_PTE_Bits p) in
- ((((((get_PTE_Bits_V a : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ ((((((((get_PTE_Bits_W a : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_R a : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))))))))`;
+ ((((((get_PTE_Bits_V a : 1 words$word)) = (0b0w : 1 words$word)))) \/ ((((((((get_PTE_Bits_W a : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_R a : 1 words$word)) = (0b0w : 1 words$word))))))))))`;
-(*val checkPTEPermission : AccessType -> Privilege -> bool -> bool -> PTE_Bits -> M bool*)
+(*val to_pte_check : bool -> PTE_Check*)
val _ = Define `
- ((checkPTEPermission:AccessType -> Privilege -> bool -> bool -> PTE_Bits ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (ac : AccessType) (priv : Privilege) (mxr : bool) (do_sum : bool) (p :
- PTE_Bits)=
+ ((to_pte_check:bool -> PTE_Check) b= (if b then PTE_Check_Success () else PTE_Check_Failure (() , () )))`;
+
+
+(*val checkPTEPermission : AccessType unit -> Privilege -> bool -> bool -> PTE_Bits -> mword ty10 -> unit -> M PTE_Check*)
+
+val _ = Define `
+ ((checkPTEPermission:(ext_access_type)AccessType -> Privilege -> bool -> bool -> PTE_Bits ->(10)words$word -> unit ->(regstate)sail2_state_monad$sequential_state ->(((PTE_Check),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (ac : ext_access_type AccessType) (priv : Privilege) (mxr : bool) (do_sum :
+ bool) (p : PTE_Bits) (ext : extPte) (ext_ptw : ext_ptw)=
((case (ac, priv) of
- (Read, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr)))))))))
- | (Write, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (ReadWrite, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr))))))))))))
- | (Execute, User) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (Read, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr)))))))))
- | (Write, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
- | (ReadWrite, Supervisor) =>
- sail2_state_monad$returnS (((((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) \/ do_sum))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) /\ mxr))))))))))))
- | (Execute, Supervisor) =>
- sail2_state_monad$returnS ((((((((get_PTE_Bits_U p : 1 words$word)) = ((bool_to_bits F : 1 words$word))))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = ((bool_to_bits T : 1 words$word))))))))
+ (Read (_), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr)))))))))))
+ | (Write (_), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (ReadWrite ((_, _)), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr))))))))))))))
+ | (Execute (() ), User) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b1w : 1 words$word)))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (Read (_), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr)))))))))))
+ | (Write (_), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ (((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))))))))
+ | (ReadWrite ((_, _)), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ (((((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) \/ do_sum))) /\ ((((((((get_PTE_Bits_W p : 1 words$word)) = (0b1w : 1 words$word)))) /\ ((((((((get_PTE_Bits_R p : 1 words$word)) = (0b1w : 1 words$word)))) \/ ((((((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))) /\ mxr))))))))))))))
+ | (Execute (() ), Supervisor) =>
+ sail2_state_monad$returnS ((to_pte_check
+ ((((((((get_PTE_Bits_U p : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((get_PTE_Bits_X p : 1 words$word)) = (0b1w : 1 words$word)))))))))
| (_, Machine) => internal_error "m-mode mem perm check"
)))`;
-(*val update_PTE_Bits : PTE_Bits -> AccessType -> maybe PTE_Bits*)
+(*val update_PTE_Bits : PTE_Bits -> AccessType unit -> mword ty10 -> maybe ((PTE_Bits * mword ty10))*)
val _ = Define `
- ((update_PTE_Bits:PTE_Bits -> AccessType ->(PTE_Bits)option) (p : PTE_Bits) (a : AccessType)=
+ ((update_PTE_Bits:PTE_Bits ->(ext_access_type)AccessType ->(10)words$word ->(PTE_Bits#(10)words$word)option) (p : PTE_Bits) (a : ext_access_type AccessType) (ext : extPte)=
(let update_d =
- (((((((a = Write))) \/ (((a = ReadWrite)))))) /\ (((((get_PTE_Bits_D p : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))) in
- let update_a = (((get_PTE_Bits_A p : 1 words$word)) = ((bool_to_bits F : 1 words$word))) in
+ ((((((get_PTE_Bits_D p : 1 words$word)) = (0b0w : 1 words$word)))) /\ ((case a of
+ Execute (() ) => F
+ | Read (() ) => F
+ | Write (_) => T
+ | ReadWrite ((_, _)) => T
+ ))) in
+ let update_a = (((get_PTE_Bits_A p : 1 words$word)) = (0b0w : 1 words$word)) in
if (((update_d \/ update_a))) then
- let np = (update_PTE_Bits_A p ((bool_to_bits T : 1 words$word))) in
- let np = (if update_d then update_PTE_Bits_D np ((bool_to_bits T : 1 words$word)) else np) in
- SOME np
+ let np = (update_PTE_Bits_A p (0b1w : 1 words$word)) in
+ let np = (if update_d then update_PTE_Bits_D np (0b1w : 1 words$word) else np) in
+ SOME (np, ext)
else NONE))`;
-(*val PTW_Error_of_num : integer -> PTW_Error*)
-
val _ = Define `
- ((PTW_Error_of_num:int -> PTW_Error) arg_=
- (let p0_ = arg_ in
- if (((p0_ = (( 0 : int):ii)))) then PTW_Access
- else if (((p0_ = (( 1 : int):ii)))) then PTW_Invalid_PTE
- else if (((p0_ = (( 2 : int):ii)))) then PTW_No_Permission
- else if (((p0_ = (( 3 : int):ii)))) then PTW_Misaligned
- else PTW_PTE_Update))`;
+ ((ptw_error_to_str:PTW_Error -> string) e=
+ ((case e of
+ PTW_Invalid_Addr (() ) => "invalid-source-addr"
+ | PTW_Access (() ) => "mem-access-error"
+ | PTW_Invalid_PTE (() ) => "invalid-pte"
+ | PTW_No_Permission (() ) => "no-permission"
+ | PTW_Misaligned (() ) => "misaligned-superpage"
+ | PTW_PTE_Update (() ) => "pte-update-needed"
+ | PTW_Ext_Error (e) => "extension-error"
+ )))`;
-(*val num_of_PTW_Error : PTW_Error -> integer*)
+(*val ext_get_ptw_error : unit -> PTW_Error*)
val _ = Define `
- ((num_of_PTW_Error:PTW_Error -> int) arg_=
- ((case arg_ of
- PTW_Access => (( 0 : int):ii)
- | PTW_Invalid_PTE => (( 1 : int):ii)
- | PTW_No_Permission => (( 2 : int):ii)
- | PTW_Misaligned => (( 3 : int):ii)
- | PTW_PTE_Update => (( 4 : int):ii)
- )))`;
+ ((ext_get_ptw_error:unit -> PTW_Error) eptwf= (PTW_No_Permission () ))`;
-(*val ptw_error_to_str : PTW_Error -> string*)
+(*val translationException : AccessType unit -> PTW_Error -> ExceptionType*)
val _ = Define `
- ((ptw_error_to_str:PTW_Error -> string) e=
- ((case e of
- PTW_Access => "mem-access-error"
- | PTW_Invalid_PTE => "invalid-pte"
- | PTW_No_Permission => "no-permission"
- | PTW_Misaligned => "misaligned-superpage"
- | PTW_PTE_Update => "pte-update-needed"
+ ((translationException:(ext_access_type)AccessType -> PTW_Error -> ExceptionType) (a : ext_access_type AccessType) (f : PTW_Error)=
+ ((case (a, f) of
+ (_, PTW_Ext_Error (e)) => E_Extension ((ext_translate_exception e))
+ | (ReadWrite (_), PTW_Access (() )) => E_SAMO_Access_Fault ()
+ | (ReadWrite (_), _) => E_SAMO_Page_Fault ()
+ | (Read (_), PTW_Access (() )) => E_Load_Access_Fault ()
+ | (Read (_), _) => E_Load_Page_Fault ()
+ | (Write (_), PTW_Access (() )) => E_SAMO_Access_Fault ()
+ | (Write (_), _) => E_SAMO_Page_Fault ()
+ | (Execute (() ), PTW_Access (() )) => E_Fetch_Access_Fault ()
+ | (Execute (() ), _) => E_Fetch_Page_Fault ()
)))`;
-(*val translationException : AccessType -> PTW_Error -> ExceptionType*)
-
val _ = Define `
- ((translationException:AccessType -> PTW_Error -> ExceptionType) (a : AccessType) (f : PTW_Error)=
- ((case (a, f) of
- (ReadWrite, PTW_Access) => E_SAMO_Access_Fault
- | (ReadWrite, _) => E_SAMO_Page_Fault
- | (Read, PTW_Access) => E_Load_Access_Fault
- | (Read, _) => E_Load_Page_Fault
- | (Write, PTW_Access) => E_SAMO_Access_Fault
- | (Write, _) => E_SAMO_Page_Fault
- | (Fetch, PTW_Access) => E_Fetch_Access_Fault
- | (Fetch, _) => E_Fetch_Page_Fault
- )))`;
+((PAGESIZE_BITS:int)= ((( 12 : int):ii)))`;
(*val curAsid32 : mword ty32 -> mword ty9*)
val _ = Define `
- ((curAsid32:(32)words$word ->(9)words$word) satp1=
- (let s = (Mk_Satp32 satp1) in
+ ((curAsid32:(32)words$word ->(9)words$word) satp=
+ (let s = (Mk_Satp32 satp) in
(get_Satp32_Asid s : 9 words$word)))`;
(*val curPTB32 : mword ty32 -> mword ty34*)
val _ = Define `
- ((curPTB32:(32)words$word ->(34)words$word) satp1=
- (let (s : Satp32) = (Mk_Satp32 satp1) in
+ ((curPTB32:(32)words$word ->(34)words$word) satp=
+ (let (s : Satp32) = (Mk_Satp32 satp) in
(shiftl ((EXTZ (( 34 : int):ii) ((get_Satp32_PPN s : 22 words$word)) : 34 words$word)) PAGESIZE_BITS
: 34 words$word)))`;
val _ = Define `
- ((SV32_LEVEL_BITS:int)= ((( 10 : int):ii)))`;
+((SV32_LEVEL_BITS:int)= ((( 10 : int):ii)))`;
val _ = Define `
- ((SV32_LEVELS:int)= ((( 2 : int):ii)))`;
+((SV32_LEVELS:int)= ((( 2 : int):ii)))`;
val _ = Define `
- ((PTE32_LOG_SIZE:int)= ((( 2 : int):ii)))`;
+((PTE32_LOG_SIZE:int)= ((( 2 : int):ii)))`;
val _ = Define `
- ((PTE32_SIZE:int)= ((( 4 : int):ii)))`;
+((PTE32_SIZE:int)= ((( 4 : int):ii)))`;
(*val Mk_SV32_Vaddr : mword ty32 -> SV32_Vaddr*)
@@ -13789,36 +16100,30 @@ val _ = Define `
(<| SV32_Vaddr_SV32_Vaddr_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32*)
-
val _ = Define `
((get_SV32_Vaddr_bits:SV32_Vaddr ->(32)words$word) v=
((subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_SV32_Vaddr_bits : register_ref regstate register_value SV32_Vaddr -> mword ty32 -> M unit*)
-
val _ = Define `
((set_SV32_Vaddr_bits:((regstate),(register_value),(SV32_Vaddr))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Vaddr_bits : SV32_Vaddr -> mword ty32 -> SV32_Vaddr*)
-
val _ = Define `
((update_SV32_Vaddr_bits:SV32_Vaddr ->(32)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_SV32_Vaddr_VPNi : SV32_Vaddr -> mword ty20*)
@@ -13834,11 +16139,11 @@ val _ = Define `
((set_SV32_Vaddr_VPNi:((regstate),(register_value),(SV32_Vaddr))register_ref ->(20)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 19 : int):ii) (( 0 : int):ii) : 20 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13846,17 +16151,23 @@ val _ = Define `
val _ = Define `
((update_SV32_Vaddr_VPNi:SV32_Vaddr ->(20)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 31 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 19 : int):ii) (( 0 : int):ii) : 20 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+(*val _update_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27 -> SV39_Vaddr*)
(*val _update_SV48_Vaddr_VPNi : SV48_Vaddr -> mword ty27 -> SV48_Vaddr*)
+(*val _get_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27*)
+
(*val _get_SV48_Vaddr_VPNi : SV48_Vaddr -> mword ty27*)
+(*val _set_SV39_Vaddr_VPNi : register_ref regstate register_value SV39_Vaddr -> mword ty27 -> M unit*)
+
(*val _set_SV48_Vaddr_VPNi : register_ref regstate register_value SV48_Vaddr -> mword ty27 -> M unit*)
(*val _get_SV32_Vaddr_PgOfs : SV32_Vaddr -> mword ty12*)
@@ -13872,11 +16183,11 @@ val _ = Define `
((set_SV32_Vaddr_PgOfs:((regstate),(register_value),(SV32_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13884,19 +16195,43 @@ val _ = Define `
val _ = Define `
((update_SV32_Vaddr_PgOfs:SV32_Vaddr ->(12)words$word -> SV32_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV32_Vaddr_SV32_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Vaddr_SV32_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+
+
+(*val _update_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12 -> SV32_Paddr*)
+(*val _update_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12 -> SV39_Paddr*)
+
+(*val _update_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12 -> SV39_Vaddr*)
(*val _update_SV48_Paddr_PgOfs : SV48_Paddr -> mword ty12 -> SV48_Paddr*)
+(*val _update_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12 -> SV48_Vaddr*)
+
+(*val _get_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12*)
+
+(*val _get_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12*)
+
+(*val _get_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12*)
+
(*val _get_SV48_Paddr_PgOfs : SV48_Paddr -> mword ty12*)
+(*val _get_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12*)
+
+(*val _set_SV32_Paddr_PgOfs : register_ref regstate register_value SV32_Paddr -> mword ty12 -> M unit*)
+
+(*val _set_SV39_Paddr_PgOfs : register_ref regstate register_value SV39_Paddr -> mword ty12 -> M unit*)
+
+(*val _set_SV39_Vaddr_PgOfs : register_ref regstate register_value SV39_Vaddr -> mword ty12 -> M unit*)
+
(*val _set_SV48_Paddr_PgOfs : register_ref regstate register_value SV48_Paddr -> mword ty12 -> M unit*)
+(*val _set_SV48_Vaddr_PgOfs : register_ref regstate register_value SV48_Vaddr -> mword ty12 -> M unit*)
+
(*val Mk_SV32_Paddr : mword ty34 -> SV32_Paddr*)
val _ = Define `
@@ -13904,36 +16239,30 @@ val _ = Define `
(<| SV32_Paddr_SV32_Paddr_chunk_0 := ((subrange_vec_dec v (( 33 : int):ii) (( 0 : int):ii) : 34 words$word)) |>))`;
-(*val _get_SV32_Paddr_bits : SV32_Paddr -> mword ty34*)
-
val _ = Define `
((get_SV32_Paddr_bits:SV32_Paddr ->(34)words$word) v=
((subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii) : 34 words$word)))`;
-(*val _set_SV32_Paddr_bits : register_ref regstate register_value SV32_Paddr -> mword ty34 -> M unit*)
-
val _ = Define `
((set_SV32_Paddr_bits:((regstate),(register_value),(SV32_Paddr))register_ref ->(34)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 33 : int):ii) (( 0 : int):ii) : 34 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Paddr_bits : SV32_Paddr -> mword ty34 -> SV32_Paddr*)
-
val _ = Define `
((update_SV32_Paddr_bits:SV32_Paddr ->(34)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 33 : int):ii) (( 0 : int):ii) : 34 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
(*val _get_SV32_Paddr_PPNi : SV32_Paddr -> mword ty22*)
@@ -13949,11 +16278,11 @@ val _ = Define `
((set_SV32_Paddr_PPNi:((regstate),(register_value),(SV32_Paddr))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -13961,49 +16290,67 @@ val _ = Define `
val _ = Define `
((update_SV32_Paddr_PPNi:SV32_Paddr ->(22)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 33 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
+
+
+(*val _update_SV32_PTE_PPNi : SV32_PTE -> mword ty22 -> SV32_PTE*)
+(*val _update_SV39_PTE_PPNi : SV39_PTE -> mword ty44 -> SV39_PTE*)
+
+(*val _update_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44 -> SV39_Paddr*)
(*val _update_SV48_PTE_PPNi : SV48_PTE -> mword ty44 -> SV48_PTE*)
+(*val _update_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44 -> SV48_Paddr*)
+
+(*val _get_SV32_PTE_PPNi : SV32_PTE -> mword ty22*)
+
+(*val _get_SV39_PTE_PPNi : SV39_PTE -> mword ty44*)
+
+(*val _get_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44*)
+
(*val _get_SV48_PTE_PPNi : SV48_PTE -> mword ty44*)
+(*val _get_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44*)
+
+(*val _set_SV32_PTE_PPNi : register_ref regstate register_value SV32_PTE -> mword ty22 -> M unit*)
+
+(*val _set_SV39_PTE_PPNi : register_ref regstate register_value SV39_PTE -> mword ty44 -> M unit*)
+
+(*val _set_SV39_Paddr_PPNi : register_ref regstate register_value SV39_Paddr -> mword ty44 -> M unit*)
+
(*val _set_SV48_PTE_PPNi : register_ref regstate register_value SV48_PTE -> mword ty44 -> M unit*)
-(*val _get_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12*)
+(*val _set_SV48_Paddr_PPNi : register_ref regstate register_value SV48_Paddr -> mword ty44 -> M unit*)
val _ = Define `
((get_SV32_Paddr_PgOfs:SV32_Paddr ->(12)words$word) v=
((subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV32_Paddr_PgOfs : register_ref regstate register_value SV32_Paddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV32_Paddr_PgOfs:((regstate),(register_value),(SV32_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 34 words$word))|>)) in
+ : 34 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_Paddr_PgOfs : SV32_Paddr -> mword ty12 -> SV32_Paddr*)
-
val _ = Define `
((update_SV32_Paddr_PgOfs:SV32_Paddr ->(12)words$word -> SV32_Paddr) v x=
- ((v with<|
+ (( v with<|
SV32_Paddr_SV32_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV32_Paddr_SV32_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 34 words$word))|>)))`;
+ : 34 words$word)) |>)))`;
(*val Mk_SV32_PTE : mword ty32 -> SV32_PTE*)
@@ -14013,68 +16360,56 @@ val _ = Define `
(<| SV32_PTE_SV32_PTE_chunk_0 := ((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) |>))`;
-(*val _get_SV32_PTE_bits : SV32_PTE -> mword ty32*)
-
val _ = Define `
((get_SV32_PTE_bits:SV32_PTE ->(32)words$word) v=
((subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)))`;
-(*val _set_SV32_PTE_bits : register_ref regstate register_value SV32_PTE -> mword ty32 -> M unit*)
-
val _ = Define `
((set_SV32_PTE_bits:((regstate),(register_value),(SV32_PTE))register_ref ->(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_PTE_bits : SV32_PTE -> mword ty32 -> SV32_PTE*)
-
val _ = Define `
((update_SV32_PTE_bits:SV32_PTE ->(32)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
-(*val _get_SV32_PTE_PPNi : SV32_PTE -> mword ty22*)
-
val _ = Define `
((get_SV32_PTE_PPNi:SV32_PTE ->(22)words$word) v=
((subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii) : 22 words$word)))`;
-(*val _set_SV32_PTE_PPNi : register_ref regstate register_value SV32_PTE -> mword ty22 -> M unit*)
-
val _ = Define `
((set_SV32_PTE_PPNi:((regstate),(register_value),(SV32_PTE))register_ref ->(22)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV32_PTE_PPNi : SV32_PTE -> mword ty22 -> SV32_PTE*)
-
val _ = Define `
((update_SV32_PTE_PPNi:SV32_PTE ->(22)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 31 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 21 : int):ii) (( 0 : int):ii) : 22 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
(*val _get_SV32_PTE_RSW : SV32_PTE -> mword ty2*)
@@ -14089,11 +16424,11 @@ val _ = Define `
((set_SV32_PTE_RSW:((regstate),(register_value),(SV32_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -14101,17 +16436,23 @@ val _ = Define `
val _ = Define `
((update_SV32_PTE_RSW:SV32_PTE ->(2)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_SV39_PTE_RSW : SV39_PTE -> mword ty2 -> SV39_PTE*)
+
(*val _update_SV48_PTE_RSW : SV48_PTE -> mword ty2 -> SV48_PTE*)
+(*val _get_SV39_PTE_RSW : SV39_PTE -> mword ty2*)
+
(*val _get_SV48_PTE_RSW : SV48_PTE -> mword ty2*)
+(*val _set_SV39_PTE_RSW : register_ref regstate register_value SV39_PTE -> mword ty2 -> M unit*)
+
(*val _set_SV48_PTE_RSW : register_ref regstate register_value SV48_PTE -> mword ty2 -> M unit*)
(*val _get_SV32_PTE_BITS : SV32_PTE -> mword ty8*)
@@ -14126,11 +16467,11 @@ val _ = Define `
((set_SV32_PTE_BITS:((regstate),(register_value),(SV32_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV32_PTE_SV32_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 32 words$word))|>)) in
+ : 32 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
@@ -14138,50 +16479,56 @@ val _ = Define `
val _ = Define `
((update_SV32_PTE_BITS:SV32_PTE ->(8)words$word -> SV32_PTE) v x=
- ((v with<|
+ (( v with<|
SV32_PTE_SV32_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV32_PTE_SV32_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 32 words$word))|>)))`;
+ : 32 words$word)) |>)))`;
+(*val _update_SV39_PTE_BITS : SV39_PTE -> mword ty8 -> SV39_PTE*)
+
(*val _update_SV48_PTE_BITS : SV48_PTE -> mword ty8 -> SV48_PTE*)
+(*val _get_SV39_PTE_BITS : SV39_PTE -> mword ty8*)
+
(*val _get_SV48_PTE_BITS : SV48_PTE -> mword ty8*)
+(*val _set_SV39_PTE_BITS : register_ref regstate register_value SV39_PTE -> mword ty8 -> M unit*)
+
(*val _set_SV48_PTE_BITS : register_ref regstate register_value SV48_PTE -> mword ty8 -> M unit*)
(*val curAsid64 : mword ty64 -> mword ty16*)
val _ = Define `
- ((curAsid64:(64)words$word ->(16)words$word) satp1=
- (let s = (Mk_Satp64 satp1) in
+ ((curAsid64:(64)words$word ->(16)words$word) satp=
+ (let s = (Mk_Satp64 satp) in
(get_Satp64_Asid s : 16 words$word)))`;
(*val curPTB64 : mword ty64 -> mword ty56*)
val _ = Define `
- ((curPTB64:(64)words$word ->(56)words$word) satp1=
- (let s = (Mk_Satp64 satp1) in
+ ((curPTB64:(64)words$word ->(56)words$word) satp=
+ (let s = (Mk_Satp64 satp) in
(shiftl ((EXTZ (( 56 : int):ii) ((get_Satp64_PPN s : 44 words$word)) : 56 words$word)) PAGESIZE_BITS
: 56 words$word)))`;
val _ = Define `
- ((SV39_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
+((SV39_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
val _ = Define `
- ((SV39_LEVELS:int)= ((( 3 : int):ii)))`;
+((SV39_LEVELS:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE39_LOG_SIZE:int)= ((( 3 : int):ii)))`;
+((PTE39_LOG_SIZE:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE39_SIZE:int)= ((( 8 : int):ii)))`;
+((PTE39_SIZE:int)= ((( 8 : int):ii)))`;
(*val Mk_SV39_Vaddr : mword ty39 -> SV39_Vaddr*)
@@ -14191,100 +16538,82 @@ val _ = Define `
(<| SV39_Vaddr_SV39_Vaddr_chunk_0 := ((subrange_vec_dec v (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)) |>))`;
-(*val _get_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39*)
-
val _ = Define `
((get_SV39_Vaddr_bits:SV39_Vaddr ->(39)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)))`;
-(*val _set_SV39_Vaddr_bits : register_ref regstate register_value SV39_Vaddr -> mword ty39 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_bits:((regstate),(register_value),(SV39_Vaddr))register_ref ->(39)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 38 : int):ii) (( 0 : int):ii) : 39 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_bits : SV39_Vaddr -> mword ty39 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_bits:SV39_Vaddr ->(39)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 38 : int):ii) (( 0 : int):ii) : 39 words$word))
- : 39 words$word))|>)))`;
+ : 39 words$word)) |>)))`;
-(*val _get_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27*)
-
val _ = Define `
((get_SV39_Vaddr_VPNi:SV39_Vaddr ->(27)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii) : 27 words$word)))`;
-(*val _set_SV39_Vaddr_VPNi : register_ref regstate register_value SV39_Vaddr -> mword ty27 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_VPNi:((regstate),(register_value),(SV39_Vaddr))register_ref ->(27)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_VPNi : SV39_Vaddr -> mword ty27 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_VPNi:SV39_Vaddr ->(27)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 39 words$word))|>)))`;
+ : 39 words$word)) |>)))`;
-(*val _get_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12*)
-
val _ = Define `
((get_SV39_Vaddr_PgOfs:SV39_Vaddr ->(12)words$word) v=
((subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV39_Vaddr_PgOfs : register_ref regstate register_value SV39_Vaddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV39_Vaddr_PgOfs:((regstate),(register_value),(SV39_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 39 words$word))|>)) in
+ : 39 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Vaddr_PgOfs : SV39_Vaddr -> mword ty12 -> SV39_Vaddr*)
-
val _ = Define `
((update_SV39_Vaddr_PgOfs:SV39_Vaddr ->(12)words$word -> SV39_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV39_Vaddr_SV39_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Vaddr_SV39_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 39 words$word))|>)))`;
+ : 39 words$word)) |>)))`;
(*val Mk_SV39_Paddr : mword ty56 -> SV39_Paddr*)
@@ -14294,100 +16623,82 @@ val _ = Define `
(<| SV39_Paddr_SV39_Paddr_chunk_0 := ((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)) |>))`;
-(*val _get_SV39_Paddr_bits : SV39_Paddr -> mword ty56*)
-
val _ = Define `
((get_SV39_Paddr_bits:SV39_Paddr ->(56)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)))`;
-(*val _set_SV39_Paddr_bits : register_ref regstate register_value SV39_Paddr -> mword ty56 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_bits:((regstate),(register_value),(SV39_Paddr))register_ref ->(56)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_bits : SV39_Paddr -> mword ty56 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_bits:SV39_Paddr ->(56)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)))`;
-
+ : 56 words$word)) |>)))`;
-(*val _get_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44*)
val _ = Define `
((get_SV39_Paddr_PPNi:SV39_Paddr ->(44)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii) : 44 words$word)))`;
-(*val _set_SV39_Paddr_PPNi : register_ref regstate register_value SV39_Paddr -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_PPNi:((regstate),(register_value),(SV39_Paddr))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_PPNi : SV39_Paddr -> mword ty44 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_PPNi:SV39_Paddr ->(44)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
-(*val _get_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12*)
-
val _ = Define `
((get_SV39_Paddr_PgOfs:SV39_Paddr ->(12)words$word) v=
((subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV39_Paddr_PgOfs : register_ref regstate register_value SV39_Paddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV39_Paddr_PgOfs:((regstate),(register_value),(SV39_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_Paddr_PgOfs : SV39_Paddr -> mword ty12 -> SV39_Paddr*)
-
val _ = Define `
((update_SV39_Paddr_PgOfs:SV39_Paddr ->(12)words$word -> SV39_Paddr) v x=
- ((v with<|
+ (( v with<|
SV39_Paddr_SV39_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV39_Paddr_SV39_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
(*val Mk_SV39_PTE : mword ty64 -> SV39_PTE*)
@@ -14397,146 +16708,160 @@ val _ = Define `
(<| SV39_PTE_SV39_PTE_chunk_0 := ((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)) |>))`;
-(*val _get_SV39_PTE_bits : SV39_PTE -> mword ty64*)
-
val _ = Define `
((get_SV39_PTE_bits:SV39_PTE ->(64)words$word) v=
((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii) : 64 words$word)))`;
-(*val _set_SV39_PTE_bits : register_ref regstate register_value SV39_PTE -> mword ty64 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_bits:((regstate),(register_value),(SV39_PTE))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_bits : SV39_PTE -> mword ty64 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_bits:SV39_PTE ->(64)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_PPNi : SV39_PTE -> mword ty44*)
+(*val _get_SV39_PTE_Ext : SV39_PTE -> mword ty10*)
+
+val _ = Define `
+ ((get_SV39_PTE_Ext:SV39_PTE ->(10)words$word) v=
+ ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii) : 10 words$word)))`;
+
+
+(*val _set_SV39_PTE_Ext : register_ref regstate register_value SV39_PTE -> mword ty10 -> M unit*)
+
+val _ = Define `
+ ((set_SV39_PTE_Ext:((regstate),(register_value),(SV39_PTE))register_ref ->(10)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ SV39_PTE_SV39_PTE_chunk_0 :=
+ ((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec v (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+(*val _update_SV39_PTE_Ext : SV39_PTE -> mword ty10 -> SV39_PTE*)
+
+val _ = Define `
+ ((update_SV39_PTE_Ext:SV39_PTE ->(10)words$word -> SV39_PTE) v x=
+ (( v with<|
+ SV39_PTE_SV39_PTE_chunk_0 :=
+ ((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec x (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)))`;
+
+
+(*val _update_SV48_PTE_Ext : SV48_PTE -> mword ty10 -> SV48_PTE*)
+
+(*val _get_SV48_PTE_Ext : SV48_PTE -> mword ty10*)
+
+(*val _set_SV48_PTE_Ext : register_ref regstate register_value SV48_PTE -> mword ty10 -> M unit*)
val _ = Define `
((get_SV39_PTE_PPNi:SV39_PTE ->(44)words$word) v=
((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii) : 44 words$word)))`;
-(*val _set_SV39_PTE_PPNi : register_ref regstate register_value SV39_PTE -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_PPNi:((regstate),(register_value),(SV39_PTE))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_PPNi : SV39_PTE -> mword ty44 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_PPNi:SV39_PTE ->(44)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
-
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_RSW : SV39_PTE -> mword ty2*)
val _ = Define `
((get_SV39_PTE_RSW:SV39_PTE ->(2)words$word) v= ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii) : 2 words$word)))`;
-(*val _set_SV39_PTE_RSW : register_ref regstate register_value SV39_PTE -> mword ty2 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_RSW:((regstate),(register_value),(SV39_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_RSW : SV39_PTE -> mword ty2 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_RSW:SV39_PTE ->(2)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
-(*val _get_SV39_PTE_BITS : SV39_PTE -> mword ty8*)
-
val _ = Define `
((get_SV39_PTE_BITS:SV39_PTE ->(8)words$word) v= ((subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word)))`;
-(*val _set_SV39_PTE_BITS : register_ref regstate register_value SV39_PTE -> mword ty8 -> M unit*)
-
val _ = Define `
((set_SV39_PTE_BITS:((regstate),(register_value),(SV39_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV39_PTE_BITS : SV39_PTE -> mword ty8 -> SV39_PTE*)
-
val _ = Define `
((update_SV39_PTE_BITS:SV39_PTE ->(8)words$word -> SV39_PTE) v x=
- ((v with<|
+ (( v with<|
SV39_PTE_SV39_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV39_PTE_SV39_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
- ((SV48_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
+((SV48_LEVEL_BITS:int)= ((( 9 : int):ii)))`;
val _ = Define `
- ((SV48_LEVELS:int)= ((( 4 : int):ii)))`;
+((SV48_LEVELS:int)= ((( 4 : int):ii)))`;
val _ = Define `
- ((PTE48_LOG_SIZE:int)= ((( 3 : int):ii)))`;
+((PTE48_LOG_SIZE:int)= ((( 3 : int):ii)))`;
val _ = Define `
- ((PTE48_SIZE:int)= ((( 8 : int):ii)))`;
+((PTE48_SIZE:int)= ((( 8 : int):ii)))`;
(*val Mk_SV48_Vaddr : mword ty48 -> SV48_Vaddr*)
@@ -14546,36 +16871,30 @@ val _ = Define `
(<| SV48_Vaddr_SV48_Vaddr_chunk_0 := ((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)) |>))`;
-(*val _get_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48*)
-
val _ = Define `
((get_SV48_Vaddr_bits:SV48_Vaddr ->(48)words$word) v=
((subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)))`;
-(*val _set_SV48_Vaddr_bits : register_ref regstate register_value SV48_Vaddr -> mword ty48 -> M unit*)
-
val _ = Define `
((set_SV48_Vaddr_bits:((regstate),(register_value),(SV48_Vaddr))register_ref ->(48)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Vaddr_bits : SV48_Vaddr -> mword ty48 -> SV48_Vaddr*)
-
val _ = Define `
((update_SV48_Vaddr_bits:SV48_Vaddr ->(48)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 47 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 47 : int):ii) (( 0 : int):ii) : 48 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
val _ = Define `
@@ -14587,53 +16906,47 @@ val _ = Define `
((set_SV48_Vaddr_VPNi:((regstate),(register_value),(SV48_Vaddr))register_ref ->(27)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_Vaddr_VPNi:SV48_Vaddr ->(27)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 38 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 26 : int):ii) (( 0 : int):ii) : 27 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
-(*val _get_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12*)
-
val _ = Define `
((get_SV48_Vaddr_PgOfs:SV48_Vaddr ->(12)words$word) v=
((subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii) : 12 words$word)))`;
-(*val _set_SV48_Vaddr_PgOfs : register_ref regstate register_value SV48_Vaddr -> mword ty12 -> M unit*)
-
val _ = Define `
((set_SV48_Vaddr_PgOfs:((regstate),(register_value),(SV48_Vaddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 48 words$word))|>)) in
+ : 48 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Vaddr_PgOfs : SV48_Vaddr -> mword ty12 -> SV48_Vaddr*)
-
val _ = Define `
((update_SV48_Vaddr_PgOfs:SV48_Vaddr ->(12)words$word -> SV48_Vaddr) v x=
- ((v with<|
+ (( v with<|
SV48_Vaddr_SV48_Vaddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Vaddr_SV48_Vaddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 48 words$word))|>)))`;
+ : 48 words$word)) |>)))`;
(*val Mk_SV48_Paddr : mword ty56 -> SV48_Paddr*)
@@ -14643,68 +16956,56 @@ val _ = Define `
(<| SV48_Paddr_SV48_Paddr_chunk_0 := ((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)) |>))`;
-(*val _get_SV48_Paddr_bits : SV48_Paddr -> mword ty56*)
-
val _ = Define `
((get_SV48_Paddr_bits:SV48_Paddr ->(56)words$word) v=
((subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii) : 56 words$word)))`;
-(*val _set_SV48_Paddr_bits : register_ref regstate register_value SV48_Paddr -> mword ty56 -> M unit*)
-
val _ = Define `
((set_SV48_Paddr_bits:((regstate),(register_value),(SV48_Paddr))register_ref ->(56)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Paddr_bits : SV48_Paddr -> mword ty56 -> SV48_Paddr*)
-
val _ = Define `
((update_SV48_Paddr_bits:SV48_Paddr ->(56)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 55 : int):ii) (( 0 : int):ii) : 56 words$word))
- : 56 words$word))|>)))`;
-
+ : 56 words$word)) |>)))`;
-(*val _get_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44*)
val _ = Define `
((get_SV48_Paddr_PPNi:SV48_Paddr ->(44)words$word) v=
((subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii) : 44 words$word)))`;
-(*val _set_SV48_Paddr_PPNi : register_ref regstate register_value SV48_Paddr -> mword ty44 -> M unit*)
-
val _ = Define `
((set_SV48_Paddr_PPNi:((regstate),(register_value),(SV48_Paddr))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
-(*val _update_SV48_Paddr_PPNi : SV48_Paddr -> mword ty44 -> SV48_Paddr*)
-
val _ = Define `
((update_SV48_Paddr_PPNi:SV48_Paddr ->(44)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 55 : int):ii) (( 12 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
val _ = Define `
@@ -14716,21 +17017,21 @@ val _ = Define `
((set_SV48_Paddr_PgOfs:((regstate),(register_value),(SV48_Paddr))register_ref ->(12)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec r.SV48_Paddr_SV48_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)) in
+ : 56 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_Paddr_PgOfs:SV48_Paddr ->(12)words$word -> SV48_Paddr) v x=
- ((v with<|
+ (( v with<|
SV48_Paddr_SV48_Paddr_chunk_0 :=
((update_subrange_vec_dec v.SV48_Paddr_SV48_Paddr_chunk_0 (( 11 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 11 : int):ii) (( 0 : int):ii) : 12 words$word))
- : 56 words$word))|>)))`;
+ : 56 words$word)) |>)))`;
(*val Mk_SV48_PTE : mword ty64 -> SV48_PTE*)
@@ -14749,21 +17050,47 @@ val _ = Define `
((set_SV48_PTE_bits:((regstate),(register_value),(SV48_PTE))register_ref ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_bits:SV48_PTE ->(64)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 63 : int):ii) (( 0 : int):ii) : 64 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
+
+
+val _ = Define `
+ ((get_SV48_PTE_Ext:SV48_PTE ->(10)words$word) v=
+ ((subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii) : 10 words$word)))`;
+
+
+val _ = Define `
+ ((set_SV48_PTE_Ext:((regstate),(register_value),(SV48_PTE))register_ref ->(10)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS r_ref) (\ r .
+ let r =
+ (( r with<|
+ SV48_PTE_SV48_PTE_chunk_0 :=
+ ((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec v (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)) in
+ sail2_state_monad$write_regS r_ref r)))`;
+
+
+val _ = Define `
+ ((update_SV48_PTE_Ext:SV48_PTE ->(10)words$word -> SV48_PTE) v x=
+ (( v with<|
+ SV48_PTE_SV48_PTE_chunk_0 :=
+ ((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 63 : int):ii) (( 54 : int):ii)
+ ((subrange_vec_dec x (( 9 : int):ii) (( 0 : int):ii) : 10 words$word))
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14775,21 +17102,21 @@ val _ = Define `
((set_SV48_PTE_PPNi:((regstate),(register_value),(SV48_PTE))register_ref ->(44)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec v (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_PPNi:SV48_PTE ->(44)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 53 : int):ii) (( 10 : int):ii)
((subrange_vec_dec x (( 43 : int):ii) (( 0 : int):ii) : 44 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14800,21 +17127,21 @@ val _ = Define `
((set_SV48_PTE_RSW:((regstate),(register_value),(SV48_PTE))register_ref ->(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec v (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_RSW:SV48_PTE ->(2)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 9 : int):ii) (( 8 : int):ii)
((subrange_vec_dec x (( 1 : int):ii) (( 0 : int):ii) : 2 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
val _ = Define `
@@ -14825,21 +17152,21 @@ val _ = Define `
((set_SV48_PTE_BITS:((regstate),(register_value),(SV48_PTE))register_ref ->(8)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) r_ref v= (sail2_state_monad$bindS
(sail2_state_monad$read_regS r_ref) (\ r .
let r =
- ((r with<|
+ (( r with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec r.SV48_PTE_SV48_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec v (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)) in
+ : 64 words$word)) |>)) in
sail2_state_monad$write_regS r_ref r)))`;
val _ = Define `
((update_SV48_PTE_BITS:SV48_PTE ->(8)words$word -> SV48_PTE) v x=
- ((v with<|
+ (( v with<|
SV48_PTE_SV48_PTE_chunk_0 :=
((update_subrange_vec_dec v.SV48_PTE_SV48_PTE_chunk_0 (( 7 : int):ii) (( 0 : int):ii)
((subrange_vec_dec x (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
- : 64 words$word))|>)))`;
+ : 64 words$word)) |>)))`;
(*val make_TLB_Entry : forall 'asidlen 'palen 'ptelen 'valen. Size 'asidlen, Size 'palen, Size 'ptelen, Size 'valen => mword 'asidlen -> bool -> mword 'valen -> mword 'palen -> mword 'ptelen -> ii -> mword 'palen -> ii -> M (TLB_Entry 'asidlen 'valen 'palen 'ptelen)*)
@@ -14847,17 +17174,16 @@ val _ = Define `
val _ = Define `
((make_TLB_Entry:'asidlen words$word -> bool -> 'valen words$word -> 'palen words$word -> 'ptelen words$word -> int -> 'palen words$word -> int ->(regstate)sail2_state_monad$sequential_state ->(((('asidlen,'valen,'palen,'ptelen)TLB_Entry),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid global vAddr pAddr pte level pteAddr levelBitSize=
(let (shift : ii) = (PAGESIZE_BITS + ((level * levelBitSize))) in
- let vAddrMask =
+ let (vAddrMask : 'valen words$word) =
((sub_vec_int
((shiftl
((xor_vec vAddr
- ((xor_vec vAddr
- ((EXTZ ((int_of_num (words$word_len vAddr))) (vec_of_bits [B1] : 1 words$word) : 'valen words$word))
+ ((xor_vec vAddr ((EXTZ ((int_of_num (words$word_len vAddr))) (0b1w : 1 words$word) : 'valen words$word))
: 'valen words$word))
: 'valen words$word)) shift
: 'valen words$word)) (( 1 : int):ii)
: 'valen words$word)) in
- let vMatchMask = ((not_vec vAddrMask : 'valen words$word)) in sail2_state_monad$bindS
+ let (vMatchMask : 'valen words$word) = ((not_vec vAddrMask : 'valen words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS (<| TLB_Entry_asid := asid;
TLB_Entry_global := global;
@@ -14892,10 +17218,10 @@ val _ = Define `
)))`;
-(*val walk39 : mword ty39 -> AccessType -> Privilege -> bool -> bool -> mword ty56 -> ii -> bool -> M (PTW_Result (mword ty56) SV39_PTE)*)
+(*val walk39 : mword ty39 -> AccessType unit -> Privilege -> bool -> bool -> mword ty56 -> ii -> bool -> unit -> M (PTW_Result (mword ty56) SV39_PTE)*)
val walk39_defn = Hol_defn "walk39" `
- ((walk39:(39)words$word -> AccessType -> Privilege -> bool -> bool ->(56)words$word -> int -> bool ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(SV39_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global=
+ ((walk39:(39)words$word ->(unit)AccessType -> Privilege -> bool -> bool ->(56)words$word -> int -> bool -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(SV39_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global ext_ptw=
(let va = (Mk_SV39_Vaddr vaddr) in
let (pt_ofs : paddr64) =
((shiftl
@@ -14908,63 +17234,70 @@ val _ = Define `
: 56 words$word)) PTE39_LOG_SIZE
: 56 words$word)) in
let pte_addr = ((add_vec ptb pt_ofs : 56 words$word)) in sail2_state_monad$bindS
- (mem_read ac ((EXTZ (( 64 : int):ii) pte_addr : 64 words$word)) (( 8 : int):ii) F F F
+ (mem_read_priv (Read Data) Supervisor ((EXTZ (( 64 : int):ii) pte_addr : 64 words$word)) (( 8 : int):ii) F F
+ F
: ( ( 64 words$word)MemoryOpResult) M) (\ (w__0 : ( 64 words$word) MemoryOpResult) .
(case w__0 of
- MemException (_) => sail2_state_monad$returnS (PTW_Failure PTW_Access)
+ MemException (_) => sail2_state_monad$returnS (PTW_Failure (PTW_Access () , ext_ptw))
| MemValue (v) =>
let pte = (Mk_SV39_PTE v) in
let pbits = ((get_SV39_PTE_BITS pte : 8 words$word)) in
+ let ext_pte = ((get_SV39_PTE_Ext pte : 10 words$word)) in
let pattr = (Mk_PTE_Bits pbits) in
let is_global =
- (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))) in
- if ((isInvalidPTE pbits)) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else if ((isPTEPtr pbits)) then
- if (((level = (( 0 : int):ii)))) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else
+ (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = (0b1w : 1 words$word))))) in
+ if ((isInvalidPTE pbits ext_pte)) then sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
+ else if ((isPTEPtr pbits ext_pte)) then
+ if ((level > (( 0 : int):ii))) then
(walk39 vaddr ac priv mxr do_sum
((shiftl ((EXTZ (( 56 : int):ii) ((get_SV39_PTE_PPNi pte : 44 words$word)) : 56 words$word))
PAGESIZE_BITS
- : 56 words$word)) ((level - (( 1 : int):ii))) is_global
+ : 56 words$word)) ((level - (( 1 : int):ii))) is_global ext_ptw
: ( (( 56 words$word), SV39_PTE)PTW_Result) M)
+ else sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
else sail2_state_monad$bindS
- (checkPTEPermission ac priv mxr do_sum pattr) (\ (w__3 : bool) .
- sail2_state_monad$returnS (if ((~ w__3)) then PTW_Failure PTW_No_Permission
- else if ((level > (( 0 : int):ii))) then
- let mask =
- ((sub_vec_int
- ((shiftl
- ((xor_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
- ((xor_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
- ((EXTZ (( 44 : int):ii) (vec_of_bits [B1] : 1 words$word) : 44 words$word))
- : 44 words$word))
- : 44 words$word)) ((level * SV39_LEVEL_BITS))
- : 44 words$word)) (( 1 : int):ii)
- : 44 words$word)) in
- if (((((and_vec ((get_SV39_PTE_PPNi pte : 44 words$word)) mask : 44 words$word)) <> ((EXTZ (( 44 : int):ii) (vec_of_bits [B0] : 1 words$word) : 44 words$word))))) then
- PTW_Failure PTW_Misaligned
- else
- let ppn =
- ((or_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
- ((and_vec
- ((EXTZ (( 44 : int):ii) ((get_SV39_Vaddr_VPNi va : 27 words$word)) : 44 words$word))
- mask
- : 44 words$word))
- : 44 words$word)) in
- PTW_Success ((concat_vec ppn ((get_SV39_Vaddr_PgOfs va : 12 words$word))
- : 56 words$word),
- pte,
- pte_addr,
- level,
- is_global)
- else
- PTW_Success ((concat_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
- ((get_SV39_Vaddr_PgOfs va : 12 words$word))
- : 56 words$word),
- pte,
- pte_addr,
- level,
- is_global)))
+ (checkPTEPermission ac priv mxr do_sum pattr ext_pte ext_ptw) (\ (w__3 : PTE_Check) .
+ sail2_state_monad$returnS ((case w__3 of
+ PTE_Check_Failure ((ext_ptw, ext_ptw_fail)) =>
+ PTW_Failure (ext_get_ptw_error ext_ptw_fail, ext_ptw)
+ | PTE_Check_Success (ext_ptw) =>
+ if ((level > (( 0 : int):ii))) then
+ let mask =
+ ((sub_vec_int
+ ((shiftl
+ ((xor_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
+ ((xor_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
+ ((EXTZ (( 44 : int):ii) (0b1w : 1 words$word) : 44 words$word))
+ : 44 words$word))
+ : 44 words$word)) ((level * SV39_LEVEL_BITS))
+ : 44 words$word)) (( 1 : int):ii)
+ : 44 words$word)) in
+ if (((((and_vec ((get_SV39_PTE_PPNi pte : 44 words$word)) mask : 44 words$word)) <> ((EXTZ (( 44 : int):ii) (0b0w : 1 words$word) : 44 words$word))))) then
+ PTW_Failure (PTW_Misaligned () , ext_ptw)
+ else
+ let ppn =
+ ((or_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
+ ((and_vec
+ ((EXTZ (( 44 : int):ii) ((get_SV39_Vaddr_VPNi va : 27 words$word)) : 44 words$word))
+ mask
+ : 44 words$word))
+ : 44 words$word)) in
+ PTW_Success ((concat_vec ppn ((get_SV39_Vaddr_PgOfs va : 12 words$word)) : 56 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ else
+ PTW_Success ((concat_vec ((get_SV39_PTE_PPNi pte : 44 words$word))
+ ((get_SV39_Vaddr_PgOfs va : 12 words$word))
+ : 56 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ )))
))))`;
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn walk39_defn;
@@ -15006,67 +17339,81 @@ val _ = Define `
))))`;
-(*val translate39 : mword ty16 -> mword ty56 -> mword ty39 -> AccessType -> Privilege -> bool -> bool -> ii -> M (TR_Result (mword ty56) PTW_Error)*)
+(*val translate39 : mword ty16 -> mword ty56 -> mword ty39 -> AccessType unit -> Privilege -> bool -> bool -> ii -> unit -> M (TR_Result (mword ty56) PTW_Error)*)
val _ = Define `
- ((translate39:(16)words$word ->(56)words$word ->(39)words$word -> AccessType -> Privilege -> bool -> bool -> int ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level= (sail2_state_monad$bindS
+ ((translate39:(16)words$word ->(56)words$word ->(39)words$word ->(unit)AccessType -> Privilege -> bool -> bool -> int -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level ext_ptw= (sail2_state_monad$bindS
(lookup_TLB39 asid vAddr) (\ (w__0 : ((ii # (16, 39, 56, 64) TLB_Entry))option) .
(case w__0 of
SOME ((idx, ent)) =>
let pte = (Mk_SV39_PTE ent.TLB_Entry_pte) in
+ let ext_pte = ((get_SV39_PTE_Ext pte : 10 words$word)) in
let pteBits = (Mk_PTE_Bits ((get_SV39_PTE_BITS pte : 8 words$word))) in sail2_state_monad$bindS
- (checkPTEPermission ac priv mxr do_sum pteBits) (\ (w__1 : bool) .
- if ((~ w__1)) then sail2_state_monad$returnS (TR_Failure PTW_No_Permission)
- else
- (case ((update_PTE_Bits pteBits ac)) of
- NONE =>
- sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
- ((EXTZ (( 56 : int):ii)
- ((and_vec vAddr ent.TLB_Entry_vAddrMask : 39 words$word))
- : 56 words$word))
- : 56 words$word)))
- | SOME (pbits) =>
- if ((~ ((plat_enable_dirty_update () )))) then sail2_state_monad$returnS (TR_Failure PTW_PTE_Update)
- else
- let n_pte = (update_SV39_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
- let (n_ent : TLB39_Entry) = ent in
- let n_ent = ((n_ent with<| TLB_Entry_pte := ((get_SV39_PTE_bits n_pte : 64 words$word))|>)) in sail2_state_monad$bindS (sail2_state_monad$seqS
- (write_TLB39 idx n_ent)
- (mem_write_value ((EXTZ (( 64 : int):ii) ent.TLB_Entry_pteAddr : 64 words$word)) (( 8 : int):ii)
- ((get_SV39_PTE_bits n_pte : 64 words$word)) F F F)) (\ (w__2 : bool
- MemoryOpResult) . sail2_state_monad$seqS
- (case w__2 of
- MemValue (_) => sail2_state_monad$returnS ()
- | MemException (e) => internal_error "invalid physical address in TLB"
- )
- (sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
- ((EXTZ (( 56 : int):ii)
- ((and_vec vAddr ent.TLB_Entry_vAddrMask : 39 words$word))
- : 56 words$word))
- : 56 words$word)))))
- ))
+ (checkPTEPermission ac priv mxr do_sum pteBits ext_pte ext_ptw) (\ (w__1 : PTE_Check) .
+ (case w__1 of
+ PTE_Check_Failure ((ext_ptw, ext_ptw_fail)) =>
+ sail2_state_monad$returnS (TR_Failure (ext_get_ptw_error ext_ptw_fail, ext_ptw))
+ | PTE_Check_Success (ext_ptw) =>
+ (case ((update_PTE_Bits pteBits ac ext_pte : ((PTE_Bits # 10 words$word))option)) of
+ NONE =>
+ sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
+ ((EXTZ (( 56 : int):ii)
+ ((and_vec vAddr ent.TLB_Entry_vAddrMask : 39 words$word))
+ : 56 words$word))
+ : 56 words$word),
+ ext_ptw))
+ | SOME ((pbits, ext)) =>
+ if ((~ ((plat_enable_dirty_update () )))) then
+ sail2_state_monad$returnS (TR_Failure (PTW_PTE_Update () , ext_ptw))
+ else
+ let n_pte = (update_SV39_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
+ let n_pte = (update_SV39_PTE_Ext n_pte ext) in
+ let (n_ent : TLB39_Entry) = ent in
+ let n_ent =
+ (( n_ent with<| TLB_Entry_pte := ((get_SV39_PTE_bits n_pte : 64 words$word)) |>)) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ (write_TLB39 idx n_ent)
+ (mem_write_value_priv ((EXTZ (( 64 : int):ii) ent.TLB_Entry_pteAddr : 64 words$word)) (( 8 : int):ii)
+ ((get_SV39_PTE_bits n_pte : 64 words$word)) Supervisor F F F)) (\ (w__2 : bool
+ MemoryOpResult) . sail2_state_monad$seqS
+ (case w__2 of
+ MemValue (_) => sail2_state_monad$returnS ()
+ | MemException (e) => internal_error "invalid physical address in TLB"
+ )
+ (sail2_state_monad$returnS (TR_Address ((or_vec ent.TLB_Entry_pAddr
+ ((EXTZ (( 56 : int):ii)
+ ((and_vec vAddr ent.TLB_Entry_vAddrMask : 39 words$word))
+ : 56 words$word))
+ : 56 words$word),
+ ext_ptw))))
+ )
+ ))
| NONE => sail2_state_monad$bindS
- (walk39 vAddr ac priv mxr do_sum ptb level F : ( (( 56 words$word), SV39_PTE)PTW_Result) M) (\ (w__6 : (( 56 words$word), SV39_PTE)
- PTW_Result) .
+ (walk39 vAddr ac priv mxr do_sum ptb level F ext_ptw
+ : ( (( 56 words$word), SV39_PTE)PTW_Result) M) (\ (w__6 : (( 56 words$word), SV39_PTE) PTW_Result) .
(case w__6 of
- PTW_Failure (f) => sail2_state_monad$returnS (TR_Failure f)
- | PTW_Success ((pAddr, pte, pteAddr, level, global)) =>
- (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV39_PTE_BITS pte : 8 words$word)))) ac)) of
+ PTW_Failure ((f, ext_ptw)) => sail2_state_monad$returnS (TR_Failure (f, ext_ptw))
+ | PTW_Success ((pAddr, pte, pteAddr, level, global, ext_ptw)) =>
+ (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV39_PTE_BITS pte : 8 words$word)))) ac
+ ((get_SV39_PTE_Ext pte : 10 words$word))
+ : ((PTE_Bits # 10 words$word))option)) of
NONE => sail2_state_monad$seqS
- (add_to_TLB39 asid vAddr pAddr pte pteAddr level global) (sail2_state_monad$returnS (TR_Address pAddr))
- | SOME (pbits) =>
- if ((~ ((plat_enable_dirty_update () )))) then sail2_state_monad$returnS (TR_Failure PTW_PTE_Update)
+ (add_to_TLB39 asid vAddr pAddr pte pteAddr level global)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | SOME ((pbits, ext)) =>
+ if ((~ ((plat_enable_dirty_update () )))) then
+ sail2_state_monad$returnS (TR_Failure (PTW_PTE_Update () , ext_ptw))
else
let (w_pte : SV39_PTE) =
- (update_SV39_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in sail2_state_monad$bindS
- (mem_write_value ((EXTZ (( 64 : int):ii) pteAddr : 64 words$word)) (( 8 : int):ii)
- ((get_SV39_PTE_bits w_pte : 64 words$word)) F F F) (\ (w__7 : bool
+ (update_SV39_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
+ let (w_pte : SV39_PTE) = (update_SV39_PTE_Ext w_pte ext) in sail2_state_monad$bindS
+ (mem_write_value_priv ((EXTZ (( 64 : int):ii) pteAddr : 64 words$word)) (( 8 : int):ii)
+ ((get_SV39_PTE_bits w_pte : 64 words$word)) Supervisor F F F) (\ (w__7 : bool
MemoryOpResult) .
(case w__7 of
MemValue (_) => sail2_state_monad$seqS
(add_to_TLB39 asid vAddr pAddr w_pte pteAddr level global)
- (sail2_state_monad$returnS (TR_Address pAddr))
- | MemException (e) => sail2_state_monad$returnS (TR_Failure PTW_Access)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | MemException (e) => sail2_state_monad$returnS (TR_Failure (PTW_Access () , ext_ptw))
))
)
))
@@ -15079,10 +17426,10 @@ val _ = Define `
((init_vmem_sv39:unit ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$write_regS tlb39_ref NONE))`;
-(*val walk48 : mword ty48 -> AccessType -> Privilege -> bool -> bool -> mword ty56 -> ii -> bool -> M (PTW_Result (mword ty56) SV48_PTE)*)
+(*val walk48 : mword ty48 -> AccessType unit -> Privilege -> bool -> bool -> mword ty56 -> ii -> bool -> unit -> M (PTW_Result (mword ty56) SV48_PTE)*)
val walk48_defn = Hol_defn "walk48" `
- ((walk48:(48)words$word -> AccessType -> Privilege -> bool -> bool ->(56)words$word -> int -> bool ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(SV48_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global=
+ ((walk48:(48)words$word ->(unit)AccessType -> Privilege -> bool -> bool ->(56)words$word -> int -> bool -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(SV48_PTE))PTW_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr ac priv mxr do_sum ptb level global ext_ptw=
(let va = (Mk_SV48_Vaddr vaddr) in
let (pt_ofs : paddr64) =
((shiftl
@@ -15095,63 +17442,70 @@ val _ = Define `
: 56 words$word)) PTE48_LOG_SIZE
: 56 words$word)) in
let pte_addr = ((add_vec ptb pt_ofs : 56 words$word)) in sail2_state_monad$bindS
- (mem_read ac ((EXTZ (( 64 : int):ii) pte_addr : 64 words$word)) (( 8 : int):ii) F F F
+ (mem_read_priv (Read Data) Supervisor ((EXTZ (( 64 : int):ii) pte_addr : 64 words$word)) (( 8 : int):ii) F F
+ F
: ( ( 64 words$word)MemoryOpResult) M) (\ (w__0 : ( 64 words$word) MemoryOpResult) .
(case w__0 of
- MemException (_) => sail2_state_monad$returnS (PTW_Failure PTW_Access)
+ MemException (_) => sail2_state_monad$returnS (PTW_Failure (PTW_Access () , ext_ptw))
| MemValue (v) =>
let pte = (Mk_SV48_PTE v) in
let pbits = ((get_SV48_PTE_BITS pte : 8 words$word)) in
+ let ext_pte = ((get_SV48_PTE_Ext pte : 10 words$word)) in
let pattr = (Mk_PTE_Bits pbits) in
let is_global =
- (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))) in
- if ((isInvalidPTE pbits)) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else if ((isPTEPtr pbits)) then
- if (((level = (( 0 : int):ii)))) then sail2_state_monad$returnS (PTW_Failure PTW_Invalid_PTE)
- else
+ (global \/ (((((get_PTE_Bits_G pattr : 1 words$word)) = (0b1w : 1 words$word))))) in
+ if ((isInvalidPTE pbits ext_pte)) then sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
+ else if ((isPTEPtr pbits ext_pte)) then
+ if ((level > (( 0 : int):ii))) then
(walk48 vaddr ac priv mxr do_sum
((shiftl ((EXTZ (( 56 : int):ii) ((get_SV48_PTE_PPNi pte : 44 words$word)) : 56 words$word))
PAGESIZE_BITS
- : 56 words$word)) ((level - (( 1 : int):ii))) is_global
+ : 56 words$word)) ((level - (( 1 : int):ii))) is_global ext_ptw
: ( (( 56 words$word), SV48_PTE)PTW_Result) M)
+ else sail2_state_monad$returnS (PTW_Failure (PTW_Invalid_PTE () , ext_ptw))
else sail2_state_monad$bindS
- (checkPTEPermission ac priv mxr do_sum pattr) (\ (w__3 : bool) .
- sail2_state_monad$returnS (if ((~ w__3)) then PTW_Failure PTW_No_Permission
- else if ((level > (( 0 : int):ii))) then
- let mask =
- ((sub_vec_int
- ((shiftl
- ((xor_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
- ((xor_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
- ((EXTZ (( 44 : int):ii) (vec_of_bits [B1] : 1 words$word) : 44 words$word))
- : 44 words$word))
- : 44 words$word)) ((level * SV48_LEVEL_BITS))
- : 44 words$word)) (( 1 : int):ii)
- : 44 words$word)) in
- if (((((and_vec ((get_SV48_PTE_PPNi pte : 44 words$word)) mask : 44 words$word)) <> ((EXTZ (( 44 : int):ii) (vec_of_bits [B0] : 1 words$word) : 44 words$word))))) then
- PTW_Failure PTW_Misaligned
- else
- let ppn =
- ((or_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
- ((and_vec
- ((EXTZ (( 44 : int):ii) ((get_SV48_Vaddr_VPNi va : 27 words$word)) : 44 words$word))
- mask
- : 44 words$word))
- : 44 words$word)) in
- PTW_Success ((concat_vec ppn ((get_SV48_Vaddr_PgOfs va : 12 words$word))
- : 56 words$word),
- pte,
- pte_addr,
- level,
- is_global)
- else
- PTW_Success ((concat_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
- ((get_SV48_Vaddr_PgOfs va : 12 words$word))
- : 56 words$word),
- pte,
- pte_addr,
- level,
- is_global)))
+ (checkPTEPermission ac priv mxr do_sum pattr ext_pte ext_ptw) (\ (w__3 : PTE_Check) .
+ sail2_state_monad$returnS ((case w__3 of
+ PTE_Check_Failure ((ext_ptw, ext_ptw_fail)) =>
+ PTW_Failure (ext_get_ptw_error ext_ptw_fail, ext_ptw)
+ | PTE_Check_Success (ext_ptw) =>
+ if ((level > (( 0 : int):ii))) then
+ let mask =
+ ((sub_vec_int
+ ((shiftl
+ ((xor_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
+ ((xor_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
+ ((EXTZ (( 44 : int):ii) (0b1w : 1 words$word) : 44 words$word))
+ : 44 words$word))
+ : 44 words$word)) ((level * SV48_LEVEL_BITS))
+ : 44 words$word)) (( 1 : int):ii)
+ : 44 words$word)) in
+ if (((((and_vec ((get_SV48_PTE_PPNi pte : 44 words$word)) mask : 44 words$word)) <> ((EXTZ (( 44 : int):ii) (0b0w : 1 words$word) : 44 words$word))))) then
+ PTW_Failure (PTW_Misaligned () , ext_ptw)
+ else
+ let ppn =
+ ((or_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
+ ((and_vec
+ ((EXTZ (( 44 : int):ii) ((get_SV48_Vaddr_VPNi va : 27 words$word)) : 44 words$word))
+ mask
+ : 44 words$word))
+ : 44 words$word)) in
+ PTW_Success ((concat_vec ppn ((get_SV48_Vaddr_PgOfs va : 12 words$word)) : 56 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ else
+ PTW_Success ((concat_vec ((get_SV48_PTE_PPNi pte : 44 words$word))
+ ((get_SV48_Vaddr_PgOfs va : 12 words$word))
+ : 56 words$word),
+ pte,
+ pte_addr,
+ level,
+ is_global,
+ ext_ptw)
+ )))
))))`;
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn walk48_defn;
@@ -15193,30 +17547,36 @@ val _ = Define `
))))`;
-(*val translate48 : mword ty16 -> mword ty56 -> mword ty48 -> AccessType -> Privilege -> bool -> bool -> ii -> M (TR_Result (mword ty56) PTW_Error)*)
+(*val translate48 : mword ty16 -> mword ty56 -> mword ty48 -> AccessType unit -> Privilege -> bool -> bool -> ii -> unit -> M (TR_Result (mword ty56) PTW_Error)*)
val _ = Define `
- ((translate48:(16)words$word ->(56)words$word ->(48)words$word -> AccessType -> Privilege -> bool -> bool -> int ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level= (sail2_state_monad$bindS
- (walk48 vAddr ac priv mxr do_sum ptb level F : ( (( 56 words$word), SV48_PTE)PTW_Result) M) (\ (w__0 : (( 56 words$word), SV48_PTE)
+ ((translate48:(16)words$word ->(56)words$word ->(48)words$word ->(unit)AccessType -> Privilege -> bool -> bool -> int -> unit ->(regstate)sail2_state_monad$sequential_state ->((((((56)words$word),(PTW_Error))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) asid ptb vAddr ac priv mxr do_sum level ext_ptw= (sail2_state_monad$bindS
+ (walk48 vAddr ac priv mxr do_sum ptb level F ext_ptw : ( (( 56 words$word), SV48_PTE)PTW_Result) M) (\ (w__0 : (( 56 words$word), SV48_PTE)
PTW_Result) .
(case w__0 of
- PTW_Failure (f) => sail2_state_monad$returnS (TR_Failure f)
- | PTW_Success ((pAddr, pte, pteAddr, level, global)) =>
- (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV48_PTE_BITS pte : 8 words$word)))) ac)) of
+ PTW_Failure ((f, ext_ptw)) => sail2_state_monad$returnS (TR_Failure (f, ext_ptw))
+ | PTW_Success ((pAddr, pte, pteAddr, level, global, ext_ptw)) =>
+ (case ((update_PTE_Bits ((Mk_PTE_Bits ((get_SV48_PTE_BITS pte : 8 words$word)))) ac
+ ((get_SV48_PTE_Ext pte : 10 words$word))
+ : ((PTE_Bits # 10 words$word))option)) of
NONE => sail2_state_monad$seqS
- (add_to_TLB48 asid vAddr pAddr pte pteAddr level global) (sail2_state_monad$returnS (TR_Address pAddr))
- | SOME (pbits) =>
- if ((~ ((plat_enable_dirty_update () )))) then sail2_state_monad$returnS (TR_Failure PTW_PTE_Update)
+ (add_to_TLB48 asid vAddr pAddr pte pteAddr level global)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | SOME ((pbits, ext)) =>
+ if ((~ ((plat_enable_dirty_update () )))) then
+ sail2_state_monad$returnS (TR_Failure (PTW_PTE_Update () , ext_ptw))
else
let (w_pte : SV48_PTE) =
- (update_SV48_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in sail2_state_monad$bindS
- (mem_write_value ((EXTZ (( 64 : int):ii) pteAddr : 64 words$word)) (( 8 : int):ii)
- ((get_SV48_PTE_bits w_pte : 64 words$word)) F F F) (\ (w__1 : bool
+ (update_SV48_PTE_BITS pte ((get_PTE_Bits_bits pbits : 8 words$word))) in
+ let (w_pte : SV48_PTE) = (update_SV48_PTE_Ext w_pte ext) in sail2_state_monad$bindS
+ (mem_write_value_priv ((EXTZ (( 64 : int):ii) pteAddr : 64 words$word)) (( 8 : int):ii)
+ ((get_SV48_PTE_bits w_pte : 64 words$word)) Supervisor F F F) (\ (w__1 : bool
MemoryOpResult) .
(case w__1 of
MemValue (_) => sail2_state_monad$seqS
- (add_to_TLB48 asid vAddr pAddr w_pte pteAddr level global) (sail2_state_monad$returnS (TR_Address pAddr))
- | MemException (e) => sail2_state_monad$returnS (TR_Failure PTW_Access)
+ (add_to_TLB48 asid vAddr pAddr w_pte pteAddr level global)
+ (sail2_state_monad$returnS (TR_Address (pAddr, ext_ptw)))
+ | MemException (e) => sail2_state_monad$returnS (TR_Failure (PTW_Access () , ext_ptw))
))
)
))))`;
@@ -15235,13 +17595,29 @@ val _ = Define `
((legalize_satp64 a o1 v : 64 words$word)))`;
+(*val isValidSv39Addr : mword ty64 -> bool*)
+
+val _ = Define `
+ ((isValidSv39Addr:(64)words$word -> bool) vAddr=
+ (((subrange_vec_dec vAddr (( 63 : int):ii) (( 39 : int):ii) : 25 words$word)) = (if (((((access_vec_dec vAddr (( 38 : int):ii))) = B1))) then
+ (ones (((((( 63 : int):ii) - (( 39 : int):ii))) + (( 1 : int):ii))) : 25 words$word)
+ else (zeros_implicit (((((( 63 : int):ii) - (( 39 : int):ii))) + (( 1 : int):ii))) : 25 words$word))))`;
+
+
+(*val isValidSv48Addr : mword ty64 -> bool*)
+
+val _ = Define `
+ ((isValidSv48Addr:(64)words$word -> bool) vAddr=
+ (((subrange_vec_dec vAddr (( 63 : int):ii) (( 48 : int):ii) : 16 words$word)) = (if (((((access_vec_dec vAddr (( 47 : int):ii))) = B1))) then
+ (ones (((((( 63 : int):ii) - (( 48 : int):ii))) + (( 1 : int):ii))) : 16 words$word)
+ else (zeros_implicit (((((( 63 : int):ii) - (( 48 : int):ii))) + (( 1 : int):ii))) : 16 words$word))))`;
+
+
(*val translationMode : Privilege -> M SATPMode*)
val _ = Define `
((translationMode:Privilege ->(regstate)sail2_state_monad$sequential_state ->(((SATPMode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) priv=
- (if (((((privLevel_to_bits priv : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- then
- sail2_state_monad$returnS Sbare
+ (if (((priv = Machine))) then sail2_state_monad$returnS Sbare
else sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
let arch = (architecture ((get_mstatus_SXL w__0 : 2 words$word))) in
@@ -15256,57 +17632,62 @@ val _ = Define `
| SOME (RV32) => sail2_state_monad$bindS
(sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__4 : 64 words$word) .
let s = (Mk_Satp32 ((subrange_vec_dec w__4 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))) in
- sail2_state_monad$returnS (if (((((get_Satp32_Mode s : 1 words$word)) = ((bool_to_bits F : 1 words$word)))))
- then
- Sbare
+ sail2_state_monad$returnS (if (((((get_Satp32_Mode s : 1 words$word)) = (0b0w : 1 words$word)))) then Sbare
else Sv32))
| _ => internal_error "unsupported address translation arch"
))))`;
-(*val translateAddr : mword ty64 -> AccessType -> M (TR_Result (mword ty64) ExceptionType)*)
+(*val translateAddr_priv : mword ty64 -> AccessType unit -> Privilege -> M (TR_Result (mword ty64) ExceptionType)*)
val _ = Define `
- ((translateAddr:(64)words$word -> AccessType ->(regstate)sail2_state_monad$sequential_state ->((((((64)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac= (sail2_state_monad$bindS
- (case ac of
- Execute => sail2_state_monad$read_regS cur_privilege_ref
- | _ => sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . effectivePrivilege w__1 w__2))
- ) (\ (effPriv : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
- let (mxr : bool) =
- (((get_Mstatus_MXR w__4 : 1 words$word)) = ((bool_to_bits T : 1 words$word))) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__5 : Mstatus) .
- let (do_sum : bool) =
- (((get_Mstatus_SUM w__5 : 1 words$word)) = ((bool_to_bits T : 1 words$word))) in sail2_state_monad$bindS
+ ((translateAddr_priv:(64)words$word ->(unit)AccessType -> Privilege ->(regstate)sail2_state_monad$sequential_state ->((((((64)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac effPriv= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) .
+ let (mxr : bool) = (((get_Mstatus_MXR w__0 : 1 words$word)) = (0b1w : 1 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
+ let (do_sum : bool) = (((get_Mstatus_SUM w__1 : 1 words$word)) = (0b1w : 1 words$word)) in sail2_state_monad$bindS
(translationMode effPriv) (\ (mode : SATPMode) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__6 : 64 words$word) .
- let asid = ((curAsid64 w__6 : 16 words$word)) in sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__7 : 64 words$word) .
- let ptb = ((curPTB64 w__7 : 56 words$word)) in
+ (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ let asid = ((curAsid64 w__2 : 16 words$word)) in sail2_state_monad$bindS
+ (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
+ let ptb = ((curPTB64 w__3 : 56 words$word)) in
+ let (ext_ptw : ext_ptw) = init_ext_ptw in
(case mode of
- Sbare => sail2_state_monad$returnS (TR_Address vAddr)
- | Sv39 => sail2_state_monad$bindS
- (translate39 asid ptb ((subrange_vec_dec vAddr (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)) ac effPriv mxr
- do_sum ((SV39_LEVELS - (( 1 : int):ii)))
- : ( (( 56 words$word), PTW_Error)TR_Result) M) (\ (w__8 : (( 56 words$word), PTW_Error) TR_Result) .
- sail2_state_monad$returnS ((case w__8 of
- TR_Address (pa) => TR_Address ((EXTZ (( 64 : int):ii) pa : 64 words$word))
- | TR_Failure (f) => TR_Failure ((translationException ac f))
- )))
- | Sv48 => sail2_state_monad$bindS
- (translate48 asid ptb ((subrange_vec_dec vAddr (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)) ac effPriv mxr
- do_sum ((SV48_LEVELS - (( 1 : int):ii)))
- : ( (( 56 words$word), PTW_Error)TR_Result) M) (\ (w__9 : (( 56 words$word), PTW_Error) TR_Result) .
- sail2_state_monad$returnS ((case w__9 of
- TR_Address (pa) => TR_Address ((EXTZ (( 64 : int):ii) pa : 64 words$word))
- | TR_Failure (f) => TR_Failure ((translationException ac f))
- )))
+ Sbare => sail2_state_monad$returnS (TR_Address (vAddr, ext_ptw))
+ | Sv39 =>
+ if ((isValidSv39Addr vAddr)) then sail2_state_monad$bindS
+ (translate39 asid ptb ((subrange_vec_dec vAddr (( 38 : int):ii) (( 0 : int):ii) : 39 words$word)) ac effPriv mxr
+ do_sum ((SV39_LEVELS - (( 1 : int):ii))) ext_ptw
+ : ( (( 56 words$word), PTW_Error)TR_Result) M) (\ (w__4 : (( 56 words$word), PTW_Error) TR_Result) .
+ sail2_state_monad$returnS ((case w__4 of
+ TR_Address ((pa, ext_ptw)) => TR_Address ((EXTZ (( 64 : int):ii) pa : 64 words$word), ext_ptw)
+ | TR_Failure ((f, ext_ptw)) => TR_Failure (translationException ac f, ext_ptw)
+ )))
+ else sail2_state_monad$returnS (TR_Failure (translationException ac (PTW_Invalid_Addr () ), ext_ptw))
+ | Sv48 =>
+ if ((isValidSv48Addr vAddr)) then sail2_state_monad$bindS
+ (translate48 asid ptb ((subrange_vec_dec vAddr (( 47 : int):ii) (( 0 : int):ii) : 48 words$word)) ac effPriv mxr
+ do_sum ((SV48_LEVELS - (( 1 : int):ii))) ext_ptw
+ : ( (( 56 words$word), PTW_Error)TR_Result) M) (\ (w__6 : (( 56 words$word), PTW_Error) TR_Result) .
+ sail2_state_monad$returnS ((case w__6 of
+ TR_Address ((pa, ext_ptw)) => TR_Address ((EXTZ (( 64 : int):ii) pa : 64 words$word), ext_ptw)
+ | TR_Failure ((f, ext_ptw)) => TR_Failure (translationException ac f, ext_ptw)
+ )))
+ else sail2_state_monad$returnS (TR_Failure (translationException ac (PTW_Invalid_Addr () ), ext_ptw))
| _ =>
(internal_error "unsupported address translation scheme"
: ( (( 64 words$word), ExceptionType)TR_Result) M)
- )))))))))`;
+ ))))))))`;
+
+
+(*val translateAddr : mword ty64 -> AccessType unit -> M (TR_Result (mword ty64) ExceptionType)*)
+
+val _ = Define `
+ ((translateAddr:(64)words$word ->(unit)AccessType ->(regstate)sail2_state_monad$sequential_state ->((((((64)words$word),(ExceptionType))TR_Result),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vAddr ac= (sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (effectivePrivilege ac w__0 w__1) (\ (w__2 : Privilege) .
+ (translateAddr_priv vAddr ac w__2 : ( (( 64 words$word), ExceptionType)TR_Result) M))))))`;
(*val flush_TLB : maybe (mword ty64) -> maybe (mword ty64) -> M unit*)
@@ -15336,51 +17717,83 @@ val _ = Define `
(*val execute : ast -> M Retired*)
+(*val assembly_forwards : ast -> M string*)
+
+(*val assembly_backwards : string -> M ast*)
+
+(*val assembly_forwards_matches : ast -> bool*)
+
+(*val assembly_backwards_matches : string -> bool*)
+
+(*val assembly_matches_prefix : string -> maybe ((ast * ii))*)
+
+(*val encdec_forwards : ast -> M (mword ty32)*)
+
+(*val encdec_backwards : mword ty32 -> M ast*)
+
+(*val encdec_forwards_matches : ast -> M bool*)
+
+(*val encdec_backwards_matches : mword ty32 -> M bool*)
+
+(*val encdec_compressed_forwards : ast -> M (mword ty16)*)
+
+(*val encdec_compressed_backwards : mword ty16 -> M ast*)
+
+(*val encdec_compressed_forwards_matches : ast -> M bool*)
+
+(*val encdec_compressed_backwards_matches : mword ty16 -> M bool*)
+
(*val encdec_uop_forwards : uop -> mword ty7*)
+(*val encdec_uop_backwards : mword ty7 -> M uop*)
+
+(*val encdec_uop_forwards_matches : uop -> bool*)
+
+(*val encdec_uop_backwards_matches : mword ty7 -> bool*)
+
val _ = Define `
((encdec_uop_forwards:uop ->(7)words$word) arg_=
((case arg_ of
- RISCV_LUI => (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)
- | RISCV_AUIPC => (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)
+ RISCV_LUI => (0b0110111w : 7 words$word)
+ | RISCV_AUIPC => (0b0010111w : 7 words$word)
)))`;
-(*val encdec_uop_backwards : mword ty7 -> M uop*)
-
val _ = Define `
((encdec_uop_backwards:(7)words$word ->(regstate)sail2_state_monad$sequential_state ->(((uop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)))) then sail2_state_monad$returnS RISCV_LUI
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)))) then sail2_state_monad$returnS RISCV_AUIPC
+ if (((b__0 = (0b0110111w : 7 words$word)))) then sail2_state_monad$returnS RISCV_LUI
+ else if (((b__0 = (0b0010111w : 7 words$word)))) then sail2_state_monad$returnS RISCV_AUIPC
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_uop_forwards_matches : uop -> bool*)
-
val _ = Define `
((encdec_uop_forwards_matches:uop -> bool) arg_=
((case arg_ of RISCV_LUI => T | RISCV_AUIPC => T )))`;
-(*val encdec_uop_backwards_matches : mword ty7 -> bool*)
-
val _ = Define `
((encdec_uop_backwards_matches:(7)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1;B1;B0;B1;B1;B1] : 7 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B0;B1;B1;B1] : 7 words$word)))) then T
+ if (((b__0 = (0b0110111w : 7 words$word)))) then T
+ else if (((b__0 = (0b0010111w : 7 words$word)))) then T
else F))`;
(*val utype_mnemonic_forwards : uop -> string*)
+(*val utype_mnemonic_backwards : string -> M uop*)
+
+(*val utype_mnemonic_forwards_matches : uop -> bool*)
+
+(*val utype_mnemonic_backwards_matches : string -> bool*)
+
+(*val utype_mnemonic_matches_prefix : string -> maybe ((uop * ii))*)
+
val _ = Define `
((utype_mnemonic_forwards:uop -> string) arg_= ((case arg_ of RISCV_LUI => "lui" | RISCV_AUIPC => "auipc" )))`;
-(*val utype_mnemonic_backwards : string -> M uop*)
-
val _ = Define `
((utype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((uop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15389,15 +17802,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val utype_mnemonic_forwards_matches : uop -> bool*)
-
val _ = Define `
((utype_mnemonic_forwards_matches:uop -> bool) arg_=
((case arg_ of RISCV_LUI => T | RISCV_AUIPC => T )))`;
-(*val utype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((utype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15406,38 +17815,36 @@ val _ = Define `
else F))`;
-(*val utype_mnemonic_matches_prefix : string -> maybe ((uop * ii))*)
-
-(*val _s496_ : string -> maybe string*)
+(*val _s761_ : string -> maybe string*)
val _ = Define `
- ((s496_:string ->(string)option) s497_0=
- (let s498_0 = s497_0 in
- if ((string_startswith s498_0 "auipc")) then
- (case ((string_drop s498_0 ((string_length "auipc")))) of s_ => SOME s_ )
+ ((s761_:string ->(string)option) s762_0=
+ (let s763_0 = s762_0 in
+ if ((string_startswith s763_0 "auipc")) then
+ (case ((string_drop s763_0 ((string_length "auipc")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s492_ : string -> maybe string*)
+(*val _s757_ : string -> maybe string*)
val _ = Define `
- ((s492_:string ->(string)option) s493_0=
- (let s494_0 = s493_0 in
- if ((string_startswith s494_0 "lui")) then
- (case ((string_drop s494_0 ((string_length "lui")))) of s_ => SOME s_ )
+ ((s757_:string ->(string)option) s758_0=
+ (let s759_0 = s758_0 in
+ if ((string_startswith s759_0 "lui")) then
+ (case ((string_drop s759_0 ((string_length "lui")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((utype_mnemonic_matches_prefix:string ->(uop#int)option) arg_=
- (let s495_0 = arg_ in
- if ((case ((s492_ s495_0)) of SOME (s_) => T | _ => F )) then
- (case s492_ s495_0 of
+ (let s760_0 = arg_ in
+ if ((case ((s757_ s760_0)) of SOME (s_) => T | _ => F )) then
+ (case s757_ s760_0 of
(SOME (s_)) =>
SOME (RISCV_LUI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s496_ s495_0)) of SOME (s_) => T | _ => F )) then
- (case s496_ s495_0 of
+ else if ((case ((s761_ s760_0)) of SOME (s_) => T | _ => F )) then
+ (case s761_ s760_0 of
(SOME (s_)) =>
SOME (RISCV_AUIPC, ((string_length arg_)) - ((string_length s_)))
)
@@ -15446,34 +17853,36 @@ val _ = Define `
(*val encdec_bop_forwards : bop -> mword ty3*)
+(*val encdec_bop_backwards : mword ty3 -> M bop*)
+
+(*val encdec_bop_forwards_matches : bop -> bool*)
+
+(*val encdec_bop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_bop_forwards:bop ->(3)words$word) arg_=
((case arg_ of
- RISCV_BEQ => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | RISCV_BNE => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | RISCV_BLT => (vec_of_bits [B1;B0;B0] : 3 words$word)
- | RISCV_BGE => (vec_of_bits [B1;B0;B1] : 3 words$word)
- | RISCV_BLTU => (vec_of_bits [B1;B1;B0] : 3 words$word)
- | RISCV_BGEU => (vec_of_bits [B1;B1;B1] : 3 words$word)
+ RISCV_BEQ => (0b000w : 3 words$word)
+ | RISCV_BNE => (0b001w : 3 words$word)
+ | RISCV_BLT => (0b100w : 3 words$word)
+ | RISCV_BGE => (0b101w : 3 words$word)
+ | RISCV_BLTU => (0b110w : 3 words$word)
+ | RISCV_BGEU => (0b111w : 3 words$word)
)))`;
-(*val encdec_bop_backwards : mword ty3 -> M bop*)
-
val _ = Define `
((encdec_bop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BEQ
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BNE
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLT
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGE
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLTU
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGEU
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BEQ
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BNE
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLT
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGE
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BLTU
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RISCV_BGEU
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_bop_forwards_matches : bop -> bool*)
-
val _ = Define `
((encdec_bop_forwards_matches:bop -> bool) arg_=
((case arg_ of
@@ -15486,22 +17895,28 @@ val _ = Define `
)))`;
-(*val encdec_bop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_bop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
else F))`;
(*val btype_mnemonic_forwards : bop -> string*)
+(*val btype_mnemonic_backwards : string -> M bop*)
+
+(*val btype_mnemonic_forwards_matches : bop -> bool*)
+
+(*val btype_mnemonic_backwards_matches : string -> bool*)
+
+(*val btype_mnemonic_matches_prefix : string -> maybe ((bop * ii))*)
+
val _ = Define `
((btype_mnemonic_forwards:bop -> string) arg_=
((case arg_ of
@@ -15514,8 +17929,6 @@ val _ = Define `
)))`;
-(*val btype_mnemonic_backwards : string -> M bop*)
-
val _ = Define `
((btype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15528,8 +17941,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val btype_mnemonic_forwards_matches : bop -> bool*)
-
val _ = Define `
((btype_mnemonic_forwards_matches:bop -> bool) arg_=
((case arg_ of
@@ -15542,8 +17953,6 @@ val _ = Define `
)))`;
-(*val btype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((btype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15556,98 +17965,96 @@ val _ = Define `
else F))`;
-(*val btype_mnemonic_matches_prefix : string -> maybe ((bop * ii))*)
-
-(*val _s520_ : string -> maybe string*)
+(*val _s785_ : string -> maybe string*)
val _ = Define `
- ((s520_:string ->(string)option) s521_0=
- (let s522_0 = s521_0 in
- if ((string_startswith s522_0 "bgeu")) then
- (case ((string_drop s522_0 ((string_length "bgeu")))) of s_ => SOME s_ )
+ ((s785_:string ->(string)option) s786_0=
+ (let s787_0 = s786_0 in
+ if ((string_startswith s787_0 "bgeu")) then
+ (case ((string_drop s787_0 ((string_length "bgeu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s516_ : string -> maybe string*)
+(*val _s781_ : string -> maybe string*)
val _ = Define `
- ((s516_:string ->(string)option) s517_0=
- (let s518_0 = s517_0 in
- if ((string_startswith s518_0 "bltu")) then
- (case ((string_drop s518_0 ((string_length "bltu")))) of s_ => SOME s_ )
+ ((s781_:string ->(string)option) s782_0=
+ (let s783_0 = s782_0 in
+ if ((string_startswith s783_0 "bltu")) then
+ (case ((string_drop s783_0 ((string_length "bltu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s512_ : string -> maybe string*)
+(*val _s777_ : string -> maybe string*)
val _ = Define `
- ((s512_:string ->(string)option) s513_0=
- (let s514_0 = s513_0 in
- if ((string_startswith s514_0 "bge")) then
- (case ((string_drop s514_0 ((string_length "bge")))) of s_ => SOME s_ )
+ ((s777_:string ->(string)option) s778_0=
+ (let s779_0 = s778_0 in
+ if ((string_startswith s779_0 "bge")) then
+ (case ((string_drop s779_0 ((string_length "bge")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s508_ : string -> maybe string*)
+(*val _s773_ : string -> maybe string*)
val _ = Define `
- ((s508_:string ->(string)option) s509_0=
- (let s510_0 = s509_0 in
- if ((string_startswith s510_0 "blt")) then
- (case ((string_drop s510_0 ((string_length "blt")))) of s_ => SOME s_ )
+ ((s773_:string ->(string)option) s774_0=
+ (let s775_0 = s774_0 in
+ if ((string_startswith s775_0 "blt")) then
+ (case ((string_drop s775_0 ((string_length "blt")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s504_ : string -> maybe string*)
+(*val _s769_ : string -> maybe string*)
val _ = Define `
- ((s504_:string ->(string)option) s505_0=
- (let s506_0 = s505_0 in
- if ((string_startswith s506_0 "bne")) then
- (case ((string_drop s506_0 ((string_length "bne")))) of s_ => SOME s_ )
+ ((s769_:string ->(string)option) s770_0=
+ (let s771_0 = s770_0 in
+ if ((string_startswith s771_0 "bne")) then
+ (case ((string_drop s771_0 ((string_length "bne")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s500_ : string -> maybe string*)
+(*val _s765_ : string -> maybe string*)
val _ = Define `
- ((s500_:string ->(string)option) s501_0=
- (let s502_0 = s501_0 in
- if ((string_startswith s502_0 "beq")) then
- (case ((string_drop s502_0 ((string_length "beq")))) of s_ => SOME s_ )
+ ((s765_:string ->(string)option) s766_0=
+ (let s767_0 = s766_0 in
+ if ((string_startswith s767_0 "beq")) then
+ (case ((string_drop s767_0 ((string_length "beq")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((btype_mnemonic_matches_prefix:string ->(bop#int)option) arg_=
- (let s503_0 = arg_ in
- if ((case ((s500_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s500_ s503_0 of
+ (let s768_0 = arg_ in
+ if ((case ((s765_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s765_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BEQ, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s504_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s504_ s503_0 of
+ else if ((case ((s769_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s769_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BNE, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s508_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s508_ s503_0 of
+ else if ((case ((s773_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s773_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BLT, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s512_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s512_ s503_0 of
+ else if ((case ((s777_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s777_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BGE, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s516_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s516_ s503_0 of
+ else if ((case ((s781_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s781_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BLTU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s520_ s503_0)) of SOME (s_) => T | _ => F )) then
- (case s520_ s503_0 of
+ else if ((case ((s785_ s768_0)) of SOME (s_) => T | _ => F )) then
+ (case s785_ s768_0 of
(SOME (s_)) =>
SOME (RISCV_BGEU, ((string_length arg_)) - ((string_length s_)))
)
@@ -15656,34 +18063,36 @@ val _ = Define `
(*val encdec_iop_forwards : iop -> mword ty3*)
+(*val encdec_iop_backwards : mword ty3 -> M iop*)
+
+(*val encdec_iop_forwards_matches : iop -> bool*)
+
+(*val encdec_iop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_iop_forwards:iop ->(3)words$word) arg_=
((case arg_ of
- RISCV_ADDI => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | RISCV_SLTI => (vec_of_bits [B0;B1;B0] : 3 words$word)
- | RISCV_SLTIU => (vec_of_bits [B0;B1;B1] : 3 words$word)
- | RISCV_ANDI => (vec_of_bits [B1;B1;B1] : 3 words$word)
- | RISCV_ORI => (vec_of_bits [B1;B1;B0] : 3 words$word)
- | RISCV_XORI => (vec_of_bits [B1;B0;B0] : 3 words$word)
+ RISCV_ADDI => (0b000w : 3 words$word)
+ | RISCV_SLTI => (0b010w : 3 words$word)
+ | RISCV_SLTIU => (0b011w : 3 words$word)
+ | RISCV_ANDI => (0b111w : 3 words$word)
+ | RISCV_ORI => (0b110w : 3 words$word)
+ | RISCV_XORI => (0b100w : 3 words$word)
)))`;
-(*val encdec_iop_backwards : mword ty3 -> M iop*)
-
val _ = Define `
((encdec_iop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((iop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ADDI
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTI
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTIU
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ANDI
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_ORI
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS RISCV_XORI
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ADDI
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTI
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLTIU
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ANDI
+ else if (((b__0 = (0b110w : 3 words$word)))) then sail2_state_monad$returnS RISCV_ORI
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RISCV_XORI
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_iop_forwards_matches : iop -> bool*)
-
val _ = Define `
((encdec_iop_forwards_matches:iop -> bool) arg_=
((case arg_ of
@@ -15696,22 +18105,28 @@ val _ = Define `
)))`;
-(*val encdec_iop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_iop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B0] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
+ else if (((b__0 = (0b110w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
else F))`;
(*val itype_mnemonic_forwards : iop -> string*)
+(*val itype_mnemonic_backwards : string -> M iop*)
+
+(*val itype_mnemonic_forwards_matches : iop -> bool*)
+
+(*val itype_mnemonic_backwards_matches : string -> bool*)
+
+(*val itype_mnemonic_matches_prefix : string -> maybe ((iop * ii))*)
+
val _ = Define `
((itype_mnemonic_forwards:iop -> string) arg_=
((case arg_ of
@@ -15724,8 +18139,6 @@ val _ = Define `
)))`;
-(*val itype_mnemonic_backwards : string -> M iop*)
-
val _ = Define `
((itype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((iop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15738,8 +18151,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val itype_mnemonic_forwards_matches : iop -> bool*)
-
val _ = Define `
((itype_mnemonic_forwards_matches:iop -> bool) arg_=
((case arg_ of
@@ -15752,8 +18163,6 @@ val _ = Define `
)))`;
-(*val itype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((itype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15766,98 +18175,96 @@ val _ = Define `
else F))`;
-(*val itype_mnemonic_matches_prefix : string -> maybe ((iop * ii))*)
-
-(*val _s544_ : string -> maybe string*)
+(*val _s809_ : string -> maybe string*)
val _ = Define `
- ((s544_:string ->(string)option) s545_0=
- (let s546_0 = s545_0 in
- if ((string_startswith s546_0 "andi")) then
- (case ((string_drop s546_0 ((string_length "andi")))) of s_ => SOME s_ )
+ ((s809_:string ->(string)option) s810_0=
+ (let s811_0 = s810_0 in
+ if ((string_startswith s811_0 "andi")) then
+ (case ((string_drop s811_0 ((string_length "andi")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s540_ : string -> maybe string*)
+(*val _s805_ : string -> maybe string*)
val _ = Define `
- ((s540_:string ->(string)option) s541_0=
- (let s542_0 = s541_0 in
- if ((string_startswith s542_0 "ori")) then
- (case ((string_drop s542_0 ((string_length "ori")))) of s_ => SOME s_ )
+ ((s805_:string ->(string)option) s806_0=
+ (let s807_0 = s806_0 in
+ if ((string_startswith s807_0 "ori")) then
+ (case ((string_drop s807_0 ((string_length "ori")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s536_ : string -> maybe string*)
+(*val _s801_ : string -> maybe string*)
val _ = Define `
- ((s536_:string ->(string)option) s537_0=
- (let s538_0 = s537_0 in
- if ((string_startswith s538_0 "xori")) then
- (case ((string_drop s538_0 ((string_length "xori")))) of s_ => SOME s_ )
+ ((s801_:string ->(string)option) s802_0=
+ (let s803_0 = s802_0 in
+ if ((string_startswith s803_0 "xori")) then
+ (case ((string_drop s803_0 ((string_length "xori")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s532_ : string -> maybe string*)
+(*val _s797_ : string -> maybe string*)
val _ = Define `
- ((s532_:string ->(string)option) s533_0=
- (let s534_0 = s533_0 in
- if ((string_startswith s534_0 "sltiu")) then
- (case ((string_drop s534_0 ((string_length "sltiu")))) of s_ => SOME s_ )
+ ((s797_:string ->(string)option) s798_0=
+ (let s799_0 = s798_0 in
+ if ((string_startswith s799_0 "sltiu")) then
+ (case ((string_drop s799_0 ((string_length "sltiu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s528_ : string -> maybe string*)
+(*val _s793_ : string -> maybe string*)
val _ = Define `
- ((s528_:string ->(string)option) s529_0=
- (let s530_0 = s529_0 in
- if ((string_startswith s530_0 "slti")) then
- (case ((string_drop s530_0 ((string_length "slti")))) of s_ => SOME s_ )
+ ((s793_:string ->(string)option) s794_0=
+ (let s795_0 = s794_0 in
+ if ((string_startswith s795_0 "slti")) then
+ (case ((string_drop s795_0 ((string_length "slti")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s524_ : string -> maybe string*)
+(*val _s789_ : string -> maybe string*)
val _ = Define `
- ((s524_:string ->(string)option) s525_0=
- (let s526_0 = s525_0 in
- if ((string_startswith s526_0 "addi")) then
- (case ((string_drop s526_0 ((string_length "addi")))) of s_ => SOME s_ )
+ ((s789_:string ->(string)option) s790_0=
+ (let s791_0 = s790_0 in
+ if ((string_startswith s791_0 "addi")) then
+ (case ((string_drop s791_0 ((string_length "addi")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((itype_mnemonic_matches_prefix:string ->(iop#int)option) arg_=
- (let s527_0 = arg_ in
- if ((case ((s524_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s524_ s527_0 of
+ (let s792_0 = arg_ in
+ if ((case ((s789_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s789_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ADDI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s528_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s528_ s527_0 of
+ else if ((case ((s793_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s793_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_SLTI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s532_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s532_ s527_0 of
+ else if ((case ((s797_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s797_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_SLTIU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s536_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s536_ s527_0 of
+ else if ((case ((s801_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s801_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_XORI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s540_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s540_ s527_0 of
+ else if ((case ((s805_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s805_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ORI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s544_ s527_0)) of SOME (s_) => T | _ => F )) then
- (case s544_ s527_0 of
+ else if ((case ((s809_ s792_0)) of SOME (s_) => T | _ => F )) then
+ (case s809_ s792_0 of
(SOME (s_)) =>
SOME (RISCV_ANDI, ((string_length arg_)) - ((string_length s_)))
)
@@ -15866,53 +18273,59 @@ val _ = Define `
(*val encdec_sop_forwards : sop -> mword ty3*)
+(*val encdec_sop_backwards : mword ty3 -> M sop*)
+
+(*val encdec_sop_forwards_matches : sop -> bool*)
+
+(*val encdec_sop_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_sop_forwards:sop ->(3)words$word) arg_=
((case arg_ of
- RISCV_SLLI => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | RISCV_SRLI => (vec_of_bits [B1;B0;B1] : 3 words$word)
- | RISCV_SRAI => (vec_of_bits [B1;B0;B1] : 3 words$word)
+ RISCV_SLLI => (0b001w : 3 words$word)
+ | RISCV_SRLI => (0b101w : 3 words$word)
+ | RISCV_SRAI => (0b101w : 3 words$word)
)))`;
-(*val encdec_sop_backwards : mword ty3 -> M sop*)
-
val _ = Define `
((encdec_sop_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLLI
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRLI
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRAI
+ if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SLLI
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRLI
+ else if (((b__0 = (0b101w : 3 words$word)))) then sail2_state_monad$returnS RISCV_SRAI
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_sop_forwards_matches : sop -> bool*)
-
val _ = Define `
((encdec_sop_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val encdec_sop_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_sop_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
+ else if (((b__0 = (0b101w : 3 words$word)))) then T
else F))`;
(*val shiftiop_mnemonic_forwards : sop -> string*)
+(*val shiftiop_mnemonic_backwards : string -> M sop*)
+
+(*val shiftiop_mnemonic_forwards_matches : sop -> bool*)
+
+(*val shiftiop_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftiop_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
+
val _ = Define `
((shiftiop_mnemonic_forwards:sop -> string) arg_=
((case arg_ of RISCV_SLLI => "slli" | RISCV_SRLI => "srli" | RISCV_SRAI => "srai" )))`;
-(*val shiftiop_mnemonic_backwards : string -> M sop*)
-
val _ = Define `
((shiftiop_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -15922,15 +18335,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftiop_mnemonic_forwards_matches : sop -> bool*)
-
val _ = Define `
((shiftiop_mnemonic_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val shiftiop_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftiop_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -15940,53 +18349,51 @@ val _ = Define `
else F))`;
-(*val shiftiop_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
-
-(*val _s556_ : string -> maybe string*)
+(*val _s821_ : string -> maybe string*)
val _ = Define `
- ((s556_:string ->(string)option) s557_0=
- (let s558_0 = s557_0 in
- if ((string_startswith s558_0 "srai")) then
- (case ((string_drop s558_0 ((string_length "srai")))) of s_ => SOME s_ )
+ ((s821_:string ->(string)option) s822_0=
+ (let s823_0 = s822_0 in
+ if ((string_startswith s823_0 "srai")) then
+ (case ((string_drop s823_0 ((string_length "srai")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s552_ : string -> maybe string*)
+(*val _s817_ : string -> maybe string*)
val _ = Define `
- ((s552_:string ->(string)option) s553_0=
- (let s554_0 = s553_0 in
- if ((string_startswith s554_0 "srli")) then
- (case ((string_drop s554_0 ((string_length "srli")))) of s_ => SOME s_ )
+ ((s817_:string ->(string)option) s818_0=
+ (let s819_0 = s818_0 in
+ if ((string_startswith s819_0 "srli")) then
+ (case ((string_drop s819_0 ((string_length "srli")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s548_ : string -> maybe string*)
+(*val _s813_ : string -> maybe string*)
val _ = Define `
- ((s548_:string ->(string)option) s549_0=
- (let s550_0 = s549_0 in
- if ((string_startswith s550_0 "slli")) then
- (case ((string_drop s550_0 ((string_length "slli")))) of s_ => SOME s_ )
+ ((s813_:string ->(string)option) s814_0=
+ (let s815_0 = s814_0 in
+ if ((string_startswith s815_0 "slli")) then
+ (case ((string_drop s815_0 ((string_length "slli")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftiop_mnemonic_matches_prefix:string ->(sop#int)option) arg_=
- (let s551_0 = arg_ in
- if ((case ((s548_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s548_ s551_0 of
+ (let s816_0 = arg_ in
+ if ((case ((s813_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s813_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SLLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s552_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s552_ s551_0 of
+ else if ((case ((s817_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s817_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SRLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s556_ s551_0)) of SOME (s_) => T | _ => F )) then
- (case s556_ s551_0 of
+ else if ((case ((s821_ s816_0)) of SOME (s_) => T | _ => F )) then
+ (case s821_ s816_0 of
(SOME (s_)) =>
SOME (RISCV_SRAI, ((string_length arg_)) - ((string_length s_)))
)
@@ -15995,6 +18402,14 @@ val _ = Define `
(*val rtype_mnemonic_forwards : rop -> string*)
+(*val rtype_mnemonic_backwards : string -> M rop*)
+
+(*val rtype_mnemonic_forwards_matches : rop -> bool*)
+
+(*val rtype_mnemonic_backwards_matches : string -> bool*)
+
+(*val rtype_mnemonic_matches_prefix : string -> maybe ((rop * ii))*)
+
val _ = Define `
((rtype_mnemonic_forwards:rop -> string) arg_=
((case arg_ of
@@ -16011,8 +18426,6 @@ val _ = Define `
)))`;
-(*val rtype_mnemonic_backwards : string -> M rop*)
-
val _ = Define `
((rtype_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((rop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16029,8 +18442,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val rtype_mnemonic_forwards_matches : rop -> bool*)
-
val _ = Define `
((rtype_mnemonic_forwards_matches:rop -> bool) arg_=
((case arg_ of
@@ -16047,8 +18458,6 @@ val _ = Define `
)))`;
-(*val rtype_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((rtype_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16065,158 +18474,156 @@ val _ = Define `
else F))`;
-(*val rtype_mnemonic_matches_prefix : string -> maybe ((rop * ii))*)
-
-(*val _s596_ : string -> maybe string*)
+(*val _s861_ : string -> maybe string*)
val _ = Define `
- ((s596_:string ->(string)option) s597_0=
- (let s598_0 = s597_0 in
- if ((string_startswith s598_0 "sra")) then
- (case ((string_drop s598_0 ((string_length "sra")))) of s_ => SOME s_ )
+ ((s861_:string ->(string)option) s862_0=
+ (let s863_0 = s862_0 in
+ if ((string_startswith s863_0 "sra")) then
+ (case ((string_drop s863_0 ((string_length "sra")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s592_ : string -> maybe string*)
+(*val _s857_ : string -> maybe string*)
val _ = Define `
- ((s592_:string ->(string)option) s593_0=
- (let s594_0 = s593_0 in
- if ((string_startswith s594_0 "sub")) then
- (case ((string_drop s594_0 ((string_length "sub")))) of s_ => SOME s_ )
+ ((s857_:string ->(string)option) s858_0=
+ (let s859_0 = s858_0 in
+ if ((string_startswith s859_0 "sub")) then
+ (case ((string_drop s859_0 ((string_length "sub")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s588_ : string -> maybe string*)
+(*val _s853_ : string -> maybe string*)
val _ = Define `
- ((s588_:string ->(string)option) s589_0=
- (let s590_0 = s589_0 in
- if ((string_startswith s590_0 "srl")) then
- (case ((string_drop s590_0 ((string_length "srl")))) of s_ => SOME s_ )
+ ((s853_:string ->(string)option) s854_0=
+ (let s855_0 = s854_0 in
+ if ((string_startswith s855_0 "srl")) then
+ (case ((string_drop s855_0 ((string_length "srl")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s584_ : string -> maybe string*)
+(*val _s849_ : string -> maybe string*)
val _ = Define `
- ((s584_:string ->(string)option) s585_0=
- (let s586_0 = s585_0 in
- if ((string_startswith s586_0 "sll")) then
- (case ((string_drop s586_0 ((string_length "sll")))) of s_ => SOME s_ )
+ ((s849_:string ->(string)option) s850_0=
+ (let s851_0 = s850_0 in
+ if ((string_startswith s851_0 "sll")) then
+ (case ((string_drop s851_0 ((string_length "sll")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s580_ : string -> maybe string*)
+(*val _s845_ : string -> maybe string*)
val _ = Define `
- ((s580_:string ->(string)option) s581_0=
- (let s582_0 = s581_0 in
- if ((string_startswith s582_0 "xor")) then
- (case ((string_drop s582_0 ((string_length "xor")))) of s_ => SOME s_ )
+ ((s845_:string ->(string)option) s846_0=
+ (let s847_0 = s846_0 in
+ if ((string_startswith s847_0 "xor")) then
+ (case ((string_drop s847_0 ((string_length "xor")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s576_ : string -> maybe string*)
+(*val _s841_ : string -> maybe string*)
val _ = Define `
- ((s576_:string ->(string)option) s577_0=
- (let s578_0 = s577_0 in
- if ((string_startswith s578_0 "or")) then
- (case ((string_drop s578_0 ((string_length "or")))) of s_ => SOME s_ )
+ ((s841_:string ->(string)option) s842_0=
+ (let s843_0 = s842_0 in
+ if ((string_startswith s843_0 "or")) then
+ (case ((string_drop s843_0 ((string_length "or")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s572_ : string -> maybe string*)
+(*val _s837_ : string -> maybe string*)
val _ = Define `
- ((s572_:string ->(string)option) s573_0=
- (let s574_0 = s573_0 in
- if ((string_startswith s574_0 "and")) then
- (case ((string_drop s574_0 ((string_length "and")))) of s_ => SOME s_ )
+ ((s837_:string ->(string)option) s838_0=
+ (let s839_0 = s838_0 in
+ if ((string_startswith s839_0 "and")) then
+ (case ((string_drop s839_0 ((string_length "and")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s568_ : string -> maybe string*)
+(*val _s833_ : string -> maybe string*)
val _ = Define `
- ((s568_:string ->(string)option) s569_0=
- (let s570_0 = s569_0 in
- if ((string_startswith s570_0 "sltu")) then
- (case ((string_drop s570_0 ((string_length "sltu")))) of s_ => SOME s_ )
+ ((s833_:string ->(string)option) s834_0=
+ (let s835_0 = s834_0 in
+ if ((string_startswith s835_0 "sltu")) then
+ (case ((string_drop s835_0 ((string_length "sltu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s564_ : string -> maybe string*)
+(*val _s829_ : string -> maybe string*)
val _ = Define `
- ((s564_:string ->(string)option) s565_0=
- (let s566_0 = s565_0 in
- if ((string_startswith s566_0 "slt")) then
- (case ((string_drop s566_0 ((string_length "slt")))) of s_ => SOME s_ )
+ ((s829_:string ->(string)option) s830_0=
+ (let s831_0 = s830_0 in
+ if ((string_startswith s831_0 "slt")) then
+ (case ((string_drop s831_0 ((string_length "slt")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s560_ : string -> maybe string*)
+(*val _s825_ : string -> maybe string*)
val _ = Define `
- ((s560_:string ->(string)option) s561_0=
- (let s562_0 = s561_0 in
- if ((string_startswith s562_0 "add")) then
- (case ((string_drop s562_0 ((string_length "add")))) of s_ => SOME s_ )
+ ((s825_:string ->(string)option) s826_0=
+ (let s827_0 = s826_0 in
+ if ((string_startswith s827_0 "add")) then
+ (case ((string_drop s827_0 ((string_length "add")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((rtype_mnemonic_matches_prefix:string ->(rop#int)option) arg_=
- (let s563_0 = arg_ in
- if ((case ((s560_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s560_ s563_0 of
+ (let s828_0 = arg_ in
+ if ((case ((s825_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s825_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_ADD, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s564_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s564_ s563_0 of
+ else if ((case ((s829_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s829_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLT, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s568_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s568_ s563_0 of
+ else if ((case ((s833_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s833_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLTU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s572_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s572_ s563_0 of
+ else if ((case ((s837_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s837_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_AND, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s576_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s576_ s563_0 of
+ else if ((case ((s841_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s841_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_OR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s580_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s580_ s563_0 of
+ else if ((case ((s845_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s845_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_XOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s584_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s584_ s563_0 of
+ else if ((case ((s849_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s849_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SLL, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s588_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s588_ s563_0 of
+ else if ((case ((s853_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s853_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SRL, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s592_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s592_ s563_0 of
+ else if ((case ((s857_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s857_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SUB, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s596_ s563_0)) of SOME (s_) => T | _ => F )) then
- (case s596_ s563_0 of
+ else if ((case ((s861_ s828_0)) of SOME (s_) => T | _ => F )) then
+ (case s861_ s828_0 of
(SOME (s_)) =>
SOME (RISCV_SRA, ((string_length arg_)) - ((string_length s_)))
)
@@ -16238,10 +18645,10 @@ val _ = Define `
(*val process_load : forall 'int8_times_n. Size 'int8_times_n => mword ty5 -> mword ty64 -> MemoryOpResult (mword 'int8_times_n) -> bool -> M Retired*)
val _ = Define `
- ((process_load:(5)words$word ->(64)words$word ->('int8_times_n words$word)MemoryOpResult -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value is_unsigned=
+ ((process_load:(5)words$word ->(64)words$word ->('int8_times_n words$word)MemoryOpResult -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd vaddr value is_unsigned=
((case ((extend_value is_unsigned value : ( 64 words$word) MemoryOpResult)) of
- MemValue (result) => sail2_state_monad$seqS (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)
- | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ MemValue (result) => sail2_state_monad$seqS (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))`;
@@ -16253,22 +18660,28 @@ val _ = Define `
else
(case width of
BYTE => F
- | HALF => (((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T)
+ | HALF => (((access_vec_dec vaddr (( 0 : int):ii))) = B1)
| WORD =>
- ((((((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T))) \/ (((((bit_to_bool ((access_vec_dec vaddr (( 1 : int):ii))))) = T))))
+ ((((((access_vec_dec vaddr (( 0 : int):ii))) = B1))) \/ (((((access_vec_dec vaddr (( 1 : int):ii))) = B1))))
| DOUBLE =>
- ((((((bit_to_bool ((access_vec_dec vaddr (( 0 : int):ii))))) = T))) \/ ((((((((bit_to_bool ((access_vec_dec vaddr (( 1 : int):ii))))) = T))) \/ (((((bit_to_bool ((access_vec_dec vaddr (( 2 : int):ii))))) = T)))))))
+ ((((((access_vec_dec vaddr (( 0 : int):ii))) = B1))) \/ ((((((((access_vec_dec vaddr (( 1 : int):ii))) = B1))) \/ (((((access_vec_dec vaddr (( 2 : int):ii))) = B1)))))))
)))`;
(*val maybe_aq_forwards : bool -> string*)
+(*val maybe_aq_backwards : string -> M bool*)
+
+(*val maybe_aq_forwards_matches : bool -> bool*)
+
+(*val maybe_aq_backwards_matches : string -> bool*)
+
+(*val maybe_aq_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_aq_forwards:bool -> string) arg_= ((case arg_ of T => ".aq" | F => "" )))`;
-(*val maybe_aq_backwards : string -> M bool*)
-
val _ = Define `
((maybe_aq_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16277,15 +18690,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_aq_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_aq_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_aq_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_aq_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16294,38 +18703,36 @@ val _ = Define `
else F))`;
-(*val maybe_aq_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s604_ : string -> maybe string*)
+(*val _s869_ : string -> maybe string*)
val _ = Define `
- ((s604_:string ->(string)option) s605_0=
- (let s606_0 = s605_0 in
- if ((string_startswith s606_0 "")) then
- (case ((string_drop s606_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s869_:string ->(string)option) s870_0=
+ (let s871_0 = s870_0 in
+ if ((string_startswith s871_0 "")) then
+ (case ((string_drop s871_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s600_ : string -> maybe string*)
+(*val _s865_ : string -> maybe string*)
val _ = Define `
- ((s600_:string ->(string)option) s601_0=
- (let s602_0 = s601_0 in
- if ((string_startswith s602_0 ".aq")) then
- (case ((string_drop s602_0 ((string_length ".aq")))) of s_ => SOME s_ )
+ ((s865_:string ->(string)option) s866_0=
+ (let s867_0 = s866_0 in
+ if ((string_startswith s867_0 ".aq")) then
+ (case ((string_drop s867_0 ((string_length ".aq")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_aq_matches_prefix:string ->(bool#int)option) arg_=
- (let s603_0 = arg_ in
- if ((case ((s600_ s603_0)) of SOME (s_) => T | _ => F )) then
- (case s600_ s603_0 of
+ (let s868_0 = arg_ in
+ if ((case ((s865_ s868_0)) of SOME (s_) => T | _ => F )) then
+ (case s865_ s868_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s604_ s603_0)) of SOME (s_) => T | _ => F )) then
- (case s604_ s603_0 of
+ else if ((case ((s869_ s868_0)) of SOME (s_) => T | _ => F )) then
+ (case s869_ s868_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16334,12 +18741,18 @@ val _ = Define `
(*val maybe_rl_forwards : bool -> string*)
+(*val maybe_rl_backwards : string -> M bool*)
+
+(*val maybe_rl_forwards_matches : bool -> bool*)
+
+(*val maybe_rl_backwards_matches : string -> bool*)
+
+(*val maybe_rl_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_rl_forwards:bool -> string) arg_= ((case arg_ of T => ".rl" | F => "" )))`;
-(*val maybe_rl_backwards : string -> M bool*)
-
val _ = Define `
((maybe_rl_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16348,15 +18761,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_rl_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_rl_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_rl_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_rl_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16365,38 +18774,36 @@ val _ = Define `
else F))`;
-(*val maybe_rl_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s612_ : string -> maybe string*)
+(*val _s877_ : string -> maybe string*)
val _ = Define `
- ((s612_:string ->(string)option) s613_0=
- (let s614_0 = s613_0 in
- if ((string_startswith s614_0 "")) then
- (case ((string_drop s614_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s877_:string ->(string)option) s878_0=
+ (let s879_0 = s878_0 in
+ if ((string_startswith s879_0 "")) then
+ (case ((string_drop s879_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s608_ : string -> maybe string*)
+(*val _s873_ : string -> maybe string*)
val _ = Define `
- ((s608_:string ->(string)option) s609_0=
- (let s610_0 = s609_0 in
- if ((string_startswith s610_0 ".rl")) then
- (case ((string_drop s610_0 ((string_length ".rl")))) of s_ => SOME s_ )
+ ((s873_:string ->(string)option) s874_0=
+ (let s875_0 = s874_0 in
+ if ((string_startswith s875_0 ".rl")) then
+ (case ((string_drop s875_0 ((string_length ".rl")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_rl_matches_prefix:string ->(bool#int)option) arg_=
- (let s611_0 = arg_ in
- if ((case ((s608_ s611_0)) of SOME (s_) => T | _ => F )) then
- (case s608_ s611_0 of
+ (let s876_0 = arg_ in
+ if ((case ((s873_ s876_0)) of SOME (s_) => T | _ => F )) then
+ (case s873_ s876_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s612_ s611_0)) of SOME (s_) => T | _ => F )) then
- (case s612_ s611_0 of
+ else if ((case ((s877_ s876_0)) of SOME (s_) => T | _ => F )) then
+ (case s877_ s876_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16405,12 +18812,18 @@ val _ = Define `
(*val maybe_u_forwards : bool -> string*)
+(*val maybe_u_backwards : string -> M bool*)
+
+(*val maybe_u_forwards_matches : bool -> bool*)
+
+(*val maybe_u_backwards_matches : string -> bool*)
+
+(*val maybe_u_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_u_forwards:bool -> string) arg_= ((case arg_ of T => "u" | F => "" )))`;
-(*val maybe_u_backwards : string -> M bool*)
-
val _ = Define `
((maybe_u_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16419,15 +18832,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_u_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_u_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_u_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_u_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16436,38 +18845,36 @@ val _ = Define `
else F))`;
-(*val maybe_u_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s620_ : string -> maybe string*)
+(*val _s885_ : string -> maybe string*)
val _ = Define `
- ((s620_:string ->(string)option) s621_0=
- (let s622_0 = s621_0 in
- if ((string_startswith s622_0 "")) then
- (case ((string_drop s622_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s885_:string ->(string)option) s886_0=
+ (let s887_0 = s886_0 in
+ if ((string_startswith s887_0 "")) then
+ (case ((string_drop s887_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s616_ : string -> maybe string*)
+(*val _s881_ : string -> maybe string*)
val _ = Define `
- ((s616_:string ->(string)option) s617_0=
- (let s618_0 = s617_0 in
- if ((string_startswith s618_0 "u")) then
- (case ((string_drop s618_0 ((string_length "u")))) of s_ => SOME s_ )
+ ((s881_:string ->(string)option) s882_0=
+ (let s883_0 = s882_0 in
+ if ((string_startswith s883_0 "u")) then
+ (case ((string_drop s883_0 ((string_length "u")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_u_matches_prefix:string ->(bool#int)option) arg_=
- (let s619_0 = arg_ in
- if ((case ((s616_ s619_0)) of SOME (s_) => T | _ => F )) then
- (case s616_ s619_0 of
+ (let s884_0 = arg_ in
+ if ((case ((s881_ s884_0)) of SOME (s_) => T | _ => F )) then
+ (case s881_ s884_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s620_ s619_0)) of SOME (s_) => T | _ => F )) then
- (case s620_ s619_0 of
+ else if ((case ((s885_ s884_0)) of SOME (s_) => T | _ => F )) then
+ (case s885_ s884_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -16476,13 +18883,19 @@ val _ = Define `
(*val shiftw_mnemonic_forwards : sop -> string*)
+(*val shiftw_mnemonic_backwards : string -> M sop*)
+
+(*val shiftw_mnemonic_forwards_matches : sop -> bool*)
+
+(*val shiftw_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftw_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
+
val _ = Define `
((shiftw_mnemonic_forwards:sop -> string) arg_=
((case arg_ of RISCV_SLLI => "slli" | RISCV_SRLI => "srli" | RISCV_SRAI => "srai" )))`;
-(*val shiftw_mnemonic_backwards : string -> M sop*)
-
val _ = Define `
((shiftw_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16492,15 +18905,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftw_mnemonic_forwards_matches : sop -> bool*)
-
val _ = Define `
((shiftw_mnemonic_forwards_matches:sop -> bool) arg_=
((case arg_ of RISCV_SLLI => T | RISCV_SRLI => T | RISCV_SRAI => T )))`;
-(*val shiftw_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftw_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16510,53 +18919,51 @@ val _ = Define `
else F))`;
-(*val shiftw_mnemonic_matches_prefix : string -> maybe ((sop * ii))*)
-
-(*val _s632_ : string -> maybe string*)
+(*val _s897_ : string -> maybe string*)
val _ = Define `
- ((s632_:string ->(string)option) s633_0=
- (let s634_0 = s633_0 in
- if ((string_startswith s634_0 "srai")) then
- (case ((string_drop s634_0 ((string_length "srai")))) of s_ => SOME s_ )
+ ((s897_:string ->(string)option) s898_0=
+ (let s899_0 = s898_0 in
+ if ((string_startswith s899_0 "srai")) then
+ (case ((string_drop s899_0 ((string_length "srai")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s628_ : string -> maybe string*)
+(*val _s893_ : string -> maybe string*)
val _ = Define `
- ((s628_:string ->(string)option) s629_0=
- (let s630_0 = s629_0 in
- if ((string_startswith s630_0 "srli")) then
- (case ((string_drop s630_0 ((string_length "srli")))) of s_ => SOME s_ )
+ ((s893_:string ->(string)option) s894_0=
+ (let s895_0 = s894_0 in
+ if ((string_startswith s895_0 "srli")) then
+ (case ((string_drop s895_0 ((string_length "srli")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s624_ : string -> maybe string*)
+(*val _s889_ : string -> maybe string*)
val _ = Define `
- ((s624_:string ->(string)option) s625_0=
- (let s626_0 = s625_0 in
- if ((string_startswith s626_0 "slli")) then
- (case ((string_drop s626_0 ((string_length "slli")))) of s_ => SOME s_ )
+ ((s889_:string ->(string)option) s890_0=
+ (let s891_0 = s890_0 in
+ if ((string_startswith s891_0 "slli")) then
+ (case ((string_drop s891_0 ((string_length "slli")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftw_mnemonic_matches_prefix:string ->(sop#int)option) arg_=
- (let s627_0 = arg_ in
- if ((case ((s624_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s624_ s627_0 of
+ (let s892_0 = arg_ in
+ if ((case ((s889_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s889_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SLLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s628_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s628_ s627_0 of
+ else if ((case ((s893_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s893_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SRLI, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s632_ s627_0)) of SOME (s_) => T | _ => F )) then
- (case s632_ s627_0 of
+ else if ((case ((s897_ s892_0)) of SOME (s_) => T | _ => F )) then
+ (case s897_ s892_0 of
(SOME (s_)) =>
SOME (RISCV_SRAI, ((string_length arg_)) - ((string_length s_)))
)
@@ -16565,6 +18972,14 @@ val _ = Define `
(*val rtypew_mnemonic_forwards : ropw -> string*)
+(*val rtypew_mnemonic_backwards : string -> M ropw*)
+
+(*val rtypew_mnemonic_forwards_matches : ropw -> bool*)
+
+(*val rtypew_mnemonic_backwards_matches : string -> bool*)
+
+(*val rtypew_mnemonic_matches_prefix : string -> maybe ((ropw * ii))*)
+
val _ = Define `
((rtypew_mnemonic_forwards:ropw -> string) arg_=
((case arg_ of
@@ -16576,8 +18991,6 @@ val _ = Define `
)))`;
-(*val rtypew_mnemonic_backwards : string -> M ropw*)
-
val _ = Define `
((rtypew_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((ropw),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16589,8 +19002,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val rtypew_mnemonic_forwards_matches : ropw -> bool*)
-
val _ = Define `
((rtypew_mnemonic_forwards_matches:ropw -> bool) arg_=
((case arg_ of
@@ -16602,8 +19013,6 @@ val _ = Define `
)))`;
-(*val rtypew_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((rtypew_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16615,83 +19024,81 @@ val _ = Define `
else F))`;
-(*val rtypew_mnemonic_matches_prefix : string -> maybe ((ropw * ii))*)
-
-(*val _s652_ : string -> maybe string*)
+(*val _s917_ : string -> maybe string*)
val _ = Define `
- ((s652_:string ->(string)option) s653_0=
- (let s654_0 = s653_0 in
- if ((string_startswith s654_0 "sraw")) then
- (case ((string_drop s654_0 ((string_length "sraw")))) of s_ => SOME s_ )
+ ((s917_:string ->(string)option) s918_0=
+ (let s919_0 = s918_0 in
+ if ((string_startswith s919_0 "sraw")) then
+ (case ((string_drop s919_0 ((string_length "sraw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s648_ : string -> maybe string*)
+(*val _s913_ : string -> maybe string*)
val _ = Define `
- ((s648_:string ->(string)option) s649_0=
- (let s650_0 = s649_0 in
- if ((string_startswith s650_0 "srlw")) then
- (case ((string_drop s650_0 ((string_length "srlw")))) of s_ => SOME s_ )
+ ((s913_:string ->(string)option) s914_0=
+ (let s915_0 = s914_0 in
+ if ((string_startswith s915_0 "srlw")) then
+ (case ((string_drop s915_0 ((string_length "srlw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s644_ : string -> maybe string*)
+(*val _s909_ : string -> maybe string*)
val _ = Define `
- ((s644_:string ->(string)option) s645_0=
- (let s646_0 = s645_0 in
- if ((string_startswith s646_0 "sllw")) then
- (case ((string_drop s646_0 ((string_length "sllw")))) of s_ => SOME s_ )
+ ((s909_:string ->(string)option) s910_0=
+ (let s911_0 = s910_0 in
+ if ((string_startswith s911_0 "sllw")) then
+ (case ((string_drop s911_0 ((string_length "sllw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s640_ : string -> maybe string*)
+(*val _s905_ : string -> maybe string*)
val _ = Define `
- ((s640_:string ->(string)option) s641_0=
- (let s642_0 = s641_0 in
- if ((string_startswith s642_0 "subw")) then
- (case ((string_drop s642_0 ((string_length "subw")))) of s_ => SOME s_ )
+ ((s905_:string ->(string)option) s906_0=
+ (let s907_0 = s906_0 in
+ if ((string_startswith s907_0 "subw")) then
+ (case ((string_drop s907_0 ((string_length "subw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s636_ : string -> maybe string*)
+(*val _s901_ : string -> maybe string*)
val _ = Define `
- ((s636_:string ->(string)option) s637_0=
- (let s638_0 = s637_0 in
- if ((string_startswith s638_0 "addw")) then
- (case ((string_drop s638_0 ((string_length "addw")))) of s_ => SOME s_ )
+ ((s901_:string ->(string)option) s902_0=
+ (let s903_0 = s902_0 in
+ if ((string_startswith s903_0 "addw")) then
+ (case ((string_drop s903_0 ((string_length "addw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((rtypew_mnemonic_matches_prefix:string ->(ropw#int)option) arg_=
- (let s639_0 = arg_ in
- if ((case ((s636_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s636_ s639_0 of
+ (let s904_0 = arg_ in
+ if ((case ((s901_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s901_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_ADDW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s640_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s640_ s639_0 of
+ else if ((case ((s905_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s905_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SUBW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s644_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s644_ s639_0 of
+ else if ((case ((s909_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s909_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SLLW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s648_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s648_ s639_0 of
+ else if ((case ((s913_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s913_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SRLW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s652_ s639_0)) of SOME (s_) => T | _ => F )) then
- (case s652_ s639_0 of
+ else if ((case ((s917_ s904_0)) of SOME (s_) => T | _ => F )) then
+ (case s917_ s904_0 of
(SOME (s_)) =>
SOME (RISCV_SRAW, ((string_length arg_)) - ((string_length s_)))
)
@@ -16700,13 +19107,19 @@ val _ = Define `
(*val shiftiwop_mnemonic_forwards : sopw -> string*)
+(*val shiftiwop_mnemonic_backwards : string -> M sopw*)
+
+(*val shiftiwop_mnemonic_forwards_matches : sopw -> bool*)
+
+(*val shiftiwop_mnemonic_backwards_matches : string -> bool*)
+
+(*val shiftiwop_mnemonic_matches_prefix : string -> maybe ((sopw * ii))*)
+
val _ = Define `
((shiftiwop_mnemonic_forwards:sopw -> string) arg_=
((case arg_ of RISCV_SLLIW => "slliw" | RISCV_SRLIW => "srliw" | RISCV_SRAIW => "sraiw" )))`;
-(*val shiftiwop_mnemonic_backwards : string -> M sopw*)
-
val _ = Define `
((shiftiwop_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((sopw),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -16716,15 +19129,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val shiftiwop_mnemonic_forwards_matches : sopw -> bool*)
-
val _ = Define `
((shiftiwop_mnemonic_forwards_matches:sopw -> bool) arg_=
((case arg_ of RISCV_SLLIW => T | RISCV_SRLIW => T | RISCV_SRAIW => T )))`;
-(*val shiftiwop_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((shiftiwop_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16734,53 +19143,51 @@ val _ = Define `
else F))`;
-(*val shiftiwop_mnemonic_matches_prefix : string -> maybe ((sopw * ii))*)
-
-(*val _s664_ : string -> maybe string*)
+(*val _s929_ : string -> maybe string*)
val _ = Define `
- ((s664_:string ->(string)option) s665_0=
- (let s666_0 = s665_0 in
- if ((string_startswith s666_0 "sraiw")) then
- (case ((string_drop s666_0 ((string_length "sraiw")))) of s_ => SOME s_ )
+ ((s929_:string ->(string)option) s930_0=
+ (let s931_0 = s930_0 in
+ if ((string_startswith s931_0 "sraiw")) then
+ (case ((string_drop s931_0 ((string_length "sraiw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s660_ : string -> maybe string*)
+(*val _s925_ : string -> maybe string*)
val _ = Define `
- ((s660_:string ->(string)option) s661_0=
- (let s662_0 = s661_0 in
- if ((string_startswith s662_0 "srliw")) then
- (case ((string_drop s662_0 ((string_length "srliw")))) of s_ => SOME s_ )
+ ((s925_:string ->(string)option) s926_0=
+ (let s927_0 = s926_0 in
+ if ((string_startswith s927_0 "srliw")) then
+ (case ((string_drop s927_0 ((string_length "srliw")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s656_ : string -> maybe string*)
+(*val _s921_ : string -> maybe string*)
val _ = Define `
- ((s656_:string ->(string)option) s657_0=
- (let s658_0 = s657_0 in
- if ((string_startswith s658_0 "slliw")) then
- (case ((string_drop s658_0 ((string_length "slliw")))) of s_ => SOME s_ )
+ ((s921_:string ->(string)option) s922_0=
+ (let s923_0 = s922_0 in
+ if ((string_startswith s923_0 "slliw")) then
+ (case ((string_drop s923_0 ((string_length "slliw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((shiftiwop_mnemonic_matches_prefix:string ->(sopw#int)option) arg_=
- (let s659_0 = arg_ in
- if ((case ((s656_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s656_ s659_0 of
+ (let s924_0 = arg_ in
+ if ((case ((s921_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s921_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SLLIW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s660_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s660_ s659_0 of
+ else if ((case ((s925_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s925_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SRLIW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s664_ s659_0)) of SOME (s_) => T | _ => F )) then
- (case s664_ s659_0 of
+ else if ((case ((s929_ s924_0)) of SOME (s_) => T | _ => F )) then
+ (case s929_ s924_0 of
(SOME (s_)) =>
SOME (RISCV_SRAIW, ((string_length arg_)) - ((string_length s_)))
)
@@ -16789,36 +19196,38 @@ val _ = Define `
(*val bit_maybe_r_forwards : mword ty1 -> M string*)
+(*val bit_maybe_r_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_r_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_r_backwards_matches : string -> bool*)
+
+(*val bit_maybe_r_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_r_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "r"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "r"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_r_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_r_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "r"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "r"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_r_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_r_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_r_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_r_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16827,80 +19236,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_r_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s672_ : string -> maybe string*)
+(*val _s937_ : string -> maybe string*)
val _ = Define `
- ((s672_:string ->(string)option) s673_0=
- (let s674_0 = s673_0 in
- if ((string_startswith s674_0 "")) then
- (case ((string_drop s674_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s937_:string ->(string)option) s938_0=
+ (let s939_0 = s938_0 in
+ if ((string_startswith s939_0 "")) then
+ (case ((string_drop s939_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s668_ : string -> maybe string*)
+(*val _s933_ : string -> maybe string*)
val _ = Define `
- ((s668_:string ->(string)option) s669_0=
- (let s670_0 = s669_0 in
- if ((string_startswith s670_0 "r")) then
- (case ((string_drop s670_0 ((string_length "r")))) of s_ => SOME s_ )
+ ((s933_:string ->(string)option) s934_0=
+ (let s935_0 = s934_0 in
+ if ((string_startswith s935_0 "r")) then
+ (case ((string_drop s935_0 ((string_length "r")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_r_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s671_0 = arg_ in
- if ((case ((s668_ s671_0)) of SOME (s_) => T | _ => F )) then
- (case s668_ s671_0 of
+ (let s936_0 = arg_ in
+ if ((case ((s933_ s936_0)) of SOME (s_) => T | _ => F )) then
+ (case s933_ s936_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s672_ s671_0)) of SOME (s_) => T | _ => F )) then
- (case s672_ s671_0 of
+ else if ((case ((s937_ s936_0)) of SOME (s_) => T | _ => F )) then
+ (case s937_ s936_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_w_forwards : mword ty1 -> M string*)
+(*val bit_maybe_w_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_w_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_w_backwards_matches : string -> bool*)
+
+(*val bit_maybe_w_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_w_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "w"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "w"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_w_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_w_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "w"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "w"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_w_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_w_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_w_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_w_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16909,80 +19314,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_w_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s680_ : string -> maybe string*)
+(*val _s945_ : string -> maybe string*)
val _ = Define `
- ((s680_:string ->(string)option) s681_0=
- (let s682_0 = s681_0 in
- if ((string_startswith s682_0 "")) then
- (case ((string_drop s682_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s945_:string ->(string)option) s946_0=
+ (let s947_0 = s946_0 in
+ if ((string_startswith s947_0 "")) then
+ (case ((string_drop s947_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s676_ : string -> maybe string*)
+(*val _s941_ : string -> maybe string*)
val _ = Define `
- ((s676_:string ->(string)option) s677_0=
- (let s678_0 = s677_0 in
- if ((string_startswith s678_0 "w")) then
- (case ((string_drop s678_0 ((string_length "w")))) of s_ => SOME s_ )
+ ((s941_:string ->(string)option) s942_0=
+ (let s943_0 = s942_0 in
+ if ((string_startswith s943_0 "w")) then
+ (case ((string_drop s943_0 ((string_length "w")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_w_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s679_0 = arg_ in
- if ((case ((s676_ s679_0)) of SOME (s_) => T | _ => F )) then
- (case s676_ s679_0 of
+ (let s944_0 = arg_ in
+ if ((case ((s941_ s944_0)) of SOME (s_) => T | _ => F )) then
+ (case s941_ s944_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s680_ s679_0)) of SOME (s_) => T | _ => F )) then
- (case s680_ s679_0 of
+ else if ((case ((s945_ s944_0)) of SOME (s_) => T | _ => F )) then
+ (case s945_ s944_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_i_forwards : mword ty1 -> M string*)
+(*val bit_maybe_i_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_i_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_i_backwards_matches : string -> bool*)
+
+(*val bit_maybe_i_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_i_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "i"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "i"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_i_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_i_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "i"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "i"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_i_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_i_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_i_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_i_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -16991,80 +19392,76 @@ val _ = Define `
else F))`;
-(*val bit_maybe_i_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s688_ : string -> maybe string*)
+(*val _s953_ : string -> maybe string*)
val _ = Define `
- ((s688_:string ->(string)option) s689_0=
- (let s690_0 = s689_0 in
- if ((string_startswith s690_0 "")) then
- (case ((string_drop s690_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s953_:string ->(string)option) s954_0=
+ (let s955_0 = s954_0 in
+ if ((string_startswith s955_0 "")) then
+ (case ((string_drop s955_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s684_ : string -> maybe string*)
+(*val _s949_ : string -> maybe string*)
val _ = Define `
- ((s684_:string ->(string)option) s685_0=
- (let s686_0 = s685_0 in
- if ((string_startswith s686_0 "i")) then
- (case ((string_drop s686_0 ((string_length "i")))) of s_ => SOME s_ )
+ ((s949_:string ->(string)option) s950_0=
+ (let s951_0 = s950_0 in
+ if ((string_startswith s951_0 "i")) then
+ (case ((string_drop s951_0 ((string_length "i")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_i_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s687_0 = arg_ in
- if ((case ((s684_ s687_0)) of SOME (s_) => T | _ => F )) then
- (case s684_ s687_0 of
+ (let s952_0 = arg_ in
+ if ((case ((s949_ s952_0)) of SOME (s_) => T | _ => F )) then
+ (case s949_ s952_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s688_ s687_0)) of SOME (s_) => T | _ => F )) then
- (case s688_ s687_0 of
+ else if ((case ((s953_ s952_0)) of SOME (s_) => T | _ => F )) then
+ (case s953_ s952_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val bit_maybe_o_forwards : mword ty1 -> M string*)
+(*val bit_maybe_o_backwards : string -> M (mword ty1)*)
+
+(*val bit_maybe_o_forwards_matches : mword ty1 -> bool*)
+
+(*val bit_maybe_o_backwards_matches : string -> bool*)
+
+(*val bit_maybe_o_matches_prefix : string -> maybe ((mword ty1 * ii))*)
+
val _ = Define `
((bit_maybe_o_forwards:(1)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then sail2_state_monad$returnS "o"
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then sail2_state_monad$returnS ""
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$returnS "o"
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$returnS ""
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_o_backwards : string -> M (mword ty1)*)
-
val _ = Define `
((bit_maybe_o_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((1)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
- if (((p0_ = "o"))) then sail2_state_monad$returnS (vec_of_bits [B1] : 1 words$word)
- else if (((p0_ = ""))) then sail2_state_monad$returnS (vec_of_bits [B0] : 1 words$word)
+ if (((p0_ = "o"))) then sail2_state_monad$returnS (0b1w : 1 words$word)
+ else if (((p0_ = ""))) then sail2_state_monad$returnS (0b0w : 1 words$word)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val bit_maybe_o_forwards_matches : mword ty1 -> bool*)
-
val _ = Define `
((bit_maybe_o_forwards_matches:(1)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B1] : 1 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0] : 1 words$word)))) then T
+ if (((b__0 = (0b1w : 1 words$word)))) then T
+ else if (((b__0 = (0b0w : 1 words$word)))) then T
else F))`;
-(*val bit_maybe_o_backwards_matches : string -> bool*)
-
val _ = Define `
((bit_maybe_o_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17073,50 +19470,52 @@ val _ = Define `
else F))`;
-(*val bit_maybe_o_matches_prefix : string -> maybe ((mword ty1 * ii))*)
-
-(*val _s696_ : string -> maybe string*)
+(*val _s961_ : string -> maybe string*)
val _ = Define `
- ((s696_:string ->(string)option) s697_0=
- (let s698_0 = s697_0 in
- if ((string_startswith s698_0 "")) then
- (case ((string_drop s698_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s961_:string ->(string)option) s962_0=
+ (let s963_0 = s962_0 in
+ if ((string_startswith s963_0 "")) then
+ (case ((string_drop s963_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s692_ : string -> maybe string*)
+(*val _s957_ : string -> maybe string*)
val _ = Define `
- ((s692_:string ->(string)option) s693_0=
- (let s694_0 = s693_0 in
- if ((string_startswith s694_0 "o")) then
- (case ((string_drop s694_0 ((string_length "o")))) of s_ => SOME s_ )
+ ((s957_:string ->(string)option) s958_0=
+ (let s959_0 = s958_0 in
+ if ((string_startswith s959_0 "o")) then
+ (case ((string_drop s959_0 ((string_length "o")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((bit_maybe_o_matches_prefix:string ->((1)words$word#int)option) arg_=
- (let s695_0 = arg_ in
- if ((case ((s692_ s695_0)) of SOME (s_) => T | _ => F )) then
- (case s692_ s695_0 of
+ (let s960_0 = arg_ in
+ if ((case ((s957_ s960_0)) of SOME (s_) => T | _ => F )) then
+ (case s957_ s960_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B1] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b1w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s696_ s695_0)) of SOME (s_) => T | _ => F )) then
- (case s696_ s695_0 of
+ else if ((case ((s961_ s960_0)) of SOME (s_) => T | _ => F )) then
+ (case s961_ s960_0 of
(SOME (s_)) =>
- SOME
- ((vec_of_bits [B0] : 1 words$word), ((string_length arg_)) -
- ((string_length s_)))
+ SOME ((0b0w : 1 words$word), ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
(*val fence_bits_forwards : mword ty4 -> M string*)
+(*val fence_bits_backwards : string -> M (mword ty4)*)
+
+(*val fence_bits_forwards_matches : mword ty4 -> bool*)
+
+(*val fence_bits_backwards_matches : string -> bool*)
+
+(*val fence_bits_matches_prefix : string -> maybe ((mword ty4 * ii))*)
+
val _ = Define `
((fence_bits_forwards:(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
@@ -17135,29 +19534,27 @@ val _ = Define `
)))`;
-(*val fence_bits_backwards : string -> M (mword ty4)*)
-
-(*val _s700_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
-
-val _ = Define `
- ((s700_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s701_0=
- ((case s701_0 of
- s702_0 =>
- (case ((bit_maybe_i_matches_prefix s702_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s703_0)) =>
- (case ((string_drop s702_0 s703_0)) of
- s704_0 =>
- (case ((bit_maybe_o_matches_prefix s704_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s705_0)) =>
- (case ((string_drop s704_0 s705_0)) of
- s706_0 =>
- (case ((bit_maybe_r_matches_prefix s706_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s707_0)) =>
- (case ((string_drop s706_0 s707_0)) of
- s708_0 =>
- (case ((bit_maybe_w_matches_prefix s708_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s709_0)) =>
- let p0_ = (string_drop s708_0 s709_0) in
+(*val _s965_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
+
+val _ = Define `
+ ((s965_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s966_0=
+ ((case s966_0 of
+ s967_0 =>
+ (case ((bit_maybe_i_matches_prefix s967_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s968_0)) =>
+ (case ((string_drop s967_0 s968_0)) of
+ s969_0 =>
+ (case ((bit_maybe_o_matches_prefix s969_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s970_0)) =>
+ (case ((string_drop s969_0 s970_0)) of
+ s971_0 =>
+ (case ((bit_maybe_r_matches_prefix s971_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s972_0)) =>
+ (case ((string_drop s971_0 s972_0)) of
+ s973_0 =>
+ (case ((bit_maybe_w_matches_prefix s973_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s974_0)) =>
+ let p0_ = (string_drop s973_0 s974_0) in
if (((p0_ = ""))) then SOME (i, o1, r, w) else NONE
| _ => NONE
)
@@ -17175,12 +19572,12 @@ val _ = Define `
val _ = Define `
((fence_bits_backwards:string ->(regstate)sail2_state_monad$sequential_state ->((((4)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let s710_0 = arg_ in
- if ((case ((s700_ s710_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
+ (let s975_0 = arg_ in
+ if ((case ((s965_ s975_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
SOME ((i, o1, r, w)) => T
| _ => F
)) then (case
- (s700_ s710_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
+ (s965_ s975_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
(SOME ((i, o1, r, w))) =>
sail2_state_monad$returnS
((concat_vec i
@@ -17190,36 +19587,32 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val fence_bits_forwards_matches : mword ty4 -> bool*)
-
val _ = Define `
((fence_bits_forwards_matches:(4)words$word -> bool) arg_=
((case arg_ of v__1 => T )))`;
-(*val fence_bits_backwards_matches : string -> bool*)
-
-(*val _s711_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
-
-val _ = Define `
- ((s711_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s712_0=
- ((case s712_0 of
- s713_0 =>
- (case ((bit_maybe_i_matches_prefix s713_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s714_0)) =>
- (case ((string_drop s713_0 s714_0)) of
- s715_0 =>
- (case ((bit_maybe_o_matches_prefix s715_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s716_0)) =>
- (case ((string_drop s715_0 s716_0)) of
- s717_0 =>
- (case ((bit_maybe_r_matches_prefix s717_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s718_0)) =>
- (case ((string_drop s717_0 s718_0)) of
- s719_0 =>
- (case ((bit_maybe_w_matches_prefix s719_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s720_0)) =>
- let p0_ = (string_drop s719_0 s720_0) in
+(*val _s976_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1))*)
+
+val _ = Define `
+ ((s976_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word)option) s977_0=
+ ((case s977_0 of
+ s978_0 =>
+ (case ((bit_maybe_i_matches_prefix s978_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s979_0)) =>
+ (case ((string_drop s978_0 s979_0)) of
+ s980_0 =>
+ (case ((bit_maybe_o_matches_prefix s980_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s981_0)) =>
+ (case ((string_drop s980_0 s981_0)) of
+ s982_0 =>
+ (case ((bit_maybe_r_matches_prefix s982_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s983_0)) =>
+ (case ((string_drop s982_0 s983_0)) of
+ s984_0 =>
+ (case ((bit_maybe_w_matches_prefix s984_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s985_0)) =>
+ let p0_ = (string_drop s984_0 s985_0) in
if (((p0_ = ""))) then SOME (i, o1, r, w) else NONE
| _ => NONE
)
@@ -17237,41 +19630,39 @@ val _ = Define `
val _ = Define `
((fence_bits_backwards_matches:string -> bool) arg_=
- (let s721_0 = arg_ in
- if ((case ((s711_ s721_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
+ (let s986_0 = arg_ in
+ if ((case ((s976_ s986_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word))option)) of
SOME ((i, o1, r, w)) => T
| _ => F
)) then (case
- (s711_ s721_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
+ (s976_ s986_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word)) option) of
(SOME ((i, o1, r, w))) =>
T
)
else F))`;
-(*val fence_bits_matches_prefix : string -> maybe ((mword ty4 * ii))*)
-
-(*val _s722_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1 * string))*)
-
-val _ = Define `
- ((s722_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word#string)option) s723_0=
- ((case s723_0 of
- s724_0 =>
- (case ((bit_maybe_i_matches_prefix s724_0 : (( 1 words$word # ii)) option)) of
- SOME ((i, s725_0)) =>
- (case ((string_drop s724_0 s725_0)) of
- s726_0 =>
- (case ((bit_maybe_o_matches_prefix s726_0 : (( 1 words$word # ii)) option)) of
- SOME ((o1, s727_0)) =>
- (case ((string_drop s726_0 s727_0)) of
- s728_0 =>
- (case ((bit_maybe_r_matches_prefix s728_0 : (( 1 words$word # ii)) option)) of
- SOME ((r, s729_0)) =>
- (case ((string_drop s728_0 s729_0)) of
- s730_0 =>
- (case ((bit_maybe_w_matches_prefix s730_0 : (( 1 words$word # ii)) option)) of
- SOME ((w, s731_0)) =>
- (case ((string_drop s730_0 s731_0)) of s_ => SOME (i, o1, r, w, s_) )
+(*val _s987_ : string -> maybe ((mword ty1 * mword ty1 * mword ty1 * mword ty1 * string))*)
+
+val _ = Define `
+ ((s987_:string ->((1)words$word#(1)words$word#(1)words$word#(1)words$word#string)option) s988_0=
+ ((case s988_0 of
+ s989_0 =>
+ (case ((bit_maybe_i_matches_prefix s989_0 : (( 1 words$word # ii)) option)) of
+ SOME ((i, s990_0)) =>
+ (case ((string_drop s989_0 s990_0)) of
+ s991_0 =>
+ (case ((bit_maybe_o_matches_prefix s991_0 : (( 1 words$word # ii)) option)) of
+ SOME ((o1, s992_0)) =>
+ (case ((string_drop s991_0 s992_0)) of
+ s993_0 =>
+ (case ((bit_maybe_r_matches_prefix s993_0 : (( 1 words$word # ii)) option)) of
+ SOME ((r, s994_0)) =>
+ (case ((string_drop s993_0 s994_0)) of
+ s995_0 =>
+ (case ((bit_maybe_w_matches_prefix s995_0 : (( 1 words$word # ii)) option)) of
+ SOME ((w, s996_0)) =>
+ (case ((string_drop s995_0 s996_0)) of s_ => SOME (i, o1, r, w, s_) )
| _ => NONE
)
)
@@ -17288,12 +19679,12 @@ val _ = Define `
val _ = Define `
((fence_bits_matches_prefix:string ->((4)words$word#int)option) arg_=
- (let s732_0 = arg_ in
- if ((case ((s722_ s732_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string))option)) of
+ (let s997_0 = arg_ in
+ if ((case ((s987_ s997_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string))option)) of
SOME ((i, o1, r, w, s_)) => T
| _ => F
)) then (case
- (s722_ s732_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string)) option) of
+ (s987_ s997_0 : (( 1 words$word # 1 words$word # 1 words$word # 1 words$word # string)) option) of
(SOME ((i, o1, r, w, s_))) =>
SOME
((concat_vec i
@@ -17322,6 +19713,13 @@ val _ = Define `
((case width of BYTE => ".b" | HALF => ".h" | WORD => ".w" | DOUBLE => ".d" )))`;
+(*val amo_width_valid : word_width -> bool*)
+
+val _ = Define `
+ ((amo_width_valid:word_width -> bool) size1=
+ ((case size1 of WORD => T | DOUBLE => (( 64 : int):ii) >= (( 64 : int):ii) | _ => F )))`;
+
+
(*val process_loadres : forall 'int8_times_n. Size 'int8_times_n => mword ty5 -> mword ty64 -> MemoryOpResult (mword 'int8_times_n) -> bool -> M Retired*)
val _ = Define `
@@ -17329,57 +19727,49 @@ val _ = Define `
((case ((extend_value is_unsigned value : ( 64 words$word) MemoryOpResult)) of
MemValue (result) =>
let (_ : unit) = (load_reservation addr) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))`;
(*val encdec_amoop_forwards : amoop -> mword ty5*)
+(*val encdec_amoop_backwards : mword ty5 -> M amoop*)
+
+(*val encdec_amoop_forwards_matches : amoop -> bool*)
+
+(*val encdec_amoop_backwards_matches : mword ty5 -> bool*)
+
val _ = Define `
((encdec_amoop_forwards:amoop ->(5)words$word) arg_=
((case arg_ of
- AMOSWAP => (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word)
- | AMOADD => (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- | AMOXOR => (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)
- | AMOAND => (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)
- | AMOOR => (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)
- | AMOMIN => (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)
- | AMOMAX => (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)
- | AMOMINU => (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)
- | AMOMAXU => (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)
+ AMOSWAP => (0b00001w : 5 words$word)
+ | AMOADD => (0b00000w : 5 words$word)
+ | AMOXOR => (0b00100w : 5 words$word)
+ | AMOAND => (0b01100w : 5 words$word)
+ | AMOOR => (0b01000w : 5 words$word)
+ | AMOMIN => (0b10000w : 5 words$word)
+ | AMOMAX => (0b10100w : 5 words$word)
+ | AMOMINU => (0b11000w : 5 words$word)
+ | AMOMAXU => (0b11100w : 5 words$word)
)))`;
-(*val encdec_amoop_backwards : mword ty5 -> M amoop*)
-
val _ = Define `
((encdec_amoop_backwards:(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((amoop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word))))))
- then
- sail2_state_monad$returnS AMOSWAP
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOADD
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOXOR
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOAND
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOOR
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMIN
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMAX
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMINU
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- sail2_state_monad$returnS AMOMAXU
+ if (((b__0 = (0b00001w : 5 words$word)))) then sail2_state_monad$returnS AMOSWAP
+ else if (((b__0 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS AMOADD
+ else if (((b__0 = (0b00100w : 5 words$word)))) then sail2_state_monad$returnS AMOXOR
+ else if (((b__0 = (0b01100w : 5 words$word)))) then sail2_state_monad$returnS AMOAND
+ else if (((b__0 = (0b01000w : 5 words$word)))) then sail2_state_monad$returnS AMOOR
+ else if (((b__0 = (0b10000w : 5 words$word)))) then sail2_state_monad$returnS AMOMIN
+ else if (((b__0 = (0b10100w : 5 words$word)))) then sail2_state_monad$returnS AMOMAX
+ else if (((b__0 = (0b11000w : 5 words$word)))) then sail2_state_monad$returnS AMOMINU
+ else if (((b__0 = (0b11100w : 5 words$word)))) then sail2_state_monad$returnS AMOMAXU
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_amoop_forwards_matches : amoop -> bool*)
-
val _ = Define `
((encdec_amoop_forwards_matches:amoop -> bool) arg_=
((case arg_ of
@@ -17395,35 +19785,31 @@ val _ = Define `
)))`;
-(*val encdec_amoop_backwards_matches : mword ty5 -> bool*)
-
val _ = Define `
((encdec_amoop_backwards_matches:(5)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B1] : 5 words$word))))))
- then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B0;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B0;B1;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B0;B0;B0] : 5 words$word)))))) then
- T
- else if (((((regidx_to_regno b__0)) = ((regidx_to_regno (vec_of_bits [B1;B1;B1;B0;B0] : 5 words$word)))))) then
- T
+ if (((b__0 = (0b00001w : 5 words$word)))) then T
+ else if (((b__0 = (0b00000w : 5 words$word)))) then T
+ else if (((b__0 = (0b00100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01100w : 5 words$word)))) then T
+ else if (((b__0 = (0b01000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10000w : 5 words$word)))) then T
+ else if (((b__0 = (0b10100w : 5 words$word)))) then T
+ else if (((b__0 = (0b11000w : 5 words$word)))) then T
+ else if (((b__0 = (0b11100w : 5 words$word)))) then T
else F))`;
(*val amo_mnemonic_forwards : amoop -> string*)
+(*val amo_mnemonic_backwards : string -> M amoop*)
+
+(*val amo_mnemonic_forwards_matches : amoop -> bool*)
+
+(*val amo_mnemonic_backwards_matches : string -> bool*)
+
+(*val amo_mnemonic_matches_prefix : string -> maybe ((amoop * ii))*)
+
val _ = Define `
((amo_mnemonic_forwards:amoop -> string) arg_=
((case arg_ of
@@ -17439,8 +19825,6 @@ val _ = Define `
)))`;
-(*val amo_mnemonic_backwards : string -> M amoop*)
-
val _ = Define `
((amo_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((amoop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17456,8 +19840,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val amo_mnemonic_forwards_matches : amoop -> bool*)
-
val _ = Define `
((amo_mnemonic_forwards_matches:amoop -> bool) arg_=
((case arg_ of
@@ -17473,8 +19855,6 @@ val _ = Define `
)))`;
-(*val amo_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((amo_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17490,99 +19870,107 @@ val _ = Define `
else F))`;
-(*val amo_mnemonic_matches_prefix : string -> maybe ((amoop * ii))*)
-
-(*val _s765_ : string -> maybe string*)
+(*val _s1030_ : string -> maybe string*)
val _ = Define `
- ((s765_:string ->(string)option) s766_0=
- (let s767_0 = s766_0 in
- if ((string_startswith s767_0 "amomaxu")) then
- (case ((string_drop s767_0 ((string_length "amomaxu")))) of
+ ((s1030_:string ->(string)option) s1031_0=
+ (let s1032_0 = s1031_0 in
+ if ((string_startswith s1032_0 "amomaxu")) then
+ (case ((string_drop s1032_0 ((string_length "amomaxu")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s761_ : string -> maybe string*)
+(*val _s1026_ : string -> maybe string*)
val _ = Define `
- ((s761_:string ->(string)option) s762_0=
- (let s763_0 = s762_0 in
- if ((string_startswith s763_0 "amominu")) then
- (case ((string_drop s763_0 ((string_length "amominu")))) of
+ ((s1026_:string ->(string)option) s1027_0=
+ (let s1028_0 = s1027_0 in
+ if ((string_startswith s1028_0 "amominu")) then
+ (case ((string_drop s1028_0 ((string_length "amominu")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s757_ : string -> maybe string*)
+(*val _s1022_ : string -> maybe string*)
val _ = Define `
- ((s757_:string ->(string)option) s758_0=
- (let s759_0 = s758_0 in
- if ((string_startswith s759_0 "amomax")) then
- (case ((string_drop s759_0 ((string_length "amomax")))) of s_ => SOME s_ )
+ ((s1022_:string ->(string)option) s1023_0=
+ (let s1024_0 = s1023_0 in
+ if ((string_startswith s1024_0 "amomax")) then
+ (case ((string_drop s1024_0 ((string_length "amomax")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s753_ : string -> maybe string*)
+(*val _s1018_ : string -> maybe string*)
val _ = Define `
- ((s753_:string ->(string)option) s754_0=
- (let s755_0 = s754_0 in
- if ((string_startswith s755_0 "amomin")) then
- (case ((string_drop s755_0 ((string_length "amomin")))) of s_ => SOME s_ )
+ ((s1018_:string ->(string)option) s1019_0=
+ (let s1020_0 = s1019_0 in
+ if ((string_startswith s1020_0 "amomin")) then
+ (case ((string_drop s1020_0 ((string_length "amomin")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s749_ : string -> maybe string*)
+(*val _s1014_ : string -> maybe string*)
val _ = Define `
- ((s749_:string ->(string)option) s750_0=
- (let s751_0 = s750_0 in
- if ((string_startswith s751_0 "amoor")) then
- (case ((string_drop s751_0 ((string_length "amoor")))) of s_ => SOME s_ )
+ ((s1014_:string ->(string)option) s1015_0=
+ (let s1016_0 = s1015_0 in
+ if ((string_startswith s1016_0 "amoor")) then
+ (case ((string_drop s1016_0 ((string_length "amoor")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s745_ : string -> maybe string*)
+(*val _s1010_ : string -> maybe string*)
val _ = Define `
- ((s745_:string ->(string)option) s746_0=
- (let s747_0 = s746_0 in
- if ((string_startswith s747_0 "amoand")) then
- (case ((string_drop s747_0 ((string_length "amoand")))) of s_ => SOME s_ )
+ ((s1010_:string ->(string)option) s1011_0=
+ (let s1012_0 = s1011_0 in
+ if ((string_startswith s1012_0 "amoand")) then
+ (case ((string_drop s1012_0 ((string_length "amoand")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s741_ : string -> maybe string*)
+(*val _s1006_ : string -> maybe string*)
val _ = Define `
- ((s741_:string ->(string)option) s742_0=
- (let s743_0 = s742_0 in
- if ((string_startswith s743_0 "amoxor")) then
- (case ((string_drop s743_0 ((string_length "amoxor")))) of s_ => SOME s_ )
+ ((s1006_:string ->(string)option) s1007_0=
+ (let s1008_0 = s1007_0 in
+ if ((string_startswith s1008_0 "amoxor")) then
+ (case ((string_drop s1008_0 ((string_length "amoxor")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s737_ : string -> maybe string*)
+(*val _s1002_ : string -> maybe string*)
val _ = Define `
- ((s737_:string ->(string)option) s738_0=
- (let s739_0 = s738_0 in
- if ((string_startswith s739_0 "amoadd")) then
- (case ((string_drop s739_0 ((string_length "amoadd")))) of s_ => SOME s_ )
+ ((s1002_:string ->(string)option) s1003_0=
+ (let s1004_0 = s1003_0 in
+ if ((string_startswith s1004_0 "amoadd")) then
+ (case ((string_drop s1004_0 ((string_length "amoadd")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s733_ : string -> maybe string*)
+(*val _s998_ : string -> maybe string*)
val _ = Define `
- ((s733_:string ->(string)option) s734_0=
- (let s735_0 = s734_0 in
- if ((string_startswith s735_0 "amoswap")) then
- (case ((string_drop s735_0 ((string_length "amoswap")))) of
+ ((s998_:string ->(string)option) s999_0=
+ (let s1000_0 = s999_0 in
+ if ((string_startswith s1000_0 "amoswap")) then
+ (case ((string_drop s1000_0 ((string_length "amoswap")))) of
s_ => SOME s_
)
else NONE))`;
@@ -17590,49 +19978,49 @@ val _ = Define `
val _ = Define `
((amo_mnemonic_matches_prefix:string ->(amoop#int)option) arg_=
- (let s736_0 = arg_ in
- if ((case ((s733_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s733_ s736_0 of
+ (let s1001_0 = arg_ in
+ if ((case ((s998_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s998_ s1001_0 of
(SOME (s_)) =>
SOME (AMOSWAP, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s737_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s737_ s736_0 of
+ else if ((case ((s1002_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1002_ s1001_0 of
(SOME (s_)) =>
SOME (AMOADD, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s741_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s741_ s736_0 of
+ else if ((case ((s1006_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1006_ s1001_0 of
(SOME (s_)) =>
SOME (AMOXOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s745_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s745_ s736_0 of
+ else if ((case ((s1010_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1010_ s1001_0 of
(SOME (s_)) =>
SOME (AMOAND, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s749_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s749_ s736_0 of
+ else if ((case ((s1014_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1014_ s1001_0 of
(SOME (s_)) =>
SOME (AMOOR, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s753_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s753_ s736_0 of
+ else if ((case ((s1018_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1018_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMIN, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s757_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s757_ s736_0 of
+ else if ((case ((s1022_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1022_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMAX, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s761_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s761_ s736_0 of
+ else if ((case ((s1026_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1026_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMINU, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s765_ s736_0)) of SOME (s_) => T | _ => F )) then
- (case s765_ s736_0 of
+ else if ((case ((s1030_ s1001_0)) of SOME (s_) => T | _ => F )) then
+ (case s1030_ s1001_0 of
(SOME (s_)) =>
SOME (AMOMAXU, ((string_length arg_)) - ((string_length s_)))
)
@@ -17641,30 +20029,32 @@ val _ = Define `
(*val encdec_mul_op_forwards : (bool * bool * bool) -> mword ty3*)
+(*val encdec_mul_op_backwards : mword ty3 -> M (bool * bool * bool)*)
+
+(*val encdec_mul_op_forwards_matches : (bool * bool * bool) -> bool*)
+
+(*val encdec_mul_op_backwards_matches : mword ty3 -> bool*)
+
val _ = Define `
((encdec_mul_op_forwards:bool#bool#bool ->(3)words$word) arg_=
((case arg_ of
- (F, T, T) => (vec_of_bits [B0;B0;B0] : 3 words$word)
- | (T, T, T) => (vec_of_bits [B0;B0;B1] : 3 words$word)
- | (T, T, F) => (vec_of_bits [B0;B1;B0] : 3 words$word)
- | (T, F, F) => (vec_of_bits [B0;B1;B1] : 3 words$word)
+ (F, T, T) => (0b000w : 3 words$word)
+ | (T, T, T) => (0b001w : 3 words$word)
+ | (T, T, F) => (0b010w : 3 words$word)
+ | (T, F, F) => (0b011w : 3 words$word)
)))`;
-(*val encdec_mul_op_backwards : mword ty3 -> M (bool * bool * bool)*)
-
val _ = Define `
((encdec_mul_op_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool#bool#bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then sail2_state_monad$returnS (F, T, T)
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then sail2_state_monad$returnS (T, T, T)
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then sail2_state_monad$returnS (T, T, F)
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then sail2_state_monad$returnS (T, F, F)
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS (F, T, T)
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS (T, T, T)
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS (T, T, F)
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS (T, F, F)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_mul_op_forwards_matches : (bool * bool * bool) -> bool*)
-
val _ = Define `
((encdec_mul_op_forwards_matches:bool#bool#bool -> bool) arg_=
((case arg_ of
@@ -17676,20 +20066,26 @@ val _ = Define `
)))`;
-(*val encdec_mul_op_backwards_matches : mword ty3 -> bool*)
-
val _ = Define `
((encdec_mul_op_backwards_matches:(3)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B0;B1] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B0] : 3 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B0;B1;B1] : 3 words$word)))) then T
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
else F))`;
(*val mul_mnemonic_forwards : (bool * bool * bool) -> string*)
+(*val mul_mnemonic_backwards : string -> M (bool * bool * bool)*)
+
+(*val mul_mnemonic_forwards_matches : (bool * bool * bool) -> bool*)
+
+(*val mul_mnemonic_backwards_matches : string -> bool*)
+
+(*val mul_mnemonic_matches_prefix : string -> maybe (((bool * bool * bool) * ii))*)
+
val _ = Define `
((mul_mnemonic_forwards:bool#bool#bool -> string) arg_=
((case arg_ of
@@ -17700,8 +20096,6 @@ val _ = Define `
)))`;
-(*val mul_mnemonic_backwards : string -> M (bool * bool * bool)*)
-
val _ = Define `
((mul_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool#bool#bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17712,8 +20106,6 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val mul_mnemonic_forwards_matches : (bool * bool * bool) -> bool*)
-
val _ = Define `
((mul_mnemonic_forwards_matches:bool#bool#bool -> bool) arg_=
((case arg_ of
@@ -17725,8 +20117,6 @@ val _ = Define `
)))`;
-(*val mul_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((mul_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17737,68 +20127,68 @@ val _ = Define `
else F))`;
-(*val mul_mnemonic_matches_prefix : string -> maybe (((bool * bool * bool) * ii))*)
-
-(*val _s781_ : string -> maybe string*)
+(*val _s1046_ : string -> maybe string*)
val _ = Define `
- ((s781_:string ->(string)option) s782_0=
- (let s783_0 = s782_0 in
- if ((string_startswith s783_0 "mulhu")) then
- (case ((string_drop s783_0 ((string_length "mulhu")))) of s_ => SOME s_ )
+ ((s1046_:string ->(string)option) s1047_0=
+ (let s1048_0 = s1047_0 in
+ if ((string_startswith s1048_0 "mulhu")) then
+ (case ((string_drop s1048_0 ((string_length "mulhu")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s777_ : string -> maybe string*)
+(*val _s1042_ : string -> maybe string*)
val _ = Define `
- ((s777_:string ->(string)option) s778_0=
- (let s779_0 = s778_0 in
- if ((string_startswith s779_0 "mulhsu")) then
- (case ((string_drop s779_0 ((string_length "mulhsu")))) of s_ => SOME s_ )
+ ((s1042_:string ->(string)option) s1043_0=
+ (let s1044_0 = s1043_0 in
+ if ((string_startswith s1044_0 "mulhsu")) then
+ (case ((string_drop s1044_0 ((string_length "mulhsu")))) of
+ s_ => SOME s_
+ )
else NONE))`;
-(*val _s773_ : string -> maybe string*)
+(*val _s1038_ : string -> maybe string*)
val _ = Define `
- ((s773_:string ->(string)option) s774_0=
- (let s775_0 = s774_0 in
- if ((string_startswith s775_0 "mulh")) then
- (case ((string_drop s775_0 ((string_length "mulh")))) of s_ => SOME s_ )
+ ((s1038_:string ->(string)option) s1039_0=
+ (let s1040_0 = s1039_0 in
+ if ((string_startswith s1040_0 "mulh")) then
+ (case ((string_drop s1040_0 ((string_length "mulh")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s769_ : string -> maybe string*)
+(*val _s1034_ : string -> maybe string*)
val _ = Define `
- ((s769_:string ->(string)option) s770_0=
- (let s771_0 = s770_0 in
- if ((string_startswith s771_0 "mul")) then
- (case ((string_drop s771_0 ((string_length "mul")))) of s_ => SOME s_ )
+ ((s1034_:string ->(string)option) s1035_0=
+ (let s1036_0 = s1035_0 in
+ if ((string_startswith s1036_0 "mul")) then
+ (case ((string_drop s1036_0 ((string_length "mul")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((mul_mnemonic_matches_prefix:string ->((bool#bool#bool)#int)option) arg_=
- (let s772_0 = arg_ in
- if ((case ((s769_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s769_ s772_0 of
+ (let s1037_0 = arg_ in
+ if ((case ((s1034_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1034_ s1037_0 of
(SOME (s_)) =>
SOME ((F, T, T), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s773_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s773_ s772_0 of
+ else if ((case ((s1038_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1038_ s1037_0 of
(SOME (s_)) =>
SOME ((T, T, T), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s777_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s777_ s772_0 of
+ else if ((case ((s1042_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1042_ s1037_0 of
(SOME (s_)) =>
SOME ((T, T, F), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s781_ s772_0)) of SOME (s_) => T | _ => F )) then
- (case s781_ s772_0 of
+ else if ((case ((s1046_ s1037_0)) of SOME (s_) => T | _ => F )) then
+ (case s1046_ s1037_0 of
(SOME (s_)) =>
SOME ((T, F, F), ((string_length arg_)) - ((string_length s_)))
)
@@ -17807,12 +20197,18 @@ val _ = Define `
(*val maybe_not_u_forwards : bool -> string*)
+(*val maybe_not_u_backwards : string -> M bool*)
+
+(*val maybe_not_u_forwards_matches : bool -> bool*)
+
+(*val maybe_not_u_backwards_matches : string -> bool*)
+
+(*val maybe_not_u_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_not_u_forwards:bool -> string) arg_= ((case arg_ of F => "u" | T => "" )))`;
-(*val maybe_not_u_backwards : string -> M bool*)
-
val _ = Define `
((maybe_not_u_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -17821,15 +20217,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_not_u_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_not_u_forwards_matches:bool -> bool) arg_=
((case arg_ of F => T | T => T )))`;
-(*val maybe_not_u_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_not_u_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -17838,38 +20230,36 @@ val _ = Define `
else F))`;
-(*val maybe_not_u_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s789_ : string -> maybe string*)
+(*val _s1054_ : string -> maybe string*)
val _ = Define `
- ((s789_:string ->(string)option) s790_0=
- (let s791_0 = s790_0 in
- if ((string_startswith s791_0 "")) then
- (case ((string_drop s791_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s1054_:string ->(string)option) s1055_0=
+ (let s1056_0 = s1055_0 in
+ if ((string_startswith s1056_0 "")) then
+ (case ((string_drop s1056_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s785_ : string -> maybe string*)
+(*val _s1050_ : string -> maybe string*)
val _ = Define `
- ((s785_:string ->(string)option) s786_0=
- (let s787_0 = s786_0 in
- if ((string_startswith s787_0 "u")) then
- (case ((string_drop s787_0 ((string_length "u")))) of s_ => SOME s_ )
+ ((s1050_:string ->(string)option) s1051_0=
+ (let s1052_0 = s1051_0 in
+ if ((string_startswith s1052_0 "u")) then
+ (case ((string_drop s1052_0 ((string_length "u")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_not_u_matches_prefix:string ->(bool#int)option) arg_=
- (let s788_0 = arg_ in
- if ((case ((s785_ s788_0)) of SOME (s_) => T | _ => F )) then
- (case s785_ s788_0 of
+ (let s1053_0 = arg_ in
+ if ((case ((s1050_ s1053_0)) of SOME (s_) => T | _ => F )) then
+ (case s1050_ s1053_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s789_ s788_0)) of SOME (s_) => T | _ => F )) then
- (case s789_ s788_0 of
+ else if ((case ((s1054_ s1053_0)) of SOME (s_) => T | _ => F )) then
+ (case s1054_ s1053_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
@@ -17878,41 +20268,41 @@ val _ = Define `
(*val encdec_csrop_forwards : csrop -> mword ty2*)
+(*val encdec_csrop_backwards : mword ty2 -> M csrop*)
+
+(*val encdec_csrop_forwards_matches : csrop -> bool*)
+
+(*val encdec_csrop_backwards_matches : mword ty2 -> bool*)
+
val _ = Define `
((encdec_csrop_forwards:csrop ->(2)words$word) arg_=
((case arg_ of
- CSRRW => (vec_of_bits [B0;B1] : 2 words$word)
- | CSRRS => (vec_of_bits [B1;B0] : 2 words$word)
- | CSRRC => (vec_of_bits [B1;B1] : 2 words$word)
+ CSRRW => (0b01w : 2 words$word)
+ | CSRRS => (0b10w : 2 words$word)
+ | CSRRC => (0b11w : 2 words$word)
)))`;
-(*val encdec_csrop_backwards : mword ty2 -> M csrop*)
-
val _ = Define `
((encdec_csrop_backwards:(2)words$word ->(regstate)sail2_state_monad$sequential_state ->(((csrop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then sail2_state_monad$returnS CSRRW
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then sail2_state_monad$returnS CSRRS
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then sail2_state_monad$returnS CSRRC
+ if (((b__0 = (0b01w : 2 words$word)))) then sail2_state_monad$returnS CSRRW
+ else if (((b__0 = (0b10w : 2 words$word)))) then sail2_state_monad$returnS CSRRS
+ else if (((b__0 = (0b11w : 2 words$word)))) then sail2_state_monad$returnS CSRRC
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val encdec_csrop_forwards_matches : csrop -> bool*)
-
val _ = Define `
((encdec_csrop_forwards_matches:csrop -> bool) arg_=
((case arg_ of CSRRW => T | CSRRS => T | CSRRC => T )))`;
-(*val encdec_csrop_backwards_matches : mword ty2 -> bool*)
-
val _ = Define `
((encdec_csrop_backwards_matches:(2)words$word -> bool) arg_=
(let b__0 = arg_ in
- if (((b__0 = (vec_of_bits [B0;B1] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B0] : 2 words$word)))) then T
- else if (((b__0 = (vec_of_bits [B1;B1] : 2 words$word)))) then T
+ if (((b__0 = (0b01w : 2 words$word)))) then T
+ else if (((b__0 = (0b10w : 2 words$word)))) then T
+ else if (((b__0 = (0b11w : 2 words$word)))) then T
else F))`;
@@ -17921,145 +20311,120 @@ val _ = Define `
val _ = Define `
((readCSR:(12)words$word ->(regstate)sail2_state_monad$sequential_state ->((((64)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr= (sail2_state_monad$bindS
(case (csr, (( 64 : int):ii)) of
- (b__0, g__15) =>
- if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ (b__0, g__336) =>
+ if (((b__0 = (0xF11w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mvendorid_ref : ( 32 words$word) M) (\ (w__0 : 32 words$word) .
sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) w__0 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS marchid_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS mimpid_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B1;B1;B0;B0;B0;B1;B0;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS mhartid_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0xF12w : 12 words$word)))) then (sail2_state_monad$read_regS marchid_ref : ( 64 words$word) M)
+ else if (((b__0 = (0xF13w : 12 words$word)))) then (sail2_state_monad$read_regS mimpid_ref : ( 64 words$word) M)
+ else if (((b__0 = (0xF14w : 12 words$word)))) then (sail2_state_monad$read_regS mhartid_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
sail2_state_monad$returnS ((get_Mstatus_bits w__4 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__5 : Misa) . sail2_state_monad$returnS ((get_Misa_bits w__5 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x302w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__6 : Medeleg) .
sail2_state_monad$returnS ((get_Medeleg_bits w__6 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x303w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__7 : Minterrupts) .
sail2_state_monad$returnS ((get_Minterrupts_bits w__7 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__8 : Minterrupts) .
sail2_state_monad$returnS ((get_Minterrupts_bits w__8 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- (get_mtvec () : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x305w : 12 words$word)))) then (get_mtvec () : ( 64 words$word) M)
+ else if (((b__0 = (0x306w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__10 : Counteren) .
sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__10 : 32 words$word)) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS mscratch_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (get_xret_target Machine : ( 64 words$word) M) (\ (w__12 : 64 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 64 words$word) M) (\ (w__13 : 64 words$word) .
- sail2_state_monad$returnS ((and_vec w__12 w__13 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcause_ref) (\ (w__14 : Mcause) .
- sail2_state_monad$returnS ((get_Mcause_bits w__14 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS mtval_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__16 : Minterrupts) .
- sail2_state_monad$returnS ((get_Minterrupts_bits w__16 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (pmpReadCfgReg (( 0 : int):ii) : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then
- (pmpReadCfgReg (( 2 : int):ii) : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__35 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__35 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__36 : 64 words$word) .
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__11 : Counterin) .
+ sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((get_Counterin_bits w__11 : 32 words$word)) : 64 words$word)))
+ else if (((b__0 = (0x340w : 12 words$word)))) then (sail2_state_monad$read_regS mscratch_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$bindS
+ (get_xret_target Machine : ( 64 words$word) M) (\ (w__13 : 64 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 64 words$word) M) (\ (w__14 : 64 words$word) .
+ sail2_state_monad$returnS ((and_vec w__13 w__14 : 64 words$word))))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcause_ref) (\ (w__15 : Mcause) .
+ sail2_state_monad$returnS ((get_Mcause_bits w__15 : 64 words$word)))
+ else if (((b__0 = (0x343w : 12 words$word)))) then (sail2_state_monad$read_regS mtval_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__17 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Minterrupts_bits w__17 : 64 words$word)))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then (pmpReadCfgReg (( 0 : int):ii) : ( 64 words$word) M)
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then (pmpReadCfgReg (( 2 : int):ii) : ( 64 words$word) M)
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M)
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__36 : 64 words$word) .
sail2_state_monad$returnS ((subrange_vec_dec w__36 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS tselect_ref : ( 64 words$word) M) (\ (w__37 : 64 words$word) .
- sail2_state_monad$returnS ((not_vec w__37 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__38 : Mstatus) .
- sail2_state_monad$returnS ((get_Sstatus_bits ((lower_mstatus w__38)) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sedeleg_ref) (\ (w__39 : Sedeleg) .
- sail2_state_monad$returnS ((get_Sedeleg_bits w__39 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sideleg_ref) (\ (w__40 : Sinterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits w__40 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__41 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__42 : Minterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mie w__41 w__42)) : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then
- (get_stvec () : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scounteren_ref) (\ (w__44 : Counteren) .
- sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__44 : 32 words$word)) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS sscratch_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (get_xret_target Supervisor : ( 64 words$word) M) (\ (w__46 : 64 words$word) . sail2_state_monad$bindS
- (pc_alignment_mask () : ( 64 words$word) M) (\ (w__47 : 64 words$word) .
- sail2_state_monad$returnS ((and_vec w__46 w__47 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scause_ref) (\ (w__48 : Mcause) .
- sail2_state_monad$returnS ((get_Mcause_bits w__48 : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then
- (sail2_state_monad$read_regS stval_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__50 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__51 : Minterrupts) .
- sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mip w__50 w__51)) : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then
- (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M)
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__53 : 64 words$word) .
- sail2_state_monad$returnS ((subrange_vec_dec w__53 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__54 : 64 words$word) .
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__37 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__37 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS tselect_ref : ( 64 words$word) M) (\ (w__38 : 64 words$word) .
+ sail2_state_monad$returnS ((not_vec w__38 : 64 words$word)))
+ else if (((b__0 = (0x100w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__39 : Mstatus) .
+ sail2_state_monad$returnS ((get_Sstatus_bits ((lower_mstatus w__39)) : 64 words$word)))
+ else if (((b__0 = (0x102w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sedeleg_ref) (\ (w__40 : Sedeleg) .
+ sail2_state_monad$returnS ((get_Sedeleg_bits w__40 : 64 words$word)))
+ else if (((b__0 = (0x103w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sideleg_ref) (\ (w__41 : Sinterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits w__41 : 64 words$word)))
+ else if (((b__0 = (0x104w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__42 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__43 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mie w__42 w__43)) : 64 words$word))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then (get_stvec () : ( 64 words$word) M)
+ else if (((b__0 = (0x106w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scounteren_ref) (\ (w__45 : Counteren) .
+ sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__45 : 32 words$word)) : 64 words$word)))
+ else if (((b__0 = (0x140w : 12 words$word)))) then (sail2_state_monad$read_regS sscratch_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x141w : 12 words$word)))) then sail2_state_monad$bindS
+ (get_xret_target Supervisor : ( 64 words$word) M) (\ (w__47 : 64 words$word) . sail2_state_monad$bindS
+ (pc_alignment_mask () : ( 64 words$word) M) (\ (w__48 : 64 words$word) .
+ sail2_state_monad$returnS ((and_vec w__47 w__48 : 64 words$word))))
+ else if (((b__0 = (0x142w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scause_ref) (\ (w__49 : Mcause) .
+ sail2_state_monad$returnS ((get_Mcause_bits w__49 : 64 words$word)))
+ else if (((b__0 = (0x143w : 12 words$word)))) then (sail2_state_monad$read_regS stval_ref : ( 64 words$word) M)
+ else if (((b__0 = (0x144w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__51 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__52 : Minterrupts) .
+ sail2_state_monad$returnS ((get_Sinterrupts_bits ((lower_mip w__51 w__52)) : 64 words$word))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M)
+ else if (((b__0 = (0xC00w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__54 : 64 words$word) .
sail2_state_monad$returnS ((subrange_vec_dec w__54 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
- else if (((b__0 = (vec_of_bits [B1;B1;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__55 : 64 words$word) .
+ else if (((b__0 = (0xC01w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mtime_ref : ( 64 words$word) M) (\ (w__55 : 64 words$word) .
sail2_state_monad$returnS ((subrange_vec_dec w__55 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
+ else if (((b__0 = (0xC02w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__56 : 64 words$word) .
+ sail2_state_monad$returnS ((subrange_vec_dec w__56 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)))
else sail2_state_monad$bindS
- (ext_read_CSR csr : ( ( 64 words$word)option) M) (\ (w__56 : ( 64 words$word)option) .
- sail2_state_monad$returnS ((case w__56 of
+ (ext_read_CSR csr : ( ( 64 words$word)option) M) (\ (w__57 : ( 64 words$word)option) .
+ sail2_state_monad$returnS ((case w__57 of
SOME (res) => res
| NONE =>
let (_ : unit) = (print_bits0 "unhandled read to CSR " csr) in
- (EXTZ (( 64 : int):ii) (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 64 words$word)
+ (EXTZ (( 64 : int):ii) (0x0w : 4 words$word) : 64 words$word)
)))
) (\ (res : xlenbits) .
let (_ : unit) =
@@ -18076,260 +20441,306 @@ val _ = Define `
val _ = Define `
((writeCSR:(12)words$word ->(64)words$word ->(regstate)sail2_state_monad$sequential_state ->(((unit),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) (csr : csreg) (value : xlenbits)= (sail2_state_monad$bindS
(case (csr, (( 64 : int):ii)) of
- (b__0, g__14) =>
- if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ (b__0, g__335) =>
+ if (((b__0 = (0x300w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__0 : Mstatus) . sail2_state_monad$bindS
(legalize_mstatus w__0 value) (\ (w__1 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mstatus_ref w__1)
(sail2_state_monad$read_regS mstatus_ref)) (\ (w__2 : Mstatus) .
sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__2 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x301w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS misa_ref) (\ (w__3 : Misa) . sail2_state_monad$bindS
(legalize_misa w__3 value) (\ (w__4 : Misa) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS misa_ref w__4)
(sail2_state_monad$read_regS misa_ref)) (\ (w__5 : Misa) .
sail2_state_monad$returnS (SOME ((get_Misa_bits w__5 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x302w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS medeleg_ref) (\ (w__6 : Medeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS medeleg_ref ((legalize_medeleg w__6 value)))
(sail2_state_monad$read_regS medeleg_ref)) (\ (w__7 : Medeleg) .
sail2_state_monad$returnS (SOME ((get_Medeleg_bits w__7 : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x303w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mideleg_ref) (\ (w__8 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mideleg_ref ((legalize_mideleg w__8 value)))
(sail2_state_monad$read_regS mideleg_ref)) (\ (w__9 : Minterrupts) .
sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__9 : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x304w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mie_ref) (\ (w__10 : Minterrupts) . sail2_state_monad$bindS
(legalize_mie w__10 value) (\ (w__11 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mie_ref w__11)
(sail2_state_monad$read_regS mie_ref)) (\ (w__12 : Minterrupts) .
sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__12 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x305w : 12 words$word)))) then sail2_state_monad$bindS
(set_mtvec value : ( 64 words$word) M) (\ (w__13 : 64 words$word) . sail2_state_monad$returnS (SOME w__13))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
+ else if (((b__0 = (0x306w : 12 words$word)))) then sail2_state_monad$bindS
(sail2_state_monad$read_regS mcounteren_ref) (\ (w__14 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mcounteren_ref ((legalize_mcounteren w__14 value)))
(sail2_state_monad$read_regS mcounteren_ref)) (\ (w__15 : Counteren) .
sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__15 : 32 words$word)) : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if (((b__0 = (0x320w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcountinhibit_ref) (\ (w__16 : Counterin) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mcountinhibit_ref ((legalize_mcountinhibit w__16 value)))
+ (sail2_state_monad$read_regS mcountinhibit_ref)) (\ (w__17 : Counterin) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Counterin_bits w__17 : 32 words$word)) : 64 words$word)))))
+ else if (((b__0 = (0x340w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mscratch_ref value)
- (sail2_state_monad$read_regS mscratch_ref : ( 64 words$word) M)) (\ (w__16 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__16))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target Machine value : ( 64 words$word) M) (\ (w__17 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__17))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mscratch_ref : ( 64 words$word) M)) (\ (w__18 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__18))
+ else if (((b__0 = (0x341w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target Machine value : ( 64 words$word) M) (\ (w__19 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__19))
+ else if (((b__0 = (0x342w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mcause_bits mcause_ref value)
- (sail2_state_monad$read_regS mcause_ref)) (\ (w__18 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__18 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mcause_ref)) (\ (w__20 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__20 : 64 words$word))))
+ else if (((b__0 = (0x343w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS mtval_ref value)
- (sail2_state_monad$read_regS mtval_ref : ( 64 words$word) M)) (\ (w__19 : 64 words$word) . sail2_state_monad$returnS (SOME w__19))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__20 : Minterrupts) . sail2_state_monad$bindS
- (legalize_mip w__20 value) (\ (w__21 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__21)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__22 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__22 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 0 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$seqS
- (pmpWriteCfgReg (( 2 : int):ii) value) (sail2_state_monad$returnS (SOME value))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__23 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M) (\ (w__24 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr0_ref ((pmpWriteAddr w__23 w__24 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M)) (\ (w__25 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__25))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__26 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M) (\ (w__27 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr1_ref ((pmpWriteAddr w__26 w__27 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M)) (\ (w__28 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__28))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__29 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M) (\ (w__30 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr2_ref ((pmpWriteAddr w__29 w__30 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M)) (\ (w__31 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__31))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__32 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M) (\ (w__33 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr3_ref ((pmpWriteAddr w__32 w__33 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M)) (\ (w__34 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__34))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__35 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M) (\ (w__36 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr4_ref ((pmpWriteAddr w__35 w__36 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M)) (\ (w__37 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__37))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__38 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M) (\ (w__39 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr5_ref ((pmpWriteAddr w__38 w__39 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M)) (\ (w__40 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__40))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__41 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M) (\ (w__42 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr6_ref ((pmpWriteAddr w__41 w__42 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M)) (\ (w__43 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__43))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B0;B1;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__44 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M) (\ (w__45 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr7_ref ((pmpWriteAddr w__44 w__45 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M)) (\ (w__46 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__46))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__47 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M) (\ (w__48 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr8_ref ((pmpWriteAddr w__47 w__48 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M)) (\ (w__49 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__49))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__50 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M) (\ (w__51 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr9_ref ((pmpWriteAddr w__50 w__51 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M)) (\ (w__52 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__52))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__53 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M) (\ (w__54 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr10_ref ((pmpWriteAddr w__53 w__54 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M)) (\ (w__55 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__55))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__56 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M) (\ (w__57 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr11_ref ((pmpWriteAddr w__56 w__57 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M)) (\ (w__58 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__58))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__59 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M) (\ (w__60 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr12_ref ((pmpWriteAddr w__59 w__60 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M)) (\ (w__61 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__61))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__62 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M) (\ (w__63 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr13_ref ((pmpWriteAddr w__62 w__63 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M)) (\ (w__64 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__64))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__65 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M) (\ (w__66 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr14_ref ((pmpWriteAddr w__65 w__66 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M)) (\ (w__67 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__67))))
- else if (((b__0 = (vec_of_bits [B0;B0;B1;B1;B1;B0;B1;B1;B1;B1;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__68 : Pmpcfg_ent) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M) (\ (w__69 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS pmpaddr15_ref ((pmpWriteAddr w__68 w__69 value : 64 words$word)))
- (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M)) (\ (w__70 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__70))))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__71 : 64 words$word) . sail2_state_monad$seqS
+ (sail2_state_monad$read_regS mtval_ref : ( 64 words$word) M)) (\ (w__21 : 64 words$word) . sail2_state_monad$returnS (SOME w__21))
+ else if (((b__0 = (0x344w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__22 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_mip w__22 value) (\ (w__23 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__23)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__24 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__24 : 64 words$word))))))
+ else if (((b__0 = (0x3A0w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 0 : int):ii) value)
+ (pmpReadCfgReg (( 0 : int):ii) : ( 64 words$word) M)) (\ (w__25 : 64 words$word) . sail2_state_monad$returnS (SOME w__25))
+ else if (((b__0 = (0x3A2w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (pmpWriteCfgReg (( 2 : int):ii) value)
+ (pmpReadCfgReg (( 2 : int):ii) : ( 64 words$word) M)) (\ (w__26 : 64 words$word) . sail2_state_monad$returnS (SOME w__26))
+ else if (((b__0 = (0x3B0w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp0cfg_ref) (\ (w__27 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__28 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__28) (\ (w__29 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M) (\ (w__30 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr0_ref ((pmpWriteAddr ((pmpLocked w__27)) w__29 w__30 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr0_ref : ( 64 words$word) M)) (\ (w__31 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__31))))))
+ else if (((b__0 = (0x3B1w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp1cfg_ref) (\ (w__32 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__33 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__33) (\ (w__34 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M) (\ (w__35 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr1_ref ((pmpWriteAddr ((pmpLocked w__32)) w__34 w__35 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr1_ref : ( 64 words$word) M)) (\ (w__36 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__36))))))
+ else if (((b__0 = (0x3B2w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp2cfg_ref) (\ (w__37 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__38 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__38) (\ (w__39 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M) (\ (w__40 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr2_ref ((pmpWriteAddr ((pmpLocked w__37)) w__39 w__40 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr2_ref : ( 64 words$word) M)) (\ (w__41 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__41))))))
+ else if (((b__0 = (0x3B3w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp3cfg_ref) (\ (w__42 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__43 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__43) (\ (w__44 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M) (\ (w__45 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr3_ref ((pmpWriteAddr ((pmpLocked w__42)) w__44 w__45 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr3_ref : ( 64 words$word) M)) (\ (w__46 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__46))))))
+ else if (((b__0 = (0x3B4w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp4cfg_ref) (\ (w__47 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__48 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__48) (\ (w__49 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M) (\ (w__50 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr4_ref ((pmpWriteAddr ((pmpLocked w__47)) w__49 w__50 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr4_ref : ( 64 words$word) M)) (\ (w__51 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__51))))))
+ else if (((b__0 = (0x3B5w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp5cfg_ref) (\ (w__52 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__53 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__53) (\ (w__54 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M) (\ (w__55 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr5_ref ((pmpWriteAddr ((pmpLocked w__52)) w__54 w__55 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr5_ref : ( 64 words$word) M)) (\ (w__56 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__56))))))
+ else if (((b__0 = (0x3B6w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp6cfg_ref) (\ (w__57 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__58 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__58) (\ (w__59 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M) (\ (w__60 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr6_ref ((pmpWriteAddr ((pmpLocked w__57)) w__59 w__60 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr6_ref : ( 64 words$word) M)) (\ (w__61 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__61))))))
+ else if (((b__0 = (0x3B7w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp7cfg_ref) (\ (w__62 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__63 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__63) (\ (w__64 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M) (\ (w__65 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr7_ref ((pmpWriteAddr ((pmpLocked w__62)) w__64 w__65 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr7_ref : ( 64 words$word) M)) (\ (w__66 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__66))))))
+ else if (((b__0 = (0x3B8w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp8cfg_ref) (\ (w__67 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__68 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__68) (\ (w__69 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M) (\ (w__70 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr8_ref ((pmpWriteAddr ((pmpLocked w__67)) w__69 w__70 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr8_ref : ( 64 words$word) M)) (\ (w__71 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__71))))))
+ else if (((b__0 = (0x3B9w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp9cfg_ref) (\ (w__72 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__73 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__73) (\ (w__74 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M) (\ (w__75 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr9_ref ((pmpWriteAddr ((pmpLocked w__72)) w__74 w__75 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr9_ref : ( 64 words$word) M)) (\ (w__76 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__76))))))
+ else if (((b__0 = (0x3BAw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp10cfg_ref) (\ (w__77 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__78 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__78) (\ (w__79 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M) (\ (w__80 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr10_ref ((pmpWriteAddr ((pmpLocked w__77)) w__79 w__80 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr10_ref : ( 64 words$word) M)) (\ (w__81 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__81))))))
+ else if (((b__0 = (0x3BBw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp11cfg_ref) (\ (w__82 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__83 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__83) (\ (w__84 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M) (\ (w__85 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr11_ref ((pmpWriteAddr ((pmpLocked w__82)) w__84 w__85 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr11_ref : ( 64 words$word) M)) (\ (w__86 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__86))))))
+ else if (((b__0 = (0x3BCw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp12cfg_ref) (\ (w__87 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__88 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__88) (\ (w__89 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M) (\ (w__90 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr12_ref ((pmpWriteAddr ((pmpLocked w__87)) w__89 w__90 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr12_ref : ( 64 words$word) M)) (\ (w__91 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__91))))))
+ else if (((b__0 = (0x3BDw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp13cfg_ref) (\ (w__92 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__93 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__93) (\ (w__94 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M) (\ (w__95 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS pmpaddr13_ref ((pmpWriteAddr ((pmpLocked w__92)) w__94 w__95 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr13_ref : ( 64 words$word) M)) (\ (w__96 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__96))))))
+ else if (((b__0 = (0x3BEw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp14cfg_ref) (\ (w__97 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__98 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (pmpTORLocked w__98) (\ (w__99 : bool) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M) (\ (w__100 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ pmpaddr14_ref
+ ((pmpWriteAddr ((pmpLocked w__97)) w__99 w__100 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr14_ref : ( 64 words$word) M)) (\ (w__101 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__101))))))
+ else if (((b__0 = (0x3BFw : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmp15cfg_ref) (\ (w__102 : Pmpcfg_ent) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M) (\ (w__103 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS
+ pmpaddr15_ref
+ ((pmpWriteAddr ((pmpLocked w__102)) F w__103 value : 64 words$word)))
+ (sail2_state_monad$read_regS pmpaddr15_ref : ( 64 words$word) M)) (\ (w__104 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__104))))
+ else if (((b__0 = (0xB00w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mcycle_ref : ( 64 words$word) M) (\ (w__105 : 64 words$word) . sail2_state_monad$seqS
(sail2_state_monad$write_regS
mcycle_ref
- ((update_subrange_vec_dec w__71 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value : 64 words$word)))
+ ((update_subrange_vec_dec w__105 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value
+ : 64 words$word)))
(sail2_state_monad$returnS (SOME value)))
- else if (((b__0 = (vec_of_bits [B1;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__72 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
+ else if (((b__0 = (0xB02w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS minstret_ref : ( 64 words$word) M) (\ (w__106 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
(sail2_state_monad$write_regS
minstret_ref
- ((update_subrange_vec_dec w__72 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value : 64 words$word)))
+ ((update_subrange_vec_dec w__106 (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) value
+ : 64 words$word)))
(sail2_state_monad$write_regS minstret_written_ref T)) (sail2_state_monad$returnS (SOME value)))
- else if (((b__0 = (vec_of_bits [B0;B1;B1;B1;B1;B0;B1;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ else if (((b__0 = (0x7A0w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS tselect_ref value)
- (sail2_state_monad$read_regS tselect_ref : ( 64 words$word) M)) (\ (w__73 : 64 words$word) . sail2_state_monad$returnS (SOME w__73))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mstatus_ref) (\ (w__74 : Mstatus) . sail2_state_monad$bindS
- (legalize_sstatus w__74 value) (\ (w__75 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mstatus_ref w__75)
- (sail2_state_monad$read_regS mstatus_ref)) (\ (w__76 : Mstatus) .
- sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__76 : 64 words$word))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS sedeleg_ref) (\ (w__77 : Sedeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS sedeleg_ref ((legalize_sedeleg w__77 value)))
- (sail2_state_monad$read_regS sedeleg_ref)) (\ (w__78 : Sedeleg) .
- sail2_state_monad$returnS (SOME ((get_Sedeleg_bits w__78 : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS tselect_ref : ( 64 words$word) M)) (\ (w__107 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__107))
+ else if (((b__0 = (0x100w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mstatus_ref) (\ (w__108 : Mstatus) . sail2_state_monad$bindS
+ (legalize_sstatus w__108 value) (\ (w__109 : Mstatus) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mstatus_ref w__109)
+ (sail2_state_monad$read_regS mstatus_ref)) (\ (w__110 : Mstatus) .
+ sail2_state_monad$returnS (SOME ((get_Mstatus_bits w__110 : 64 words$word))))))
+ else if (((b__0 = (0x102w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS sedeleg_ref) (\ (w__111 : Sedeleg) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS sedeleg_ref ((legalize_sedeleg w__111 value)))
+ (sail2_state_monad$read_regS sedeleg_ref)) (\ (w__112 : Sedeleg) .
+ sail2_state_monad$returnS (SOME ((get_Sedeleg_bits w__112 : 64 words$word)))))
+ else if (((b__0 = (0x103w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Sinterrupts_bits sideleg_ref value)
- (sail2_state_monad$read_regS sideleg_ref)) (\ (w__79 : Sinterrupts) .
- sail2_state_monad$returnS (SOME ((get_Sinterrupts_bits w__79 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mie_ref) (\ (w__80 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__81 : Minterrupts) . sail2_state_monad$bindS
- (legalize_sie w__80 w__81 value) (\ (w__82 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mie_ref w__82)
- (sail2_state_monad$read_regS mie_ref)) (\ (w__83 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__83 : 64 words$word)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_stvec value : ( 64 words$word) M) (\ (w__84 : 64 words$word) . sail2_state_monad$returnS (SOME w__84))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS scounteren_ref) (\ (w__85 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS scounteren_ref ((legalize_scounteren w__85 value)))
- (sail2_state_monad$read_regS scounteren_ref)) (\ (w__86 : Counteren) .
- sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__86 : 32 words$word)) : 64 words$word)))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS sideleg_ref)) (\ (w__113 : Sinterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Sinterrupts_bits w__113 : 64 words$word))))
+ else if (((b__0 = (0x104w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mie_ref) (\ (w__114 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__115 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_sie w__114 w__115 value) (\ (w__116 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mie_ref w__116)
+ (sail2_state_monad$read_regS mie_ref)) (\ (w__117 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__117 : 64 words$word)))))))
+ else if (((b__0 = (0x105w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_stvec value : ( 64 words$word) M) (\ (w__118 : 64 words$word) . sail2_state_monad$returnS (SOME w__118))
+ else if (((b__0 = (0x106w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS scounteren_ref) (\ (w__119 : Counteren) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS scounteren_ref ((legalize_scounteren w__119 value)))
+ (sail2_state_monad$read_regS scounteren_ref)) (\ (w__120 : Counteren) .
+ sail2_state_monad$returnS (SOME ((EXTZ (( 64 : int):ii) ((get_Counteren_bits w__120 : 32 words$word)) : 64 words$word)))))
+ else if (((b__0 = (0x140w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS sscratch_ref value)
- (sail2_state_monad$read_regS sscratch_ref : ( 64 words$word) M)) (\ (w__87 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__87))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B1] : 12 words$word)))) then sail2_state_monad$bindS
- (set_xret_target Supervisor value : ( 64 words$word) M) (\ (w__88 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__88))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B0] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS sscratch_ref : ( 64 words$word) M)) (\ (w__121 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__121))
+ else if (((b__0 = (0x141w : 12 words$word)))) then sail2_state_monad$bindS
+ (set_xret_target Supervisor value : ( 64 words$word) M) (\ (w__122 : 64 words$word) .
+ sail2_state_monad$returnS (SOME w__122))
+ else if (((b__0 = (0x142w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(set_Mcause_bits scause_ref value)
- (sail2_state_monad$read_regS scause_ref)) (\ (w__89 : Mcause) .
- sail2_state_monad$returnS (SOME ((get_Mcause_bits w__89 : 64 words$word))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B1;B1] : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$read_regS scause_ref)) (\ (w__123 : Mcause) .
+ sail2_state_monad$returnS (SOME ((get_Mcause_bits w__123 : 64 words$word))))
+ else if (((b__0 = (0x143w : 12 words$word)))) then sail2_state_monad$bindS (sail2_state_monad$seqS
(sail2_state_monad$write_regS stval_ref value)
- (sail2_state_monad$read_regS stval_ref : ( 64 words$word) M)) (\ (w__90 : 64 words$word) . sail2_state_monad$returnS (SOME w__90))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B0;B1;B0;B0;B0;B1;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (sail2_state_monad$read_regS mip_ref) (\ (w__91 : Minterrupts) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS mideleg_ref) (\ (w__92 : Minterrupts) . sail2_state_monad$bindS
- (legalize_sip w__91 w__92 value) (\ (w__93 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS mip_ref w__93)
- (sail2_state_monad$read_regS mip_ref)) (\ (w__94 : Minterrupts) .
- sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__94 : 64 words$word)))))))
- else if (((b__0 = (vec_of_bits [B0;B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)))) then sail2_state_monad$bindS
- (cur_Architecture () ) (\ (w__95 : Architecture) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__96 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
- (sail2_state_monad$write_regS satp_ref ((legalize_satp w__95 w__96 value : 64 words$word)))
- (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M)) (\ (w__97 : 64 words$word) . sail2_state_monad$returnS (SOME w__97))))
- else sail2_state_monad$returnS NONE
+ (sail2_state_monad$read_regS stval_ref : ( 64 words$word) M)) (\ (w__124 : 64 words$word) . sail2_state_monad$returnS (SOME w__124))
+ else if (((b__0 = (0x144w : 12 words$word)))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mip_ref) (\ (w__125 : Minterrupts) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS mideleg_ref) (\ (w__126 : Minterrupts) . sail2_state_monad$bindS
+ (legalize_sip w__125 w__126 value) (\ (w__127 : Minterrupts) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS mip_ref w__127)
+ (sail2_state_monad$read_regS mip_ref)) (\ (w__128 : Minterrupts) .
+ sail2_state_monad$returnS (SOME ((get_Minterrupts_bits w__128 : 64 words$word)))))))
+ else if (((b__0 = (0x180w : 12 words$word)))) then sail2_state_monad$bindS
+ (cur_Architecture () ) (\ (w__129 : Architecture) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M) (\ (w__130 : 64 words$word) . sail2_state_monad$bindS (sail2_state_monad$seqS
+ (sail2_state_monad$write_regS satp_ref ((legalize_satp w__129 w__130 value : 64 words$word)))
+ (sail2_state_monad$read_regS satp_ref : ( 64 words$word) M)) (\ (w__131 : 64 words$word) . sail2_state_monad$returnS (SOME w__131))))
+ else (ext_write_CSR csr value : ( ( 64 words$word)option) M)
) (\ (res : xlenbits option) .
- (case res of
+ sail2_state_monad$returnS ((case res of
SOME (v) =>
- sail2_state_monad$returnS (if ((get_config_print_reg () )) then
- print_dbg
- ((STRCAT "CSR "
- ((STRCAT ((csr_name csr))
- ((STRCAT " <- "
- ((STRCAT ((string_of_bits v))
- ((STRCAT " (input: "
- ((STRCAT ((string_of_bits value)) ")"))))))))))))
- else () )
- | NONE => sail2_state_monad$bindS
- (ext_write_CSR csr value) (\ (w__143 : bool) .
- sail2_state_monad$returnS (if w__143 then ()
- else print_bits0 "unhandled write to CSR " csr))
- ))))`;
+ if ((get_config_print_reg () )) then
+ print_dbg
+ ((STRCAT "CSR "
+ ((STRCAT ((csr_name csr))
+ ((STRCAT " <- "
+ ((STRCAT ((string_of_bits v))
+ ((STRCAT " (input: " ((STRCAT ((string_of_bits value)) ")"))))))))))))
+ else ()
+ | NONE => print_bits0 "unhandled write to CSR " csr
+ )))))`;
(*val maybe_i_forwards : bool -> string*)
+(*val maybe_i_backwards : string -> M bool*)
+
+(*val maybe_i_forwards_matches : bool -> bool*)
+
+(*val maybe_i_backwards_matches : string -> bool*)
+
+(*val maybe_i_matches_prefix : string -> maybe ((bool * ii))*)
+
val _ = Define `
((maybe_i_forwards:bool -> string) arg_= ((case arg_ of T => "i" | F => "" )))`;
-(*val maybe_i_backwards : string -> M bool*)
-
val _ = Define `
((maybe_i_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -18338,15 +20749,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val maybe_i_forwards_matches : bool -> bool*)
-
val _ = Define `
((maybe_i_forwards_matches:bool -> bool) arg_=
((case arg_ of T => T | F => T )))`;
-(*val maybe_i_backwards_matches : string -> bool*)
-
val _ = Define `
((maybe_i_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -18355,38 +20762,36 @@ val _ = Define `
else F))`;
-(*val maybe_i_matches_prefix : string -> maybe ((bool * ii))*)
-
-(*val _s797_ : string -> maybe string*)
+(*val _s1062_ : string -> maybe string*)
val _ = Define `
- ((s797_:string ->(string)option) s798_0=
- (let s799_0 = s798_0 in
- if ((string_startswith s799_0 "")) then
- (case ((string_drop s799_0 ((string_length "")))) of s_ => SOME s_ )
+ ((s1062_:string ->(string)option) s1063_0=
+ (let s1064_0 = s1063_0 in
+ if ((string_startswith s1064_0 "")) then
+ (case ((string_drop s1064_0 ((string_length "")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s793_ : string -> maybe string*)
+(*val _s1058_ : string -> maybe string*)
val _ = Define `
- ((s793_:string ->(string)option) s794_0=
- (let s795_0 = s794_0 in
- if ((string_startswith s795_0 "i")) then
- (case ((string_drop s795_0 ((string_length "i")))) of s_ => SOME s_ )
+ ((s1058_:string ->(string)option) s1059_0=
+ (let s1060_0 = s1059_0 in
+ if ((string_startswith s1060_0 "i")) then
+ (case ((string_drop s1060_0 ((string_length "i")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((maybe_i_matches_prefix:string ->(bool#int)option) arg_=
- (let s796_0 = arg_ in
- if ((case ((s793_ s796_0)) of SOME (s_) => T | _ => F )) then
- (case s793_ s796_0 of
+ (let s1061_0 = arg_ in
+ if ((case ((s1058_ s1061_0)) of SOME (s_) => T | _ => F )) then
+ (case s1058_ s1061_0 of
(SOME (s_)) =>
SOME (T, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s797_ s796_0)) of SOME (s_) => T | _ => F )) then
- (case s797_ s796_0 of
+ else if ((case ((s1062_ s1061_0)) of SOME (s_) => T | _ => F )) then
+ (case s1062_ s1061_0 of
(SOME (s_)) =>
SOME (F, ((string_length arg_)) - ((string_length s_)))
)
@@ -18395,13 +20800,19 @@ val _ = Define `
(*val csr_mnemonic_forwards : csrop -> string*)
+(*val csr_mnemonic_backwards : string -> M csrop*)
+
+(*val csr_mnemonic_forwards_matches : csrop -> bool*)
+
+(*val csr_mnemonic_backwards_matches : string -> bool*)
+
+(*val csr_mnemonic_matches_prefix : string -> maybe ((csrop * ii))*)
+
val _ = Define `
((csr_mnemonic_forwards:csrop -> string) arg_=
((case arg_ of CSRRW => "csrrw" | CSRRS => "csrrs" | CSRRC => "csrrc" )))`;
-(*val csr_mnemonic_backwards : string -> M csrop*)
-
val _ = Define `
((csr_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((csrop),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
(let p0_ = arg_ in
@@ -18411,15 +20822,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val csr_mnemonic_forwards_matches : csrop -> bool*)
-
val _ = Define `
((csr_mnemonic_forwards_matches:csrop -> bool) arg_=
((case arg_ of CSRRW => T | CSRRS => T | CSRRC => T )))`;
-(*val csr_mnemonic_backwards_matches : string -> bool*)
-
val _ = Define `
((csr_mnemonic_backwards_matches:string -> bool) arg_=
(let p0_ = arg_ in
@@ -18429,60 +20836,2323 @@ val _ = Define `
else F))`;
-(*val csr_mnemonic_matches_prefix : string -> maybe ((csrop * ii))*)
-
-(*val _s809_ : string -> maybe string*)
+(*val _s1074_ : string -> maybe string*)
val _ = Define `
- ((s809_:string ->(string)option) s810_0=
- (let s811_0 = s810_0 in
- if ((string_startswith s811_0 "csrrc")) then
- (case ((string_drop s811_0 ((string_length "csrrc")))) of s_ => SOME s_ )
+ ((s1074_:string ->(string)option) s1075_0=
+ (let s1076_0 = s1075_0 in
+ if ((string_startswith s1076_0 "csrrc")) then
+ (case ((string_drop s1076_0 ((string_length "csrrc")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s805_ : string -> maybe string*)
+(*val _s1070_ : string -> maybe string*)
val _ = Define `
- ((s805_:string ->(string)option) s806_0=
- (let s807_0 = s806_0 in
- if ((string_startswith s807_0 "csrrs")) then
- (case ((string_drop s807_0 ((string_length "csrrs")))) of s_ => SOME s_ )
+ ((s1070_:string ->(string)option) s1071_0=
+ (let s1072_0 = s1071_0 in
+ if ((string_startswith s1072_0 "csrrs")) then
+ (case ((string_drop s1072_0 ((string_length "csrrs")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s801_ : string -> maybe string*)
+(*val _s1066_ : string -> maybe string*)
val _ = Define `
- ((s801_:string ->(string)option) s802_0=
- (let s803_0 = s802_0 in
- if ((string_startswith s803_0 "csrrw")) then
- (case ((string_drop s803_0 ((string_length "csrrw")))) of s_ => SOME s_ )
+ ((s1066_:string ->(string)option) s1067_0=
+ (let s1068_0 = s1067_0 in
+ if ((string_startswith s1068_0 "csrrw")) then
+ (case ((string_drop s1068_0 ((string_length "csrrw")))) of s_ => SOME s_ )
else NONE))`;
val _ = Define `
((csr_mnemonic_matches_prefix:string ->(csrop#int)option) arg_=
- (let s804_0 = arg_ in
- if ((case ((s801_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s801_ s804_0 of
+ (let s1069_0 = arg_ in
+ if ((case ((s1066_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1066_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRW, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s805_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s805_ s804_0 of
+ else if ((case ((s1070_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1070_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRS, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s809_ s804_0)) of SOME (s_) => T | _ => F )) then
- (case s809_ s804_0 of
+ else if ((case ((s1074_ s1069_0)) of SOME (s_) => T | _ => F )) then
+ (case s1074_ s1069_0 of
(SOME (s_)) =>
SOME (CSRRC, ((string_length arg_)) - ((string_length s_)))
)
else NONE))`;
-(*val encdec_forwards : ast -> M (mword ty32)*)
+(*val encdec_rounding_mode_forwards : rounding_mode -> mword ty3*)
+
+(*val encdec_rounding_mode_backwards : mword ty3 -> M rounding_mode*)
+
+(*val encdec_rounding_mode_forwards_matches : rounding_mode -> bool*)
+
+(*val encdec_rounding_mode_backwards_matches : mword ty3 -> bool*)
+
+val _ = Define `
+ ((encdec_rounding_mode_forwards:rounding_mode ->(3)words$word) arg_=
+ ((case arg_ of
+ RM_RNE => (0b000w : 3 words$word)
+ | RM_RTZ => (0b001w : 3 words$word)
+ | RM_RDN => (0b010w : 3 words$word)
+ | RM_RUP => (0b011w : 3 words$word)
+ | RM_RMM => (0b100w : 3 words$word)
+ | RM_DYN => (0b111w : 3 words$word)
+ )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_backwards:(3)words$word ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b000w : 3 words$word)))) then sail2_state_monad$returnS RM_RNE
+ else if (((b__0 = (0b001w : 3 words$word)))) then sail2_state_monad$returnS RM_RTZ
+ else if (((b__0 = (0b010w : 3 words$word)))) then sail2_state_monad$returnS RM_RDN
+ else if (((b__0 = (0b011w : 3 words$word)))) then sail2_state_monad$returnS RM_RUP
+ else if (((b__0 = (0b100w : 3 words$word)))) then sail2_state_monad$returnS RM_RMM
+ else if (((b__0 = (0b111w : 3 words$word)))) then sail2_state_monad$returnS RM_DYN
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_forwards_matches:rounding_mode -> bool) arg_=
+ ((case arg_ of
+ RM_RNE => T
+ | RM_RTZ => T
+ | RM_RDN => T
+ | RM_RUP => T
+ | RM_RMM => T
+ | RM_DYN => T
+ )))`;
+
+
+val _ = Define `
+ ((encdec_rounding_mode_backwards_matches:(3)words$word -> bool) arg_=
+ (let b__0 = arg_ in
+ if (((b__0 = (0b000w : 3 words$word)))) then T
+ else if (((b__0 = (0b001w : 3 words$word)))) then T
+ else if (((b__0 = (0b010w : 3 words$word)))) then T
+ else if (((b__0 = (0b011w : 3 words$word)))) then T
+ else if (((b__0 = (0b100w : 3 words$word)))) then T
+ else if (((b__0 = (0b111w : 3 words$word)))) then T
+ else F))`;
+
+
+(*val frm_mnemonic_forwards : rounding_mode -> string*)
+
+(*val frm_mnemonic_backwards : string -> M rounding_mode*)
+
+(*val frm_mnemonic_forwards_matches : rounding_mode -> bool*)
+
+(*val frm_mnemonic_backwards_matches : string -> bool*)
+
+(*val frm_mnemonic_matches_prefix : string -> maybe ((rounding_mode * ii))*)
+
+val _ = Define `
+ ((frm_mnemonic_forwards:rounding_mode -> string) arg_=
+ ((case arg_ of
+ RM_RNE => "rne"
+ | RM_RTZ => "rtz"
+ | RM_RDN => "rdn"
+ | RM_RUP => "rup"
+ | RM_RMM => "rmm"
+ | RM_DYN => "dyn"
+ )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "rne"))) then sail2_state_monad$returnS RM_RNE
+ else if (((p0_ = "rtz"))) then sail2_state_monad$returnS RM_RTZ
+ else if (((p0_ = "rdn"))) then sail2_state_monad$returnS RM_RDN
+ else if (((p0_ = "rup"))) then sail2_state_monad$returnS RM_RUP
+ else if (((p0_ = "rmm"))) then sail2_state_monad$returnS RM_RMM
+ else if (((p0_ = "dyn"))) then sail2_state_monad$returnS RM_DYN
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_forwards_matches:rounding_mode -> bool) arg_=
+ ((case arg_ of
+ RM_RNE => T
+ | RM_RTZ => T
+ | RM_RDN => T
+ | RM_RUP => T
+ | RM_RMM => T
+ | RM_DYN => T
+ )))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "rne"))) then T
+ else if (((p0_ = "rtz"))) then T
+ else if (((p0_ = "rdn"))) then T
+ else if (((p0_ = "rup"))) then T
+ else if (((p0_ = "rmm"))) then T
+ else if (((p0_ = "dyn"))) then T
+ else F))`;
+
+
+(*val _s1098_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1098_:string ->(string)option) s1099_0=
+ (let s1100_0 = s1099_0 in
+ if ((string_startswith s1100_0 "dyn")) then
+ (case ((string_drop s1100_0 ((string_length "dyn")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1094_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1094_:string ->(string)option) s1095_0=
+ (let s1096_0 = s1095_0 in
+ if ((string_startswith s1096_0 "rmm")) then
+ (case ((string_drop s1096_0 ((string_length "rmm")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1090_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1090_:string ->(string)option) s1091_0=
+ (let s1092_0 = s1091_0 in
+ if ((string_startswith s1092_0 "rup")) then
+ (case ((string_drop s1092_0 ((string_length "rup")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1086_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1086_:string ->(string)option) s1087_0=
+ (let s1088_0 = s1087_0 in
+ if ((string_startswith s1088_0 "rdn")) then
+ (case ((string_drop s1088_0 ((string_length "rdn")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1082_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1082_:string ->(string)option) s1083_0=
+ (let s1084_0 = s1083_0 in
+ if ((string_startswith s1084_0 "rtz")) then
+ (case ((string_drop s1084_0 ((string_length "rtz")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1078_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1078_:string ->(string)option) s1079_0=
+ (let s1080_0 = s1079_0 in
+ if ((string_startswith s1080_0 "rne")) then
+ (case ((string_drop s1080_0 ((string_length "rne")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((frm_mnemonic_matches_prefix:string ->(rounding_mode#int)option) arg_=
+ (let s1081_0 = arg_ in
+ if ((case ((s1078_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1078_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RNE, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1082_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1082_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RTZ, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1086_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1086_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RDN, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1090_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1090_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RUP, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1094_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1094_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_RMM, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1098_ s1081_0)) of SOME (s_) => T | _ => F )) then
+ (case s1098_ s1081_0 of
+ (SOME (s_)) =>
+ SOME (RM_DYN, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val select_instr_or_fcsr_rm : rounding_mode -> M rounding_mode*)
+
+val _ = Define `
+ ((select_instr_or_fcsr_rm:rounding_mode ->(regstate)sail2_state_monad$sequential_state ->(((rounding_mode),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) instr_rm=
+ (if (((instr_rm = RM_DYN))) then sail2_state_monad$bindS
+ (sail2_state_monad$read_regS fcsr_ref) (\ (w__0 : Fcsr) .
+ encdec_rounding_mode_backwards ((get_Fcsr_FRM w__0 : 3 words$word)))
+ else sail2_state_monad$returnS instr_rm))`;
+
+
+(*val nxFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((nxFlag:unit ->(5)words$word) () = ((0b00001w : 5 words$word)))`;
+
+
+(*val ufFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((ufFlag:unit ->(5)words$word) () = ((0b00010w : 5 words$word)))`;
+
+
+(*val ofFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((ofFlag:unit ->(5)words$word) () = ((0b00100w : 5 words$word)))`;
+
+
+(*val dzFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((dzFlag:unit ->(5)words$word) () = ((0b01000w : 5 words$word)))`;
+
+
+(*val nvFlag : unit -> mword ty5*)
+
+val _ = Define `
+ ((nvFlag:unit ->(5)words$word) () = ((0b10000w : 5 words$word)))`;
+
+
+(*val fsplit_S : mword ty32 -> (mword ty1 * mword ty8 * mword ty23)*)
+
+val _ = Define `
+ ((fsplit_S:(32)words$word ->(1)words$word#(8)words$word#(23)words$word) x32=
+ ((subrange_vec_dec x32 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word),
+ (subrange_vec_dec x32 (( 30 : int):ii) (( 23 : int):ii) : 8 words$word),
+ (subrange_vec_dec x32 (( 22 : int):ii) (( 0 : int):ii) : 23 words$word)))`;
+
+
+(*val fmake_S : mword ty1 -> mword ty8 -> mword ty23 -> mword ty32*)
+
+val _ = Define `
+ ((fmake_S:(1)words$word ->(8)words$word ->(23)words$word ->(32)words$word) sign exp mant= ((concat_vec sign ((concat_vec exp mant : 31 words$word)) : 32 words$word)))`;
+
+
+(*val canonical_NaN_S : unit -> mword ty32*)
+
+val _ = Define `
+ ((canonical_NaN_S:unit ->(32)words$word) () = ((0x7FC00000w : 32 words$word)))`;
+
+
+(*val f_is_neg_inf_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_inf_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_neg_norm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_norm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp <> ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((exp <> ((ones (( 8 : int):ii) : 8 words$word)))))))))))`;
+
+
+(*val f_is_neg_subnorm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_subnorm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_neg_zero_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_zero_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((ones (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_zero_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_zero_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_subnorm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_subnorm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_pos_norm_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_norm_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp <> ((zeros_implicit (( 8 : int):ii) : 8 words$word))))) /\ (((exp <> ((ones (( 8 : int):ii) : 8 words$word)))))))))))`;
+
+
+(*val f_is_pos_inf_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_inf_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant = ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_SNaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_SNaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ ((((((((access_vec_dec mant (( 22 : int):ii))) = B0))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word)))))))))))`;
+
+
+(*val f_is_QNaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_QNaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((((access_vec_dec mant (( 22 : int):ii))) = B1))))))`;
+
+
+(*val f_is_NaN_S : mword ty32 -> bool*)
+
+val _ = Define `
+ ((f_is_NaN_S:(32)words$word -> bool) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ ((((exp = ((ones (( 8 : int):ii) : 8 words$word))))) /\ (((mant <> ((zeros_implicit (( 23 : int):ii) : 23 words$word))))))))`;
+
+
+(*val negate_S : mword ty32 -> mword ty32*)
+
+val _ = Define `
+ ((negate_S:(32)words$word ->(32)words$word) x32=
+ (let (sign, exp, mant) = ((fsplit_S x32 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let new_sign = (if (((sign = (0b0w : 1 words$word)))) then (0b1w : 1 words$word) else (0b0w : 1 words$word)) in
+ (fmake_S new_sign exp mant : 32 words$word)))`;
+
+
+(*val feq_quiet_S : mword ty32 -> mword ty32 -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((feq_quiet_S:(32)words$word ->(32)words$word -> bool#(5)words$word) v1 v2=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_S v1)) \/ ((f_is_pos_zero_S v1))) in
+ let v2Is0 = (((f_is_neg_zero_S v2)) \/ ((f_is_pos_zero_S v2))) in
+ let result = ((((v1 = v2))) \/ (((v1Is0 /\ v2Is0)))) in
+ let fflags =
+ (if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val flt_S : mword ty32 -> mword ty32 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((flt_S:(32)words$word ->(32)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) < ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then F
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) > ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_S v1)) \/ ((f_is_NaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val fle_S : mword ty32 -> mword ty32 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((fle_S:(32)words$word ->(32)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_S v1 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S v2 : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_S v1)) \/ ((f_is_pos_zero_S v1))) in
+ let v2Is0 = (((f_is_neg_zero_S v2)) \/ ((f_is_pos_zero_S v2))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) <= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then
+ (v1Is0 /\ v2Is0)
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) >= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_S v1)) \/ ((f_is_SNaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_S v1)) \/ ((f_is_NaN_S v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val nan_box : mword ty32 -> mword ty64*)
+
+val _ = Define `
+ ((nan_box:(32)words$word ->(64)words$word) val_32b= ((concat_vec (0xFFFFFFFFw : 32 words$word) val_32b : 64 words$word)))`;
+
+
+(*val nan_unbox : mword ty64 -> mword ty32*)
+
+val _ = Define `
+ ((nan_unbox:(64)words$word ->(32)words$word) regval=
+ (if (((((subrange_vec_dec regval (( 63 : int):ii) (( 32 : int):ii) : 32 words$word)) = (0xFFFFFFFFw : 32 words$word))))
+ then
+ (subrange_vec_dec regval (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)
+ else (canonical_NaN_S () : 32 words$word)))`;
+
+
+(*val is_RV32F_or_RV64F : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV32F_or_RV64F:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS ((haveFExt () )) (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))))`;
+
+
+(*val is_RV64F : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV64F:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state$and_boolS ((haveFExt () )) (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))))`;
+
+
+(*val is_RV32D_or_RV64D : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV32D_or_RV64D:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () =
+ (sail2_state$and_boolS ((haveDExt () )) (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))))`;
+
+
+(*val is_RV64D : unit -> M bool*)
+
+val _ = Define `
+ ((is_RV64D:unit ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state$and_boolS ((haveDExt () )) (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))))`;
+
+
+(*val process_fload64 : mword ty5 -> mword ty64 -> MemoryOpResult (mword ty64) -> M Retired*)
+
+val _ = Define `
+ ((process_fload64:(5)words$word ->(64)words$word ->((64)words$word)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value=
+ ((case value of
+ MemValue (result) => sail2_state_monad$seqS (wF_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ )))`;
+
+
+(*val process_fload32 : mword ty5 -> mword ty64 -> MemoryOpResult (mword ty32) -> M Retired*)
+
+val _ = Define `
+ ((process_fload32:(5)words$word ->(64)words$word ->((32)words$word)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rd addr value=
+ ((case value of
+ MemValue (result) => sail2_state_monad$seqS (wF_bits rd ((nan_box result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ )))`;
+
+
+(*val process_fstore : mword ty64 -> MemoryOpResult bool -> M Retired*)
+
+val _ = Define `
+ ((process_fstore:(64)words$word ->(bool)MemoryOpResult ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) vaddr value=
+ ((case value of
+ MemValue (T) => sail2_state_monad$returnS RETIRE_SUCCESS
+ | MemValue (F) => internal_error "store got false from mem_write_value"
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ )))`;
+
+
+(*val f_madd_type_mnemonic_S_forwards : f_madd_op_S -> string*)
+
+(*val f_madd_type_mnemonic_S_backwards : string -> M f_madd_op_S*)
+
+(*val f_madd_type_mnemonic_S_forwards_matches : f_madd_op_S -> bool*)
+
+(*val f_madd_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_madd_type_mnemonic_S_matches_prefix : string -> maybe ((f_madd_op_S * ii))*)
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_forwards:f_madd_op_S -> string) arg_=
+ ((case arg_ of
+ FMADD_S => "fmadd.s"
+ | FMSUB_S => "fmsub.s"
+ | FNMSUB_S => "fnmsub.s"
+ | FNMADD_S => "fnmadd.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_madd_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.s"))) then sail2_state_monad$returnS FMADD_S
+ else if (((p0_ = "fmsub.s"))) then sail2_state_monad$returnS FMSUB_S
+ else if (((p0_ = "fnmsub.s"))) then sail2_state_monad$returnS FNMSUB_S
+ else if (((p0_ = "fnmadd.s"))) then sail2_state_monad$returnS FNMADD_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_forwards_matches:f_madd_op_S -> bool) arg_=
+ ((case arg_ of
+ FMADD_S => T
+ | FMSUB_S => T
+ | FNMSUB_S => T
+ | FNMADD_S => T
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.s"))) then T
+ else if (((p0_ = "fmsub.s"))) then T
+ else if (((p0_ = "fnmsub.s"))) then T
+ else if (((p0_ = "fnmadd.s"))) then T
+ else F))`;
+
+
+(*val _s1114_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1114_:string ->(string)option) s1115_0=
+ (let s1116_0 = s1115_0 in
+ if ((string_startswith s1116_0 "fnmadd.s")) then
+ (case ((string_drop s1116_0 ((string_length "fnmadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1110_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1110_:string ->(string)option) s1111_0=
+ (let s1112_0 = s1111_0 in
+ if ((string_startswith s1112_0 "fnmsub.s")) then
+ (case ((string_drop s1112_0 ((string_length "fnmsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1106_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1106_:string ->(string)option) s1107_0=
+ (let s1108_0 = s1107_0 in
+ if ((string_startswith s1108_0 "fmsub.s")) then
+ (case ((string_drop s1108_0 ((string_length "fmsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1102_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1102_:string ->(string)option) s1103_0=
+ (let s1104_0 = s1103_0 in
+ if ((string_startswith s1104_0 "fmadd.s")) then
+ (case ((string_drop s1104_0 ((string_length "fmadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_S_matches_prefix:string ->(f_madd_op_S#int)option) arg_=
+ (let s1105_0 = arg_ in
+ if ((case ((s1102_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1102_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FMADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1106_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1106_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FMSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1110_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1110_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FNMSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1114_ s1105_0)) of SOME (s_) => T | _ => F )) then
+ (case s1114_ s1105_0 of
+ (SOME (s_)) =>
+ SOME (FNMADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_rm_type_mnemonic_S_forwards : f_bin_rm_op_S -> string*)
+
+(*val f_bin_rm_type_mnemonic_S_backwards : string -> M f_bin_rm_op_S*)
+
+(*val f_bin_rm_type_mnemonic_S_forwards_matches : f_bin_rm_op_S -> bool*)
+
+(*val f_bin_rm_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_bin_rm_type_mnemonic_S_matches_prefix : string -> maybe ((f_bin_rm_op_S * ii))*)
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_forwards:f_bin_rm_op_S -> string) arg_=
+ ((case arg_ of
+ FADD_S => "fadd.s"
+ | FSUB_S => "fsub.s"
+ | FMUL_S => "fmul.s"
+ | FDIV_S => "fdiv.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_rm_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.s"))) then sail2_state_monad$returnS FADD_S
+ else if (((p0_ = "fsub.s"))) then sail2_state_monad$returnS FSUB_S
+ else if (((p0_ = "fmul.s"))) then sail2_state_monad$returnS FMUL_S
+ else if (((p0_ = "fdiv.s"))) then sail2_state_monad$returnS FDIV_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_forwards_matches:f_bin_rm_op_S -> bool) arg_=
+ ((case arg_ of FADD_S => T | FSUB_S => T | FMUL_S => T | FDIV_S => T )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.s"))) then T
+ else if (((p0_ = "fsub.s"))) then T
+ else if (((p0_ = "fmul.s"))) then T
+ else if (((p0_ = "fdiv.s"))) then T
+ else F))`;
+
+
+(*val _s1130_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1130_:string ->(string)option) s1131_0=
+ (let s1132_0 = s1131_0 in
+ if ((string_startswith s1132_0 "fdiv.s")) then
+ (case ((string_drop s1132_0 ((string_length "fdiv.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1126_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1126_:string ->(string)option) s1127_0=
+ (let s1128_0 = s1127_0 in
+ if ((string_startswith s1128_0 "fmul.s")) then
+ (case ((string_drop s1128_0 ((string_length "fmul.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1122_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1122_:string ->(string)option) s1123_0=
+ (let s1124_0 = s1123_0 in
+ if ((string_startswith s1124_0 "fsub.s")) then
+ (case ((string_drop s1124_0 ((string_length "fsub.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1118_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1118_:string ->(string)option) s1119_0=
+ (let s1120_0 = s1119_0 in
+ if ((string_startswith s1120_0 "fadd.s")) then
+ (case ((string_drop s1120_0 ((string_length "fadd.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_S_matches_prefix:string ->(f_bin_rm_op_S#int)option) arg_=
+ (let s1121_0 = arg_ in
+ if ((case ((s1118_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1118_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FADD_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1122_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1122_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FSUB_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1126_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1126_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FMUL_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1130_ s1121_0)) of SOME (s_) => T | _ => F )) then
+ (case s1130_ s1121_0 of
+ (SOME (s_)) =>
+ SOME (FDIV_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_rm_type_mnemonic_S_forwards : f_un_rm_op_S -> string*)
+
+(*val f_un_rm_type_mnemonic_S_backwards : string -> M f_un_rm_op_S*)
+
+(*val f_un_rm_type_mnemonic_S_forwards_matches : f_un_rm_op_S -> bool*)
+
+(*val f_un_rm_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_un_rm_type_mnemonic_S_matches_prefix : string -> maybe ((f_un_rm_op_S * ii))*)
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_forwards:f_un_rm_op_S -> string) arg_=
+ ((case arg_ of
+ FSQRT_S => "fsqrt.s"
+ | FCVT_W_S => "fcvt.w.s"
+ | FCVT_WU_S => "fcvt.wu.s"
+ | FCVT_S_W => "fcvt.s.w"
+ | FCVT_S_WU => "fcvt.s.wu"
+ | FCVT_L_S => "fcvt.l.s"
+ | FCVT_LU_S => "fcvt.lu.s"
+ | FCVT_S_L => "fcvt.s.l"
+ | FCVT_S_LU => "fcvt.s.lu"
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_rm_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.s"))) then sail2_state_monad$returnS FSQRT_S
+ else if (((p0_ = "fcvt.w.s"))) then sail2_state_monad$returnS FCVT_W_S
+ else if (((p0_ = "fcvt.wu.s"))) then sail2_state_monad$returnS FCVT_WU_S
+ else if (((p0_ = "fcvt.s.w"))) then sail2_state_monad$returnS FCVT_S_W
+ else if (((p0_ = "fcvt.s.wu"))) then sail2_state_monad$returnS FCVT_S_WU
+ else if (((p0_ = "fcvt.l.s"))) then sail2_state_monad$returnS FCVT_L_S
+ else if (((p0_ = "fcvt.lu.s"))) then sail2_state_monad$returnS FCVT_LU_S
+ else if (((p0_ = "fcvt.s.l"))) then sail2_state_monad$returnS FCVT_S_L
+ else if (((p0_ = "fcvt.s.lu"))) then sail2_state_monad$returnS FCVT_S_LU
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_forwards_matches:f_un_rm_op_S -> bool) arg_=
+ ((case arg_ of
+ FSQRT_S => T
+ | FCVT_W_S => T
+ | FCVT_WU_S => T
+ | FCVT_S_W => T
+ | FCVT_S_WU => T
+ | FCVT_L_S => T
+ | FCVT_LU_S => T
+ | FCVT_S_L => T
+ | FCVT_S_LU => T
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.s"))) then T
+ else if (((p0_ = "fcvt.w.s"))) then T
+ else if (((p0_ = "fcvt.wu.s"))) then T
+ else if (((p0_ = "fcvt.s.w"))) then T
+ else if (((p0_ = "fcvt.s.wu"))) then T
+ else if (((p0_ = "fcvt.l.s"))) then T
+ else if (((p0_ = "fcvt.lu.s"))) then T
+ else if (((p0_ = "fcvt.s.l"))) then T
+ else if (((p0_ = "fcvt.s.lu"))) then T
+ else F))`;
+
+
+(*val _s1166_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1166_:string ->(string)option) s1167_0=
+ (let s1168_0 = s1167_0 in
+ if ((string_startswith s1168_0 "fcvt.s.lu")) then
+ (case ((string_drop s1168_0 ((string_length "fcvt.s.lu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1162_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1162_:string ->(string)option) s1163_0=
+ (let s1164_0 = s1163_0 in
+ if ((string_startswith s1164_0 "fcvt.s.l")) then
+ (case ((string_drop s1164_0 ((string_length "fcvt.s.l")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1158_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1158_:string ->(string)option) s1159_0=
+ (let s1160_0 = s1159_0 in
+ if ((string_startswith s1160_0 "fcvt.lu.s")) then
+ (case ((string_drop s1160_0 ((string_length "fcvt.lu.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1154_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1154_:string ->(string)option) s1155_0=
+ (let s1156_0 = s1155_0 in
+ if ((string_startswith s1156_0 "fcvt.l.s")) then
+ (case ((string_drop s1156_0 ((string_length "fcvt.l.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1150_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1150_:string ->(string)option) s1151_0=
+ (let s1152_0 = s1151_0 in
+ if ((string_startswith s1152_0 "fcvt.s.wu")) then
+ (case ((string_drop s1152_0 ((string_length "fcvt.s.wu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1146_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1146_:string ->(string)option) s1147_0=
+ (let s1148_0 = s1147_0 in
+ if ((string_startswith s1148_0 "fcvt.s.w")) then
+ (case ((string_drop s1148_0 ((string_length "fcvt.s.w")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1142_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1142_:string ->(string)option) s1143_0=
+ (let s1144_0 = s1143_0 in
+ if ((string_startswith s1144_0 "fcvt.wu.s")) then
+ (case ((string_drop s1144_0 ((string_length "fcvt.wu.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1138_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1138_:string ->(string)option) s1139_0=
+ (let s1140_0 = s1139_0 in
+ if ((string_startswith s1140_0 "fcvt.w.s")) then
+ (case ((string_drop s1140_0 ((string_length "fcvt.w.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1134_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1134_:string ->(string)option) s1135_0=
+ (let s1136_0 = s1135_0 in
+ if ((string_startswith s1136_0 "fsqrt.s")) then
+ (case ((string_drop s1136_0 ((string_length "fsqrt.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_S_matches_prefix:string ->(f_un_rm_op_S#int)option) arg_=
+ (let s1137_0 = arg_ in
+ if ((case ((s1134_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1134_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FSQRT_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1138_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1138_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_W_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1142_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1142_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_WU_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1146_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1146_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_W, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1150_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1150_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_WU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1154_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1154_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_L_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1158_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1158_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_LU_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1162_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1162_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_L, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1166_ s1137_0)) of SOME (s_) => T | _ => F )) then
+ (case s1166_ s1137_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_LU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_type_mnemonic_S_forwards : f_bin_op_S -> string*)
+
+(*val f_bin_type_mnemonic_S_backwards : string -> M f_bin_op_S*)
+
+(*val f_bin_type_mnemonic_S_forwards_matches : f_bin_op_S -> bool*)
+
+(*val f_bin_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_bin_type_mnemonic_S_matches_prefix : string -> maybe ((f_bin_op_S * ii))*)
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_forwards:f_bin_op_S -> string) arg_=
+ ((case arg_ of
+ FSGNJ_S => "fsgnj.s"
+ | FSGNJN_S => "fsgnjn.s"
+ | FSGNJX_S => "fsgnjx.s"
+ | FMIN_S => "fmin.s"
+ | FMAX_S => "fmax.s"
+ | FEQ_S => "feq.s"
+ | FLT_S => "flt.s"
+ | FLE_S => "fle.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.s"))) then sail2_state_monad$returnS FSGNJ_S
+ else if (((p0_ = "fsgnjn.s"))) then sail2_state_monad$returnS FSGNJN_S
+ else if (((p0_ = "fsgnjx.s"))) then sail2_state_monad$returnS FSGNJX_S
+ else if (((p0_ = "fmin.s"))) then sail2_state_monad$returnS FMIN_S
+ else if (((p0_ = "fmax.s"))) then sail2_state_monad$returnS FMAX_S
+ else if (((p0_ = "feq.s"))) then sail2_state_monad$returnS FEQ_S
+ else if (((p0_ = "flt.s"))) then sail2_state_monad$returnS FLT_S
+ else if (((p0_ = "fle.s"))) then sail2_state_monad$returnS FLE_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_forwards_matches:f_bin_op_S -> bool) arg_=
+ ((case arg_ of
+ FSGNJ_S => T
+ | FSGNJN_S => T
+ | FSGNJX_S => T
+ | FMIN_S => T
+ | FMAX_S => T
+ | FEQ_S => T
+ | FLT_S => T
+ | FLE_S => T
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.s"))) then T
+ else if (((p0_ = "fsgnjn.s"))) then T
+ else if (((p0_ = "fsgnjx.s"))) then T
+ else if (((p0_ = "fmin.s"))) then T
+ else if (((p0_ = "fmax.s"))) then T
+ else if (((p0_ = "feq.s"))) then T
+ else if (((p0_ = "flt.s"))) then T
+ else if (((p0_ = "fle.s"))) then T
+ else F))`;
+
+
+(*val _s1198_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1198_:string ->(string)option) s1199_0=
+ (let s1200_0 = s1199_0 in
+ if ((string_startswith s1200_0 "fle.s")) then
+ (case ((string_drop s1200_0 ((string_length "fle.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1194_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1194_:string ->(string)option) s1195_0=
+ (let s1196_0 = s1195_0 in
+ if ((string_startswith s1196_0 "flt.s")) then
+ (case ((string_drop s1196_0 ((string_length "flt.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1190_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1190_:string ->(string)option) s1191_0=
+ (let s1192_0 = s1191_0 in
+ if ((string_startswith s1192_0 "feq.s")) then
+ (case ((string_drop s1192_0 ((string_length "feq.s")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1186_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1186_:string ->(string)option) s1187_0=
+ (let s1188_0 = s1187_0 in
+ if ((string_startswith s1188_0 "fmax.s")) then
+ (case ((string_drop s1188_0 ((string_length "fmax.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1182_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1182_:string ->(string)option) s1183_0=
+ (let s1184_0 = s1183_0 in
+ if ((string_startswith s1184_0 "fmin.s")) then
+ (case ((string_drop s1184_0 ((string_length "fmin.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1178_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1178_:string ->(string)option) s1179_0=
+ (let s1180_0 = s1179_0 in
+ if ((string_startswith s1180_0 "fsgnjx.s")) then
+ (case ((string_drop s1180_0 ((string_length "fsgnjx.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1174_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1174_:string ->(string)option) s1175_0=
+ (let s1176_0 = s1175_0 in
+ if ((string_startswith s1176_0 "fsgnjn.s")) then
+ (case ((string_drop s1176_0 ((string_length "fsgnjn.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1170_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1170_:string ->(string)option) s1171_0=
+ (let s1172_0 = s1171_0 in
+ if ((string_startswith s1172_0 "fsgnj.s")) then
+ (case ((string_drop s1172_0 ((string_length "fsgnj.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_S_matches_prefix:string ->(f_bin_op_S#int)option) arg_=
+ (let s1173_0 = arg_ in
+ if ((case ((s1170_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1170_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJ_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1174_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1174_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJN_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1178_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1178_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJX_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1182_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1182_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FMIN_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1186_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1186_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FMAX_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1190_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1190_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FEQ_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1194_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1194_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FLT_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1198_ s1173_0)) of SOME (s_) => T | _ => F )) then
+ (case s1198_ s1173_0 of
+ (SOME (s_)) =>
+ SOME (FLE_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_type_mnemonic_S_forwards : f_un_op_S -> string*)
+
+(*val f_un_type_mnemonic_S_backwards : string -> M f_un_op_S*)
+
+(*val f_un_type_mnemonic_S_forwards_matches : f_un_op_S -> bool*)
+
+(*val f_un_type_mnemonic_S_backwards_matches : string -> bool*)
+
+(*val f_un_type_mnemonic_S_matches_prefix : string -> maybe ((f_un_op_S * ii))*)
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_forwards:f_un_op_S -> string) arg_=
+ ((case arg_ of FMV_X_W => "fmv.x.w" | FCLASS_S => "fclass.s" | FMV_W_X => "fmv.w.x" )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_op_S),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.w"))) then sail2_state_monad$returnS FMV_X_W
+ else if (((p0_ = "fclass.s"))) then sail2_state_monad$returnS FCLASS_S
+ else if (((p0_ = "fmv.w.x"))) then sail2_state_monad$returnS FMV_W_X
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_forwards_matches:f_un_op_S -> bool) arg_=
+ ((case arg_ of FMV_X_W => T | FCLASS_S => T | FMV_W_X => T )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.w"))) then T
+ else if (((p0_ = "fclass.s"))) then T
+ else if (((p0_ = "fmv.w.x"))) then T
+ else F))`;
+
+
+(*val _s1210_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1210_:string ->(string)option) s1211_0=
+ (let s1212_0 = s1211_0 in
+ if ((string_startswith s1212_0 "fmv.w.x")) then
+ (case ((string_drop s1212_0 ((string_length "fmv.w.x")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1206_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1206_:string ->(string)option) s1207_0=
+ (let s1208_0 = s1207_0 in
+ if ((string_startswith s1208_0 "fclass.s")) then
+ (case ((string_drop s1208_0 ((string_length "fclass.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1202_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1202_:string ->(string)option) s1203_0=
+ (let s1204_0 = s1203_0 in
+ if ((string_startswith s1204_0 "fmv.x.w")) then
+ (case ((string_drop s1204_0 ((string_length "fmv.x.w")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_S_matches_prefix:string ->(f_un_op_S#int)option) arg_=
+ (let s1205_0 = arg_ in
+ if ((case ((s1202_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1202_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FMV_X_W, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1206_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1206_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FCLASS_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1210_ s1205_0)) of SOME (s_) => T | _ => F )) then
+ (case s1210_ s1205_0 of
+ (SOME (s_)) =>
+ SOME (FMV_W_X, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val fsplit_D : mword ty64 -> (mword ty1 * mword ty11 * mword ty52)*)
+
+val _ = Define `
+ ((fsplit_D:(64)words$word ->(1)words$word#(11)words$word#(52)words$word) x64=
+ ((subrange_vec_dec x64 (( 63 : int):ii) (( 63 : int):ii) : 1 words$word),
+ (subrange_vec_dec x64 (( 62 : int):ii) (( 52 : int):ii) : 11 words$word),
+ (subrange_vec_dec x64 (( 51 : int):ii) (( 0 : int):ii) : 52 words$word)))`;
+
+
+(*val fmake_D : mword ty1 -> mword ty11 -> mword ty52 -> mword ty64*)
+
+val _ = Define `
+ ((fmake_D:(1)words$word ->(11)words$word ->(52)words$word ->(64)words$word) sign exp mant= ((concat_vec sign ((concat_vec exp mant : 63 words$word)) : 64 words$word)))`;
+
+
+(*val canonical_NaN_D : unit -> mword ty64*)
+
+val _ = Define `
+ ((canonical_NaN_D:unit ->(64)words$word) () = ((0x7FF8000000000000w : 64 words$word)))`;
+
+
+(*val f_is_neg_inf_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_inf_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((ones (( 11 : int):ii) : 11 words$word))))) /\ (((mant = ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_neg_norm_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_norm_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp <> ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((exp <> ((ones (( 11 : int):ii) : 11 words$word)))))))))))`;
+
+
+(*val f_is_neg_subnorm_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_subnorm_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = (0b1w : 1 words$word)))) /\ ((((((exp = ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((mant <> ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_neg_zero_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_neg_zero_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = ((ones (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((mant = ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_pos_zero_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_zero_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((mant = ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_pos_subnorm_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_subnorm_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((mant <> ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_pos_norm_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_norm_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp <> ((zeros_implicit (( 11 : int):ii) : 11 words$word))))) /\ (((exp <> ((ones (( 11 : int):ii) : 11 words$word)))))))))))`;
+
+
+(*val f_is_pos_inf_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_pos_inf_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((sign = ((zeros_implicit (( 1 : int):ii) : 1 words$word))))) /\ ((((((exp = ((ones (( 11 : int):ii) : 11 words$word))))) /\ (((mant = ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_SNaN_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_SNaN_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((exp = ((ones (( 11 : int):ii) : 11 words$word))))) /\ ((((((((access_vec_dec mant (( 51 : int):ii))) = B0))) /\ (((mant <> ((zeros_implicit (( 52 : int):ii) : 52 words$word)))))))))))`;
+
+
+(*val f_is_QNaN_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_QNaN_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((exp = ((ones (( 11 : int):ii) : 11 words$word))))) /\ (((((access_vec_dec mant (( 51 : int):ii))) = B1))))))`;
+
+
+(*val f_is_NaN_D : mword ty64 -> bool*)
+
+val _ = Define `
+ ((f_is_NaN_D:(64)words$word -> bool) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ ((((exp = ((ones (( 11 : int):ii) : 11 words$word))))) /\ (((mant <> ((zeros_implicit (( 52 : int):ii) : 52 words$word))))))))`;
+
+
+(*val negate_D : mword ty64 -> mword ty64*)
+
+val _ = Define `
+ ((negate_D:(64)words$word ->(64)words$word) x64=
+ (let (sign, exp, mant) = ((fsplit_D x64 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let new_sign = (if (((sign = (0b0w : 1 words$word)))) then (0b1w : 1 words$word) else (0b0w : 1 words$word)) in
+ (fmake_D new_sign exp mant : 64 words$word)))`;
+
+
+(*val feq_quiet_D : mword ty64 -> mword ty64 -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((feq_quiet_D:(64)words$word ->(64)words$word -> bool#(5)words$word) v1 v2=
+ (let (s1, e1, m1) = ((fsplit_D v1 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D v2 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_D v1)) \/ ((f_is_pos_zero_D v1))) in
+ let v2Is0 = (((f_is_neg_zero_D v2)) \/ ((f_is_pos_zero_D v2))) in
+ let result = ((((v1 = v2))) \/ (((v1Is0 /\ v2Is0)))) in
+ let fflags =
+ (if (((((f_is_SNaN_D v1)) \/ ((f_is_SNaN_D v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val flt_D : mword ty64 -> mword ty64 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((flt_D:(64)words$word ->(64)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_D v1 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D v2 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) < ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then F
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) > ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_D v1)) \/ ((f_is_SNaN_D v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_D v1)) \/ ((f_is_NaN_D v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val fle_D : mword ty64 -> mword ty64 -> bool -> (bool * mword ty5)*)
+
+val _ = Define `
+ ((fle_D:(64)words$word ->(64)words$word -> bool -> bool#(5)words$word) v1 v2 is_quiet=
+ (let (s1, e1, m1) = ((fsplit_D v1 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D v2 : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let v1Is0 = (((f_is_neg_zero_D v1)) \/ ((f_is_pos_zero_D v1))) in
+ let v2Is0 = (((f_is_neg_zero_D v2)) \/ ((f_is_pos_zero_D v2))) in
+ let (result : bool) =
+ (if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then
+ if (((e1 = e2))) then ((lem$w2ui m1)) <= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) < ((lem$w2ui e2))
+ else if ((((((s1 = (0b0w : 1 words$word)))) /\ (((s2 = (0b1w : 1 words$word))))))) then
+ (v1Is0 /\ v2Is0)
+ else if ((((((s1 = (0b1w : 1 words$word)))) /\ (((s2 = (0b0w : 1 words$word))))))) then T
+ else if (((e1 = e2))) then ((lem$w2ui m1)) >= ((lem$w2ui m2))
+ else ((lem$w2ui e1)) > ((lem$w2ui e2))) in
+ let fflags =
+ (if is_quiet then
+ if (((((f_is_SNaN_D v1)) \/ ((f_is_SNaN_D v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)
+ else if (((((f_is_NaN_D v1)) \/ ((f_is_NaN_D v2))))) then (nvFlag () : 5 words$word)
+ else (zeros_implicit (( 5 : int):ii) : 5 words$word)) in
+ (result, fflags)))`;
+
+
+(*val f_madd_type_mnemonic_D_forwards : f_madd_op_D -> string*)
+
+(*val f_madd_type_mnemonic_D_backwards : string -> M f_madd_op_D*)
+
+(*val f_madd_type_mnemonic_D_forwards_matches : f_madd_op_D -> bool*)
+
+(*val f_madd_type_mnemonic_D_backwards_matches : string -> bool*)
+
+(*val f_madd_type_mnemonic_D_matches_prefix : string -> maybe ((f_madd_op_D * ii))*)
+
+val _ = Define `
+ ((f_madd_type_mnemonic_D_forwards:f_madd_op_D -> string) arg_=
+ ((case arg_ of
+ FMADD_D => "fmadd.d"
+ | FMSUB_D => "fmsub.d"
+ | FNMSUB_D => "fnmsub.d"
+ | FNMADD_D => "fnmadd.d"
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_D_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_madd_op_D),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.d"))) then sail2_state_monad$returnS FMADD_D
+ else if (((p0_ = "fmsub.d"))) then sail2_state_monad$returnS FMSUB_D
+ else if (((p0_ = "fnmsub.d"))) then sail2_state_monad$returnS FNMSUB_D
+ else if (((p0_ = "fnmadd.d"))) then sail2_state_monad$returnS FNMADD_D
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_D_forwards_matches:f_madd_op_D -> bool) arg_=
+ ((case arg_ of
+ FMADD_D => T
+ | FMSUB_D => T
+ | FNMSUB_D => T
+ | FNMADD_D => T
+ )))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_D_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmadd.d"))) then T
+ else if (((p0_ = "fmsub.d"))) then T
+ else if (((p0_ = "fnmsub.d"))) then T
+ else if (((p0_ = "fnmadd.d"))) then T
+ else F))`;
+
+
+(*val _s1226_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1226_:string ->(string)option) s1227_0=
+ (let s1228_0 = s1227_0 in
+ if ((string_startswith s1228_0 "fnmadd.d")) then
+ (case ((string_drop s1228_0 ((string_length "fnmadd.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1222_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1222_:string ->(string)option) s1223_0=
+ (let s1224_0 = s1223_0 in
+ if ((string_startswith s1224_0 "fnmsub.d")) then
+ (case ((string_drop s1224_0 ((string_length "fnmsub.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1218_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1218_:string ->(string)option) s1219_0=
+ (let s1220_0 = s1219_0 in
+ if ((string_startswith s1220_0 "fmsub.d")) then
+ (case ((string_drop s1220_0 ((string_length "fmsub.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1214_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1214_:string ->(string)option) s1215_0=
+ (let s1216_0 = s1215_0 in
+ if ((string_startswith s1216_0 "fmadd.d")) then
+ (case ((string_drop s1216_0 ((string_length "fmadd.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_madd_type_mnemonic_D_matches_prefix:string ->(f_madd_op_D#int)option) arg_=
+ (let s1217_0 = arg_ in
+ if ((case ((s1214_ s1217_0)) of SOME (s_) => T | _ => F )) then
+ (case s1214_ s1217_0 of
+ (SOME (s_)) =>
+ SOME (FMADD_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1218_ s1217_0)) of SOME (s_) => T | _ => F )) then
+ (case s1218_ s1217_0 of
+ (SOME (s_)) =>
+ SOME (FMSUB_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1222_ s1217_0)) of SOME (s_) => T | _ => F )) then
+ (case s1222_ s1217_0 of
+ (SOME (s_)) =>
+ SOME (FNMSUB_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1226_ s1217_0)) of SOME (s_) => T | _ => F )) then
+ (case s1226_ s1217_0 of
+ (SOME (s_)) =>
+ SOME (FNMADD_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_rm_type_mnemonic_D_forwards : f_bin_rm_op_D -> string*)
+
+(*val f_bin_rm_type_mnemonic_D_backwards : string -> M f_bin_rm_op_D*)
+
+(*val f_bin_rm_type_mnemonic_D_forwards_matches : f_bin_rm_op_D -> bool*)
+
+(*val f_bin_rm_type_mnemonic_D_backwards_matches : string -> bool*)
+
+(*val f_bin_rm_type_mnemonic_D_matches_prefix : string -> maybe ((f_bin_rm_op_D * ii))*)
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_D_forwards:f_bin_rm_op_D -> string) arg_=
+ ((case arg_ of
+ FADD_D => "fadd.d"
+ | FSUB_D => "fsub.d"
+ | FMUL_D => "fmul.d"
+ | FDIV_D => "fdiv.d"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_D_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_rm_op_D),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.d"))) then sail2_state_monad$returnS FADD_D
+ else if (((p0_ = "fsub.d"))) then sail2_state_monad$returnS FSUB_D
+ else if (((p0_ = "fmul.d"))) then sail2_state_monad$returnS FMUL_D
+ else if (((p0_ = "fdiv.d"))) then sail2_state_monad$returnS FDIV_D
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_D_forwards_matches:f_bin_rm_op_D -> bool) arg_=
+ ((case arg_ of FADD_D => T | FSUB_D => T | FMUL_D => T | FDIV_D => T )))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_D_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fadd.d"))) then T
+ else if (((p0_ = "fsub.d"))) then T
+ else if (((p0_ = "fmul.d"))) then T
+ else if (((p0_ = "fdiv.d"))) then T
+ else F))`;
+
+
+(*val _s1242_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1242_:string ->(string)option) s1243_0=
+ (let s1244_0 = s1243_0 in
+ if ((string_startswith s1244_0 "fdiv.d")) then
+ (case ((string_drop s1244_0 ((string_length "fdiv.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1238_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1238_:string ->(string)option) s1239_0=
+ (let s1240_0 = s1239_0 in
+ if ((string_startswith s1240_0 "fmul.d")) then
+ (case ((string_drop s1240_0 ((string_length "fmul.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1234_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1234_:string ->(string)option) s1235_0=
+ (let s1236_0 = s1235_0 in
+ if ((string_startswith s1236_0 "fsub.d")) then
+ (case ((string_drop s1236_0 ((string_length "fsub.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1230_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1230_:string ->(string)option) s1231_0=
+ (let s1232_0 = s1231_0 in
+ if ((string_startswith s1232_0 "fadd.d")) then
+ (case ((string_drop s1232_0 ((string_length "fadd.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_rm_type_mnemonic_D_matches_prefix:string ->(f_bin_rm_op_D#int)option) arg_=
+ (let s1233_0 = arg_ in
+ if ((case ((s1230_ s1233_0)) of SOME (s_) => T | _ => F )) then
+ (case s1230_ s1233_0 of
+ (SOME (s_)) =>
+ SOME (FADD_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1234_ s1233_0)) of SOME (s_) => T | _ => F )) then
+ (case s1234_ s1233_0 of
+ (SOME (s_)) =>
+ SOME (FSUB_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1238_ s1233_0)) of SOME (s_) => T | _ => F )) then
+ (case s1238_ s1233_0 of
+ (SOME (s_)) =>
+ SOME (FMUL_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1242_ s1233_0)) of SOME (s_) => T | _ => F )) then
+ (case s1242_ s1233_0 of
+ (SOME (s_)) =>
+ SOME (FDIV_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_rm_type_mnemonic_D_forwards : f_un_rm_op_D -> string*)
+
+(*val f_un_rm_type_mnemonic_D_backwards : string -> M f_un_rm_op_D*)
+
+(*val f_un_rm_type_mnemonic_D_forwards_matches : f_un_rm_op_D -> bool*)
+
+(*val f_un_rm_type_mnemonic_D_backwards_matches : string -> bool*)
+
+(*val f_un_rm_type_mnemonic_D_matches_prefix : string -> maybe ((f_un_rm_op_D * ii))*)
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_D_forwards:f_un_rm_op_D -> string) arg_=
+ ((case arg_ of
+ FSQRT_D => "fsqrt.d"
+ | FCVT_W_D => "fcvt.w.d"
+ | FCVT_WU_D => "fcvt.wu.d"
+ | FCVT_D_W => "fcvt.d.w"
+ | FCVT_D_WU => "fcvt.d.wu"
+ | FCVT_L_D => "fcvt.l.d"
+ | FCVT_LU_D => "fcvt.lu.d"
+ | FCVT_D_L => "fcvt.d.l"
+ | FCVT_D_LU => "fcvt.d.lu"
+ | FCVT_S_D => "fcvt.s.d"
+ | FCVT_D_S => "fcvt.d.s"
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_D_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_rm_op_D),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.d"))) then sail2_state_monad$returnS FSQRT_D
+ else if (((p0_ = "fcvt.w.d"))) then sail2_state_monad$returnS FCVT_W_D
+ else if (((p0_ = "fcvt.wu.d"))) then sail2_state_monad$returnS FCVT_WU_D
+ else if (((p0_ = "fcvt.d.w"))) then sail2_state_monad$returnS FCVT_D_W
+ else if (((p0_ = "fcvt.d.wu"))) then sail2_state_monad$returnS FCVT_D_WU
+ else if (((p0_ = "fcvt.l.d"))) then sail2_state_monad$returnS FCVT_L_D
+ else if (((p0_ = "fcvt.lu.d"))) then sail2_state_monad$returnS FCVT_LU_D
+ else if (((p0_ = "fcvt.d.l"))) then sail2_state_monad$returnS FCVT_D_L
+ else if (((p0_ = "fcvt.d.lu"))) then sail2_state_monad$returnS FCVT_D_LU
+ else if (((p0_ = "fcvt.s.d"))) then sail2_state_monad$returnS FCVT_S_D
+ else if (((p0_ = "fcvt.d.s"))) then sail2_state_monad$returnS FCVT_D_S
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_D_forwards_matches:f_un_rm_op_D -> bool) arg_=
+ ((case arg_ of
+ FSQRT_D => T
+ | FCVT_W_D => T
+ | FCVT_WU_D => T
+ | FCVT_D_W => T
+ | FCVT_D_WU => T
+ | FCVT_L_D => T
+ | FCVT_LU_D => T
+ | FCVT_D_L => T
+ | FCVT_D_LU => T
+ | FCVT_S_D => T
+ | FCVT_D_S => T
+ )))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_D_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsqrt.d"))) then T
+ else if (((p0_ = "fcvt.w.d"))) then T
+ else if (((p0_ = "fcvt.wu.d"))) then T
+ else if (((p0_ = "fcvt.d.w"))) then T
+ else if (((p0_ = "fcvt.d.wu"))) then T
+ else if (((p0_ = "fcvt.l.d"))) then T
+ else if (((p0_ = "fcvt.lu.d"))) then T
+ else if (((p0_ = "fcvt.d.l"))) then T
+ else if (((p0_ = "fcvt.d.lu"))) then T
+ else if (((p0_ = "fcvt.s.d"))) then T
+ else if (((p0_ = "fcvt.d.s"))) then T
+ else F))`;
+
+
+(*val _s1286_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1286_:string ->(string)option) s1287_0=
+ (let s1288_0 = s1287_0 in
+ if ((string_startswith s1288_0 "fcvt.d.s")) then
+ (case ((string_drop s1288_0 ((string_length "fcvt.d.s")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1282_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1282_:string ->(string)option) s1283_0=
+ (let s1284_0 = s1283_0 in
+ if ((string_startswith s1284_0 "fcvt.s.d")) then
+ (case ((string_drop s1284_0 ((string_length "fcvt.s.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1278_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1278_:string ->(string)option) s1279_0=
+ (let s1280_0 = s1279_0 in
+ if ((string_startswith s1280_0 "fcvt.d.lu")) then
+ (case ((string_drop s1280_0 ((string_length "fcvt.d.lu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1274_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1274_:string ->(string)option) s1275_0=
+ (let s1276_0 = s1275_0 in
+ if ((string_startswith s1276_0 "fcvt.d.l")) then
+ (case ((string_drop s1276_0 ((string_length "fcvt.d.l")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1270_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1270_:string ->(string)option) s1271_0=
+ (let s1272_0 = s1271_0 in
+ if ((string_startswith s1272_0 "fcvt.lu.d")) then
+ (case ((string_drop s1272_0 ((string_length "fcvt.lu.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1266_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1266_:string ->(string)option) s1267_0=
+ (let s1268_0 = s1267_0 in
+ if ((string_startswith s1268_0 "fcvt.l.d")) then
+ (case ((string_drop s1268_0 ((string_length "fcvt.l.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1262_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1262_:string ->(string)option) s1263_0=
+ (let s1264_0 = s1263_0 in
+ if ((string_startswith s1264_0 "fcvt.d.wu")) then
+ (case ((string_drop s1264_0 ((string_length "fcvt.d.wu")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1258_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1258_:string ->(string)option) s1259_0=
+ (let s1260_0 = s1259_0 in
+ if ((string_startswith s1260_0 "fcvt.d.w")) then
+ (case ((string_drop s1260_0 ((string_length "fcvt.d.w")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1254_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1254_:string ->(string)option) s1255_0=
+ (let s1256_0 = s1255_0 in
+ if ((string_startswith s1256_0 "fcvt.wu.d")) then
+ (case ((string_drop s1256_0 ((string_length "fcvt.wu.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1250_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1250_:string ->(string)option) s1251_0=
+ (let s1252_0 = s1251_0 in
+ if ((string_startswith s1252_0 "fcvt.w.d")) then
+ (case ((string_drop s1252_0 ((string_length "fcvt.w.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1246_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1246_:string ->(string)option) s1247_0=
+ (let s1248_0 = s1247_0 in
+ if ((string_startswith s1248_0 "fsqrt.d")) then
+ (case ((string_drop s1248_0 ((string_length "fsqrt.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_rm_type_mnemonic_D_matches_prefix:string ->(f_un_rm_op_D#int)option) arg_=
+ (let s1249_0 = arg_ in
+ if ((case ((s1246_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1246_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FSQRT_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1250_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1250_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_W_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1254_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1254_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_WU_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1258_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1258_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_D_W, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1262_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1262_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_D_WU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1266_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1266_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_L_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1270_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1270_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_LU_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1274_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1274_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_D_L, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1278_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1278_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_D_LU, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1282_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1282_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_S_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1286_ s1249_0)) of SOME (s_) => T | _ => F )) then
+ (case s1286_ s1249_0 of
+ (SOME (s_)) =>
+ SOME (FCVT_D_S, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_bin_type_mnemonic_D_forwards : f_bin_op_D -> string*)
+
+(*val f_bin_type_mnemonic_D_backwards : string -> M f_bin_op_D*)
+
+(*val f_bin_type_mnemonic_D_forwards_matches : f_bin_op_D -> bool*)
+
+(*val f_bin_type_mnemonic_D_backwards_matches : string -> bool*)
+
+(*val f_bin_type_mnemonic_D_matches_prefix : string -> maybe ((f_bin_op_D * ii))*)
+
+val _ = Define `
+ ((f_bin_type_mnemonic_D_forwards:f_bin_op_D -> string) arg_=
+ ((case arg_ of
+ FSGNJ_D => "fsgnj.d"
+ | FSGNJN_D => "fsgnjn.d"
+ | FSGNJX_D => "fsgnjx.d"
+ | FMIN_D => "fmin.d"
+ | FMAX_D => "fmax.d"
+ | FEQ_D => "feq.d"
+ | FLT_D => "flt.d"
+ | FLE_D => "fle.d"
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_D_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_bin_op_D),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.d"))) then sail2_state_monad$returnS FSGNJ_D
+ else if (((p0_ = "fsgnjn.d"))) then sail2_state_monad$returnS FSGNJN_D
+ else if (((p0_ = "fsgnjx.d"))) then sail2_state_monad$returnS FSGNJX_D
+ else if (((p0_ = "fmin.d"))) then sail2_state_monad$returnS FMIN_D
+ else if (((p0_ = "fmax.d"))) then sail2_state_monad$returnS FMAX_D
+ else if (((p0_ = "feq.d"))) then sail2_state_monad$returnS FEQ_D
+ else if (((p0_ = "flt.d"))) then sail2_state_monad$returnS FLT_D
+ else if (((p0_ = "fle.d"))) then sail2_state_monad$returnS FLE_D
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_D_forwards_matches:f_bin_op_D -> bool) arg_=
+ ((case arg_ of
+ FSGNJ_D => T
+ | FSGNJN_D => T
+ | FSGNJX_D => T
+ | FMIN_D => T
+ | FMAX_D => T
+ | FEQ_D => T
+ | FLT_D => T
+ | FLE_D => T
+ )))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_D_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fsgnj.d"))) then T
+ else if (((p0_ = "fsgnjn.d"))) then T
+ else if (((p0_ = "fsgnjx.d"))) then T
+ else if (((p0_ = "fmin.d"))) then T
+ else if (((p0_ = "fmax.d"))) then T
+ else if (((p0_ = "feq.d"))) then T
+ else if (((p0_ = "flt.d"))) then T
+ else if (((p0_ = "fle.d"))) then T
+ else F))`;
+
+
+(*val _s1318_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1318_:string ->(string)option) s1319_0=
+ (let s1320_0 = s1319_0 in
+ if ((string_startswith s1320_0 "fle.d")) then
+ (case ((string_drop s1320_0 ((string_length "fle.d")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1314_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1314_:string ->(string)option) s1315_0=
+ (let s1316_0 = s1315_0 in
+ if ((string_startswith s1316_0 "flt.d")) then
+ (case ((string_drop s1316_0 ((string_length "flt.d")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1310_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1310_:string ->(string)option) s1311_0=
+ (let s1312_0 = s1311_0 in
+ if ((string_startswith s1312_0 "feq.d")) then
+ (case ((string_drop s1312_0 ((string_length "feq.d")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s1306_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1306_:string ->(string)option) s1307_0=
+ (let s1308_0 = s1307_0 in
+ if ((string_startswith s1308_0 "fmax.d")) then
+ (case ((string_drop s1308_0 ((string_length "fmax.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1302_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1302_:string ->(string)option) s1303_0=
+ (let s1304_0 = s1303_0 in
+ if ((string_startswith s1304_0 "fmin.d")) then
+ (case ((string_drop s1304_0 ((string_length "fmin.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1298_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1298_:string ->(string)option) s1299_0=
+ (let s1300_0 = s1299_0 in
+ if ((string_startswith s1300_0 "fsgnjx.d")) then
+ (case ((string_drop s1300_0 ((string_length "fsgnjx.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1294_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1294_:string ->(string)option) s1295_0=
+ (let s1296_0 = s1295_0 in
+ if ((string_startswith s1296_0 "fsgnjn.d")) then
+ (case ((string_drop s1296_0 ((string_length "fsgnjn.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1290_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1290_:string ->(string)option) s1291_0=
+ (let s1292_0 = s1291_0 in
+ if ((string_startswith s1292_0 "fsgnj.d")) then
+ (case ((string_drop s1292_0 ((string_length "fsgnj.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_bin_type_mnemonic_D_matches_prefix:string ->(f_bin_op_D#int)option) arg_=
+ (let s1293_0 = arg_ in
+ if ((case ((s1290_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1290_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJ_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1294_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1294_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJN_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1298_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1298_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FSGNJX_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1302_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1302_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FMIN_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1306_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1306_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FMAX_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1310_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1310_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FEQ_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1314_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1314_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FLT_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1318_ s1293_0)) of SOME (s_) => T | _ => F )) then
+ (case s1318_ s1293_0 of
+ (SOME (s_)) =>
+ SOME (FLE_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
+
+(*val f_un_type_mnemonic_D_forwards : f_un_op_D -> string*)
+
+(*val f_un_type_mnemonic_D_backwards : string -> M f_un_op_D*)
+
+(*val f_un_type_mnemonic_D_forwards_matches : f_un_op_D -> bool*)
+
+(*val f_un_type_mnemonic_D_backwards_matches : string -> bool*)
+
+(*val f_un_type_mnemonic_D_matches_prefix : string -> maybe ((f_un_op_D * ii))*)
+
+val _ = Define `
+ ((f_un_type_mnemonic_D_forwards:f_un_op_D -> string) arg_=
+ ((case arg_ of FMV_X_D => "fmv.x.d" | FCLASS_D => "fclass.d" | FMV_D_X => "fmv.d.x" )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_D_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((f_un_op_D),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.d"))) then sail2_state_monad$returnS FMV_X_D
+ else if (((p0_ = "fclass.d"))) then sail2_state_monad$returnS FCLASS_D
+ else if (((p0_ = "fmv.d.x"))) then sail2_state_monad$returnS FMV_D_X
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_D_forwards_matches:f_un_op_D -> bool) arg_=
+ ((case arg_ of FMV_X_D => T | FCLASS_D => T | FMV_D_X => T )))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_D_backwards_matches:string -> bool) arg_=
+ (let p0_ = arg_ in
+ if (((p0_ = "fmv.x.d"))) then T
+ else if (((p0_ = "fclass.d"))) then T
+ else if (((p0_ = "fmv.d.x"))) then T
+ else F))`;
+
+
+(*val _s1330_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1330_:string ->(string)option) s1331_0=
+ (let s1332_0 = s1331_0 in
+ if ((string_startswith s1332_0 "fmv.d.x")) then
+ (case ((string_drop s1332_0 ((string_length "fmv.d.x")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1326_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1326_:string ->(string)option) s1327_0=
+ (let s1328_0 = s1327_0 in
+ if ((string_startswith s1328_0 "fclass.d")) then
+ (case ((string_drop s1328_0 ((string_length "fclass.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+(*val _s1322_ : string -> maybe string*)
+
+val _ = Define `
+ ((s1322_:string ->(string)option) s1323_0=
+ (let s1324_0 = s1323_0 in
+ if ((string_startswith s1324_0 "fmv.x.d")) then
+ (case ((string_drop s1324_0 ((string_length "fmv.x.d")))) of
+ s_ => SOME s_
+ )
+ else NONE))`;
+
+
+val _ = Define `
+ ((f_un_type_mnemonic_D_matches_prefix:string ->(f_un_op_D#int)option) arg_=
+ (let s1325_0 = arg_ in
+ if ((case ((s1322_ s1325_0)) of SOME (s_) => T | _ => F )) then
+ (case s1322_ s1325_0 of
+ (SOME (s_)) =>
+ SOME (FMV_X_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1326_ s1325_0)) of SOME (s_) => T | _ => F )) then
+ (case s1326_ s1325_0 of
+ (SOME (s_)) =>
+ SOME (FCLASS_D, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s1330_ s1325_0)) of SOME (s_) => T | _ => F )) then
+ (case s1330_ s1325_0 of
+ (SOME (s_)) =>
+ SOME (FMV_D_X, ((string_length arg_)) - ((string_length s_)))
+ )
+ else NONE))`;
+
val _ = Define `
((encdec_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->((((32)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
@@ -18492,7 +23162,7 @@ val _ = Define `
((concat_vec rd ((encdec_uop_forwards op : 7 words$word)) : 12 words$word))
: 32 words$word))
| RISCV_JAL ((v__2, rd)) =>
- if (((((subrange_vec_dec v__2 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
+ if (((((subrange_vec_dec v__2 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) then
let (imm_19 : 1 bits) = ((subrange_vec_dec v__2 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
let (imm_8 : 1 bits) = ((subrange_vec_dec v__2 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__2 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
@@ -18504,8 +23174,7 @@ val _ = Define `
((concat_vec imm_12_9
((concat_vec imm_8
((concat_vec imm_7_0
- ((concat_vec rd (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b1101111w : 7 words$word) : 12 words$word))
: 20 words$word))
: 21 words$word))
: 25 words$word))
@@ -18515,14 +23184,13 @@ val _ = Define `
| RISCV_JALR ((imm, rs1, rd)) =>
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1100111w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| BTYPE ((v__4, rs2, rs1, op)) =>
- if (((((subrange_vec_dec v__4 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
+ if (((((subrange_vec_dec v__4 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) then
let (imm7_6 : 1 bits) = ((subrange_vec_dec v__4 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
let (imm7_6 : 1 bits) = ((subrange_vec_dec v__4 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__4 (( 10 : int):ii) (( 5 : int):ii) : 6 words$word)) in
@@ -18534,9 +23202,7 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((encdec_bop_forwards op : 3 words$word))
((concat_vec imm5_4_1
- ((concat_vec imm5_0
- (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)
- : 8 words$word))
+ ((concat_vec imm5_0 (0b1100011w : 7 words$word) : 8 words$word))
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18548,150 +23214,136 @@ val _ = Define `
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
((concat_vec ((encdec_iop_forwards op : 3 words$word))
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b000000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b000000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b010000w : 6 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0010011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 26 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_ADD)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLT)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLTU)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_AND)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_OR)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b110w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_XOR)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SLL)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SRL)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SUB)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| RTYPE ((rs2, rs1, rd, RISCV_SRA)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18702,8 +23354,7 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((bool_bits_forwards is_unsigned : 1 words$word))
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0000011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18717,11 +23368,9 @@ val _ = Define `
sail2_state_monad$returnS ((concat_vec imm7
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec imm5
- (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec imm5 (0b0100011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -18732,21 +23381,19 @@ val _ = Define `
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
sail2_state_monad$returnS ((concat_vec imm
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18754,12 +23401,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18767,12 +23413,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18780,12 +23425,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18793,12 +23437,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18806,12 +23449,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18819,12 +23461,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18832,12 +23473,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18845,12 +23485,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18858,12 +23497,11 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -18871,25 +23509,23 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
((concat_vec shamt
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec rd (0b0011011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| FENCE ((pred, succ)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0] : 4 words$word)
+ sail2_state_monad$returnS ((concat_vec (0x0w : 4 words$word)
((concat_vec pred
((concat_vec succ
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18897,13 +23533,12 @@ val _ = Define `
: 28 words$word))
: 32 words$word))
| FENCE_TSO ((pred, succ)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0;B0] : 4 words$word)
+ sail2_state_monad$returnS ((concat_vec (0x8w : 4 words$word)
((concat_vec pred
((concat_vec succ
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
@@ -18911,93 +23546,80 @@ val _ = Define `
: 28 words$word))
: 32 words$word))
| FENCEI (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B0;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x000w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b0001111w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| ECALL (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x000w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| MRET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1;B1;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0011000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| SRET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0001000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| EBREAK (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x001w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| WFI (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1] : 12 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ sail2_state_monad$returnS ((concat_vec (0x105w : 12 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| SFENCE_VMA ((rs1, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0001001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| LOADRES ((aq, rl, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
+ if ((amo_width_valid size1)) then
+ sail2_state_monad$returnS ((concat_vec (0b00010w : 5 words$word)
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -19007,17 +23629,15 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| STORECON ((aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)
+ if ((amo_width_valid size1)) then
+ sail2_state_monad$returnS ((concat_vec (0b00011w : 5 words$word)
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -19027,17 +23647,15 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| AMO ((op, aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then
+ if ((amo_width_valid size1)) then
sail2_state_monad$returnS ((concat_vec ((encdec_amoop_forwards op : 5 words$word))
((concat_vec ((bool_bits_forwards aq : 1 words$word))
((concat_vec ((bool_bits_forwards rl : 1 words$word))
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec ((size_bits_forwards size1 : 2 words$word))
- ((concat_vec rd
- (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0101111w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
@@ -19047,38 +23665,35 @@ val _ = Define `
: 32 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| MUL ((rs2, rs1, rd, high, signed1, signed2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
((concat_vec
((encdec_mul_op_forwards (high, signed1, signed2) : 3 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| DIV0 ((rs2, rs1, rd, s)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
+ ((concat_vec (0b10w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
| REM ((rs2, rs1, rd, s)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0110011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -19086,12 +23701,11 @@ val _ = Define `
: 32 words$word))
| MULW ((rs2, rs1, rd)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
@@ -19099,13 +23713,12 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| DIVW ((rs2, rs1, rd, s)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
+ ((concat_vec (0b10w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -19114,13 +23727,12 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| REMW ((rs2, rs1, rd, s)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
((concat_vec rs2
((concat_vec rs1
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec ((bool_not_bits_forwards s : 1 words$word))
- ((concat_vec rd (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b0111011w : 7 words$word) : 12 words$word))
: 13 words$word))
: 15 words$word))
: 20 words$word))
@@ -19132,1241 +23744,6257 @@ val _ = Define `
((concat_vec rs1
((concat_vec ((bool_bits_forwards is_imm : 1 words$word))
((concat_vec ((encdec_csrop_forwards op : 2 words$word))
- ((concat_vec rd (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
- : 12 words$word))
+ ((concat_vec rd (0b1110011w : 7 words$word) : 12 words$word))
: 14 words$word))
: 15 words$word))
: 20 words$word))
: 32 words$word))
| URET (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b1110011w : 7 words$word)
: 12 words$word))
: 15 words$word))
: 20 words$word))
: 25 words$word))
: 32 words$word))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))))
+ then
+ sail2_state_monad$returnS ((concat_vec fm
+ ((concat_vec pred
+ ((concat_vec succ
+ ((concat_vec rs
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b0001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 24 words$word))
+ : 28 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b0001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | LOAD_FP ((imm, rs1, rd, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__48 : bool) .
+ if w__48 then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b0000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | LOAD_FP ((imm, rs1, rd, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__51 : bool) .
+ if w__51 then
+ sail2_state_monad$returnS ((concat_vec imm
+ ((concat_vec rs1
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec rd (0b0000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | STORE_FP ((v__7, rs2, rs1, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__54 : bool) .
+ if w__54 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__7 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec imm7
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec imm5 (0b0100111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | STORE_FP ((v__8, rs2, rs1, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__57 : bool) .
+ if w__57 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__8 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__8 (( 11 : int):ii) (( 5 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__8 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec imm7
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec imm5 (0b0100111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__60 : bool) .
+ if w__60 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__63 : bool) .
+ if w__63 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__66 : bool) .
+ if w__66 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__69 : bool) .
+ if w__69 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__72 : bool) .
+ if w__72 then
+ sail2_state_monad$returnS ((concat_vec (0b0000000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__75 : bool) .
+ if w__75 then
+ sail2_state_monad$returnS ((concat_vec (0b0000100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FMUL_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__78 : bool) .
+ if w__78 then
+ sail2_state_monad$returnS ((concat_vec (0b0001000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FDIV_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__81 : bool) .
+ if w__81 then
+ sail2_state_monad$returnS ((concat_vec (0b0001100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__84 : bool) .
+ if w__84 then
+ sail2_state_monad$returnS ((concat_vec (0b0101100w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__87 : bool) .
+ if w__87 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__90 : bool) .
+ if w__90 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__93 : bool) .
+ if w__93 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__96 : bool) .
+ if w__96 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__99 : bool) .
+ if w__99 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__102 : bool) .
+ if w__102 then
+ sail2_state_monad$returnS ((concat_vec (0b1100000w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__105 : bool) .
+ if w__105 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__108 : bool) .
+ if w__108 then
+ sail2_state_monad$returnS ((concat_vec (0b1101000w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__111 : bool) .
+ if w__111 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__114 : bool) .
+ if w__114 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__117 : bool) .
+ if w__117 then
+ sail2_state_monad$returnS ((concat_vec (0b0010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__120 : bool) .
+ if w__120 then
+ sail2_state_monad$returnS ((concat_vec (0b0010100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__123 : bool) .
+ if w__123 then
+ sail2_state_monad$returnS ((concat_vec (0b0010100w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__126 : bool) .
+ if w__126 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__129 : bool) .
+ if w__129 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__132 : bool) .
+ if w__132 then
+ sail2_state_monad$returnS ((concat_vec (0b1010000w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__135 : bool) .
+ if w__135 then
+ sail2_state_monad$returnS ((concat_vec (0b1110000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__138 : bool) .
+ if w__138 then
+ sail2_state_monad$returnS ((concat_vec (0b1110000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__141 : bool) .
+ if w__141 then
+ sail2_state_monad$returnS ((concat_vec (0b1111000w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FMADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__144 : bool) .
+ if w__144 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FMSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__147 : bool) .
+ if w__147 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1000111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FNMSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__150 : bool) .
+ if w__150 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FNMADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__153 : bool) .
+ if w__153 then
+ sail2_state_monad$returnS ((concat_vec rs3
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1001111w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 27 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__156 : bool) .
+ if w__156 then
+ sail2_state_monad$returnS ((concat_vec (0b0000001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__159 : bool) .
+ if w__159 then
+ sail2_state_monad$returnS ((concat_vec (0b0000101w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FMUL_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__162 : bool) .
+ if w__162 then
+ sail2_state_monad$returnS ((concat_vec (0b0001001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FDIV_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__165 : bool) .
+ if w__165 then
+ sail2_state_monad$returnS ((concat_vec (0b0001101w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FSQRT_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__168 : bool) .
+ if w__168 then
+ sail2_state_monad$returnS ((concat_vec (0b0101101w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_W_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__171 : bool) .
+ if w__171 then
+ sail2_state_monad$returnS ((concat_vec (0b1100001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_WU_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__174 : bool) .
+ if w__174 then
+ sail2_state_monad$returnS ((concat_vec (0b1100001w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_W)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__177 : bool) .
+ if w__177 then
+ sail2_state_monad$returnS ((concat_vec (0b1101001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_WU)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__180 : bool) .
+ if w__180 then
+ sail2_state_monad$returnS ((concat_vec (0b1101001w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_S_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__183 : bool) .
+ if w__183 then
+ sail2_state_monad$returnS ((concat_vec (0b0100000w : 7 words$word)
+ ((concat_vec (0b00001w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_S)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__186 : bool) .
+ if w__186 then
+ sail2_state_monad$returnS ((concat_vec (0b0100001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_L_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__189 : bool) .
+ if w__189 then
+ sail2_state_monad$returnS ((concat_vec (0b1100001w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_LU_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__192 : bool) .
+ if w__192 then
+ sail2_state_monad$returnS ((concat_vec (0b1100001w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_L)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__195 : bool) .
+ if w__195 then
+ sail2_state_monad$returnS ((concat_vec (0b1101001w : 7 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_LU)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__198 : bool) .
+ if w__198 then
+ sail2_state_monad$returnS ((concat_vec (0b1101001w : 7 words$word)
+ ((concat_vec (0b00011w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec ((encdec_rounding_mode_forwards rm : 3 words$word))
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJ_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__201 : bool) .
+ if w__201 then
+ sail2_state_monad$returnS ((concat_vec (0b0010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJN_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__204 : bool) .
+ if w__204 then
+ sail2_state_monad$returnS ((concat_vec (0b0010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJX_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__207 : bool) .
+ if w__207 then
+ sail2_state_monad$returnS ((concat_vec (0b0010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMIN_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__210 : bool) .
+ if w__210 then
+ sail2_state_monad$returnS ((concat_vec (0b0010101w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMAX_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__213 : bool) .
+ if w__213 then
+ sail2_state_monad$returnS ((concat_vec (0b0010101w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FEQ_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__216 : bool) .
+ if w__216 then
+ sail2_state_monad$returnS ((concat_vec (0b1010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLT_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__219 : bool) .
+ if w__219 then
+ sail2_state_monad$returnS ((concat_vec (0b1010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLE_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__222 : bool) .
+ if w__222 then
+ sail2_state_monad$returnS ((concat_vec (0b1010001w : 7 words$word)
+ ((concat_vec rs2
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_D ((rs1, rd, FCLASS_D)) => sail2_state_monad$bindS
+ (haveDExt () ) (\ (w__225 : bool) .
+ if w__225 then
+ sail2_state_monad$returnS ((concat_vec (0b1110001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_D ((rs1, rd, FMV_X_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__228 : bool) .
+ if w__228 then
+ sail2_state_monad$returnS ((concat_vec (0b1110001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | F_UN_TYPE_D ((rs1, rd, FMV_D_X)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__231 : bool) .
+ if w__231 then
+ sail2_state_monad$returnS ((concat_vec (0b1111001w : 7 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs1
+ ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec rd (0b1010011w : 7 words$word) : 12 words$word))
+ : 15 words$word))
+ : 20 words$word))
+ : 25 words$word))
+ : 32 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
| ILLEGAL (s) => sail2_state_monad$returnS s
| _ => sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
)))`;
-(*val encdec_backwards : mword ty32 -> M ast*)
-
val _ = Define `
((encdec_backwards:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let v__7 = arg_ in
- let (mappingpatterns_23_0 : 7 words$word) = ((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_uop_backwards_matches mappingpatterns_23_0)))
- (if ((encdec_uop_backwards_matches mappingpatterns_23_0)) then sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_23_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__1 : bool) .
- if w__1 then
- let (imm : 20 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 20 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
- let (mappingpatterns_23_0 : 7 words$word) = ((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_23_0) (\ op . sail2_state_monad$returnS (UTYPE (imm, rd, op)))
- else if (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)))) then
- let (imm_19 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm_8 : 1 bits) = ((subrange_vec_dec v__7 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
- let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
- let (imm_19 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (imm_18_13 : 6 bits) = ((subrange_vec_dec v__7 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
- let (imm_12_9 : 4 bits) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 21 : int):ii) : 4 words$word)) in
+ (let v__9 = arg_ in
+ if (let (mappingpatterns_59_0 : 7 words$word) = ((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in
+ encdec_uop_backwards_matches mappingpatterns_59_0) then
+ let (imm : 20 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 20 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 12 : int):ii) : 20 words$word)) in
+ let (mappingpatterns_59_0 : 7 words$word) = ((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
+ (encdec_uop_backwards mappingpatterns_59_0) (\ op . sail2_state_monad$returnS (UTYPE (imm, rd, op)))
+ else if (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1101111w : 7 words$word))))
+ then
+ let (imm_19 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm_8 : 1 bits) = ((subrange_vec_dec v__9 (( 20 : int):ii) (( 20 : int):ii) : 1 words$word)) in
+ let (imm_7_0 : 8 bits) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 12 : int):ii) : 8 words$word)) in
+ let (imm_19 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (imm_18_13 : 6 bits) = ((subrange_vec_dec v__9 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
+ let (imm_12_9 : 4 bits) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 21 : int):ii) : 4 words$word)) in
sail2_state_monad$returnS (RISCV_JAL ((concat_vec imm_19
((concat_vec imm_7_0
((concat_vec imm_8
((concat_vec imm_18_13
- ((concat_vec imm_12_9 (vec_of_bits [B0] : 1 words$word)
- : 5 words$word))
+ ((concat_vec imm_12_9 (0b0w : 1 words$word) : 5 words$word))
: 11 words$word))
: 12 words$word))
: 20 words$word))
: 21 words$word),
rd))
- else if ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word))))))) then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ else if ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100111w : 7 words$word)))))))
+ then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
sail2_state_monad$returnS (RISCV_JALR (imm, rs1, rd))
+ else if ((((let (mappingpatterns_60_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_bop_backwards_matches mappingpatterns_60_0) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100011w : 7 words$word)))))))
+ then
+ let (imm7_6 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7_6 : 1 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
+ let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__9 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
+ let (imm5_4_1 : 4 bits) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 8 : int):ii) : 4 words$word)) in
+ let (imm5_0 : 1 bits) = ((subrange_vec_dec v__9 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_60_0 : 3 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_bop_backwards mappingpatterns_60_0) (\ op .
+ sail2_state_monad$returnS (BTYPE ((concat_vec imm7_6
+ ((concat_vec imm5_0
+ ((concat_vec imm7_5_0
+ ((concat_vec imm5_4_1 (0b0w : 1 words$word) : 5 words$word))
+ : 11 words$word))
+ : 12 words$word))
+ : 13 words$word),
+ rs2,
+ rs1,
+ op)))
+ else if ((((let (mappingpatterns_61_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_iop_backwards_matches mappingpatterns_61_0) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word)))))))
+ then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_61_0 : 3 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_iop_backwards mappingpatterns_61_0) (\ op . sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op)))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SLLI))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRLI))
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b010000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ let (shamt : 6 words$word) = ((subrange_vec_dec v__9 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRAI))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_ADD))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLT))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLTU))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_AND))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_OR))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_XOR))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLL))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRL))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SUB))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRA))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_24_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_bop_backwards_matches mappingpatterns_24_0)))
- (if ((encdec_bop_backwards_matches mappingpatterns_24_0)) then sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_24_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__4 : bool) .
- if w__4 then
- let (imm7_6 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (imm7_6 : 1 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 31 : int):ii) : 1 words$word)) in
- let (imm7_5_0 : 6 bits) = ((subrange_vec_dec v__7 (( 30 : int):ii) (( 25 : int):ii) : 6 words$word)) in
- let (imm5_4_1 : 4 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 8 : int):ii) : 4 words$word)) in
- let (imm5_0 : 1 bits) = ((subrange_vec_dec v__7 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (mappingpatterns_24_0 : 3 words$word) = ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_24_0) (\ op .
- sail2_state_monad$returnS (BTYPE ((concat_vec imm7_6
- ((concat_vec imm5_0
- ((concat_vec imm7_5_0
- ((concat_vec imm5_4_1 (vec_of_bits [B0] : 1 words$word) : 5 words$word))
- : 11 words$word))
- : 12 words$word))
- : 13 words$word),
- rs2,
- rs1,
- op)))
+ (let (mappingpatterns_63_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_62_0 : 1 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_63_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_63_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_62_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_62_0) (\ is_unsigned .
+ sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii))))))))))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000011w : 7 words$word)))))) (\ (w__2 :
+ bool) .
+ if w__2 then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_63_0 : 2 words$word) = ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_62_0 : 1 words$word) = ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_63_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_62_0) (\ is_unsigned .
+ sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, F, F))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_25_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_iop_backwards_matches mappingpatterns_25_0)))
- (if ((encdec_iop_backwards_matches mappingpatterns_25_0)) then sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_25_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__7 : bool) .
- if w__7 then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_25_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_25_0) (\ op . sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op)))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SLLI))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRLI))
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 6 words$word) = ((subrange_vec_dec v__7 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, RISCV_SRAI))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_ADD))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLT))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLTU))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_AND))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_OR))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_XOR))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SLL))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRL))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SUB))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, RISCV_SRA))
+ (let (mappingpatterns_64_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_64_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_64_0) (\ size1 .
+ sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100011w : 7 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_64_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_64_0) (\ size1 .
+ sail2_state_monad$returnS (STORE ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, size1, F, F)))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word)))))))))) then
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SLLI))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRLI))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRAI))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_ADDW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SUBW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SLLW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRLW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRAW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SLLIW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRLIW))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ let (shamt : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRAIW))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__9 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
+ let (succ : 4 words$word) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (pred : 4 words$word) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE (pred, succ))
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__9 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
+ let (succ : 4 words$word) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (pred : 4 words$word) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE_TSO (pred, succ))
+ else if (((v__9 = (0x0000100Fw : 32 words$word)))) then sail2_state_monad$returnS (FENCEI () )
+ else if (((v__9 = (0x00000073w : 32 words$word)))) then sail2_state_monad$returnS (ECALL () )
+ else if (((v__9 = (0x30200073w : 32 words$word)))) then sail2_state_monad$returnS (MRET () )
+ else if (((v__9 = (0x10200073w : 32 words$word)))) then sail2_state_monad$returnS (SRET () )
+ else if (((v__9 = (0x00100073w : 32 words$word)))) then sail2_state_monad$returnS (EBREAK () )
+ else if (((v__9 = (0x10500073w : 32 words$word)))) then sail2_state_monad$returnS (WFI () )
+ else if ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (0b000000001110011w : 15 words$word))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_27_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_26_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_27_0)))
- (if ((size_bits_backwards_matches mappingpatterns_27_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_27_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_26_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_26_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_26_0) (\ is_unsigned .
- sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii))))))))))
- else sail2_state_monad$returnS F)) (\ (w__9 : bool) .
- sail2_state_monad$returnS w__9))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__12 : bool) .
- if w__12 then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_27_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_26_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_27_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_26_0) (\ is_unsigned .
- sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, F, F))))
+ (let (mappingpatterns_67_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_66_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_65_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_67_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_67_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_66_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_66_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_65_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_65_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))))))))) (\ (w__8 : bool) .
+ if w__8 then
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_67_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_66_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_65_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_67_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_66_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_65_0) (\ aq .
+ sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd)))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_28_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_28_0)))
- (if ((size_bits_backwards_matches mappingpatterns_28_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_28_0) (\ size1 .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__15 :
- bool) .
- if w__15 then
- let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (imm7 : 7 bits) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
- let (imm5 : 5 bits) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_28_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_28_0) (\ size1 .
- sail2_state_monad$returnS (STORE ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, size1, F, F)))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)))))))))) then
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm : 12 words$word) = ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SLLI))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRLI))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, RISCV_SRAI))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_ADDW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SUBW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SLLW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRLW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, RISCV_SRAW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SLLIW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRLIW))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- let (shamt : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, RISCV_SRAIW))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__7 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- let (succ : 4 words$word) = ((subrange_vec_dec v__7 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
- let (pred : 4 words$word) = ((subrange_vec_dec v__7 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS (FENCE (pred, succ))
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__7 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- let (succ : 4 words$word) = ((subrange_vec_dec v__7 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
- let (pred : 4 words$word) = ((subrange_vec_dec v__7 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS (FENCE_TSO (pred, succ))
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;
- B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (FENCEI () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (ECALL () )
- else if (((v__7 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (MRET () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (SRET () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (EBREAK () )
- else if (((v__7 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS (WFI () )
- else if ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__7 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1] : 15 words$word)))))))
- then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
+ (let (mappingpatterns_70_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_69_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_68_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_70_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_70_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_69_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_69_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_68_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_68_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00011w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word)))))))))))) (\ (w__12 : bool) .
+ if w__12 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_70_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_69_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_68_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_70_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_69_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_68_0) (\ aq .
+ sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd)))))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_31_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_30_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_29_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_31_0)))
- (if ((size_bits_backwards_matches mappingpatterns_31_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_31_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_30_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_30_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_30_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_29_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_29_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_29_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__17 : bool) .
- sail2_state_monad$returnS w__17))
- else sail2_state_monad$returnS F)) (\ (w__19 : bool) .
- sail2_state_monad$returnS w__19))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))))))))) (\ (w__22 :
- bool) .
- if w__22 then
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_31_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_30_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_29_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_31_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_30_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_29_0) (\ aq .
- sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd)))))
+ (let (mappingpatterns_71_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_74_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_73_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_72_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_71_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_74_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_74_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_73_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_73_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_72_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_72_0) (\ aq .
+ if ((encdec_amoop_backwards_matches mappingpatterns_71_0)) then sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_71_0) (\ op .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))) (\ (w__17 : bool) .
+ if w__17 then
+ let (mappingpatterns_71_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_74_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_73_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_72_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_71_0 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_74_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_73_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_72_0) (\ aq . sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_71_0) (\ op .
+ sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, size1, rd))))))
+ else if ((((let (mappingpatterns_75_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_mul_op_backwards_matches mappingpatterns_75_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_75_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_mul_op_backwards mappingpatterns_75_0) (\ varstup . let (high, signed1, signed2) = varstup in
+ sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2)))
+ else if ((((let (mappingpatterns_76_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_76_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_76_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_76_0) (\ s .
+ sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s)))
+ else if ((((let (mappingpatterns_77_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_77_0) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_77_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_77_0) (\ s .
+ sail2_state_monad$returnS (REM (rs2, rs1, rd, s)))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (MULW (rs2, rs1, rd))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_34_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_33_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_32_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_34_0)))
- (if ((size_bits_backwards_matches mappingpatterns_34_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_34_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_33_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_33_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_33_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_32_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_32_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_32_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__24 : bool) .
- sail2_state_monad$returnS w__24))
- else sail2_state_monad$returnS F)) (\ (w__26 : bool) .
- sail2_state_monad$returnS w__26))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)))))))))))) (\ (w__29 :
- bool) .
- if w__29 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_34_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_33_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_32_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_34_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_33_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_32_0) (\ aq .
- sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd)))))
+ (let (mappingpatterns_78_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_78_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_78_0) (\ s .
+ sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__19 : bool) .
+ if w__19 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_78_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_78_0) (\ s .
+ sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_38_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_37_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_36_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_38_0)))
- (if ((size_bits_backwards_matches mappingpatterns_38_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_38_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_37_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_37_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_37_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_36_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_36_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_36_0) (\ aq . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_amoop_backwards_matches mappingpatterns_35_0)))
- (if ((encdec_amoop_backwards_matches mappingpatterns_35_0)) then sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_35_0) (\ op .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__31 : bool) .
- sail2_state_monad$returnS w__31))
- else sail2_state_monad$returnS F)) (\ (w__33 : bool) .
- sail2_state_monad$returnS w__33))
- else sail2_state_monad$returnS F)) (\ (w__35 : bool) .
- sail2_state_monad$returnS w__35))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))) (\ (w__38 :
- bool) .
- if w__38 then
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_38_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_37_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_36_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_35_0 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_38_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_37_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_36_0) (\ aq . sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_35_0) (\ op .
- sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, size1, rd))))))
+ (let (mappingpatterns_79_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_79_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_79_0) (\ s .
+ sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__21 : bool) .
+ if w__21 then
+ let (rs2 : 5 words$word) = ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_79_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_79_0) (\ s .
+ sail2_state_monad$returnS (REMW (rs2, rs1, rd, s)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_39_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_mul_op_backwards_matches mappingpatterns_39_0)))
- (if ((encdec_mul_op_backwards_matches mappingpatterns_39_0)) then sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_39_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__41 :
- bool) .
- if w__41 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_39_0 : 3 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_39_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2)))
+ (let (mappingpatterns_81_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_80_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((encdec_csrop_backwards_matches mappingpatterns_81_0)) then sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_81_0) (\ op .
+ sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_80_0)))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1110011w : 7 words$word)))))) (\ (w__23 : bool) .
+ if w__23 then
+ let (csr : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (csr : 12 words$word) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (mappingpatterns_81_0 : 2 words$word) =
+ ((subrange_vec_dec v__9 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_80_0 : 1 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_81_0) (\ op . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_80_0) (\ is_imm .
+ sail2_state_monad$returnS (CSR (csr, rs1, rd, is_imm, op))))
+ else if (((v__9 = (0x00200073w : 32 words$word)))) then sail2_state_monad$returnS (URET () )
+ else if ((((let (fm : 4 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (fm : 4 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ let (fm : 4 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (succ : 4 bits) = ((subrange_vec_dec v__9 (( 23 : int):ii) (( 20 : int):ii) : 4 words$word)) in
+ let (rs : regidx) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (pred : 4 bits) = ((subrange_vec_dec v__9 (( 27 : int):ii) (( 24 : int):ii) : 4 words$word)) in
+ let (fm : 4 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS (FENCE_RESERVED (fm, pred, succ, rs, rd))
+ else if ((((let (imm : 12 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))) /\ ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ let (imm : 12 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) = ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (FENCEI_RESERVED (imm, rs, rd))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_40_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_40_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_40_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_40_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__44 :
- bool) .
- if w__44 then
- let (rs2 : 5 words$word) = ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) = ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_40_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_40_0) (\ s .
- sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s)))
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__25 : bool) .
+ if w__25 then
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs1 : 5 words$word) = ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, WORD))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_41_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_41_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_41_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_41_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__47 :
- bool) .
- if w__47 then
- let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
- let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_41_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_41_0) (\ s .
- sail2_state_monad$returnS (REM (rs2, rs1, rd, s)))
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))))
- then
- let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__27 : bool) .
+ if w__27 then
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) = ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS (MULW (rs2, rs1, rd))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) = ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, DOUBLE))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_42_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_42_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_42_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_42_0) (\ s .
- sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__50 :
- bool) .
- if w__50 then
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_42_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_42_0) (\ s .
- sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s)))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (STORE_FP ((concat_vec imm7 imm5 : 12 words$word), rs2, rs1, WORD))
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_43_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_43_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_43_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_43_0) (\ s .
- sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__7 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__7 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__53 :
- bool) .
- if w__53 then
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__31 : bool) .
+ if w__31 then
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
let (rs2 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
- let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (mappingpatterns_43_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_43_0) (\ s .
- sail2_state_monad$returnS (REMW (rs2, rs1, rd, s)))
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (imm7 : 7 bits) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) in
+ let (imm5 : 5 bits) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (STORE_FP ((concat_vec imm7 imm5 : 12 words$word),
+ rs2,
+ rs1,
+ DOUBLE))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_45_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_44_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_csrop_backwards_matches mappingpatterns_45_0)))
- (if ((encdec_csrop_backwards_matches mappingpatterns_45_0)) then sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_45_0) (\ op . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_44_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_44_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_44_0) (\ is_imm .
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__55 : bool) .
- sail2_state_monad$returnS w__55))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__7 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__58 :
- bool) .
- if w__58 then
- let (csr : 12 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ (let (mappingpatterns_82_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_82_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_82_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
let (rs1 : 5 words$word) =
- ((subrange_vec_dec v__7 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
let (rd : 5 words$word) =
- ((subrange_vec_dec v__7 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (csr : 12 words$word) =
- ((subrange_vec_dec v__7 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
- let (mappingpatterns_45_0 : 2 words$word) =
- ((subrange_vec_dec v__7 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_44_0 : 1 words$word) =
- ((subrange_vec_dec v__7 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_45_0) (\ op . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_44_0) (\ is_imm .
- sail2_state_monad$returnS (CSR (csr, rs1, rd, is_imm, op))))
- else
- sail2_state_monad$returnS (if (((v__7 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;
- B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;
- B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- URET ()
- else ILLEGAL v__7)))))))))))))))))`;
-
-
-(*val encdec_forwards_matches : ast -> bool*)
-
-val _ = Define `
- ((encdec_forwards_matches:ast -> bool) arg_=
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_82_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_82_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FMADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_83_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_83_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_83_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__37 : bool) .
+ if w__37 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_83_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_83_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FMSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_84_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_84_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_84_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__40 :
+ bool) .
+ if w__40 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_84_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_84_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FNMSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_85_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_85_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_85_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__43 :
+ bool) .
+ if w__43 then
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs3 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_85_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_85_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, FNMADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_86_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_86_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_86_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__46 :
+ bool) .
+ if w__46 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_86_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_86_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FADD_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_87_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_87_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_87_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000100w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__49 :
+ bool) .
+ if w__49 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_87_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_87_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FSUB_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_88_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_88_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_88_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001000w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__52 :
+ bool) .
+ if w__52 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_88_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_88_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FMUL_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_89_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_89_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_89_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001100w : 7 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__55 :
+ bool) .
+ if w__55 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_89_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_89_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, FDIV_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_90_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_90_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_90_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x580w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__58 :
+ bool) .
+ if w__58 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_90_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_90_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_91_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_91_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_91_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC00w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__61 :
+ bool) .
+ if w__61 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_91_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_91_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_92_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_92_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_92_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC01w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__64 :
+ bool) .
+ if w__64 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_92_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_92_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_93_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_93_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_93_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD00w : 12 words$word)))) /\ (((((subrange_vec_dec v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__67 :
+ bool) .
+ if w__67 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_93_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_93_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_94_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_94_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_94_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD01w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__70 :
+ bool) .
+ if w__70 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_94_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_94_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_WU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_95_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_95_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_95_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC02w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__73 :
+ bool) .
+ if w__73 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_95_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_95_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_L_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_96_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_96_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_96_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC03w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__76 :
+ bool) .
+ if w__76 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_96_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_96_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_LU_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_97_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_97_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_97_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__9
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD02w : 12 words$word)))) /\ (((((subrange_vec_dec v__9
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__79 :
+ bool) .
+ if w__79 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_97_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_97_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_L)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_98_0 :
+ 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_98_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_98_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD03w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__82 :
+ bool) .
+ if w__82 then
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_98_0 : 3 words$word) =
+ ((subrange_vec_dec v__9 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_98_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1,
+ rm,
+ rd,
+ FCVT_S_LU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__84 :
+ bool) .
+ if w__84 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJ_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__86 :
+ bool) .
+ if w__86 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJN_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__88 :
+ bool) .
+ if w__88 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FSGNJX_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__90 :
+ bool) .
+ if w__90 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FMIN_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__92 :
+ bool) .
+ if w__92 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FMAX_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__94 :
+ bool) .
+ if w__94 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 24 : int):ii) (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 19 : int):ii) (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec v__9
+ (( 11 : int):ii) (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FEQ_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__96 :
+ bool) .
+ if w__96 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FLT_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__98 :
+ bool) .
+ if w__98 then
+ let (rs2 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2,
+ rs1,
+ rd,
+ FLE_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__100 :
+ bool) .
+ if w__100 then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd : 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1,
+ rd,
+ FCLASS_S))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__102 :
+ bool) .
+ if w__102 then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9 (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1,
+ rd,
+ FMV_X_W))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__104 :
+ bool) .
+ if w__104 then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1,
+ rd,
+ FMV_W_X))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_99_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_99_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_99_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__107 :
+ bool) .
+ if w__107 then
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_99_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_99_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_D (rs3,
+ rs2,
+ rs1,
+ rm,
+ rd,
+ FMADD_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_100_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_100_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_100_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__110 :
+ bool) .
+ if w__110
+ then
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_100_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_100_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_D (rs3,
+ rs2,
+ rs1,
+ rm,
+ rd,
+ FMSUB_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_101_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_101_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_101_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__113 :
+ bool) .
+ if w__113
+ then
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_101_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_101_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_D (rs3,
+ rs2,
+ rs1,
+ rm,
+ rd,
+ FNMSUB_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_102_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_102_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_102_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__116 :
+ bool) .
+ if w__116
+ then
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs3 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 27 : int):ii)
+ : 5 words$word)) in
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_102_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_102_0) (\ rm .
+ sail2_state_monad$returnS (F_MADD_TYPE_D (rs3,
+ rs2,
+ rs1,
+ rm,
+ rd,
+ FNMADD_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_103_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_103_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_103_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__119 :
+ bool) .
+ if w__119
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_103_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_103_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_D (rs2,
+ rs1,
+ rm,
+ rd,
+ FADD_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_104_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_104_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_104_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0000101w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__122 :
+ bool) .
+ if w__122
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_104_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_104_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_D (rs2,
+ rs1,
+ rm,
+ rd,
+ FSUB_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_105_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_105_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_105_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__125 :
+ bool) .
+ if w__125
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_105_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_105_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_D (rs2,
+ rs1,
+ rm,
+ rd,
+ FMUL_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_106_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_106_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_106_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001101w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__128 :
+ bool) .
+ if
+ w__128
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_106_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_106_0) (\ rm .
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_D (rs2,
+ rs1,
+ rm,
+ rd,
+ FDIV_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_107_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_107_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_107_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x5A0w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__131 :
+ bool) .
+ if
+ w__131
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_107_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_107_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FSQRT_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_108_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_108_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_108_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC20w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__134 :
+ bool) .
+ if
+ w__134
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_108_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_108_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_W_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_109_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_109_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_109_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC21w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__137 :
+ bool) .
+ if
+ w__137
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_109_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_109_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_WU_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_110_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_110_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_110_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD20w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__140 :
+ bool) .
+ if
+ w__140
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_110_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_110_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_D_W)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_111_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_111_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_111_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD21w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__143 :
+ bool) .
+ if
+ w__143
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_111_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_111_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_D_WU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_112_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_112_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_112_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x401w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__146 :
+ bool) .
+ if
+ w__146
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_112_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_112_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_S_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_113_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_113_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_113_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x420w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__149 :
+ bool) .
+ if
+ w__149
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_113_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_113_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_D_S)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_114_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_114_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_114_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC22w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__152 :
+ bool) .
+ if
+ w__152
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_114_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_114_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_L_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_115_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_115_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_115_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC23w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__155 :
+ bool) .
+ if
+ w__155
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_115_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_115_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_LU_D)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_116_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_116_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_116_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD22w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__158 :
+ bool) .
+ if
+ w__158
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_116_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_116_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_D_L)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_117_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_117_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_117_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD23w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__161 :
+ bool) .
+ if
+ w__161
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ let (mappingpatterns_117_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_117_0) (\ rm .
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1,
+ rm,
+ rd,
+ FCVT_D_LU)))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__163 :
+ bool) .
+ if
+ w__163
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FSGNJ_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__165 :
+ bool) .
+ if
+ w__165
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FSGNJN_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__167 :
+ bool) .
+ if
+ w__167
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FSGNJX_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010101w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__169 :
+ bool) .
+ if
+ w__169
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FMIN_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010101w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__171 :
+ bool) .
+ if
+ w__171
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FMAX_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__173 :
+ bool) .
+ if
+ w__173
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FEQ_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__175 :
+ bool) .
+ if
+ w__175
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FLT_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__177 :
+ bool) .
+ if
+ w__177
+ then
+ let (rs2 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 24 : int):ii)
+ (( 20 : int):ii)
+ : 5 words$word)) in
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2,
+ rs1,
+ rd,
+ FLE_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveDExt
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__179 :
+ bool) .
+ if
+ w__179
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_D (rs1,
+ rd,
+ FCLASS_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__181 :
+ bool) .
+ if
+ w__181
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ sail2_state_monad$returnS (F_UN_TYPE_D (rs1,
+ rd,
+ FMV_X_D))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__9
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__9
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__9
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__183 :
+ bool) .
+ sail2_state_monad$returnS (if
+ w__183
+ then
+ let (rs1 :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 19 : int):ii)
+ (( 15 : int):ii)
+ : 5 words$word)) in
+ let (rd :
+ 5 words$word) =
+ ((subrange_vec_dec
+ v__9
+ (( 11 : int):ii)
+ (( 7 : int):ii)
+ : 5 words$word)) in
+ F_UN_TYPE_D (rs1,
+ rd,
+ FMV_D_X)
+ else
+ ILLEGAL v__9)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))`;
+
+
+val _ = Define `
+ ((encdec_forwards_matches:ast ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
- UTYPE ((imm, rd, op)) => T
- | RISCV_JAL ((v__220, rd)) =>
- if (((((subrange_vec_dec v__220 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
- T
- else F
- | RISCV_JALR ((imm, rs1, rd)) => T
- | BTYPE ((v__222, rs2, rs1, op)) =>
- if (((((subrange_vec_dec v__222 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) then
- T
- else F
- | ITYPE ((imm, rs1, rd, op)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) => T
- | SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_ADD)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLT)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLTU)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_AND)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_OR)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_XOR)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SLL)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SRL)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SUB)) => T
- | RTYPE ((rs2, rs1, rd, RISCV_SRA)) => T
+ UTYPE ((imm, rd, op)) => sail2_state_monad$returnS T
+ | RISCV_JAL ((v__462, rd)) =>
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__462 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))))
+ then
+ T
+ else F)
+ | RISCV_JALR ((imm, rs1, rd)) => sail2_state_monad$returnS T
+ | BTYPE ((v__464, rs2, rs1, op)) =>
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__464 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))))
+ then
+ T
+ else F)
+ | ITYPE ((imm, rs1, rd, op)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SLLI)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SRLI)) => sail2_state_monad$returnS T
+ | SHIFTIOP ((shamt, rs1, rd, RISCV_SRAI)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_ADD)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLT)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLTU)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_AND)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_OR)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_XOR)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SLL)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SRL)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SUB)) => sail2_state_monad$returnS T
+ | RTYPE ((rs2, rs1, rd, RISCV_SRA)) => sail2_state_monad$returnS T
| LOAD ((imm, rs1, rd, is_unsigned, size1, F, F)) =>
- if (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii))))))))) then
- T
- else F
- | STORE ((v__224, rs2, rs1, size1, F, F)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then T else F
- | ADDIW ((imm, rs1, rd)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | FENCE ((pred, succ)) => T
- | FENCE_TSO ((pred, succ)) => T
- | FENCEI (() ) => T
- | ECALL (() ) => T
- | MRET (() ) => T
- | SRET (() ) => T
- | EBREAK (() ) => T
- | WFI (() ) => T
- | SFENCE_VMA ((rs1, rs2)) => T
- | LOADRES ((aq, rl, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then T else F
+ sail2_state_monad$returnS (if (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii)))))))))
+ then
+ T
+ else F)
+ | STORE ((v__466, rs2, rs1, size1, F, F)) =>
+ sail2_state_monad$returnS (if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then T else F)
+ | ADDIW ((imm, rs1, rd)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SLLI)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SRLI)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTW ((shamt, rs1, rd, RISCV_SRAI)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_ADDW)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SUBW)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SLLW)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SRLW)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | RTYPEW ((rs2, rs1, rd, RISCV_SRAW)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SLLIW)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRLIW)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | SHIFTIWOP ((shamt, rs1, rd, RISCV_SRAIW)) =>
+ sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | FENCE ((pred, succ)) => sail2_state_monad$returnS T
+ | FENCE_TSO ((pred, succ)) => sail2_state_monad$returnS T
+ | FENCEI (() ) => sail2_state_monad$returnS T
+ | ECALL (() ) => sail2_state_monad$returnS T
+ | MRET (() ) => sail2_state_monad$returnS T
+ | SRET (() ) => sail2_state_monad$returnS T
+ | EBREAK (() ) => sail2_state_monad$returnS T
+ | WFI (() ) => sail2_state_monad$returnS T
+ | SFENCE_VMA ((rs1, rs2)) => sail2_state_monad$returnS T
+ | LOADRES ((aq, rl, rs1, size1, rd)) => sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
| STORECON ((aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then T else F
+ sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
| AMO ((op, aq, rl, rs2, rs1, size1, rd)) =>
- if ((((word_width_bytes size1)) <= (( 8 : int):ii))) then T else F
- | MUL ((rs2, rs1, rd, high, signed1, signed2)) => T
- | DIV0 ((rs2, rs1, rd, s)) => T
- | REM ((rs2, rs1, rd, s)) => T
- | MULW ((rs2, rs1, rd)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | DIVW ((rs2, rs1, rd, s)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | REMW ((rs2, rs1, rd, s)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | CSR ((csr, rs1, rd, is_imm, op)) => T
- | URET (() ) => T
- | ILLEGAL (s) => T
- | _ => F
+ sail2_state_monad$returnS (if ((amo_width_valid size1)) then T else F)
+ | MUL ((rs2, rs1, rd, high, signed1, signed2)) => sail2_state_monad$returnS T
+ | DIV0 ((rs2, rs1, rd, s)) => sail2_state_monad$returnS T
+ | REM ((rs2, rs1, rd, s)) => sail2_state_monad$returnS T
+ | MULW ((rs2, rs1, rd)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | DIVW ((rs2, rs1, rd, s)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | REMW ((rs2, rs1, rd, s)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | CSR ((csr, rs1, rd, is_imm, op)) => sail2_state_monad$returnS T
+ | URET (() ) => sail2_state_monad$returnS T
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ sail2_state_monad$returnS (if (((((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word)))))))))) then
+ T
+ else F)
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ sail2_state_monad$returnS (if ((((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ T
+ else F)
+ | LOAD_FP ((imm, rs1, rd, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__0 : bool) . sail2_state_monad$returnS (if w__0 then T else F))
+ | LOAD_FP ((imm, rs1, rd, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__1 : bool) . sail2_state_monad$returnS (if w__1 then T else F))
+ | STORE_FP ((v__467, rs2, rs1, WORD)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__2 : bool) . sail2_state_monad$returnS (if w__2 then T else F))
+ | STORE_FP ((v__468, rs2, rs1, DOUBLE)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__3 : bool) . sail2_state_monad$returnS (if w__3 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__4 : bool) . sail2_state_monad$returnS (if w__4 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__5 : bool) . sail2_state_monad$returnS (if w__5 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__6 : bool) . sail2_state_monad$returnS (if w__6 then T else F))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, FNMADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__7 : bool) . sail2_state_monad$returnS (if w__7 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FADD_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__8 : bool) . sail2_state_monad$returnS (if w__8 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FSUB_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__9 : bool) . sail2_state_monad$returnS (if w__9 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FMUL_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__10 : bool) . sail2_state_monad$returnS (if w__10 then T else F))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, FDIV_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__11 : bool) . sail2_state_monad$returnS (if w__11 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__12 : bool) . sail2_state_monad$returnS (if w__12 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__13 : bool) . sail2_state_monad$returnS (if w__13 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__14 : bool) . sail2_state_monad$returnS (if w__14 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__15 : bool) . sail2_state_monad$returnS (if w__15 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__16 : bool) . sail2_state_monad$returnS (if w__16 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__17 : bool) . sail2_state_monad$returnS (if w__17 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__18 : bool) . sail2_state_monad$returnS (if w__18 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__19 : bool) . sail2_state_monad$returnS (if w__19 then T else F))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (is_RV64F () ) (\ (w__20 : bool) . sail2_state_monad$returnS (if w__20 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__21 : bool) . sail2_state_monad$returnS (if w__21 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__22 : bool) . sail2_state_monad$returnS (if w__22 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__23 : bool) . sail2_state_monad$returnS (if w__23 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__24 : bool) . sail2_state_monad$returnS (if w__24 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__25 : bool) . sail2_state_monad$returnS (if w__25 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__26 : bool) . sail2_state_monad$returnS (if w__26 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__27 : bool) . sail2_state_monad$returnS (if w__27 then T else F))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (is_RV32F_or_RV64F () ) (\ (w__28 : bool) . sail2_state_monad$returnS (if w__28 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__29 : bool) . sail2_state_monad$returnS (if w__29 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__30 : bool) . sail2_state_monad$returnS (if w__30 then T else F))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (haveFExt () ) (\ (w__31 : bool) . sail2_state_monad$returnS (if w__31 then T else F))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FMADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__32 : bool) . sail2_state_monad$returnS (if w__32 then T else F))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FMSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__33 : bool) . sail2_state_monad$returnS (if w__33 then T else F))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FNMSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__34 : bool) . sail2_state_monad$returnS (if w__34 then T else F))
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, FNMADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__35 : bool) . sail2_state_monad$returnS (if w__35 then T else F))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FADD_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__36 : bool) . sail2_state_monad$returnS (if w__36 then T else F))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FSUB_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__37 : bool) . sail2_state_monad$returnS (if w__37 then T else F))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FMUL_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__38 : bool) . sail2_state_monad$returnS (if w__38 then T else F))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, FDIV_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__39 : bool) . sail2_state_monad$returnS (if w__39 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FSQRT_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__40 : bool) . sail2_state_monad$returnS (if w__40 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_W_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__41 : bool) . sail2_state_monad$returnS (if w__41 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_WU_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__42 : bool) . sail2_state_monad$returnS (if w__42 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_W)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__43 : bool) . sail2_state_monad$returnS (if w__43 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_WU)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__44 : bool) . sail2_state_monad$returnS (if w__44 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_S_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__45 : bool) . sail2_state_monad$returnS (if w__45 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_S)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__46 : bool) . sail2_state_monad$returnS (if w__46 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_L_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__47 : bool) . sail2_state_monad$returnS (if w__47 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_LU_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__48 : bool) . sail2_state_monad$returnS (if w__48 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_L)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__49 : bool) . sail2_state_monad$returnS (if w__49 then T else F))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_LU)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__50 : bool) . sail2_state_monad$returnS (if w__50 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJ_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__51 : bool) . sail2_state_monad$returnS (if w__51 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJN_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__52 : bool) . sail2_state_monad$returnS (if w__52 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJX_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__53 : bool) . sail2_state_monad$returnS (if w__53 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMIN_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__54 : bool) . sail2_state_monad$returnS (if w__54 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMAX_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__55 : bool) . sail2_state_monad$returnS (if w__55 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FEQ_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__56 : bool) . sail2_state_monad$returnS (if w__56 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLT_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__57 : bool) . sail2_state_monad$returnS (if w__57 then T else F))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLE_D)) => sail2_state_monad$bindS
+ (is_RV32D_or_RV64D () ) (\ (w__58 : bool) . sail2_state_monad$returnS (if w__58 then T else F))
+ | F_UN_TYPE_D ((rs1, rd, FCLASS_D)) => sail2_state_monad$bindS
+ (haveDExt () ) (\ (w__59 : bool) . sail2_state_monad$returnS (if w__59 then T else F))
+ | F_UN_TYPE_D ((rs1, rd, FMV_X_D)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__60 : bool) . sail2_state_monad$returnS (if w__60 then T else F))
+ | F_UN_TYPE_D ((rs1, rd, FMV_D_X)) => sail2_state_monad$bindS
+ (is_RV64D () ) (\ (w__61 : bool) . sail2_state_monad$returnS (if w__61 then T else F))
+ | ILLEGAL (s) => sail2_state_monad$returnS T
+ | _ => sail2_state_monad$returnS F
)))`;
-(*val encdec_backwards_matches : mword ty32 -> M bool*)
-
val _ = Define `
((encdec_backwards_matches:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let v__225 = arg_ in
- let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_uop_backwards_matches mappingpatterns_0_0)))
- (if ((encdec_uop_backwards_matches mappingpatterns_0_0)) then sail2_state_monad$bindS
- (encdec_uop_backwards mappingpatterns_0_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__1 : bool) .
- if w__1 then
- let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
+ (let v__469 = arg_ in
+ if (let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in
+ encdec_uop_backwards_matches mappingpatterns_0_0) then
+ let (mappingpatterns_0_0 : 7 words$word) = ((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) in sail2_state_monad$bindS
(encdec_uop_backwards mappingpatterns_0_0) (\ op . sail2_state_monad$returnS T)
- else if (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B1;B1;B1;B1] : 7 words$word)))) then
+ else if (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1101111w : 7 words$word))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100111w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (mappingpatterns_1_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_bop_backwards_matches mappingpatterns_1_0) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1100011w : 7 words$word))))))) then
+ let (mappingpatterns_1_0 : 3 words$word) = ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_2_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_iop_backwards_matches mappingpatterns_2_0) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))) then
+ let (mappingpatterns_2_0 : 3 words$word) = ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__469 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__469 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b000000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__469 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
+ (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((access_vec_dec shamt (( 5 : int):ii))) = B0))))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (0b010000w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0010011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B1;B1;B1] : 7 words$word))))))) then
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_1_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_bop_backwards_matches mappingpatterns_1_0)))
- (if ((encdec_bop_backwards_matches mappingpatterns_1_0)) then sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__4 : bool) .
- if w__4 then
- let (mappingpatterns_1_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_bop_backwards mappingpatterns_1_0) (\ op . sail2_state_monad$returnS T)
+ (let (mappingpatterns_4_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_3_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_4_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_4_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_3_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned .
+ sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii))))))))))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000011w : 7 words$word)))))) (\ (w__2 : bool) .
+ if w__2 then
+ let (mappingpatterns_4_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_3_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned . sail2_state_monad$returnS T))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_2_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_iop_backwards_matches mappingpatterns_2_0)))
- (if ((encdec_iop_backwards_matches mappingpatterns_2_0)) then sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__7 : bool) .
- if w__7 then
- let (mappingpatterns_2_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_iop_backwards mappingpatterns_2_0) (\ op . sail2_state_monad$returnS T)
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ (let (mappingpatterns_5_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_5_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_5_0) (\ size1 .
+ sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100011w : 7 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (mappingpatterns_5_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_5_0) (\ size1 . sail2_state_monad$returnS T)
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((let (shamt : 6 words$word) = ((subrange_vec_dec v__225 (( 25 : int):ii) (( 20 : int):ii) : 6 words$word)) in
- (((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((((bit_to_bool ((access_vec_dec shamt (( 5 : int):ii))))) = F))))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 26 : int):ii) : 6 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B0;B0;B1;B1] : 7 words$word))))))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0100000w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0011011w : 7 words$word))))))))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__469 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__469 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (0x0000Fw : 20 words$word))))))) then
sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))) then
+ else if (((v__469 = (0x0000100Fw : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__469 = (0x00000073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__469 = (0x30200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__469 = (0x10200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__469 = (0x00100073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if (((v__469 = (0x10500073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (0b000000001110011w : 15 words$word))))))) then
sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_4_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_3_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_4_0)))
- (if ((size_bits_backwards_matches mappingpatterns_4_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_3_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_3_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned .
- sail2_state_monad$returnS (((((((word_width_bytes size1)) < (( 8 : int):ii))) \/ (((((~ is_unsigned)) /\ ((((word_width_bytes size1)) <= (( 8 : int):ii))))))))))
- else sail2_state_monad$returnS F)) (\ (w__9 : bool) .
- sail2_state_monad$returnS w__9))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__12 : bool) .
- if w__12 then
- let (mappingpatterns_4_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_3_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_4_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_3_0) (\ is_unsigned . sail2_state_monad$returnS T))
+ (let (mappingpatterns_8_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_7_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_6_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_8_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_8_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_7_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_7_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_6_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_6_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))))))))) (\ (w__8 : bool) .
+ if w__8 then
+ let (mappingpatterns_8_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_7_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_6_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_6_0) (\ aq . sail2_state_monad$returnS T)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_5_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_5_0)))
- (if ((size_bits_backwards_matches mappingpatterns_5_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_5_0) (\ size1 .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__15 :
- bool) .
- if w__15 then
- let (mappingpatterns_5_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_5_0) (\ size1 . sail2_state_monad$returnS T)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word)))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B0;B0;B0;B0] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B1;B1;B0;B1;B1] : 7 words$word))))))))))))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B0;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__225 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__225 (( 19 : int):ii) (( 0 : int):ii) : 20 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 20 words$word))))))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;
- B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B1;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if (((v__225 = (vec_of_bits [B0;B0;B0;B1;B0;B0;B0;B0;B0;B1;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;
- B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- sail2_state_monad$returnS T
- else if ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B1;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__225 (( 14 : int):ii) (( 0 : int):ii) : 15 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B1;B1;B1;B0;B0;B1;B1] : 15 words$word)))))))
- then
- sail2_state_monad$returnS T
+ (let (mappingpatterns_9_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_11_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_10_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_11_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_11_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_10_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_10_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_9_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_9_0) (\ aq .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) = (0b00011w : 5 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word)))))))))))) (\ (w__12 : bool) .
+ if w__12 then
+ let (mappingpatterns_9_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_11_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_10_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_9_0) (\ aq . sail2_state_monad$returnS T)))
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_8_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_7_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_6_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_8_0)))
- (if ((size_bits_backwards_matches mappingpatterns_8_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_7_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_7_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_6_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_6_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_6_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__17 : bool) .
- sail2_state_monad$returnS w__17))
- else sail2_state_monad$returnS F)) (\ (w__19 : bool) .
- sail2_state_monad$returnS w__19))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 24 : int):ii) (( 20 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))))))))) (\ (w__22 :
- bool) .
- if w__22 then
- let (mappingpatterns_8_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_7_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_6_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_8_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_7_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_6_0) (\ aq . sail2_state_monad$returnS T)))
+ (let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_15_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_14_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_13_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ if ((size_bits_backwards_matches mappingpatterns_15_0)) then sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_15_0) (\ size1 .
+ if ((bool_bits_backwards_matches mappingpatterns_14_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_14_0) (\ rl .
+ if ((bool_bits_backwards_matches mappingpatterns_13_0)) then sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_13_0) (\ aq .
+ if ((encdec_amoop_backwards_matches mappingpatterns_12_0)) then sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_12_0) (\ op .
+ sail2_state_monad$returnS ((amo_width_valid size1)))
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (0b0w : 1 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0101111w : 7 words$word))))))))) (\ (w__17 : bool) .
+ if w__17 then
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
+ let (mappingpatterns_15_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_14_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_13_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
+ let (mappingpatterns_12_0 : 5 words$word) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
+ (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
+ (encdec_amoop_backwards mappingpatterns_12_0) (\ op . sail2_state_monad$returnS T))))
+ else if ((((let (mappingpatterns_16_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ encdec_mul_op_backwards_matches mappingpatterns_16_0) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word)))))))))) then
+ let (mappingpatterns_16_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
+ sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_17_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_17_0) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (mappingpatterns_17_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
+ else if ((((let (mappingpatterns_18_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ bool_not_bits_backwards_matches mappingpatterns_18_0) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0110011w : 7 words$word))))))))))))) then
+ let (mappingpatterns_18_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word))))))))))))) then
+ sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_9_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_11_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_10_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_11_0)))
- (if ((size_bits_backwards_matches mappingpatterns_11_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_10_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_10_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_9_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_9_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_9_0) (\ aq .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__24 : bool) .
- sail2_state_monad$returnS w__24))
- else sail2_state_monad$returnS F)) (\ (w__26 : bool) .
- sail2_state_monad$returnS w__26))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((regidx_to_regno
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B1] : 5 words$word)))))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word)))))))))))) (\ (w__29 :
- bool) .
- if w__29 then
- let (mappingpatterns_9_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_11_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_10_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_11_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_10_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_9_0) (\ aq . sail2_state_monad$returnS T)))
+ (let (mappingpatterns_19_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_19_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_19_0) (\ s .
+ sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__19 : bool) .
+ if w__19 then
+ let (mappingpatterns_19_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_19_0) (\ s . sail2_state_monad$returnS T)
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_15_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_14_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_13_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((size_bits_backwards_matches mappingpatterns_15_0)))
- (if ((size_bits_backwards_matches mappingpatterns_15_0)) then sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_14_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_14_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
- (sail2_state$and_boolS (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_13_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_13_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_amoop_backwards_matches mappingpatterns_12_0)))
- (if ((encdec_amoop_backwards_matches mappingpatterns_12_0)) then sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_12_0) (\ op .
- sail2_state_monad$returnS ((((word_width_bytes size1)) <= (( 8 : int):ii))))
- else sail2_state_monad$returnS F)) (\ (w__31 : bool) .
- sail2_state_monad$returnS w__31))
- else sail2_state_monad$returnS F)) (\ (w__33 : bool) .
- sail2_state_monad$returnS w__33))
- else sail2_state_monad$returnS F)) (\ (w__35 : bool) .
- sail2_state_monad$returnS w__35))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B0;B1;B1;B1;B1] : 7 words$word))))))))) (\ (w__38 :
- bool) .
- if w__38 then
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in
- let (mappingpatterns_15_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_14_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 25 : int):ii) (( 25 : int):ii) : 1 words$word)) in
- let (mappingpatterns_13_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 26 : int):ii) (( 26 : int):ii) : 1 words$word)) in
- let (mappingpatterns_12_0 : 5 words$word) =
- ((subrange_vec_dec v__225 (( 31 : int):ii) (( 27 : int):ii) : 5 words$word)) in sail2_state_monad$bindS
- (size_bits_backwards mappingpatterns_15_0) (\ size1 . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_14_0) (\ rl . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_13_0) (\ aq . sail2_state_monad$bindS
- (encdec_amoop_backwards mappingpatterns_12_0) (\ op . sail2_state_monad$returnS T))))
+ (let (mappingpatterns_20_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ if ((bool_not_bits_backwards_matches mappingpatterns_20_0)) then sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_20_0) (\ s .
+ sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0111011w : 7 words$word)))))))))))) (\ (w__21 : bool) .
+ if w__21 then
+ let (mappingpatterns_20_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (bool_not_bits_backwards mappingpatterns_20_0) (\ s . sail2_state_monad$returnS T)
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_16_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((encdec_mul_op_backwards_matches mappingpatterns_16_0)))
- (if ((encdec_mul_op_backwards_matches mappingpatterns_16_0)) then sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word))))))))) (\ (w__41 :
- bool) .
- if w__41 then
- let (mappingpatterns_16_0 : 3 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
- (encdec_mul_op_backwards mappingpatterns_16_0) (\ varstup . let (high, signed1, signed2) = varstup in
- sail2_state_monad$returnS T)
+ (let (mappingpatterns_22_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_21_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
+ if ((encdec_csrop_backwards_matches mappingpatterns_22_0)) then sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_22_0) (\ op .
+ sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_21_0)))
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1110011w : 7 words$word)))))) (\ (w__23 : bool) .
+ if w__23 then
+ let (mappingpatterns_22_0 : 2 words$word) =
+ ((subrange_vec_dec v__469 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
+ let (mappingpatterns_21_0 : 1 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
+ (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
+ (bool_bits_backwards mappingpatterns_21_0) (\ is_imm . sail2_state_monad$returnS T))
+ else if (((v__469 = (0x00200073w : 32 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (fm : 4 bits) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__469 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__469 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (fm : 4 bits) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 28 : int):ii) : 4 words$word)) in
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (imm : 12 bits) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ let (rs : regidx) =
+ ((subrange_vec_dec v__469 (( 19 : int):ii) (( 15 : int):ii) : 5 words$word)) in
+ let (rd : regidx) =
+ ((subrange_vec_dec v__469 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm : 12 bits) =
+ ((subrange_vec_dec v__469 (( 31 : int):ii) (( 20 : int):ii) : 12 words$word)) in
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))) /\ ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0001111w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_17_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_17_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_17_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__44 :
- bool) .
- if w__44 then
- let (mappingpatterns_17_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_17_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__25 : bool) .
+ if w__25 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_18_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_18_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_18_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B0;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__47 :
- bool) .
- if w__47 then
- let (mappingpatterns_18_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_18_0) (\ s . sail2_state_monad$returnS T)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 12 : int):ii)
- : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))))
- then
- sail2_state_monad$returnS T
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000111w : 7 words$word))))))))) (\ (w__27 : bool) .
+ if w__27 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_19_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_19_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_19_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_19_0) (\ s .
- sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__50 :
- bool) .
- if w__50 then
- let (mappingpatterns_19_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_19_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
- (sail2_state$and_boolS
- (let (mappingpatterns_20_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_not_bits_backwards_matches mappingpatterns_20_0)))
- (if ((bool_not_bits_backwards_matches mappingpatterns_20_0)) then sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_20_0) (\ s .
- sail2_state_monad$returnS ((((( 64 : int):ii) = (( 64 : int):ii)))))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS ((((((((subrange_vec_dec v__225 (( 31 : int):ii) (( 25 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B0;B1] : 7 words$word)))) /\ ((((((((subrange_vec_dec v__225 (( 14 : int):ii) (( 13 : int):ii)
- : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii)
- : 7 words$word)) = (vec_of_bits [B0;B1;B1;B1;B0;B1;B1] : 7 words$word)))))))))))) (\ (w__53 :
- bool) .
- if w__53 then
- let (mappingpatterns_20_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (bool_not_bits_backwards mappingpatterns_20_0) (\ s . sail2_state_monad$returnS T)
+ (sail2_state$and_boolS ((is_RV32D_or_RV64D () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0100111w : 7 words$word))))))))) (\ (w__31 : bool) .
+ if w__31 then sail2_state_monad$returnS T
else sail2_state_monad$bindS
(sail2_state$and_boolS
- (let (mappingpatterns_22_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_21_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in
- sail2_state$and_boolS
- (sail2_state_monad$returnS ((encdec_csrop_backwards_matches mappingpatterns_22_0)))
- (if ((encdec_csrop_backwards_matches mappingpatterns_22_0)) then sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
- (sail2_state$and_boolS
- (sail2_state_monad$returnS ((bool_bits_backwards_matches mappingpatterns_21_0)))
- (if ((bool_bits_backwards_matches mappingpatterns_21_0)) then sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_21_0) (\ is_imm .
+ (let (mappingpatterns_23_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_23_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_23_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then
+ let (mappingpatterns_23_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_23_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_24_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_24_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_24_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__37 :
+ bool) .
+ if w__37 then
+ let (mappingpatterns_24_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_24_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_25_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches mappingpatterns_25_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_25_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__40 :
+ bool) .
+ if w__40 then
+ let (mappingpatterns_25_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_25_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_26_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_26_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_26_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 26 : int):ii) (( 25 : int):ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__43 :
+ bool) .
+ if w__43 then
+ let (mappingpatterns_26_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_26_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_27_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_27_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_27_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000000w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__46 :
+ bool) .
+ if w__46 then
+ let (mappingpatterns_27_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_27_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_28_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_28_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_28_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0000100w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__49 :
+ bool) .
+ if w__49 then
+ let (mappingpatterns_28_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_28_0) (\ rm .
sail2_state_monad$returnS T)
- else sail2_state_monad$returnS F)) (\ (w__55 : bool) .
- sail2_state_monad$returnS w__55))
- else sail2_state_monad$returnS F))
- (sail2_state_monad$returnS (((((subrange_vec_dec v__225 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B1;B1;B1;B0;B0;B1;B1] : 7 words$word)))))) (\ (w__58 :
- bool) .
- if w__58 then
- let (mappingpatterns_22_0 : 2 words$word) =
- ((subrange_vec_dec v__225 (( 13 : int):ii) (( 12 : int):ii) : 2 words$word)) in
- let (mappingpatterns_21_0 : 1 words$word) =
- ((subrange_vec_dec v__225 (( 14 : int):ii) (( 14 : int):ii) : 1 words$word)) in sail2_state_monad$bindS
- (encdec_csrop_backwards mappingpatterns_22_0) (\ op . sail2_state_monad$bindS
- (bool_bits_backwards mappingpatterns_21_0) (\ is_imm .
- sail2_state_monad$returnS T))
- else
- sail2_state_monad$returnS (if (((v__225 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0;B0;
- B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;
- B1;B1;B0;B0;B1;B1]
- : 32 words$word)))) then
- T
- else T)))))))))))))))))`;
-
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_29_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_29_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_29_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii) (( 25 : int):ii)
+ : 7 words$word)) = (0b0001000w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__52 :
+ bool) .
+ if w__52 then
+ let (mappingpatterns_29_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_29_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_30_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_30_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_30_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001100w : 7 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__55 :
+ bool) .
+ if w__55 then
+ let (mappingpatterns_30_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii) : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_30_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_31_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_31_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_31_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x580w : 12 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__58 :
+ bool) .
+ if w__58 then
+ let (mappingpatterns_31_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_31_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_32_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_32_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_32_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC00w : 12 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__61 :
+ bool) .
+ if w__61 then
+ let (mappingpatterns_32_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards mappingpatterns_32_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_33_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_33_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_33_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC01w : 12 words$word)))) /\ (((((subrange_vec_dec v__469 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__64 :
+ bool) .
+ if w__64 then
+ let (mappingpatterns_33_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_33_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_34_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_34_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_34_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD00w : 12 words$word)))) /\ (((((subrange_vec_dec v__469
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__67 :
+ bool) .
+ if w__67 then
+ let (mappingpatterns_34_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_34_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_35_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_35_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_35_0) (\ rm .
+ is_RV32F_or_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xD01w : 12 words$word)))) /\ (((((subrange_vec_dec v__469
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__70 :
+ bool) .
+ if w__70 then
+ let (mappingpatterns_35_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_35_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_36_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_36_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_36_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC02w : 12 words$word)))) /\ (((((subrange_vec_dec v__469
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__73 :
+ bool) .
+ if w__73 then
+ let (mappingpatterns_36_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii) (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_36_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_37_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_37_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_37_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__469
+ (( 31 : int):ii) (( 20 : int):ii)
+ : 12 words$word)) = (0xC03w : 12 words$word)))) /\ (((((subrange_vec_dec v__469
+ (( 6 : int):ii) (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__76 :
+ bool) .
+ if w__76 then
+ let (mappingpatterns_37_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_37_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_38_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_38_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_38_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD02w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__79 :
+ bool) .
+ if w__79 then
+ let (mappingpatterns_38_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_38_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_39_0 :
+ 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_39_0)) then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_39_0) (\ rm .
+ is_RV64F () )
+ else sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469 (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD03w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469 (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__82 :
+ bool) .
+ if w__82 then
+ let (mappingpatterns_39_0 : 3 words$word) =
+ ((subrange_vec_dec v__469 (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_39_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469 (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__84 :
+ bool) .
+ if w__84 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__86 :
+ bool) .
+ if w__86 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__88 :
+ bool) .
+ if w__88 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__90 :
+ bool) .
+ if w__90 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010100w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__92 :
+ bool) .
+ if w__92 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__94 :
+ bool) .
+ if w__94 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__96 :
+ bool) .
+ if w__96 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32F_or_RV64F
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010000w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__98 :
+ bool) .
+ if w__98 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__100 :
+ bool) .
+ if w__100 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__102 :
+ bool) .
+ if w__102 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveFExt () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF00w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__104 :
+ bool) .
+ if w__104 then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_40_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_40_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_40_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1000011w : 7 words$word))))))))) (\ (w__107 :
+ bool) .
+ if w__107 then
+ let (mappingpatterns_40_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_40_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_41_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_41_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_41_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1000111w : 7 words$word))))))))) (\ (w__110 :
+ bool) .
+ if w__110
+ then
+ let (mappingpatterns_41_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_41_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_42_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_42_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_42_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1001011w : 7 words$word))))))))) (\ (w__113 :
+ bool) .
+ if w__113
+ then
+ let (mappingpatterns_42_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_42_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_43_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_43_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_43_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 26 : int):ii)
+ (( 25 : int):ii)
+ : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1001111w : 7 words$word))))))))) (\ (w__116 :
+ bool) .
+ if w__116
+ then
+ let (mappingpatterns_43_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_43_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_44_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_44_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_44_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0000001w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__119 :
+ bool) .
+ if w__119
+ then
+ let (mappingpatterns_44_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_44_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_45_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_45_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_45_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0000101w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__122 :
+ bool) .
+ if w__122
+ then
+ let (mappingpatterns_45_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_45_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_46_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_46_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_46_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001001w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__125 :
+ bool) .
+ if w__125
+ then
+ let (mappingpatterns_46_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_46_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_47_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_47_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_47_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0001101w : 7 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__128 :
+ bool) .
+ if
+ w__128
+ then
+ let (mappingpatterns_47_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_47_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_48_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_48_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_48_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x5A0w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__131 :
+ bool) .
+ if
+ w__131
+ then
+ let (mappingpatterns_48_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_48_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_49_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_49_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_49_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC20w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__134 :
+ bool) .
+ if
+ w__134
+ then
+ let (mappingpatterns_49_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_49_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_50_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_50_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_50_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC21w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__137 :
+ bool) .
+ if
+ w__137
+ then
+ let (mappingpatterns_50_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_50_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_51_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_51_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_51_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD20w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__140 :
+ bool) .
+ if
+ w__140
+ then
+ let (mappingpatterns_51_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_51_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_52_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_52_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_52_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD21w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__143 :
+ bool) .
+ if
+ w__143
+ then
+ let (mappingpatterns_52_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_52_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_53_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_53_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_53_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x401w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__146 :
+ bool) .
+ if
+ w__146
+ then
+ let (mappingpatterns_53_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_53_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_54_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_54_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_54_0) (\ rm .
+ is_RV32D_or_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0x420w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__149 :
+ bool) .
+ if
+ w__149
+ then
+ let (mappingpatterns_54_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_54_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_55_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_55_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_55_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC22w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__152 :
+ bool) .
+ if
+ w__152
+ then
+ let (mappingpatterns_55_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_55_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_56_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_56_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_56_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xC23w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__155 :
+ bool) .
+ if
+ w__155
+ then
+ let (mappingpatterns_56_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_56_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_57_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_57_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_57_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD22w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__158 :
+ bool) .
+ if
+ w__158
+ then
+ let (mappingpatterns_57_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_57_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (let (mappingpatterns_58_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in
+ if
+ ((encdec_rounding_mode_backwards_matches
+ mappingpatterns_58_0))
+ then sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_58_0) (\ rm .
+ is_RV64D
+ () )
+ else
+ sail2_state_monad$returnS F)
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xD23w : 12 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word))))))))) (\ (w__161 :
+ bool) .
+ if
+ w__161
+ then
+ let (mappingpatterns_58_0 :
+ 3 words$word) =
+ ((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) in sail2_state_monad$bindS
+ (encdec_rounding_mode_backwards
+ mappingpatterns_58_0) (\ rm .
+ sail2_state_monad$returnS T)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__163 :
+ bool) .
+ if
+ w__163
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__165 :
+ bool) .
+ if
+ w__165
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__167 :
+ bool) .
+ if
+ w__167
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010101w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__169 :
+ bool) .
+ if
+ w__169
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b0010101w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__171 :
+ bool) .
+ if
+ w__171
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__173 :
+ bool) .
+ if
+ w__173
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__175 :
+ bool) .
+ if
+ w__175
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV32D_or_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 25 : int):ii)
+ : 7 words$word)) = (0b1010001w : 7 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__177 :
+ bool) .
+ if
+ w__177
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((haveDExt
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__179 :
+ bool) .
+ if
+ w__179
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xE20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__181 :
+ bool) .
+ if
+ w__181
+ then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ ((is_RV64D
+ () ))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec
+ v__469
+ (( 31 : int):ii)
+ (( 20 : int):ii)
+ : 12 words$word)) = (0xF20w : 12 words$word)))) /\ ((((((((subrange_vec_dec
+ v__469
+ (( 14 : int):ii)
+ (( 12 : int):ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec
+ v__469
+ (( 6 : int):ii)
+ (( 0 : int):ii)
+ : 7 words$word)) = (0b1010011w : 7 words$word)))))))))))) (\ (w__183 :
+ bool) .
+ sail2_state_monad$returnS (if
+ w__183
+ then
+ T
+ else
+ T)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))`;
-(*val encdec_compressed_forwards : ast -> M (mword ty16)*)
val _ = Define `
((encdec_compressed_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->((((16)words$word),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
C_NOP (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B0;B1] : 2 words$word)
- : 7 words$word))
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_ADDI4SPN ((rd, v__438)) =>
- if (let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__438 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__438 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__438 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ | C_ADDI4SPN ((rd, v__922)) =>
+ if (let (nz96 : 4 bits) = ((subrange_vec_dec v__922 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__922 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__922 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__922 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__922 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
(((concat_vec nz96 ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) then
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__438 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__438 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__438 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__438 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ : 8 words$word)) <> (0x00w : 8 words$word))) then
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__922 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__922 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__922 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__922 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__922 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nz54
((concat_vec nz96
((concat_vec nz2
- ((concat_vec nz3
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec nz3 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 11 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LW ((v__439, rs1, rd)) =>
- let (ui6 : 1 bits) = ((subrange_vec_dec v__439 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui6 : 1 bits) = ((subrange_vec_dec v__439 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__439 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__439 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LW ((v__923, rs1, rd)) =>
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__923 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__923 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__923 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__923 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
((concat_vec ui2
- ((concat_vec ui6
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui6 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
- | C_LD ((v__440, rs1, rd)) =>
+ | C_LD ((v__924, rs1, rd)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__440 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__440 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__440 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__924 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__924 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__924 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
- ((concat_vec ui76
- ((concat_vec rd (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui76 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SW ((v__441, rs1, rs2)) =>
- let (ui6 : 1 bits) = ((subrange_vec_dec v__441 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui6 : 1 bits) = ((subrange_vec_dec v__441 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__441 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__441 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_SW ((v__925, rs1, rs2)) =>
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__925 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__925 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__925 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__925 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
((concat_vec ui2
- ((concat_vec ui6
- ((concat_vec rs2 (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui6 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
: 6 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
- | C_SD ((v__442, rs1, rs2)) =>
+ | C_SD ((v__926, rs1, rs2)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__442 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__442 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__442 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__926 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__926 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__926 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec ui53
((concat_vec rs1
- ((concat_vec ui76
- ((concat_vec rs2 (vec_of_bits [B0;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui76 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDI ((v__443, rsd)) =>
- if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__443 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) then
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__443 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__443 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ | C_ADDI ((v__927, rsd)) =>
+ if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__927 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__927 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__927 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) then
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__927 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__927 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__927 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nzi5
- ((concat_vec rsd
- ((concat_vec nzi40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec nzi40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_JAL (v__444) =>
+ | C_JAL (v__928) =>
if ((((( 64 : int):ii) = (( 32 : int):ii)))) then
- let (i11 : 1 bits) = ((subrange_vec_dec v__444 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i98 : 2 bits) = ((subrange_vec_dec v__444 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__444 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__444 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__444 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__444 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__444 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__444 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__444 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
+ let (i11 : 1 bits) = ((subrange_vec_dec v__928 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i98 : 2 bits) = ((subrange_vec_dec v__928 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__928 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__928 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__928 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__928 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__928 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__928 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__928 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
((concat_vec i11
((concat_vec i4
((concat_vec i98
@@ -20374,8 +30002,7 @@ val _ = Define `
((concat_vec i6
((concat_vec i7
((concat_vec i31
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 6 words$word))
: 7 words$word))
: 8 words$word))
@@ -20385,59 +30012,55 @@ val _ = Define `
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDIW ((v__445, rsd)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))))
- then
- let (imm5 : 1 bits) = ((subrange_vec_dec v__445 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__445 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__445 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B1] : 3 words$word)
+ | C_ADDIW ((v__929, rsd)) =>
+ if ((((((rsd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii))))))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__929 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__929 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__929 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
((concat_vec imm5
- ((concat_vec rsd
- ((concat_vec imm40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LI ((v__446, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
- let (imm5 : 1 bits) = ((subrange_vec_dec v__446 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__446 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__446 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LI ((v__930, rd)) =>
+ if (((rd <> zreg))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__930 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__930 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__930 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec imm5
- ((concat_vec rd
- ((concat_vec imm40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rd ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ADDI16SP (v__447) =>
- if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__447 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__447 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__447 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__447 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ | C_ADDI16SP (v__931) =>
+ if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__931 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__931 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__931 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__931 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__931 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__931 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__447 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__447 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__447 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__447 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__447 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__931 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__931 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__931 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__931 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__931 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__931 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec nzi9
- ((concat_vec (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)
+ ((concat_vec (0b00010w : 5 words$word)
((concat_vec nzi4
((concat_vec nzi6
((concat_vec nzi87
- ((concat_vec nzi5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec nzi5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 6 words$word))
: 7 words$word))
@@ -20445,114 +30068,110 @@ val _ = Define `
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LUI ((v__448, rd)) =>
- if (let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__448 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) then
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__448 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__448 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ | C_LUI ((v__932, rd)) =>
+ if (let (imm17 : 1 bits) = ((subrange_vec_dec v__932 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__932 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__932 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__932 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__932 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__932 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec imm17
- ((concat_vec rd
- ((concat_vec imm1612 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec rd ((concat_vec imm1612 (0b01w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SRLI ((v__449, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__449 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__449 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__449 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_SRLI ((v__933, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__933 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__933 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__933 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__933 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__933 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__933 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec nzui5
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rsd ((concat_vec nzui40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SRAI ((v__450, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__450 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__450 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__450 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_SRAI ((v__934, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__934 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__934 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__934 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec nzui5
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rsd ((concat_vec nzui40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_ANDI ((v__451, rsd)) =>
- let (i5 : 1 bits) = ((subrange_vec_dec v__451 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__451 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i40 : 5 bits) = ((subrange_vec_dec v__451 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
+ | C_ANDI ((v__935, rsd)) =>
+ let (i5 : 1 bits) = ((subrange_vec_dec v__935 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__935 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i40 : 5 bits) = ((subrange_vec_dec v__935 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
((concat_vec i5
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
- ((concat_vec rsd
- ((concat_vec i40 (vec_of_bits [B0;B1] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b10w : 2 words$word)
+ ((concat_vec rsd ((concat_vec i40 (0b01w : 2 words$word) : 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_SUB ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_XOR ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_OR ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B1;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b10w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_AND ((rsd, rs2)) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b11w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
@@ -20560,12 +30179,12 @@ val _ = Define `
: 16 words$word))
| C_SUBW ((rsd, rs2)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
@@ -20574,29 +30193,29 @@ val _ = Define `
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_ADDW ((rsd, rs2)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B1;B1] : 2 words$word)
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b11w : 2 words$word)
((concat_vec rsd
- ((concat_vec (vec_of_bits [B0;B1] : 2 words$word)
- ((concat_vec rs2 (vec_of_bits [B0;B1] : 2 words$word) : 5 words$word))
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rs2 (0b01w : 2 words$word) : 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_J (v__452) =>
- let (i11 : 1 bits) = ((subrange_vec_dec v__452 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i98 : 2 bits) = ((subrange_vec_dec v__452 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__452 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__452 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__452 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__452 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__452 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__452 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__452 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B1] : 3 words$word)
+ | C_J (v__936) =>
+ let (i11 : 1 bits) = ((subrange_vec_dec v__936 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i98 : 2 bits) = ((subrange_vec_dec v__936 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__936 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__936 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__936 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__936 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__936 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__936 (( 10 : int):ii) (( 10 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__936 (( 9 : int):ii) (( 9 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b101w : 3 words$word)
((concat_vec i11
((concat_vec i4
((concat_vec i98
@@ -20604,8 +30223,7 @@ val _ = Define `
((concat_vec i6
((concat_vec i7
((concat_vec i31
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word)
- : 3 words$word))
+ ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 6 words$word))
: 7 words$word))
: 8 words$word))
@@ -20614,668 +30232,1156 @@ val _ = Define `
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_BEQZ ((v__453, rs)) =>
- let (i8 : 1 bits) = ((subrange_vec_dec v__453 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__453 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__453 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__453 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__453 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__453 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_BEQZ ((v__937, rs)) =>
+ let (i8 : 1 bits) = ((subrange_vec_dec v__937 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__937 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__937 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__937 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__937 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__937 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec i8
((concat_vec i43
((concat_vec rs
((concat_vec i76
- ((concat_vec i21
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word) : 3 words$word))
+ ((concat_vec i21 ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_BNEZ ((v__454, rs)) =>
- let (i8 : 1 bits) = ((subrange_vec_dec v__454 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__454 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__454 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__454 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__454 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__454 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ | C_BNEZ ((v__938, rs)) =>
+ let (i8 : 1 bits) = ((subrange_vec_dec v__938 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__938 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__938 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__938 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__938 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__938 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec i8
((concat_vec i43
((concat_vec rs
((concat_vec i76
- ((concat_vec i21
- ((concat_vec i5 (vec_of_bits [B0;B1] : 2 words$word) : 3 words$word))
+ ((concat_vec i21 ((concat_vec i5 (0b01w : 2 words$word) : 3 words$word))
: 5 words$word))
: 7 words$word))
: 10 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
- | C_SLLI ((v__455, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__455 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word)))))))))))))
- then
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__455 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__455 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B0;B0] : 3 words$word)
+ | C_SLLI ((v__939, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__939 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__939 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__939 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__939 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__939 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__939 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
((concat_vec nzui5
- ((concat_vec rsd
- ((concat_vec nzui40 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec rsd ((concat_vec nzui40 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LWSP ((v__456, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__456 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__456 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__456 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
- let (ui42 : 3 bits) = ((subrange_vec_dec v__456 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B0] : 3 words$word)
+ | C_LWSP ((v__940, rd)) =>
+ if (((rd <> zreg))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__940 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__940 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__940 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__940 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
((concat_vec ui5
((concat_vec rd
- ((concat_vec ui42
- ((concat_vec ui76 (vec_of_bits [B1;B0] : 2 words$word) : 4 words$word))
+ ((concat_vec ui42 ((concat_vec ui76 (0b10w : 2 words$word) : 4 words$word))
: 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_LDSP ((v__457, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))))
- then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__457 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui86 : 3 bits) = ((subrange_vec_dec v__457 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__457 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (ui43 : 2 bits) = ((subrange_vec_dec v__457 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B0;B1;B1] : 3 words$word)
+ | C_LDSP ((v__941, rd)) =>
+ if ((((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__941 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__941 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__941 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__941 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
((concat_vec ui5
((concat_vec rd
- ((concat_vec ui43
- ((concat_vec ui86 (vec_of_bits [B1;B0] : 2 words$word) : 5 words$word))
+ ((concat_vec ui43 ((concat_vec ui86 (0b10w : 2 words$word) : 5 words$word))
: 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
- | C_SWSP ((v__458, rs2)) =>
- let (ui76 : 2 bits) = ((subrange_vec_dec v__458 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui76 : 2 bits) = ((subrange_vec_dec v__458 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
- let (ui52 : 4 bits) = ((subrange_vec_dec v__458 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B0] : 3 words$word)
+ | C_SWSP ((v__942, rs2)) =>
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__942 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__942 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__942 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b110w : 3 words$word)
((concat_vec ui52
- ((concat_vec ui76
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec ui76 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 9 words$word))
: 13 words$word))
: 16 words$word))
- | C_SDSP ((v__459, rs2)) =>
+ | C_SDSP ((v__943, rs2)) =>
if ((((( 64 : int):ii) = (( 64 : int):ii)))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__459 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui86 : 3 bits) = ((subrange_vec_dec v__459 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__459 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B1;B1] : 3 words$word)
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__943 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__943 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__943 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
((concat_vec ui53
- ((concat_vec ui86
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec ui86 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 10 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
+ if (((rs1 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
+ if (((rs1 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
((concat_vec rs1
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B0] : 1 words$word)
- ((concat_vec rd
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec rd ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
| C_EBREAK (() ) =>
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- ((concat_vec (vec_of_bits [B0;B0;B0;B0;B0] : 5 words$word)
- (vec_of_bits [B1;B0] : 2 words$word)
- : 7 words$word))
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec (0b00000w : 5 words$word) (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- sail2_state_monad$returnS ((concat_vec (vec_of_bits [B1;B0;B0] : 3 words$word)
- ((concat_vec (vec_of_bits [B1] : 1 words$word)
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec rsd ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_NOP_HINT (v__944) =>
+ if (let (im5 : 1 bits) = ((subrange_vec_dec v__944 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__944 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__944 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (im5 : 1 bits) = ((subrange_vec_dec v__944 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__944 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__944 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec im5
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec im40 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
((concat_vec rsd
- ((concat_vec rs2 (vec_of_bits [B1;B0] : 2 words$word) : 7 words$word))
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_LI_HINT (v__945) =>
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__945 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__945 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__945 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b010w : 3 words$word)
+ ((concat_vec imm5
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec imm40 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_LUI_HINT (v__946) =>
+ if (let (imm17 : 1 bits) = ((subrange_vec_dec v__946 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__946 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__946 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__946 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__946 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__946 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec imm17
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec imm1612 (0b01w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b1w : 1 words$word)
+ ((concat_vec (0b00000w : 5 words$word)
+ ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_SLLI_HINT ((v__947, rsd)) =>
+ if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__947 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__947 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__947 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) then
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__947 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__947 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__947 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b000w : 3 words$word)
+ ((concat_vec nzui5
+ ((concat_vec rsd ((concat_vec nzui40 (0b10w : 2 words$word) : 7 words$word))
: 12 words$word))
: 13 words$word))
: 16 words$word))
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
+ | C_SRLI_HINT (rsd) =>
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b00w : 2 words$word)
+ ((concat_vec rsd
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 10 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_SRAI_HINT (rsd) =>
+ sail2_state_monad$returnS ((concat_vec (0b100w : 3 words$word)
+ ((concat_vec (0b0w : 1 words$word)
+ ((concat_vec (0b01w : 2 words$word)
+ ((concat_vec rsd
+ ((concat_vec (0b00000w : 5 words$word) (0b01w : 2 words$word) : 7 words$word))
+ : 10 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ | C_FLWSP ((v__948, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__57 :
+ bool) .
+ if w__57 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__948 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__948 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__948 (( 3 : int):ii) (( 3 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__948 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec ui5
+ ((concat_vec rd
+ ((concat_vec ui42 ((concat_vec ui76 (0b10w : 2 words$word) : 4 words$word))
+ : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSWSP ((v__949, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__63 :
+ bool) .
+ if w__63 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__949 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__949 (( 5 : int):ii) (( 4 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__949 (( 3 : int):ii) (( 0 : int):ii) : 4 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec ui52
+ ((concat_vec ui76 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 9 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FLW ((v__950, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__69 :
+ bool) .
+ if w__69 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__950 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__950 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__950 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__950 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b011w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui2
+ ((concat_vec ui6 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSW ((v__951, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__75 :
+ bool) .
+ if w__75 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__951 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__951 (( 4 : int):ii) (( 4 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__951 (( 3 : int):ii) (( 1 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__951 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b111w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui2
+ ((concat_vec ui6 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FLDSP ((v__952, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__81 : bool) .
+ if w__81 then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__952 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__952 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__952 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__952 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec ui5
+ ((concat_vec rd
+ ((concat_vec ui43 ((concat_vec ui86 (0b10w : 2 words$word) : 5 words$word))
+ : 7 words$word))
+ : 12 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSDSP ((v__953, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__87 : bool) .
+ if w__87 then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__953 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__953 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__953 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec ui86 ((concat_vec rs2 (0b10w : 2 words$word) : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FLD ((v__954, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__93 : bool) .
+ if w__93 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__954 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__954 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__954 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b001w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui76 ((concat_vec rd (0b00w : 2 words$word) : 5 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
+ | C_FSD ((v__955, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__99 : bool) .
+ if w__99 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__955 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__955 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__955 (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS ((concat_vec (0b101w : 3 words$word)
+ ((concat_vec ui53
+ ((concat_vec rs1
+ ((concat_vec ui76 ((concat_vec rs2 (0b00w : 2 words$word) : 5 words$word))
+ : 7 words$word))
+ : 10 words$word))
+ : 13 words$word))
+ : 16 words$word))
+ else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () ))
| C_ILLEGAL (s) => sail2_state_monad$returnS s
| _ => sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )
)))`;
-(*val encdec_compressed_backwards : mword ty16 -> ast*)
-
val _ = Define `
- ((encdec_compressed_backwards:(16)words$word -> ast) arg_=
- (let v__460 = arg_ in
- if (((v__460 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 16 words$word))))
- then
- C_NOP ()
- else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ ((encdec_compressed_backwards:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let v__956 = arg_ in
+ if (((v__956 = (0x0001w : 16 words$word)))) then sail2_state_monad$returnS (C_NOP () )
+ else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__956 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nz96
((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- C_ADDI4SPN (rd,
- (concat_vec nz96
- ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word))
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- let (ui6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_LW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rd)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rd : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_LD ((concat_vec ui76 ui53 : 5 words$word), rs1, rd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- let (ui6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (ui2 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (rs1 : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- C_SW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rs2)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs2 : 3 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (rs1 : 3 bits) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- C_SD ((concat_vec ui76 ui53 : 5 words$word), rs1, rs2)
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADDI ((concat_vec nzi5 nzi40 : 6 words$word), rsd)
- else if (((((((( 64 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (i98 : 2 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__460 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
- C_JAL ((concat_vec i11
- ((concat_vec i10
- ((concat_vec i98
- ((concat_vec i7
- ((concat_vec i6
- ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
- : 6 words$word))
- : 7 words$word))
- : 9 words$word))
- : 10 words$word))
- : 11 words$word))
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADDIW ((concat_vec imm5 imm40 : 6 words$word), rsd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_LI ((concat_vec imm5 imm40 : 6 words$word), rd)
- else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ : 8 words$word)) <> (0x00w : 8 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (rd : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__956 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_ADDI4SPN (rd,
+ (concat_vec nz96
+ ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
+ : 8 words$word)))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_LW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rd))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_LD ((concat_vec ui76 ui53 : 5 words$word), rs1, rd))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word), rs1, rs2))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : 3 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : 3 bits) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SD ((concat_vec ui76 ui53 : 5 words$word), rs1, rs2))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDI ((concat_vec nzi5 nzi40 : 6 words$word), rsd))
+ else if (((((((( 64 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (i98 : 2 bits) = ((subrange_vec_dec v__956 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__956 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__956 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_JAL ((concat_vec i11
+ ((concat_vec i10
+ ((concat_vec i98
+ ((concat_vec i7
+ ((concat_vec i6
+ ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word))
+ : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 10 words$word))
+ : 11 words$word)))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDIW ((concat_vec imm5 imm40 : 6 words$word), rsd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LI ((concat_vec imm5 imm40 : 6 words$word), rd))
+ else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ ((((((((regidx_to_regno ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- C_ADDI16SP ((concat_vec nzi9
- ((concat_vec nzi87
- ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
- : 5 words$word))
- : 6 words$word))
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_LUI ((concat_vec imm17 imm1612 : 6 words$word), rd)
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SRLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SRAI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ANDI ((concat_vec i5 i40 : 6 words$word), rsd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_SUB (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_XOR (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_OR (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_AND (rsd, rs2)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_SUBW (rsd, rs2)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- let (rsd : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (rs2 : cregidx) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- C_ADDW (rsd, rs2)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (i98 : 2 bits) = ((subrange_vec_dec v__460 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
- let (i7 : 1 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
- let (i6 : 1 bits) = ((subrange_vec_dec v__460 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i4 : 1 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
- let (i31 : 3 bits) = ((subrange_vec_dec v__460 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
- let (i11 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i10 : 1 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
- C_J ((concat_vec i11
- ((concat_vec i10
- ((concat_vec i98
- ((concat_vec i7
- ((concat_vec i6
- ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
- : 6 words$word))
- : 7 words$word))
- : 9 words$word))
- : 10 words$word))
- : 11 words$word))
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (rs : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- C_BEQZ ((concat_vec i8
- ((concat_vec i76 ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
- : 7 words$word))
- : 8 words$word),
- rs)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- let (rs : cregidx) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (i8 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (i76 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (i5 : 1 bits) = ((subrange_vec_dec v__460 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (i43 : 2 bits) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
- let (i21 : 2 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- C_BNEZ ((concat_vec i8
- ((concat_vec i76 ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
- : 7 words$word))
- : 8 words$word),
- rs)
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word))))))))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SLLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (ui42 : 3 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_LWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd)
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__460 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
- let (ui5 : 1 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (ui43 : 2 bits) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_LDSP ((concat_vec ui86 ((concat_vec ui5 ui43 : 3 words$word)) : 6 words$word), rd)
- else if ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- let (ui76 : 2 bits) = ((subrange_vec_dec v__460 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
- let (ui52 : 4 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SWSP ((concat_vec ui76 ui52 : 6 words$word), rs2)
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (ui86 : 3 bits) = ((subrange_vec_dec v__460 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
- let (ui53 : 3 bits) = ((subrange_vec_dec v__460 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_SDSP ((concat_vec ui86 ui53 : 6 words$word), rs2)
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_JR rs1
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- let (rs1 : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_JALR rs1
- else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- C_MV (rd, rs2)
- else if (((v__460 = (vec_of_bits [B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 16 words$word)))) then
- C_EBREAK ()
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__460 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__460 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- let (rsd : regidx) = ((subrange_vec_dec v__460 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__460 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- C_ADD (rsd, rs2)
- else C_ILLEGAL v__460))`;
-
-
-(*val encdec_compressed_forwards_matches : ast -> bool*)
-
-val _ = Define `
- ((encdec_compressed_forwards_matches:ast -> bool) arg_=
+ : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_ADDI16SP ((concat_vec nzi9
+ ((concat_vec nzi87
+ ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
+ : 5 words$word))
+ : 6 words$word)))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LUI ((concat_vec imm17 imm1612 : 6 words$word), rd))
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SRLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SRAI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ANDI ((concat_vec i5 i40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SUB (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_XOR (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_OR (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_AND (rsd, rs2))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SUBW (rsd, rs2))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_ADDW (rsd, rs2))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (i98 : 2 bits) = ((subrange_vec_dec v__956 (( 10 : int):ii) (( 9 : int):ii) : 2 words$word)) in
+ let (i7 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (i6 : 1 bits) = ((subrange_vec_dec v__956 (( 7 : int):ii) (( 7 : int):ii) : 1 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i4 : 1 bits) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 11 : int):ii) : 1 words$word)) in
+ let (i31 : 3 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 3 : int):ii) : 3 words$word)) in
+ let (i11 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i10 : 1 bits) = ((subrange_vec_dec v__956 (( 8 : int):ii) (( 8 : int):ii) : 1 words$word)) in
+ sail2_state_monad$returnS (C_J ((concat_vec i11
+ ((concat_vec i10
+ ((concat_vec i98
+ ((concat_vec i7
+ ((concat_vec i6
+ ((concat_vec i5 ((concat_vec i4 i31 : 4 words$word)) : 5 words$word))
+ : 6 words$word))
+ : 7 words$word))
+ : 9 words$word))
+ : 10 words$word))
+ : 11 words$word)))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (rs : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS (C_BEQZ ((concat_vec i8
+ ((concat_vec i76
+ ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
+ : 7 words$word))
+ : 8 words$word),
+ rs))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ let (rs : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (i8 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (i76 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (i5 : 1 bits) = ((subrange_vec_dec v__956 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (i43 : 2 bits) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) in
+ let (i21 : 2 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ sail2_state_monad$returnS (C_BNEZ ((concat_vec i8
+ ((concat_vec i76
+ ((concat_vec i5 ((concat_vec i43 i21 : 4 words$word)) : 5 words$word))
+ : 7 words$word))
+ : 8 words$word),
+ rs))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SLLI ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd))
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LDSP ((concat_vec ui86 ((concat_vec ui5 ui43 : 3 words$word)) : 6 words$word), rd))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))
+ then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SWSP ((concat_vec ui76 ui52 : 6 words$word), rs2))
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SDSP ((concat_vec ui86 ui53 : 6 words$word), rs2))
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__956 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ let (rs1 : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_JR rs1)
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__956 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ let (rs1 : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_JALR rs1)
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_MV (rd, rs2))
+ else if (((v__956 = (0x9002w : 16 words$word)))) then sail2_state_monad$returnS (C_EBREAK () )
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADD (rsd, rs2))
+ else if ((((let (im5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (im5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_NOP_HINT ((concat_vec im5 im40 : 6 words$word)))
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rsd <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__956 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADDI_HINT rsd)
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ let (imm5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LI_HINT ((concat_vec imm5 imm40 : 6 words$word)))
+ else if ((((let (imm17 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_LUI_HINT ((concat_vec imm17 imm1612 : 6 words$word)))
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100000000w : 9 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_MV_HINT rs2)
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100100000w : 9 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_ADD_HINT rs2)
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) /\ ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ let (rsd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_SLLI_HINT ((concat_vec nzui5 nzui40 : 6 words$word), rsd))
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100000w : 6 words$word)))) /\ (((((subrange_vec_dec v__956 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SRLI_HINT rsd)
+ else if ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100001w : 6 words$word)))) /\ (((((subrange_vec_dec v__956 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ let (rsd : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_SRAI_HINT rsd)
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui42 : 3 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 4 : int):ii) : 3 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FLWSP ((concat_vec ui76 ((concat_vec ui5 ui42 : 4 words$word)) : 6 words$word), rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__9 : bool) .
+ if w__9 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 8 : int):ii) (( 7 : int):ii) : 2 words$word)) in
+ let (ui52 : 4 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 9 : int):ii) : 4 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FSWSP ((concat_vec ui76 ui52 : 6 words$word), rs2))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__14 : bool) .
+ if w__14 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_FLW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word),
+ rs1,
+ rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__19 : bool) .
+ if w__19 then
+ let (ui6 : 1 bits) = ((subrange_vec_dec v__956 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (ui2 : 1 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ let (rs2 : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_FSW ((concat_vec ui6 ((concat_vec ui53 ui2 : 4 words$word)) : 5 words$word),
+ rs1,
+ rs2))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__24 : bool) .
+ if w__24 then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (ui5 : 1 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (ui43 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__956 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FLDSP ((concat_vec ui86 ((concat_vec ui5 ui43 : 3 words$word)) : 6 words$word),
+ rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then
+ let (ui86 : 3 bits) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ sail2_state_monad$returnS (C_FSDSP ((concat_vec ui86 ui53 : 6 words$word), rs2))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then
+ let (ui76 : 2 bits) = ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) = ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs1 : cregidx) = ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ let (rd : cregidx) = ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ sail2_state_monad$returnS (C_FLD ((concat_vec ui76 ui53 : 5 words$word), rs1, rd))
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__956 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__956 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__39 : bool) .
+ sail2_state_monad$returnS (if w__39 then
+ let (ui76 : 2 bits) =
+ ((subrange_vec_dec v__956 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) in
+ let (ui53 : 3 bits) =
+ ((subrange_vec_dec v__956 (( 12 : int):ii) (( 10 : int):ii) : 3 words$word)) in
+ let (rs2 : 3 bits) =
+ ((subrange_vec_dec v__956 (( 4 : int):ii) (( 2 : int):ii) : 3 words$word)) in
+ let (rs1 : 3 bits) =
+ ((subrange_vec_dec v__956 (( 9 : int):ii) (( 7 : int):ii) : 3 words$word)) in
+ C_FSD ((concat_vec ui76 ui53 : 5 words$word), rs1, rs2)
+ else C_ILLEGAL v__956)))))))))))`;
+
+
+val _ = Define `
+ ((encdec_compressed_forwards_matches:ast ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
- C_NOP (() ) => T
- | C_ADDI4SPN ((rd, v__596)) =>
- if (let (nz96 : 4 bits) = ((subrange_vec_dec v__596 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz96 : 4 bits) = ((subrange_vec_dec v__596 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__596 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__596 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__596 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- (((concat_vec nz96 ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) then
- T
- else F
- | C_LW ((v__597, rs1, rd)) => T
- | C_LD ((v__598, rs1, rd)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_SW ((v__599, rs1, rs2)) => T
- | C_SD ((v__600, rs1, rs2)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_ADDI ((v__601, rsd)) =>
- if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__601 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__601 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__601 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) then
- T
- else F
- | C_JAL (v__602) => if ((((( 64 : int):ii) = (( 32 : int):ii)))) then T else F
- | C_ADDIW ((v__603, rsd)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))))
- then
- T
- else F
- | C_LI ((v__604, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
- | C_ADDI16SP (v__605) =>
- if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__605 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi9 : 1 bits) = ((subrange_vec_dec v__605 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__605 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__605 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__605 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__605 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
- (((concat_vec nzi9
- ((concat_vec nzi87
- ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
- : 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_LUI ((v__606, rd)) =>
- if (let (imm17 : 1 bits) = ((subrange_vec_dec v__606 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__606 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__606 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) then
- T
- else F
- | C_SRLI ((v__607, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__607 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__607 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__607 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_SRAI ((v__608, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__608 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__608 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__608 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) then
- T
- else F
- | C_ANDI ((v__609, rsd)) => T
- | C_SUB ((rsd, rs2)) => T
- | C_XOR ((rsd, rs2)) => T
- | C_OR ((rsd, rs2)) => T
- | C_AND ((rsd, rs2)) => T
- | C_SUBW ((rsd, rs2)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_ADDW ((rsd, rs2)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_J (v__610) => T
- | C_BEQZ ((v__611, rs)) => T
- | C_BNEZ ((v__612, rs)) => T
- | C_SLLI ((v__613, rsd)) =>
- if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__613 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__613 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__613 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word)))))))))))))
- then
- T
- else F
- | C_LWSP ((v__614, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
- | C_LDSP ((v__615, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))))
- then
- T
- else F
- | C_SWSP ((v__616, rs2)) => T
- | C_SDSP ((v__617, rs2)) => if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F
- | C_JR (rs1) => if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
- | C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ C_NOP (() ) => sail2_state_monad$returnS T
+ | C_ADDI4SPN ((rd, v__1158)) =>
+ sail2_state_monad$returnS (if (let (nz96 : 4 bits) = ((subrange_vec_dec v__1158 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz96 : 4 bits) = ((subrange_vec_dec v__1158 (( 7 : int):ii) (( 4 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__1158 (( 3 : int):ii) (( 2 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__1158 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__1158 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ (((concat_vec nz96
+ ((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
+ : 8 words$word)) <> (0x00w : 8 words$word))) then
+ T
+ else F)
+ | C_LW ((v__1159, rs1, rd)) => sail2_state_monad$returnS T
+ | C_LD ((v__1160, rs1, rd)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_SW ((v__1161, rs1, rs2)) => sail2_state_monad$returnS T
+ | C_SD ((v__1162, rs1, rs2)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_ADDI ((v__1163, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzi5 : 1 bits) = ((subrange_vec_dec v__1163 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__1163 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__1163 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) then
+ T
+ else F)
+ | C_JAL (v__1164) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 32 : int):ii)))) then T else F)
+ | C_ADDIW ((v__1165, rsd)) =>
+ sail2_state_monad$returnS (if ((((((rsd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii))))))) then T else F)
+ | C_LI ((v__1166, rd)) => sail2_state_monad$returnS (if (((rd <> zreg))) then T else F)
+ | C_ADDI16SP (v__1167) =>
+ sail2_state_monad$returnS (if (let (nzi9 : 1 bits) = ((subrange_vec_dec v__1167 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi9 : 1 bits) = ((subrange_vec_dec v__1167 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__1167 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__1167 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__1167 (( 1 : int):ii) (( 1 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__1167 (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) in
+ (((concat_vec nzi9
+ ((concat_vec nzi87
+ ((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
+ : 5 words$word))
+ : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_LUI ((v__1168, rd)) =>
+ sail2_state_monad$returnS (if (let (imm17 : 1 bits) = ((subrange_vec_dec v__1168 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__1168 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__1168 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word)))))))))
+ then
+ T
+ else F)
+ | C_SRLI ((v__1169, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__1169 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1169 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1169 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_SRAI ((v__1170, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__1170 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1170 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1170 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_ANDI ((v__1171, rsd)) => sail2_state_monad$returnS T
+ | C_SUB ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_XOR ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_OR ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_AND ((rsd, rs2)) => sail2_state_monad$returnS T
+ | C_SUBW ((rsd, rs2)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_ADDW ((rsd, rs2)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_J (v__1172) => sail2_state_monad$returnS T
+ | C_BEQZ ((v__1173, rs)) => sail2_state_monad$returnS T
+ | C_BNEZ ((v__1174, rs)) => sail2_state_monad$returnS T
+ | C_SLLI ((v__1175, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__1175 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1175 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1175 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) then
+ T
+ else F)
+ | C_LWSP ((v__1176, rd)) => sail2_state_monad$returnS (if (((rd <> zreg))) then T else F)
+ | C_LDSP ((v__1177, rd)) =>
+ sail2_state_monad$returnS (if ((((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii))))))) then T else F)
+ | C_SWSP ((v__1178, rs2)) => sail2_state_monad$returnS T
+ | C_SDSP ((v__1179, rs2)) => sail2_state_monad$returnS (if ((((( 64 : int):ii) = (( 64 : int):ii)))) then T else F)
+ | C_JR (rs1) => sail2_state_monad$returnS (if (((rs1 <> zreg))) then T else F)
+ | C_JALR (rs1) => sail2_state_monad$returnS (if (((rs1 <> zreg))) then T else F)
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T
- else F
- | C_EBREAK (() ) => T
+ sail2_state_monad$returnS (if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F)
+ | C_EBREAK (() ) => sail2_state_monad$returnS T
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T
- else F
- | C_ILLEGAL (s) => T
- | _ => F
+ sail2_state_monad$returnS (if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F)
+ | C_NOP_HINT (v__1180) =>
+ sail2_state_monad$returnS (if (let (im5 : 1 bits) = ((subrange_vec_dec v__1180 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im5 : 1 bits) = ((subrange_vec_dec v__1180 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__1180 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_ADDI_HINT (rsd) => sail2_state_monad$returnS (if (((rsd <> zreg))) then T else F)
+ | C_LI_HINT (v__1181) => sail2_state_monad$returnS T
+ | C_LUI_HINT (v__1182) =>
+ sail2_state_monad$returnS (if (let (imm17 : 1 bits) = ((subrange_vec_dec v__1182 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__1182 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__1182 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) then
+ T
+ else F)
+ | C_MV_HINT (rs2) => sail2_state_monad$returnS (if (((rs2 <> zreg))) then T else F)
+ | C_ADD_HINT (rs2) => sail2_state_monad$returnS (if (((rs2 <> zreg))) then T else F)
+ | C_SLLI_HINT ((v__1183, rsd)) =>
+ sail2_state_monad$returnS (if (let (nzui5 : 1 bits) = ((subrange_vec_dec v__1183 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1183 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1183 (( 4 : int):ii) (( 0 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) then
+ T
+ else F)
+ | C_SRLI_HINT (rsd) => sail2_state_monad$returnS T
+ | C_SRAI_HINT (rsd) => sail2_state_monad$returnS T
+ | C_FLWSP ((v__1184, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__3 :
+ bool) .
+ sail2_state_monad$returnS (if w__3 then T
+ else F))
+ | C_FSWSP ((v__1185, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__7 :
+ bool) .
+ sail2_state_monad$returnS (if w__7 then T
+ else F))
+ | C_FLW ((v__1186, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__11 :
+ bool) .
+ sail2_state_monad$returnS (if w__11 then T
+ else F))
+ | C_FSW ((v__1187, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () )))) (\ (w__15 :
+ bool) .
+ sail2_state_monad$returnS (if w__15 then T
+ else F))
+ | C_FLDSP ((v__1188, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__19 : bool) .
+ sail2_state_monad$returnS (if w__19 then T
+ else F))
+ | C_FSDSP ((v__1189, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__23 : bool) .
+ sail2_state_monad$returnS (if w__23 then T
+ else F))
+ | C_FLD ((v__1190, rs1, rd)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__27 : bool) .
+ sail2_state_monad$returnS (if w__27 then T
+ else F))
+ | C_FSD ((v__1191, rs1, rs2)) => sail2_state_monad$bindS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () )))) (\ (w__31 : bool) .
+ sail2_state_monad$returnS (if w__31 then T
+ else F))
+ | C_ILLEGAL (s) => sail2_state_monad$returnS T
+ | _ => sail2_state_monad$returnS F
)))`;
-(*val encdec_compressed_backwards_matches : mword ty16 -> bool*)
-
val _ = Define `
- ((encdec_compressed_backwards_matches:(16)words$word -> bool) arg_=
- (let v__618 = arg_ in
- if (((v__618 = (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1] : 16 words$word))))
- then
- T
- else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__618 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
- let (nz54 : 2 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
- let (nz3 : 1 bits) = ((subrange_vec_dec v__618 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nz2 : 1 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ ((encdec_compressed_backwards_matches:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((bool),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
+ (let v__1192 = arg_ in
+ if (((v__1192 = (0x0001w : 16 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (nz96 : 4 bits) = ((subrange_vec_dec v__1192 (( 10 : int):ii) (( 7 : int):ii) : 4 words$word)) in
+ let (nz54 : 2 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 11 : int):ii) : 2 words$word)) in
+ let (nz3 : 1 bits) = ((subrange_vec_dec v__1192 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nz2 : 1 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nz96
((concat_vec nz54 ((concat_vec nz3 nz2 : 2 words$word)) : 4 words$word))
- : 8 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzi87 : 2 bits) = ((subrange_vec_dec v__618 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
- let (nzi6 : 1 bits) = ((subrange_vec_dec v__618 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
- let (nzi5 : 1 bits) = ((subrange_vec_dec v__618 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
- let (nzi4 : 1 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
+ : 8 words$word)) <> (0x00w : 8 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzi5 nzi40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 32 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzi9 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzi87 : 2 bits) = ((subrange_vec_dec v__1192 (( 4 : int):ii) (( 3 : int):ii) : 2 words$word)) in
+ let (nzi6 : 1 bits) = ((subrange_vec_dec v__1192 (( 5 : int):ii) (( 5 : int):ii) : 1 words$word)) in
+ let (nzi5 : 1 bits) = ((subrange_vec_dec v__1192 (( 2 : int):ii) (( 2 : int):ii) : 1 words$word)) in
+ let (nzi4 : 1 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 6 : int):ii) : 1 words$word)) in
(((concat_vec nzi9
((concat_vec nzi87
((concat_vec nzi6 ((concat_vec nzi5 nzi4 : 2 words$word)) : 3 words$word))
: 5 words$word))
- : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ ((((((((regidx_to_regno ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)))) = ((regidx_to_regno (vec_of_bits [B0;B0;B0;B1;B0] : 5 words$word)))))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (imm17 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (imm1612 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- (((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B0] : 3 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B0;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (vec_of_bits [B1;B0;B0;B1;B1;B1] : 6 words$word)))) /\ ((((((((subrange_vec_dec v__618 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B0;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (nzui5 : 1 bits) = ((subrange_vec_dec v__618 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
- let (nzui40 : 5 bits) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = ((bool_to_bits F : 1 words$word))))))))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B0] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- T
- else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (vec_of_bits [B1;B1;B1] : 3 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- T
- else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (vec_of_bits [B0;B0;B0;B0;B0;B1;B0] : 7 words$word)))))))))) then
- T
- else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- let (rd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B0] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else if (((v__618 = (vec_of_bits [B1;B0;B0;B1;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B1;B0] : 16 words$word)))) then
- T
- else if ((((let (rsd : regidx) = ((subrange_vec_dec v__618 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
- let (rs2 : regidx) = ((subrange_vec_dec v__618 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))) /\ ((((((((subrange_vec_dec v__618 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (vec_of_bits [B1;B0;B0;B1] : 4 words$word)))) /\ (((((subrange_vec_dec v__618 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))))))))) then
- T
- else T))`;
+ : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00010w : 5 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (imm17 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))))))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (nzui5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b100w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 10 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100011w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100111w : 6 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 5 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((((concat_vec nzui5 nzui40 : 6 words$word)) <> (0b000000w : 6 words$word)))) /\ ((((((rsd <> zreg))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word)))))))))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rd <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b110w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS T
+ else if (((((((( 64 : int):ii) = (( 64 : int):ii)))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs1 : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rs1 <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000010w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ let (rd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ ((((rd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x8w : 4 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if (((v__1192 = (0x9002w : 16 words$word)))) then sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (rs2 : regidx) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ ((((rsd <> zreg))) /\ (((rs2 <> zreg))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x9w : 4 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (im5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (im40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec im5 im40 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ (rsd <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 12 : int):ii) : 4 words$word)) = (0x0w : 4 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b010w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (imm17 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (imm1612 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((concat_vec imm17 imm1612 : 6 words$word)) <> (0b000000w : 6 words$word))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ ((((((((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) = (0b00000w : 5 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100000000w : 9 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rs2 : regidx) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (rs2 <> zreg)) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 7 : int):ii) : 9 words$word)) = (0b100100000w : 9 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((let (rsd : regidx) = ((subrange_vec_dec v__1192 (( 11 : int):ii) (( 7 : int):ii) : 5 words$word)) in
+ let (nzui5 : 1 bits) = ((subrange_vec_dec v__1192 (( 12 : int):ii) (( 12 : int):ii) : 1 words$word)) in
+ let (nzui40 : 5 bits) = ((subrange_vec_dec v__1192 (( 6 : int):ii) (( 2 : int):ii) : 5 words$word)) in
+ (((((((((concat_vec nzui5 nzui40 : 6 words$word)) = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) /\ (((((((( 64 : int):ii) = (( 64 : int):ii)))) \/ (((nzui5 = (0b0w : 1 words$word))))))))) /\ ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b000w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100000w : 6 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else if ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 10 : int):ii) : 6 words$word)) = (0b100001w : 6 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 6 : int):ii) (( 0 : int):ii) : 7 words$word)) = (0b0000001w : 7 words$word))))))) then
+ sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__4 : bool) .
+ if w__4 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__9 : bool) .
+ if w__9 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b011w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__14 : bool) .
+ if w__14 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS ((((( 64 : int):ii) = (( 32 : int):ii))))) (sail2_state$and_boolS ((haveRVC () )) ((haveFExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b111w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__19 : bool) .
+ if w__19 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__24 : bool) .
+ if w__24 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))))) (\ (w__29 : bool) .
+ if w__29 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b001w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__34 : bool) .
+ if w__34 then sail2_state_monad$returnS T
+ else sail2_state_monad$bindS
+ (sail2_state$and_boolS
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii))))))))
+ (sail2_state$and_boolS ((haveRVC () )) ((haveDExt () ))))
+ (sail2_state_monad$returnS ((((((((subrange_vec_dec v__1192 (( 15 : int):ii) (( 13 : int):ii) : 3 words$word)) = (0b101w : 3 words$word)))) /\ (((((subrange_vec_dec v__1192 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))))) (\ (w__39 : bool) .
+ sail2_state_monad$returnS (if w__39 then T
+ else T)))))))))))`;
(*val execute_WFI : unit -> M Retired*)
@@ -21287,7 +31393,7 @@ val _ = Define `
Machine => sail2_state_monad$seqS (platform_wfi () ) (sail2_state_monad$returnS RETIRE_SUCCESS)
| Supervisor => sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__1 : Mstatus) .
- if (((((get_Mstatus_TW w__1 : 1 words$word)) = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$seqS
+ if (((((get_Mstatus_TW w__1 : 1 words$word)) = (0b1w : 1 words$word)))) then sail2_state_monad$seqS
(handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$seqS (platform_wfi () ) (sail2_state_monad$returnS RETIRE_SUCCESS))
| User => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
@@ -21299,45 +31405,100 @@ val _ = Define `
val _ = Define `
((execute_UTYPE:(20)words$word ->(5)words$word -> uop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rd op=
(let (off : xlenbits) =
- ((EXTS (( 64 : int):ii)
- ((concat_vec imm (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0;B0] : 12 words$word)
- : 32 words$word))
- : 64 words$word)) in sail2_state_monad$bindS
+ ((EXTS (( 64 : int):ii) ((concat_vec imm (0x000w : 12 words$word) : 32 words$word)) : 64 words$word)) in sail2_state_monad$bindS
(case op of
RISCV_LUI => sail2_state_monad$returnS off
| RISCV_AUIPC => sail2_state_monad$bindS
(get_arch_pc () : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
sail2_state_monad$returnS ((add_vec w__0 off : 64 words$word)))
) (\ (ret : xlenbits) . sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ret) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ret) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_URET : unit -> M Retired*)
val _ = Define `
((execute_URET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (haveUsrMode () ) (\ (w__0 : bool) . sail2_state_monad$seqS
- (if ((~ w__0)) then handle_illegal ()
+ (sail2_state$or_boolS ( sail2_state_monad$bindS(haveUsrMode () ) (\ (w__0 : bool) . sail2_state_monad$returnS ((~ w__0))))
+ (sail2_state_monad$returnS ((~ ((sys_enable_next () )))))) (\ (w__1 : bool) . sail2_state_monad$seqS
+ (if w__1 then handle_illegal ()
+ else if ((~ ((ext_check_xret_priv User)))) then sail2_state_monad$returnS ((ext_fail_xret_priv () ))
else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) . sail2_state_monad$bindS
- (exception_handler w__1 (CTL_URET () ) w__2 : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
- set_next_pc w__3))))
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__3 : 64 words$word) . sail2_state_monad$bindS
+ (exception_handler w__2 (CTL_URET () ) w__3 : ( 64 words$word) M) (\ (w__4 : 64 words$word) .
+ set_next_pc w__4))))
(sail2_state_monad$returnS RETIRE_FAIL))))`;
+(*val execute_STORE_FP : mword ty12 -> mword ty5 -> mword ty5 -> word_width -> M Retired*)
+
+val _ = Define `
+ ((execute_STORE_FP:(12)words$word ->(5)words$word ->(5)words$word -> word_width ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 width=
+ (let (offset : xlenbits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in
+ let (aq, rl, con) = (F, F, F) in sail2_state_monad$bindS
+ (ext_data_get_addr rs1 offset (Write Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (case w__0 of
+ Ext_DataAddr_Error (e) =>
+ let (_ : unit) = (ext_handle_data_check_error e) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ | Ext_DataAddr_OK (vaddr) =>
+ if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
+ else sail2_state_monad$bindS
+ (translateAddr vaddr (Write Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
+ TR_Result) .
+ (case w__1 of
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
+ (case width of
+ BYTE => sail2_state_monad$returnS (MemValue () )
+ | HALF => sail2_state_monad$returnS (MemValue () )
+ | WORD => mem_write_ea addr (( 4 : int):ii) aq rl F
+ | DOUBLE => mem_write_ea addr (( 8 : int):ii) aq rl F
+ ) (\ (eares : unit MemoryOpResult) .
+ (case eares of
+ MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | MemValue (_) => sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val .
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__332) => sail2_state_monad$seqS (handle_illegal () )
+ (sail2_state_monad$returnS RETIRE_FAIL)
+ | (HALF, g__333) => sail2_state_monad$seqS (handle_illegal () )
+ (sail2_state_monad$returnS RETIRE_FAIL)
+ | (WORD, g__334) => sail2_state_monad$bindS
+ (mem_write_value addr (( 4 : int): ii)
+ ((subrange_vec_dec rs2_val (( 31 : int): ii)
+ (( 0 : int): ii) : 32 words$word)) aq
+ rl con)
+ (\ (w__4 : bool MemoryOpResult) .
+ process_fstore vaddr w__4)
+ | (DOUBLE, l__9) =>
+ if (((l__9 = (( 64 : int): ii)))) then
+ sail2_state_monad$bindS
+ (mem_write_value addr (( 8 : int): ii) rs2_val aq rl con)
+ (\ (w__6 : bool MemoryOpResult) . process_fstore vaddr w__6) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at model/riscv_insts_fext.sail 401:14 - 406:15")
+ (sail2_state_monad$exitS () )
+ ))
+ ))
+ ))
+ ))))`;
+
+
(*val execute_STORECON : bool -> bool -> mword ty5 -> mword ty5 -> word_width -> mword ty5 -> M Retired*)
val _ = Define `
((execute_STORECON:bool -> bool ->(5)words$word ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) aq rl rs2 rs1 width rd= (sail2_state_monad$bindS
(speculate_conditional_success () ) (\ (w__0 : bool) .
if (((w__0 = F))) then sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTZ (( 64 : int):ii) (vec_of_bits [B1] : 1 words$word) : 64 words$word)))
- (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (wX_bits rd ((EXTZ (( 64 : int):ii) (0b1w : 1 words$word) : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)
else sail2_state_monad$bindS
(haveAtomics () ) (\ (w__1 : bool) .
if w__1 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) Write width) (\ (w__2 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) (Write Data) width) (\ (w__2 : unit
Ext_DataAddr_Check) .
(case w__2 of
Ext_DataAddr_Error (e) =>
@@ -21347,53 +31508,65 @@ val _ = Define `
let (aligned : bool) =
((case width of
BYTE => T
- | HALF =>
- (((cast_unit_vec0 ((access_vec_dec vaddr (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word))
+ | HALF => (((subrange_vec_dec vaddr (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))
| WORD =>
- (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))
+ (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))
| DOUBLE =>
- (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word))
+ (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (0b000w : 3 words$word))
)) in
- if ((~ aligned)) then sail2_state_monad$seqS (handle_mem_exception vaddr E_SAMO_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if ((~ aligned)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else if (((((match_reservation vaddr)) = F))) then sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTZ (( 64 : int):ii) (vec_of_bits [B1] : 1 words$word) : 64 words$word)))
+ (wX_bits rd ((EXTZ (( 64 : int):ii) (0b1w : 1 words$word) : 64 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
else sail2_state_monad$bindS
- (translateAddr vaddr Write : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__3 : (( 64 words$word), ExceptionType)
+ (translateAddr vaddr (Write Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__3 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__3 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
- (case (width, (( 64 : int):ii)) of
- (WORD, g__10) => mem_write_ea addr (( 4 : int):ii) aq rl T
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then mem_write_ea addr (( 8 : int):ii) aq rl T
- else internal_error "STORECON expected word or double"
- | _ => internal_error "STORECON expected word or double"
- ) (\ (eares : unit MemoryOpResult) .
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__317) => mem_write_ea addr (( 1 : int): ii) (((aq /\ rl)))
+ rl T
+ | (HALF, g__318) => mem_write_ea addr (( 2 : int): ii) (((aq /\ rl)))
+ rl T
+ | (WORD, g__319) => mem_write_ea addr (( 4 : int): ii) (((aq /\ rl)))
+ rl T
+ | (DOUBLE, l__4) =>
+ if (((l__4 = (( 64 : int): ii)))) then
+ mem_write_ea addr (( 8 : int): ii) (((aq /\ rl))) rl T else
+ internal_error "STORECON expected word or double"
+ ) (\ (eares : unit MemoryOpResult) .
(case eares of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (_) => sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val . sail2_state_monad$bindS
- (case (width, (( 64 : int):ii)) of
- (WORD, g__9) =>
- mem_write_value addr (( 4 : int):ii)
- ((subrange_vec_dec rs2_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) aq rl T
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then mem_write_value addr (( 8 : int):ii) rs2_val aq rl T
- else internal_error "STORECON expected word or double"
- | _ => internal_error "STORECON expected word or double"
- ) (\ (res : bool MemoryOpResult) .
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val . sail2_state_monad$bindS
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__314) =>
+ mem_write_value addr (( 1 : int): ii)
+ ((subrange_vec_dec rs2_val (( 7 : int): ii) (( 0 : int): ii) : 8 words$word))
+ (((aq /\ rl))) rl T
+ | (HALF, g__315) =>
+ mem_write_value addr (( 2 : int): ii)
+ ((subrange_vec_dec rs2_val (( 15 : int): ii) (( 0 : int): ii) : 16 words$word))
+ (((aq /\ rl))) rl T
+ | (WORD, g__316) =>
+ mem_write_value addr (( 4 : int): ii)
+ ((subrange_vec_dec rs2_val (( 31 : int): ii) (( 0 : int): ii) : 32 words$word))
+ (((aq /\ rl))) rl T
+ | (DOUBLE, l__3) =>
+ if (((l__3 = (( 64 : int): ii)))) then
+ mem_write_value addr (( 8 : int): ii) rs2_val (((aq /\ rl))) rl T else
+ internal_error "STORECON expected word or double"
+ ) (\ (res : bool MemoryOpResult) .
(case res of
MemValue (T) => sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
- ((EXTZ (( 64 : int):ii) (vec_of_bits [B0] : 1 words$word) : 64 words$word)))
+ (wX_bits rd ((EXTZ (( 64 : int):ii) (0b0w : 1 words$word) : 64 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
| MemValue (F) => sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
- ((EXTZ (( 64 : int):ii) (vec_of_bits [B1] : 1 words$word) : 64 words$word)))
+ (wX_bits rd ((EXTZ (( 64 : int):ii) (0b1w : 1 words$word) : 64 words$word)))
(let (_ : unit) = (cancel_reservation () ) in
sail2_state_monad$returnS RETIRE_SUCCESS)
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
@@ -21409,46 +31582,46 @@ val _ = Define `
val _ = Define `
((execute_STORE:(12)words$word ->(5)words$word ->(5)words$word -> word_width -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 width aq rl=
(let (offset : xlenbits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in sail2_state_monad$bindS
- (ext_data_get_addr rs1 offset Write width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (ext_data_get_addr rs1 offset (Write Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
(case w__0 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) =>
if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
- (handle_mem_exception vaddr E_SAMO_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ (handle_mem_exception vaddr (E_SAMO_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Write : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
+ (translateAddr vaddr (Write Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__1 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((paddr, _)) => sail2_state_monad$bindS
(case width of
- BYTE => mem_write_ea addr (( 1 : int):ii) aq rl F
- | HALF => mem_write_ea addr (( 2 : int):ii) aq rl F
- | WORD => mem_write_ea addr (( 4 : int):ii) aq rl F
- | DOUBLE => mem_write_ea addr (( 8 : int):ii) aq rl F
+ BYTE => mem_write_ea paddr (( 1 : int):ii) aq rl F
+ | HALF => mem_write_ea paddr (( 2 : int):ii) aq rl F
+ | WORD => mem_write_ea paddr (( 4 : int):ii) aq rl F
+ | DOUBLE => mem_write_ea paddr (( 8 : int):ii) aq rl F
) (\ (eares : unit MemoryOpResult) .
(case eares of
- MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (_) => sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val . sail2_state_monad$bindS
(case (width, (( 64 : int): ii)) of
- (BYTE, g__3) =>
- mem_write_value addr (( 1 : int): ii)
+ (BYTE, g__306) =>
+ mem_write_value paddr (( 1 : int): ii)
((subrange_vec_dec rs2_val (( 7 : int): ii) (( 0 : int): ii) : 8 words$word))
aq rl F
- | (HALF, g__4) =>
- mem_write_value addr (( 2 : int): ii)
+ | (HALF, g__307) =>
+ mem_write_value paddr (( 2 : int): ii)
((subrange_vec_dec rs2_val (( 15 : int): ii) (( 0 : int): ii) : 16 words$word))
aq rl F
- | (WORD, g__5) =>
- mem_write_value addr (( 4 : int): ii)
+ | (WORD, g__308) =>
+ mem_write_value paddr (( 4 : int): ii)
((subrange_vec_dec rs2_val (( 31 : int): ii) (( 0 : int): ii) : 32 words$word))
aq rl F
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int): ii)))) then
- mem_write_value addr (( 8 : int): ii) rs2_val aq rl F else
+ | (DOUBLE, l__1) =>
+ if (((l__1 = (( 64 : int): ii)))) then
+ mem_write_value paddr (( 8 : int): ii) rs2_val aq rl F else
sail2_state_monad$seqS
(sail2_state_monad$assert_expS F
"Pattern match failure at model/riscv_insts_base.sail 394:47 - 399:15")
@@ -21457,7 +31630,7 @@ val _ = Define `
(case res of
MemValue (T) => sail2_state_monad$returnS RETIRE_SUCCESS
| MemValue (F) => internal_error "store got false from mem_write_value"
- | MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | MemException (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
)))
))
))
@@ -21468,37 +31641,31 @@ val _ = Define `
val _ = Define `
((execute_SRET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$seqS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$bindS
(case w__0 of
- User => handle_illegal ()
- | Supervisor => sail2_state_monad$bindS
- (sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
+ User => sail2_state_monad$returnS T
+ | Supervisor =>
+ sail2_state$or_boolS ( sail2_state_monad$bindS(haveSupMode () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))
( sail2_state_monad$bindS(sail2_state_monad$read_regS mstatus_ref) (\ (w__2 : Mstatus) .
- sail2_state_monad$returnS (((((get_Mstatus_TSR w__2 : 1 words$word)) = ((bool_to_bits T : 1 words$word)))))))) (\ (w__3 :
- bool) .
- if w__3 then handle_illegal ()
- else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__4 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__5 : 64 words$word) . sail2_state_monad$bindS
- (exception_handler w__4 (CTL_SRET () ) w__5 : ( 64 words$word) M) (\ (w__6 : 64 words$word) .
- set_next_pc w__6))))
- | Machine => sail2_state_monad$bindS
- (haveSupMode () ) (\ (w__7 : bool) .
- if ((~ w__7)) then handle_illegal ()
- else sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__8 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__9 : 64 words$word) . sail2_state_monad$bindS
- (exception_handler w__8 (CTL_SRET () ) w__9 : ( 64 words$word) M) (\ (w__10 : 64 words$word) .
- set_next_pc w__10))))
- )
- (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ sail2_state_monad$returnS (((((get_Mstatus_TSR w__2 : 1 words$word)) = (0b1w : 1 words$word))))))
+ | Machine => sail2_state_monad$bindS (haveSupMode () ) (\ (w__4 : bool) . sail2_state_monad$returnS ((~ w__4)))
+ ) (\ (sret_illegal : bool) .
+ if sret_illegal then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if ((~ ((ext_check_xret_priv Supervisor)))) then
+ let (_ : unit) = (ext_fail_xret_priv () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__5 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__6 : 64 words$word) . sail2_state_monad$bindS
+ (exception_handler w__5 (CTL_SRET () ) w__6 : ( 64 words$word) M) (\ (w__7 : 64 words$word) . sail2_state_monad$seqS
+ (set_next_pc w__7) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
(*val execute_SHIFTW : mword ty5 -> mword ty5 -> mword ty5 -> sop -> M Retired*)
val _ = Define `
((execute_SHIFTW:(5)words$word ->(5)words$word ->(5)words$word -> sop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let rs1_val = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (result : 32 bits) =
((case op of
@@ -21506,14 +31673,14 @@ val _ = Define `
| RISCV_SRLI => (shift_bits_right rs1_val shamt : 32 words$word)
| RISCV_SRAI => (shift_right_arith32 rs1_val shamt : 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SHIFTIWOP : mword ty5 -> mword ty5 -> mword ty5 -> sopw -> M Retired*)
val _ = Define `
((execute_SHIFTIWOP:(5)words$word ->(5)words$word ->(5)words$word -> sopw ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val .
let (result : 32 bits) =
((case op of
RISCV_SLLIW =>
@@ -21526,51 +31693,47 @@ val _ = Define `
(shift_right_arith32 ((subrange_vec_dec rs1_val (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) shamt
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SHIFTIOP : mword ty6 -> mword ty5 -> mword ty5 -> sop -> M Retired*)
val _ = Define `
((execute_SHIFTIOP:(6)words$word ->(5)words$word ->(5)words$word -> sop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) shamt rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val .
let (result : xlenbits) =
((case op of
RISCV_SLLI => (shift_bits_left rs1_val shamt : 64 words$word)
| RISCV_SRLI => (shift_bits_right rs1_val shamt : 64 words$word)
| RISCV_SRAI => (shift_right_arith64 rs1_val shamt : 64 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_SFENCE_VMA : mword ty5 -> mword ty5 -> M Retired*)
val _ = Define `
((execute_SFENCE_VMA:(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs1 rs2= (sail2_state_monad$bindS
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then sail2_state_monad$returnS NONE
- else sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__0))) (\ (addr : xlenbits option) . sail2_state_monad$bindS
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then sail2_state_monad$returnS NONE
- else sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
- sail2_state_monad$returnS (SOME w__1))) (\ (asid : xlenbits option) . sail2_state_monad$bindS
+ (if (((rs1 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS NONE
+ else sail2_state_monad$bindS (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$returnS (SOME w__0))) (\ (addr :
+ xlenbits option) . sail2_state_monad$bindS
+ (if (((rs2 = (0b00000w : 5 words$word)))) then sail2_state_monad$returnS NONE
+ else sail2_state_monad$bindS (rX_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) . sail2_state_monad$returnS (SOME w__1))) (\ (asid :
+ xlenbits option) . sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__2 : Privilege) .
(case w__2 of
User => sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
| Supervisor => sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__3 : Mstatus) . sail2_state_monad$bindS
(sail2_state_monad$read_regS mstatus_ref) (\ (w__4 : Mstatus) .
- let p__7 =
+ let p__310 =
(architecture ((get_mstatus_SXL w__3 : 2 words$word)), (get_Mstatus_TVM w__4 : 1 words$word)) in
- (case p__7 of
- (SOME (g__6), v_0) =>
- if (((v_0 = ((bool_to_bits T : 1 words$word))))) then sail2_state_monad$seqS
- (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
- else if (((v_0 = ((bool_to_bits F : 1 words$word))))) then sail2_state_monad$seqS
- (flush_TLB asid addr) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ (case p__310 of
+ (SOME (g__309), b__0) =>
+ if (((b__0 = (0b1w : 1 words$word)))) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if (((b__0 = (0b0w : 1 words$word)))) then sail2_state_monad$seqS (flush_TLB asid addr) (sail2_state_monad$returnS RETIRE_SUCCESS)
else
- (case (SOME g__6, v_0) of
+ (case (SOME g__309, b__0) of
(_, _) => internal_error "unimplemented sfence architecture"
)
| (_, _) => internal_error "unimplemented sfence architecture"
@@ -21583,9 +31746,9 @@ val _ = Define `
val _ = Define `
((execute_RTYPEW:(5)words$word ->(5)words$word ->(5)words$word -> ropw ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let rs1_val = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
let rs2_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (result : 32 bits) =
((case op of
@@ -21601,15 +31764,15 @@ val _ = Define `
(shift_right_arith32 rs1_val ((subrange_vec_dec rs2_val (( 4 : int):ii) (( 0 : int):ii) : 5 words$word))
: 32 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
+ (wX_bits rd ((EXTS (( 64 : int):ii) result : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
(*val execute_RTYPE : mword ty5 -> mword ty5 -> mword ty5 -> rop -> M Retired*)
val _ = Define `
((execute_RTYPE:(5)words$word ->(5)words$word ->(5)words$word -> rop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val .
let (result : xlenbits) =
((case op of
RISCV_ADD => (add_vec rs1_val rs2_val : 64 words$word)
@@ -21631,14 +31794,14 @@ val _ = Define `
(shift_right_arith64 rs1_val ((subrange_vec_dec rs2_val (( 5 : int):ii) (( 0 : int):ii) : 6 words$word))
: 64 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
(*val execute_RISCV_JALR : mword ty12 -> mword ty5 -> mword ty5 -> M Retired*)
val _ = Define `
((execute_RISCV_JALR:(12)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let (t : xlenbits) = ((add_vec w__0 ((EXTS (( 64 : int):ii) imm : 64 words$word)) : 64 words$word)) in
(case ((ext_control_check_addr t)) of
Ext_ControlAddr_Error (e) =>
@@ -21648,10 +31811,10 @@ val _ = Define `
let target = ((update_vec_dec addr (( 0 : int):ii) B0 : 64 words$word)) in sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
(get_next_pc () : ( 64 words$word) M) (\ (w__3 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
))))`;
@@ -21668,10 +31831,10 @@ val _ = Define `
| Ext_ControlAddr_OK (target) => sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
(get_next_pc () : ( 64 words$word) M) (\ (w__3 : 64 words$word) . sail2_state_monad$seqS (sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd w__3) (set_next_pc target)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
))))`;
@@ -21681,14 +31844,14 @@ val _ = Define `
((execute_REMW:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (r : ii) = (if (((rs2_int = (( 0 : int):ii)))) then rs1_int else hardware_mod rs1_int rs2_int) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 64 : int):ii) ((to_bits (( 32 : int):ii) r : 32 words$word)) : 64 words$word)))
+ (wX_bits rd ((EXTS (( 64 : int):ii) ((to_bits (( 32 : int):ii) r : 32 words$word)) : 64 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21699,12 +31862,12 @@ val _ = Define `
((execute_REM:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (r : ii) = (if (((rs2_int = (( 0 : int):ii)))) then rs1_int else hardware_mod rs1_int rs2_int) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((to_bits (( 64 : int):ii) r : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd ((to_bits (( 64 : int):ii) r : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21714,9 +31877,9 @@ val _ = Define `
((execute_MULW:(5)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (integer_word$w2i rs1_val) in
let (rs2_int : ii) = (integer_word$w2i rs2_val) in
@@ -21725,7 +31888,7 @@ val _ = Define `
(( 0 : int):ii)
: 32 words$word)) in
let (result : xlenbits) = ((EXTS (( 64 : int):ii) result32 : 64 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21735,8 +31898,8 @@ val _ = Define `
((execute_MUL:(5)words$word ->(5)words$word ->(5)words$word -> bool -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd high signed1 signed2= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if signed1 then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if signed2 then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let result_wide =
@@ -21747,7 +31910,7 @@ val _ = Define `
(( 64 : int):ii)
: 64 words$word)
else (subrange_vec_dec result_wide (((( 64 : int):ii) - (( 1 : int):ii))) (( 0 : int):ii) : 64 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21755,15 +31918,61 @@ val _ = Define `
val _ = Define `
((execute_MRET:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) . sail2_state_monad$seqS
- (if (((((privLevel_to_bits w__0 : 2 words$word)) = ((privLevel_to_bits Machine : 2 words$word)))))
- then sail2_state_monad$bindS
- (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
- (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) . sail2_state_monad$bindS
- (exception_handler w__1 (CTL_MRET () ) w__2 : ( 64 words$word) M) (\ (w__3 : 64 words$word) .
- set_next_pc w__3)))
- else handle_illegal () )
- (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__0 : Privilege) .
+ if (((w__0 <> Machine))) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
+ else if ((~ ((ext_check_xret_priv Machine)))) then
+ let (_ : unit) = (ext_fail_xret_priv () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__1 : Privilege) . sail2_state_monad$bindS
+ (sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) . sail2_state_monad$bindS
+ (exception_handler w__1 (CTL_MRET () ) w__2 : ( 64 words$word) M) (\ (w__3 : 64 words$word) . sail2_state_monad$seqS
+ (set_next_pc w__3) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+
+
+(*val execute_LOAD_FP : mword ty12 -> mword ty5 -> mword ty5 -> word_width -> M Retired*)
+
+val _ = Define `
+ ((execute_LOAD_FP:(12)words$word ->(5)words$word ->(5)words$word -> word_width ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd width=
+ (let (offset : xlenbits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in sail2_state_monad$bindS
+ (ext_data_get_addr rs1 offset (Read Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (case w__0 of
+ Ext_DataAddr_Error (e) =>
+ let (_ : unit) = (ext_handle_data_check_error e) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ | Ext_DataAddr_OK (vaddr) =>
+ if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
+ else sail2_state_monad$bindS
+ (translateAddr vaddr (Read Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
+ TR_Result) .
+ (case w__1 of
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) =>
+ let (aq, rl, res) = (F, F, F) in
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__329) => sail2_state_monad$seqS (handle_illegal () )
+ (sail2_state_monad$returnS RETIRE_FAIL)
+ | (HALF, g__330) => sail2_state_monad$seqS (handle_illegal () )
+ (sail2_state_monad$returnS RETIRE_FAIL)
+ | (WORD, g__331) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 4 : int): ii)
+ aq rl res : ( ( 32 words$word) MemoryOpResult) M)
+ (\ (w__2 : ( 32 words$word) MemoryOpResult) .
+ process_fload32 rd vaddr w__2)
+ | (DOUBLE, l__8) =>
+ if (((l__8 = (( 64 : int): ii)))) then
+ sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 8 : int): ii) aq rl res : ( ( 64 words$word) MemoryOpResult) M)
+ (\ (w__4 : ( 64 words$word) MemoryOpResult) .
+ process_fload64 rd vaddr w__4) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at model/riscv_insts_fext.sail 331:10 - 338:11")
+ (sail2_state_monad$exitS () )
+ )
+ ))
+ ))))`;
(*val execute_LOADRES : bool -> bool -> mword ty5 -> word_width -> mword ty5 -> M Retired*)
@@ -21772,7 +31981,7 @@ val _ = Define `
((execute_LOADRES:bool -> bool ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) aq rl rs1 width rd= (sail2_state_monad$bindS
(haveAtomics () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) Read width) (\ (w__1 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) (Read Data) width) (\ (w__1 : unit
Ext_DataAddr_Check) .
(case w__1 of
Ext_DataAddr_Error (e) =>
@@ -21782,33 +31991,47 @@ val _ = Define `
let (aligned : bool) =
((case width of
BYTE => T
- | HALF =>
- (((cast_unit_vec0 ((access_vec_dec vaddr (( 0 : int):ii))) : 1 words$word)) = (vec_of_bits [B0] : 1 words$word))
- | WORD =>
- (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))
+ | HALF => (((subrange_vec_dec vaddr (( 0 : int):ii) (( 0 : int):ii) : 1 words$word)) = (0b0w : 1 words$word))
+ | WORD => (((subrange_vec_dec vaddr (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))
| DOUBLE =>
- (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (vec_of_bits [B0;B0;B0] : 3 words$word))
+ (((subrange_vec_dec vaddr (( 2 : int):ii) (( 0 : int):ii) : 3 words$word)) = (0b000w : 3 words$word))
)) in
- if ((~ aligned)) then sail2_state_monad$seqS (handle_mem_exception vaddr E_Load_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if ((~ aligned)) then sail2_state_monad$seqS
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Read : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 64 words$word), ExceptionType)
+ (translateAddr vaddr (Read Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__2 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) =>
- (case (width, (( 64 : int):ii)) of
- (WORD, g__8) => sail2_state_monad$bindS
- (mem_read Read addr (( 4 : int):ii) aq rl T : ( ( 32 words$word)MemoryOpResult) M) (\ (w__3 : ( 32 words$word)
- MemoryOpResult) .
- process_loadres rd vaddr w__3 F)
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then sail2_state_monad$bindS
- (mem_read Read addr (( 8 : int):ii) aq rl T : ( ( 64 words$word)MemoryOpResult) M) (\ (w__5 : ( 64 words$word)
- MemoryOpResult) .
- process_loadres rd vaddr w__5 F)
- else internal_error "LOADRES expected WORD or DOUBLE"
- | _ => internal_error "LOADRES expected WORD or DOUBLE"
- )
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) =>
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__311) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 1 : int): ii)
+ aq (((aq /\ rl))) T
+ : ( ( 8 words$word) MemoryOpResult) M)
+ (\ (w__3 : ( 8 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__3 F)
+ | (HALF, g__312) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 2 : int): ii)
+ aq (((aq /\ rl))) T
+ : ( ( 16 words$word) MemoryOpResult) M)
+ (\ (w__5 : ( 16 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__5 F)
+ | (WORD, g__313) => sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 4 : int): ii)
+ aq (((aq /\ rl))) T
+ : ( ( 32 words$word) MemoryOpResult) M)
+ (\ (w__7 : ( 32 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__7 F)
+ | (DOUBLE, l__2) =>
+ if (((l__2 = (( 64 : int): ii)))) then
+ sail2_state_monad$bindS
+ (mem_read (Read Data) addr (( 8 : int): ii) aq (((aq /\ rl))) T
+ : ( ( 64 words$word) MemoryOpResult) M)
+ (\ (w__9 : ( 64 words$word) MemoryOpResult) .
+ process_loadres rd vaddr w__9 F) else
+ internal_error "Unexpected AMO width"
+ )
))
))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -21819,37 +32042,40 @@ val _ = Define `
val _ = Define `
((execute_LOAD:(12)words$word ->(5)words$word ->(5)words$word -> bool -> word_width -> bool -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd is_unsigned width aq rl=
(let (offset : xlenbits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in sail2_state_monad$bindS
- (ext_data_get_addr rs1 offset Read width) (\ (w__0 : unit Ext_DataAddr_Check) .
+ (ext_data_get_addr rs1 offset (Read Data) width) (\ (w__0 : unit Ext_DataAddr_Check) .
(case w__0 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) =>
if ((check_misaligned vaddr width)) then sail2_state_monad$seqS
- (handle_mem_exception vaddr E_Load_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ (handle_mem_exception vaddr (E_Load_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (translateAddr vaddr Read : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
+ (translateAddr vaddr (Read Data) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__1 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__1 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) =>
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((paddr, _)) =>
(case (width, (( 64 : int): ii)) of
- (BYTE, g__0) => sail2_state_monad$bindS
- (mem_read Read addr (( 1 : int): ii) aq rl F : ( ( 8 words$word) MemoryOpResult) M)
- (\ (w__2 : ( 8 words$word) MemoryOpResult) .
- process_load rd vaddr w__2 is_unsigned)
- | (HALF, g__1) => sail2_state_monad$bindS
- (mem_read Read addr (( 2 : int): ii) aq rl F : ( ( 16 words$word) MemoryOpResult) M)
- (\ (w__4 : ( 16 words$word) MemoryOpResult) .
- process_load rd vaddr w__4 is_unsigned)
- | (WORD, g__2) => sail2_state_monad$bindS
- (mem_read Read addr (( 4 : int): ii) aq rl F : ( ( 32 words$word) MemoryOpResult) M)
- (\ (w__6 : ( 32 words$word) MemoryOpResult) .
- process_load rd vaddr w__6 is_unsigned)
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int): ii)))) then
+ (BYTE, g__303) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 1 : int): ii)
+ aq rl F : ( ( 8 words$word) MemoryOpResult) M)
+ (\ (w__2 : ( 8 words$word) MemoryOpResult) .
+ process_load rd vaddr w__2 is_unsigned)
+ | (HALF, g__304) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 2 : int): ii)
+ aq rl F : ( ( 16 words$word) MemoryOpResult) M)
+ (\ (w__4 : ( 16 words$word) MemoryOpResult) .
+ process_load rd vaddr w__4 is_unsigned)
+ | (WORD, g__305) => sail2_state_monad$bindS
+ (mem_read (Read Data) paddr (( 4 : int): ii)
+ aq rl F : ( ( 32 words$word) MemoryOpResult) M)
+ (\ (w__6 : ( 32 words$word) MemoryOpResult) .
+ process_load rd vaddr w__6 is_unsigned)
+ | (DOUBLE, l__0) =>
+ if (((l__0 = (( 64 : int): ii)))) then
sail2_state_monad$bindS
- (mem_read Read addr (( 8 : int): ii) aq rl F : ( ( 64 words$word) MemoryOpResult) M)
+ (mem_read (Read Data) paddr (( 8 : int): ii) aq rl F : ( ( 64 words$word) MemoryOpResult) M)
(\ (w__8 : ( 64 words$word) MemoryOpResult) .
process_load rd vaddr w__8 is_unsigned) else
sail2_state_monad$seqS
@@ -21865,7 +32091,7 @@ val _ = Define `
val _ = Define `
((execute_ITYPE:(12)words$word ->(5)words$word ->(5)words$word -> iop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val .
let (immext : xlenbits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in
let (result : xlenbits) =
((case op of
@@ -21878,7 +32104,7 @@ val _ = Define `
| RISCV_ORI => (or_vec rs1_val immext : 64 words$word)
| RISCV_XORI => (xor_vec rs1_val immext : 64 words$word)
)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
+ (wX_bits rd result) (sail2_state_monad$returnS RETIRE_SUCCESS))))`;
(*val execute_ILLEGAL : mword ty32 -> M Retired*)
@@ -21887,16 +32113,509 @@ val _ = Define `
((execute_ILLEGAL:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s= (sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)))`;
+(*val execute_F_UN_TYPE_S : mword ty5 -> mword ty5 -> f_un_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_TYPE_S:(5)words$word ->(5)words$word -> f_un_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2=
+ (let merge_var = (arg0, arg1, arg2) in
+ (case merge_var of
+ (rs1, rd, FCLASS_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in
+ let (rd_val_10b : 10 bits) =
+ (if ((f_is_neg_inf_S rs1_val_S)) then (0b0000000001w : 10 words$word)
+ else if ((f_is_neg_norm_S rs1_val_S)) then (0b0000000010w : 10 words$word)
+ else if ((f_is_neg_subnorm_S rs1_val_S)) then (0b0000000100w : 10 words$word)
+ else if ((f_is_neg_zero_S rs1_val_S)) then (0b0000001000w : 10 words$word)
+ else if ((f_is_pos_zero_S rs1_val_S)) then (0b0000010000w : 10 words$word)
+ else if ((f_is_pos_subnorm_S rs1_val_S)) then (0b0000100000w : 10 words$word)
+ else if ((f_is_pos_norm_S rs1_val_S)) then (0b0001000000w : 10 words$word)
+ else if ((f_is_pos_inf_S rs1_val_S)) then (0b0010000000w : 10 words$word)
+ else if ((f_is_SNaN_S rs1_val_S)) then (0b0100000000w : 10 words$word)
+ else if ((f_is_QNaN_S rs1_val_S)) then (0b1000000000w : 10 words$word)
+ else (zeros_implicit (( 10 : int):ii) : 10 words$word)) in sail2_state_monad$seqS
+ (wX_bits rd ((EXTZ (( 64 : int):ii) rd_val_10b : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_X_W) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
+ let (rd_val_X : xlenbits) = ((EXTS (( 64 : int):ii) rs1_val_S : 64 words$word)) in sail2_state_monad$seqS
+ (wX_bits rd rd_val_X) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_W_X) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_X .
+ let rd_val_S = ((subrange_vec_dec rs1_val_X (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ )))`;
+
+
+(*val execute_F_UN_TYPE_D : mword ty5 -> mword ty5 -> f_un_op_D -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_TYPE_D:(5)words$word ->(5)words$word -> f_un_op_D ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2=
+ (let merge_var = (arg0, arg1, arg2) in
+ (case merge_var of
+ (rs1, rd, FCLASS_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D .
+ let (rd_val_10b : 10 bits) =
+ (if ((f_is_neg_inf_D rs1_val_D)) then (0b0000000001w : 10 words$word)
+ else if ((f_is_neg_norm_D rs1_val_D)) then (0b0000000010w : 10 words$word)
+ else if ((f_is_neg_subnorm_D rs1_val_D)) then (0b0000000100w : 10 words$word)
+ else if ((f_is_neg_zero_D rs1_val_D)) then (0b0000001000w : 10 words$word)
+ else if ((f_is_pos_zero_D rs1_val_D)) then (0b0000010000w : 10 words$word)
+ else if ((f_is_pos_subnorm_D rs1_val_D)) then (0b0000100000w : 10 words$word)
+ else if ((f_is_pos_norm_D rs1_val_D)) then (0b0001000000w : 10 words$word)
+ else if ((f_is_pos_inf_D rs1_val_D)) then (0b0010000000w : 10 words$word)
+ else if ((f_is_SNaN_D rs1_val_D)) then (0b0100000000w : 10 words$word)
+ else if ((f_is_QNaN_D rs1_val_D)) then (0b1000000000w : 10 words$word)
+ else (zeros_implicit (( 10 : int):ii) : 10 words$word)) in sail2_state_monad$seqS
+ (wX_bits rd ((EXTZ (( 64 : int):ii) rd_val_10b : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_X_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D .
+ let rd_val_X = rs1_val_D in sail2_state_monad$seqS
+ (wX_bits rd rd_val_X) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ | (rs1, rd, FMV_D_X) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_X .
+ let rd_val_D = rs1_val_X in sail2_state_monad$seqS
+ (wF_bits rd rd_val_D) (sail2_state_monad$returnS RETIRE_SUCCESS))
+ )))`;
+
+
+(*val execute_F_UN_RM_TYPE_S : mword ty5 -> rounding_mode -> mword ty5 -> f_un_rm_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_RM_TYPE_S:(5)words$word -> rounding_mode ->(5)words$word -> f_un_rm_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs1, rm, rd, FSQRT_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Sqrt rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_W_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToI32 rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_W) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 64 : int):ii) rd_val_W : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_WU_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToUi32 rm_3b rs1_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_WU) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 64 : int):ii) rd_val_WU : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_W) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_W = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_i32ToF32 rm_3b rs1_val_W : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_WU) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_WU = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_ui32ToF32 rm_3b rs1_val_WU : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_L_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToI64 rm_3b rs1_val_S : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_L) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val_L)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_LU_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToUi64 rm_3b rs1_val_S : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_LU) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val_LU)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_L) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_L . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_i64ToF32 rm_3b rs1_val_L : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_LU) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_LU . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_ui64ToF32 rm_3b rs1_val_LU : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ )))`;
+
+
+(*val execute_F_UN_RM_TYPE_D : mword ty5 -> rounding_mode -> mword ty5 -> f_un_rm_op_D -> M Retired*)
+
+val _ = Define `
+ ((execute_F_UN_RM_TYPE_D:(5)words$word -> rounding_mode ->(5)words$word -> f_un_rm_op_D ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs1, rm, rd, FSQRT_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64Sqrt rm_3b rs1_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_W_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64ToI32 rm_3b rs1_val_D : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_W) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 64 : int):ii) rd_val_W : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_WU_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64ToUi32 rm_3b rs1_val_D : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_WU) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTS (( 64 : int):ii) rd_val_WU : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_D_W) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_W = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_i32ToF64 rm_3b rs1_val_W : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_D_WU) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_WU = ((subrange_vec_dec w__0 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_ui32ToF64 rm_3b rs1_val_WU : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_S_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64ToF32 rm_3b rs1_val_D : (( 5 words$word # 32 words$word)) M) (\ varstup . let (fflags, rd_val_S) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_D_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__1 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__1 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f32ToF64 rm_3b rs1_val_S : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_L_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64ToI64 rm_3b rs1_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_L) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val_L)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_LU_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_f64ToUi64 rm_3b rs1_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_LU) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val_LU)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_D_L) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_L . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_i64ToF64 rm_3b rs1_val_L : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs1, rm, rd, FCVT_D_LU) => sail2_state_monad$bindS
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val_LU . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (riscv_ui64ToF64 rm_3b rs1_val_LU : (( 5 words$word # 64 words$word)) M) (\ varstup . let (fflags, rd_val_D) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ )))`;
+
+
+(*val execute_F_MADD_TYPE_S : mword ty5 -> mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_madd_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_MADD_TYPE_S:(5)words$word ->(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_madd_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs3 rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_32b = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_32b = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs3 : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ let rs3_val_32b = ((nan_unbox w__2 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__3 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__3 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FMADD_S =>
+ (riscv_f32MulAdd rm_3b rs1_val_32b rs2_val_32b rs3_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FMSUB_S =>
+ (riscv_f32MulAdd rm_3b rs1_val_32b rs2_val_32b ((negate_S rs3_val_32b : 32 words$word))
+ : (( 5 words$word # 32 words$word)) M)
+ | FNMSUB_S =>
+ (riscv_f32MulAdd rm_3b ((negate_S rs1_val_32b : 32 words$word)) rs2_val_32b rs3_val_32b
+ : (( 5 words$word # 32 words$word)) M)
+ | FNMADD_S =>
+ (riscv_f32MulAdd rm_3b ((negate_S rs1_val_32b : 32 words$word)) rs2_val_32b
+ ((negate_S rs3_val_32b : 32 words$word))
+ : (( 5 words$word # 32 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_32b : 32 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_32b : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
+
+
+(*val execute_F_MADD_TYPE_D : mword ty5 -> mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_madd_op_D -> M Retired*)
+
+val _ = Define `
+ ((execute_F_MADD_TYPE_D:(5)words$word ->(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_madd_op_D ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs3 rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_64b . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_64b . sail2_state_monad$bindS
+ (rF_bits rs3 : ( 64 words$word) M) (\ rs3_val_64b . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FMADD_D =>
+ (riscv_f64MulAdd rm_3b rs1_val_64b rs2_val_64b rs3_val_64b : (( 5 words$word # 64 words$word)) M)
+ | FMSUB_D =>
+ (riscv_f64MulAdd rm_3b rs1_val_64b rs2_val_64b ((negate_D rs3_val_64b : 64 words$word))
+ : (( 5 words$word # 64 words$word)) M)
+ | FNMSUB_D =>
+ (riscv_f64MulAdd rm_3b ((negate_D rs1_val_64b : 64 words$word)) rs2_val_64b rs3_val_64b
+ : (( 5 words$word # 64 words$word)) M)
+ | FNMADD_D =>
+ (riscv_f64MulAdd rm_3b ((negate_D rs1_val_64b : 64 words$word)) rs2_val_64b
+ ((negate_D rs3_val_64b : 64 words$word))
+ : (( 5 words$word # 64 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_64b : 64 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_64b)) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
+
+
+(*val execute_F_BIN_TYPE_S : mword ty5 -> mword ty5 -> mword ty5 -> f_bin_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_TYPE_S:(5)words$word ->(5)words$word ->(5)words$word -> f_bin_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs2, rs1, rd, FSGNJ_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S s2 e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJN_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S ((xor_vec (0b1w : 1 words$word) s2 : 1 words$word)) e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJX_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let (s1, e1, m1) = ((fsplit_S rs1_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let (s2, e2, m2) = ((fsplit_S rs2_val_S : ( 1 words$word # 8 words$word # 23 words$word))) in
+ let rd_val_S = ((fmake_S ((xor_vec s1 s2 : 1 words$word)) e1 m1 : 32 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd ((nan_box rd_val_S : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMIN_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let is_quiet = T in
+ let (rs1_lt_rs2, fflags) = ((fle_S rs1_val_S rs2_val_S is_quiet : (bool # 5 words$word))) in
+ let rd_val_S =
+ (if (((((f_is_NaN_S rs1_val_S)) /\ ((f_is_NaN_S rs2_val_S))))) then
+ (canonical_NaN_S () : 32 words$word)
+ else if ((f_is_NaN_S rs1_val_S)) then rs2_val_S
+ else if ((f_is_NaN_S rs2_val_S)) then rs1_val_S
+ else if (((((f_is_neg_zero_S rs1_val_S)) /\ ((f_is_pos_zero_S rs2_val_S))))) then
+ rs1_val_S
+ else if (((((f_is_neg_zero_S rs2_val_S)) /\ ((f_is_pos_zero_S rs1_val_S))))) then
+ rs2_val_S
+ else if rs1_lt_rs2 then rs1_val_S
+ else rs2_val_S) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMAX_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in
+ let is_quiet = T in
+ let (rs2_lt_rs1, fflags) = ((fle_S rs2_val_S rs1_val_S is_quiet : (bool # 5 words$word))) in
+ let rd_val_S =
+ (if (((((f_is_NaN_S rs1_val_S)) /\ ((f_is_NaN_S rs2_val_S))))) then
+ (canonical_NaN_S () : 32 words$word)
+ else if ((f_is_NaN_S rs1_val_S)) then rs2_val_S
+ else if ((f_is_NaN_S rs2_val_S)) then rs1_val_S
+ else if (((((f_is_neg_zero_S rs1_val_S)) /\ ((f_is_pos_zero_S rs2_val_S))))) then
+ rs2_val_S
+ else if (((((f_is_neg_zero_S rs2_val_S)) /\ ((f_is_pos_zero_S rs1_val_S))))) then
+ rs1_val_S
+ else if rs2_lt_rs1 then rs1_val_S
+ else rs2_val_S) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd ((nan_box rd_val_S : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FEQ_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Eq rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 64 : int):ii) rd_val : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLT_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Lt rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 64 : int):ii) rd_val : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLE_S) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_S = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_S = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (riscv_f32Le rs1_val_S rs2_val_S : (( 5 words$word # 32 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_WU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags)
+ (wX_bits rd ((EXTZ (( 64 : int):ii) rd_val : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ )))`;
+
+
+(*val execute_F_BIN_TYPE_D : mword ty5 -> mword ty5 -> mword ty5 -> f_bin_op_D -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_TYPE_D:(5)words$word ->(5)words$word ->(5)words$word -> f_bin_op_D ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg0 arg1 arg2 arg3=
+ (let merge_var = (arg0, arg1, arg2, arg3) in
+ (case merge_var of
+ (rs2, rs1, rd, FSGNJ_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D .
+ let (s1, e1, m1) = ((fsplit_D rs1_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D rs2_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let rd_val_D = ((fmake_D s2 e1 m1 : 64 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd rd_val_D) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJN_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D .
+ let (s1, e1, m1) = ((fsplit_D rs1_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D rs2_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let rd_val_D = ((fmake_D ((xor_vec (0b1w : 1 words$word) s2 : 1 words$word)) e1 m1 : 64 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd rd_val_D) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FSGNJX_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D .
+ let (s1, e1, m1) = ((fsplit_D rs1_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let (s2, e2, m2) = ((fsplit_D rs2_val_D : ( 1 words$word # 11 words$word # 52 words$word))) in
+ let rd_val_D = ((fmake_D ((xor_vec s1 s2 : 1 words$word)) e1 m1 : 64 words$word)) in sail2_state_monad$seqS
+ (wF_bits rd rd_val_D) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMIN_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D .
+ let is_quiet = T in
+ let (rs1_lt_rs2, fflags) = ((fle_D rs1_val_D rs2_val_D is_quiet : (bool # 5 words$word))) in
+ let rd_val_D =
+ (if (((((f_is_NaN_D rs1_val_D)) /\ ((f_is_NaN_D rs2_val_D))))) then
+ (canonical_NaN_D () : 64 words$word)
+ else if ((f_is_NaN_D rs1_val_D)) then rs2_val_D
+ else if ((f_is_NaN_D rs2_val_D)) then rs1_val_D
+ else if (((((f_is_neg_zero_D rs1_val_D)) /\ ((f_is_pos_zero_D rs2_val_D))))) then
+ rs1_val_D
+ else if (((((f_is_neg_zero_D rs2_val_D)) /\ ((f_is_pos_zero_D rs1_val_D))))) then
+ rs2_val_D
+ else if rs1_lt_rs2 then rs1_val_D
+ else rs2_val_D) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FMAX_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D .
+ let is_quiet = T in
+ let (rs2_lt_rs1, fflags) = ((fle_D rs2_val_D rs1_val_D is_quiet : (bool # 5 words$word))) in
+ let rd_val_D =
+ (if (((((f_is_NaN_D rs1_val_D)) /\ ((f_is_NaN_D rs2_val_D))))) then
+ (canonical_NaN_D () : 64 words$word)
+ else if ((f_is_NaN_D rs1_val_D)) then rs2_val_D
+ else if ((f_is_NaN_D rs2_val_D)) then rs1_val_D
+ else if (((((f_is_neg_zero_D rs1_val_D)) /\ ((f_is_pos_zero_D rs2_val_D))))) then
+ rs2_val_D
+ else if (((((f_is_neg_zero_D rs2_val_D)) /\ ((f_is_pos_zero_D rs1_val_D))))) then
+ rs1_val_D
+ else if rs2_lt_rs1 then rs1_val_D
+ else rs2_val_D) in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (accrue_fflags fflags) (wF_bits rd rd_val_D)) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ | (rs2, rs1, rd, FEQ_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D . sail2_state_monad$bindS
+ (riscv_f64Eq rs1_val_D rs2_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_LU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLT_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D . sail2_state_monad$bindS
+ (riscv_f64Lt rs1_val_D rs2_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_LU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ | (rs2, rs1, rd, FLE_D) => sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_D . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_D . sail2_state_monad$bindS
+ (riscv_f64Le rs1_val_D rs2_val_D : (( 5 words$word # 64 words$word)) M) (\ varstup . let ((fflags :
+ bits_fflags), (rd_val : bits_LU)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wX_bits rd rd_val)) (sail2_state_monad$returnS RETIRE_SUCCESS))))
+ )))`;
+
+
+(*val execute_F_BIN_RM_TYPE_S : mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_bin_rm_op_S -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_RM_TYPE_S:(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_bin_rm_op_S ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ let rs1_val_32b = ((nan_unbox w__0 : 32 words$word)) in sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ let rs2_val_32b = ((nan_unbox w__1 : 32 words$word)) in sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__2 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__2 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FADD_S => (riscv_f32Add rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FSUB_S => (riscv_f32Sub rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FMUL_S => (riscv_f32Mul rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ | FDIV_S => (riscv_f32Div rm_3b rs1_val_32b rs2_val_32b : (( 5 words$word # 32 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_32b : 32 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd ((nan_box rd_val_32b : 64 words$word)))) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+
+
+(*val execute_F_BIN_RM_TYPE_D : mword ty5 -> mword ty5 -> rounding_mode -> mword ty5 -> f_bin_rm_op_D -> M Retired*)
+
+val _ = Define `
+ ((execute_F_BIN_RM_TYPE_D:(5)words$word ->(5)words$word -> rounding_mode ->(5)words$word -> f_bin_rm_op_D ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rm rd op= (sail2_state_monad$bindS
+ (rF_bits rs1 : ( 64 words$word) M) (\ rs1_val_64b . sail2_state_monad$bindS
+ (rF_bits rs2 : ( 64 words$word) M) (\ rs2_val_64b . sail2_state_monad$bindS
+ (select_instr_or_fcsr_rm rm) (\ (w__0 : rounding_mode) .
+ let rm_3b = ((encdec_rounding_mode_forwards w__0 : 3 words$word)) in sail2_state_monad$bindS
+ (case op of
+ FADD_D => (riscv_f64Add rm_3b rs1_val_64b rs2_val_64b : (( 5 words$word # 64 words$word)) M)
+ | FSUB_D => (riscv_f64Sub rm_3b rs1_val_64b rs2_val_64b : (( 5 words$word # 64 words$word)) M)
+ | FMUL_D => (riscv_f64Mul rm_3b rs1_val_64b rs2_val_64b : (( 5 words$word # 64 words$word)) M)
+ | FDIV_D => (riscv_f64Div rm_3b rs1_val_64b rs2_val_64b : (( 5 words$word # 64 words$word)) M)
+ ) (\ varstup . let ((fflags : 5 bits), (rd_val_64b : 64 bits)) = varstup in sail2_state_monad$seqS (sail2_state_monad$seqS
+ (write_fflags fflags) (wF_bits rd rd_val_64b)) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+
+
(*val execute_FENCE_TSO : mword ty4 -> mword ty4 -> M Retired*)
val _ = Define `
((execute_FENCE_TSO:(4)words$word ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) pred succ= (sail2_state_monad$seqS
(case (pred, succ) of
- (v__794, v__795) =>
- if ((((((((subrange_vec_dec v__794 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__795 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_tso
+ (v__1434, v__1435) =>
+ if ((((((((subrange_vec_dec v__1434 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1435 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ barrier (Barrier_RISCV_tso () )
else
- sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__794 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__795 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
+ sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__1434 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1435 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))) then
()
else
let (_ : unit) = (print_endline "FIXME: unsupported fence") in
@@ -21905,6 +32624,18 @@ val _ = Define `
(sail2_state_monad$returnS RETIRE_SUCCESS)))`;
+(*val execute_FENCE_RESERVED : mword ty4 -> mword ty4 -> mword ty4 -> mword ty5 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_FENCE_RESERVED:(4)words$word ->(4)words$word ->(4)words$word ->(5)words$word ->(5)words$word -> Retired) fm pred succ rs rd= RETIRE_SUCCESS)`;
+
+
+(*val execute_FENCEI_RESERVED : mword ty12 -> mword ty5 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_FENCEI_RESERVED:(12)words$word ->(5)words$word ->(5)words$word -> Retired) imm rs rd= RETIRE_SUCCESS)`;
+
+
(*val execute_FENCEI : unit -> Retired*)
val _ = Define `
@@ -21916,27 +32647,30 @@ val _ = Define `
val _ = Define `
((execute_FENCE:(4)words$word ->(4)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) pred succ= (sail2_state_monad$seqS
(case (pred, succ) of
- (v__754, v__755) =>
- if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_r
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_rw
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_rw_r
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- barrier Barrier_RISCV_r_w
- else if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- barrier Barrier_RISCV_w_r
+ (v__1394, v__1395) =>
+ if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ barrier (Barrier_RISCV_rw_rw () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_rw () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_r () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_rw_w () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_w () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_rw () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_rw_r () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_r_w () )
+ else if ((((((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ barrier (Barrier_RISCV_w_r () )
else
- sail2_state_monad$returnS (if ((((((((subrange_vec_dec v__754 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__755 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
+ sail2_state_monad$returnS (if (((((subrange_vec_dec v__1395 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) then
+ ()
+ else if (((((subrange_vec_dec v__1394 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) then
()
else
let (_ : unit) = (print_endline "FIXME: unsupported fence") in
@@ -21953,9 +32687,9 @@ val _ = Define `
let (t : sync_exception) =
(<| sync_exception_trap :=
((case w__0 of
- User => E_U_EnvCall
- | Supervisor => E_S_EnvCall
- | Machine => E_M_EnvCall
+ User => E_U_EnvCall ()
+ | Supervisor => E_S_EnvCall ()
+ | Machine => E_M_EnvCall ()
));
sync_exception_excinfo := NONE;
sync_exception_ext := NONE |>) in sail2_state_monad$bindS
@@ -21970,7 +32704,7 @@ val _ = Define `
val _ = Define `
((execute_EBREAK:unit ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) () = (sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) . sail2_state_monad$seqS
- (handle_mem_exception w__0 E_Breakpoint) (sail2_state_monad$returnS RETIRE_FAIL))))`;
+ (handle_mem_exception w__0 (E_Breakpoint () )) (sail2_state_monad$returnS RETIRE_FAIL))))`;
(*val execute_DIVW : mword ty5 -> mword ty5 -> mword ty5 -> bool -> M Retired*)
@@ -21979,9 +32713,9 @@ val _ = Define `
((execute_DIVW:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
let rs1_val = ((subrange_vec_dec w__1 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
let rs2_val = ((subrange_vec_dec w__2 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) in
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
@@ -21990,7 +32724,7 @@ val _ = Define `
(if (((s /\ ((q > ((((pow2 (( 31 : int):ii))) - (( 1 : int):ii)))))))) then
(( 0 : int):ii) - ((pow0 (( 2 : int):ii) (( 31 : int):ii)))
else q) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((EXTS (( 64 : int):ii) ((to_bits (( 32 : int):ii) q' : 32 words$word)) : 64 words$word)))
+ (wX_bits rd ((EXTS (( 64 : int):ii) ((to_bits (( 32 : int):ii) q' : 32 words$word)) : 64 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
@@ -22001,34 +32735,88 @@ val _ = Define `
((execute_DIV:(5)words$word ->(5)words$word ->(5)words$word -> bool ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) rs2 rs1 rd s= (sail2_state_monad$bindS
(haveMulDiv () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val .
let (rs1_int : ii) = (if s then integer_word$w2i rs1_val else lem$w2ui rs1_val) in
let (rs2_int : ii) = (if s then integer_word$w2i rs2_val else lem$w2ui rs2_val) in
let (q : ii) = (if (((rs2_int = (( 0 : int):ii)))) then ((( 0 : int)-( 1 : int)):ii) else hardware_quot rs1_int rs2_int) in
let (q' : ii) = (if (((s /\ ((q > xlen_max_signed))))) then xlen_min_signed else q) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd)) ((to_bits (( 64 : int):ii) q' : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
+ (wX_bits rd ((to_bits (( 64 : int):ii) q' : 64 words$word))) (sail2_state_monad$returnS RETIRE_SUCCESS)))
else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL))))`;
+(*val execute_C_SRLI_HINT : mword ty3 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SRLI_HINT:(3)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_SRAI_HINT : mword ty3 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SRAI_HINT:(3)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_SLLI_HINT : mword ty6 -> mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_SLLI_HINT:(6)words$word ->(5)words$word -> Retired) shamt rsd= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_NOP_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_NOP_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
(*val execute_C_NOP : unit -> Retired*)
val _ = Define `
((execute_C_NOP:unit -> Retired) () = RETIRE_SUCCESS)`;
+(*val execute_C_MV_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_MV_HINT:(5)words$word -> Retired) rs2= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_LUI_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_LUI_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_LI_HINT : mword ty6 -> Retired*)
+
+val _ = Define `
+ ((execute_C_LI_HINT:(6)words$word -> Retired) imm= RETIRE_SUCCESS)`;
+
+
(*val execute_C_ILLEGAL : mword ty16 -> M Retired*)
val _ = Define `
((execute_C_ILLEGAL:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) s= (sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)))`;
+(*val execute_C_ADD_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_ADD_HINT:(5)words$word -> Retired) rs2= RETIRE_SUCCESS)`;
+
+
+(*val execute_C_ADDI_HINT : mword ty5 -> Retired*)
+
+val _ = Define `
+ ((execute_C_ADDI_HINT:(5)words$word -> Retired) rsd= RETIRE_SUCCESS)`;
+
+
(*val execute_CSR : mword ty12 -> mword ty5 -> mword ty5 -> bool -> csrop -> M Retired*)
val _ = Define `
((execute_CSR:(12)words$word ->(5)words$word ->(5)words$word -> bool -> csrop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) csr rs1 rd is_imm op= (sail2_state_monad$bindS
(if is_imm then sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) rs1 : 64 words$word))
- else (rX ((regidx_to_regno rs1)) : ( 64 words$word) M)) (\ (rs1_val : xlenbits) .
+ else (rX_bits rs1 : ( 64 words$word) M)) (\ (rs1_val : xlenbits) .
let (isWrite : bool) =
((case op of
CSRRW => T
@@ -22038,25 +32826,30 @@ val _ = Define `
(check_CSR csr w__1 isWrite) (\ (w__2 : bool) .
if ((~ w__2)) then sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$bindS
- (readCSR csr : ( 64 words$word) M) (\ csr_val . sail2_state_monad$seqS (sail2_state_monad$seqS
- (if isWrite then
- let (new_val : xlenbits) =
- ((case op of
- CSRRW => rs1_val
- | CSRRS => (or_vec csr_val rs1_val : 64 words$word)
- | CSRRC => (and_vec csr_val ((not_vec rs1_val : 64 words$word)) : 64 words$word)
- )) in
- writeCSR csr new_val
- else sail2_state_monad$returnS () )
- (wX ((regidx_to_regno rd)) csr_val)) (sail2_state_monad$returnS RETIRE_SUCCESS)))))))`;
+ (sail2_state_monad$read_regS cur_privilege_ref) (\ (w__3 : Privilege) .
+ if ((~ ((ext_check_CSR csr w__3 isWrite)))) then
+ let (_ : unit) = (ext_check_CSR_fail () ) in
+ sail2_state_monad$returnS RETIRE_FAIL
+ else sail2_state_monad$bindS
+ (readCSR csr : ( 64 words$word) M) (\ csr_val . sail2_state_monad$seqS (sail2_state_monad$seqS
+ (if isWrite then
+ let (new_val : xlenbits) =
+ ((case op of
+ CSRRW => rs1_val
+ | CSRRS => (or_vec csr_val rs1_val : 64 words$word)
+ | CSRRC => (and_vec csr_val ((not_vec rs1_val : 64 words$word)) : 64 words$word)
+ )) in
+ writeCSR csr new_val
+ else sail2_state_monad$returnS () )
+ (wX_bits rd csr_val)) (sail2_state_monad$returnS RETIRE_SUCCESS))))))))`;
(*val execute_BTYPE : mword ty13 -> mword ty5 -> mword ty5 -> bop -> M Retired*)
val _ = Define `
((execute_BTYPE:(13)words$word ->(5)words$word ->(5)words$word -> bop ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs2 rs1 op= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ rs2_val .
+ (rX_bits rs1 : ( 64 words$word) M) (\ rs1_val . sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ rs2_val .
let (taken : bool) =
((case op of
RISCV_BEQ => (rs1_val = rs2_val)
@@ -22076,7 +32869,7 @@ val _ = Define `
| Ext_ControlAddr_OK (target) => sail2_state_monad$bindS
(sail2_state$and_boolS (sail2_state_monad$returnS ((bit_to_bool ((access_vec_dec target (( 1 : int):ii))))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__1 : bool) . sail2_state_monad$returnS ((~ w__1))))) (\ (w__2 : bool) .
- if w__2 then sail2_state_monad$seqS (handle_mem_exception target E_Fetch_Addr_Align) (sail2_state_monad$returnS RETIRE_FAIL)
+ if w__2 then sail2_state_monad$seqS (handle_mem_exception target (E_Fetch_Addr_Align () )) (sail2_state_monad$returnS RETIRE_FAIL)
else sail2_state_monad$seqS (set_next_pc target) (sail2_state_monad$returnS RETIRE_SUCCESS))
)
else sail2_state_monad$returnS RETIRE_SUCCESS)))))`;
@@ -22088,45 +32881,99 @@ val _ = Define `
((execute_AMO:amoop -> bool -> bool ->(5)words$word ->(5)words$word -> word_width ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) op aq rl rs2 rs1 width rd= (sail2_state_monad$bindS
(haveAtomics () ) (\ (w__0 : bool) .
if w__0 then sail2_state_monad$bindS
- (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) ReadWrite width) (\ (w__1 : unit
+ (ext_data_get_addr rs1 ((zeros_implicit (( 64 : int):ii) : 64 words$word)) (ReadWrite (Data, Data)) width) (\ (w__1 : unit
Ext_DataAddr_Check) .
(case w__1 of
Ext_DataAddr_Error (e) =>
let (_ : unit) = (ext_handle_data_check_error e) in
sail2_state_monad$returnS RETIRE_FAIL
| Ext_DataAddr_OK (vaddr) => sail2_state_monad$bindS
- (translateAddr vaddr ReadWrite : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 64 words$word), ExceptionType)
+ (translateAddr vaddr (ReadWrite (Data, Data)) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__2 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__2 of
- TR_Failure (e) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | TR_Address (addr) => sail2_state_monad$bindS
- (case (width, (( 64 : int):ii)) of
- (WORD, g__13) => mem_write_ea addr (( 4 : int):ii) (((aq /\ rl))) rl T
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then mem_write_ea addr (( 8 : int):ii) (((aq /\ rl))) rl T
- else internal_error "AMO expected WORD or DOUBLE"
- | _ => internal_error "AMO expected WORD or DOUBLE"
- ) (\ (eares : unit MemoryOpResult) . sail2_state_monad$bindS
- (rX ((regidx_to_regno rs2)) : ( 64 words$word) M) (\ (rs2_val : xlenbits) .
+ TR_Failure ((e, _)) => sail2_state_monad$seqS (handle_mem_exception vaddr e) (sail2_state_monad$returnS RETIRE_FAIL)
+ | TR_Address ((addr, _)) => sail2_state_monad$bindS
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__326) => mem_write_ea addr (( 1 : int): ii) (((aq /\ rl)))
+ rl T
+ | (HALF, g__327) => mem_write_ea addr (( 2 : int): ii) (((aq /\ rl)))
+ rl T
+ | (WORD, g__328) => mem_write_ea addr (( 4 : int): ii) (((aq /\ rl)))
+ rl T
+ | (DOUBLE, l__7) =>
+ if (((l__7 = (( 64 : int): ii)))) then
+ mem_write_ea addr (( 8 : int): ii) (((aq /\ rl))) rl T else
+ internal_error "Unexpected AMO width"
+ ) (\ (eares : unit MemoryOpResult) .
+ let (is_unsigned : bool) =
+ ((case op of AMOMINU => T | AMOMAXU => T | _ => F )) in sail2_state_monad$bindS
+ (case width of
+ BYTE =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__10 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((subrange_vec_dec w__10 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 64 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__11 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 64 : int):ii) ((subrange_vec_dec w__11 (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 64 words$word)))
+ | HALF =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__13 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((subrange_vec_dec w__13 (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 64 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__14 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 64 : int):ii) ((subrange_vec_dec w__14 (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 64 words$word)))
+ | WORD =>
+ if is_unsigned then sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__16 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTZ (( 64 : int):ii) ((subrange_vec_dec w__16 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 64 words$word)))
+ else sail2_state_monad$bindS
+ (rX_bits rs2 : ( 64 words$word) M) (\ (w__17 : 64 words$word) .
+ sail2_state_monad$returnS ((EXTS (( 64 : int):ii) ((subrange_vec_dec w__17 (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 64 words$word)))
+ | DOUBLE => (rX_bits rs2 : ( 64 words$word) M)
+ ) (\ (rs2_val : xlenbits) .
(case eares of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
- | MemValue (_) => sail2_state_monad$bindS
- (case (width, (( 64 : int):ii)) of
- (WORD, g__12) => sail2_state_monad$bindS
- (mem_read ReadWrite addr (( 4 : int):ii) aq (((aq /\ rl))) T
- : ( ( 32 words$word)MemoryOpResult) M) (\ (w__8 : ( 32 words$word) MemoryOpResult) .
- sail2_state_monad$returnS ((extend_value F w__8 : ( 64 words$word) MemoryOpResult)))
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then sail2_state_monad$bindS
- (mem_read ReadWrite addr (( 8 : int):ii) aq (((aq /\ rl))) T
- : ( ( 64 words$word)MemoryOpResult) M) (\ (w__9 : ( 64 words$word) MemoryOpResult) .
- sail2_state_monad$returnS ((extend_value F w__9 : ( 64 words$word) MemoryOpResult)))
- else
- (internal_error "AMO expected WORD or DOUBLE" : ( ( 64 words$word)MemoryOpResult) M)
- | _ =>
- (internal_error "AMO expected WORD or DOUBLE" : ( ( 64 words$word)MemoryOpResult) M)
- ) (\ (rval : xlenbits MemoryOpResult) .
- (case rval of
+ | MemValue (_) => sail2_state_monad$bindS
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__323) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr
+ (( 1 : int): ii) aq (((aq /\ rl))) T
+ : ( ( 8 words$word) MemoryOpResult) M)
+ (\ (w__20 : ( 8 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS
+ ((extend_value is_unsigned w__20 : ( 64 words$word) MemoryOpResult)))
+ | (HALF, g__324) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr
+ (( 2 : int): ii) aq (((aq /\ rl))) T
+ : ( ( 16 words$word) MemoryOpResult) M)
+ (\ (w__21 : ( 16 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS
+ ((extend_value is_unsigned w__21 : ( 64 words$word) MemoryOpResult)))
+ | (WORD, g__325) => sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr
+ (( 4 : int): ii) aq (((aq /\ rl))) T
+ : ( ( 32 words$word) MemoryOpResult) M)
+ (\ (w__22 : ( 32 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS
+ ((extend_value is_unsigned w__22 : ( 64 words$word) MemoryOpResult)))
+ | (DOUBLE, l__6) =>
+ if (((l__6 = (( 64 : int): ii)))) then
+ sail2_state_monad$bindS
+ (mem_read (ReadWrite (Data, Data)) addr (( 8 : int): ii) aq
+ (((aq /\ rl))) T : ( ( 64 words$word) MemoryOpResult) M)
+ (\ (w__23 : ( 64 words$word) MemoryOpResult) .
+ sail2_state_monad$returnS
+ ((extend_value is_unsigned w__23 : ( 64 words$word) MemoryOpResult)))
+ else
+ (internal_error "Unexpected AMO width" : ( ( 64 words$word) MemoryOpResult) M)
+ ) (\ (mval : xlenbits MemoryOpResult) .
+ (case mval of
MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
| MemValue (loaded) =>
let (result : xlenbits) =
@@ -22144,20 +32991,40 @@ val _ = Define `
(to_bits (( 64 : int):ii) ((int_min ((lem$w2ui rs2_val)) ((lem$w2ui loaded)))) : 64 words$word)
| AMOMAXU =>
(to_bits (( 64 : int):ii) ((int_max ((lem$w2ui rs2_val)) ((lem$w2ui loaded)))) : 64 words$word)
- )) in sail2_state_monad$bindS
- (case (width, (( 64 : int):ii)) of
- (WORD, g__11) =>
- mem_write_value addr (( 4 : int):ii)
- ((subrange_vec_dec result (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) (((aq /\ rl))) rl
- T
- | (DOUBLE, p0_) =>
- if (((p0_ = (( 64 : int):ii)))) then
- mem_write_value addr (( 8 : int):ii) result (((aq /\ rl))) rl T
- else internal_error "AMO expected WORD or DOUBLE"
- | _ => internal_error "AMO expected WORD or DOUBLE"
- ) (\ (wval : bool MemoryOpResult) .
+ )) in
+ let (rval : xlenbits) =
+ ((case width of
+ BYTE =>
+ (EXTS (( 64 : int):ii) ((subrange_vec_dec loaded (( 7 : int):ii) (( 0 : int):ii) : 8 words$word))
+ : 64 words$word)
+ | HALF =>
+ (EXTS (( 64 : int):ii) ((subrange_vec_dec loaded (( 15 : int):ii) (( 0 : int):ii) : 16 words$word))
+ : 64 words$word)
+ | WORD =>
+ (EXTS (( 64 : int):ii) ((subrange_vec_dec loaded (( 31 : int):ii) (( 0 : int):ii) : 32 words$word))
+ : 64 words$word)
+ | DOUBLE => loaded
+ )) in sail2_state_monad$bindS
+ (case (width, (( 64 : int): ii)) of
+ (BYTE, g__320) =>
+ mem_write_value addr (( 1 : int): ii)
+ ((subrange_vec_dec result (( 7 : int): ii) (( 0 : int): ii) : 8 words$word))
+ (((aq /\ rl))) rl T
+ | (HALF, g__321) =>
+ mem_write_value addr (( 2 : int): ii)
+ ((subrange_vec_dec result (( 15 : int): ii) (( 0 : int): ii) : 16 words$word))
+ (((aq /\ rl))) rl T
+ | (WORD, g__322) =>
+ mem_write_value addr (( 4 : int): ii)
+ ((subrange_vec_dec result (( 31 : int): ii) (( 0 : int): ii) : 32 words$word))
+ (((aq /\ rl))) rl T
+ | (DOUBLE, l__5) =>
+ if (((l__5 = (( 64 : int): ii)))) then
+ mem_write_value addr (( 8 : int): ii) result (((aq /\ rl))) rl T else
+ internal_error "Unexpected AMO width"
+ ) (\ (wval : bool MemoryOpResult) .
(case wval of
- MemValue (T) => sail2_state_monad$seqS (wX ((regidx_to_regno rd)) loaded) (sail2_state_monad$returnS RETIRE_SUCCESS)
+ MemValue (T) => sail2_state_monad$seqS (wX_bits rd rval) (sail2_state_monad$returnS RETIRE_SUCCESS)
| MemValue (F) => internal_error "AMO got false from mem_write_value"
| MemException (e) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS RETIRE_FAIL)
))
@@ -22172,9 +33039,9 @@ val _ = Define `
val _ = Define `
((execute_ADDIW:(12)words$word ->(5)words$word ->(5)words$word ->(regstate)sail2_state_monad$sequential_state ->(((Retired),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) imm rs1 rd= (sail2_state_monad$bindS
- (rX ((regidx_to_regno rs1)) : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
+ (rX_bits rs1 : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let (result : xlenbits) = ((add_vec ((EXTS (( 64 : int):ii) imm : 64 words$word)) w__0 : 64 words$word)) in sail2_state_monad$seqS
- (wX ((regidx_to_regno rd))
+ (wX_bits rd
((EXTS (( 64 : int):ii) ((subrange_vec_dec result (( 31 : int):ii) (( 0 : int):ii) : 32 words$word)) : 64 words$word)))
(sail2_state_monad$returnS RETIRE_SUCCESS))))`;
@@ -22184,36 +33051,31 @@ val _ = Define `
((case merge_var of
C_ADDI4SPN ((rdc, nzimm)) =>
let (imm : 12 bits) =
- ((concat_vec (vec_of_bits [B0;B0] : 2 words$word)
- ((concat_vec nzimm (vec_of_bits [B0;B0] : 2 words$word) : 10 words$word))
+ ((concat_vec (0b00w : 2 words$word) ((concat_vec nzimm (0b00w : 2 words$word) : 10 words$word))
: 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
execute (ITYPE (imm, sp, rd, RISCV_ADDI))
| C_LW ((uimm, rsc, rdc)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 7 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
let rs = ((creg2reg_idx rsc : 5 words$word)) in
execute (LOAD (imm, rs, rd, F, WORD, F, F))
| C_LD ((uimm, rsc, rdc)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
let rd = ((creg2reg_idx rdc : 5 words$word)) in
let rs = ((creg2reg_idx rsc : 5 words$word)) in
execute (LOAD (imm, rs, rd, F, DOUBLE, F, F))
| C_SW ((uimm, rsc1, rsc2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 7 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
execute (STORE (imm, rs2, rs1, WORD, F, F))
| C_SD ((uimm, rsc1, rsc2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
execute (STORE (imm, rs2, rs1, DOUBLE, F, F))
@@ -22222,8 +33084,7 @@ val _ = Define `
execute (ITYPE (imm, rsd, rsd, RISCV_ADDI))
| C_JAL (imm) =>
execute
- (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))
- : 21 words$word),
+ (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 12 words$word)) : 21 words$word),
ra))
| C_ADDIW ((imm, rsd)) => execute (ADDIW ((EXTS (( 12 : int):ii) imm : 12 words$word), rsd, rsd))
| C_LI ((imm, rd)) =>
@@ -22231,8 +33092,7 @@ val _ = Define `
execute (ITYPE (imm, zreg, rd, RISCV_ADDI))
| C_ADDI16SP (imm) =>
let (imm : 12 bits) =
- ((EXTS (( 12 : int):ii) ((concat_vec imm (vec_of_bits [B0;B0;B0;B0] : 4 words$word) : 10 words$word))
- : 12 words$word)) in
+ ((EXTS (( 12 : int):ii) ((concat_vec imm (0x0w : 4 words$word) : 10 words$word)) : 12 words$word)) in
execute (ITYPE (imm, sp, sp, RISCV_ADDI))
| C_LUI ((imm, rd)) =>
let (res : 20 bits) = ((EXTS (( 20 : int):ii) imm : 20 words$word)) in
@@ -22272,51 +33132,82 @@ val _ = Define `
execute (RTYPEW (rs2, rsd, rsd, RISCV_ADDW))
| C_J (imm) =>
execute
- (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))
- : 21 words$word),
+ (RISCV_JAL ((EXTS (( 21 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 12 words$word)) : 21 words$word),
zreg))
| C_BEQZ ((imm, rs)) =>
execute
- (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 9 words$word))
- : 13 words$word),
+ (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 9 words$word)) : 13 words$word),
zreg,
(creg2reg_idx rs : 5 words$word),
RISCV_BEQ))
| C_BNEZ ((imm, rs)) =>
execute
- (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 9 words$word))
- : 13 words$word),
+ (BTYPE ((EXTS (( 13 : int):ii) ((concat_vec imm (0b0w : 1 words$word) : 9 words$word)) : 13 words$word),
zreg,
(creg2reg_idx rs : 5 words$word),
RISCV_BNE))
| C_SLLI ((shamt, rsd)) => execute (SHIFTIOP (shamt, rsd, rsd, RISCV_SLLI))
| C_LWSP ((uimm, rd)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
execute (LOAD (imm, sp, rd, F, WORD, F, F))
| C_LDSP ((uimm, rd)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 9 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
execute (LOAD (imm, sp, rd, F, DOUBLE, F, F))
| C_SWSP ((uimm, rs2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0] : 2 words$word) : 8 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
execute (STORE (imm, rs2, sp, WORD, F, F))
| C_SDSP ((uimm, rs2)) =>
let (imm : 12 bits) =
- ((EXTZ (( 12 : int):ii) ((concat_vec uimm (vec_of_bits [B0;B0;B0] : 3 words$word) : 9 words$word))
- : 12 words$word)) in
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
execute (STORE (imm, rs2, sp, DOUBLE, F, F))
- | C_JR (rs1) =>
- execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (vec_of_bits [B0] : 1 words$word) : 12 words$word), rs1, zreg))
- | C_JALR (rs1) =>
- execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (vec_of_bits [B0] : 1 words$word) : 12 words$word), rs1, ra))
+ | C_JR (rs1) => execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (0b0w : 1 words$word) : 12 words$word), rs1, zreg))
+ | C_JALR (rs1) => execute (RISCV_JALR ((EXTZ (( 12 : int):ii) (0b0w : 1 words$word) : 12 words$word), rs1, ra))
| C_MV ((rd, rs2)) => execute (RTYPE (rs2, zreg, rd, RISCV_ADD))
| C_EBREAK (() ) => execute (EBREAK () )
| C_ADD ((rsd, rs2)) => execute (RTYPE (rs2, rsd, rsd, RISCV_ADD))
+ | C_FLWSP ((imm, rd)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec imm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
+ execute (LOAD_FP (imm, sp, rd, WORD))
+ | C_FSWSP ((uimm, rs2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 8 words$word)) : 12 words$word)) in
+ execute (STORE_FP (imm, rs2, sp, WORD))
+ | C_FLW ((uimm, rsc, rdc)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
+ let rd = ((creg2reg_idx rdc : 5 words$word)) in
+ let rs = ((creg2reg_idx rsc : 5 words$word)) in
+ execute (LOAD_FP (imm, rs, rd, WORD))
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b00w : 2 words$word) : 7 words$word)) : 12 words$word)) in
+ let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
+ let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
+ execute (STORE_FP (imm, rs2, rs1, WORD))
+ | C_FLDSP ((uimm, rd)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
+ execute (LOAD_FP (imm, sp, rd, DOUBLE))
+ | C_FSDSP ((uimm, rs2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 9 words$word)) : 12 words$word)) in
+ execute (STORE_FP (imm, rs2, sp, DOUBLE))
+ | C_FLD ((uimm, rsc, rdc)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
+ let rd = ((creg2reg_idx rdc : 5 words$word)) in
+ let rs = ((creg2reg_idx rsc : 5 words$word)) in
+ execute (LOAD_FP (imm, rs, rd, DOUBLE))
+ | C_FSD ((uimm, rsc1, rsc2)) =>
+ let (imm : 12 bits) =
+ ((EXTZ (( 12 : int):ii) ((concat_vec uimm (0b000w : 3 words$word) : 8 words$word)) : 12 words$word)) in
+ let rs1 = ((creg2reg_idx rsc1 : 5 words$word)) in
+ let rs2 = ((creg2reg_idx rsc2 : 5 words$word)) in
+ execute (STORE_FP (imm, rs2, rs1, DOUBLE))
| UTYPE ((imm, rd, op)) => execute_UTYPE imm rd op
| RISCV_JAL ((imm, rd)) => execute_RISCV_JAL imm rd
| BTYPE ((imm, rs2, rs1, op)) => execute_BTYPE imm rs2 rs1 op
@@ -22351,6 +33242,30 @@ val _ = Define `
| REMW ((rs2, rs1, rd, s)) => execute_REMW rs2 rs1 rd s
| CSR ((csr, rs1, rd, is_imm, op)) => execute_CSR csr rs1 rd is_imm op
| URET (arg0) => execute_URET arg0
+ | C_NOP_HINT (imm) => sail2_state_monad$returnS ((execute_C_NOP_HINT imm))
+ | C_ADDI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_ADDI_HINT rsd))
+ | C_LI_HINT (imm) => sail2_state_monad$returnS ((execute_C_LI_HINT imm))
+ | C_LUI_HINT (imm) => sail2_state_monad$returnS ((execute_C_LUI_HINT imm))
+ | C_MV_HINT (rs2) => sail2_state_monad$returnS ((execute_C_MV_HINT rs2))
+ | C_ADD_HINT (rs2) => sail2_state_monad$returnS ((execute_C_ADD_HINT rs2))
+ | C_SLLI_HINT ((shamt, rsd)) => sail2_state_monad$returnS ((execute_C_SLLI_HINT shamt rsd))
+ | C_SRLI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_SRLI_HINT rsd))
+ | C_SRAI_HINT (rsd) => sail2_state_monad$returnS ((execute_C_SRAI_HINT rsd))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ sail2_state_monad$returnS ((execute_FENCE_RESERVED fm pred succ rs rd))
+ | FENCEI_RESERVED ((imm, rs, rd)) => sail2_state_monad$returnS ((execute_FENCEI_RESERVED imm rs rd))
+ | LOAD_FP ((imm, rs1, rd, width)) => execute_LOAD_FP imm rs1 rd width
+ | STORE_FP ((imm, rs2, rs1, width)) => execute_STORE_FP imm rs2 rs1 width
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => execute_F_MADD_TYPE_S rs3 rs2 rs1 rm rd op
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => execute_F_BIN_RM_TYPE_S rs2 rs1 rm rd op
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, arg3)) => execute_F_UN_RM_TYPE_S rs1 rm rd arg3
+ | F_BIN_TYPE_S ((rs2, rs1, rd, arg3)) => execute_F_BIN_TYPE_S rs2 rs1 rd arg3
+ | F_UN_TYPE_S ((rs1, rd, arg2)) => execute_F_UN_TYPE_S rs1 rd arg2
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, op)) => execute_F_MADD_TYPE_D rs3 rs2 rs1 rm rd op
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, op)) => execute_F_BIN_RM_TYPE_D rs2 rs1 rm rd op
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, arg3)) => execute_F_UN_RM_TYPE_D rs1 rm rd arg3
+ | F_BIN_TYPE_D ((rs2, rs1, rd, arg3)) => execute_F_BIN_TYPE_D rs2 rs1 rd arg3
+ | F_UN_TYPE_D ((rs1, rd, arg2)) => execute_F_UN_TYPE_D rs1 rd arg2
| RISCV_JALR ((imm, rs1, rd)) => execute_RISCV_JALR imm rs1 rd
| ILLEGAL (s) => execute_ILLEGAL s
| C_ILLEGAL (s) => execute_C_ILLEGAL s
@@ -22358,8 +33273,6 @@ val _ = Define `
val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn execute_defn;
-(*val assembly_forwards : ast -> M string*)
-
val _ = Define `
((assembly_forwards:ast ->(regstate)sail2_state_monad$sequential_state ->(((string),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
((case arg_ of
@@ -23158,11 +34071,11 @@ val _ = Define `
(reg_name_forwards rd)
(\ (w__45 : string) .
sail2_state_monad$bindS
- (reg_name_forwards rs1)
+ (reg_name_forwards rs2)
(\ (w__46 : string) .
sail2_state_monad$bindS
(reg_name_forwards
- rs2)
+ rs1)
(\ (w__47 : string) .
sail2_state_monad$returnS
((string_append
@@ -23223,11 +34136,19 @@ val _ = Define `
(
(
string_append
- w__47
- "")))))))))))))))))))))))))
+ "("
+ (
+ (
+ string_append
+ w__47
+ (
+ (
+ string_append
+ ")"
+ "")))))))))))))))))))))))))))))
| C_NOP (() ) => sail2_state_monad$returnS "c.nop"
| C_ADDI4SPN ((rdc, nzimm)) =>
- if (((nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
+ if (((nzimm <> (0x00w : 8 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rdc)
(\ (w__48 : string) .
sail2_state_monad$returnS
@@ -23237,9 +34158,8 @@ val _ = Define `
((string_append ((sep_forwards () ))
((string_append
((decimal_string_of_bits
- ((concat_vec nzimm
- (vec_of_bits [B0;B0] : 2 words$word)
- : 10 words$word)))) ""))))))))))) else
+ ((concat_vec nzimm (0b00w : 2 words$word) : 10 words$word))))
+ ""))))))))))) else
sail2_state_monad$seqS
(sail2_state_monad$assert_expS F
"Pattern match failure at unknown location")
@@ -23293,9 +34213,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0] : 2 words$word)
- : 7 words$word))))
+ 0b00w : 2 words$word) : 7 words$word))))
""))))))))))))))))
| C_LD ((uimm, rsc, rdc)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then
@@ -23318,9 +34236,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0;B0] : 3 words$word)
- : 8 words$word))))
+ 0b000w : 3 words$word) : 8 words$word))))
""))))))))))))))))
else
sail2_state_monad$seqS
@@ -23376,9 +34292,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0] : 2 words$word)
- : 7 words$word))))
+ 0b00w : 2 words$word) : 7 words$word))))
""))))))))))))))))
| C_SD ((uimm, rsc1, rsc2)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then
@@ -23401,9 +34315,7 @@ val _ = Define `
concat_vec
uimm
(
- vec_of_bits
- [B0;B0;B0] : 3 words$word)
- : 8 words$word))))
+ 0b000w : 3 words$word) : 8 words$word))))
""))))))))))))))))
else
sail2_state_monad$seqS
@@ -23411,8 +34323,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_ADDI ((nzi, rsd)) =>
- if ((((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__63 : string) .
sail2_state_monad$returnS
@@ -23433,7 +34344,7 @@ val _ = Define `
((string_append ((spc_forwards () ))
((string_append
((decimal_string_of_bits
- ((concat_vec imm (vec_of_bits [B0] : 1 words$word) : 12 words$word))))
+ ((concat_vec imm (0b0w : 1 words$word) : 12 words$word))))
"")))))) else
sail2_state_monad$seqS
(sail2_state_monad$assert_expS F
@@ -23455,7 +34366,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LI ((imm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
+ if (((rd <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__71 : string) .
sail2_state_monad$returnS
@@ -23470,7 +34381,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_ADDI16SP (imm) =>
- if (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((imm <> (0b000000w : 6 words$word)))) then
sail2_state_monad$returnS
((string_append "c.addi16sp"
((string_append ((spc_forwards () ))
@@ -23480,9 +34391,8 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LUI ((imm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\
- (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))))))))) then
+ if ((((((rd <> zreg))) /\
+ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word)))))))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__76 : string) .
sail2_state_monad$returnS
@@ -23497,7 +34407,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_SRLI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((shamt <> (0b000000w : 6 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rsd)
(\ (w__79 : string) .
sail2_state_monad$returnS
@@ -23512,7 +34422,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_SRAI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
+ if (((shamt <> (0b000000w : 6 words$word)))) then
sail2_state_monad$bindS (creg_name_forwards rsd)
(\ (w__82 : string) .
sail2_state_monad$returnS
@@ -23708,8 +34618,7 @@ val _ = Define `
((decimal_string_of_bits
imm)) "")))))))))))
| C_SLLI ((shamt, rsd)) =>
- if ((((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__104 : string) .
sail2_state_monad$returnS
@@ -23724,7 +34633,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LWSP ((uimm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then
+ if (((rd <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__107 : string) .
sail2_state_monad$returnS
@@ -23739,8 +34648,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_LDSP ((uimm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ if ((((((rd <> zreg))) /\ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__110 : string) .
sail2_state_monad$returnS
@@ -23781,7 +34689,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
+ if (((rs1 <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rs1)
(\ (w__117 : string) .
sail2_state_monad$returnS
@@ -23793,7 +34701,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then
+ if (((rs1 <> zreg))) then
sail2_state_monad$bindS (reg_name_forwards rs1)
(\ (w__120 : string) .
sail2_state_monad$returnS
@@ -23805,8 +34713,7 @@ val _ = Define `
"Pattern match failure at unknown location")
(sail2_state_monad$exitS () )
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rd)
(\ (w__123 : string) . sail2_state_monad$bindS
(reg_name_forwards rs2)
@@ -23825,8 +34732,7 @@ val _ = Define `
(sail2_state_monad$exitS () )
| C_EBREAK (() ) => sail2_state_monad$returnS "c.ebreak"
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then
sail2_state_monad$bindS (reg_name_forwards rsd)
(\ (w__127 : string) . sail2_state_monad$bindS
(reg_name_forwards rs2)
@@ -24178,10 +35084,42 @@ val _ = Define `
(sail2_state_monad$exitS () )
| CSR ((csr, rs1, rd, T, op)) => sail2_state_monad$bindS
(reg_name_forwards rd)
- (\ (w__155 : string) . sail2_state_monad$bindS
- (csr_name_map_forwards
- csr)
- (\ (w__156 : string) .
+ (\ (w__155 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((csr_mnemonic_forwards op))
+ ((string_append "i"
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__155
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((
+ csr_name_map_forwards
+ csr))
+ ((
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ decimal_string_of_bits
+ rs1))
+ "")))))))))))))))))
+ | CSR ((csr, rs1, rd, F, op)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__156 : string) . sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__157 : string) .
sail2_state_monad$returnS
(
(
@@ -24193,7 +35131,217 @@ val _ = Define `
(
(
string_append
- "i"
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__156
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ csr_name_map_forwards
+ csr))
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__157
+ ""))))))))))))))))
+ | URET (() ) => sail2_state_monad$returnS "uret"
+ | C_NOP_HINT (imm) =>
+ sail2_state_monad$returnS
+ ((string_append "c.nop.hint."
+ ((string_append ((decimal_string_of_bits imm)) ""))))
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rsd)
+ (\ (w__158 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.addi.hint." ((string_append w__158 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_LI_HINT (imm) =>
+ sail2_state_monad$returnS
+ ((string_append "c.li.hint."
+ ((string_append ((decimal_string_of_bits imm)) ""))))
+ | C_LUI_HINT (imm) =>
+ if (((imm <> (0b000000w : 6 words$word)))) then
+ sail2_state_monad$returnS
+ ((string_append "c.lui.hint."
+ ((string_append ((decimal_string_of_bits imm)) "")))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rs2)
+ (\ (w__163 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.mv.hint." ((string_append w__163 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then
+ sail2_state_monad$bindS (reg_name_forwards rs2)
+ (\ (w__166 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.add.hint." ((string_append w__166 ""))))) else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_SLLI_HINT ((shamt, rsd)) =>
+ if ((((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) then
+ sail2_state_monad$bindS (reg_name_forwards rsd)
+ (\ (w__169 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.slli.hint."
+ ((string_append w__169
+ ((string_append "."
+ ((string_append ((decimal_string_of_bits shamt)) "")))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_SRLI_HINT (rsd) => sail2_state_monad$bindS (creg_name_forwards rsd)
+ (\ (w__172 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.srli.hint."
+ ((string_append w__172 "")))))
+ | C_SRAI_HINT (rsd) => sail2_state_monad$bindS (creg_name_forwards rsd)
+ (\ (w__173 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.srai.hint."
+ ((string_append w__173 "")))))
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\
+ (((fm <> (0x8w : 4 words$word))))))) \/
+ ((((((rs <> (0b00000w : 5 words$word)))) \/
+ (((rd <> (0b00000w : 5 words$word)))))))))) then
+ sail2_state_monad$bindS (fence_bits_forwards pred)
+ (\ (w__174 : string) . sail2_state_monad$bindS
+ (fence_bits_forwards succ)
+ (\ (w__175 : string) . sail2_state_monad$bindS
+ (reg_name_forwards
+ rs)
+ (\ (w__176 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rd)
+ (\ (w__177 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ "fence.reserved."
+ (
+ (
+ string_append
+ w__174
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__175
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__176
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ w__177
+ (
+ (
+ string_append
+ "."
+ (
+ (
+ string_append
+ (
+ (
+ decimal_string_of_bits
+ fm))
+ ""))))))))))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/
+ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__180 : string) . sail2_state_monad$bindS (reg_name_forwards rs)
+ (\ (w__181 : string) .
+ sail2_state_monad$returnS
+ ((string_append "fence.i.reserved."
+ ((string_append w__180
+ ((string_append "."
+ ((string_append w__181
+ ((string_append "."
+ ((string_append
+ ((decimal_string_of_bits
+ imm))
+ ""))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | LOAD_FP ((imm, rs1, rd, width)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__184 : string) . sail2_state_monad$bindS
+ (
+ reg_name_forwards
+ rs1)
+ (
+ \ (w__185 : string) .
+ sail2_state_monad$returnS
+ (
+ (
+ string_append
+ "fl"
+ (
+ (
+ string_append
+ (
+ (
+ size_mnemonic_forwards
+ width))
(
(
string_append
@@ -24204,7 +35352,7 @@ val _ = Define `
(
(
string_append
- w__155
+ w__184
(
(
string_append
@@ -24218,7 +35366,57 @@ val _ = Define `
(
(
decimal_string_of_bits
- rs1))
+ imm))
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ "("
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__185
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ ")"
+ ""))))))))))))))))))))))))))
+ | STORE_FP ((imm, rs2, rs1, width)) => sail2_state_monad$bindS
+ (freg_name_forwards rs2)
+ (\ (w__186 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards rs1)
+ (\ (w__187 : string) .
+ sail2_state_monad$returnS
+ ((string_append "fs"
+ ((string_append
+ ((size_mnemonic_forwards
+ width))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__186
(
(
string_append
@@ -24229,27 +35427,67 @@ val _ = Define `
(
(
string_append
- w__156
- ""))))))))))))))))))
- | CSR ((csr, rs1, rd, F, op)) => sail2_state_monad$bindS
- (reg_name_forwards rd)
- (\ (w__157 : string) . sail2_state_monad$bindS
- (reg_name_forwards
- rs1)
- (\ (w__158 : string) .
- sail2_state_monad$bindS
(
- csr_name_map_forwards
- csr)
(
- \ (w__159 : string) .
- sail2_state_monad$returnS
+ decimal_string_of_bits
+ imm))
(
(
string_append
(
(
- csr_mnemonic_forwards
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ "("
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__187
+ (
+ (
+ string_append
+ (
+ (
+ opt_spc_forwards
+ () ))
+ (
+ (
+ string_append
+ ")"
+ ""))))))))))))))))))))))))))
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards
+ rd)
+ (\ (w__188 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__189 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__190 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs3)
+ (\ (w__191 : string) .
+ sail2_state_monad$returnS
+ (
+ (
+ string_append
+ (
+ (
+ f_madd_type_mnemonic_S_forwards
op))
(
(
@@ -24261,7 +35499,18 @@ val _ = Define `
(
(
string_append
- w__157
+ w__188
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__189
(
(
string_append
@@ -24272,7 +35521,7 @@ val _ = Define `
(
(
string_append
- w__158
+ w__190
(
(
string_append
@@ -24283,9 +35532,2149 @@ val _ = Define `
(
(
string_append
- w__159
+ w__191
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))))))))))))
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__192 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__193 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__194 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_rm_type_mnemonic_S_forwards
+ op))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__192
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__193
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__194
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ "")))))))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__195 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__196 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FSQRT_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__195
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__196
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__197 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__198 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_W_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__197
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__198
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__199 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__200 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_WU_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__199
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__200
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__201 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__202 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_W))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__201
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__202
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__203 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__204 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_WU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__203
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__204
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__205 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__206 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_L_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__205
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__206
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__207 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__208 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_LU_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__207
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__208
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__209 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__210 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_L))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__209
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__210
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__211 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__212 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_S_forwards
+ FCVT_S_LU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__211
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__212
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__213 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__214 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__215 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJ_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__213
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__214
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__215
"")))))))))))))))))
- | URET (() ) => sail2_state_monad$returnS "uret"
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__216 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__217 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__218 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJN_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__216
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__217
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__218
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__219 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__220 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__221 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FSGNJX_S))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__219
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__220
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__221
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__222 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__223 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__224 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FMIN_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__222
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__223
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__224
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__225 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__226 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__227 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FMAX_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__225
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__226
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__227
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__228 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__229 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__230 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FEQ_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__228
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__229
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__230
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__231 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__232 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__233 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FLT_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__231
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__232
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__233
+ "")))))))))))))))))
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__234 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__235 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__236 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_S_forwards
+ FLE_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__234
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__235
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__236
+ "")))))))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__237 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__238 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FMV_X_W))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__237
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__238
+ ""))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__239 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards rs1)
+ (\ (w__240 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FMV_W_X))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__239
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__240
+ ""))))))))))))
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__241 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__242 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_S_forwards
+ FCLASS_S))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__241
+ ((string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__242
+ ""))))))))))))
+ | C_FLWSP ((imm, rd)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__243 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.flwsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__243
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits imm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSWSP ((uimm, rd)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__246 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fswsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__246
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits uimm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FLW ((uimm, rsc, rdc)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (creg_name_forwards rdc)
+ (\ (w__249 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc)
+ (\ (w__250 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.flw"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__249
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__250
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b00w : 2 words$word) : 7 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then
+ sail2_state_monad$bindS (creg_name_forwards rsc1)
+ (\ (w__253 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc2)
+ (\ (w__254 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fsw"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__253
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__254
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b00w : 2 words$word) : 7 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards
+ rd)
+ (\ (w__257 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__258 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__259 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs3)
+ (\ (w__260 : string) .
+ sail2_state_monad$returnS
+ (
+ (
+ string_append
+ (
+ (
+ f_madd_type_mnemonic_D_forwards
+ op))
+ (
+ (
+ string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__257
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__258
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__259
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__260
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))))))))))))
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, op)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__261 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__262 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__263 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_rm_type_mnemonic_D_forwards
+ op))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__261
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__262
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__263
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ "")))))))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FSQRT_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__264 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__265 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FSQRT_D))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__264
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__265
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_W_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__266 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__267 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_W_D))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__266
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__267
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_WU_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__268 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__269 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_WU_D))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__268
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__269
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_W)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__270 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__271 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_D_W))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__270
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__271
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_WU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__272 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__273 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_D_WU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__272
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__273
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_L_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__274 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__275 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_L_D))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__274
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__275
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_LU_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__276 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__277 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_LU_D))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__276
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__277
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_L)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__278 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__279 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_D_L))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__278
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__279
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_LU)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__280 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards
+ rs1)
+ (\ (w__281 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_D_LU))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__280
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__281
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_S_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__282 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__283 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_S_D))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__282
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__283
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_S)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__284 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__285 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_rm_type_mnemonic_D_forwards
+ FCVT_D_S))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__284
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__285
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ (
+ (
+ frm_mnemonic_forwards
+ rm))
+ ""))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJ_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__286 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__287 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__288 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FSGNJ_D))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__286
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__287
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__288
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJN_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__289 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__290 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__291 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FSGNJN_D))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__289
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__290
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__291
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJX_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__292 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs1)
+ (\ (w__293 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__294 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FSGNJX_D))
+ ((string_append
+ (
+ (
+ spc_forwards
+ () ))
+ (
+ (
+ string_append
+ w__292
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__293
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__294
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMIN_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__295 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__296 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__297 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FMIN_D))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__295
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__296
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__297
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMAX_D)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__298 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__299 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__300 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FMAX_D))
+ ((string_append
+ ((
+ spc_forwards
+ () ))
+ ((
+ string_append
+ w__298
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__299
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__300
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FEQ_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__301 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__302 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__303 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FEQ_D))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__301
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__302
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__303
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLT_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__304 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__305 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__306 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FLT_D))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__304
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__305
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__306
+ "")))))))))))))))))
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLE_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__307 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__308 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards
+ rs2)
+ (\ (w__309 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_bin_type_mnemonic_D_forwards
+ FLE_D))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__307
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__308
+ (
+ (
+ string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__309
+ "")))))))))))))))))
+ | F_UN_TYPE_D ((rs1, rd, FMV_X_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__310 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__311 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_D_forwards
+ FMV_X_D))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__310
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__311
+ ""))))))))))))
+ | F_UN_TYPE_D ((rs1, rd, FMV_D_X)) => sail2_state_monad$bindS
+ (freg_name_forwards rd)
+ (\ (w__312 : string) .
+ sail2_state_monad$bindS
+ (reg_name_forwards rs1)
+ (\ (w__313 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_D_forwards
+ FMV_D_X))
+ ((string_append
+ ((spc_forwards () ))
+ ((string_append
+ w__312
+ ((string_append
+ ((
+ sep_forwards
+ () ))
+ ((
+ string_append
+ w__313
+ ""))))))))))))
+ | F_UN_TYPE_D ((rs1, rd, FCLASS_D)) => sail2_state_monad$bindS
+ (reg_name_forwards rd)
+ (\ (w__314 : string) .
+ sail2_state_monad$bindS
+ (freg_name_forwards rs1)
+ (\ (w__315 : string) .
+ sail2_state_monad$returnS
+ ((string_append
+ ((f_un_type_mnemonic_D_forwards
+ FCLASS_D))
+ ((string_append
+ ((spc_forwards
+ () ))
+ ((string_append
+ w__314
+ ((string_append
+ (
+ (
+ sep_forwards
+ () ))
+ (
+ (
+ string_append
+ w__315
+ ""))))))))))))
+ | C_FLDSP ((uimm, rd)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ sail2_state_monad$bindS (reg_name_forwards rd)
+ (\ (w__316 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fldsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__316
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits uimm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSDSP ((uimm, rs2)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ sail2_state_monad$bindS (reg_name_forwards rs2)
+ (\ (w__319 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fsdsp"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__319
+ ((string_append ((sep_forwards () ))
+ ((string_append ((decimal_string_of_bits uimm)) "")))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FLD ((uimm, rsc, rdc)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ sail2_state_monad$bindS (creg_name_forwards rdc)
+ (\ (w__322 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc)
+ (\ (w__323 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fld"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__322
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__323
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b000w : 3 words$word) : 8 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
+ | C_FSD ((uimm, rsc1, rsc2)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ sail2_state_monad$bindS (creg_name_forwards rsc1)
+ (\ (w__326 : string) . sail2_state_monad$bindS
+ (creg_name_forwards rsc2)
+ (\ (w__327 : string) .
+ sail2_state_monad$returnS
+ ((string_append "c.fsd"
+ ((string_append ((spc_forwards () ))
+ ((string_append w__326
+ ((string_append
+ ((sep_forwards () ))
+ ((string_append w__327
+ ((string_append
+ ((sep_forwards
+ () ))
+ ((string_append
+ ((decimal_string_of_bits
+ (
+ (
+ concat_vec
+ uimm
+ (
+ 0b000w : 3 words$word) : 8 words$word))))
+ ""))))))))))))))))
+ else
+ sail2_state_monad$seqS
+ (sail2_state_monad$assert_expS F
+ "Pattern match failure at unknown location")
+ (sail2_state_monad$exitS () )
| ILLEGAL (s) =>
sail2_state_monad$returnS
((string_append "illegal"
@@ -24299,24 +37688,22 @@ val _ = Define `
)))`;
-(*val assembly_backwards : string -> M ast*)
-
-(*val _s1677_ : string -> maybe (mword ty16)*)
+(*val _s3229_ : string -> maybe (mword ty16)*)
val _ = Define `
- ((s1677_:string ->((16)words$word)option) s1678_0=
- (let s1679_0 = s1678_0 in
- if ((string_startswith s1679_0 "c.illegal")) then
- (case ((string_drop s1679_0 ((string_length "c.illegal")))) of
- s1680_0 =>
- (case ((spc_matches_prefix0 s1680_0)) of
- SOME ((() , s1681_0)) =>
- (case ((string_drop s1680_0 s1681_0)) of
- s1682_0 =>
+ ((s3229_:string ->((16)words$word)option) s3230_0=
+ (let s3231_0 = s3230_0 in
+ if ((string_startswith s3231_0 "c.illegal")) then
+ (case ((string_drop s3231_0 ((string_length "c.illegal")))) of
+ s3232_0 =>
+ (case ((spc_matches_prefix0 s3232_0)) of
+ SOME ((() , s3233_0)) =>
+ (case ((string_drop s3232_0 s3233_0)) of
+ s3234_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1682_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s1683_0)) =>
- let p0_ = (string_drop s1682_0 s1683_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3234_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s3235_0)) =>
+ let p0_ = (string_drop s3234_0 s3235_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -24327,22 +37714,22 @@ val _ = Define `
else NONE))`;
-(*val _s1669_ : string -> maybe (mword ty32)*)
+(*val _s3221_ : string -> maybe (mword ty32)*)
val _ = Define `
- ((s1669_:string ->((32)words$word)option) s1670_0=
- (let s1671_0 = s1670_0 in
- if ((string_startswith s1671_0 "illegal")) then
- (case ((string_drop s1671_0 ((string_length "illegal")))) of
- s1672_0 =>
- (case ((spc_matches_prefix0 s1672_0)) of
- SOME ((() , s1673_0)) =>
- (case ((string_drop s1672_0 s1673_0)) of
- s1674_0 =>
+ ((s3221_:string ->((32)words$word)option) s3222_0=
+ (let s3223_0 = s3222_0 in
+ if ((string_startswith s3223_0 "illegal")) then
+ (case ((string_drop s3223_0 ((string_length "illegal")))) of
+ s3224_0 =>
+ (case ((spc_matches_prefix0 s3224_0)) of
+ SOME ((() , s3225_0)) =>
+ (case ((string_drop s3224_0 s3225_0)) of
+ s3226_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1674_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s1675_0)) =>
- let p0_ = (string_drop s1674_0 s1675_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3226_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s3227_0)) =>
+ let p0_ = (string_drop s3226_0 s3227_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -24353,41 +37740,2853 @@ val _ = Define `
else NONE))`;
-(*val _s1652_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s3205_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1652_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s1653_0=
- ((case s1653_0 of
- s1654_0 =>
- (case ((csr_mnemonic_matches_prefix s1654_0)) of
- SOME ((op, s1655_0)) =>
- (case ((string_drop s1654_0 s1655_0)) of
- s1656_0 =>
- (case ((spc_matches_prefix0 s1656_0)) of
- SOME ((() , s1657_0)) =>
- (case ((string_drop s1656_0 s1657_0)) of
- s1658_0 =>
- (case ((reg_name_matches_prefix s1658_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1659_0)) =>
- (case ((string_drop s1658_0 s1659_0)) of
- s1660_0 =>
- (case ((sep_matches_prefix s1660_0)) of
- SOME ((() , s1661_0)) =>
- (case ((string_drop s1660_0 s1661_0)) of
- s1662_0 =>
- (case ((reg_name_matches_prefix s1662_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1663_0)) =>
- (case ((string_drop s1662_0 s1663_0)) of
- s1664_0 =>
- (case ((sep_matches_prefix s1664_0)) of
- SOME ((() , s1665_0)) =>
- (case ((string_drop s1664_0 s1665_0)) of
- s1666_0 =>
- (case ((csr_name_map_matches_prefix s1666_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s1667_0)) =>
- let p0_ = (string_drop s1666_0 s1667_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ ((s3205_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3206_0=
+ (let s3207_0 = s3206_0 in
+ if ((string_startswith s3207_0 "c.fsd")) then
+ (case ((string_drop s3207_0 ((string_length "c.fsd")))) of
+ s3208_0 =>
+ (case ((spc_matches_prefix0 s3208_0)) of
+ SOME ((() , s3209_0)) =>
+ (case ((string_drop s3208_0 s3209_0)) of
+ s3210_0 =>
+ (case ((creg_name_matches_prefix s3210_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s3211_0)) =>
+ (case ((string_drop s3210_0 s3211_0)) of
+ s3212_0 =>
+ (case ((sep_matches_prefix s3212_0)) of
+ SOME ((() , s3213_0)) =>
+ (case ((string_drop s3212_0 s3213_0)) of
+ s3214_0 =>
+ (case ((creg_name_matches_prefix s3214_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s3215_0)) =>
+ (case ((string_drop s3214_0 s3215_0)) of
+ s3216_0 =>
+ (case ((sep_matches_prefix s3216_0)) of
+ SOME ((() , s3217_0)) =>
+ (case ((string_drop s3216_0 s3217_0)) of
+ s3218_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3218_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1442, s3219_0)) =>
+ if (((((subrange_vec_dec v__1442 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1442 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1442 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3218_0 s3219_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3189_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s3189_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3190_0=
+ (let s3191_0 = s3190_0 in
+ if ((string_startswith s3191_0 "c.fld")) then
+ (case ((string_drop s3191_0 ((string_length "c.fld")))) of
+ s3192_0 =>
+ (case ((spc_matches_prefix0 s3192_0)) of
+ SOME ((() , s3193_0)) =>
+ (case ((string_drop s3192_0 s3193_0)) of
+ s3194_0 =>
+ (case ((creg_name_matches_prefix s3194_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3195_0)) =>
+ (case ((string_drop s3194_0 s3195_0)) of
+ s3196_0 =>
+ (case ((sep_matches_prefix s3196_0)) of
+ SOME ((() , s3197_0)) =>
+ (case ((string_drop s3196_0 s3197_0)) of
+ s3198_0 =>
+ (case ((creg_name_matches_prefix s3198_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s3199_0)) =>
+ (case ((string_drop s3198_0 s3199_0)) of
+ s3200_0 =>
+ (case ((sep_matches_prefix s3200_0)) of
+ SOME ((() , s3201_0)) =>
+ (case ((string_drop s3200_0 s3201_0)) of
+ s3202_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3202_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1444, s3203_0)) =>
+ if (((((subrange_vec_dec v__1444 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1444 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1444 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3202_0 s3203_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3177_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s3177_:string ->((5)words$word#(6)words$word)option) s3178_0=
+ (let s3179_0 = s3178_0 in
+ if ((string_startswith s3179_0 "c.fsdsp")) then
+ (case ((string_drop s3179_0 ((string_length "c.fsdsp")))) of
+ s3180_0 =>
+ (case ((spc_matches_prefix0 s3180_0)) of
+ SOME ((() , s3181_0)) =>
+ (case ((string_drop s3180_0 s3181_0)) of
+ s3182_0 =>
+ (case ((reg_name_matches_prefix s3182_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3183_0)) =>
+ (case ((string_drop s3182_0 s3183_0)) of
+ s3184_0 =>
+ (case ((sep_matches_prefix s3184_0)) of
+ SOME ((() , s3185_0)) =>
+ (case ((string_drop s3184_0 s3185_0)) of
+ s3186_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3186_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3187_0)) =>
+ let p0_ = (string_drop s3186_0 s3187_0) in
+ if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3165_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s3165_:string ->((5)words$word#(6)words$word)option) s3166_0=
+ (let s3167_0 = s3166_0 in
+ if ((string_startswith s3167_0 "c.fldsp")) then
+ (case ((string_drop s3167_0 ((string_length "c.fldsp")))) of
+ s3168_0 =>
+ (case ((spc_matches_prefix0 s3168_0)) of
+ SOME ((() , s3169_0)) =>
+ (case ((string_drop s3168_0 s3169_0)) of
+ s3170_0 =>
+ (case ((reg_name_matches_prefix s3170_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3171_0)) =>
+ (case ((string_drop s3170_0 s3171_0)) of
+ s3172_0 =>
+ (case ((sep_matches_prefix s3172_0)) of
+ SOME ((() , s3173_0)) =>
+ (case ((string_drop s3172_0 s3173_0)) of
+ s3174_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3174_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3175_0)) =>
+ let p0_ = (string_drop s3174_0 s3175_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s3152_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3152_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s3153_0=
+ ((case s3153_0 of
+ s3154_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s3154_0)) of
+ SOME ((FCLASS_D, s3155_0)) =>
+ (case ((string_drop s3154_0 s3155_0)) of
+ s3156_0 =>
+ (case ((spc_matches_prefix0 s3156_0)) of
+ SOME ((() , s3157_0)) =>
+ (case ((string_drop s3156_0 s3157_0)) of
+ s3158_0 =>
+ (case ((reg_name_matches_prefix s3158_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3159_0)) =>
+ (case ((string_drop s3158_0 s3159_0)) of
+ s3160_0 =>
+ (case ((sep_matches_prefix s3160_0)) of
+ SOME ((() , s3161_0)) =>
+ (case ((string_drop s3160_0 s3161_0)) of
+ s3162_0 =>
+ (case ((freg_name_matches_prefix s3162_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3163_0)) =>
+ let p0_ = (string_drop s3162_0 s3163_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_D, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3139_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3139_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s3140_0=
+ ((case s3140_0 of
+ s3141_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s3141_0)) of
+ SOME ((FMV_D_X, s3142_0)) =>
+ (case ((string_drop s3141_0 s3142_0)) of
+ s3143_0 =>
+ (case ((spc_matches_prefix0 s3143_0)) of
+ SOME ((() , s3144_0)) =>
+ (case ((string_drop s3143_0 s3144_0)) of
+ s3145_0 =>
+ (case ((freg_name_matches_prefix s3145_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3146_0)) =>
+ (case ((string_drop s3145_0 s3146_0)) of
+ s3147_0 =>
+ (case ((sep_matches_prefix s3147_0)) of
+ SOME ((() , s3148_0)) =>
+ (case ((string_drop s3147_0 s3148_0)) of
+ s3149_0 =>
+ (case ((reg_name_matches_prefix s3149_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3150_0)) =>
+ let p0_ = (string_drop s3149_0 s3150_0) in
+ if (((p0_ = ""))) then SOME (FMV_D_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3126_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3126_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s3127_0=
+ ((case s3127_0 of
+ s3128_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s3128_0)) of
+ SOME ((FMV_X_D, s3129_0)) =>
+ (case ((string_drop s3128_0 s3129_0)) of
+ s3130_0 =>
+ (case ((spc_matches_prefix0 s3130_0)) of
+ SOME ((() , s3131_0)) =>
+ (case ((string_drop s3130_0 s3131_0)) of
+ s3132_0 =>
+ (case ((reg_name_matches_prefix s3132_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3133_0)) =>
+ (case ((string_drop s3132_0 s3133_0)) of
+ s3134_0 =>
+ (case ((sep_matches_prefix s3134_0)) of
+ SOME ((() , s3135_0)) =>
+ (case ((string_drop s3134_0 s3135_0)) of
+ s3136_0 =>
+ (case ((freg_name_matches_prefix s3136_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3137_0)) =>
+ let p0_ = (string_drop s3136_0 s3137_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_D, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3109_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3109_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3110_0=
+ ((case s3110_0 of
+ s3111_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3111_0)) of
+ SOME ((FLE_D, s3112_0)) =>
+ (case ((string_drop s3111_0 s3112_0)) of
+ s3113_0 =>
+ (case ((spc_matches_prefix0 s3113_0)) of
+ SOME ((() , s3114_0)) =>
+ (case ((string_drop s3113_0 s3114_0)) of
+ s3115_0 =>
+ (case ((reg_name_matches_prefix s3115_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3116_0)) =>
+ (case ((string_drop s3115_0 s3116_0)) of
+ s3117_0 =>
+ (case ((sep_matches_prefix s3117_0)) of
+ SOME ((() , s3118_0)) =>
+ (case ((string_drop s3117_0 s3118_0)) of
+ s3119_0 =>
+ (case ((freg_name_matches_prefix s3119_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3120_0)) =>
+ (case ((string_drop s3119_0 s3120_0)) of
+ s3121_0 =>
+ (case ((sep_matches_prefix s3121_0)) of
+ SOME ((() , s3122_0)) =>
+ (case ((string_drop s3121_0 s3122_0)) of
+ s3123_0 =>
+ (case ((freg_name_matches_prefix s3123_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3124_0)) =>
+ let p0_ = (string_drop s3123_0 s3124_0) in
+ if (((p0_ = ""))) then SOME (FLE_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3092_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3092_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3093_0=
+ ((case s3093_0 of
+ s3094_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3094_0)) of
+ SOME ((FLT_D, s3095_0)) =>
+ (case ((string_drop s3094_0 s3095_0)) of
+ s3096_0 =>
+ (case ((spc_matches_prefix0 s3096_0)) of
+ SOME ((() , s3097_0)) =>
+ (case ((string_drop s3096_0 s3097_0)) of
+ s3098_0 =>
+ (case ((reg_name_matches_prefix s3098_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3099_0)) =>
+ (case ((string_drop s3098_0 s3099_0)) of
+ s3100_0 =>
+ (case ((sep_matches_prefix s3100_0)) of
+ SOME ((() , s3101_0)) =>
+ (case ((string_drop s3100_0 s3101_0)) of
+ s3102_0 =>
+ (case ((freg_name_matches_prefix s3102_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3103_0)) =>
+ (case ((string_drop s3102_0 s3103_0)) of
+ s3104_0 =>
+ (case ((sep_matches_prefix s3104_0)) of
+ SOME ((() , s3105_0)) =>
+ (case ((string_drop s3104_0 s3105_0)) of
+ s3106_0 =>
+ (case ((freg_name_matches_prefix s3106_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3107_0)) =>
+ let p0_ = (string_drop s3106_0 s3107_0) in
+ if (((p0_ = ""))) then SOME (FLT_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3075_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3075_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3076_0=
+ ((case s3076_0 of
+ s3077_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3077_0)) of
+ SOME ((FEQ_D, s3078_0)) =>
+ (case ((string_drop s3077_0 s3078_0)) of
+ s3079_0 =>
+ (case ((spc_matches_prefix0 s3079_0)) of
+ SOME ((() , s3080_0)) =>
+ (case ((string_drop s3079_0 s3080_0)) of
+ s3081_0 =>
+ (case ((reg_name_matches_prefix s3081_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3082_0)) =>
+ (case ((string_drop s3081_0 s3082_0)) of
+ s3083_0 =>
+ (case ((sep_matches_prefix s3083_0)) of
+ SOME ((() , s3084_0)) =>
+ (case ((string_drop s3083_0 s3084_0)) of
+ s3085_0 =>
+ (case ((freg_name_matches_prefix s3085_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3086_0)) =>
+ (case ((string_drop s3085_0 s3086_0)) of
+ s3087_0 =>
+ (case ((sep_matches_prefix s3087_0)) of
+ SOME ((() , s3088_0)) =>
+ (case ((string_drop s3087_0 s3088_0)) of
+ s3089_0 =>
+ (case ((freg_name_matches_prefix s3089_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3090_0)) =>
+ let p0_ = (string_drop s3089_0 s3090_0) in
+ if (((p0_ = ""))) then SOME (FEQ_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3058_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3058_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3059_0=
+ ((case s3059_0 of
+ s3060_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3060_0)) of
+ SOME ((FMAX_D, s3061_0)) =>
+ (case ((string_drop s3060_0 s3061_0)) of
+ s3062_0 =>
+ (case ((spc_matches_prefix0 s3062_0)) of
+ SOME ((() , s3063_0)) =>
+ (case ((string_drop s3062_0 s3063_0)) of
+ s3064_0 =>
+ (case ((freg_name_matches_prefix s3064_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3065_0)) =>
+ (case ((string_drop s3064_0 s3065_0)) of
+ s3066_0 =>
+ (case ((sep_matches_prefix s3066_0)) of
+ SOME ((() , s3067_0)) =>
+ (case ((string_drop s3066_0 s3067_0)) of
+ s3068_0 =>
+ (case ((freg_name_matches_prefix s3068_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3069_0)) =>
+ (case ((string_drop s3068_0 s3069_0)) of
+ s3070_0 =>
+ (case ((sep_matches_prefix s3070_0)) of
+ SOME ((() , s3071_0)) =>
+ (case ((string_drop s3070_0 s3071_0)) of
+ s3072_0 =>
+ (case ((freg_name_matches_prefix s3072_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3073_0)) =>
+ let p0_ = (string_drop s3072_0 s3073_0) in
+ if (((p0_ = ""))) then SOME (FMAX_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3041_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3041_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3042_0=
+ ((case s3042_0 of
+ s3043_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3043_0)) of
+ SOME ((FMIN_D, s3044_0)) =>
+ (case ((string_drop s3043_0 s3044_0)) of
+ s3045_0 =>
+ (case ((spc_matches_prefix0 s3045_0)) of
+ SOME ((() , s3046_0)) =>
+ (case ((string_drop s3045_0 s3046_0)) of
+ s3047_0 =>
+ (case ((freg_name_matches_prefix s3047_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3048_0)) =>
+ (case ((string_drop s3047_0 s3048_0)) of
+ s3049_0 =>
+ (case ((sep_matches_prefix s3049_0)) of
+ SOME ((() , s3050_0)) =>
+ (case ((string_drop s3049_0 s3050_0)) of
+ s3051_0 =>
+ (case ((freg_name_matches_prefix s3051_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3052_0)) =>
+ (case ((string_drop s3051_0 s3052_0)) of
+ s3053_0 =>
+ (case ((sep_matches_prefix s3053_0)) of
+ SOME ((() , s3054_0)) =>
+ (case ((string_drop s3053_0 s3054_0)) of
+ s3055_0 =>
+ (case ((freg_name_matches_prefix s3055_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3056_0)) =>
+ let p0_ = (string_drop s3055_0 s3056_0) in
+ if (((p0_ = ""))) then SOME (FMIN_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3024_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3024_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3025_0=
+ ((case s3025_0 of
+ s3026_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3026_0)) of
+ SOME ((FSGNJX_D, s3027_0)) =>
+ (case ((string_drop s3026_0 s3027_0)) of
+ s3028_0 =>
+ (case ((spc_matches_prefix0 s3028_0)) of
+ SOME ((() , s3029_0)) =>
+ (case ((string_drop s3028_0 s3029_0)) of
+ s3030_0 =>
+ (case ((freg_name_matches_prefix s3030_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3031_0)) =>
+ (case ((string_drop s3030_0 s3031_0)) of
+ s3032_0 =>
+ (case ((sep_matches_prefix s3032_0)) of
+ SOME ((() , s3033_0)) =>
+ (case ((string_drop s3032_0 s3033_0)) of
+ s3034_0 =>
+ (case ((freg_name_matches_prefix s3034_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3035_0)) =>
+ (case ((string_drop s3034_0 s3035_0)) of
+ s3036_0 =>
+ (case ((sep_matches_prefix s3036_0)) of
+ SOME ((() , s3037_0)) =>
+ (case ((string_drop s3036_0 s3037_0)) of
+ s3038_0 =>
+ (case ((freg_name_matches_prefix s3038_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3039_0)) =>
+ let p0_ = (string_drop s3038_0 s3039_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s3007_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3007_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s3008_0=
+ ((case s3008_0 of
+ s3009_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s3009_0)) of
+ SOME ((FSGNJN_D, s3010_0)) =>
+ (case ((string_drop s3009_0 s3010_0)) of
+ s3011_0 =>
+ (case ((spc_matches_prefix0 s3011_0)) of
+ SOME ((() , s3012_0)) =>
+ (case ((string_drop s3011_0 s3012_0)) of
+ s3013_0 =>
+ (case ((freg_name_matches_prefix s3013_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3014_0)) =>
+ (case ((string_drop s3013_0 s3014_0)) of
+ s3015_0 =>
+ (case ((sep_matches_prefix s3015_0)) of
+ SOME ((() , s3016_0)) =>
+ (case ((string_drop s3015_0 s3016_0)) of
+ s3017_0 =>
+ (case ((freg_name_matches_prefix s3017_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3018_0)) =>
+ (case ((string_drop s3017_0 s3018_0)) of
+ s3019_0 =>
+ (case ((sep_matches_prefix s3019_0)) of
+ SOME ((() , s3020_0)) =>
+ (case ((string_drop s3019_0 s3020_0)) of
+ s3021_0 =>
+ (case ((freg_name_matches_prefix s3021_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3022_0)) =>
+ let p0_ = (string_drop s3021_0 s3022_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2990_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2990_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s2991_0=
+ ((case s2991_0 of
+ s2992_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s2992_0)) of
+ SOME ((FSGNJ_D, s2993_0)) =>
+ (case ((string_drop s2992_0 s2993_0)) of
+ s2994_0 =>
+ (case ((spc_matches_prefix0 s2994_0)) of
+ SOME ((() , s2995_0)) =>
+ (case ((string_drop s2994_0 s2995_0)) of
+ s2996_0 =>
+ (case ((freg_name_matches_prefix s2996_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2997_0)) =>
+ (case ((string_drop s2996_0 s2997_0)) of
+ s2998_0 =>
+ (case ((sep_matches_prefix s2998_0)) of
+ SOME ((() , s2999_0)) =>
+ (case ((string_drop s2998_0 s2999_0)) of
+ s3000_0 =>
+ (case ((freg_name_matches_prefix s3000_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3001_0)) =>
+ (case ((string_drop s3000_0 s3001_0)) of
+ s3002_0 =>
+ (case ((sep_matches_prefix s3002_0)) of
+ SOME ((() , s3003_0)) =>
+ (case ((string_drop s3002_0 s3003_0)) of
+ s3004_0 =>
+ (case ((freg_name_matches_prefix s3004_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3005_0)) =>
+ let p0_ = (string_drop s3004_0 s3005_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2973_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2973_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2974_0=
+ ((case s2974_0 of
+ s2975_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2975_0)) of
+ SOME ((FCVT_D_S, s2976_0)) =>
+ (case ((string_drop s2975_0 s2976_0)) of
+ s2977_0 =>
+ (case ((spc_matches_prefix0 s2977_0)) of
+ SOME ((() , s2978_0)) =>
+ (case ((string_drop s2977_0 s2978_0)) of
+ s2979_0 =>
+ (case ((freg_name_matches_prefix s2979_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2980_0)) =>
+ (case ((string_drop s2979_0 s2980_0)) of
+ s2981_0 =>
+ (case ((sep_matches_prefix s2981_0)) of
+ SOME ((() , s2982_0)) =>
+ (case ((string_drop s2981_0 s2982_0)) of
+ s2983_0 =>
+ (case ((freg_name_matches_prefix s2983_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2984_0)) =>
+ (case ((string_drop s2983_0 s2984_0)) of
+ s2985_0 =>
+ (case ((sep_matches_prefix s2985_0)) of
+ SOME ((() , s2986_0)) =>
+ (case ((string_drop s2985_0 s2986_0)) of
+ s2987_0 =>
+ (case ((frm_mnemonic_matches_prefix s2987_0)) of
+ SOME ((rm, s2988_0)) =>
+ let p0_ = (string_drop s2987_0 s2988_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2956_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2956_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2957_0=
+ ((case s2957_0 of
+ s2958_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2958_0)) of
+ SOME ((FCVT_S_D, s2959_0)) =>
+ (case ((string_drop s2958_0 s2959_0)) of
+ s2960_0 =>
+ (case ((spc_matches_prefix0 s2960_0)) of
+ SOME ((() , s2961_0)) =>
+ (case ((string_drop s2960_0 s2961_0)) of
+ s2962_0 =>
+ (case ((freg_name_matches_prefix s2962_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2963_0)) =>
+ (case ((string_drop s2962_0 s2963_0)) of
+ s2964_0 =>
+ (case ((sep_matches_prefix s2964_0)) of
+ SOME ((() , s2965_0)) =>
+ (case ((string_drop s2964_0 s2965_0)) of
+ s2966_0 =>
+ (case ((freg_name_matches_prefix s2966_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2967_0)) =>
+ (case ((string_drop s2966_0 s2967_0)) of
+ s2968_0 =>
+ (case ((sep_matches_prefix s2968_0)) of
+ SOME ((() , s2969_0)) =>
+ (case ((string_drop s2968_0 s2969_0)) of
+ s2970_0 =>
+ (case ((frm_mnemonic_matches_prefix s2970_0)) of
+ SOME ((rm, s2971_0)) =>
+ let p0_ = (string_drop s2970_0 s2971_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2939_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2939_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2940_0=
+ ((case s2940_0 of
+ s2941_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2941_0)) of
+ SOME ((FCVT_D_LU, s2942_0)) =>
+ (case ((string_drop s2941_0 s2942_0)) of
+ s2943_0 =>
+ (case ((spc_matches_prefix0 s2943_0)) of
+ SOME ((() , s2944_0)) =>
+ (case ((string_drop s2943_0 s2944_0)) of
+ s2945_0 =>
+ (case ((freg_name_matches_prefix s2945_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2946_0)) =>
+ (case ((string_drop s2945_0 s2946_0)) of
+ s2947_0 =>
+ (case ((sep_matches_prefix s2947_0)) of
+ SOME ((() , s2948_0)) =>
+ (case ((string_drop s2947_0 s2948_0)) of
+ s2949_0 =>
+ (case ((reg_name_matches_prefix s2949_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2950_0)) =>
+ (case ((string_drop s2949_0 s2950_0)) of
+ s2951_0 =>
+ (case ((sep_matches_prefix s2951_0)) of
+ SOME ((() , s2952_0)) =>
+ (case ((string_drop s2951_0 s2952_0)) of
+ s2953_0 =>
+ (case ((frm_mnemonic_matches_prefix s2953_0)) of
+ SOME ((rm, s2954_0)) =>
+ let p0_ = (string_drop s2953_0 s2954_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2922_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2922_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2923_0=
+ ((case s2923_0 of
+ s2924_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2924_0)) of
+ SOME ((FCVT_D_L, s2925_0)) =>
+ (case ((string_drop s2924_0 s2925_0)) of
+ s2926_0 =>
+ (case ((spc_matches_prefix0 s2926_0)) of
+ SOME ((() , s2927_0)) =>
+ (case ((string_drop s2926_0 s2927_0)) of
+ s2928_0 =>
+ (case ((freg_name_matches_prefix s2928_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2929_0)) =>
+ (case ((string_drop s2928_0 s2929_0)) of
+ s2930_0 =>
+ (case ((sep_matches_prefix s2930_0)) of
+ SOME ((() , s2931_0)) =>
+ (case ((string_drop s2930_0 s2931_0)) of
+ s2932_0 =>
+ (case ((reg_name_matches_prefix s2932_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2933_0)) =>
+ (case ((string_drop s2932_0 s2933_0)) of
+ s2934_0 =>
+ (case ((sep_matches_prefix s2934_0)) of
+ SOME ((() , s2935_0)) =>
+ (case ((string_drop s2934_0 s2935_0)) of
+ s2936_0 =>
+ (case ((frm_mnemonic_matches_prefix s2936_0)) of
+ SOME ((rm, s2937_0)) =>
+ let p0_ = (string_drop s2936_0 s2937_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2905_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2905_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2906_0=
+ ((case s2906_0 of
+ s2907_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2907_0)) of
+ SOME ((FCVT_LU_D, s2908_0)) =>
+ (case ((string_drop s2907_0 s2908_0)) of
+ s2909_0 =>
+ (case ((spc_matches_prefix0 s2909_0)) of
+ SOME ((() , s2910_0)) =>
+ (case ((string_drop s2909_0 s2910_0)) of
+ s2911_0 =>
+ (case ((reg_name_matches_prefix s2911_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2912_0)) =>
+ (case ((string_drop s2911_0 s2912_0)) of
+ s2913_0 =>
+ (case ((sep_matches_prefix s2913_0)) of
+ SOME ((() , s2914_0)) =>
+ (case ((string_drop s2913_0 s2914_0)) of
+ s2915_0 =>
+ (case ((freg_name_matches_prefix s2915_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2916_0)) =>
+ (case ((string_drop s2915_0 s2916_0)) of
+ s2917_0 =>
+ (case ((sep_matches_prefix s2917_0)) of
+ SOME ((() , s2918_0)) =>
+ (case ((string_drop s2917_0 s2918_0)) of
+ s2919_0 =>
+ (case ((frm_mnemonic_matches_prefix s2919_0)) of
+ SOME ((rm, s2920_0)) =>
+ let p0_ = (string_drop s2919_0 s2920_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2888_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2888_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2889_0=
+ ((case s2889_0 of
+ s2890_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2890_0)) of
+ SOME ((FCVT_L_D, s2891_0)) =>
+ (case ((string_drop s2890_0 s2891_0)) of
+ s2892_0 =>
+ (case ((spc_matches_prefix0 s2892_0)) of
+ SOME ((() , s2893_0)) =>
+ (case ((string_drop s2892_0 s2893_0)) of
+ s2894_0 =>
+ (case ((reg_name_matches_prefix s2894_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2895_0)) =>
+ (case ((string_drop s2894_0 s2895_0)) of
+ s2896_0 =>
+ (case ((sep_matches_prefix s2896_0)) of
+ SOME ((() , s2897_0)) =>
+ (case ((string_drop s2896_0 s2897_0)) of
+ s2898_0 =>
+ (case ((freg_name_matches_prefix s2898_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2899_0)) =>
+ (case ((string_drop s2898_0 s2899_0)) of
+ s2900_0 =>
+ (case ((sep_matches_prefix s2900_0)) of
+ SOME ((() , s2901_0)) =>
+ (case ((string_drop s2900_0 s2901_0)) of
+ s2902_0 =>
+ (case ((frm_mnemonic_matches_prefix s2902_0)) of
+ SOME ((rm, s2903_0)) =>
+ let p0_ = (string_drop s2902_0 s2903_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2871_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2871_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2872_0=
+ ((case s2872_0 of
+ s2873_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2873_0)) of
+ SOME ((FCVT_D_WU, s2874_0)) =>
+ (case ((string_drop s2873_0 s2874_0)) of
+ s2875_0 =>
+ (case ((spc_matches_prefix0 s2875_0)) of
+ SOME ((() , s2876_0)) =>
+ (case ((string_drop s2875_0 s2876_0)) of
+ s2877_0 =>
+ (case ((freg_name_matches_prefix s2877_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2878_0)) =>
+ (case ((string_drop s2877_0 s2878_0)) of
+ s2879_0 =>
+ (case ((sep_matches_prefix s2879_0)) of
+ SOME ((() , s2880_0)) =>
+ (case ((string_drop s2879_0 s2880_0)) of
+ s2881_0 =>
+ (case ((reg_name_matches_prefix s2881_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2882_0)) =>
+ (case ((string_drop s2881_0 s2882_0)) of
+ s2883_0 =>
+ (case ((sep_matches_prefix s2883_0)) of
+ SOME ((() , s2884_0)) =>
+ (case ((string_drop s2883_0 s2884_0)) of
+ s2885_0 =>
+ (case ((frm_mnemonic_matches_prefix s2885_0)) of
+ SOME ((rm, s2886_0)) =>
+ let p0_ = (string_drop s2885_0 s2886_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2854_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2854_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2855_0=
+ ((case s2855_0 of
+ s2856_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2856_0)) of
+ SOME ((FCVT_D_W, s2857_0)) =>
+ (case ((string_drop s2856_0 s2857_0)) of
+ s2858_0 =>
+ (case ((spc_matches_prefix0 s2858_0)) of
+ SOME ((() , s2859_0)) =>
+ (case ((string_drop s2858_0 s2859_0)) of
+ s2860_0 =>
+ (case ((freg_name_matches_prefix s2860_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2861_0)) =>
+ (case ((string_drop s2860_0 s2861_0)) of
+ s2862_0 =>
+ (case ((sep_matches_prefix s2862_0)) of
+ SOME ((() , s2863_0)) =>
+ (case ((string_drop s2862_0 s2863_0)) of
+ s2864_0 =>
+ (case ((reg_name_matches_prefix s2864_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2865_0)) =>
+ (case ((string_drop s2864_0 s2865_0)) of
+ s2866_0 =>
+ (case ((sep_matches_prefix s2866_0)) of
+ SOME ((() , s2867_0)) =>
+ (case ((string_drop s2866_0 s2867_0)) of
+ s2868_0 =>
+ (case ((frm_mnemonic_matches_prefix s2868_0)) of
+ SOME ((rm, s2869_0)) =>
+ let p0_ = (string_drop s2868_0 s2869_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2837_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2837_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2838_0=
+ ((case s2838_0 of
+ s2839_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2839_0)) of
+ SOME ((FCVT_WU_D, s2840_0)) =>
+ (case ((string_drop s2839_0 s2840_0)) of
+ s2841_0 =>
+ (case ((spc_matches_prefix0 s2841_0)) of
+ SOME ((() , s2842_0)) =>
+ (case ((string_drop s2841_0 s2842_0)) of
+ s2843_0 =>
+ (case ((reg_name_matches_prefix s2843_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2844_0)) =>
+ (case ((string_drop s2843_0 s2844_0)) of
+ s2845_0 =>
+ (case ((sep_matches_prefix s2845_0)) of
+ SOME ((() , s2846_0)) =>
+ (case ((string_drop s2845_0 s2846_0)) of
+ s2847_0 =>
+ (case ((freg_name_matches_prefix s2847_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2848_0)) =>
+ (case ((string_drop s2847_0 s2848_0)) of
+ s2849_0 =>
+ (case ((sep_matches_prefix s2849_0)) of
+ SOME ((() , s2850_0)) =>
+ (case ((string_drop s2849_0 s2850_0)) of
+ s2851_0 =>
+ (case ((frm_mnemonic_matches_prefix s2851_0)) of
+ SOME ((rm, s2852_0)) =>
+ let p0_ = (string_drop s2851_0 s2852_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2820_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2820_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2821_0=
+ ((case s2821_0 of
+ s2822_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2822_0)) of
+ SOME ((FCVT_W_D, s2823_0)) =>
+ (case ((string_drop s2822_0 s2823_0)) of
+ s2824_0 =>
+ (case ((spc_matches_prefix0 s2824_0)) of
+ SOME ((() , s2825_0)) =>
+ (case ((string_drop s2824_0 s2825_0)) of
+ s2826_0 =>
+ (case ((reg_name_matches_prefix s2826_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2827_0)) =>
+ (case ((string_drop s2826_0 s2827_0)) of
+ s2828_0 =>
+ (case ((sep_matches_prefix s2828_0)) of
+ SOME ((() , s2829_0)) =>
+ (case ((string_drop s2828_0 s2829_0)) of
+ s2830_0 =>
+ (case ((freg_name_matches_prefix s2830_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2831_0)) =>
+ (case ((string_drop s2830_0 s2831_0)) of
+ s2832_0 =>
+ (case ((sep_matches_prefix s2832_0)) of
+ SOME ((() , s2833_0)) =>
+ (case ((string_drop s2832_0 s2833_0)) of
+ s2834_0 =>
+ (case ((frm_mnemonic_matches_prefix s2834_0)) of
+ SOME ((rm, s2835_0)) =>
+ let p0_ = (string_drop s2834_0 s2835_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2803_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2803_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s2804_0=
+ ((case s2804_0 of
+ s2805_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s2805_0)) of
+ SOME ((FSQRT_D, s2806_0)) =>
+ (case ((string_drop s2805_0 s2806_0)) of
+ s2807_0 =>
+ (case ((spc_matches_prefix0 s2807_0)) of
+ SOME ((() , s2808_0)) =>
+ (case ((string_drop s2807_0 s2808_0)) of
+ s2809_0 =>
+ (case ((freg_name_matches_prefix s2809_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2810_0)) =>
+ (case ((string_drop s2809_0 s2810_0)) of
+ s2811_0 =>
+ (case ((sep_matches_prefix s2811_0)) of
+ SOME ((() , s2812_0)) =>
+ (case ((string_drop s2811_0 s2812_0)) of
+ s2813_0 =>
+ (case ((freg_name_matches_prefix s2813_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2814_0)) =>
+ (case ((string_drop s2813_0 s2814_0)) of
+ s2815_0 =>
+ (case ((sep_matches_prefix s2815_0)) of
+ SOME ((() , s2816_0)) =>
+ (case ((string_drop s2815_0 s2816_0)) of
+ s2817_0 =>
+ (case ((frm_mnemonic_matches_prefix s2817_0)) of
+ SOME ((rm, s2818_0)) =>
+ let p0_ = (string_drop s2817_0 s2818_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2782_ : string -> maybe ((f_bin_rm_op_D * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2782_:string ->(f_bin_rm_op_D#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2783_0=
+ ((case s2783_0 of
+ s2784_0 =>
+ (case ((f_bin_rm_type_mnemonic_D_matches_prefix s2784_0)) of
+ SOME ((op, s2785_0)) =>
+ (case ((string_drop s2784_0 s2785_0)) of
+ s2786_0 =>
+ (case ((spc_matches_prefix0 s2786_0)) of
+ SOME ((() , s2787_0)) =>
+ (case ((string_drop s2786_0 s2787_0)) of
+ s2788_0 =>
+ (case ((freg_name_matches_prefix s2788_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2789_0)) =>
+ (case ((string_drop s2788_0 s2789_0)) of
+ s2790_0 =>
+ (case ((sep_matches_prefix s2790_0)) of
+ SOME ((() , s2791_0)) =>
+ (case ((string_drop s2790_0 s2791_0)) of
+ s2792_0 =>
+ (case ((freg_name_matches_prefix s2792_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2793_0)) =>
+ (case ((string_drop s2792_0 s2793_0)) of
+ s2794_0 =>
+ (case ((sep_matches_prefix s2794_0)) of
+ SOME ((() , s2795_0)) =>
+ (case ((string_drop s2794_0 s2795_0)) of
+ s2796_0 =>
+ (case ((freg_name_matches_prefix s2796_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2797_0)) =>
+ (case ((string_drop s2796_0 s2797_0)) of
+ s2798_0 =>
+ (case ((sep_matches_prefix s2798_0)) of
+ SOME ((() , s2799_0)) =>
+ (case ((string_drop s2798_0 s2799_0)) of
+ s2800_0 =>
+ (case ((frm_mnemonic_matches_prefix s2800_0)) of
+ SOME ((rm, s2801_0)) =>
+ let p0_ = (string_drop s2800_0 s2801_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2757_ : string -> maybe ((f_madd_op_D * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2757_:string ->(f_madd_op_D#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2758_0=
+ ((case s2758_0 of
+ s2759_0 =>
+ (case ((f_madd_type_mnemonic_D_matches_prefix s2759_0)) of
+ SOME ((op, s2760_0)) =>
+ (case ((string_drop s2759_0 s2760_0)) of
+ s2761_0 =>
+ (case ((spc_matches_prefix0 s2761_0)) of
+ SOME ((() , s2762_0)) =>
+ (case ((string_drop s2761_0 s2762_0)) of
+ s2763_0 =>
+ (case ((freg_name_matches_prefix s2763_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2764_0)) =>
+ (case ((string_drop s2763_0 s2764_0)) of
+ s2765_0 =>
+ (case ((sep_matches_prefix s2765_0)) of
+ SOME ((() , s2766_0)) =>
+ (case ((string_drop s2765_0 s2766_0)) of
+ s2767_0 =>
+ (case ((freg_name_matches_prefix s2767_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2768_0)) =>
+ (case ((string_drop s2767_0 s2768_0)) of
+ s2769_0 =>
+ (case ((sep_matches_prefix s2769_0)) of
+ SOME ((() , s2770_0)) =>
+ (case ((string_drop s2769_0 s2770_0)) of
+ s2771_0 =>
+ (case ((freg_name_matches_prefix s2771_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2772_0)) =>
+ (case ((string_drop s2771_0 s2772_0)) of
+ s2773_0 =>
+ (case ((sep_matches_prefix s2773_0)) of
+ SOME ((() , s2774_0)) =>
+ (case ((string_drop s2773_0 s2774_0)) of
+ s2775_0 =>
+ (case ((freg_name_matches_prefix s2775_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s2776_0)) =>
+ (case ((string_drop s2775_0 s2776_0)) of
+ s2777_0 =>
+ (case ((sep_matches_prefix s2777_0)) of
+ SOME ((() , s2778_0)) =>
+ (case ((string_drop s2777_0 s2778_0)) of
+ s2779_0 =>
+ (case ((frm_mnemonic_matches_prefix s2779_0)) of
+ SOME ((rm, s2780_0)) =>
+ let p0_ = (string_drop s2779_0 s2780_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2741_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s2741_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2742_0=
+ (let s2743_0 = s2742_0 in
+ if ((string_startswith s2743_0 "c.fsw")) then
+ (case ((string_drop s2743_0 ((string_length "c.fsw")))) of
+ s2744_0 =>
+ (case ((spc_matches_prefix0 s2744_0)) of
+ SOME ((() , s2745_0)) =>
+ (case ((string_drop s2744_0 s2745_0)) of
+ s2746_0 =>
+ (case ((creg_name_matches_prefix s2746_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s2747_0)) =>
+ (case ((string_drop s2746_0 s2747_0)) of
+ s2748_0 =>
+ (case ((sep_matches_prefix s2748_0)) of
+ SOME ((() , s2749_0)) =>
+ (case ((string_drop s2748_0 s2749_0)) of
+ s2750_0 =>
+ (case ((creg_name_matches_prefix s2750_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s2751_0)) =>
+ (case ((string_drop s2750_0 s2751_0)) of
+ s2752_0 =>
+ (case ((sep_matches_prefix s2752_0)) of
+ SOME ((() , s2753_0)) =>
+ (case ((string_drop s2752_0 s2753_0)) of
+ s2754_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2754_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1446, s2755_0)) =>
+ if (((((subrange_vec_dec v__1446 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1446 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1446 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s2754_0 s2755_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2725_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s2725_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2726_0=
+ (let s2727_0 = s2726_0 in
+ if ((string_startswith s2727_0 "c.flw")) then
+ (case ((string_drop s2727_0 ((string_length "c.flw")))) of
+ s2728_0 =>
+ (case ((spc_matches_prefix0 s2728_0)) of
+ SOME ((() , s2729_0)) =>
+ (case ((string_drop s2728_0 s2729_0)) of
+ s2730_0 =>
+ (case ((creg_name_matches_prefix s2730_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s2731_0)) =>
+ (case ((string_drop s2730_0 s2731_0)) of
+ s2732_0 =>
+ (case ((sep_matches_prefix s2732_0)) of
+ SOME ((() , s2733_0)) =>
+ (case ((string_drop s2732_0 s2733_0)) of
+ s2734_0 =>
+ (case ((creg_name_matches_prefix s2734_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s2735_0)) =>
+ (case ((string_drop s2734_0 s2735_0)) of
+ s2736_0 =>
+ (case ((sep_matches_prefix s2736_0)) of
+ SOME ((() , s2737_0)) =>
+ (case ((string_drop s2736_0 s2737_0)) of
+ s2738_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2738_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1448, s2739_0)) =>
+ if (((((subrange_vec_dec v__1448 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1448 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1448 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s2738_0 s2739_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2713_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2713_:string ->((5)words$word#(6)words$word)option) s2714_0=
+ (let s2715_0 = s2714_0 in
+ if ((string_startswith s2715_0 "c.fswsp")) then
+ (case ((string_drop s2715_0 ((string_length "c.fswsp")))) of
+ s2716_0 =>
+ (case ((spc_matches_prefix0 s2716_0)) of
+ SOME ((() , s2717_0)) =>
+ (case ((string_drop s2716_0 s2717_0)) of
+ s2718_0 =>
+ (case ((reg_name_matches_prefix s2718_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2719_0)) =>
+ (case ((string_drop s2718_0 s2719_0)) of
+ s2720_0 =>
+ (case ((sep_matches_prefix s2720_0)) of
+ SOME ((() , s2721_0)) =>
+ (case ((string_drop s2720_0 s2721_0)) of
+ s2722_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2722_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s2723_0)) =>
+ let p0_ = (string_drop s2722_0 s2723_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2701_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2701_:string ->((5)words$word#(6)words$word)option) s2702_0=
+ (let s2703_0 = s2702_0 in
+ if ((string_startswith s2703_0 "c.flwsp")) then
+ (case ((string_drop s2703_0 ((string_length "c.flwsp")))) of
+ s2704_0 =>
+ (case ((spc_matches_prefix0 s2704_0)) of
+ SOME ((() , s2705_0)) =>
+ (case ((string_drop s2704_0 s2705_0)) of
+ s2706_0 =>
+ (case ((reg_name_matches_prefix s2706_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2707_0)) =>
+ (case ((string_drop s2706_0 s2707_0)) of
+ s2708_0 =>
+ (case ((sep_matches_prefix s2708_0)) of
+ SOME ((() , s2709_0)) =>
+ (case ((string_drop s2708_0 s2709_0)) of
+ s2710_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2710_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2711_0)) =>
+ let p0_ = (string_drop s2710_0 s2711_0) in
+ if (((p0_ = ""))) then SOME (rd, imm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2688_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2688_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2689_0=
+ ((case s2689_0 of
+ s2690_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2690_0)) of
+ SOME ((FCLASS_S, s2691_0)) =>
+ (case ((string_drop s2690_0 s2691_0)) of
+ s2692_0 =>
+ (case ((spc_matches_prefix0 s2692_0)) of
+ SOME ((() , s2693_0)) =>
+ (case ((string_drop s2692_0 s2693_0)) of
+ s2694_0 =>
+ (case ((reg_name_matches_prefix s2694_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2695_0)) =>
+ (case ((string_drop s2694_0 s2695_0)) of
+ s2696_0 =>
+ (case ((sep_matches_prefix s2696_0)) of
+ SOME ((() , s2697_0)) =>
+ (case ((string_drop s2696_0 s2697_0)) of
+ s2698_0 =>
+ (case ((freg_name_matches_prefix s2698_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2699_0)) =>
+ let p0_ = (string_drop s2698_0 s2699_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_S, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2675_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2675_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2676_0=
+ ((case s2676_0 of
+ s2677_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2677_0)) of
+ SOME ((FMV_W_X, s2678_0)) =>
+ (case ((string_drop s2677_0 s2678_0)) of
+ s2679_0 =>
+ (case ((spc_matches_prefix0 s2679_0)) of
+ SOME ((() , s2680_0)) =>
+ (case ((string_drop s2679_0 s2680_0)) of
+ s2681_0 =>
+ (case ((freg_name_matches_prefix s2681_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2682_0)) =>
+ (case ((string_drop s2681_0 s2682_0)) of
+ s2683_0 =>
+ (case ((sep_matches_prefix s2683_0)) of
+ SOME ((() , s2684_0)) =>
+ (case ((string_drop s2683_0 s2684_0)) of
+ s2685_0 =>
+ (case ((reg_name_matches_prefix s2685_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2686_0)) =>
+ let p0_ = (string_drop s2685_0 s2686_0) in
+ if (((p0_ = ""))) then SOME (FMV_W_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2662_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2662_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s2663_0=
+ ((case s2663_0 of
+ s2664_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s2664_0)) of
+ SOME ((FMV_X_W, s2665_0)) =>
+ (case ((string_drop s2664_0 s2665_0)) of
+ s2666_0 =>
+ (case ((spc_matches_prefix0 s2666_0)) of
+ SOME ((() , s2667_0)) =>
+ (case ((string_drop s2666_0 s2667_0)) of
+ s2668_0 =>
+ (case ((reg_name_matches_prefix s2668_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2669_0)) =>
+ (case ((string_drop s2668_0 s2669_0)) of
+ s2670_0 =>
+ (case ((sep_matches_prefix s2670_0)) of
+ SOME ((() , s2671_0)) =>
+ (case ((string_drop s2670_0 s2671_0)) of
+ s2672_0 =>
+ (case ((freg_name_matches_prefix s2672_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2673_0)) =>
+ let p0_ = (string_drop s2672_0 s2673_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_W, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2645_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2645_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2646_0=
+ ((case s2646_0 of
+ s2647_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2647_0)) of
+ SOME ((FLE_S, s2648_0)) =>
+ (case ((string_drop s2647_0 s2648_0)) of
+ s2649_0 =>
+ (case ((spc_matches_prefix0 s2649_0)) of
+ SOME ((() , s2650_0)) =>
+ (case ((string_drop s2649_0 s2650_0)) of
+ s2651_0 =>
+ (case ((reg_name_matches_prefix s2651_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2652_0)) =>
+ (case ((string_drop s2651_0 s2652_0)) of
+ s2653_0 =>
+ (case ((sep_matches_prefix s2653_0)) of
+ SOME ((() , s2654_0)) =>
+ (case ((string_drop s2653_0 s2654_0)) of
+ s2655_0 =>
+ (case ((freg_name_matches_prefix s2655_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2656_0)) =>
+ (case ((string_drop s2655_0 s2656_0)) of
+ s2657_0 =>
+ (case ((sep_matches_prefix s2657_0)) of
+ SOME ((() , s2658_0)) =>
+ (case ((string_drop s2657_0 s2658_0)) of
+ s2659_0 =>
+ (case ((freg_name_matches_prefix s2659_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2660_0)) =>
+ let p0_ = (string_drop s2659_0 s2660_0) in
+ if (((p0_ = ""))) then SOME (FLE_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2628_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2628_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2629_0=
+ ((case s2629_0 of
+ s2630_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2630_0)) of
+ SOME ((FLT_S, s2631_0)) =>
+ (case ((string_drop s2630_0 s2631_0)) of
+ s2632_0 =>
+ (case ((spc_matches_prefix0 s2632_0)) of
+ SOME ((() , s2633_0)) =>
+ (case ((string_drop s2632_0 s2633_0)) of
+ s2634_0 =>
+ (case ((reg_name_matches_prefix s2634_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2635_0)) =>
+ (case ((string_drop s2634_0 s2635_0)) of
+ s2636_0 =>
+ (case ((sep_matches_prefix s2636_0)) of
+ SOME ((() , s2637_0)) =>
+ (case ((string_drop s2636_0 s2637_0)) of
+ s2638_0 =>
+ (case ((freg_name_matches_prefix s2638_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2639_0)) =>
+ (case ((string_drop s2638_0 s2639_0)) of
+ s2640_0 =>
+ (case ((sep_matches_prefix s2640_0)) of
+ SOME ((() , s2641_0)) =>
+ (case ((string_drop s2640_0 s2641_0)) of
+ s2642_0 =>
+ (case ((freg_name_matches_prefix s2642_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2643_0)) =>
+ let p0_ = (string_drop s2642_0 s2643_0) in
+ if (((p0_ = ""))) then SOME (FLT_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2611_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2611_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2612_0=
+ ((case s2612_0 of
+ s2613_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2613_0)) of
+ SOME ((FEQ_S, s2614_0)) =>
+ (case ((string_drop s2613_0 s2614_0)) of
+ s2615_0 =>
+ (case ((spc_matches_prefix0 s2615_0)) of
+ SOME ((() , s2616_0)) =>
+ (case ((string_drop s2615_0 s2616_0)) of
+ s2617_0 =>
+ (case ((reg_name_matches_prefix s2617_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2618_0)) =>
+ (case ((string_drop s2617_0 s2618_0)) of
+ s2619_0 =>
+ (case ((sep_matches_prefix s2619_0)) of
+ SOME ((() , s2620_0)) =>
+ (case ((string_drop s2619_0 s2620_0)) of
+ s2621_0 =>
+ (case ((freg_name_matches_prefix s2621_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2622_0)) =>
+ (case ((string_drop s2621_0 s2622_0)) of
+ s2623_0 =>
+ (case ((sep_matches_prefix s2623_0)) of
+ SOME ((() , s2624_0)) =>
+ (case ((string_drop s2623_0 s2624_0)) of
+ s2625_0 =>
+ (case ((freg_name_matches_prefix s2625_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2626_0)) =>
+ let p0_ = (string_drop s2625_0 s2626_0) in
+ if (((p0_ = ""))) then SOME (FEQ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2594_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2594_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2595_0=
+ ((case s2595_0 of
+ s2596_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2596_0)) of
+ SOME ((FMAX_S, s2597_0)) =>
+ (case ((string_drop s2596_0 s2597_0)) of
+ s2598_0 =>
+ (case ((spc_matches_prefix0 s2598_0)) of
+ SOME ((() , s2599_0)) =>
+ (case ((string_drop s2598_0 s2599_0)) of
+ s2600_0 =>
+ (case ((freg_name_matches_prefix s2600_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2601_0)) =>
+ (case ((string_drop s2600_0 s2601_0)) of
+ s2602_0 =>
+ (case ((sep_matches_prefix s2602_0)) of
+ SOME ((() , s2603_0)) =>
+ (case ((string_drop s2602_0 s2603_0)) of
+ s2604_0 =>
+ (case ((freg_name_matches_prefix s2604_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2605_0)) =>
+ (case ((string_drop s2604_0 s2605_0)) of
+ s2606_0 =>
+ (case ((sep_matches_prefix s2606_0)) of
+ SOME ((() , s2607_0)) =>
+ (case ((string_drop s2606_0 s2607_0)) of
+ s2608_0 =>
+ (case ((freg_name_matches_prefix s2608_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2609_0)) =>
+ let p0_ = (string_drop s2608_0 s2609_0) in
+ if (((p0_ = ""))) then SOME (FMAX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2577_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2577_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2578_0=
+ ((case s2578_0 of
+ s2579_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2579_0)) of
+ SOME ((FMIN_S, s2580_0)) =>
+ (case ((string_drop s2579_0 s2580_0)) of
+ s2581_0 =>
+ (case ((spc_matches_prefix0 s2581_0)) of
+ SOME ((() , s2582_0)) =>
+ (case ((string_drop s2581_0 s2582_0)) of
+ s2583_0 =>
+ (case ((freg_name_matches_prefix s2583_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2584_0)) =>
+ (case ((string_drop s2583_0 s2584_0)) of
+ s2585_0 =>
+ (case ((sep_matches_prefix s2585_0)) of
+ SOME ((() , s2586_0)) =>
+ (case ((string_drop s2585_0 s2586_0)) of
+ s2587_0 =>
+ (case ((freg_name_matches_prefix s2587_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2588_0)) =>
+ (case ((string_drop s2587_0 s2588_0)) of
+ s2589_0 =>
+ (case ((sep_matches_prefix s2589_0)) of
+ SOME ((() , s2590_0)) =>
+ (case ((string_drop s2589_0 s2590_0)) of
+ s2591_0 =>
+ (case ((freg_name_matches_prefix s2591_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2592_0)) =>
+ let p0_ = (string_drop s2591_0 s2592_0) in
+ if (((p0_ = ""))) then SOME (FMIN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2560_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2560_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2561_0=
+ ((case s2561_0 of
+ s2562_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2562_0)) of
+ SOME ((FSGNJX_S, s2563_0)) =>
+ (case ((string_drop s2562_0 s2563_0)) of
+ s2564_0 =>
+ (case ((spc_matches_prefix0 s2564_0)) of
+ SOME ((() , s2565_0)) =>
+ (case ((string_drop s2564_0 s2565_0)) of
+ s2566_0 =>
+ (case ((freg_name_matches_prefix s2566_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2567_0)) =>
+ (case ((string_drop s2566_0 s2567_0)) of
+ s2568_0 =>
+ (case ((sep_matches_prefix s2568_0)) of
+ SOME ((() , s2569_0)) =>
+ (case ((string_drop s2568_0 s2569_0)) of
+ s2570_0 =>
+ (case ((freg_name_matches_prefix s2570_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2571_0)) =>
+ (case ((string_drop s2570_0 s2571_0)) of
+ s2572_0 =>
+ (case ((sep_matches_prefix s2572_0)) of
+ SOME ((() , s2573_0)) =>
+ (case ((string_drop s2572_0 s2573_0)) of
+ s2574_0 =>
+ (case ((freg_name_matches_prefix s2574_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2575_0)) =>
+ let p0_ = (string_drop s2574_0 s2575_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2543_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2543_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2544_0=
+ ((case s2544_0 of
+ s2545_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2545_0)) of
+ SOME ((FSGNJN_S, s2546_0)) =>
+ (case ((string_drop s2545_0 s2546_0)) of
+ s2547_0 =>
+ (case ((spc_matches_prefix0 s2547_0)) of
+ SOME ((() , s2548_0)) =>
+ (case ((string_drop s2547_0 s2548_0)) of
+ s2549_0 =>
+ (case ((freg_name_matches_prefix s2549_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2550_0)) =>
+ (case ((string_drop s2549_0 s2550_0)) of
+ s2551_0 =>
+ (case ((sep_matches_prefix s2551_0)) of
+ SOME ((() , s2552_0)) =>
+ (case ((string_drop s2551_0 s2552_0)) of
+ s2553_0 =>
+ (case ((freg_name_matches_prefix s2553_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2554_0)) =>
+ (case ((string_drop s2553_0 s2554_0)) of
+ s2555_0 =>
+ (case ((sep_matches_prefix s2555_0)) of
+ SOME ((() , s2556_0)) =>
+ (case ((string_drop s2555_0 s2556_0)) of
+ s2557_0 =>
+ (case ((freg_name_matches_prefix s2557_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2558_0)) =>
+ let p0_ = (string_drop s2557_0 s2558_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2526_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2526_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s2527_0=
+ ((case s2527_0 of
+ s2528_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s2528_0)) of
+ SOME ((FSGNJ_S, s2529_0)) =>
+ (case ((string_drop s2528_0 s2529_0)) of
+ s2530_0 =>
+ (case ((spc_matches_prefix0 s2530_0)) of
+ SOME ((() , s2531_0)) =>
+ (case ((string_drop s2530_0 s2531_0)) of
+ s2532_0 =>
+ (case ((freg_name_matches_prefix s2532_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2533_0)) =>
+ (case ((string_drop s2532_0 s2533_0)) of
+ s2534_0 =>
+ (case ((sep_matches_prefix s2534_0)) of
+ SOME ((() , s2535_0)) =>
+ (case ((string_drop s2534_0 s2535_0)) of
+ s2536_0 =>
+ (case ((freg_name_matches_prefix s2536_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2537_0)) =>
+ (case ((string_drop s2536_0 s2537_0)) of
+ s2538_0 =>
+ (case ((sep_matches_prefix s2538_0)) of
+ SOME ((() , s2539_0)) =>
+ (case ((string_drop s2538_0 s2539_0)) of
+ s2540_0 =>
+ (case ((freg_name_matches_prefix s2540_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2541_0)) =>
+ let p0_ = (string_drop s2540_0 s2541_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2509_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2509_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2510_0=
+ ((case s2510_0 of
+ s2511_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2511_0)) of
+ SOME ((FCVT_S_LU, s2512_0)) =>
+ (case ((string_drop s2511_0 s2512_0)) of
+ s2513_0 =>
+ (case ((spc_matches_prefix0 s2513_0)) of
+ SOME ((() , s2514_0)) =>
+ (case ((string_drop s2513_0 s2514_0)) of
+ s2515_0 =>
+ (case ((freg_name_matches_prefix s2515_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2516_0)) =>
+ (case ((string_drop s2515_0 s2516_0)) of
+ s2517_0 =>
+ (case ((sep_matches_prefix s2517_0)) of
+ SOME ((() , s2518_0)) =>
+ (case ((string_drop s2517_0 s2518_0)) of
+ s2519_0 =>
+ (case ((reg_name_matches_prefix s2519_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2520_0)) =>
+ (case ((string_drop s2519_0 s2520_0)) of
+ s2521_0 =>
+ (case ((sep_matches_prefix s2521_0)) of
+ SOME ((() , s2522_0)) =>
+ (case ((string_drop s2521_0 s2522_0)) of
+ s2523_0 =>
+ (case ((frm_mnemonic_matches_prefix s2523_0)) of
+ SOME ((rm, s2524_0)) =>
+ let p0_ = (string_drop s2523_0 s2524_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2492_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2492_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2493_0=
+ ((case s2493_0 of
+ s2494_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2494_0)) of
+ SOME ((FCVT_S_L, s2495_0)) =>
+ (case ((string_drop s2494_0 s2495_0)) of
+ s2496_0 =>
+ (case ((spc_matches_prefix0 s2496_0)) of
+ SOME ((() , s2497_0)) =>
+ (case ((string_drop s2496_0 s2497_0)) of
+ s2498_0 =>
+ (case ((freg_name_matches_prefix s2498_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2499_0)) =>
+ (case ((string_drop s2498_0 s2499_0)) of
+ s2500_0 =>
+ (case ((sep_matches_prefix s2500_0)) of
+ SOME ((() , s2501_0)) =>
+ (case ((string_drop s2500_0 s2501_0)) of
+ s2502_0 =>
+ (case ((reg_name_matches_prefix s2502_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2503_0)) =>
+ (case ((string_drop s2502_0 s2503_0)) of
+ s2504_0 =>
+ (case ((sep_matches_prefix s2504_0)) of
+ SOME ((() , s2505_0)) =>
+ (case ((string_drop s2504_0 s2505_0)) of
+ s2506_0 =>
+ (case ((frm_mnemonic_matches_prefix s2506_0)) of
+ SOME ((rm, s2507_0)) =>
+ let p0_ = (string_drop s2506_0 s2507_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2475_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2475_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2476_0=
+ ((case s2476_0 of
+ s2477_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2477_0)) of
+ SOME ((FCVT_LU_S, s2478_0)) =>
+ (case ((string_drop s2477_0 s2478_0)) of
+ s2479_0 =>
+ (case ((spc_matches_prefix0 s2479_0)) of
+ SOME ((() , s2480_0)) =>
+ (case ((string_drop s2479_0 s2480_0)) of
+ s2481_0 =>
+ (case ((reg_name_matches_prefix s2481_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2482_0)) =>
+ (case ((string_drop s2481_0 s2482_0)) of
+ s2483_0 =>
+ (case ((sep_matches_prefix s2483_0)) of
+ SOME ((() , s2484_0)) =>
+ (case ((string_drop s2483_0 s2484_0)) of
+ s2485_0 =>
+ (case ((freg_name_matches_prefix s2485_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2486_0)) =>
+ (case ((string_drop s2485_0 s2486_0)) of
+ s2487_0 =>
+ (case ((sep_matches_prefix s2487_0)) of
+ SOME ((() , s2488_0)) =>
+ (case ((string_drop s2487_0 s2488_0)) of
+ s2489_0 =>
+ (case ((frm_mnemonic_matches_prefix s2489_0)) of
+ SOME ((rm, s2490_0)) =>
+ let p0_ = (string_drop s2489_0 s2490_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2458_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2458_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2459_0=
+ ((case s2459_0 of
+ s2460_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2460_0)) of
+ SOME ((FCVT_L_S, s2461_0)) =>
+ (case ((string_drop s2460_0 s2461_0)) of
+ s2462_0 =>
+ (case ((spc_matches_prefix0 s2462_0)) of
+ SOME ((() , s2463_0)) =>
+ (case ((string_drop s2462_0 s2463_0)) of
+ s2464_0 =>
+ (case ((reg_name_matches_prefix s2464_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2465_0)) =>
+ (case ((string_drop s2464_0 s2465_0)) of
+ s2466_0 =>
+ (case ((sep_matches_prefix s2466_0)) of
+ SOME ((() , s2467_0)) =>
+ (case ((string_drop s2466_0 s2467_0)) of
+ s2468_0 =>
+ (case ((freg_name_matches_prefix s2468_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2469_0)) =>
+ (case ((string_drop s2468_0 s2469_0)) of
+ s2470_0 =>
+ (case ((sep_matches_prefix s2470_0)) of
+ SOME ((() , s2471_0)) =>
+ (case ((string_drop s2470_0 s2471_0)) of
+ s2472_0 =>
+ (case ((frm_mnemonic_matches_prefix s2472_0)) of
+ SOME ((rm, s2473_0)) =>
+ let p0_ = (string_drop s2472_0 s2473_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2441_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2441_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2442_0=
+ ((case s2442_0 of
+ s2443_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2443_0)) of
+ SOME ((FCVT_S_WU, s2444_0)) =>
+ (case ((string_drop s2443_0 s2444_0)) of
+ s2445_0 =>
+ (case ((spc_matches_prefix0 s2445_0)) of
+ SOME ((() , s2446_0)) =>
+ (case ((string_drop s2445_0 s2446_0)) of
+ s2447_0 =>
+ (case ((freg_name_matches_prefix s2447_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2448_0)) =>
+ (case ((string_drop s2447_0 s2448_0)) of
+ s2449_0 =>
+ (case ((sep_matches_prefix s2449_0)) of
+ SOME ((() , s2450_0)) =>
+ (case ((string_drop s2449_0 s2450_0)) of
+ s2451_0 =>
+ (case ((reg_name_matches_prefix s2451_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2452_0)) =>
+ (case ((string_drop s2451_0 s2452_0)) of
+ s2453_0 =>
+ (case ((sep_matches_prefix s2453_0)) of
+ SOME ((() , s2454_0)) =>
+ (case ((string_drop s2453_0 s2454_0)) of
+ s2455_0 =>
+ (case ((frm_mnemonic_matches_prefix s2455_0)) of
+ SOME ((rm, s2456_0)) =>
+ let p0_ = (string_drop s2455_0 s2456_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2424_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2424_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2425_0=
+ ((case s2425_0 of
+ s2426_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2426_0)) of
+ SOME ((FCVT_S_W, s2427_0)) =>
+ (case ((string_drop s2426_0 s2427_0)) of
+ s2428_0 =>
+ (case ((spc_matches_prefix0 s2428_0)) of
+ SOME ((() , s2429_0)) =>
+ (case ((string_drop s2428_0 s2429_0)) of
+ s2430_0 =>
+ (case ((freg_name_matches_prefix s2430_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2431_0)) =>
+ (case ((string_drop s2430_0 s2431_0)) of
+ s2432_0 =>
+ (case ((sep_matches_prefix s2432_0)) of
+ SOME ((() , s2433_0)) =>
+ (case ((string_drop s2432_0 s2433_0)) of
+ s2434_0 =>
+ (case ((reg_name_matches_prefix s2434_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2435_0)) =>
+ (case ((string_drop s2434_0 s2435_0)) of
+ s2436_0 =>
+ (case ((sep_matches_prefix s2436_0)) of
+ SOME ((() , s2437_0)) =>
+ (case ((string_drop s2436_0 s2437_0)) of
+ s2438_0 =>
+ (case ((frm_mnemonic_matches_prefix s2438_0)) of
+ SOME ((rm, s2439_0)) =>
+ let p0_ = (string_drop s2438_0 s2439_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2407_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2407_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2408_0=
+ ((case s2408_0 of
+ s2409_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2409_0)) of
+ SOME ((FCVT_WU_S, s2410_0)) =>
+ (case ((string_drop s2409_0 s2410_0)) of
+ s2411_0 =>
+ (case ((spc_matches_prefix0 s2411_0)) of
+ SOME ((() , s2412_0)) =>
+ (case ((string_drop s2411_0 s2412_0)) of
+ s2413_0 =>
+ (case ((reg_name_matches_prefix s2413_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2414_0)) =>
+ (case ((string_drop s2413_0 s2414_0)) of
+ s2415_0 =>
+ (case ((sep_matches_prefix s2415_0)) of
+ SOME ((() , s2416_0)) =>
+ (case ((string_drop s2415_0 s2416_0)) of
+ s2417_0 =>
+ (case ((freg_name_matches_prefix s2417_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2418_0)) =>
+ (case ((string_drop s2417_0 s2418_0)) of
+ s2419_0 =>
+ (case ((sep_matches_prefix s2419_0)) of
+ SOME ((() , s2420_0)) =>
+ (case ((string_drop s2419_0 s2420_0)) of
+ s2421_0 =>
+ (case ((frm_mnemonic_matches_prefix s2421_0)) of
+ SOME ((rm, s2422_0)) =>
+ let p0_ = (string_drop s2421_0 s2422_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2390_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2390_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2391_0=
+ ((case s2391_0 of
+ s2392_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2392_0)) of
+ SOME ((FCVT_W_S, s2393_0)) =>
+ (case ((string_drop s2392_0 s2393_0)) of
+ s2394_0 =>
+ (case ((spc_matches_prefix0 s2394_0)) of
+ SOME ((() , s2395_0)) =>
+ (case ((string_drop s2394_0 s2395_0)) of
+ s2396_0 =>
+ (case ((reg_name_matches_prefix s2396_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2397_0)) =>
+ (case ((string_drop s2396_0 s2397_0)) of
+ s2398_0 =>
+ (case ((sep_matches_prefix s2398_0)) of
+ SOME ((() , s2399_0)) =>
+ (case ((string_drop s2398_0 s2399_0)) of
+ s2400_0 =>
+ (case ((freg_name_matches_prefix s2400_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2401_0)) =>
+ (case ((string_drop s2400_0 s2401_0)) of
+ s2402_0 =>
+ (case ((sep_matches_prefix s2402_0)) of
+ SOME ((() , s2403_0)) =>
+ (case ((string_drop s2402_0 s2403_0)) of
+ s2404_0 =>
+ (case ((frm_mnemonic_matches_prefix s2404_0)) of
+ SOME ((rm, s2405_0)) =>
+ let p0_ = (string_drop s2404_0 s2405_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2373_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2373_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s2374_0=
+ ((case s2374_0 of
+ s2375_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s2375_0)) of
+ SOME ((FSQRT_S, s2376_0)) =>
+ (case ((string_drop s2375_0 s2376_0)) of
+ s2377_0 =>
+ (case ((spc_matches_prefix0 s2377_0)) of
+ SOME ((() , s2378_0)) =>
+ (case ((string_drop s2377_0 s2378_0)) of
+ s2379_0 =>
+ (case ((freg_name_matches_prefix s2379_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2380_0)) =>
+ (case ((string_drop s2379_0 s2380_0)) of
+ s2381_0 =>
+ (case ((sep_matches_prefix s2381_0)) of
+ SOME ((() , s2382_0)) =>
+ (case ((string_drop s2381_0 s2382_0)) of
+ s2383_0 =>
+ (case ((freg_name_matches_prefix s2383_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2384_0)) =>
+ (case ((string_drop s2383_0 s2384_0)) of
+ s2385_0 =>
+ (case ((sep_matches_prefix s2385_0)) of
+ SOME ((() , s2386_0)) =>
+ (case ((string_drop s2385_0 s2386_0)) of
+ s2387_0 =>
+ (case ((frm_mnemonic_matches_prefix s2387_0)) of
+ SOME ((rm, s2388_0)) =>
+ let p0_ = (string_drop s2387_0 s2388_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_S, rd, rs1, rm) else NONE
| _ => NONE
)
)
@@ -24411,45 +40610,687 @@ val _ = Define `
)))`;
-(*val _s1634_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s2352_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2352_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2353_0=
+ ((case s2353_0 of
+ s2354_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s2354_0)) of
+ SOME ((op, s2355_0)) =>
+ (case ((string_drop s2354_0 s2355_0)) of
+ s2356_0 =>
+ (case ((spc_matches_prefix0 s2356_0)) of
+ SOME ((() , s2357_0)) =>
+ (case ((string_drop s2356_0 s2357_0)) of
+ s2358_0 =>
+ (case ((freg_name_matches_prefix s2358_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2359_0)) =>
+ (case ((string_drop s2358_0 s2359_0)) of
+ s2360_0 =>
+ (case ((sep_matches_prefix s2360_0)) of
+ SOME ((() , s2361_0)) =>
+ (case ((string_drop s2360_0 s2361_0)) of
+ s2362_0 =>
+ (case ((freg_name_matches_prefix s2362_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2363_0)) =>
+ (case ((string_drop s2362_0 s2363_0)) of
+ s2364_0 =>
+ (case ((sep_matches_prefix s2364_0)) of
+ SOME ((() , s2365_0)) =>
+ (case ((string_drop s2364_0 s2365_0)) of
+ s2366_0 =>
+ (case ((freg_name_matches_prefix s2366_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2367_0)) =>
+ (case ((string_drop s2366_0 s2367_0)) of
+ s2368_0 =>
+ (case ((sep_matches_prefix s2368_0)) of
+ SOME ((() , s2369_0)) =>
+ (case ((string_drop s2368_0 s2369_0)) of
+ s2370_0 =>
+ (case ((frm_mnemonic_matches_prefix s2370_0)) of
+ SOME ((rm, s2371_0)) =>
+ let p0_ = (string_drop s2370_0 s2371_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2327_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s2327_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s2328_0=
+ ((case s2328_0 of
+ s2329_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s2329_0)) of
+ SOME ((op, s2330_0)) =>
+ (case ((string_drop s2329_0 s2330_0)) of
+ s2331_0 =>
+ (case ((spc_matches_prefix0 s2331_0)) of
+ SOME ((() , s2332_0)) =>
+ (case ((string_drop s2331_0 s2332_0)) of
+ s2333_0 =>
+ (case ((freg_name_matches_prefix s2333_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2334_0)) =>
+ (case ((string_drop s2333_0 s2334_0)) of
+ s2335_0 =>
+ (case ((sep_matches_prefix s2335_0)) of
+ SOME ((() , s2336_0)) =>
+ (case ((string_drop s2335_0 s2336_0)) of
+ s2337_0 =>
+ (case ((freg_name_matches_prefix s2337_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2338_0)) =>
+ (case ((string_drop s2337_0 s2338_0)) of
+ s2339_0 =>
+ (case ((sep_matches_prefix s2339_0)) of
+ SOME ((() , s2340_0)) =>
+ (case ((string_drop s2339_0 s2340_0)) of
+ s2341_0 =>
+ (case ((freg_name_matches_prefix s2341_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2342_0)) =>
+ (case ((string_drop s2341_0 s2342_0)) of
+ s2343_0 =>
+ (case ((sep_matches_prefix s2343_0)) of
+ SOME ((() , s2344_0)) =>
+ (case ((string_drop s2343_0 s2344_0)) of
+ s2345_0 =>
+ (case ((freg_name_matches_prefix s2345_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s2346_0)) =>
+ (case ((string_drop s2345_0 s2346_0)) of
+ s2347_0 =>
+ (case ((sep_matches_prefix s2347_0)) of
+ SOME ((() , s2348_0)) =>
+ (case ((string_drop s2347_0 s2348_0)) of
+ s2349_0 =>
+ (case ((frm_mnemonic_matches_prefix s2349_0)) of
+ SOME ((rm, s2350_0)) =>
+ let p0_ = (string_drop s2349_0 s2350_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2303_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1634_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s1635_0=
- ((case s1635_0 of
- s1636_0 =>
- (case ((csr_mnemonic_matches_prefix s1636_0)) of
- SOME ((op, s1637_0)) =>
- let s1638_0 = (string_drop s1636_0 s1637_0) in
- if ((string_startswith s1638_0 "i")) then
- (case ((string_drop s1638_0 ((string_length "i")))) of
- s1639_0 =>
- (case ((spc_matches_prefix0 s1639_0)) of
- SOME ((() , s1640_0)) =>
- (case ((string_drop s1639_0 s1640_0)) of
- s1641_0 =>
- (case ((reg_name_matches_prefix s1641_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1642_0)) =>
- (case ((string_drop s1641_0 s1642_0)) of
- s1643_0 =>
- (case ((sep_matches_prefix s1643_0)) of
- SOME ((() , s1644_0)) =>
- (case ((string_drop s1643_0 s1644_0)) of
- s1645_0 =>
+ ((s2303_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s2304_0=
+ (let s2305_0 = s2304_0 in
+ if ((string_startswith s2305_0 "fs")) then
+ (case ((string_drop s2305_0 ((string_length "fs")))) of
+ s2306_0 =>
+ (case ((size_mnemonic_matches_prefix s2306_0)) of
+ SOME ((width, s2307_0)) =>
+ (case ((string_drop s2306_0 s2307_0)) of
+ s2308_0 =>
+ (case ((spc_matches_prefix0 s2308_0)) of
+ SOME ((() , s2309_0)) =>
+ (case ((string_drop s2308_0 s2309_0)) of
+ s2310_0 =>
+ (case ((freg_name_matches_prefix s2310_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2311_0)) =>
+ (case ((string_drop s2310_0 s2311_0)) of
+ s2312_0 =>
+ (case ((sep_matches_prefix s2312_0)) of
+ SOME ((() , s2313_0)) =>
+ (case ((string_drop s2312_0 s2313_0)) of
+ s2314_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2314_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2315_0)) =>
+ (case ((string_drop s2314_0 s2315_0)) of
+ s2316_0 =>
+ (case ((opt_spc_matches_prefix0 s2316_0)) of
+ SOME ((() , s2317_0)) =>
+ let s2318_0 = (string_drop s2316_0 s2317_0) in
+ if ((string_startswith s2318_0 "(")) then
+ (case ((string_drop s2318_0 ((string_length "(")))) of
+ s2319_0 =>
+ (case ((opt_spc_matches_prefix0 s2319_0)) of
+ SOME ((() , s2320_0)) =>
+ (case ((string_drop s2319_0 s2320_0)) of
+ s2321_0 =>
+ (case ((reg_name_matches_prefix s2321_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2322_0)) =>
+ (case ((string_drop s2321_0 s2322_0)) of
+ s2323_0 =>
+ (case ((opt_spc_matches_prefix0 s2323_0)) of
+ SOME ((() , s2324_0)) =>
+ let s2325_0 = (string_drop s2323_0 s2324_0) in
+ if ((string_startswith s2325_0 ")")) then
+ let p0_ = (string_drop s2325_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rs2, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2279_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2279_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s2280_0=
+ (let s2281_0 = s2280_0 in
+ if ((string_startswith s2281_0 "fl")) then
+ (case ((string_drop s2281_0 ((string_length "fl")))) of
+ s2282_0 =>
+ (case ((size_mnemonic_matches_prefix s2282_0)) of
+ SOME ((width, s2283_0)) =>
+ (case ((string_drop s2282_0 s2283_0)) of
+ s2284_0 =>
+ (case ((spc_matches_prefix0 s2284_0)) of
+ SOME ((() , s2285_0)) =>
+ (case ((string_drop s2284_0 s2285_0)) of
+ s2286_0 =>
+ (case ((freg_name_matches_prefix s2286_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2287_0)) =>
+ (case ((string_drop s2286_0 s2287_0)) of
+ s2288_0 =>
+ (case ((sep_matches_prefix s2288_0)) of
+ SOME ((() , s2289_0)) =>
+ (case ((string_drop s2288_0 s2289_0)) of
+ s2290_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2290_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2291_0)) =>
+ (case ((string_drop s2290_0 s2291_0)) of
+ s2292_0 =>
+ (case ((opt_spc_matches_prefix0 s2292_0)) of
+ SOME ((() , s2293_0)) =>
+ let s2294_0 = (string_drop s2292_0 s2293_0) in
+ if ((string_startswith s2294_0 "(")) then
+ (case ((string_drop s2294_0 ((string_length "(")))) of
+ s2295_0 =>
+ (case ((opt_spc_matches_prefix0 s2295_0)) of
+ SOME ((() , s2296_0)) =>
+ (case ((string_drop s2295_0 s2296_0)) of
+ s2297_0 =>
+ (case ((reg_name_matches_prefix s2297_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2298_0)) =>
+ (case ((string_drop s2297_0 s2298_0)) of
+ s2299_0 =>
+ (case ((opt_spc_matches_prefix0 s2299_0)) of
+ SOME ((() , s2300_0)) =>
+ let s2301_0 = (string_drop s2299_0 s2300_0) in
+ if ((string_startswith s2301_0 ")")) then
+ let p0_ = (string_drop s2301_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rd, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2267_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s2267_:string ->((5)words$word#(5)words$word#(12)words$word)option) s2268_0=
+ (let s2269_0 = s2268_0 in
+ if ((string_startswith s2269_0 "fence.i.reserved.")) then
+ (case ((string_drop s2269_0 ((string_length "fence.i.reserved.")))) of
+ s2270_0 =>
+ (case ((reg_name_matches_prefix s2270_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2271_0)) =>
+ let s2272_0 = (string_drop s2270_0 s2271_0) in
+ if ((string_startswith s2272_0 ".")) then
+ (case ((string_drop s2272_0 ((string_length ".")))) of
+ s2273_0 =>
+ (case ((reg_name_matches_prefix s2273_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s2274_0)) =>
+ let s2275_0 = (string_drop s2273_0 s2274_0) in
+ if ((string_startswith s2275_0 ".")) then
+ (case ((string_drop s2275_0 ((string_length ".")))) of
+ s2276_0 =>
+ (case ((hex_bits_12_matches_prefix0 s2276_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s2277_0)) =>
+ let p0_ = (string_drop s2276_0 s2277_0) in
+ if (((p0_ = ""))) then SOME (rd, rs, imm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2249_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4))*)
+
+val _ = Define `
+ ((s2249_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word)option) s2250_0=
+ (let s2251_0 = s2250_0 in
+ if ((string_startswith s2251_0 "fence.reserved.")) then
+ (case ((string_drop s2251_0 ((string_length "fence.reserved.")))) of
+ s2252_0 =>
+ (case ((fence_bits_matches_prefix s2252_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s2253_0)) =>
+ let s2254_0 = (string_drop s2252_0 s2253_0) in
+ if ((string_startswith s2254_0 ".")) then
+ (case ((string_drop s2254_0 ((string_length ".")))) of
+ s2255_0 =>
+ (case ((fence_bits_matches_prefix s2255_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s2256_0)) =>
+ let s2257_0 = (string_drop s2255_0 s2256_0) in
+ if ((string_startswith s2257_0 ".")) then
+ (case ((string_drop s2257_0 ((string_length ".")))) of
+ s2258_0 =>
+ (case ((reg_name_matches_prefix s2258_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s2259_0)) =>
+ let s2260_0 = (string_drop s2258_0 s2259_0) in
+ if ((string_startswith s2260_0 ".")) then
+ (case ((string_drop s2260_0 ((string_length ".")))) of
+ s2261_0 =>
+ (case ((reg_name_matches_prefix s2261_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2262_0)) =>
+ let s2263_0 = (string_drop s2261_0 s2262_0) in
+ if ((string_startswith s2263_0 ".")) then
+ (case ((string_drop s2263_0 ((string_length ".")))) of
+ s2264_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s2264_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s2265_0)) =>
+ let p0_ = (string_drop s2264_0 s2265_0) in
+ if (((p0_ = ""))) then SOME (pred, succ, rs, rd, fm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2243_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s2243_:string ->((3)words$word)option) s2244_0=
+ (let s2245_0 = s2244_0 in
+ if ((string_startswith s2245_0 "c.srai.hint.")) then
+ (case ((string_drop s2245_0 ((string_length "c.srai.hint.")))) of
+ s2246_0 =>
+ (case ((creg_name_matches_prefix s2246_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s2247_0)) =>
+ let p0_ = (string_drop s2246_0 s2247_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2237_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s2237_:string ->((3)words$word)option) s2238_0=
+ (let s2239_0 = s2238_0 in
+ if ((string_startswith s2239_0 "c.srli.hint.")) then
+ (case ((string_drop s2239_0 ((string_length "c.srli.hint.")))) of
+ s2240_0 =>
+ (case ((creg_name_matches_prefix s2240_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s2241_0)) =>
+ let p0_ = (string_drop s2240_0 s2241_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2228_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s2228_:string ->((5)words$word#(6)words$word)option) s2229_0=
+ (let s2230_0 = s2229_0 in
+ if ((string_startswith s2230_0 "c.slli.hint.")) then
+ (case ((string_drop s2230_0 ((string_length "c.slli.hint.")))) of
+ s2231_0 =>
+ (case ((reg_name_matches_prefix s2231_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s2232_0)) =>
+ let s2233_0 = (string_drop s2231_0 s2232_0) in
+ if ((string_startswith s2233_0 ".")) then
+ (case ((string_drop s2233_0 ((string_length ".")))) of
+ s2234_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s2234_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s2235_0)) =>
+ let p0_ = (string_drop s2234_0 s2235_0) in
+ if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2222_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2222_:string ->((5)words$word)option) s2223_0=
+ (let s2224_0 = s2223_0 in
+ if ((string_startswith s2224_0 "c.add.hint.")) then
+ (case ((string_drop s2224_0 ((string_length "c.add.hint.")))) of
+ s2225_0 =>
+ (case ((reg_name_matches_prefix s2225_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2226_0)) =>
+ let p0_ = (string_drop s2225_0 s2226_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2216_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2216_:string ->((5)words$word)option) s2217_0=
+ (let s2218_0 = s2217_0 in
+ if ((string_startswith s2218_0 "c.mv.hint.")) then
+ (case ((string_drop s2218_0 ((string_length "c.mv.hint.")))) of
+ s2219_0 =>
+ (case ((reg_name_matches_prefix s2219_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2220_0)) =>
+ let p0_ = (string_drop s2219_0 s2220_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2210_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2210_:string ->((6)words$word)option) s2211_0=
+ (let s2212_0 = s2211_0 in
+ if ((string_startswith s2212_0 "c.lui.hint.")) then
+ (case ((string_drop s2212_0 ((string_length "c.lui.hint.")))) of
+ s2213_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2213_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2214_0)) =>
+ let p0_ = (string_drop s2213_0 s2214_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2204_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2204_:string ->((6)words$word)option) s2205_0=
+ (let s2206_0 = s2205_0 in
+ if ((string_startswith s2206_0 "c.li.hint.")) then
+ (case ((string_drop s2206_0 ((string_length "c.li.hint.")))) of
+ s2207_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2207_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2208_0)) =>
+ let p0_ = (string_drop s2207_0 s2208_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2198_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s2198_:string ->((5)words$word)option) s2199_0=
+ (let s2200_0 = s2199_0 in
+ if ((string_startswith s2200_0 "c.addi.hint.")) then
+ (case ((string_drop s2200_0 ((string_length "c.addi.hint.")))) of
+ s2201_0 =>
+ (case ((reg_name_matches_prefix s2201_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s2202_0)) =>
+ let p0_ = (string_drop s2201_0 s2202_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2192_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s2192_:string ->((6)words$word)option) s2193_0=
+ (let s2194_0 = s2193_0 in
+ if ((string_startswith s2194_0 "c.nop.hint.")) then
+ (case ((string_drop s2194_0 ((string_length "c.nop.hint.")))) of
+ s2195_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2195_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s2196_0)) =>
+ let p0_ = (string_drop s2195_0 s2196_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s2175_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2175_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s2176_0=
+ ((case s2176_0 of
+ s2177_0 =>
+ (case ((csr_mnemonic_matches_prefix s2177_0)) of
+ SOME ((op, s2178_0)) =>
+ (case ((string_drop s2177_0 s2178_0)) of
+ s2179_0 =>
+ (case ((spc_matches_prefix0 s2179_0)) of
+ SOME ((() , s2180_0)) =>
+ (case ((string_drop s2179_0 s2180_0)) of
+ s2181_0 =>
+ (case ((reg_name_matches_prefix s2181_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2182_0)) =>
+ (case ((string_drop s2181_0 s2182_0)) of
+ s2183_0 =>
+ (case ((sep_matches_prefix s2183_0)) of
+ SOME ((() , s2184_0)) =>
+ (case ((string_drop s2183_0 s2184_0)) of
+ s2185_0 =>
+ (case ((csr_name_map_matches_prefix s2185_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s2186_0)) =>
+ (case ((string_drop s2185_0 s2186_0)) of
+ s2187_0 =>
+ (case ((sep_matches_prefix s2187_0)) of
+ SOME ((() , s2188_0)) =>
+ (case ((string_drop s2187_0 s2188_0)) of
+ s2189_0 =>
+ (case ((reg_name_matches_prefix s2189_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2190_0)) =>
+ let p0_ = (string_drop s2189_0 s2190_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s2157_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s2157_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s2158_0=
+ ((case s2158_0 of
+ s2159_0 =>
+ (case ((csr_mnemonic_matches_prefix s2159_0)) of
+ SOME ((op, s2160_0)) =>
+ let s2161_0 = (string_drop s2159_0 s2160_0) in
+ if ((string_startswith s2161_0 "i")) then
+ (case ((string_drop s2161_0 ((string_length "i")))) of
+ s2162_0 =>
+ (case ((spc_matches_prefix0 s2162_0)) of
+ SOME ((() , s2163_0)) =>
+ (case ((string_drop s2162_0 s2163_0)) of
+ s2164_0 =>
+ (case ((reg_name_matches_prefix s2164_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2165_0)) =>
+ (case ((string_drop s2164_0 s2165_0)) of
+ s2166_0 =>
+ (case ((sep_matches_prefix s2166_0)) of
+ SOME ((() , s2167_0)) =>
+ (case ((string_drop s2166_0 s2167_0)) of
+ s2168_0 =>
+ (case ((csr_name_map_matches_prefix s2168_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s2169_0)) =>
+ (case ((string_drop s2168_0 s2169_0)) of
+ s2170_0 =>
+ (case ((sep_matches_prefix s2170_0)) of
+ SOME ((() , s2171_0)) =>
+ (case ((string_drop s2170_0 s2171_0)) of
+ s2172_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1645_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1646_0)) =>
- (case ((string_drop s1645_0 s1646_0)) of
- s1647_0 =>
- (case ((sep_matches_prefix s1647_0)) of
- SOME ((() , s1648_0)) =>
- (case ((string_drop s1647_0 s1648_0)) of
- s1649_0 =>
- (case ((csr_name_map_matches_prefix s1649_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s1650_0)) =>
- let p0_ = (string_drop s1649_0 s1650_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ s2172_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2173_0)) =>
+ let p0_ = (string_drop s2172_0 s2173_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
| _ => NONE
)
)
@@ -24473,43 +41314,43 @@ val _ = Define `
)))`;
-(*val _s1615_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1615_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1616_0=
- (let s1617_0 = s1616_0 in
- if ((string_startswith s1617_0 "rem")) then
- (case ((string_drop s1617_0 ((string_length "rem")))) of
- s1618_0 =>
- (case ((maybe_not_u_matches_prefix s1618_0)) of
- SOME ((s, s1619_0)) =>
- let s1620_0 = (string_drop s1618_0 s1619_0) in
- if ((string_startswith s1620_0 "w")) then
- (case ((string_drop s1620_0 ((string_length "w")))) of
- s1621_0 =>
- (case ((spc_matches_prefix0 s1621_0)) of
- SOME ((() , s1622_0)) =>
- (case ((string_drop s1621_0 s1622_0)) of
- s1623_0 =>
- (case ((reg_name_matches_prefix s1623_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1624_0)) =>
- (case ((string_drop s1623_0 s1624_0)) of
- s1625_0 =>
- (case ((sep_matches_prefix s1625_0)) of
- SOME ((() , s1626_0)) =>
- (case ((string_drop s1625_0 s1626_0)) of
- s1627_0 =>
- (case ((reg_name_matches_prefix s1627_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1628_0)) =>
- (case ((string_drop s1627_0 s1628_0)) of
- s1629_0 =>
- (case ((sep_matches_prefix s1629_0)) of
- SOME ((() , s1630_0)) =>
- (case ((string_drop s1629_0 s1630_0)) of
- s1631_0 =>
- (case ((reg_name_matches_prefix s1631_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1632_0)) =>
- let p0_ = (string_drop s1631_0 s1632_0) in
+(*val _s2138_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2138_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2139_0=
+ (let s2140_0 = s2139_0 in
+ if ((string_startswith s2140_0 "rem")) then
+ (case ((string_drop s2140_0 ((string_length "rem")))) of
+ s2141_0 =>
+ (case ((maybe_not_u_matches_prefix s2141_0)) of
+ SOME ((s, s2142_0)) =>
+ let s2143_0 = (string_drop s2141_0 s2142_0) in
+ if ((string_startswith s2143_0 "w")) then
+ (case ((string_drop s2143_0 ((string_length "w")))) of
+ s2144_0 =>
+ (case ((spc_matches_prefix0 s2144_0)) of
+ SOME ((() , s2145_0)) =>
+ (case ((string_drop s2144_0 s2145_0)) of
+ s2146_0 =>
+ (case ((reg_name_matches_prefix s2146_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2147_0)) =>
+ (case ((string_drop s2146_0 s2147_0)) of
+ s2148_0 =>
+ (case ((sep_matches_prefix s2148_0)) of
+ SOME ((() , s2149_0)) =>
+ (case ((string_drop s2148_0 s2149_0)) of
+ s2150_0 =>
+ (case ((reg_name_matches_prefix s2150_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2151_0)) =>
+ (case ((string_drop s2150_0 s2151_0)) of
+ s2152_0 =>
+ (case ((sep_matches_prefix s2152_0)) of
+ SOME ((() , s2153_0)) =>
+ (case ((string_drop s2152_0 s2153_0)) of
+ s2154_0 =>
+ (case ((reg_name_matches_prefix s2154_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2155_0)) =>
+ let p0_ = (string_drop s2154_0 s2155_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24535,43 +41376,43 @@ val _ = Define `
else NONE))`;
-(*val _s1596_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2119_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1596_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1597_0=
- (let s1598_0 = s1597_0 in
- if ((string_startswith s1598_0 "div")) then
- (case ((string_drop s1598_0 ((string_length "div")))) of
- s1599_0 =>
- (case ((maybe_not_u_matches_prefix s1599_0)) of
- SOME ((s, s1600_0)) =>
- let s1601_0 = (string_drop s1599_0 s1600_0) in
- if ((string_startswith s1601_0 "w")) then
- (case ((string_drop s1601_0 ((string_length "w")))) of
- s1602_0 =>
- (case ((spc_matches_prefix0 s1602_0)) of
- SOME ((() , s1603_0)) =>
- (case ((string_drop s1602_0 s1603_0)) of
- s1604_0 =>
- (case ((reg_name_matches_prefix s1604_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1605_0)) =>
- (case ((string_drop s1604_0 s1605_0)) of
- s1606_0 =>
- (case ((sep_matches_prefix s1606_0)) of
- SOME ((() , s1607_0)) =>
- (case ((string_drop s1606_0 s1607_0)) of
- s1608_0 =>
- (case ((reg_name_matches_prefix s1608_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1609_0)) =>
- (case ((string_drop s1608_0 s1609_0)) of
- s1610_0 =>
- (case ((sep_matches_prefix s1610_0)) of
- SOME ((() , s1611_0)) =>
- (case ((string_drop s1610_0 s1611_0)) of
- s1612_0 =>
- (case ((reg_name_matches_prefix s1612_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1613_0)) =>
- let p0_ = (string_drop s1612_0 s1613_0) in
+ ((s2119_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2120_0=
+ (let s2121_0 = s2120_0 in
+ if ((string_startswith s2121_0 "div")) then
+ (case ((string_drop s2121_0 ((string_length "div")))) of
+ s2122_0 =>
+ (case ((maybe_not_u_matches_prefix s2122_0)) of
+ SOME ((s, s2123_0)) =>
+ let s2124_0 = (string_drop s2122_0 s2123_0) in
+ if ((string_startswith s2124_0 "w")) then
+ (case ((string_drop s2124_0 ((string_length "w")))) of
+ s2125_0 =>
+ (case ((spc_matches_prefix0 s2125_0)) of
+ SOME ((() , s2126_0)) =>
+ (case ((string_drop s2125_0 s2126_0)) of
+ s2127_0 =>
+ (case ((reg_name_matches_prefix s2127_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2128_0)) =>
+ (case ((string_drop s2127_0 s2128_0)) of
+ s2129_0 =>
+ (case ((sep_matches_prefix s2129_0)) of
+ SOME ((() , s2130_0)) =>
+ (case ((string_drop s2129_0 s2130_0)) of
+ s2131_0 =>
+ (case ((reg_name_matches_prefix s2131_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2132_0)) =>
+ (case ((string_drop s2131_0 s2132_0)) of
+ s2133_0 =>
+ (case ((sep_matches_prefix s2133_0)) of
+ SOME ((() , s2134_0)) =>
+ (case ((string_drop s2133_0 s2134_0)) of
+ s2135_0 =>
+ (case ((reg_name_matches_prefix s2135_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2136_0)) =>
+ let p0_ = (string_drop s2135_0 s2136_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24597,37 +41438,37 @@ val _ = Define `
else NONE))`;
-(*val _s1580_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2103_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1580_:string ->((5)words$word#(5)words$word#(5)words$word)option) s1581_0=
- (let s1582_0 = s1581_0 in
- if ((string_startswith s1582_0 "mulw")) then
- (case ((string_drop s1582_0 ((string_length "mulw")))) of
- s1583_0 =>
- (case ((spc_matches_prefix0 s1583_0)) of
- SOME ((() , s1584_0)) =>
- (case ((string_drop s1583_0 s1584_0)) of
- s1585_0 =>
- (case ((reg_name_matches_prefix s1585_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1586_0)) =>
- (case ((string_drop s1585_0 s1586_0)) of
- s1587_0 =>
- (case ((sep_matches_prefix s1587_0)) of
- SOME ((() , s1588_0)) =>
- (case ((string_drop s1587_0 s1588_0)) of
- s1589_0 =>
- (case ((reg_name_matches_prefix s1589_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1590_0)) =>
- (case ((string_drop s1589_0 s1590_0)) of
- s1591_0 =>
- (case ((sep_matches_prefix s1591_0)) of
- SOME ((() , s1592_0)) =>
- (case ((string_drop s1591_0 s1592_0)) of
- s1593_0 =>
- (case ((reg_name_matches_prefix s1593_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1594_0)) =>
- let p0_ = (string_drop s1593_0 s1594_0) in
+ ((s2103_:string ->((5)words$word#(5)words$word#(5)words$word)option) s2104_0=
+ (let s2105_0 = s2104_0 in
+ if ((string_startswith s2105_0 "mulw")) then
+ (case ((string_drop s2105_0 ((string_length "mulw")))) of
+ s2106_0 =>
+ (case ((spc_matches_prefix0 s2106_0)) of
+ SOME ((() , s2107_0)) =>
+ (case ((string_drop s2106_0 s2107_0)) of
+ s2108_0 =>
+ (case ((reg_name_matches_prefix s2108_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2109_0)) =>
+ (case ((string_drop s2108_0 s2109_0)) of
+ s2110_0 =>
+ (case ((sep_matches_prefix s2110_0)) of
+ SOME ((() , s2111_0)) =>
+ (case ((string_drop s2110_0 s2111_0)) of
+ s2112_0 =>
+ (case ((reg_name_matches_prefix s2112_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2113_0)) =>
+ (case ((string_drop s2112_0 s2113_0)) of
+ s2114_0 =>
+ (case ((sep_matches_prefix s2114_0)) of
+ SOME ((() , s2115_0)) =>
+ (case ((string_drop s2114_0 s2115_0)) of
+ s2116_0 =>
+ (case ((reg_name_matches_prefix s2116_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2117_0)) =>
+ let p0_ = (string_drop s2116_0 s2117_0) in
if (((p0_ = ""))) then SOME (rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24650,41 +41491,41 @@ val _ = Define `
else NONE))`;
-(*val _s1562_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2085_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1562_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1563_0=
- (let s1564_0 = s1563_0 in
- if ((string_startswith s1564_0 "rem")) then
- (case ((string_drop s1564_0 ((string_length "rem")))) of
- s1565_0 =>
- (case ((maybe_not_u_matches_prefix s1565_0)) of
- SOME ((s, s1566_0)) =>
- (case ((string_drop s1565_0 s1566_0)) of
- s1567_0 =>
- (case ((spc_matches_prefix0 s1567_0)) of
- SOME ((() , s1568_0)) =>
- (case ((string_drop s1567_0 s1568_0)) of
- s1569_0 =>
- (case ((reg_name_matches_prefix s1569_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1570_0)) =>
- (case ((string_drop s1569_0 s1570_0)) of
- s1571_0 =>
- (case ((sep_matches_prefix s1571_0)) of
- SOME ((() , s1572_0)) =>
- (case ((string_drop s1571_0 s1572_0)) of
- s1573_0 =>
- (case ((reg_name_matches_prefix s1573_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1574_0)) =>
- (case ((string_drop s1573_0 s1574_0)) of
- s1575_0 =>
- (case ((sep_matches_prefix s1575_0)) of
- SOME ((() , s1576_0)) =>
- (case ((string_drop s1575_0 s1576_0)) of
- s1577_0 =>
- (case ((reg_name_matches_prefix s1577_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1578_0)) =>
- let p0_ = (string_drop s1577_0 s1578_0) in
+ ((s2085_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2086_0=
+ (let s2087_0 = s2086_0 in
+ if ((string_startswith s2087_0 "rem")) then
+ (case ((string_drop s2087_0 ((string_length "rem")))) of
+ s2088_0 =>
+ (case ((maybe_not_u_matches_prefix s2088_0)) of
+ SOME ((s, s2089_0)) =>
+ (case ((string_drop s2088_0 s2089_0)) of
+ s2090_0 =>
+ (case ((spc_matches_prefix0 s2090_0)) of
+ SOME ((() , s2091_0)) =>
+ (case ((string_drop s2090_0 s2091_0)) of
+ s2092_0 =>
+ (case ((reg_name_matches_prefix s2092_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2093_0)) =>
+ (case ((string_drop s2092_0 s2093_0)) of
+ s2094_0 =>
+ (case ((sep_matches_prefix s2094_0)) of
+ SOME ((() , s2095_0)) =>
+ (case ((string_drop s2094_0 s2095_0)) of
+ s2096_0 =>
+ (case ((reg_name_matches_prefix s2096_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2097_0)) =>
+ (case ((string_drop s2096_0 s2097_0)) of
+ s2098_0 =>
+ (case ((sep_matches_prefix s2098_0)) of
+ SOME ((() , s2099_0)) =>
+ (case ((string_drop s2098_0 s2099_0)) of
+ s2100_0 =>
+ (case ((reg_name_matches_prefix s2100_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2101_0)) =>
+ let p0_ = (string_drop s2100_0 s2101_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24710,41 +41551,41 @@ val _ = Define `
else NONE))`;
-(*val _s1544_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2067_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1544_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s1545_0=
- (let s1546_0 = s1545_0 in
- if ((string_startswith s1546_0 "div")) then
- (case ((string_drop s1546_0 ((string_length "div")))) of
- s1547_0 =>
- (case ((maybe_not_u_matches_prefix s1547_0)) of
- SOME ((s, s1548_0)) =>
- (case ((string_drop s1547_0 s1548_0)) of
- s1549_0 =>
- (case ((spc_matches_prefix0 s1549_0)) of
- SOME ((() , s1550_0)) =>
- (case ((string_drop s1549_0 s1550_0)) of
- s1551_0 =>
- (case ((reg_name_matches_prefix s1551_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1552_0)) =>
- (case ((string_drop s1551_0 s1552_0)) of
- s1553_0 =>
- (case ((sep_matches_prefix s1553_0)) of
- SOME ((() , s1554_0)) =>
- (case ((string_drop s1553_0 s1554_0)) of
- s1555_0 =>
- (case ((reg_name_matches_prefix s1555_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1556_0)) =>
- (case ((string_drop s1555_0 s1556_0)) of
- s1557_0 =>
- (case ((sep_matches_prefix s1557_0)) of
- SOME ((() , s1558_0)) =>
- (case ((string_drop s1557_0 s1558_0)) of
- s1559_0 =>
- (case ((reg_name_matches_prefix s1559_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1560_0)) =>
- let p0_ = (string_drop s1559_0 s1560_0) in
+ ((s2067_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2068_0=
+ (let s2069_0 = s2068_0 in
+ if ((string_startswith s2069_0 "div")) then
+ (case ((string_drop s2069_0 ((string_length "div")))) of
+ s2070_0 =>
+ (case ((maybe_not_u_matches_prefix s2070_0)) of
+ SOME ((s, s2071_0)) =>
+ (case ((string_drop s2070_0 s2071_0)) of
+ s2072_0 =>
+ (case ((spc_matches_prefix0 s2072_0)) of
+ SOME ((() , s2073_0)) =>
+ (case ((string_drop s2072_0 s2073_0)) of
+ s2074_0 =>
+ (case ((reg_name_matches_prefix s2074_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2075_0)) =>
+ (case ((string_drop s2074_0 s2075_0)) of
+ s2076_0 =>
+ (case ((sep_matches_prefix s2076_0)) of
+ SOME ((() , s2077_0)) =>
+ (case ((string_drop s2076_0 s2077_0)) of
+ s2078_0 =>
+ (case ((reg_name_matches_prefix s2078_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2079_0)) =>
+ (case ((string_drop s2078_0 s2079_0)) of
+ s2080_0 =>
+ (case ((sep_matches_prefix s2080_0)) of
+ SOME ((() , s2081_0)) =>
+ (case ((string_drop s2080_0 s2081_0)) of
+ s2082_0 =>
+ (case ((reg_name_matches_prefix s2082_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2083_0)) =>
+ let p0_ = (string_drop s2082_0 s2083_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -24770,39 +41611,39 @@ val _ = Define `
else NONE))`;
-(*val _s1527_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s2050_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1527_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1528_0=
- ((case s1528_0 of
- s1529_0 =>
- (case ((mul_mnemonic_matches_prefix s1529_0)) of
- SOME (((high, signed1, signed2), s1530_0)) =>
- (case ((string_drop s1529_0 s1530_0)) of
- s1531_0 =>
- (case ((spc_matches_prefix0 s1531_0)) of
- SOME ((() , s1532_0)) =>
- (case ((string_drop s1531_0 s1532_0)) of
- s1533_0 =>
- (case ((reg_name_matches_prefix s1533_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1534_0)) =>
- (case ((string_drop s1533_0 s1534_0)) of
- s1535_0 =>
- (case ((sep_matches_prefix s1535_0)) of
- SOME ((() , s1536_0)) =>
- (case ((string_drop s1535_0 s1536_0)) of
- s1537_0 =>
- (case ((reg_name_matches_prefix s1537_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1538_0)) =>
- (case ((string_drop s1537_0 s1538_0)) of
- s1539_0 =>
- (case ((sep_matches_prefix s1539_0)) of
- SOME ((() , s1540_0)) =>
- (case ((string_drop s1539_0 s1540_0)) of
- s1541_0 =>
- (case ((reg_name_matches_prefix s1541_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1542_0)) =>
- let p0_ = (string_drop s1541_0 s1542_0) in
+ ((s2050_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s2051_0=
+ ((case s2051_0 of
+ s2052_0 =>
+ (case ((mul_mnemonic_matches_prefix s2052_0)) of
+ SOME (((high, signed1, signed2), s2053_0)) =>
+ (case ((string_drop s2052_0 s2053_0)) of
+ s2054_0 =>
+ (case ((spc_matches_prefix0 s2054_0)) of
+ SOME ((() , s2055_0)) =>
+ (case ((string_drop s2054_0 s2055_0)) of
+ s2056_0 =>
+ (case ((reg_name_matches_prefix s2056_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2057_0)) =>
+ (case ((string_drop s2056_0 s2057_0)) of
+ s2058_0 =>
+ (case ((sep_matches_prefix s2058_0)) of
+ SOME ((() , s2059_0)) =>
+ (case ((string_drop s2058_0 s2059_0)) of
+ s2060_0 =>
+ (case ((reg_name_matches_prefix s2060_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2061_0)) =>
+ (case ((string_drop s2060_0 s2061_0)) of
+ s2062_0 =>
+ (case ((sep_matches_prefix s2062_0)) of
+ SOME ((() , s2063_0)) =>
+ (case ((string_drop s2062_0 s2063_0)) of
+ s2064_0 =>
+ (case ((reg_name_matches_prefix s2064_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2065_0)) =>
+ let p0_ = (string_drop s2064_0 s2065_0) in
if (((p0_ = ""))) then SOME (high, signed1, signed2, rd, rs1, rs2) else
NONE
| _ => NONE
@@ -24828,29 +41669,29 @@ val _ = Define `
)))`;
-(*val _s1515_ : string -> maybe ((mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1515_:string ->((5)words$word#(5)words$word)option) s1516_0=
- (let s1517_0 = s1516_0 in
- if ((string_startswith s1517_0 "c.add")) then
- (case ((string_drop s1517_0 ((string_length "c.add")))) of
- s1518_0 =>
- (case ((spc_matches_prefix0 s1518_0)) of
- SOME ((() , s1519_0)) =>
- (case ((string_drop s1518_0 s1519_0)) of
- s1520_0 =>
- (case ((reg_name_matches_prefix s1520_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1521_0)) =>
- (case ((string_drop s1520_0 s1521_0)) of
- s1522_0 =>
- (case ((sep_matches_prefix s1522_0)) of
- SOME ((() , s1523_0)) =>
- (case ((string_drop s1522_0 s1523_0)) of
- s1524_0 =>
- (case ((reg_name_matches_prefix s1524_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1525_0)) =>
- let p0_ = (string_drop s1524_0 s1525_0) in
+(*val _s2038_ : string -> maybe ((mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s2038_:string ->((5)words$word#(5)words$word)option) s2039_0=
+ (let s2040_0 = s2039_0 in
+ if ((string_startswith s2040_0 "c.add")) then
+ (case ((string_drop s2040_0 ((string_length "c.add")))) of
+ s2041_0 =>
+ (case ((spc_matches_prefix0 s2041_0)) of
+ SOME ((() , s2042_0)) =>
+ (case ((string_drop s2041_0 s2042_0)) of
+ s2043_0 =>
+ (case ((reg_name_matches_prefix s2043_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s2044_0)) =>
+ (case ((string_drop s2043_0 s2044_0)) of
+ s2045_0 =>
+ (case ((sep_matches_prefix s2045_0)) of
+ SOME ((() , s2046_0)) =>
+ (case ((string_drop s2045_0 s2046_0)) of
+ s2047_0 =>
+ (case ((reg_name_matches_prefix s2047_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2048_0)) =>
+ let p0_ = (string_drop s2047_0 s2048_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -24867,29 +41708,29 @@ val _ = Define `
else NONE))`;
-(*val _s1503_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s2026_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1503_:string ->((5)words$word#(5)words$word)option) s1504_0=
- (let s1505_0 = s1504_0 in
- if ((string_startswith s1505_0 "c.mv")) then
- (case ((string_drop s1505_0 ((string_length "c.mv")))) of
- s1506_0 =>
- (case ((spc_matches_prefix0 s1506_0)) of
- SOME ((() , s1507_0)) =>
- (case ((string_drop s1506_0 s1507_0)) of
- s1508_0 =>
- (case ((reg_name_matches_prefix s1508_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1509_0)) =>
- (case ((string_drop s1508_0 s1509_0)) of
- s1510_0 =>
- (case ((sep_matches_prefix s1510_0)) of
- SOME ((() , s1511_0)) =>
- (case ((string_drop s1510_0 s1511_0)) of
- s1512_0 =>
- (case ((reg_name_matches_prefix s1512_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1513_0)) =>
- let p0_ = (string_drop s1512_0 s1513_0) in
+ ((s2026_:string ->((5)words$word#(5)words$word)option) s2027_0=
+ (let s2028_0 = s2027_0 in
+ if ((string_startswith s2028_0 "c.mv")) then
+ (case ((string_drop s2028_0 ((string_length "c.mv")))) of
+ s2029_0 =>
+ (case ((spc_matches_prefix0 s2029_0)) of
+ SOME ((() , s2030_0)) =>
+ (case ((string_drop s2029_0 s2030_0)) of
+ s2031_0 =>
+ (case ((reg_name_matches_prefix s2031_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s2032_0)) =>
+ (case ((string_drop s2031_0 s2032_0)) of
+ s2033_0 =>
+ (case ((sep_matches_prefix s2033_0)) of
+ SOME ((() , s2034_0)) =>
+ (case ((string_drop s2033_0 s2034_0)) of
+ s2035_0 =>
+ (case ((reg_name_matches_prefix s2035_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2036_0)) =>
+ let p0_ = (string_drop s2035_0 s2036_0) in
if (((p0_ = ""))) then SOME (rd, rs2) else NONE
| _ => NONE
)
@@ -24906,21 +41747,21 @@ val _ = Define `
else NONE))`;
-(*val _s1495_ : string -> maybe (mword ty5)*)
+(*val _s2018_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s1495_:string ->((5)words$word)option) s1496_0=
- (let s1497_0 = s1496_0 in
- if ((string_startswith s1497_0 "c.jalr")) then
- (case ((string_drop s1497_0 ((string_length "c.jalr")))) of
- s1498_0 =>
- (case ((spc_matches_prefix0 s1498_0)) of
- SOME ((() , s1499_0)) =>
- (case ((string_drop s1498_0 s1499_0)) of
- s1500_0 =>
- (case ((reg_name_matches_prefix s1500_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1501_0)) =>
- let p0_ = (string_drop s1500_0 s1501_0) in
+ ((s2018_:string ->((5)words$word)option) s2019_0=
+ (let s2020_0 = s2019_0 in
+ if ((string_startswith s2020_0 "c.jalr")) then
+ (case ((string_drop s2020_0 ((string_length "c.jalr")))) of
+ s2021_0 =>
+ (case ((spc_matches_prefix0 s2021_0)) of
+ SOME ((() , s2022_0)) =>
+ (case ((string_drop s2021_0 s2022_0)) of
+ s2023_0 =>
+ (case ((reg_name_matches_prefix s2023_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2024_0)) =>
+ let p0_ = (string_drop s2023_0 s2024_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -24931,21 +41772,21 @@ val _ = Define `
else NONE))`;
-(*val _s1487_ : string -> maybe (mword ty5)*)
+(*val _s2010_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s1487_:string ->((5)words$word)option) s1488_0=
- (let s1489_0 = s1488_0 in
- if ((string_startswith s1489_0 "c.jr")) then
- (case ((string_drop s1489_0 ((string_length "c.jr")))) of
- s1490_0 =>
- (case ((spc_matches_prefix0 s1490_0)) of
- SOME ((() , s1491_0)) =>
- (case ((string_drop s1490_0 s1491_0)) of
- s1492_0 =>
- (case ((reg_name_matches_prefix s1492_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1493_0)) =>
- let p0_ = (string_drop s1492_0 s1493_0) in
+ ((s2010_:string ->((5)words$word)option) s2011_0=
+ (let s2012_0 = s2011_0 in
+ if ((string_startswith s2012_0 "c.jr")) then
+ (case ((string_drop s2012_0 ((string_length "c.jr")))) of
+ s2013_0 =>
+ (case ((spc_matches_prefix0 s2013_0)) of
+ SOME ((() , s2014_0)) =>
+ (case ((string_drop s2013_0 s2014_0)) of
+ s2015_0 =>
+ (case ((reg_name_matches_prefix s2015_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s2016_0)) =>
+ let p0_ = (string_drop s2015_0 s2016_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -24956,30 +41797,30 @@ val _ = Define `
else NONE))`;
-(*val _s1475_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1998_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1475_:string ->((5)words$word#(6)words$word)option) s1476_0=
- (let s1477_0 = s1476_0 in
- if ((string_startswith s1477_0 "c.sdsp")) then
- (case ((string_drop s1477_0 ((string_length "c.sdsp")))) of
- s1478_0 =>
- (case ((spc_matches_prefix0 s1478_0)) of
- SOME ((() , s1479_0)) =>
- (case ((string_drop s1478_0 s1479_0)) of
- s1480_0 =>
- (case ((reg_name_matches_prefix s1480_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1481_0)) =>
- (case ((string_drop s1480_0 s1481_0)) of
- s1482_0 =>
- (case ((sep_matches_prefix s1482_0)) of
- SOME ((() , s1483_0)) =>
- (case ((string_drop s1482_0 s1483_0)) of
- s1484_0 =>
+ ((s1998_:string ->((5)words$word#(6)words$word)option) s1999_0=
+ (let s2000_0 = s1999_0 in
+ if ((string_startswith s2000_0 "c.sdsp")) then
+ (case ((string_drop s2000_0 ((string_length "c.sdsp")))) of
+ s2001_0 =>
+ (case ((spc_matches_prefix0 s2001_0)) of
+ SOME ((() , s2002_0)) =>
+ (case ((string_drop s2001_0 s2002_0)) of
+ s2003_0 =>
+ (case ((reg_name_matches_prefix s2003_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s2004_0)) =>
+ (case ((string_drop s2003_0 s2004_0)) of
+ s2005_0 =>
+ (case ((sep_matches_prefix s2005_0)) of
+ SOME ((() , s2006_0)) =>
+ (case ((string_drop s2005_0 s2006_0)) of
+ s2007_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1484_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1485_0)) =>
- let p0_ = (string_drop s1484_0 s1485_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s2007_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s2008_0)) =>
+ let p0_ = (string_drop s2007_0 s2008_0) in
if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
| _ => NONE
)
@@ -24996,30 +41837,30 @@ val _ = Define `
else NONE))`;
-(*val _s1463_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1986_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1463_:string ->((5)words$word#(6)words$word)option) s1464_0=
- (let s1465_0 = s1464_0 in
- if ((string_startswith s1465_0 "c.swsp")) then
- (case ((string_drop s1465_0 ((string_length "c.swsp")))) of
- s1466_0 =>
- (case ((spc_matches_prefix0 s1466_0)) of
- SOME ((() , s1467_0)) =>
- (case ((string_drop s1466_0 s1467_0)) of
- s1468_0 =>
- (case ((reg_name_matches_prefix s1468_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1469_0)) =>
- (case ((string_drop s1468_0 s1469_0)) of
- s1470_0 =>
- (case ((sep_matches_prefix s1470_0)) of
- SOME ((() , s1471_0)) =>
- (case ((string_drop s1470_0 s1471_0)) of
- s1472_0 =>
+ ((s1986_:string ->((5)words$word#(6)words$word)option) s1987_0=
+ (let s1988_0 = s1987_0 in
+ if ((string_startswith s1988_0 "c.swsp")) then
+ (case ((string_drop s1988_0 ((string_length "c.swsp")))) of
+ s1989_0 =>
+ (case ((spc_matches_prefix0 s1989_0)) of
+ SOME ((() , s1990_0)) =>
+ (case ((string_drop s1989_0 s1990_0)) of
+ s1991_0 =>
+ (case ((reg_name_matches_prefix s1991_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1992_0)) =>
+ (case ((string_drop s1991_0 s1992_0)) of
+ s1993_0 =>
+ (case ((sep_matches_prefix s1993_0)) of
+ SOME ((() , s1994_0)) =>
+ (case ((string_drop s1993_0 s1994_0)) of
+ s1995_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1472_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1473_0)) =>
- let p0_ = (string_drop s1472_0 s1473_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1995_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1996_0)) =>
+ let p0_ = (string_drop s1995_0 s1996_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -25036,30 +41877,30 @@ val _ = Define `
else NONE))`;
-(*val _s1451_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1974_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1451_:string ->((5)words$word#(6)words$word)option) s1452_0=
- (let s1453_0 = s1452_0 in
- if ((string_startswith s1453_0 "c.ldsp")) then
- (case ((string_drop s1453_0 ((string_length "c.ldsp")))) of
- s1454_0 =>
- (case ((spc_matches_prefix0 s1454_0)) of
- SOME ((() , s1455_0)) =>
- (case ((string_drop s1454_0 s1455_0)) of
- s1456_0 =>
- (case ((reg_name_matches_prefix s1456_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1457_0)) =>
- (case ((string_drop s1456_0 s1457_0)) of
- s1458_0 =>
- (case ((sep_matches_prefix s1458_0)) of
- SOME ((() , s1459_0)) =>
- (case ((string_drop s1458_0 s1459_0)) of
- s1460_0 =>
+ ((s1974_:string ->((5)words$word#(6)words$word)option) s1975_0=
+ (let s1976_0 = s1975_0 in
+ if ((string_startswith s1976_0 "c.ldsp")) then
+ (case ((string_drop s1976_0 ((string_length "c.ldsp")))) of
+ s1977_0 =>
+ (case ((spc_matches_prefix0 s1977_0)) of
+ SOME ((() , s1978_0)) =>
+ (case ((string_drop s1977_0 s1978_0)) of
+ s1979_0 =>
+ (case ((reg_name_matches_prefix s1979_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1980_0)) =>
+ (case ((string_drop s1979_0 s1980_0)) of
+ s1981_0 =>
+ (case ((sep_matches_prefix s1981_0)) of
+ SOME ((() , s1982_0)) =>
+ (case ((string_drop s1981_0 s1982_0)) of
+ s1983_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1460_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1461_0)) =>
- let p0_ = (string_drop s1460_0 s1461_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1983_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1984_0)) =>
+ let p0_ = (string_drop s1983_0 s1984_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -25076,30 +41917,30 @@ val _ = Define `
else NONE))`;
-(*val _s1439_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1962_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1439_:string ->((5)words$word#(6)words$word)option) s1440_0=
- (let s1441_0 = s1440_0 in
- if ((string_startswith s1441_0 "c.lwsp")) then
- (case ((string_drop s1441_0 ((string_length "c.lwsp")))) of
- s1442_0 =>
- (case ((spc_matches_prefix0 s1442_0)) of
- SOME ((() , s1443_0)) =>
- (case ((string_drop s1442_0 s1443_0)) of
- s1444_0 =>
- (case ((reg_name_matches_prefix s1444_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1445_0)) =>
- (case ((string_drop s1444_0 s1445_0)) of
- s1446_0 =>
- (case ((sep_matches_prefix s1446_0)) of
- SOME ((() , s1447_0)) =>
- (case ((string_drop s1446_0 s1447_0)) of
- s1448_0 =>
+ ((s1962_:string ->((5)words$word#(6)words$word)option) s1963_0=
+ (let s1964_0 = s1963_0 in
+ if ((string_startswith s1964_0 "c.lwsp")) then
+ (case ((string_drop s1964_0 ((string_length "c.lwsp")))) of
+ s1965_0 =>
+ (case ((spc_matches_prefix0 s1965_0)) of
+ SOME ((() , s1966_0)) =>
+ (case ((string_drop s1965_0 s1966_0)) of
+ s1967_0 =>
+ (case ((reg_name_matches_prefix s1967_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1968_0)) =>
+ (case ((string_drop s1967_0 s1968_0)) of
+ s1969_0 =>
+ (case ((sep_matches_prefix s1969_0)) of
+ SOME ((() , s1970_0)) =>
+ (case ((string_drop s1969_0 s1970_0)) of
+ s1971_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1448_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s1449_0)) =>
- let p0_ = (string_drop s1448_0 s1449_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1971_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s1972_0)) =>
+ let p0_ = (string_drop s1971_0 s1972_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -25116,30 +41957,30 @@ val _ = Define `
else NONE))`;
-(*val _s1427_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1950_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1427_:string ->((5)words$word#(6)words$word)option) s1428_0=
- (let s1429_0 = s1428_0 in
- if ((string_startswith s1429_0 "c.slli")) then
- (case ((string_drop s1429_0 ((string_length "c.slli")))) of
- s1430_0 =>
- (case ((spc_matches_prefix0 s1430_0)) of
- SOME ((() , s1431_0)) =>
- (case ((string_drop s1430_0 s1431_0)) of
- s1432_0 =>
- (case ((reg_name_matches_prefix s1432_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1433_0)) =>
- (case ((string_drop s1432_0 s1433_0)) of
- s1434_0 =>
- (case ((sep_matches_prefix s1434_0)) of
- SOME ((() , s1435_0)) =>
- (case ((string_drop s1434_0 s1435_0)) of
- s1436_0 =>
+ ((s1950_:string ->((5)words$word#(6)words$word)option) s1951_0=
+ (let s1952_0 = s1951_0 in
+ if ((string_startswith s1952_0 "c.slli")) then
+ (case ((string_drop s1952_0 ((string_length "c.slli")))) of
+ s1953_0 =>
+ (case ((spc_matches_prefix0 s1953_0)) of
+ SOME ((() , s1954_0)) =>
+ (case ((string_drop s1953_0 s1954_0)) of
+ s1955_0 =>
+ (case ((reg_name_matches_prefix s1955_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1956_0)) =>
+ (case ((string_drop s1955_0 s1956_0)) of
+ s1957_0 =>
+ (case ((sep_matches_prefix s1957_0)) of
+ SOME ((() , s1958_0)) =>
+ (case ((string_drop s1957_0 s1958_0)) of
+ s1959_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1436_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1437_0)) =>
- let p0_ = (string_drop s1436_0 s1437_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1959_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1960_0)) =>
+ let p0_ = (string_drop s1959_0 s1960_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -25156,30 +41997,30 @@ val _ = Define `
else NONE))`;
-(*val _s1415_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1938_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1415_:string ->((3)words$word#(8)words$word)option) s1416_0=
- (let s1417_0 = s1416_0 in
- if ((string_startswith s1417_0 "c.bnez")) then
- (case ((string_drop s1417_0 ((string_length "c.bnez")))) of
- s1418_0 =>
- (case ((spc_matches_prefix0 s1418_0)) of
- SOME ((() , s1419_0)) =>
- (case ((string_drop s1418_0 s1419_0)) of
- s1420_0 =>
- (case ((creg_name_matches_prefix s1420_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s1421_0)) =>
- (case ((string_drop s1420_0 s1421_0)) of
- s1422_0 =>
- (case ((sep_matches_prefix s1422_0)) of
- SOME ((() , s1423_0)) =>
- (case ((string_drop s1422_0 s1423_0)) of
- s1424_0 =>
+ ((s1938_:string ->((3)words$word#(8)words$word)option) s1939_0=
+ (let s1940_0 = s1939_0 in
+ if ((string_startswith s1940_0 "c.bnez")) then
+ (case ((string_drop s1940_0 ((string_length "c.bnez")))) of
+ s1941_0 =>
+ (case ((spc_matches_prefix0 s1941_0)) of
+ SOME ((() , s1942_0)) =>
+ (case ((string_drop s1941_0 s1942_0)) of
+ s1943_0 =>
+ (case ((creg_name_matches_prefix s1943_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s1944_0)) =>
+ (case ((string_drop s1943_0 s1944_0)) of
+ s1945_0 =>
+ (case ((sep_matches_prefix s1945_0)) of
+ SOME ((() , s1946_0)) =>
+ (case ((string_drop s1945_0 s1946_0)) of
+ s1947_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1424_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s1425_0)) =>
- let p0_ = (string_drop s1424_0 s1425_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1947_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s1948_0)) =>
+ let p0_ = (string_drop s1947_0 s1948_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -25196,30 +42037,30 @@ val _ = Define `
else NONE))`;
-(*val _s1403_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1926_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1403_:string ->((3)words$word#(8)words$word)option) s1404_0=
- (let s1405_0 = s1404_0 in
- if ((string_startswith s1405_0 "c.beqz")) then
- (case ((string_drop s1405_0 ((string_length "c.beqz")))) of
- s1406_0 =>
- (case ((spc_matches_prefix0 s1406_0)) of
- SOME ((() , s1407_0)) =>
- (case ((string_drop s1406_0 s1407_0)) of
- s1408_0 =>
- (case ((creg_name_matches_prefix s1408_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s1409_0)) =>
- (case ((string_drop s1408_0 s1409_0)) of
- s1410_0 =>
- (case ((sep_matches_prefix s1410_0)) of
- SOME ((() , s1411_0)) =>
- (case ((string_drop s1410_0 s1411_0)) of
- s1412_0 =>
+ ((s1926_:string ->((3)words$word#(8)words$word)option) s1927_0=
+ (let s1928_0 = s1927_0 in
+ if ((string_startswith s1928_0 "c.beqz")) then
+ (case ((string_drop s1928_0 ((string_length "c.beqz")))) of
+ s1929_0 =>
+ (case ((spc_matches_prefix0 s1929_0)) of
+ SOME ((() , s1930_0)) =>
+ (case ((string_drop s1929_0 s1930_0)) of
+ s1931_0 =>
+ (case ((creg_name_matches_prefix s1931_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s1932_0)) =>
+ (case ((string_drop s1931_0 s1932_0)) of
+ s1933_0 =>
+ (case ((sep_matches_prefix s1933_0)) of
+ SOME ((() , s1934_0)) =>
+ (case ((string_drop s1933_0 s1934_0)) of
+ s1935_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1412_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s1413_0)) =>
- let p0_ = (string_drop s1412_0 s1413_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1935_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s1936_0)) =>
+ let p0_ = (string_drop s1935_0 s1936_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -25236,22 +42077,22 @@ val _ = Define `
else NONE))`;
-(*val _s1395_ : string -> maybe (mword ty11)*)
+(*val _s1918_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s1395_:string ->((11)words$word)option) s1396_0=
- (let s1397_0 = s1396_0 in
- if ((string_startswith s1397_0 "c.j")) then
- (case ((string_drop s1397_0 ((string_length "c.j")))) of
- s1398_0 =>
- (case ((spc_matches_prefix0 s1398_0)) of
- SOME ((() , s1399_0)) =>
- (case ((string_drop s1398_0 s1399_0)) of
- s1400_0 =>
+ ((s1918_:string ->((11)words$word)option) s1919_0=
+ (let s1920_0 = s1919_0 in
+ if ((string_startswith s1920_0 "c.j")) then
+ (case ((string_drop s1920_0 ((string_length "c.j")))) of
+ s1921_0 =>
+ (case ((spc_matches_prefix0 s1921_0)) of
+ SOME ((() , s1922_0)) =>
+ (case ((string_drop s1921_0 s1922_0)) of
+ s1923_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1400_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s1401_0)) =>
- let p0_ = (string_drop s1400_0 s1401_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1923_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s1924_0)) =>
+ let p0_ = (string_drop s1923_0 s1924_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -25262,29 +42103,29 @@ val _ = Define `
else NONE))`;
-(*val _s1383_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1906_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1383_:string ->((3)words$word#(3)words$word)option) s1384_0=
- (let s1385_0 = s1384_0 in
- if ((string_startswith s1385_0 "c.addw")) then
- (case ((string_drop s1385_0 ((string_length "c.addw")))) of
- s1386_0 =>
- (case ((spc_matches_prefix0 s1386_0)) of
- SOME ((() , s1387_0)) =>
- (case ((string_drop s1386_0 s1387_0)) of
- s1388_0 =>
- (case ((creg_name_matches_prefix s1388_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1389_0)) =>
- (case ((string_drop s1388_0 s1389_0)) of
- s1390_0 =>
- (case ((sep_matches_prefix s1390_0)) of
- SOME ((() , s1391_0)) =>
- (case ((string_drop s1390_0 s1391_0)) of
- s1392_0 =>
- (case ((creg_name_matches_prefix s1392_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1393_0)) =>
- let p0_ = (string_drop s1392_0 s1393_0) in
+ ((s1906_:string ->((3)words$word#(3)words$word)option) s1907_0=
+ (let s1908_0 = s1907_0 in
+ if ((string_startswith s1908_0 "c.addw")) then
+ (case ((string_drop s1908_0 ((string_length "c.addw")))) of
+ s1909_0 =>
+ (case ((spc_matches_prefix0 s1909_0)) of
+ SOME ((() , s1910_0)) =>
+ (case ((string_drop s1909_0 s1910_0)) of
+ s1911_0 =>
+ (case ((creg_name_matches_prefix s1911_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1912_0)) =>
+ (case ((string_drop s1911_0 s1912_0)) of
+ s1913_0 =>
+ (case ((sep_matches_prefix s1913_0)) of
+ SOME ((() , s1914_0)) =>
+ (case ((string_drop s1913_0 s1914_0)) of
+ s1915_0 =>
+ (case ((creg_name_matches_prefix s1915_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1916_0)) =>
+ let p0_ = (string_drop s1915_0 s1916_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25301,29 +42142,29 @@ val _ = Define `
else NONE))`;
-(*val _s1371_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1894_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1371_:string ->((3)words$word#(3)words$word)option) s1372_0=
- (let s1373_0 = s1372_0 in
- if ((string_startswith s1373_0 "c.subw")) then
- (case ((string_drop s1373_0 ((string_length "c.subw")))) of
- s1374_0 =>
- (case ((spc_matches_prefix0 s1374_0)) of
- SOME ((() , s1375_0)) =>
- (case ((string_drop s1374_0 s1375_0)) of
- s1376_0 =>
- (case ((creg_name_matches_prefix s1376_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1377_0)) =>
- (case ((string_drop s1376_0 s1377_0)) of
- s1378_0 =>
- (case ((sep_matches_prefix s1378_0)) of
- SOME ((() , s1379_0)) =>
- (case ((string_drop s1378_0 s1379_0)) of
- s1380_0 =>
- (case ((creg_name_matches_prefix s1380_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1381_0)) =>
- let p0_ = (string_drop s1380_0 s1381_0) in
+ ((s1894_:string ->((3)words$word#(3)words$word)option) s1895_0=
+ (let s1896_0 = s1895_0 in
+ if ((string_startswith s1896_0 "c.subw")) then
+ (case ((string_drop s1896_0 ((string_length "c.subw")))) of
+ s1897_0 =>
+ (case ((spc_matches_prefix0 s1897_0)) of
+ SOME ((() , s1898_0)) =>
+ (case ((string_drop s1897_0 s1898_0)) of
+ s1899_0 =>
+ (case ((creg_name_matches_prefix s1899_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1900_0)) =>
+ (case ((string_drop s1899_0 s1900_0)) of
+ s1901_0 =>
+ (case ((sep_matches_prefix s1901_0)) of
+ SOME ((() , s1902_0)) =>
+ (case ((string_drop s1901_0 s1902_0)) of
+ s1903_0 =>
+ (case ((creg_name_matches_prefix s1903_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1904_0)) =>
+ let p0_ = (string_drop s1903_0 s1904_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25340,29 +42181,29 @@ val _ = Define `
else NONE))`;
-(*val _s1359_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1882_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1359_:string ->((3)words$word#(3)words$word)option) s1360_0=
- (let s1361_0 = s1360_0 in
- if ((string_startswith s1361_0 "c.and")) then
- (case ((string_drop s1361_0 ((string_length "c.and")))) of
- s1362_0 =>
- (case ((spc_matches_prefix0 s1362_0)) of
- SOME ((() , s1363_0)) =>
- (case ((string_drop s1362_0 s1363_0)) of
- s1364_0 =>
- (case ((creg_name_matches_prefix s1364_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1365_0)) =>
- (case ((string_drop s1364_0 s1365_0)) of
- s1366_0 =>
- (case ((sep_matches_prefix s1366_0)) of
- SOME ((() , s1367_0)) =>
- (case ((string_drop s1366_0 s1367_0)) of
- s1368_0 =>
- (case ((creg_name_matches_prefix s1368_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1369_0)) =>
- let p0_ = (string_drop s1368_0 s1369_0) in
+ ((s1882_:string ->((3)words$word#(3)words$word)option) s1883_0=
+ (let s1884_0 = s1883_0 in
+ if ((string_startswith s1884_0 "c.and")) then
+ (case ((string_drop s1884_0 ((string_length "c.and")))) of
+ s1885_0 =>
+ (case ((spc_matches_prefix0 s1885_0)) of
+ SOME ((() , s1886_0)) =>
+ (case ((string_drop s1885_0 s1886_0)) of
+ s1887_0 =>
+ (case ((creg_name_matches_prefix s1887_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1888_0)) =>
+ (case ((string_drop s1887_0 s1888_0)) of
+ s1889_0 =>
+ (case ((sep_matches_prefix s1889_0)) of
+ SOME ((() , s1890_0)) =>
+ (case ((string_drop s1889_0 s1890_0)) of
+ s1891_0 =>
+ (case ((creg_name_matches_prefix s1891_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1892_0)) =>
+ let p0_ = (string_drop s1891_0 s1892_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25379,29 +42220,29 @@ val _ = Define `
else NONE))`;
-(*val _s1347_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1870_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1347_:string ->((3)words$word#(3)words$word)option) s1348_0=
- (let s1349_0 = s1348_0 in
- if ((string_startswith s1349_0 "c.or")) then
- (case ((string_drop s1349_0 ((string_length "c.or")))) of
- s1350_0 =>
- (case ((spc_matches_prefix0 s1350_0)) of
- SOME ((() , s1351_0)) =>
- (case ((string_drop s1350_0 s1351_0)) of
- s1352_0 =>
- (case ((creg_name_matches_prefix s1352_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1353_0)) =>
- (case ((string_drop s1352_0 s1353_0)) of
- s1354_0 =>
- (case ((sep_matches_prefix s1354_0)) of
- SOME ((() , s1355_0)) =>
- (case ((string_drop s1354_0 s1355_0)) of
- s1356_0 =>
- (case ((creg_name_matches_prefix s1356_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1357_0)) =>
- let p0_ = (string_drop s1356_0 s1357_0) in
+ ((s1870_:string ->((3)words$word#(3)words$word)option) s1871_0=
+ (let s1872_0 = s1871_0 in
+ if ((string_startswith s1872_0 "c.or")) then
+ (case ((string_drop s1872_0 ((string_length "c.or")))) of
+ s1873_0 =>
+ (case ((spc_matches_prefix0 s1873_0)) of
+ SOME ((() , s1874_0)) =>
+ (case ((string_drop s1873_0 s1874_0)) of
+ s1875_0 =>
+ (case ((creg_name_matches_prefix s1875_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1876_0)) =>
+ (case ((string_drop s1875_0 s1876_0)) of
+ s1877_0 =>
+ (case ((sep_matches_prefix s1877_0)) of
+ SOME ((() , s1878_0)) =>
+ (case ((string_drop s1877_0 s1878_0)) of
+ s1879_0 =>
+ (case ((creg_name_matches_prefix s1879_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1880_0)) =>
+ let p0_ = (string_drop s1879_0 s1880_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25418,29 +42259,29 @@ val _ = Define `
else NONE))`;
-(*val _s1335_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1858_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1335_:string ->((3)words$word#(3)words$word)option) s1336_0=
- (let s1337_0 = s1336_0 in
- if ((string_startswith s1337_0 "c.xor")) then
- (case ((string_drop s1337_0 ((string_length "c.xor")))) of
- s1338_0 =>
- (case ((spc_matches_prefix0 s1338_0)) of
- SOME ((() , s1339_0)) =>
- (case ((string_drop s1338_0 s1339_0)) of
- s1340_0 =>
- (case ((creg_name_matches_prefix s1340_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1341_0)) =>
- (case ((string_drop s1340_0 s1341_0)) of
- s1342_0 =>
- (case ((sep_matches_prefix s1342_0)) of
- SOME ((() , s1343_0)) =>
- (case ((string_drop s1342_0 s1343_0)) of
- s1344_0 =>
- (case ((creg_name_matches_prefix s1344_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1345_0)) =>
- let p0_ = (string_drop s1344_0 s1345_0) in
+ ((s1858_:string ->((3)words$word#(3)words$word)option) s1859_0=
+ (let s1860_0 = s1859_0 in
+ if ((string_startswith s1860_0 "c.xor")) then
+ (case ((string_drop s1860_0 ((string_length "c.xor")))) of
+ s1861_0 =>
+ (case ((spc_matches_prefix0 s1861_0)) of
+ SOME ((() , s1862_0)) =>
+ (case ((string_drop s1861_0 s1862_0)) of
+ s1863_0 =>
+ (case ((creg_name_matches_prefix s1863_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1864_0)) =>
+ (case ((string_drop s1863_0 s1864_0)) of
+ s1865_0 =>
+ (case ((sep_matches_prefix s1865_0)) of
+ SOME ((() , s1866_0)) =>
+ (case ((string_drop s1865_0 s1866_0)) of
+ s1867_0 =>
+ (case ((creg_name_matches_prefix s1867_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1868_0)) =>
+ let p0_ = (string_drop s1867_0 s1868_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25457,29 +42298,29 @@ val _ = Define `
else NONE))`;
-(*val _s1323_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s1846_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s1323_:string ->((3)words$word#(3)words$word)option) s1324_0=
- (let s1325_0 = s1324_0 in
- if ((string_startswith s1325_0 "c.sub")) then
- (case ((string_drop s1325_0 ((string_length "c.sub")))) of
- s1326_0 =>
- (case ((spc_matches_prefix0 s1326_0)) of
- SOME ((() , s1327_0)) =>
- (case ((string_drop s1326_0 s1327_0)) of
- s1328_0 =>
- (case ((creg_name_matches_prefix s1328_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1329_0)) =>
- (case ((string_drop s1328_0 s1329_0)) of
- s1330_0 =>
- (case ((sep_matches_prefix s1330_0)) of
- SOME ((() , s1331_0)) =>
- (case ((string_drop s1330_0 s1331_0)) of
- s1332_0 =>
- (case ((creg_name_matches_prefix s1332_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s1333_0)) =>
- let p0_ = (string_drop s1332_0 s1333_0) in
+ ((s1846_:string ->((3)words$word#(3)words$word)option) s1847_0=
+ (let s1848_0 = s1847_0 in
+ if ((string_startswith s1848_0 "c.sub")) then
+ (case ((string_drop s1848_0 ((string_length "c.sub")))) of
+ s1849_0 =>
+ (case ((spc_matches_prefix0 s1849_0)) of
+ SOME ((() , s1850_0)) =>
+ (case ((string_drop s1849_0 s1850_0)) of
+ s1851_0 =>
+ (case ((creg_name_matches_prefix s1851_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1852_0)) =>
+ (case ((string_drop s1851_0 s1852_0)) of
+ s1853_0 =>
+ (case ((sep_matches_prefix s1853_0)) of
+ SOME ((() , s1854_0)) =>
+ (case ((string_drop s1853_0 s1854_0)) of
+ s1855_0 =>
+ (case ((creg_name_matches_prefix s1855_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s1856_0)) =>
+ let p0_ = (string_drop s1855_0 s1856_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -25496,30 +42337,30 @@ val _ = Define `
else NONE))`;
-(*val _s1311_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1834_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1311_:string ->((3)words$word#(6)words$word)option) s1312_0=
- (let s1313_0 = s1312_0 in
- if ((string_startswith s1313_0 "c.andi")) then
- (case ((string_drop s1313_0 ((string_length "c.andi")))) of
- s1314_0 =>
- (case ((spc_matches_prefix0 s1314_0)) of
- SOME ((() , s1315_0)) =>
- (case ((string_drop s1314_0 s1315_0)) of
- s1316_0 =>
- (case ((creg_name_matches_prefix s1316_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1317_0)) =>
- (case ((string_drop s1316_0 s1317_0)) of
- s1318_0 =>
- (case ((sep_matches_prefix s1318_0)) of
- SOME ((() , s1319_0)) =>
- (case ((string_drop s1318_0 s1319_0)) of
- s1320_0 =>
+ ((s1834_:string ->((3)words$word#(6)words$word)option) s1835_0=
+ (let s1836_0 = s1835_0 in
+ if ((string_startswith s1836_0 "c.andi")) then
+ (case ((string_drop s1836_0 ((string_length "c.andi")))) of
+ s1837_0 =>
+ (case ((spc_matches_prefix0 s1837_0)) of
+ SOME ((() , s1838_0)) =>
+ (case ((string_drop s1837_0 s1838_0)) of
+ s1839_0 =>
+ (case ((creg_name_matches_prefix s1839_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1840_0)) =>
+ (case ((string_drop s1839_0 s1840_0)) of
+ s1841_0 =>
+ (case ((sep_matches_prefix s1841_0)) of
+ SOME ((() , s1842_0)) =>
+ (case ((string_drop s1841_0 s1842_0)) of
+ s1843_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1320_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1321_0)) =>
- let p0_ = (string_drop s1320_0 s1321_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1843_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1844_0)) =>
+ let p0_ = (string_drop s1843_0 s1844_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -25536,30 +42377,30 @@ val _ = Define `
else NONE))`;
-(*val _s1299_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1822_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1299_:string ->((3)words$word#(6)words$word)option) s1300_0=
- (let s1301_0 = s1300_0 in
- if ((string_startswith s1301_0 "c.srai")) then
- (case ((string_drop s1301_0 ((string_length "c.srai")))) of
- s1302_0 =>
- (case ((spc_matches_prefix0 s1302_0)) of
- SOME ((() , s1303_0)) =>
- (case ((string_drop s1302_0 s1303_0)) of
- s1304_0 =>
- (case ((creg_name_matches_prefix s1304_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1305_0)) =>
- (case ((string_drop s1304_0 s1305_0)) of
- s1306_0 =>
- (case ((sep_matches_prefix s1306_0)) of
- SOME ((() , s1307_0)) =>
- (case ((string_drop s1306_0 s1307_0)) of
- s1308_0 =>
+ ((s1822_:string ->((3)words$word#(6)words$word)option) s1823_0=
+ (let s1824_0 = s1823_0 in
+ if ((string_startswith s1824_0 "c.srai")) then
+ (case ((string_drop s1824_0 ((string_length "c.srai")))) of
+ s1825_0 =>
+ (case ((spc_matches_prefix0 s1825_0)) of
+ SOME ((() , s1826_0)) =>
+ (case ((string_drop s1825_0 s1826_0)) of
+ s1827_0 =>
+ (case ((creg_name_matches_prefix s1827_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1828_0)) =>
+ (case ((string_drop s1827_0 s1828_0)) of
+ s1829_0 =>
+ (case ((sep_matches_prefix s1829_0)) of
+ SOME ((() , s1830_0)) =>
+ (case ((string_drop s1829_0 s1830_0)) of
+ s1831_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1308_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1309_0)) =>
- let p0_ = (string_drop s1308_0 s1309_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1831_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1832_0)) =>
+ let p0_ = (string_drop s1831_0 s1832_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -25576,30 +42417,30 @@ val _ = Define `
else NONE))`;
-(*val _s1287_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s1810_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s1287_:string ->((3)words$word#(6)words$word)option) s1288_0=
- (let s1289_0 = s1288_0 in
- if ((string_startswith s1289_0 "c.srli")) then
- (case ((string_drop s1289_0 ((string_length "c.srli")))) of
- s1290_0 =>
- (case ((spc_matches_prefix0 s1290_0)) of
- SOME ((() , s1291_0)) =>
- (case ((string_drop s1290_0 s1291_0)) of
- s1292_0 =>
- (case ((creg_name_matches_prefix s1292_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s1293_0)) =>
- (case ((string_drop s1292_0 s1293_0)) of
- s1294_0 =>
- (case ((sep_matches_prefix s1294_0)) of
- SOME ((() , s1295_0)) =>
- (case ((string_drop s1294_0 s1295_0)) of
- s1296_0 =>
+ ((s1810_:string ->((3)words$word#(6)words$word)option) s1811_0=
+ (let s1812_0 = s1811_0 in
+ if ((string_startswith s1812_0 "c.srli")) then
+ (case ((string_drop s1812_0 ((string_length "c.srli")))) of
+ s1813_0 =>
+ (case ((spc_matches_prefix0 s1813_0)) of
+ SOME ((() , s1814_0)) =>
+ (case ((string_drop s1813_0 s1814_0)) of
+ s1815_0 =>
+ (case ((creg_name_matches_prefix s1815_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s1816_0)) =>
+ (case ((string_drop s1815_0 s1816_0)) of
+ s1817_0 =>
+ (case ((sep_matches_prefix s1817_0)) of
+ SOME ((() , s1818_0)) =>
+ (case ((string_drop s1817_0 s1818_0)) of
+ s1819_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1296_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1297_0)) =>
- let p0_ = (string_drop s1296_0 s1297_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1819_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1820_0)) =>
+ let p0_ = (string_drop s1819_0 s1820_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -25616,30 +42457,30 @@ val _ = Define `
else NONE))`;
-(*val _s1275_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1798_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1275_:string ->((5)words$word#(6)words$word)option) s1276_0=
- (let s1277_0 = s1276_0 in
- if ((string_startswith s1277_0 "c.lui")) then
- (case ((string_drop s1277_0 ((string_length "c.lui")))) of
- s1278_0 =>
- (case ((spc_matches_prefix0 s1278_0)) of
- SOME ((() , s1279_0)) =>
- (case ((string_drop s1278_0 s1279_0)) of
- s1280_0 =>
- (case ((reg_name_matches_prefix s1280_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1281_0)) =>
- (case ((string_drop s1280_0 s1281_0)) of
- s1282_0 =>
- (case ((sep_matches_prefix s1282_0)) of
- SOME ((() , s1283_0)) =>
- (case ((string_drop s1282_0 s1283_0)) of
- s1284_0 =>
+ ((s1798_:string ->((5)words$word#(6)words$word)option) s1799_0=
+ (let s1800_0 = s1799_0 in
+ if ((string_startswith s1800_0 "c.lui")) then
+ (case ((string_drop s1800_0 ((string_length "c.lui")))) of
+ s1801_0 =>
+ (case ((spc_matches_prefix0 s1801_0)) of
+ SOME ((() , s1802_0)) =>
+ (case ((string_drop s1801_0 s1802_0)) of
+ s1803_0 =>
+ (case ((reg_name_matches_prefix s1803_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1804_0)) =>
+ (case ((string_drop s1803_0 s1804_0)) of
+ s1805_0 =>
+ (case ((sep_matches_prefix s1805_0)) of
+ SOME ((() , s1806_0)) =>
+ (case ((string_drop s1805_0 s1806_0)) of
+ s1807_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1284_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1285_0)) =>
- let p0_ = (string_drop s1284_0 s1285_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1807_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1808_0)) =>
+ let p0_ = (string_drop s1807_0 s1808_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -25656,22 +42497,22 @@ val _ = Define `
else NONE))`;
-(*val _s1267_ : string -> maybe (mword ty6)*)
+(*val _s1790_ : string -> maybe (mword ty6)*)
val _ = Define `
- ((s1267_:string ->((6)words$word)option) s1268_0=
- (let s1269_0 = s1268_0 in
- if ((string_startswith s1269_0 "c.addi16sp")) then
- (case ((string_drop s1269_0 ((string_length "c.addi16sp")))) of
- s1270_0 =>
- (case ((spc_matches_prefix0 s1270_0)) of
- SOME ((() , s1271_0)) =>
- (case ((string_drop s1270_0 s1271_0)) of
- s1272_0 =>
+ ((s1790_:string ->((6)words$word)option) s1791_0=
+ (let s1792_0 = s1791_0 in
+ if ((string_startswith s1792_0 "c.addi16sp")) then
+ (case ((string_drop s1792_0 ((string_length "c.addi16sp")))) of
+ s1793_0 =>
+ (case ((spc_matches_prefix0 s1793_0)) of
+ SOME ((() , s1794_0)) =>
+ (case ((string_drop s1793_0 s1794_0)) of
+ s1795_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1272_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1273_0)) =>
- let p0_ = (string_drop s1272_0 s1273_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1795_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1796_0)) =>
+ let p0_ = (string_drop s1795_0 s1796_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -25682,30 +42523,30 @@ val _ = Define `
else NONE))`;
-(*val _s1255_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1778_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1255_:string ->((5)words$word#(6)words$word)option) s1256_0=
- (let s1257_0 = s1256_0 in
- if ((string_startswith s1257_0 "c.li")) then
- (case ((string_drop s1257_0 ((string_length "c.li")))) of
- s1258_0 =>
- (case ((spc_matches_prefix0 s1258_0)) of
- SOME ((() , s1259_0)) =>
- (case ((string_drop s1258_0 s1259_0)) of
- s1260_0 =>
- (case ((reg_name_matches_prefix s1260_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1261_0)) =>
- (case ((string_drop s1260_0 s1261_0)) of
- s1262_0 =>
- (case ((sep_matches_prefix s1262_0)) of
- SOME ((() , s1263_0)) =>
- (case ((string_drop s1262_0 s1263_0)) of
- s1264_0 =>
+ ((s1778_:string ->((5)words$word#(6)words$word)option) s1779_0=
+ (let s1780_0 = s1779_0 in
+ if ((string_startswith s1780_0 "c.li")) then
+ (case ((string_drop s1780_0 ((string_length "c.li")))) of
+ s1781_0 =>
+ (case ((spc_matches_prefix0 s1781_0)) of
+ SOME ((() , s1782_0)) =>
+ (case ((string_drop s1781_0 s1782_0)) of
+ s1783_0 =>
+ (case ((reg_name_matches_prefix s1783_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1784_0)) =>
+ (case ((string_drop s1783_0 s1784_0)) of
+ s1785_0 =>
+ (case ((sep_matches_prefix s1785_0)) of
+ SOME ((() , s1786_0)) =>
+ (case ((string_drop s1785_0 s1786_0)) of
+ s1787_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1264_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1265_0)) =>
- let p0_ = (string_drop s1264_0 s1265_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1787_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1788_0)) =>
+ let p0_ = (string_drop s1787_0 s1788_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -25722,30 +42563,30 @@ val _ = Define `
else NONE))`;
-(*val _s1243_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1766_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1243_:string ->((5)words$word#(6)words$word)option) s1244_0=
- (let s1245_0 = s1244_0 in
- if ((string_startswith s1245_0 "c.addiw")) then
- (case ((string_drop s1245_0 ((string_length "c.addiw")))) of
- s1246_0 =>
- (case ((spc_matches_prefix0 s1246_0)) of
- SOME ((() , s1247_0)) =>
- (case ((string_drop s1246_0 s1247_0)) of
- s1248_0 =>
- (case ((reg_name_matches_prefix s1248_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1249_0)) =>
- (case ((string_drop s1248_0 s1249_0)) of
- s1250_0 =>
- (case ((sep_matches_prefix s1250_0)) of
- SOME ((() , s1251_0)) =>
- (case ((string_drop s1250_0 s1251_0)) of
- s1252_0 =>
+ ((s1766_:string ->((5)words$word#(6)words$word)option) s1767_0=
+ (let s1768_0 = s1767_0 in
+ if ((string_startswith s1768_0 "c.addiw")) then
+ (case ((string_drop s1768_0 ((string_length "c.addiw")))) of
+ s1769_0 =>
+ (case ((spc_matches_prefix0 s1769_0)) of
+ SOME ((() , s1770_0)) =>
+ (case ((string_drop s1769_0 s1770_0)) of
+ s1771_0 =>
+ (case ((reg_name_matches_prefix s1771_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1772_0)) =>
+ (case ((string_drop s1771_0 s1772_0)) of
+ s1773_0 =>
+ (case ((sep_matches_prefix s1773_0)) of
+ SOME ((() , s1774_0)) =>
+ (case ((string_drop s1773_0 s1774_0)) of
+ s1775_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1252_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s1253_0)) =>
- let p0_ = (string_drop s1252_0 s1253_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1775_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s1776_0)) =>
+ let p0_ = (string_drop s1775_0 s1776_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -25762,28 +42603,27 @@ val _ = Define `
else NONE))`;
-(*val _s1235_ : string -> maybe (mword ty11)*)
+(*val _s1758_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s1235_:string ->((11)words$word)option) s1236_0=
- (let s1237_0 = s1236_0 in
- if ((string_startswith s1237_0 "c.jal")) then
- (case ((string_drop s1237_0 ((string_length "c.jal")))) of
- s1238_0 =>
- (case ((spc_matches_prefix0 s1238_0)) of
- SOME ((() , s1239_0)) =>
- (case ((string_drop s1238_0 s1239_0)) of
- s1240_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1240_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__802, s1241_0)) =>
- if (((((subrange_vec_dec v__802 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__802 (( 11 : int): ii)
+ ((s1758_:string ->((11)words$word)option) s1759_0=
+ (let s1760_0 = s1759_0 in
+ if ((string_startswith s1760_0 "c.jal")) then
+ (case ((string_drop s1760_0 ((string_length "c.jal")))) of
+ s1761_0 =>
+ (case ((spc_matches_prefix0 s1761_0)) of
+ SOME ((() , s1762_0)) =>
+ (case ((string_drop s1761_0 s1762_0)) of
+ s1763_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1763_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1450, s1764_0)) =>
+ if (((((subrange_vec_dec v__1450 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1450 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__802 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1450 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let p0_ = (string_drop s1240_0 s1241_0) in
+ let p0_ = (string_drop s1763_0 s1764_0) in
if (((p0_ = ""))) then SOME imm else NONE else NONE
| _ => NONE
)
@@ -25794,30 +42634,30 @@ val _ = Define `
else NONE))`;
-(*val _s1223_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s1746_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s1223_:string ->((5)words$word#(6)words$word)option) s1224_0=
- (let s1225_0 = s1224_0 in
- if ((string_startswith s1225_0 "c.addi")) then
- (case ((string_drop s1225_0 ((string_length "c.addi")))) of
- s1226_0 =>
- (case ((spc_matches_prefix0 s1226_0)) of
- SOME ((() , s1227_0)) =>
- (case ((string_drop s1226_0 s1227_0)) of
- s1228_0 =>
- (case ((reg_name_matches_prefix s1228_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s1229_0)) =>
- (case ((string_drop s1228_0 s1229_0)) of
- s1230_0 =>
- (case ((sep_matches_prefix s1230_0)) of
- SOME ((() , s1231_0)) =>
- (case ((string_drop s1230_0 s1231_0)) of
- s1232_0 =>
+ ((s1746_:string ->((5)words$word#(6)words$word)option) s1747_0=
+ (let s1748_0 = s1747_0 in
+ if ((string_startswith s1748_0 "c.addi")) then
+ (case ((string_drop s1748_0 ((string_length "c.addi")))) of
+ s1749_0 =>
+ (case ((spc_matches_prefix0 s1749_0)) of
+ SOME ((() , s1750_0)) =>
+ (case ((string_drop s1749_0 s1750_0)) of
+ s1751_0 =>
+ (case ((reg_name_matches_prefix s1751_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s1752_0)) =>
+ (case ((string_drop s1751_0 s1752_0)) of
+ s1753_0 =>
+ (case ((sep_matches_prefix s1753_0)) of
+ SOME ((() , s1754_0)) =>
+ (case ((string_drop s1753_0 s1754_0)) of
+ s1755_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1232_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s1233_0)) =>
- let p0_ = (string_drop s1232_0 s1233_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1755_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s1756_0)) =>
+ let p0_ = (string_drop s1755_0 s1756_0) in
if (((p0_ = ""))) then SOME (rsd, nzi) else NONE
| _ => NONE
)
@@ -25834,45 +42674,45 @@ val _ = Define `
else NONE))`;
-(*val _s1207_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1730_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1207_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1208_0=
- (let s1209_0 = s1208_0 in
- if ((string_startswith s1209_0 "c.sd")) then
- (case ((string_drop s1209_0 ((string_length "c.sd")))) of
- s1210_0 =>
- (case ((spc_matches_prefix0 s1210_0)) of
- SOME ((() , s1211_0)) =>
- (case ((string_drop s1210_0 s1211_0)) of
- s1212_0 =>
- (case ((creg_name_matches_prefix s1212_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s1213_0)) =>
- (case ((string_drop s1212_0 s1213_0)) of
- s1214_0 =>
- (case ((sep_matches_prefix s1214_0)) of
- SOME ((() , s1215_0)) =>
- (case ((string_drop s1214_0 s1215_0)) of
- s1216_0 =>
- (case ((creg_name_matches_prefix s1216_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s1217_0)) =>
- (case ((string_drop s1216_0 s1217_0)) of
- s1218_0 =>
- (case ((sep_matches_prefix s1218_0)) of
- SOME ((() , s1219_0)) =>
- (case ((string_drop s1218_0 s1219_0)) of
- s1220_0 =>
+ ((s1730_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1731_0=
+ (let s1732_0 = s1731_0 in
+ if ((string_startswith s1732_0 "c.sd")) then
+ (case ((string_drop s1732_0 ((string_length "c.sd")))) of
+ s1733_0 =>
+ (case ((spc_matches_prefix0 s1733_0)) of
+ SOME ((() , s1734_0)) =>
+ (case ((string_drop s1733_0 s1734_0)) of
+ s1735_0 =>
+ (case ((creg_name_matches_prefix s1735_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s1736_0)) =>
+ (case ((string_drop s1735_0 s1736_0)) of
+ s1737_0 =>
+ (case ((sep_matches_prefix s1737_0)) of
+ SOME ((() , s1738_0)) =>
+ (case ((string_drop s1737_0 s1738_0)) of
+ s1739_0 =>
+ (case ((creg_name_matches_prefix s1739_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s1740_0)) =>
+ (case ((string_drop s1739_0 s1740_0)) of
+ s1741_0 =>
+ (case ((sep_matches_prefix s1741_0)) of
+ SOME ((() , s1742_0)) =>
+ (case ((string_drop s1741_0 s1742_0)) of
+ s1743_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1220_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1743_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__804, s1221_0)) =>
- if (((((subrange_vec_dec v__804 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1452, s1744_0)) =>
+ if (((((subrange_vec_dec v__1452 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__804 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1452 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__804 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1220_0 s1221_0) in
+ ((subrange_vec_dec v__1452 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1743_0 s1744_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -25895,45 +42735,45 @@ val _ = Define `
else NONE))`;
-(*val _s1191_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1714_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1191_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1192_0=
- (let s1193_0 = s1192_0 in
- if ((string_startswith s1193_0 "c.sw")) then
- (case ((string_drop s1193_0 ((string_length "c.sw")))) of
- s1194_0 =>
- (case ((spc_matches_prefix0 s1194_0)) of
- SOME ((() , s1195_0)) =>
- (case ((string_drop s1194_0 s1195_0)) of
- s1196_0 =>
- (case ((creg_name_matches_prefix s1196_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s1197_0)) =>
- (case ((string_drop s1196_0 s1197_0)) of
- s1198_0 =>
- (case ((sep_matches_prefix s1198_0)) of
- SOME ((() , s1199_0)) =>
- (case ((string_drop s1198_0 s1199_0)) of
- s1200_0 =>
- (case ((creg_name_matches_prefix s1200_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s1201_0)) =>
- (case ((string_drop s1200_0 s1201_0)) of
- s1202_0 =>
- (case ((sep_matches_prefix s1202_0)) of
- SOME ((() , s1203_0)) =>
- (case ((string_drop s1202_0 s1203_0)) of
- s1204_0 =>
+ ((s1714_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1715_0=
+ (let s1716_0 = s1715_0 in
+ if ((string_startswith s1716_0 "c.sw")) then
+ (case ((string_drop s1716_0 ((string_length "c.sw")))) of
+ s1717_0 =>
+ (case ((spc_matches_prefix0 s1717_0)) of
+ SOME ((() , s1718_0)) =>
+ (case ((string_drop s1717_0 s1718_0)) of
+ s1719_0 =>
+ (case ((creg_name_matches_prefix s1719_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s1720_0)) =>
+ (case ((string_drop s1719_0 s1720_0)) of
+ s1721_0 =>
+ (case ((sep_matches_prefix s1721_0)) of
+ SOME ((() , s1722_0)) =>
+ (case ((string_drop s1721_0 s1722_0)) of
+ s1723_0 =>
+ (case ((creg_name_matches_prefix s1723_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s1724_0)) =>
+ (case ((string_drop s1723_0 s1724_0)) of
+ s1725_0 =>
+ (case ((sep_matches_prefix s1725_0)) of
+ SOME ((() , s1726_0)) =>
+ (case ((string_drop s1725_0 s1726_0)) of
+ s1727_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1204_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1727_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__806, s1205_0)) =>
- if (((((subrange_vec_dec v__806 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1454, s1728_0)) =>
+ if (((((subrange_vec_dec v__1454 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__806 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1454 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__806 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1204_0 s1205_0) in
+ ((subrange_vec_dec v__1454 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1727_0 s1728_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -25956,45 +42796,45 @@ val _ = Define `
else NONE))`;
-(*val _s1175_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1698_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1175_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1176_0=
- (let s1177_0 = s1176_0 in
- if ((string_startswith s1177_0 "c.ld")) then
- (case ((string_drop s1177_0 ((string_length "c.ld")))) of
- s1178_0 =>
- (case ((spc_matches_prefix0 s1178_0)) of
- SOME ((() , s1179_0)) =>
- (case ((string_drop s1178_0 s1179_0)) of
- s1180_0 =>
- (case ((creg_name_matches_prefix s1180_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1181_0)) =>
- (case ((string_drop s1180_0 s1181_0)) of
- s1182_0 =>
- (case ((sep_matches_prefix s1182_0)) of
- SOME ((() , s1183_0)) =>
- (case ((string_drop s1182_0 s1183_0)) of
- s1184_0 =>
- (case ((creg_name_matches_prefix s1184_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s1185_0)) =>
- (case ((string_drop s1184_0 s1185_0)) of
- s1186_0 =>
- (case ((sep_matches_prefix s1186_0)) of
- SOME ((() , s1187_0)) =>
- (case ((string_drop s1186_0 s1187_0)) of
- s1188_0 =>
+ ((s1698_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1699_0=
+ (let s1700_0 = s1699_0 in
+ if ((string_startswith s1700_0 "c.ld")) then
+ (case ((string_drop s1700_0 ((string_length "c.ld")))) of
+ s1701_0 =>
+ (case ((spc_matches_prefix0 s1701_0)) of
+ SOME ((() , s1702_0)) =>
+ (case ((string_drop s1701_0 s1702_0)) of
+ s1703_0 =>
+ (case ((creg_name_matches_prefix s1703_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1704_0)) =>
+ (case ((string_drop s1703_0 s1704_0)) of
+ s1705_0 =>
+ (case ((sep_matches_prefix s1705_0)) of
+ SOME ((() , s1706_0)) =>
+ (case ((string_drop s1705_0 s1706_0)) of
+ s1707_0 =>
+ (case ((creg_name_matches_prefix s1707_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s1708_0)) =>
+ (case ((string_drop s1707_0 s1708_0)) of
+ s1709_0 =>
+ (case ((sep_matches_prefix s1709_0)) of
+ SOME ((() , s1710_0)) =>
+ (case ((string_drop s1709_0 s1710_0)) of
+ s1711_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1188_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1711_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__808, s1189_0)) =>
- if (((((subrange_vec_dec v__808 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1456, s1712_0)) =>
+ if (((((subrange_vec_dec v__1456 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__808 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1456 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__808 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1188_0 s1189_0) in
+ ((subrange_vec_dec v__1456 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1711_0 s1712_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -26017,45 +42857,45 @@ val _ = Define `
else NONE))`;
-(*val _s1159_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s1682_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s1159_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1160_0=
- (let s1161_0 = s1160_0 in
- if ((string_startswith s1161_0 "c.lw")) then
- (case ((string_drop s1161_0 ((string_length "c.lw")))) of
- s1162_0 =>
- (case ((spc_matches_prefix0 s1162_0)) of
- SOME ((() , s1163_0)) =>
- (case ((string_drop s1162_0 s1163_0)) of
- s1164_0 =>
- (case ((creg_name_matches_prefix s1164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1165_0)) =>
- (case ((string_drop s1164_0 s1165_0)) of
- s1166_0 =>
- (case ((sep_matches_prefix s1166_0)) of
- SOME ((() , s1167_0)) =>
- (case ((string_drop s1166_0 s1167_0)) of
- s1168_0 =>
- (case ((creg_name_matches_prefix s1168_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s1169_0)) =>
- (case ((string_drop s1168_0 s1169_0)) of
- s1170_0 =>
- (case ((sep_matches_prefix s1170_0)) of
- SOME ((() , s1171_0)) =>
- (case ((string_drop s1170_0 s1171_0)) of
- s1172_0 =>
+ ((s1682_:string ->((3)words$word#(3)words$word#(5)words$word)option) s1683_0=
+ (let s1684_0 = s1683_0 in
+ if ((string_startswith s1684_0 "c.lw")) then
+ (case ((string_drop s1684_0 ((string_length "c.lw")))) of
+ s1685_0 =>
+ (case ((spc_matches_prefix0 s1685_0)) of
+ SOME ((() , s1686_0)) =>
+ (case ((string_drop s1685_0 s1686_0)) of
+ s1687_0 =>
+ (case ((creg_name_matches_prefix s1687_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1688_0)) =>
+ (case ((string_drop s1687_0 s1688_0)) of
+ s1689_0 =>
+ (case ((sep_matches_prefix s1689_0)) of
+ SOME ((() , s1690_0)) =>
+ (case ((string_drop s1689_0 s1690_0)) of
+ s1691_0 =>
+ (case ((creg_name_matches_prefix s1691_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s1692_0)) =>
+ (case ((string_drop s1691_0 s1692_0)) of
+ s1693_0 =>
+ (case ((sep_matches_prefix s1693_0)) of
+ SOME ((() , s1694_0)) =>
+ (case ((string_drop s1693_0 s1694_0)) of
+ s1695_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1172_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1695_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__810, s1173_0)) =>
- if (((((subrange_vec_dec v__810 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1458, s1696_0)) =>
+ if (((((subrange_vec_dec v__1458 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__810 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1458 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__810 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s1172_0 s1173_0) in
+ ((subrange_vec_dec v__1458 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s1695_0 s1696_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -26078,36 +42918,36 @@ val _ = Define `
else NONE))`;
-(*val _s1147_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s1670_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s1147_:string ->((3)words$word#(8)words$word)option) s1148_0=
- (let s1149_0 = s1148_0 in
- if ((string_startswith s1149_0 "c.addi4spn")) then
- (case ((string_drop s1149_0 ((string_length "c.addi4spn")))) of
- s1150_0 =>
- (case ((spc_matches_prefix0 s1150_0)) of
- SOME ((() , s1151_0)) =>
- (case ((string_drop s1150_0 s1151_0)) of
- s1152_0 =>
- (case ((creg_name_matches_prefix s1152_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s1153_0)) =>
- (case ((string_drop s1152_0 s1153_0)) of
- s1154_0 =>
- (case ((sep_matches_prefix s1154_0)) of
- SOME ((() , s1155_0)) =>
- (case ((string_drop s1154_0 s1155_0)) of
- s1156_0 =>
+ ((s1670_:string ->((3)words$word#(8)words$word)option) s1671_0=
+ (let s1672_0 = s1671_0 in
+ if ((string_startswith s1672_0 "c.addi4spn")) then
+ (case ((string_drop s1672_0 ((string_length "c.addi4spn")))) of
+ s1673_0 =>
+ (case ((spc_matches_prefix0 s1673_0)) of
+ SOME ((() , s1674_0)) =>
+ (case ((string_drop s1673_0 s1674_0)) of
+ s1675_0 =>
+ (case ((creg_name_matches_prefix s1675_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s1676_0)) =>
+ (case ((string_drop s1675_0 s1676_0)) of
+ s1677_0 =>
+ (case ((sep_matches_prefix s1677_0)) of
+ SOME ((() , s1678_0)) =>
+ (case ((string_drop s1677_0 s1678_0)) of
+ s1679_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1156_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__812, s1157_0)) =>
- if (((((subrange_vec_dec v__812 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1679_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1460, s1680_0)) =>
+ if (((((subrange_vec_dec v__1460 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__812 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1460 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__812 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- let p0_ = (string_drop s1156_0 s1157_0) in
+ ((subrange_vec_dec v__1460 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ let p0_ = (string_drop s1679_0 s1680_0) in
if (((p0_ = ""))) then SOME (rdc, nzimm) else NONE else NONE
| _ => NONE
)
@@ -26124,57 +42964,63 @@ val _ = Define `
else NONE))`;
-(*val _s1123_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1644_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1123_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1124_0=
- ((case s1124_0 of
- s1125_0 =>
- (case ((amo_mnemonic_matches_prefix s1125_0)) of
- SOME ((op, s1126_0)) =>
- let s1127_0 = (string_drop s1125_0 s1126_0) in
- if ((string_startswith s1127_0 ".")) then
- (case ((string_drop s1127_0 ((string_length ".")))) of
- s1128_0 =>
- (case ((size_mnemonic_matches_prefix s1128_0)) of
- SOME ((width, s1129_0)) =>
- (case ((string_drop s1128_0 s1129_0)) of
- s1130_0 =>
- (case ((maybe_aq_matches_prefix s1130_0)) of
- SOME ((aq, s1131_0)) =>
- (case ((string_drop s1130_0 s1131_0)) of
- s1132_0 =>
- (case ((maybe_rl_matches_prefix s1132_0)) of
- SOME ((rl, s1133_0)) =>
- (case ((string_drop s1132_0 s1133_0)) of
- s1134_0 =>
- (case ((spc_matches_prefix0 s1134_0)) of
- SOME ((() , s1135_0)) =>
- (case ((string_drop s1134_0 s1135_0)) of
- s1136_0 =>
- (case ((reg_name_matches_prefix s1136_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1137_0)) =>
- (case ((string_drop s1136_0 s1137_0)) of
- s1138_0 =>
- (case ((sep_matches_prefix s1138_0)) of
- SOME ((() , s1139_0)) =>
- (case ((string_drop s1138_0 s1139_0)) of
- s1140_0 =>
- (case ((reg_name_matches_prefix s1140_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1141_0)) =>
- (case ((string_drop s1140_0 s1141_0)) of
- s1142_0 =>
- (case ((sep_matches_prefix s1142_0)) of
- SOME ((() , s1143_0)) =>
- (case ((string_drop s1142_0 s1143_0)) of
- s1144_0 =>
- (case ((reg_name_matches_prefix s1144_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1145_0)) =>
- let p0_ = (string_drop s1144_0 s1145_0) in
- if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs1, rs2) else NONE
- | _ => NONE
- )
- )
+ ((s1644_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1645_0=
+ ((case s1645_0 of
+ s1646_0 =>
+ (case ((amo_mnemonic_matches_prefix s1646_0)) of
+ SOME ((op, s1647_0)) =>
+ let s1648_0 = (string_drop s1646_0 s1647_0) in
+ if ((string_startswith s1648_0 ".")) then
+ (case ((string_drop s1648_0 ((string_length ".")))) of
+ s1649_0 =>
+ (case ((size_mnemonic_matches_prefix s1649_0)) of
+ SOME ((width, s1650_0)) =>
+ (case ((string_drop s1649_0 s1650_0)) of
+ s1651_0 =>
+ (case ((maybe_aq_matches_prefix s1651_0)) of
+ SOME ((aq, s1652_0)) =>
+ (case ((string_drop s1651_0 s1652_0)) of
+ s1653_0 =>
+ (case ((maybe_rl_matches_prefix s1653_0)) of
+ SOME ((rl, s1654_0)) =>
+ (case ((string_drop s1653_0 s1654_0)) of
+ s1655_0 =>
+ (case ((spc_matches_prefix0 s1655_0)) of
+ SOME ((() , s1656_0)) =>
+ (case ((string_drop s1655_0 s1656_0)) of
+ s1657_0 =>
+ (case ((reg_name_matches_prefix s1657_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1658_0)) =>
+ (case ((string_drop s1657_0 s1658_0)) of
+ s1659_0 =>
+ (case ((sep_matches_prefix s1659_0)) of
+ SOME ((() , s1660_0)) =>
+ (case ((string_drop s1659_0 s1660_0)) of
+ s1661_0 =>
+ (case ((reg_name_matches_prefix s1661_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1662_0)) =>
+ (case ((string_drop s1661_0 s1662_0)) of
+ s1663_0 =>
+ (case ((sep_matches_prefix s1663_0)) of
+ SOME ((() , s1664_0)) =>
+ let s1665_0 = (string_drop s1663_0 s1664_0) in
+ if ((string_startswith s1665_0 "(")) then
+ (case ((string_drop s1665_0 ((string_length "(")))) of
+ s1666_0 =>
+ (case ((reg_name_matches_prefix s1666_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1667_0)) =>
+ let s1668_0 = (string_drop s1666_0 s1667_0) in
+ if ((string_startswith s1668_0 ")")) then
+ let p0_ = (string_drop s1668_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs2, rs1) else
+ NONE else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -26204,49 +43050,49 @@ val _ = Define `
)))`;
-(*val _s1101_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1101_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1102_0=
- (let s1103_0 = s1102_0 in
- if ((string_startswith s1103_0 "sc.")) then
- (case ((string_drop s1103_0 ((string_length "sc.")))) of
- s1104_0 =>
- (case ((size_mnemonic_matches_prefix s1104_0)) of
- SOME ((size1, s1105_0)) =>
- (case ((string_drop s1104_0 s1105_0)) of
- s1106_0 =>
- (case ((maybe_aq_matches_prefix s1106_0)) of
- SOME ((aq, s1107_0)) =>
- (case ((string_drop s1106_0 s1107_0)) of
- s1108_0 =>
- (case ((maybe_rl_matches_prefix s1108_0)) of
- SOME ((rl, s1109_0)) =>
- (case ((string_drop s1108_0 s1109_0)) of
- s1110_0 =>
- (case ((spc_matches_prefix0 s1110_0)) of
- SOME ((() , s1111_0)) =>
- (case ((string_drop s1110_0 s1111_0)) of
- s1112_0 =>
- (case ((reg_name_matches_prefix s1112_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1113_0)) =>
- (case ((string_drop s1112_0 s1113_0)) of
- s1114_0 =>
- (case ((sep_matches_prefix s1114_0)) of
- SOME ((() , s1115_0)) =>
- (case ((string_drop s1114_0 s1115_0)) of
- s1116_0 =>
- (case ((reg_name_matches_prefix s1116_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1117_0)) =>
- (case ((string_drop s1116_0 s1117_0)) of
- s1118_0 =>
- (case ((sep_matches_prefix s1118_0)) of
- SOME ((() , s1119_0)) =>
- (case ((string_drop s1118_0 s1119_0)) of
- s1120_0 =>
- (case ((reg_name_matches_prefix s1120_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1121_0)) =>
- let p0_ = (string_drop s1120_0 s1121_0) in
+(*val _s1622_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1622_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1623_0=
+ (let s1624_0 = s1623_0 in
+ if ((string_startswith s1624_0 "sc.")) then
+ (case ((string_drop s1624_0 ((string_length "sc.")))) of
+ s1625_0 =>
+ (case ((size_mnemonic_matches_prefix s1625_0)) of
+ SOME ((size1, s1626_0)) =>
+ (case ((string_drop s1625_0 s1626_0)) of
+ s1627_0 =>
+ (case ((maybe_aq_matches_prefix s1627_0)) of
+ SOME ((aq, s1628_0)) =>
+ (case ((string_drop s1627_0 s1628_0)) of
+ s1629_0 =>
+ (case ((maybe_rl_matches_prefix s1629_0)) of
+ SOME ((rl, s1630_0)) =>
+ (case ((string_drop s1629_0 s1630_0)) of
+ s1631_0 =>
+ (case ((spc_matches_prefix0 s1631_0)) of
+ SOME ((() , s1632_0)) =>
+ (case ((string_drop s1631_0 s1632_0)) of
+ s1633_0 =>
+ (case ((reg_name_matches_prefix s1633_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1634_0)) =>
+ (case ((string_drop s1633_0 s1634_0)) of
+ s1635_0 =>
+ (case ((sep_matches_prefix s1635_0)) of
+ SOME ((() , s1636_0)) =>
+ (case ((string_drop s1635_0 s1636_0)) of
+ s1637_0 =>
+ (case ((reg_name_matches_prefix s1637_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1638_0)) =>
+ (case ((string_drop s1637_0 s1638_0)) of
+ s1639_0 =>
+ (case ((sep_matches_prefix s1639_0)) of
+ SOME ((() , s1640_0)) =>
+ (case ((string_drop s1639_0 s1640_0)) of
+ s1641_0 =>
+ (case ((reg_name_matches_prefix s1641_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1642_0)) =>
+ let p0_ = (string_drop s1641_0 s1642_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26278,41 +43124,41 @@ val _ = Define `
else NONE))`;
-(*val _s1083_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
+(*val _s1604_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1083_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1084_0=
- (let s1085_0 = s1084_0 in
- if ((string_startswith s1085_0 "lr.")) then
- (case ((string_drop s1085_0 ((string_length "lr.")))) of
- s1086_0 =>
- (case ((size_mnemonic_matches_prefix s1086_0)) of
- SOME ((size1, s1087_0)) =>
- (case ((string_drop s1086_0 s1087_0)) of
- s1088_0 =>
- (case ((maybe_aq_matches_prefix s1088_0)) of
- SOME ((aq, s1089_0)) =>
- (case ((string_drop s1088_0 s1089_0)) of
- s1090_0 =>
- (case ((maybe_rl_matches_prefix s1090_0)) of
- SOME ((rl, s1091_0)) =>
- (case ((string_drop s1090_0 s1091_0)) of
- s1092_0 =>
- (case ((spc_matches_prefix0 s1092_0)) of
- SOME ((() , s1093_0)) =>
- (case ((string_drop s1092_0 s1093_0)) of
- s1094_0 =>
- (case ((reg_name_matches_prefix s1094_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1095_0)) =>
- (case ((string_drop s1094_0 s1095_0)) of
- s1096_0 =>
- (case ((sep_matches_prefix s1096_0)) of
- SOME ((() , s1097_0)) =>
- (case ((string_drop s1096_0 s1097_0)) of
- s1098_0 =>
- (case ((reg_name_matches_prefix s1098_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1099_0)) =>
- let p0_ = (string_drop s1098_0 s1099_0) in
+ ((s1604_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1605_0=
+ (let s1606_0 = s1605_0 in
+ if ((string_startswith s1606_0 "lr.")) then
+ (case ((string_drop s1606_0 ((string_length "lr.")))) of
+ s1607_0 =>
+ (case ((size_mnemonic_matches_prefix s1607_0)) of
+ SOME ((size1, s1608_0)) =>
+ (case ((string_drop s1607_0 s1608_0)) of
+ s1609_0 =>
+ (case ((maybe_aq_matches_prefix s1609_0)) of
+ SOME ((aq, s1610_0)) =>
+ (case ((string_drop s1609_0 s1610_0)) of
+ s1611_0 =>
+ (case ((maybe_rl_matches_prefix s1611_0)) of
+ SOME ((rl, s1612_0)) =>
+ (case ((string_drop s1611_0 s1612_0)) of
+ s1613_0 =>
+ (case ((spc_matches_prefix0 s1613_0)) of
+ SOME ((() , s1614_0)) =>
+ (case ((string_drop s1613_0 s1614_0)) of
+ s1615_0 =>
+ (case ((reg_name_matches_prefix s1615_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1616_0)) =>
+ (case ((string_drop s1615_0 s1616_0)) of
+ s1617_0 =>
+ (case ((sep_matches_prefix s1617_0)) of
+ SOME ((() , s1618_0)) =>
+ (case ((string_drop s1617_0 s1618_0)) of
+ s1619_0 =>
+ (case ((reg_name_matches_prefix s1619_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1620_0)) =>
+ let p0_ = (string_drop s1619_0 s1620_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1) else NONE
| _ => NONE
)
@@ -26338,29 +43184,29 @@ val _ = Define `
else NONE))`;
-(*val _s1071_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s1592_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1071_:string ->((5)words$word#(5)words$word)option) s1072_0=
- (let s1073_0 = s1072_0 in
- if ((string_startswith s1073_0 "sfence.vma")) then
- (case ((string_drop s1073_0 ((string_length "sfence.vma")))) of
- s1074_0 =>
- (case ((spc_matches_prefix0 s1074_0)) of
- SOME ((() , s1075_0)) =>
- (case ((string_drop s1074_0 s1075_0)) of
- s1076_0 =>
- (case ((reg_name_matches_prefix s1076_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1077_0)) =>
- (case ((string_drop s1076_0 s1077_0)) of
- s1078_0 =>
- (case ((sep_matches_prefix s1078_0)) of
- SOME ((() , s1079_0)) =>
- (case ((string_drop s1078_0 s1079_0)) of
- s1080_0 =>
- (case ((reg_name_matches_prefix s1080_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1081_0)) =>
- let p0_ = (string_drop s1080_0 s1081_0) in
+ ((s1592_:string ->((5)words$word#(5)words$word)option) s1593_0=
+ (let s1594_0 = s1593_0 in
+ if ((string_startswith s1594_0 "sfence.vma")) then
+ (case ((string_drop s1594_0 ((string_length "sfence.vma")))) of
+ s1595_0 =>
+ (case ((spc_matches_prefix0 s1595_0)) of
+ SOME ((() , s1596_0)) =>
+ (case ((string_drop s1595_0 s1596_0)) of
+ s1597_0 =>
+ (case ((reg_name_matches_prefix s1597_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1598_0)) =>
+ (case ((string_drop s1597_0 s1598_0)) of
+ s1599_0 =>
+ (case ((sep_matches_prefix s1599_0)) of
+ SOME ((() , s1600_0)) =>
+ (case ((string_drop s1599_0 s1600_0)) of
+ s1601_0 =>
+ (case ((reg_name_matches_prefix s1601_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1602_0)) =>
+ let p0_ = (string_drop s1601_0 s1602_0) in
if (((p0_ = ""))) then SOME (rs1, rs2) else NONE
| _ => NONE
)
@@ -26377,29 +43223,29 @@ val _ = Define `
else NONE))`;
-(*val _s1059_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s1580_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1059_:string ->((4)words$word#(4)words$word)option) s1060_0=
- (let s1061_0 = s1060_0 in
- if ((string_startswith s1061_0 "fence.tso")) then
- (case ((string_drop s1061_0 ((string_length "fence.tso")))) of
- s1062_0 =>
- (case ((spc_matches_prefix0 s1062_0)) of
- SOME ((() , s1063_0)) =>
- (case ((string_drop s1062_0 s1063_0)) of
- s1064_0 =>
- (case ((fence_bits_matches_prefix s1064_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1065_0)) =>
- (case ((string_drop s1064_0 s1065_0)) of
- s1066_0 =>
- (case ((sep_matches_prefix s1066_0)) of
- SOME ((() , s1067_0)) =>
- (case ((string_drop s1066_0 s1067_0)) of
- s1068_0 =>
- (case ((fence_bits_matches_prefix s1068_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1069_0)) =>
- let p0_ = (string_drop s1068_0 s1069_0) in
+ ((s1580_:string ->((4)words$word#(4)words$word)option) s1581_0=
+ (let s1582_0 = s1581_0 in
+ if ((string_startswith s1582_0 "fence.tso")) then
+ (case ((string_drop s1582_0 ((string_length "fence.tso")))) of
+ s1583_0 =>
+ (case ((spc_matches_prefix0 s1583_0)) of
+ SOME ((() , s1584_0)) =>
+ (case ((string_drop s1583_0 s1584_0)) of
+ s1585_0 =>
+ (case ((fence_bits_matches_prefix s1585_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s1586_0)) =>
+ (case ((string_drop s1585_0 s1586_0)) of
+ s1587_0 =>
+ (case ((sep_matches_prefix s1587_0)) of
+ SOME ((() , s1588_0)) =>
+ (case ((string_drop s1587_0 s1588_0)) of
+ s1589_0 =>
+ (case ((fence_bits_matches_prefix s1589_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s1590_0)) =>
+ let p0_ = (string_drop s1589_0 s1590_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -26416,29 +43262,29 @@ val _ = Define `
else NONE))`;
-(*val _s1047_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s1568_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1047_:string ->((4)words$word#(4)words$word)option) s1048_0=
- (let s1049_0 = s1048_0 in
- if ((string_startswith s1049_0 "fence")) then
- (case ((string_drop s1049_0 ((string_length "fence")))) of
- s1050_0 =>
- (case ((spc_matches_prefix0 s1050_0)) of
- SOME ((() , s1051_0)) =>
- (case ((string_drop s1050_0 s1051_0)) of
- s1052_0 =>
- (case ((fence_bits_matches_prefix s1052_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1053_0)) =>
- (case ((string_drop s1052_0 s1053_0)) of
- s1054_0 =>
- (case ((sep_matches_prefix s1054_0)) of
- SOME ((() , s1055_0)) =>
- (case ((string_drop s1054_0 s1055_0)) of
- s1056_0 =>
- (case ((fence_bits_matches_prefix s1056_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1057_0)) =>
- let p0_ = (string_drop s1056_0 s1057_0) in
+ ((s1568_:string ->((4)words$word#(4)words$word)option) s1569_0=
+ (let s1570_0 = s1569_0 in
+ if ((string_startswith s1570_0 "fence")) then
+ (case ((string_drop s1570_0 ((string_length "fence")))) of
+ s1571_0 =>
+ (case ((spc_matches_prefix0 s1571_0)) of
+ SOME ((() , s1572_0)) =>
+ (case ((string_drop s1571_0 s1572_0)) of
+ s1573_0 =>
+ (case ((fence_bits_matches_prefix s1573_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s1574_0)) =>
+ (case ((string_drop s1573_0 s1574_0)) of
+ s1575_0 =>
+ (case ((sep_matches_prefix s1575_0)) of
+ SOME ((() , s1576_0)) =>
+ (case ((string_drop s1575_0 s1576_0)) of
+ s1577_0 =>
+ (case ((fence_bits_matches_prefix s1577_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s1578_0)) =>
+ let p0_ = (string_drop s1577_0 s1578_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -26455,41 +43301,41 @@ val _ = Define `
else NONE))`;
-(*val _s1030_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1551_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1030_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1031_0=
- ((case s1031_0 of
- s1032_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s1032_0)) of
- SOME ((op, s1033_0)) =>
- (case ((string_drop s1032_0 s1033_0)) of
- s1034_0 =>
- (case ((spc_matches_prefix0 s1034_0)) of
- SOME ((() , s1035_0)) =>
- (case ((string_drop s1034_0 s1035_0)) of
- s1036_0 =>
- (case ((reg_name_matches_prefix s1036_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1037_0)) =>
- (case ((string_drop s1036_0 s1037_0)) of
- s1038_0 =>
- (case ((sep_matches_prefix s1038_0)) of
- SOME ((() , s1039_0)) =>
- (case ((string_drop s1038_0 s1039_0)) of
- s1040_0 =>
- (case ((reg_name_matches_prefix s1040_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1041_0)) =>
- (case ((string_drop s1040_0 s1041_0)) of
- s1042_0 =>
- (case ((sep_matches_prefix s1042_0)) of
- SOME ((() , s1043_0)) =>
- (case ((string_drop s1042_0 s1043_0)) of
- s1044_0 =>
+ ((s1551_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1552_0=
+ ((case s1552_0 of
+ s1553_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s1553_0)) of
+ SOME ((op, s1554_0)) =>
+ (case ((string_drop s1553_0 s1554_0)) of
+ s1555_0 =>
+ (case ((spc_matches_prefix0 s1555_0)) of
+ SOME ((() , s1556_0)) =>
+ (case ((string_drop s1555_0 s1556_0)) of
+ s1557_0 =>
+ (case ((reg_name_matches_prefix s1557_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1558_0)) =>
+ (case ((string_drop s1557_0 s1558_0)) of
+ s1559_0 =>
+ (case ((sep_matches_prefix s1559_0)) of
+ SOME ((() , s1560_0)) =>
+ (case ((string_drop s1559_0 s1560_0)) of
+ s1561_0 =>
+ (case ((reg_name_matches_prefix s1561_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1562_0)) =>
+ (case ((string_drop s1561_0 s1562_0)) of
+ s1563_0 =>
+ (case ((sep_matches_prefix s1563_0)) of
+ SOME ((() , s1564_0)) =>
+ (case ((string_drop s1563_0 s1564_0)) of
+ s1565_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1044_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1045_0)) =>
- let p0_ = (string_drop s1044_0 s1045_0) in
+ s1565_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s1566_0)) =>
+ let p0_ = (string_drop s1565_0 s1566_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26514,39 +43360,39 @@ val _ = Define `
)))`;
-(*val _s1013_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1013_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1014_0=
- ((case s1014_0 of
- s1015_0 =>
- (case ((rtypew_mnemonic_matches_prefix s1015_0)) of
- SOME ((op, s1016_0)) =>
- (case ((string_drop s1015_0 s1016_0)) of
- s1017_0 =>
- (case ((spc_matches_prefix0 s1017_0)) of
- SOME ((() , s1018_0)) =>
- (case ((string_drop s1017_0 s1018_0)) of
- s1019_0 =>
- (case ((reg_name_matches_prefix s1019_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1020_0)) =>
- (case ((string_drop s1019_0 s1020_0)) of
- s1021_0 =>
- (case ((sep_matches_prefix s1021_0)) of
- SOME ((() , s1022_0)) =>
- (case ((string_drop s1021_0 s1022_0)) of
- s1023_0 =>
- (case ((reg_name_matches_prefix s1023_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1024_0)) =>
- (case ((string_drop s1023_0 s1024_0)) of
- s1025_0 =>
- (case ((sep_matches_prefix s1025_0)) of
- SOME ((() , s1026_0)) =>
- (case ((string_drop s1025_0 s1026_0)) of
- s1027_0 =>
- (case ((reg_name_matches_prefix s1027_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1028_0)) =>
- let p0_ = (string_drop s1027_0 s1028_0) in
+(*val _s1534_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1534_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1535_0=
+ ((case s1535_0 of
+ s1536_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s1536_0)) of
+ SOME ((op, s1537_0)) =>
+ (case ((string_drop s1536_0 s1537_0)) of
+ s1538_0 =>
+ (case ((spc_matches_prefix0 s1538_0)) of
+ SOME ((() , s1539_0)) =>
+ (case ((string_drop s1538_0 s1539_0)) of
+ s1540_0 =>
+ (case ((reg_name_matches_prefix s1540_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1541_0)) =>
+ (case ((string_drop s1540_0 s1541_0)) of
+ s1542_0 =>
+ (case ((sep_matches_prefix s1542_0)) of
+ SOME ((() , s1543_0)) =>
+ (case ((string_drop s1542_0 s1543_0)) of
+ s1544_0 =>
+ (case ((reg_name_matches_prefix s1544_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1545_0)) =>
+ (case ((string_drop s1544_0 s1545_0)) of
+ s1546_0 =>
+ (case ((sep_matches_prefix s1546_0)) of
+ SOME ((() , s1547_0)) =>
+ (case ((string_drop s1546_0 s1547_0)) of
+ s1548_0 =>
+ (case ((reg_name_matches_prefix s1548_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1549_0)) =>
+ let p0_ = (string_drop s1548_0 s1549_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26571,41 +43417,41 @@ val _ = Define `
)))`;
-(*val _s996_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s996_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s997_0=
- ((case s997_0 of
- s998_0 =>
- (case ((shiftw_mnemonic_matches_prefix s998_0)) of
- SOME ((op, s999_0)) =>
- (case ((string_drop s998_0 s999_0)) of
- s1000_0 =>
- (case ((spc_matches_prefix0 s1000_0)) of
- SOME ((() , s1001_0)) =>
- (case ((string_drop s1000_0 s1001_0)) of
- s1002_0 =>
- (case ((reg_name_matches_prefix s1002_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1003_0)) =>
- (case ((string_drop s1002_0 s1003_0)) of
- s1004_0 =>
- (case ((sep_matches_prefix s1004_0)) of
- SOME ((() , s1005_0)) =>
- (case ((string_drop s1004_0 s1005_0)) of
- s1006_0 =>
- (case ((reg_name_matches_prefix s1006_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1007_0)) =>
- (case ((string_drop s1006_0 s1007_0)) of
- s1008_0 =>
- (case ((sep_matches_prefix s1008_0)) of
- SOME ((() , s1009_0)) =>
- (case ((string_drop s1008_0 s1009_0)) of
- s1010_0 =>
+(*val _s1517_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s1517_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s1518_0=
+ ((case s1518_0 of
+ s1519_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s1519_0)) of
+ SOME ((op, s1520_0)) =>
+ (case ((string_drop s1519_0 s1520_0)) of
+ s1521_0 =>
+ (case ((spc_matches_prefix0 s1521_0)) of
+ SOME ((() , s1522_0)) =>
+ (case ((string_drop s1521_0 s1522_0)) of
+ s1523_0 =>
+ (case ((reg_name_matches_prefix s1523_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1524_0)) =>
+ (case ((string_drop s1523_0 s1524_0)) of
+ s1525_0 =>
+ (case ((sep_matches_prefix s1525_0)) of
+ SOME ((() , s1526_0)) =>
+ (case ((string_drop s1525_0 s1526_0)) of
+ s1527_0 =>
+ (case ((reg_name_matches_prefix s1527_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1528_0)) =>
+ (case ((string_drop s1527_0 s1528_0)) of
+ s1529_0 =>
+ (case ((sep_matches_prefix s1529_0)) of
+ SOME ((() , s1530_0)) =>
+ (case ((string_drop s1529_0 s1530_0)) of
+ s1531_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1010_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1011_0)) =>
- let p0_ = (string_drop s1010_0 s1011_0) in
+ s1531_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s1532_0)) =>
+ let p0_ = (string_drop s1531_0 s1532_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26630,39 +43476,38 @@ val _ = Define `
)))`;
-(*val _s980_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+(*val _s1501_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
val _ = Define `
- ((s980_:string ->((5)words$word#(5)words$word#(12)words$word)option) s981_0=
- (let s982_0 = s981_0 in
- if ((string_startswith s982_0 "addiw")) then
- (case ((string_drop s982_0 ((string_length "addiw")))) of
- s983_0 =>
- (case ((spc_matches_prefix0 s983_0)) of
- SOME ((() , s984_0)) =>
- (case ((string_drop s983_0 s984_0)) of
- s985_0 =>
- (case ((reg_name_matches_prefix s985_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s986_0)) =>
- (case ((string_drop s985_0 s986_0)) of
- s987_0 =>
- (case ((sep_matches_prefix s987_0)) of
- SOME ((() , s988_0)) =>
- (case ((string_drop s987_0 s988_0)) of
- s989_0 =>
- (case ((reg_name_matches_prefix s989_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s990_0)) =>
- (case ((string_drop s989_0 s990_0)) of
- s991_0 =>
- (case ((sep_matches_prefix s991_0)) of
- SOME ((() , s992_0)) =>
- (case ((string_drop s991_0 s992_0)) of
- s993_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s993_0
+ ((s1501_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1502_0=
+ (let s1503_0 = s1502_0 in
+ if ((string_startswith s1503_0 "addiw")) then
+ (case ((string_drop s1503_0 ((string_length "addiw")))) of
+ s1504_0 =>
+ (case ((spc_matches_prefix0 s1504_0)) of
+ SOME ((() , s1505_0)) =>
+ (case ((string_drop s1504_0 s1505_0)) of
+ s1506_0 =>
+ (case ((reg_name_matches_prefix s1506_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1507_0)) =>
+ (case ((string_drop s1506_0 s1507_0)) of
+ s1508_0 =>
+ (case ((sep_matches_prefix s1508_0)) of
+ SOME ((() , s1509_0)) =>
+ (case ((string_drop s1508_0 s1509_0)) of
+ s1510_0 =>
+ (case ((reg_name_matches_prefix s1510_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1511_0)) =>
+ (case ((string_drop s1510_0 s1511_0)) of
+ s1512_0 =>
+ (case ((sep_matches_prefix s1512_0)) of
+ SOME ((() , s1513_0)) =>
+ (case ((string_drop s1512_0 s1513_0)) of
+ s1514_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1514_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s994_0)) =>
- let p0_ = (string_drop s993_0 s994_0) in
+ SOME ((imm, s1515_0)) =>
+ let p0_ = (string_drop s1514_0 s1515_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -26685,63 +43530,62 @@ val _ = Define `
else NONE))`;
-(*val _s952_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s1473_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s952_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s953_0=
- (let s954_0 = s953_0 in
- if ((string_startswith s954_0 "s")) then
- (case ((string_drop s954_0 ((string_length "s")))) of
- s955_0 =>
- (case ((size_mnemonic_matches_prefix s955_0)) of
- SOME ((size1, s956_0)) =>
- (case ((string_drop s955_0 s956_0)) of
- s957_0 =>
- (case ((maybe_aq_matches_prefix s957_0)) of
- SOME ((aq, s958_0)) =>
- (case ((string_drop s957_0 s958_0)) of
- s959_0 =>
- (case ((maybe_rl_matches_prefix s959_0)) of
- SOME ((rl, s960_0)) =>
- (case ((string_drop s959_0 s960_0)) of
- s961_0 =>
- (case ((spc_matches_prefix0 s961_0)) of
- SOME ((() , s962_0)) =>
- (case ((string_drop s961_0 s962_0)) of
- s963_0 =>
- (case ((reg_name_matches_prefix s963_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s964_0)) =>
- (case ((string_drop s963_0 s964_0)) of
- s965_0 =>
- (case ((sep_matches_prefix s965_0)) of
- SOME ((() , s966_0)) =>
- (case ((string_drop s965_0 s966_0)) of
- s967_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s967_0
+ ((s1473_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1474_0=
+ (let s1475_0 = s1474_0 in
+ if ((string_startswith s1475_0 "s")) then
+ (case ((string_drop s1475_0 ((string_length "s")))) of
+ s1476_0 =>
+ (case ((size_mnemonic_matches_prefix s1476_0)) of
+ SOME ((size1, s1477_0)) =>
+ (case ((string_drop s1476_0 s1477_0)) of
+ s1478_0 =>
+ (case ((maybe_aq_matches_prefix s1478_0)) of
+ SOME ((aq, s1479_0)) =>
+ (case ((string_drop s1478_0 s1479_0)) of
+ s1480_0 =>
+ (case ((maybe_rl_matches_prefix s1480_0)) of
+ SOME ((rl, s1481_0)) =>
+ (case ((string_drop s1480_0 s1481_0)) of
+ s1482_0 =>
+ (case ((spc_matches_prefix0 s1482_0)) of
+ SOME ((() , s1483_0)) =>
+ (case ((string_drop s1482_0 s1483_0)) of
+ s1484_0 =>
+ (case ((reg_name_matches_prefix s1484_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1485_0)) =>
+ (case ((string_drop s1484_0 s1485_0)) of
+ s1486_0 =>
+ (case ((sep_matches_prefix s1486_0)) of
+ SOME ((() , s1487_0)) =>
+ (case ((string_drop s1486_0 s1487_0)) of
+ s1488_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1488_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s968_0)) =>
- (case ((string_drop s967_0 s968_0)) of
- s969_0 =>
- (case ((opt_spc_matches_prefix0 s969_0)) of
- SOME ((() , s970_0)) =>
- let s971_0 = (string_drop s969_0 s970_0) in
- if ((string_startswith s971_0 "(")) then
- (case ((string_drop s971_0 ((string_length "(")))) of
- s972_0 =>
- (case ((opt_spc_matches_prefix0 s972_0)) of
- SOME ((() , s973_0)) =>
- (case ((string_drop s972_0 s973_0)) of
- s974_0 =>
- (case ((reg_name_matches_prefix s974_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s975_0)) =>
- (case ((string_drop s974_0 s975_0)) of
- s976_0 =>
- (case ((opt_spc_matches_prefix0 s976_0)) of
- SOME ((() , s977_0)) =>
- let s978_0 = (string_drop s976_0 s977_0) in
- if ((string_startswith s978_0 ")")) then
- let p0_ = (string_drop s978_0 ((string_length ")"))) in
+ SOME ((imm, s1489_0)) =>
+ (case ((string_drop s1488_0 s1489_0)) of
+ s1490_0 =>
+ (case ((opt_spc_matches_prefix0 s1490_0)) of
+ SOME ((() , s1491_0)) =>
+ let s1492_0 = (string_drop s1490_0 s1491_0) in
+ if ((string_startswith s1492_0 "(")) then
+ (case ((string_drop s1492_0 ((string_length "(")))) of
+ s1493_0 =>
+ (case ((opt_spc_matches_prefix0 s1493_0)) of
+ SOME ((() , s1494_0)) =>
+ (case ((string_drop s1493_0 s1494_0)) of
+ s1495_0 =>
+ (case ((reg_name_matches_prefix s1495_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1496_0)) =>
+ (case ((string_drop s1495_0 s1496_0)) of
+ s1497_0 =>
+ (case ((opt_spc_matches_prefix0 s1497_0)) of
+ SOME ((() , s1498_0)) =>
+ let s1499_0 = (string_drop s1497_0 s1498_0) in
+ if ((string_startswith s1499_0 ")")) then
+ let p0_ = (string_drop s1499_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rs2, imm, rs1) else NONE
else NONE
| _ => NONE
@@ -26780,67 +43624,66 @@ val _ = Define `
else NONE))`;
-(*val _s922_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s1443_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s922_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s923_0=
- (let s924_0 = s923_0 in
- if ((string_startswith s924_0 "l")) then
- (case ((string_drop s924_0 ((string_length "l")))) of
- s925_0 =>
- (case ((size_mnemonic_matches_prefix s925_0)) of
- SOME ((size1, s926_0)) =>
- (case ((string_drop s925_0 s926_0)) of
- s927_0 =>
- (case ((maybe_u_matches_prefix s927_0)) of
- SOME ((is_unsigned, s928_0)) =>
- (case ((string_drop s927_0 s928_0)) of
- s929_0 =>
- (case ((maybe_aq_matches_prefix s929_0)) of
- SOME ((aq, s930_0)) =>
- (case ((string_drop s929_0 s930_0)) of
- s931_0 =>
- (case ((maybe_rl_matches_prefix s931_0)) of
- SOME ((rl, s932_0)) =>
- (case ((string_drop s931_0 s932_0)) of
- s933_0 =>
- (case ((spc_matches_prefix0 s933_0)) of
- SOME ((() , s934_0)) =>
- (case ((string_drop s933_0 s934_0)) of
- s935_0 =>
- (case ((reg_name_matches_prefix s935_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s936_0)) =>
- (case ((string_drop s935_0 s936_0)) of
- s937_0 =>
- (case ((sep_matches_prefix s937_0)) of
- SOME ((() , s938_0)) =>
- (case ((string_drop s937_0 s938_0)) of
- s939_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s939_0
+ ((s1443_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1444_0=
+ (let s1445_0 = s1444_0 in
+ if ((string_startswith s1445_0 "l")) then
+ (case ((string_drop s1445_0 ((string_length "l")))) of
+ s1446_0 =>
+ (case ((size_mnemonic_matches_prefix s1446_0)) of
+ SOME ((size1, s1447_0)) =>
+ (case ((string_drop s1446_0 s1447_0)) of
+ s1448_0 =>
+ (case ((maybe_u_matches_prefix s1448_0)) of
+ SOME ((is_unsigned, s1449_0)) =>
+ (case ((string_drop s1448_0 s1449_0)) of
+ s1450_0 =>
+ (case ((maybe_aq_matches_prefix s1450_0)) of
+ SOME ((aq, s1451_0)) =>
+ (case ((string_drop s1450_0 s1451_0)) of
+ s1452_0 =>
+ (case ((maybe_rl_matches_prefix s1452_0)) of
+ SOME ((rl, s1453_0)) =>
+ (case ((string_drop s1452_0 s1453_0)) of
+ s1454_0 =>
+ (case ((spc_matches_prefix0 s1454_0)) of
+ SOME ((() , s1455_0)) =>
+ (case ((string_drop s1454_0 s1455_0)) of
+ s1456_0 =>
+ (case ((reg_name_matches_prefix s1456_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1457_0)) =>
+ (case ((string_drop s1456_0 s1457_0)) of
+ s1458_0 =>
+ (case ((sep_matches_prefix s1458_0)) of
+ SOME ((() , s1459_0)) =>
+ (case ((string_drop s1458_0 s1459_0)) of
+ s1460_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1460_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s940_0)) =>
- (case ((string_drop s939_0 s940_0)) of
- s941_0 =>
- (case ((opt_spc_matches_prefix0 s941_0)) of
- SOME ((() , s942_0)) =>
- let s943_0 = (string_drop s941_0 s942_0) in
- if ((string_startswith s943_0 "(")) then
- (case ((string_drop s943_0 ((string_length "(")))) of
- s944_0 =>
- (case ((opt_spc_matches_prefix0 s944_0)) of
- SOME ((() , s945_0)) =>
- (case ((string_drop s944_0 s945_0)) of
- s946_0 =>
- (case ((reg_name_matches_prefix s946_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s947_0)) =>
- (case ((string_drop s946_0 s947_0)) of
- s948_0 =>
- (case ((opt_spc_matches_prefix0 s948_0)) of
- SOME ((() , s949_0)) =>
- let s950_0 = (string_drop s948_0 s949_0) in
- if ((string_startswith s950_0 ")")) then
- let p0_ = (string_drop s950_0 ((string_length ")"))) in
+ SOME ((imm, s1461_0)) =>
+ (case ((string_drop s1460_0 s1461_0)) of
+ s1462_0 =>
+ (case ((opt_spc_matches_prefix0 s1462_0)) of
+ SOME ((() , s1463_0)) =>
+ let s1464_0 = (string_drop s1462_0 s1463_0) in
+ if ((string_startswith s1464_0 "(")) then
+ (case ((string_drop s1464_0 ((string_length "(")))) of
+ s1465_0 =>
+ (case ((opt_spc_matches_prefix0 s1465_0)) of
+ SOME ((() , s1466_0)) =>
+ (case ((string_drop s1465_0 s1466_0)) of
+ s1467_0 =>
+ (case ((reg_name_matches_prefix s1467_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1468_0)) =>
+ (case ((string_drop s1467_0 s1468_0)) of
+ s1469_0 =>
+ (case ((opt_spc_matches_prefix0 s1469_0)) of
+ SOME ((() , s1470_0)) =>
+ let s1471_0 = (string_drop s1469_0 s1470_0) in
+ if ((string_startswith s1471_0 ")")) then
+ let p0_ = (string_drop s1471_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, is_unsigned, aq, rl, rd, imm, rs1)
else NONE else NONE
| _ => NONE
@@ -26882,39 +43725,39 @@ val _ = Define `
else NONE))`;
-(*val _s905_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s1426_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s905_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s906_0=
- ((case s906_0 of
- s907_0 =>
- (case ((rtype_mnemonic_matches_prefix s907_0)) of
- SOME ((op, s908_0)) =>
- (case ((string_drop s907_0 s908_0)) of
- s909_0 =>
- (case ((spc_matches_prefix0 s909_0)) of
- SOME ((() , s910_0)) =>
- (case ((string_drop s909_0 s910_0)) of
- s911_0 =>
- (case ((reg_name_matches_prefix s911_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s912_0)) =>
- (case ((string_drop s911_0 s912_0)) of
- s913_0 =>
- (case ((sep_matches_prefix s913_0)) of
- SOME ((() , s914_0)) =>
- (case ((string_drop s913_0 s914_0)) of
- s915_0 =>
- (case ((reg_name_matches_prefix s915_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s916_0)) =>
- (case ((string_drop s915_0 s916_0)) of
- s917_0 =>
- (case ((sep_matches_prefix s917_0)) of
- SOME ((() , s918_0)) =>
- (case ((string_drop s917_0 s918_0)) of
- s919_0 =>
- (case ((reg_name_matches_prefix s919_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s920_0)) =>
- let p0_ = (string_drop s919_0 s920_0) in
+ ((s1426_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s1427_0=
+ ((case s1427_0 of
+ s1428_0 =>
+ (case ((rtype_mnemonic_matches_prefix s1428_0)) of
+ SOME ((op, s1429_0)) =>
+ (case ((string_drop s1428_0 s1429_0)) of
+ s1430_0 =>
+ (case ((spc_matches_prefix0 s1430_0)) of
+ SOME ((() , s1431_0)) =>
+ (case ((string_drop s1430_0 s1431_0)) of
+ s1432_0 =>
+ (case ((reg_name_matches_prefix s1432_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1433_0)) =>
+ (case ((string_drop s1432_0 s1433_0)) of
+ s1434_0 =>
+ (case ((sep_matches_prefix s1434_0)) of
+ SOME ((() , s1435_0)) =>
+ (case ((string_drop s1434_0 s1435_0)) of
+ s1436_0 =>
+ (case ((reg_name_matches_prefix s1436_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1437_0)) =>
+ (case ((string_drop s1436_0 s1437_0)) of
+ s1438_0 =>
+ (case ((sep_matches_prefix s1438_0)) of
+ SOME ((() , s1439_0)) =>
+ (case ((string_drop s1438_0 s1439_0)) of
+ s1440_0 =>
+ (case ((reg_name_matches_prefix s1440_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1441_0)) =>
+ let p0_ = (string_drop s1440_0 s1441_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -26939,41 +43782,41 @@ val _ = Define `
)))`;
-(*val _s888_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
-
-val _ = Define `
- ((s888_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s889_0=
- ((case s889_0 of
- s890_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s890_0)) of
- SOME ((op, s891_0)) =>
- (case ((string_drop s890_0 s891_0)) of
- s892_0 =>
- (case ((spc_matches_prefix0 s892_0)) of
- SOME ((() , s893_0)) =>
- (case ((string_drop s892_0 s893_0)) of
- s894_0 =>
- (case ((reg_name_matches_prefix s894_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s895_0)) =>
- (case ((string_drop s894_0 s895_0)) of
- s896_0 =>
- (case ((sep_matches_prefix s896_0)) of
- SOME ((() , s897_0)) =>
- (case ((string_drop s896_0 s897_0)) of
- s898_0 =>
- (case ((reg_name_matches_prefix s898_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s899_0)) =>
- (case ((string_drop s898_0 s899_0)) of
- s900_0 =>
- (case ((sep_matches_prefix s900_0)) of
- SOME ((() , s901_0)) =>
- (case ((string_drop s900_0 s901_0)) of
- s902_0 =>
+(*val _s1409_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s1409_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s1410_0=
+ ((case s1410_0 of
+ s1411_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s1411_0)) of
+ SOME ((op, s1412_0)) =>
+ (case ((string_drop s1411_0 s1412_0)) of
+ s1413_0 =>
+ (case ((spc_matches_prefix0 s1413_0)) of
+ SOME ((() , s1414_0)) =>
+ (case ((string_drop s1413_0 s1414_0)) of
+ s1415_0 =>
+ (case ((reg_name_matches_prefix s1415_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1416_0)) =>
+ (case ((string_drop s1415_0 s1416_0)) of
+ s1417_0 =>
+ (case ((sep_matches_prefix s1417_0)) of
+ SOME ((() , s1418_0)) =>
+ (case ((string_drop s1417_0 s1418_0)) of
+ s1419_0 =>
+ (case ((reg_name_matches_prefix s1419_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1420_0)) =>
+ (case ((string_drop s1419_0 s1420_0)) of
+ s1421_0 =>
+ (case ((sep_matches_prefix s1421_0)) of
+ SOME ((() , s1422_0)) =>
+ (case ((string_drop s1421_0 s1422_0)) of
+ s1423_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s902_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s903_0)) =>
- let p0_ = (string_drop s902_0 s903_0) in
+ s1423_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s1424_0)) =>
+ let p0_ = (string_drop s1423_0 s1424_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -26998,41 +43841,40 @@ val _ = Define `
)))`;
-(*val _s871_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s871_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s872_0=
- ((case s872_0 of
- s873_0 =>
- (case ((itype_mnemonic_matches_prefix s873_0)) of
- SOME ((op, s874_0)) =>
- (case ((string_drop s873_0 s874_0)) of
- s875_0 =>
- (case ((spc_matches_prefix0 s875_0)) of
- SOME ((() , s876_0)) =>
- (case ((string_drop s875_0 s876_0)) of
- s877_0 =>
- (case ((reg_name_matches_prefix s877_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s878_0)) =>
- (case ((string_drop s877_0 s878_0)) of
- s879_0 =>
- (case ((sep_matches_prefix s879_0)) of
- SOME ((() , s880_0)) =>
- (case ((string_drop s879_0 s880_0)) of
- s881_0 =>
- (case ((reg_name_matches_prefix s881_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s882_0)) =>
- (case ((string_drop s881_0 s882_0)) of
- s883_0 =>
- (case ((sep_matches_prefix s883_0)) of
- SOME ((() , s884_0)) =>
- (case ((string_drop s883_0 s884_0)) of
- s885_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s885_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s886_0)) =>
- let p0_ = (string_drop s885_0 s886_0) in
+(*val _s1392_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s1392_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s1393_0=
+ ((case s1393_0 of
+ s1394_0 =>
+ (case ((itype_mnemonic_matches_prefix s1394_0)) of
+ SOME ((op, s1395_0)) =>
+ (case ((string_drop s1394_0 s1395_0)) of
+ s1396_0 =>
+ (case ((spc_matches_prefix0 s1396_0)) of
+ SOME ((() , s1397_0)) =>
+ (case ((string_drop s1396_0 s1397_0)) of
+ s1398_0 =>
+ (case ((reg_name_matches_prefix s1398_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1399_0)) =>
+ (case ((string_drop s1398_0 s1399_0)) of
+ s1400_0 =>
+ (case ((sep_matches_prefix s1400_0)) of
+ SOME ((() , s1401_0)) =>
+ (case ((string_drop s1400_0 s1401_0)) of
+ s1402_0 =>
+ (case ((reg_name_matches_prefix s1402_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1403_0)) =>
+ (case ((string_drop s1402_0 s1403_0)) of
+ s1404_0 =>
+ (case ((sep_matches_prefix s1404_0)) of
+ SOME ((() , s1405_0)) =>
+ (case ((string_drop s1404_0 s1405_0)) of
+ s1406_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1406_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s1407_0)) =>
+ let p0_ = (string_drop s1406_0 s1407_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, imm) else NONE
| _ => NONE
)
@@ -27057,41 +43899,41 @@ val _ = Define `
)))`;
-(*val _s854_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
-
-val _ = Define `
- ((s854_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s855_0=
- ((case s855_0 of
- s856_0 =>
- (case ((btype_mnemonic_matches_prefix s856_0)) of
- SOME ((op, s857_0)) =>
- (case ((string_drop s856_0 s857_0)) of
- s858_0 =>
- (case ((spc_matches_prefix0 s858_0)) of
- SOME ((() , s859_0)) =>
- (case ((string_drop s858_0 s859_0)) of
- s860_0 =>
- (case ((reg_name_matches_prefix s860_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s861_0)) =>
- (case ((string_drop s860_0 s861_0)) of
- s862_0 =>
- (case ((sep_matches_prefix s862_0)) of
- SOME ((() , s863_0)) =>
- (case ((string_drop s862_0 s863_0)) of
- s864_0 =>
- (case ((reg_name_matches_prefix s864_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s865_0)) =>
- (case ((string_drop s864_0 s865_0)) of
- s866_0 =>
- (case ((sep_matches_prefix s866_0)) of
- SOME ((() , s867_0)) =>
- (case ((string_drop s866_0 s867_0)) of
- s868_0 =>
+(*val _s1375_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
+
+val _ = Define `
+ ((s1375_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s1376_0=
+ ((case s1376_0 of
+ s1377_0 =>
+ (case ((btype_mnemonic_matches_prefix s1377_0)) of
+ SOME ((op, s1378_0)) =>
+ (case ((string_drop s1377_0 s1378_0)) of
+ s1379_0 =>
+ (case ((spc_matches_prefix0 s1379_0)) of
+ SOME ((() , s1380_0)) =>
+ (case ((string_drop s1379_0 s1380_0)) of
+ s1381_0 =>
+ (case ((reg_name_matches_prefix s1381_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1382_0)) =>
+ (case ((string_drop s1381_0 s1382_0)) of
+ s1383_0 =>
+ (case ((sep_matches_prefix s1383_0)) of
+ SOME ((() , s1384_0)) =>
+ (case ((string_drop s1383_0 s1384_0)) of
+ s1385_0 =>
+ (case ((reg_name_matches_prefix s1385_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s1386_0)) =>
+ (case ((string_drop s1385_0 s1386_0)) of
+ s1387_0 =>
+ (case ((sep_matches_prefix s1387_0)) of
+ SOME ((() , s1388_0)) =>
+ (case ((string_drop s1387_0 s1388_0)) of
+ s1389_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s868_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s869_0)) =>
- let p0_ = (string_drop s868_0 s869_0) in
+ s1389_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s1390_0)) =>
+ let p0_ = (string_drop s1389_0 s1390_0) in
if (((p0_ = ""))) then SOME (op, rs1, rs2, imm) else NONE
| _ => NONE
)
@@ -27116,39 +43958,38 @@ val _ = Define `
)))`;
-(*val _s838_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+(*val _s1359_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
val _ = Define `
- ((s838_:string ->((5)words$word#(5)words$word#(12)words$word)option) s839_0=
- (let s840_0 = s839_0 in
- if ((string_startswith s840_0 "jalr")) then
- (case ((string_drop s840_0 ((string_length "jalr")))) of
- s841_0 =>
- (case ((spc_matches_prefix0 s841_0)) of
- SOME ((() , s842_0)) =>
- (case ((string_drop s841_0 s842_0)) of
- s843_0 =>
- (case ((reg_name_matches_prefix s843_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s844_0)) =>
- (case ((string_drop s843_0 s844_0)) of
- s845_0 =>
- (case ((sep_matches_prefix s845_0)) of
- SOME ((() , s846_0)) =>
- (case ((string_drop s845_0 s846_0)) of
- s847_0 =>
- (case ((reg_name_matches_prefix s847_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s848_0)) =>
- (case ((string_drop s847_0 s848_0)) of
- s849_0 =>
- (case ((sep_matches_prefix s849_0)) of
- SOME ((() , s850_0)) =>
- (case ((string_drop s849_0 s850_0)) of
- s851_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s851_0
+ ((s1359_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1360_0=
+ (let s1361_0 = s1360_0 in
+ if ((string_startswith s1361_0 "jalr")) then
+ (case ((string_drop s1361_0 ((string_length "jalr")))) of
+ s1362_0 =>
+ (case ((spc_matches_prefix0 s1362_0)) of
+ SOME ((() , s1363_0)) =>
+ (case ((string_drop s1362_0 s1363_0)) of
+ s1364_0 =>
+ (case ((reg_name_matches_prefix s1364_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1365_0)) =>
+ (case ((string_drop s1364_0 s1365_0)) of
+ s1366_0 =>
+ (case ((sep_matches_prefix s1366_0)) of
+ SOME ((() , s1367_0)) =>
+ (case ((string_drop s1366_0 s1367_0)) of
+ s1368_0 =>
+ (case ((reg_name_matches_prefix s1368_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s1369_0)) =>
+ (case ((string_drop s1368_0 s1369_0)) of
+ s1370_0 =>
+ (case ((sep_matches_prefix s1370_0)) of
+ SOME ((() , s1371_0)) =>
+ (case ((string_drop s1370_0 s1371_0)) of
+ s1372_0 =>
+ (case ((hex_bits_12_matches_prefix0 s1372_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s852_0)) =>
- let p0_ = (string_drop s851_0 s852_0) in
+ SOME ((imm, s1373_0)) =>
+ let p0_ = (string_drop s1372_0 s1373_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -27171,30 +44012,30 @@ val _ = Define `
else NONE))`;
-(*val _s826_ : string -> maybe ((mword ty5 * mword ty21))*)
+(*val _s1347_ : string -> maybe ((mword ty5 * mword ty21))*)
val _ = Define `
- ((s826_:string ->((5)words$word#(21)words$word)option) s827_0=
- (let s828_0 = s827_0 in
- if ((string_startswith s828_0 "jal")) then
- (case ((string_drop s828_0 ((string_length "jal")))) of
- s829_0 =>
- (case ((spc_matches_prefix0 s829_0)) of
- SOME ((() , s830_0)) =>
- (case ((string_drop s829_0 s830_0)) of
- s831_0 =>
- (case ((reg_name_matches_prefix s831_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s832_0)) =>
- (case ((string_drop s831_0 s832_0)) of
- s833_0 =>
- (case ((sep_matches_prefix s833_0)) of
- SOME ((() , s834_0)) =>
- (case ((string_drop s833_0 s834_0)) of
- s835_0 =>
+ ((s1347_:string ->((5)words$word#(21)words$word)option) s1348_0=
+ (let s1349_0 = s1348_0 in
+ if ((string_startswith s1349_0 "jal")) then
+ (case ((string_drop s1349_0 ((string_length "jal")))) of
+ s1350_0 =>
+ (case ((spc_matches_prefix0 s1350_0)) of
+ SOME ((() , s1351_0)) =>
+ (case ((string_drop s1350_0 s1351_0)) of
+ s1352_0 =>
+ (case ((reg_name_matches_prefix s1352_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1353_0)) =>
+ (case ((string_drop s1352_0 s1353_0)) of
+ s1354_0 =>
+ (case ((sep_matches_prefix s1354_0)) of
+ SOME ((() , s1355_0)) =>
+ (case ((string_drop s1354_0 s1355_0)) of
+ s1356_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s835_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s836_0)) =>
- let p0_ = (string_drop s835_0 s836_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s1356_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s1357_0)) =>
+ let p0_ = (string_drop s1356_0 s1357_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -27211,33 +44052,33 @@ val _ = Define `
else NONE))`;
-(*val _s813_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
+(*val _s1334_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
val _ = Define `
- ((s813_:string ->(uop#(5)words$word#(20)words$word)option) s814_0=
- ((case s814_0 of
- s815_0 =>
- (case ((utype_mnemonic_matches_prefix s815_0)) of
- SOME ((op, s816_0)) =>
- (case ((string_drop s815_0 s816_0)) of
- s817_0 =>
- (case ((spc_matches_prefix0 s817_0)) of
- SOME ((() , s818_0)) =>
- (case ((string_drop s817_0 s818_0)) of
- s819_0 =>
- (case ((reg_name_matches_prefix s819_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s820_0)) =>
- (case ((string_drop s819_0 s820_0)) of
- s821_0 =>
- (case ((sep_matches_prefix s821_0)) of
- SOME ((() , s822_0)) =>
- (case ((string_drop s821_0 s822_0)) of
- s823_0 =>
+ ((s1334_:string ->(uop#(5)words$word#(20)words$word)option) s1335_0=
+ ((case s1335_0 of
+ s1336_0 =>
+ (case ((utype_mnemonic_matches_prefix s1336_0)) of
+ SOME ((op, s1337_0)) =>
+ (case ((string_drop s1336_0 s1337_0)) of
+ s1338_0 =>
+ (case ((spc_matches_prefix0 s1338_0)) of
+ SOME ((() , s1339_0)) =>
+ (case ((string_drop s1338_0 s1339_0)) of
+ s1340_0 =>
+ (case ((reg_name_matches_prefix s1340_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s1341_0)) =>
+ (case ((string_drop s1340_0 s1341_0)) of
+ s1342_0 =>
+ (case ((sep_matches_prefix s1342_0)) of
+ SOME ((() , s1343_0)) =>
+ (case ((string_drop s1342_0 s1343_0)) of
+ s1344_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s823_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s824_0)) =>
- let p0_ = (string_drop s823_0 s824_0) in
+ s1344_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s1345_0)) =>
+ let p0_ = (string_drop s1344_0 s1345_0) in
if (((p0_ = ""))) then SOME (op, rd, imm) else NONE
| _ => NONE
)
@@ -27258,478 +44099,1026 @@ val _ = Define `
val _ = Define `
((assembly_backwards:string ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) arg_=
- (let s825_0 = arg_ in
- if ((case ((s813_ s825_0 : ((uop # 5 words$word # 20 words$word))option)) of
+ (let s1346_0 = arg_ in
+ if ((case ((s1334_ s1346_0 : ((uop # 5 words$word # 20 words$word))option)) of
SOME ((op, rd, imm)) => T
| _ => F
- )) then (case (s813_ s825_0 : (( uop # 5 words$word # 20 words$word)) option) of
+ )) then (case (s1334_ s1346_0 : (( uop # 5 words$word # 20 words$word)) option) of
(SOME ((op, rd, imm))) =>
sail2_state_monad$returnS (UTYPE (imm, rd, op))
)
- else if ((case ((s826_ s825_0 : (( 5 words$word # 21 words$word))option)) of
+ else if ((case ((s1347_ s1346_0 : (( 5 words$word # 21 words$word))option)) of
SOME ((rd, imm)) => T
| _ => F
- )) then (case (s826_ s825_0 : (( 5 words$word # 21 words$word)) option) of
+ )) then (case (s1347_ s1346_0 : (( 5 words$word # 21 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (RISCV_JAL (imm, rd))
)
- else if ((case ((s838_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1359_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => T
| _ => F
- )) then (case (s838_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s1359_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
sail2_state_monad$returnS (RISCV_JALR (imm, rs1, rd))
)
- else if ((case ((s854_ s825_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
+ else if ((case ((s1375_ s1346_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
SOME ((op, rs1, rs2, imm)) => T
| _ => F
)) then (case
- (s854_ s825_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
+ (s1375_ s1346_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
(SOME ((op, rs1, rs2, imm))) =>
sail2_state_monad$returnS (BTYPE (imm, rs2, rs1, op))
)
- else if ((case ((s871_ s825_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1392_ s1346_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((op, rd, rs1, imm)) => T
| _ => F
)) then (case
- (s871_ s825_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
+ (s1392_ s1346_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((op, rd, rs1, imm))) =>
sail2_state_monad$returnS (ITYPE (imm, rs1, rd, op))
)
- else if ((case ((s888_ s825_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1409_ s1346_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => T
| _ => F
)) then (case
- (s888_ s825_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
+ (s1409_ s1346_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTIOP (shamt, rs1, rd, op))
)
- else if ((case ((s905_ s825_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1426_ s1346_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s905_ s825_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1426_ s1346_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
sail2_state_monad$returnS (RTYPE (rs2, rs1, rd, op))
)
- else if ((case ((s922_ s825_0
+ else if ((case ((s1443_ s1346_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1)) => T
| _ => F
)) then (case
- (s922_ s825_0
+ (s1443_ s1346_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1))) =>
sail2_state_monad$returnS (LOAD (imm, rs1, rd, is_unsigned, size1, aq, rl))
)
- else if ((case ((s952_ s825_0
+ else if ((case ((s1473_ s1346_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1)) => T
| _ => F
)) then (case
- (s952_ s825_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (s1473_ s1346_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1))) =>
sail2_state_monad$returnS (STORE (imm, rs2, rs1, size1, aq, rl))
)
- else if ((case ((s980_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s1501_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s980_ s825_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s1501_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
sail2_state_monad$returnS (ADDIW (imm, rs1, rd))
)
- else if ((case ((s996_ s825_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1517_ s1346_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s996_ s825_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1517_ s1346_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTW (shamt, rs1, rd, op))
)
- else if ((case ((s1013_ s825_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1534_ s1346_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1013_ s825_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1534_ s1346_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
sail2_state_monad$returnS (RTYPEW (rs2, rs1, rd, op))
)
- else if ((case ((s1030_ s825_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1551_ s1346_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1030_ s825_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1551_ s1346_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
sail2_state_monad$returnS (SHIFTIWOP (shamt, rs1, rd, op))
)
- else if ((case ((s1047_ s825_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s1568_ s1346_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1047_ s825_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s1568_ s1346_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
sail2_state_monad$returnS (FENCE (pred, succ))
)
- else if ((case ((s1059_ s825_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s1580_ s1346_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1059_ s825_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s1580_ s1346_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
sail2_state_monad$returnS (FENCE_TSO (pred, succ))
)
- else if (((s825_0 = "fence.i"))) then sail2_state_monad$returnS (FENCEI () )
- else if (((s825_0 = "ecall"))) then sail2_state_monad$returnS (ECALL () )
- else if (((s825_0 = "mret"))) then sail2_state_monad$returnS (MRET () )
- else if (((s825_0 = "sret"))) then sail2_state_monad$returnS (SRET () )
- else if (((s825_0 = "ebreak"))) then sail2_state_monad$returnS (EBREAK () )
- else if (((s825_0 = "wfi"))) then sail2_state_monad$returnS (WFI () )
- else if ((case ((s1071_ s825_0 : (( 5 words$word # 5 words$word))option)) of
+ else if (((s1346_0 = "fence.i"))) then sail2_state_monad$returnS (FENCEI () )
+ else if (((s1346_0 = "ecall"))) then sail2_state_monad$returnS (ECALL () )
+ else if (((s1346_0 = "mret"))) then sail2_state_monad$returnS (MRET () )
+ else if (((s1346_0 = "sret"))) then sail2_state_monad$returnS (SRET () )
+ else if (((s1346_0 = "ebreak"))) then sail2_state_monad$returnS (EBREAK () )
+ else if (((s1346_0 = "wfi"))) then sail2_state_monad$returnS (WFI () )
+ else if ((case ((s1592_ s1346_0 : (( 5 words$word # 5 words$word))option)) of
SOME ((rs1, rs2)) => T
| _ => F
- )) then (case (s1071_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s1592_ s1346_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rs1, rs2))) =>
sail2_state_monad$returnS (SFENCE_VMA (rs1, rs2))
)
- else if ((case ((s1083_ s825_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s1604_ s1346_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1)) => T
| _ => F
)) then (case
- (s1083_ s825_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
+ (s1604_ s1346_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1))) =>
sail2_state_monad$returnS (LOADRES (aq, rl, rs1, size1, rd))
)
- else if ((case ((s1101_ s825_0
+ else if ((case ((s1622_ s1346_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1101_ s825_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s1622_ s1346_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2))) =>
sail2_state_monad$returnS (STORECON (aq, rl, rs2, rs1, size1, rd))
)
- else if ((case ((s1123_ s825_0
+ else if ((case ((s1644_ s1346_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1)) => T
| _ => F
)) then (case
- (s1123_ s825_0
+ (s1644_ s1346_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1))) =>
sail2_state_monad$returnS (AMO (op, aq, rl, rs2, rs1, width, rd))
)
- else if (((s825_0 = "c.nop"))) then sail2_state_monad$returnS (C_NOP () )
- else if ((case ((s1147_ s825_0 : (( 3 words$word # 8 words$word))option)) of
- SOME ((rdc, nzimm)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if (((s1346_0 = "c.nop"))) then sail2_state_monad$returnS (C_NOP () )
+ else if ((case ((s1670_ s1346_0 : (( 3 words$word # 8 words$word))option)) of
+ SOME ((rdc, nzimm)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s1147_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1670_ s1346_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rdc, nzimm))) =>
sail2_state_monad$returnS (C_ADDI4SPN (rdc, nzimm))
)
- else if ((case ((s1159_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1682_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => T
| _ => F
- )) then (case (s1159_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ )) then (case
+ (s1682_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
sail2_state_monad$returnS (C_LW (uimm, rsc, rdc))
)
- else if ((case ((s1175_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1698_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1175_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ )) then (case
+ (s1698_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
sail2_state_monad$returnS (C_LD (uimm, rsc, rdc))
)
- else if ((case ((s1191_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1714_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => T
| _ => F
)) then (case
- (s1191_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s1714_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
sail2_state_monad$returnS (C_SW (uimm, rsc1, rsc2))
)
- else if ((case ((s1207_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s1730_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1207_ s825_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s1730_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
sail2_state_monad$returnS (C_SD (uimm, rsc1, rsc2))
)
- else if ((case ((s1223_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, nzi)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s1746_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, nzi)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s1223_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1746_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, nzi))) =>
sail2_state_monad$returnS (C_ADDI (nzi, rsd))
)
- else if ((case ((s1235_ s825_0 : ( 11 words$word)option)) of
+ else if ((case ((s1758_ s1346_0 : ( 11 words$word)option)) of
SOME (imm) => ((( 64 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s1235_ s825_0 : ( 11 words$word) option) of
+ )) then (case (s1758_ s1346_0 : ( 11 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_JAL imm)
)
- else if ((case ((s1243_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1766_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1243_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1766_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
sail2_state_monad$returnS (C_ADDIW (imm, rsd))
)
- else if ((case ((s1255_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, imm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1778_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => (rd <> zreg)
| _ => F
- )) then (case (s1255_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1778_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (C_LI (imm, rd))
)
- else if ((case ((s1267_ s825_0 : ( 6 words$word)option)) of
- SOME (imm) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1790_ s1346_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1267_ s825_0 : ( 6 words$word) option) of
+ )) then (case (s1790_ s1346_0 : ( 6 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_ADDI16SP imm)
)
- else if ((case ((s1275_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1798_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, imm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s1275_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1798_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
sail2_state_monad$returnS (C_LUI (imm, rd))
)
- else if ((case ((s1287_ s825_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1810_ s1346_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1287_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1810_ s1346_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SRLI (shamt, rsd))
)
- else if ((case ((s1299_ s825_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s1822_ s1346_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s1299_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1822_ s1346_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SRAI (shamt, rsd))
)
- else if ((case ((s1311_ s825_0 : (( 3 words$word # 6 words$word))option)) of
+ else if ((case ((s1834_ s1346_0 : (( 3 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => T
| _ => F
- )) then (case (s1311_ s825_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s1834_ s1346_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
sail2_state_monad$returnS (C_ANDI (imm, rsd))
)
- else if ((case ((s1323_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1846_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1323_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1846_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_SUB (rsd, rs2))
)
- else if ((case ((s1335_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1858_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1335_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1858_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_XOR (rsd, rs2))
)
- else if ((case ((s1347_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1870_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1347_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1870_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_OR (rsd, rs2))
)
- else if ((case ((s1359_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1882_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s1359_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1882_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_AND (rsd, rs2))
)
- else if ((case ((s1371_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1894_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1371_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1894_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_SUBW (rsd, rs2))
)
- else if ((case ((s1383_ s825_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s1906_ s1346_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1383_ s825_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s1906_ s1346_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_ADDW (rsd, rs2))
)
- else if ((case ((s1395_ s825_0 : ( 11 words$word)option)) of
+ else if ((case ((s1918_ s1346_0 : ( 11 words$word)option)) of
SOME (imm) => T
| _ => F
- )) then (case (s1395_ s825_0 : ( 11 words$word) option) of
+ )) then (case (s1918_ s1346_0 : ( 11 words$word) option) of
(SOME (imm)) =>
sail2_state_monad$returnS (C_J imm)
)
- else if ((case ((s1403_ s825_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s1926_ s1346_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s1403_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1926_ s1346_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
sail2_state_monad$returnS (C_BEQZ (imm, rs))
)
- else if ((case ((s1415_ s825_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s1938_ s1346_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s1415_ s825_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s1938_ s1346_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
sail2_state_monad$returnS (C_BNEZ (imm, rs))
)
- else if ((case ((s1427_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s1950_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s1427_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1950_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
sail2_state_monad$returnS (C_SLLI (shamt, rsd))
)
- else if ((case ((s1439_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s1962_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (rd <> zreg)
| _ => F
- )) then (case (s1439_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1962_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_LWSP (uimm, rd))
)
- else if ((case ((s1451_ s825_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s1974_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s1451_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1974_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_LDSP (uimm, rd))
)
- else if ((case ((s1463_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1986_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, uimm)) => T
| _ => F
- )) then (case (s1463_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1986_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
sail2_state_monad$returnS (C_SWSP (uimm, rd))
)
- else if ((case ((s1475_ s825_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s1998_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rs2, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1475_ s825_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s1998_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rs2, uimm))) =>
sail2_state_monad$returnS (C_SDSP (uimm, rs2))
)
- else if ((case ((s1487_ s825_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s2010_ s1346_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s1487_ s825_0 : ( 5 words$word) option) of
+ )) then (case (s2010_ s1346_0 : ( 5 words$word) option) of
(SOME (rs1)) =>
sail2_state_monad$returnS (C_JR rs1)
)
- else if ((case ((s1495_ s825_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s2018_ s1346_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s1495_ s825_0 : ( 5 words$word) option) of
+ )) then (case (s2018_ s1346_0 : ( 5 words$word) option) of
(SOME (rs1)) =>
sail2_state_monad$returnS (C_JALR rs1)
)
- else if ((case ((s1503_ s825_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rd, rs2)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s2026_ s1346_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rd, rs2)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s1503_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s2026_ s1346_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs2))) =>
sail2_state_monad$returnS (C_MV (rd, rs2))
)
- else if (((s825_0 = "c.ebreak"))) then sail2_state_monad$returnS (C_EBREAK () )
- else if ((case ((s1515_ s825_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rsd, rs2)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if (((s1346_0 = "c.ebreak"))) then sail2_state_monad$returnS (C_EBREAK () )
+ else if ((case ((s2038_ s1346_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rsd, rs2)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s1515_ s825_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s2038_ s1346_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rsd, rs2))) =>
sail2_state_monad$returnS (C_ADD (rsd, rs2))
)
- else if ((case ((s1527_ s825_0
+ else if ((case ((s2050_ s1346_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1527_ s825_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2050_ s1346_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2))) =>
sail2_state_monad$returnS (MUL (rs2, rs1, rd, high, signed1, signed2))
)
- else if ((case ((s1544_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2067_ s1346_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1544_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2067_ s1346_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (DIV0 (rs2, rs1, rd, s))
)
- else if ((case ((s1562_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2085_ s1346_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1562_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2085_ s1346_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (REM (rs2, rs1, rd, s))
)
- else if ((case ((s1580_ s825_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2103_ s1346_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1580_ s825_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
+ )) then (case (s2103_ s1346_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs1, rs2))) =>
sail2_state_monad$returnS (MULW (rs2, rs1, rd))
)
- else if ((case ((s1596_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2119_ s1346_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1596_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2119_ s1346_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (DIVW (rs2, rs1, rd, s))
)
- else if ((case ((s1615_ s825_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s2138_ s1346_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1615_ s825_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s2138_ s1346_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
sail2_state_monad$returnS (REMW (rs2, rs1, rd, s))
)
- else if ((case ((s1634_ s825_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s2157_ s1346_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
| _ => F
)) then (case
- (s1634_ s825_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s2157_ s1346_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
sail2_state_monad$returnS (CSR (csr, rs1, rd, T, op))
)
- else if ((case ((s1652_ s825_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s2175_ s1346_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
| _ => F
)) then (case
- (s1652_ s825_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s2175_ s1346_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
sail2_state_monad$returnS (CSR (csr, rs1, rd, F, op))
)
- else if (((s825_0 = "uret"))) then sail2_state_monad$returnS (URET () )
- else if ((case ((s1669_ s825_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s1669_ s825_0 : ( 32 words$word) option) of
+ else if (((s1346_0 = "uret"))) then sail2_state_monad$returnS (URET () )
+ else if ((case ((s2192_ s1346_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s2192_ s1346_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_NOP_HINT imm)
+ )
+ else if ((case ((s2198_ s1346_0 : ( 5 words$word)option)) of
+ SOME (rsd) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s2198_ s1346_0 : ( 5 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_ADDI_HINT rsd)
+ )
+ else if ((case ((s2204_ s1346_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s2204_ s1346_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_LI_HINT imm)
+ )
+ else if ((case ((s2210_ s1346_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s2210_ s1346_0 : ( 6 words$word) option) of
+ (SOME (imm)) =>
+ sail2_state_monad$returnS (C_LUI_HINT imm)
+ )
+ else if ((case ((s2216_ s1346_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s2216_ s1346_0 : ( 5 words$word) option) of
+ (SOME (rs2)) =>
+ sail2_state_monad$returnS (C_MV_HINT rs2)
+ )
+ else if ((case ((s2222_ s1346_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s2222_ s1346_0 : ( 5 words$word) option) of
+ (SOME (rs2)) =>
+ sail2_state_monad$returnS (C_ADD_HINT rs2)
+ )
+ else if ((case ((s2228_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s2228_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rsd, shamt))) =>
+ sail2_state_monad$returnS (C_SLLI_HINT (shamt, rsd))
+ )
+ else if ((case ((s2237_ s1346_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s2237_ s1346_0 : ( 3 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_SRLI_HINT rsd)
+ )
+ else if ((case ((s2243_ s1346_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s2243_ s1346_0 : ( 3 words$word) option) of
+ (SOME (rsd)) =>
+ sail2_state_monad$returnS (C_SRAI_HINT rsd)
+ )
+ else if ((case ((s2249_ s1346_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word))option)) of
+ SOME ((pred, succ, rs, rd, fm)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s2249_ s1346_0 : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word)) option) of
+ (SOME ((pred, succ, rs, rd, fm))) =>
+ sail2_state_monad$returnS (FENCE_RESERVED (fm, pred, succ, rs, rd))
+ )
+ else if ((case ((s2267_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ SOME ((rd, rs, imm)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case (s2267_ s1346_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ (SOME ((rd, rs, imm))) =>
+ sail2_state_monad$returnS (FENCEI_RESERVED (imm, rs, rd))
+ )
+ else if ((case ((s2279_ s1346_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rd, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2279_ s1346_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rd, imm, rs1))) =>
+ sail2_state_monad$returnS (LOAD_FP (imm, rs1, rd, width))
+ )
+ else if ((case ((s2303_ s1346_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rs2, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2303_ s1346_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rs2, imm, rs1))) =>
+ sail2_state_monad$returnS (STORE_FP (imm, rs2, rs1, width))
+ )
+ else if ((case ((s2327_ s1346_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s2327_ s1346_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ sail2_state_monad$returnS (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2352_ s1346_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s2352_ s1346_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2373_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2373_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S))
+ )
+ else if ((case ((s2390_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2390_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S))
+ )
+ else if ((case ((s2407_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2407_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S))
+ )
+ else if ((case ((s2424_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2424_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W))
+ )
+ else if ((case ((s2441_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2441_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_WU))
+ )
+ else if ((case ((s2458_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2458_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_L_S))
+ )
+ else if ((case ((s2475_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2475_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_LU_S))
+ )
+ else if ((case ((s2492_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2492_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_L))
+ )
+ else if ((case ((s2509_ s1346_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2509_ s1346_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_LU))
+ )
+ else if ((case ((s2526_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2526_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJ_S))
+ )
+ else if ((case ((s2543_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2543_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJN_S))
+ )
+ else if ((case ((s2560_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2560_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJX_S))
+ )
+ else if ((case ((s2577_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2577_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FMIN_S))
+ )
+ else if ((case ((s2594_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2594_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FMAX_S))
+ )
+ else if ((case ((s2611_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2611_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FEQ_S))
+ )
+ else if ((case ((s2628_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2628_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FLT_S))
+ )
+ else if ((case ((s2645_ s1346_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2645_ s1346_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_S (rs2, rs1, rd, FLE_S))
+ )
+ else if ((case ((s2662_ s1346_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_W, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2662_ s1346_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_W, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FMV_X_W))
+ )
+ else if ((case ((s2675_ s1346_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_W_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2675_ s1346_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_W_X, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FMV_W_X))
+ )
+ else if ((case ((s2688_ s1346_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_S, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s2688_ s1346_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_S, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_S (rs1, rd, FCLASS_S))
+ )
+ else if ((case ((s2701_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s2701_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, imm))) =>
+ sail2_state_monad$returnS (C_FLWSP (imm, rd))
+ )
+ else if ((case ((s2713_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s2713_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ sail2_state_monad$returnS (C_FSWSP (uimm, rd))
+ )
+ else if ((case ((s2725_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s2725_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ sail2_state_monad$returnS (C_FLW (uimm, rsc, rdc))
+ )
+ else if ((case ((s2741_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s2741_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ sail2_state_monad$returnS (C_FSW (uimm, rsc1, rsc2))
+ )
+ else if ((case ((s2757_ s1346_0
+ : ((f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s2757_ s1346_0
+ : (( f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ sail2_state_monad$returnS (F_MADD_TYPE_D (rs3, rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2782_ s1346_0
+ : ((f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s2782_ s1346_0
+ : (( f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ sail2_state_monad$returnS (F_BIN_RM_TYPE_D (rs2, rs1, rm, rd, op))
+ )
+ else if ((case ((s2803_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2803_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FSQRT_D))
+ )
+ else if ((case ((s2820_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2820_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_W_D))
+ )
+ else if ((case ((s2837_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2837_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_WU_D))
+ )
+ else if ((case ((s2854_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2854_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_W, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_W))
+ )
+ else if ((case ((s2871_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2871_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_WU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_WU))
+ )
+ else if ((case ((s2888_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2888_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_L_D))
+ )
+ else if ((case ((s2905_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2905_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_LU_D))
+ )
+ else if ((case ((s2922_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2922_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_L, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_L))
+ )
+ else if ((case ((s2939_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2939_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_LU, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_LU))
+ )
+ else if ((case ((s2956_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2956_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_D, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_S_D))
+ )
+ else if ((case ((s2973_ s1346_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s2973_ s1346_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_S, rd, rs1, rm))) =>
+ sail2_state_monad$returnS (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_S))
+ )
+ else if ((case ((s2990_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s2990_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJ_D))
+ )
+ else if ((case ((s3007_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3007_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJN_D))
+ )
+ else if ((case ((s3024_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3024_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJX_D))
+ )
+ else if ((case ((s3041_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3041_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FMIN_D))
+ )
+ else if ((case ((s3058_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3058_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FMAX_D))
+ )
+ else if ((case ((s3075_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3075_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FEQ_D))
+ )
+ else if ((case ((s3092_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3092_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FLT_D))
+ )
+ else if ((case ((s3109_ s1346_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s3109_ s1346_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_D, rd, rs1, rs2))) =>
+ sail2_state_monad$returnS (F_BIN_TYPE_D (rs2, rs1, rd, FLE_D))
+ )
+ else if ((case ((s3126_ s1346_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_D, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3126_ s1346_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_D, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_D (rs1, rd, FMV_X_D))
+ )
+ else if ((case ((s3139_ s1346_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_D_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3139_ s1346_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_D_X, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_D (rs1, rd, FMV_D_X))
+ )
+ else if ((case ((s3152_ s1346_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_D, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s3152_ s1346_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_D, rd, rs1))) =>
+ sail2_state_monad$returnS (F_UN_TYPE_D (rs1, rd, FCLASS_D))
+ )
+ else if ((case ((s3165_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s3165_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ sail2_state_monad$returnS (C_FLDSP (uimm, rd))
+ )
+ else if ((case ((s3177_ s1346_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rs2, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s3177_ s1346_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rs2, uimm))) =>
+ sail2_state_monad$returnS (C_FSDSP (uimm, rs2))
+ )
+ else if ((case ((s3189_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s3189_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ sail2_state_monad$returnS (C_FLD (uimm, rsc, rdc))
+ )
+ else if ((case ((s3205_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s3205_ s1346_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ sail2_state_monad$returnS (C_FSD (uimm, rsc1, rsc2))
+ )
+ else if ((case ((s3221_ s1346_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s3221_ s1346_0 : ( 32 words$word) option) of
(SOME (s)) =>
sail2_state_monad$returnS (ILLEGAL s)
)
- else if ((case ((s1677_ s825_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s1677_ s825_0 : ( 16 words$word) option) of
+ else if ((case ((s3229_ s1346_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s3229_ s1346_0 : ( 16 words$word) option) of
(SOME (s)) =>
sail2_state_monad$returnS (C_ILLEGAL s)
)
else sail2_state_monad$seqS (sail2_state_monad$assert_expS F "Pattern match failure at unknown location") (sail2_state_monad$exitS () )))`;
-(*val assembly_forwards_matches : ast -> bool*)
-
val _ = Define `
((assembly_forwards_matches:ast -> bool) arg_=
((case arg_ of
@@ -27764,8 +45153,7 @@ val _ = Define `
| AMO ((op, aq, rl, rs2, rs1, width, rd)) => T
| C_NOP (() ) => T
| C_ADDI4SPN ((rdc, nzimm)) =>
- if (((nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word)))) then
- T else F
+ if (((nzimm <> (0x00w : 8 words$word)))) then T else F
| C_LW ((uimm, rsc, rdc)) => T
| C_LD ((uimm, rsc, rdc)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then T else F
@@ -27773,29 +45161,24 @@ val _ = Define `
| C_SD ((uimm, rsc1, rsc2)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then T else F
| C_ADDI ((nzi, rsd)) =>
- if ((((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
T else F
| C_JAL (imm) =>
if ((((( 64 : int): ii) = (( 32 : int): ii)))) then T else F
| C_ADDIW ((imm, rsd)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then T else F
| C_LI ((imm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rd <> zreg))) then T else F
| C_ADDI16SP (imm) =>
- if (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((imm <> (0b000000w : 6 words$word)))) then T else F
| C_LUI ((imm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\
- (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))))))))) then
+ if ((((((rd <> zreg))) /\
+ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word)))))))))) then
T else F
| C_SRLI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((shamt <> (0b000000w : 6 words$word)))) then T else F
| C_SRAI ((shamt, rsd)) =>
- if (((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) then
- T else F
+ if (((shamt <> (0b000000w : 6 words$word)))) then T else F
| C_ANDI ((imm, rsd)) => T
| C_SUB ((rsd, rs2)) => T
| C_XOR ((rsd, rs2)) => T
@@ -27809,31 +45192,25 @@ val _ = Define `
| C_BEQZ ((imm, rs)) => T
| C_BNEZ ((imm, rs)) => T
| C_SLLI ((shamt, rsd)) =>
- if ((((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\
- (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg)))))))) then
+ if ((((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg)))))) then
T else F
| C_LWSP ((uimm, rd)) =>
- if (((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rd <> zreg))) then T else F
| C_LDSP ((uimm, rd)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- ((((( 64 : int): ii) = (( 64 : int): ii))))))) then T else
- F
+ if ((((((rd <> zreg))) /\ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then
+ T else F
| C_SWSP ((uimm, rd)) => T
| C_SDSP ((uimm, rs2)) =>
if ((((( 64 : int): ii) = (( 64 : int): ii)))) then T else F
| C_JR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rs1 <> zreg))) then T else F
| C_JALR (rs1) =>
- if (((((regidx_to_regno rs1)) <> ((regidx_to_regno zreg))))) then T else F
+ if (((rs1 <> zreg))) then T else F
| C_MV ((rd, rs2)) =>
- if ((((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T else F
+ if ((((((rd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F
| C_EBREAK (() ) => T
| C_ADD ((rsd, rs2)) =>
- if ((((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\
- (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg)))))))) then
- T else F
+ if ((((((rsd <> zreg))) /\ (((rs2 <> zreg)))))) then T else F
| MUL ((rs2, rs1, rd, high, signed1, signed2)) => T
| DIV0 ((rs2, rs1, rd, s)) => T
| REM ((rs2, rs1, rd, s)) => T
@@ -27846,29 +45223,124 @@ val _ = Define `
| CSR ((csr, rs1, rd, T, op)) => T
| CSR ((csr, rs1, rd, F, op)) => T
| URET (() ) => T
+ | C_NOP_HINT (imm) => T
+ | C_ADDI_HINT (rsd) =>
+ if (((rsd <> zreg))) then T else F
+ | C_LI_HINT (imm) => T
+ | C_LUI_HINT (imm) =>
+ if (((imm <> (0b000000w : 6 words$word)))) then T else F
+ | C_MV_HINT (rs2) =>
+ if (((rs2 <> zreg))) then T else F
+ | C_ADD_HINT (rs2) =>
+ if (((rs2 <> zreg))) then T else F
+ | C_SLLI_HINT ((shamt, rsd)) =>
+ if ((((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg)))))) then
+ T else F
+ | C_SRLI_HINT (rsd) => T
+ | C_SRAI_HINT (rsd) => T
+ | FENCE_RESERVED ((fm, pred, succ, rs, rd)) =>
+ if (((((((((fm <> (0x0w : 4 words$word)))) /\
+ (((fm <> (0x8w : 4 words$word))))))) \/
+ ((((((rs <> (0b00000w : 5 words$word)))) \/
+ (((rd <> (0b00000w : 5 words$word)))))))))) then T else
+ F
+ | FENCEI_RESERVED ((imm, rs, rd)) =>
+ if ((((((imm <> (0x000w : 12 words$word)))) \/
+ ((((((rs <> zreg))) \/ (((rd <> zreg))))))))) then T else
+ F
+ | LOAD_FP ((imm, rs1, rd, width)) => T
+ | STORE_FP ((imm, rs2, rs1, width)) => T
+ | F_MADD_TYPE_S ((rs3, rs2, rs1, rm, rd, op)) => T
+ | F_BIN_RM_TYPE_S ((rs2, rs1, rm, rd, op)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FSQRT_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_W_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_WU_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_W)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_WU)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_L_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_LU_S)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_L)) => T
+ | F_UN_RM_TYPE_S ((rs1, rm, rd, FCVT_S_LU)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJ_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJN_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FSGNJX_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMIN_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FMAX_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FEQ_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLT_S)) => T
+ | F_BIN_TYPE_S ((rs2, rs1, rd, FLE_S)) => T
+ | F_UN_TYPE_S ((rs1, rd, FMV_X_W)) => T
+ | F_UN_TYPE_S ((rs1, rd, FMV_W_X)) => T
+ | F_UN_TYPE_S ((rs1, rd, FCLASS_S)) => T
+ | C_FLWSP ((imm, rd)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FSWSP ((uimm, rd)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FLW ((uimm, rsc, rdc)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then T else F
+ | C_FSW ((uimm, rsc1, rsc2)) =>
+ if ((((( 64 : int): ii) = (( 32 : int): ii)))) then T else F
+ | F_MADD_TYPE_D ((rs3, rs2, rs1, rm, rd, op)) => T
+ | F_BIN_RM_TYPE_D ((rs2, rs1, rm, rd, op)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FSQRT_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_W_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_WU_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_W)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_WU)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_L_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_LU_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_L)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_LU)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_S_D)) => T
+ | F_UN_RM_TYPE_D ((rs1, rm, rd, FCVT_D_S)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJ_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJN_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FSGNJX_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMIN_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FMAX_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FEQ_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLT_D)) => T
+ | F_BIN_TYPE_D ((rs2, rs1, rd, FLE_D)) => T
+ | F_UN_TYPE_D ((rs1, rd, FMV_X_D)) => T
+ | F_UN_TYPE_D ((rs1, rd, FMV_D_X)) => T
+ | F_UN_TYPE_D ((rs1, rd, FCLASS_D)) => T
+ | C_FLDSP ((uimm, rd)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then T else
+ F
+ | C_FSDSP ((uimm, rs2)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then T else
+ F
+ | C_FLD ((uimm, rsc, rdc)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then T else
+ F
+ | C_FSD ((uimm, rsc1, rsc2)) =>
+ if (((((((( 64 : int): ii) = (( 32 : int): ii)))) \/
+ ((((( 64 : int): ii) = (( 64 : int): ii))))))) then T else
+ F
| ILLEGAL (s) => T
| C_ILLEGAL (s) => T
)))`;
-(*val assembly_backwards_matches : string -> bool*)
-
-(*val _s2549_ : string -> maybe (mword ty16)*)
+(*val _s5132_ : string -> maybe (mword ty16)*)
val _ = Define `
- ((s2549_:string ->((16)words$word)option) s2550_0=
- (let s2551_0 = s2550_0 in
- if ((string_startswith s2551_0 "c.illegal")) then
- (case ((string_drop s2551_0 ((string_length "c.illegal")))) of
- s2552_0 =>
- (case ((spc_matches_prefix0 s2552_0)) of
- SOME ((() , s2553_0)) =>
- (case ((string_drop s2552_0 s2553_0)) of
- s2554_0 =>
+ ((s5132_:string ->((16)words$word)option) s5133_0=
+ (let s5134_0 = s5133_0 in
+ if ((string_startswith s5134_0 "c.illegal")) then
+ (case ((string_drop s5134_0 ((string_length "c.illegal")))) of
+ s5135_0 =>
+ (case ((spc_matches_prefix0 s5135_0)) of
+ SOME ((() , s5136_0)) =>
+ (case ((string_drop s5135_0 s5136_0)) of
+ s5137_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2554_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s2555_0)) =>
- let p0_ = (string_drop s2554_0 s2555_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5137_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s5138_0)) =>
+ let p0_ = (string_drop s5137_0 s5138_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -27879,22 +45351,22 @@ val _ = Define `
else NONE))`;
-(*val _s2541_ : string -> maybe (mword ty32)*)
+(*val _s5124_ : string -> maybe (mword ty32)*)
val _ = Define `
- ((s2541_:string ->((32)words$word)option) s2542_0=
- (let s2543_0 = s2542_0 in
- if ((string_startswith s2543_0 "illegal")) then
- (case ((string_drop s2543_0 ((string_length "illegal")))) of
- s2544_0 =>
- (case ((spc_matches_prefix0 s2544_0)) of
- SOME ((() , s2545_0)) =>
- (case ((string_drop s2544_0 s2545_0)) of
- s2546_0 =>
+ ((s5124_:string ->((32)words$word)option) s5125_0=
+ (let s5126_0 = s5125_0 in
+ if ((string_startswith s5126_0 "illegal")) then
+ (case ((string_drop s5126_0 ((string_length "illegal")))) of
+ s5127_0 =>
+ (case ((spc_matches_prefix0 s5127_0)) of
+ SOME ((() , s5128_0)) =>
+ (case ((string_drop s5127_0 s5128_0)) of
+ s5129_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2546_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s2547_0)) =>
- let p0_ = (string_drop s2546_0 s2547_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5129_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s5130_0)) =>
+ let p0_ = (string_drop s5129_0 s5130_0) in
if (((p0_ = ""))) then SOME s else NONE
| _ => NONE
)
@@ -27905,41 +45377,371 @@ val _ = Define `
else NONE))`;
-(*val _s2524_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s5108_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2524_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s2525_0=
- ((case s2525_0 of
- s2526_0 =>
- (case ((csr_mnemonic_matches_prefix s2526_0)) of
- SOME ((op, s2527_0)) =>
- (case ((string_drop s2526_0 s2527_0)) of
- s2528_0 =>
- (case ((spc_matches_prefix0 s2528_0)) of
- SOME ((() , s2529_0)) =>
- (case ((string_drop s2528_0 s2529_0)) of
- s2530_0 =>
- (case ((reg_name_matches_prefix s2530_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2531_0)) =>
- (case ((string_drop s2530_0 s2531_0)) of
- s2532_0 =>
- (case ((sep_matches_prefix s2532_0)) of
- SOME ((() , s2533_0)) =>
- (case ((string_drop s2532_0 s2533_0)) of
- s2534_0 =>
- (case ((reg_name_matches_prefix s2534_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2535_0)) =>
- (case ((string_drop s2534_0 s2535_0)) of
- s2536_0 =>
- (case ((sep_matches_prefix s2536_0)) of
- SOME ((() , s2537_0)) =>
- (case ((string_drop s2536_0 s2537_0)) of
- s2538_0 =>
- (case ((csr_name_map_matches_prefix s2538_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s2539_0)) =>
- let p0_ = (string_drop s2538_0 s2539_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ ((s5108_:string ->((3)words$word#(3)words$word#(5)words$word)option) s5109_0=
+ (let s5110_0 = s5109_0 in
+ if ((string_startswith s5110_0 "c.fsd")) then
+ (case ((string_drop s5110_0 ((string_length "c.fsd")))) of
+ s5111_0 =>
+ (case ((spc_matches_prefix0 s5111_0)) of
+ SOME ((() , s5112_0)) =>
+ (case ((string_drop s5111_0 s5112_0)) of
+ s5113_0 =>
+ (case ((creg_name_matches_prefix s5113_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s5114_0)) =>
+ (case ((string_drop s5113_0 s5114_0)) of
+ s5115_0 =>
+ (case ((sep_matches_prefix s5115_0)) of
+ SOME ((() , s5116_0)) =>
+ (case ((string_drop s5115_0 s5116_0)) of
+ s5117_0 =>
+ (case ((creg_name_matches_prefix s5117_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s5118_0)) =>
+ (case ((string_drop s5117_0 s5118_0)) of
+ s5119_0 =>
+ (case ((sep_matches_prefix s5119_0)) of
+ SOME ((() , s5120_0)) =>
+ (case ((string_drop s5119_0 s5120_0)) of
+ s5121_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5121_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1462, s5122_0)) =>
+ if (((((subrange_vec_dec v__1462 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1462 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1462 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s5121_0 s5122_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5092_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s5092_:string ->((3)words$word#(3)words$word#(5)words$word)option) s5093_0=
+ (let s5094_0 = s5093_0 in
+ if ((string_startswith s5094_0 "c.fld")) then
+ (case ((string_drop s5094_0 ((string_length "c.fld")))) of
+ s5095_0 =>
+ (case ((spc_matches_prefix0 s5095_0)) of
+ SOME ((() , s5096_0)) =>
+ (case ((string_drop s5095_0 s5096_0)) of
+ s5097_0 =>
+ (case ((creg_name_matches_prefix s5097_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s5098_0)) =>
+ (case ((string_drop s5097_0 s5098_0)) of
+ s5099_0 =>
+ (case ((sep_matches_prefix s5099_0)) of
+ SOME ((() , s5100_0)) =>
+ (case ((string_drop s5099_0 s5100_0)) of
+ s5101_0 =>
+ (case ((creg_name_matches_prefix s5101_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s5102_0)) =>
+ (case ((string_drop s5101_0 s5102_0)) of
+ s5103_0 =>
+ (case ((sep_matches_prefix s5103_0)) of
+ SOME ((() , s5104_0)) =>
+ (case ((string_drop s5103_0 s5104_0)) of
+ s5105_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5105_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1464, s5106_0)) =>
+ if (((((subrange_vec_dec v__1464 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1464 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1464 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s5105_0 s5106_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5080_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s5080_:string ->((5)words$word#(6)words$word)option) s5081_0=
+ (let s5082_0 = s5081_0 in
+ if ((string_startswith s5082_0 "c.fsdsp")) then
+ (case ((string_drop s5082_0 ((string_length "c.fsdsp")))) of
+ s5083_0 =>
+ (case ((spc_matches_prefix0 s5083_0)) of
+ SOME ((() , s5084_0)) =>
+ (case ((string_drop s5083_0 s5084_0)) of
+ s5085_0 =>
+ (case ((reg_name_matches_prefix s5085_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5086_0)) =>
+ (case ((string_drop s5085_0 s5086_0)) of
+ s5087_0 =>
+ (case ((sep_matches_prefix s5087_0)) of
+ SOME ((() , s5088_0)) =>
+ (case ((string_drop s5087_0 s5088_0)) of
+ s5089_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5089_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5090_0)) =>
+ let p0_ = (string_drop s5089_0 s5090_0) in
+ if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5068_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s5068_:string ->((5)words$word#(6)words$word)option) s5069_0=
+ (let s5070_0 = s5069_0 in
+ if ((string_startswith s5070_0 "c.fldsp")) then
+ (case ((string_drop s5070_0 ((string_length "c.fldsp")))) of
+ s5071_0 =>
+ (case ((spc_matches_prefix0 s5071_0)) of
+ SOME ((() , s5072_0)) =>
+ (case ((string_drop s5071_0 s5072_0)) of
+ s5073_0 =>
+ (case ((reg_name_matches_prefix s5073_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5074_0)) =>
+ (case ((string_drop s5073_0 s5074_0)) of
+ s5075_0 =>
+ (case ((sep_matches_prefix s5075_0)) of
+ SOME ((() , s5076_0)) =>
+ (case ((string_drop s5075_0 s5076_0)) of
+ s5077_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5077_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5078_0)) =>
+ let p0_ = (string_drop s5077_0 s5078_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s5055_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s5055_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s5056_0=
+ ((case s5056_0 of
+ s5057_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s5057_0)) of
+ SOME ((FCLASS_D, s5058_0)) =>
+ (case ((string_drop s5057_0 s5058_0)) of
+ s5059_0 =>
+ (case ((spc_matches_prefix0 s5059_0)) of
+ SOME ((() , s5060_0)) =>
+ (case ((string_drop s5059_0 s5060_0)) of
+ s5061_0 =>
+ (case ((reg_name_matches_prefix s5061_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5062_0)) =>
+ (case ((string_drop s5061_0 s5062_0)) of
+ s5063_0 =>
+ (case ((sep_matches_prefix s5063_0)) of
+ SOME ((() , s5064_0)) =>
+ (case ((string_drop s5063_0 s5064_0)) of
+ s5065_0 =>
+ (case ((freg_name_matches_prefix s5065_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5066_0)) =>
+ let p0_ = (string_drop s5065_0 s5066_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_D, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5042_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s5042_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s5043_0=
+ ((case s5043_0 of
+ s5044_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s5044_0)) of
+ SOME ((FMV_D_X, s5045_0)) =>
+ (case ((string_drop s5044_0 s5045_0)) of
+ s5046_0 =>
+ (case ((spc_matches_prefix0 s5046_0)) of
+ SOME ((() , s5047_0)) =>
+ (case ((string_drop s5046_0 s5047_0)) of
+ s5048_0 =>
+ (case ((freg_name_matches_prefix s5048_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5049_0)) =>
+ (case ((string_drop s5048_0 s5049_0)) of
+ s5050_0 =>
+ (case ((sep_matches_prefix s5050_0)) of
+ SOME ((() , s5051_0)) =>
+ (case ((string_drop s5050_0 s5051_0)) of
+ s5052_0 =>
+ (case ((reg_name_matches_prefix s5052_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5053_0)) =>
+ let p0_ = (string_drop s5052_0 s5053_0) in
+ if (((p0_ = ""))) then SOME (FMV_D_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5029_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s5029_:string ->(f_un_op_D#(5)words$word#(5)words$word)option) s5030_0=
+ ((case s5030_0 of
+ s5031_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s5031_0)) of
+ SOME ((FMV_X_D, s5032_0)) =>
+ (case ((string_drop s5031_0 s5032_0)) of
+ s5033_0 =>
+ (case ((spc_matches_prefix0 s5033_0)) of
+ SOME ((() , s5034_0)) =>
+ (case ((string_drop s5033_0 s5034_0)) of
+ s5035_0 =>
+ (case ((reg_name_matches_prefix s5035_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5036_0)) =>
+ (case ((string_drop s5035_0 s5036_0)) of
+ s5037_0 =>
+ (case ((sep_matches_prefix s5037_0)) of
+ SOME ((() , s5038_0)) =>
+ (case ((string_drop s5037_0 s5038_0)) of
+ s5039_0 =>
+ (case ((freg_name_matches_prefix s5039_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5040_0)) =>
+ let p0_ = (string_drop s5039_0 s5040_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_D, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5012_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s5012_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s5013_0=
+ ((case s5013_0 of
+ s5014_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s5014_0)) of
+ SOME ((FLE_D, s5015_0)) =>
+ (case ((string_drop s5014_0 s5015_0)) of
+ s5016_0 =>
+ (case ((spc_matches_prefix0 s5016_0)) of
+ SOME ((() , s5017_0)) =>
+ (case ((string_drop s5016_0 s5017_0)) of
+ s5018_0 =>
+ (case ((reg_name_matches_prefix s5018_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5019_0)) =>
+ (case ((string_drop s5018_0 s5019_0)) of
+ s5020_0 =>
+ (case ((sep_matches_prefix s5020_0)) of
+ SOME ((() , s5021_0)) =>
+ (case ((string_drop s5020_0 s5021_0)) of
+ s5022_0 =>
+ (case ((freg_name_matches_prefix s5022_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5023_0)) =>
+ (case ((string_drop s5022_0 s5023_0)) of
+ s5024_0 =>
+ (case ((sep_matches_prefix s5024_0)) of
+ SOME ((() , s5025_0)) =>
+ (case ((string_drop s5024_0 s5025_0)) of
+ s5026_0 =>
+ (case ((freg_name_matches_prefix s5026_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5027_0)) =>
+ let p0_ = (string_drop s5026_0 s5027_0) in
+ if (((p0_ = ""))) then SOME (FLE_D, rd, rs1, rs2) else NONE
| _ => NONE
)
)
@@ -27963,45 +45765,3169 @@ val _ = Define `
)))`;
-(*val _s2506_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12))*)
+(*val _s4995_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4995_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4996_0=
+ ((case s4996_0 of
+ s4997_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4997_0)) of
+ SOME ((FLT_D, s4998_0)) =>
+ (case ((string_drop s4997_0 s4998_0)) of
+ s4999_0 =>
+ (case ((spc_matches_prefix0 s4999_0)) of
+ SOME ((() , s5000_0)) =>
+ (case ((string_drop s4999_0 s5000_0)) of
+ s5001_0 =>
+ (case ((reg_name_matches_prefix s5001_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5002_0)) =>
+ (case ((string_drop s5001_0 s5002_0)) of
+ s5003_0 =>
+ (case ((sep_matches_prefix s5003_0)) of
+ SOME ((() , s5004_0)) =>
+ (case ((string_drop s5003_0 s5004_0)) of
+ s5005_0 =>
+ (case ((freg_name_matches_prefix s5005_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5006_0)) =>
+ (case ((string_drop s5005_0 s5006_0)) of
+ s5007_0 =>
+ (case ((sep_matches_prefix s5007_0)) of
+ SOME ((() , s5008_0)) =>
+ (case ((string_drop s5007_0 s5008_0)) of
+ s5009_0 =>
+ (case ((freg_name_matches_prefix s5009_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5010_0)) =>
+ let p0_ = (string_drop s5009_0 s5010_0) in
+ if (((p0_ = ""))) then SOME (FLT_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4978_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4978_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4979_0=
+ ((case s4979_0 of
+ s4980_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4980_0)) of
+ SOME ((FEQ_D, s4981_0)) =>
+ (case ((string_drop s4980_0 s4981_0)) of
+ s4982_0 =>
+ (case ((spc_matches_prefix0 s4982_0)) of
+ SOME ((() , s4983_0)) =>
+ (case ((string_drop s4982_0 s4983_0)) of
+ s4984_0 =>
+ (case ((reg_name_matches_prefix s4984_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4985_0)) =>
+ (case ((string_drop s4984_0 s4985_0)) of
+ s4986_0 =>
+ (case ((sep_matches_prefix s4986_0)) of
+ SOME ((() , s4987_0)) =>
+ (case ((string_drop s4986_0 s4987_0)) of
+ s4988_0 =>
+ (case ((freg_name_matches_prefix s4988_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4989_0)) =>
+ (case ((string_drop s4988_0 s4989_0)) of
+ s4990_0 =>
+ (case ((sep_matches_prefix s4990_0)) of
+ SOME ((() , s4991_0)) =>
+ (case ((string_drop s4990_0 s4991_0)) of
+ s4992_0 =>
+ (case ((freg_name_matches_prefix s4992_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4993_0)) =>
+ let p0_ = (string_drop s4992_0 s4993_0) in
+ if (((p0_ = ""))) then SOME (FEQ_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4961_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4961_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4962_0=
+ ((case s4962_0 of
+ s4963_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4963_0)) of
+ SOME ((FMAX_D, s4964_0)) =>
+ (case ((string_drop s4963_0 s4964_0)) of
+ s4965_0 =>
+ (case ((spc_matches_prefix0 s4965_0)) of
+ SOME ((() , s4966_0)) =>
+ (case ((string_drop s4965_0 s4966_0)) of
+ s4967_0 =>
+ (case ((freg_name_matches_prefix s4967_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4968_0)) =>
+ (case ((string_drop s4967_0 s4968_0)) of
+ s4969_0 =>
+ (case ((sep_matches_prefix s4969_0)) of
+ SOME ((() , s4970_0)) =>
+ (case ((string_drop s4969_0 s4970_0)) of
+ s4971_0 =>
+ (case ((freg_name_matches_prefix s4971_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4972_0)) =>
+ (case ((string_drop s4971_0 s4972_0)) of
+ s4973_0 =>
+ (case ((sep_matches_prefix s4973_0)) of
+ SOME ((() , s4974_0)) =>
+ (case ((string_drop s4973_0 s4974_0)) of
+ s4975_0 =>
+ (case ((freg_name_matches_prefix s4975_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4976_0)) =>
+ let p0_ = (string_drop s4975_0 s4976_0) in
+ if (((p0_ = ""))) then SOME (FMAX_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4944_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4944_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4945_0=
+ ((case s4945_0 of
+ s4946_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4946_0)) of
+ SOME ((FMIN_D, s4947_0)) =>
+ (case ((string_drop s4946_0 s4947_0)) of
+ s4948_0 =>
+ (case ((spc_matches_prefix0 s4948_0)) of
+ SOME ((() , s4949_0)) =>
+ (case ((string_drop s4948_0 s4949_0)) of
+ s4950_0 =>
+ (case ((freg_name_matches_prefix s4950_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4951_0)) =>
+ (case ((string_drop s4950_0 s4951_0)) of
+ s4952_0 =>
+ (case ((sep_matches_prefix s4952_0)) of
+ SOME ((() , s4953_0)) =>
+ (case ((string_drop s4952_0 s4953_0)) of
+ s4954_0 =>
+ (case ((freg_name_matches_prefix s4954_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4955_0)) =>
+ (case ((string_drop s4954_0 s4955_0)) of
+ s4956_0 =>
+ (case ((sep_matches_prefix s4956_0)) of
+ SOME ((() , s4957_0)) =>
+ (case ((string_drop s4956_0 s4957_0)) of
+ s4958_0 =>
+ (case ((freg_name_matches_prefix s4958_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4959_0)) =>
+ let p0_ = (string_drop s4958_0 s4959_0) in
+ if (((p0_ = ""))) then SOME (FMIN_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4927_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4927_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4928_0=
+ ((case s4928_0 of
+ s4929_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4929_0)) of
+ SOME ((FSGNJX_D, s4930_0)) =>
+ (case ((string_drop s4929_0 s4930_0)) of
+ s4931_0 =>
+ (case ((spc_matches_prefix0 s4931_0)) of
+ SOME ((() , s4932_0)) =>
+ (case ((string_drop s4931_0 s4932_0)) of
+ s4933_0 =>
+ (case ((freg_name_matches_prefix s4933_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4934_0)) =>
+ (case ((string_drop s4933_0 s4934_0)) of
+ s4935_0 =>
+ (case ((sep_matches_prefix s4935_0)) of
+ SOME ((() , s4936_0)) =>
+ (case ((string_drop s4935_0 s4936_0)) of
+ s4937_0 =>
+ (case ((freg_name_matches_prefix s4937_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4938_0)) =>
+ (case ((string_drop s4937_0 s4938_0)) of
+ s4939_0 =>
+ (case ((sep_matches_prefix s4939_0)) of
+ SOME ((() , s4940_0)) =>
+ (case ((string_drop s4939_0 s4940_0)) of
+ s4941_0 =>
+ (case ((freg_name_matches_prefix s4941_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4942_0)) =>
+ let p0_ = (string_drop s4941_0 s4942_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4910_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4910_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4911_0=
+ ((case s4911_0 of
+ s4912_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4912_0)) of
+ SOME ((FSGNJN_D, s4913_0)) =>
+ (case ((string_drop s4912_0 s4913_0)) of
+ s4914_0 =>
+ (case ((spc_matches_prefix0 s4914_0)) of
+ SOME ((() , s4915_0)) =>
+ (case ((string_drop s4914_0 s4915_0)) of
+ s4916_0 =>
+ (case ((freg_name_matches_prefix s4916_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4917_0)) =>
+ (case ((string_drop s4916_0 s4917_0)) of
+ s4918_0 =>
+ (case ((sep_matches_prefix s4918_0)) of
+ SOME ((() , s4919_0)) =>
+ (case ((string_drop s4918_0 s4919_0)) of
+ s4920_0 =>
+ (case ((freg_name_matches_prefix s4920_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4921_0)) =>
+ (case ((string_drop s4920_0 s4921_0)) of
+ s4922_0 =>
+ (case ((sep_matches_prefix s4922_0)) of
+ SOME ((() , s4923_0)) =>
+ (case ((string_drop s4922_0 s4923_0)) of
+ s4924_0 =>
+ (case ((freg_name_matches_prefix s4924_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4925_0)) =>
+ let p0_ = (string_drop s4924_0 s4925_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4893_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4893_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word)option) s4894_0=
+ ((case s4894_0 of
+ s4895_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s4895_0)) of
+ SOME ((FSGNJ_D, s4896_0)) =>
+ (case ((string_drop s4895_0 s4896_0)) of
+ s4897_0 =>
+ (case ((spc_matches_prefix0 s4897_0)) of
+ SOME ((() , s4898_0)) =>
+ (case ((string_drop s4897_0 s4898_0)) of
+ s4899_0 =>
+ (case ((freg_name_matches_prefix s4899_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4900_0)) =>
+ (case ((string_drop s4899_0 s4900_0)) of
+ s4901_0 =>
+ (case ((sep_matches_prefix s4901_0)) of
+ SOME ((() , s4902_0)) =>
+ (case ((string_drop s4901_0 s4902_0)) of
+ s4903_0 =>
+ (case ((freg_name_matches_prefix s4903_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4904_0)) =>
+ (case ((string_drop s4903_0 s4904_0)) of
+ s4905_0 =>
+ (case ((sep_matches_prefix s4905_0)) of
+ SOME ((() , s4906_0)) =>
+ (case ((string_drop s4905_0 s4906_0)) of
+ s4907_0 =>
+ (case ((freg_name_matches_prefix s4907_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4908_0)) =>
+ let p0_ = (string_drop s4907_0 s4908_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_D, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4876_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4876_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4877_0=
+ ((case s4877_0 of
+ s4878_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4878_0)) of
+ SOME ((FCVT_D_S, s4879_0)) =>
+ (case ((string_drop s4878_0 s4879_0)) of
+ s4880_0 =>
+ (case ((spc_matches_prefix0 s4880_0)) of
+ SOME ((() , s4881_0)) =>
+ (case ((string_drop s4880_0 s4881_0)) of
+ s4882_0 =>
+ (case ((freg_name_matches_prefix s4882_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4883_0)) =>
+ (case ((string_drop s4882_0 s4883_0)) of
+ s4884_0 =>
+ (case ((sep_matches_prefix s4884_0)) of
+ SOME ((() , s4885_0)) =>
+ (case ((string_drop s4884_0 s4885_0)) of
+ s4886_0 =>
+ (case ((freg_name_matches_prefix s4886_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4887_0)) =>
+ (case ((string_drop s4886_0 s4887_0)) of
+ s4888_0 =>
+ (case ((sep_matches_prefix s4888_0)) of
+ SOME ((() , s4889_0)) =>
+ (case ((string_drop s4888_0 s4889_0)) of
+ s4890_0 =>
+ (case ((frm_mnemonic_matches_prefix s4890_0)) of
+ SOME ((rm, s4891_0)) =>
+ let p0_ = (string_drop s4890_0 s4891_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4859_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4859_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4860_0=
+ ((case s4860_0 of
+ s4861_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4861_0)) of
+ SOME ((FCVT_S_D, s4862_0)) =>
+ (case ((string_drop s4861_0 s4862_0)) of
+ s4863_0 =>
+ (case ((spc_matches_prefix0 s4863_0)) of
+ SOME ((() , s4864_0)) =>
+ (case ((string_drop s4863_0 s4864_0)) of
+ s4865_0 =>
+ (case ((freg_name_matches_prefix s4865_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4866_0)) =>
+ (case ((string_drop s4865_0 s4866_0)) of
+ s4867_0 =>
+ (case ((sep_matches_prefix s4867_0)) of
+ SOME ((() , s4868_0)) =>
+ (case ((string_drop s4867_0 s4868_0)) of
+ s4869_0 =>
+ (case ((freg_name_matches_prefix s4869_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4870_0)) =>
+ (case ((string_drop s4869_0 s4870_0)) of
+ s4871_0 =>
+ (case ((sep_matches_prefix s4871_0)) of
+ SOME ((() , s4872_0)) =>
+ (case ((string_drop s4871_0 s4872_0)) of
+ s4873_0 =>
+ (case ((frm_mnemonic_matches_prefix s4873_0)) of
+ SOME ((rm, s4874_0)) =>
+ let p0_ = (string_drop s4873_0 s4874_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4842_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4842_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4843_0=
+ ((case s4843_0 of
+ s4844_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4844_0)) of
+ SOME ((FCVT_D_LU, s4845_0)) =>
+ (case ((string_drop s4844_0 s4845_0)) of
+ s4846_0 =>
+ (case ((spc_matches_prefix0 s4846_0)) of
+ SOME ((() , s4847_0)) =>
+ (case ((string_drop s4846_0 s4847_0)) of
+ s4848_0 =>
+ (case ((freg_name_matches_prefix s4848_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4849_0)) =>
+ (case ((string_drop s4848_0 s4849_0)) of
+ s4850_0 =>
+ (case ((sep_matches_prefix s4850_0)) of
+ SOME ((() , s4851_0)) =>
+ (case ((string_drop s4850_0 s4851_0)) of
+ s4852_0 =>
+ (case ((reg_name_matches_prefix s4852_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4853_0)) =>
+ (case ((string_drop s4852_0 s4853_0)) of
+ s4854_0 =>
+ (case ((sep_matches_prefix s4854_0)) of
+ SOME ((() , s4855_0)) =>
+ (case ((string_drop s4854_0 s4855_0)) of
+ s4856_0 =>
+ (case ((frm_mnemonic_matches_prefix s4856_0)) of
+ SOME ((rm, s4857_0)) =>
+ let p0_ = (string_drop s4856_0 s4857_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4825_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4825_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4826_0=
+ ((case s4826_0 of
+ s4827_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4827_0)) of
+ SOME ((FCVT_D_L, s4828_0)) =>
+ (case ((string_drop s4827_0 s4828_0)) of
+ s4829_0 =>
+ (case ((spc_matches_prefix0 s4829_0)) of
+ SOME ((() , s4830_0)) =>
+ (case ((string_drop s4829_0 s4830_0)) of
+ s4831_0 =>
+ (case ((freg_name_matches_prefix s4831_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4832_0)) =>
+ (case ((string_drop s4831_0 s4832_0)) of
+ s4833_0 =>
+ (case ((sep_matches_prefix s4833_0)) of
+ SOME ((() , s4834_0)) =>
+ (case ((string_drop s4833_0 s4834_0)) of
+ s4835_0 =>
+ (case ((reg_name_matches_prefix s4835_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4836_0)) =>
+ (case ((string_drop s4835_0 s4836_0)) of
+ s4837_0 =>
+ (case ((sep_matches_prefix s4837_0)) of
+ SOME ((() , s4838_0)) =>
+ (case ((string_drop s4837_0 s4838_0)) of
+ s4839_0 =>
+ (case ((frm_mnemonic_matches_prefix s4839_0)) of
+ SOME ((rm, s4840_0)) =>
+ let p0_ = (string_drop s4839_0 s4840_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4808_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4808_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4809_0=
+ ((case s4809_0 of
+ s4810_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4810_0)) of
+ SOME ((FCVT_LU_D, s4811_0)) =>
+ (case ((string_drop s4810_0 s4811_0)) of
+ s4812_0 =>
+ (case ((spc_matches_prefix0 s4812_0)) of
+ SOME ((() , s4813_0)) =>
+ (case ((string_drop s4812_0 s4813_0)) of
+ s4814_0 =>
+ (case ((reg_name_matches_prefix s4814_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4815_0)) =>
+ (case ((string_drop s4814_0 s4815_0)) of
+ s4816_0 =>
+ (case ((sep_matches_prefix s4816_0)) of
+ SOME ((() , s4817_0)) =>
+ (case ((string_drop s4816_0 s4817_0)) of
+ s4818_0 =>
+ (case ((freg_name_matches_prefix s4818_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4819_0)) =>
+ (case ((string_drop s4818_0 s4819_0)) of
+ s4820_0 =>
+ (case ((sep_matches_prefix s4820_0)) of
+ SOME ((() , s4821_0)) =>
+ (case ((string_drop s4820_0 s4821_0)) of
+ s4822_0 =>
+ (case ((frm_mnemonic_matches_prefix s4822_0)) of
+ SOME ((rm, s4823_0)) =>
+ let p0_ = (string_drop s4822_0 s4823_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4791_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4791_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4792_0=
+ ((case s4792_0 of
+ s4793_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4793_0)) of
+ SOME ((FCVT_L_D, s4794_0)) =>
+ (case ((string_drop s4793_0 s4794_0)) of
+ s4795_0 =>
+ (case ((spc_matches_prefix0 s4795_0)) of
+ SOME ((() , s4796_0)) =>
+ (case ((string_drop s4795_0 s4796_0)) of
+ s4797_0 =>
+ (case ((reg_name_matches_prefix s4797_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4798_0)) =>
+ (case ((string_drop s4797_0 s4798_0)) of
+ s4799_0 =>
+ (case ((sep_matches_prefix s4799_0)) of
+ SOME ((() , s4800_0)) =>
+ (case ((string_drop s4799_0 s4800_0)) of
+ s4801_0 =>
+ (case ((freg_name_matches_prefix s4801_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4802_0)) =>
+ (case ((string_drop s4801_0 s4802_0)) of
+ s4803_0 =>
+ (case ((sep_matches_prefix s4803_0)) of
+ SOME ((() , s4804_0)) =>
+ (case ((string_drop s4803_0 s4804_0)) of
+ s4805_0 =>
+ (case ((frm_mnemonic_matches_prefix s4805_0)) of
+ SOME ((rm, s4806_0)) =>
+ let p0_ = (string_drop s4805_0 s4806_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4774_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4774_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4775_0=
+ ((case s4775_0 of
+ s4776_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4776_0)) of
+ SOME ((FCVT_D_WU, s4777_0)) =>
+ (case ((string_drop s4776_0 s4777_0)) of
+ s4778_0 =>
+ (case ((spc_matches_prefix0 s4778_0)) of
+ SOME ((() , s4779_0)) =>
+ (case ((string_drop s4778_0 s4779_0)) of
+ s4780_0 =>
+ (case ((freg_name_matches_prefix s4780_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4781_0)) =>
+ (case ((string_drop s4780_0 s4781_0)) of
+ s4782_0 =>
+ (case ((sep_matches_prefix s4782_0)) of
+ SOME ((() , s4783_0)) =>
+ (case ((string_drop s4782_0 s4783_0)) of
+ s4784_0 =>
+ (case ((reg_name_matches_prefix s4784_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4785_0)) =>
+ (case ((string_drop s4784_0 s4785_0)) of
+ s4786_0 =>
+ (case ((sep_matches_prefix s4786_0)) of
+ SOME ((() , s4787_0)) =>
+ (case ((string_drop s4786_0 s4787_0)) of
+ s4788_0 =>
+ (case ((frm_mnemonic_matches_prefix s4788_0)) of
+ SOME ((rm, s4789_0)) =>
+ let p0_ = (string_drop s4788_0 s4789_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4757_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4757_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4758_0=
+ ((case s4758_0 of
+ s4759_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4759_0)) of
+ SOME ((FCVT_D_W, s4760_0)) =>
+ (case ((string_drop s4759_0 s4760_0)) of
+ s4761_0 =>
+ (case ((spc_matches_prefix0 s4761_0)) of
+ SOME ((() , s4762_0)) =>
+ (case ((string_drop s4761_0 s4762_0)) of
+ s4763_0 =>
+ (case ((freg_name_matches_prefix s4763_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4764_0)) =>
+ (case ((string_drop s4763_0 s4764_0)) of
+ s4765_0 =>
+ (case ((sep_matches_prefix s4765_0)) of
+ SOME ((() , s4766_0)) =>
+ (case ((string_drop s4765_0 s4766_0)) of
+ s4767_0 =>
+ (case ((reg_name_matches_prefix s4767_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4768_0)) =>
+ (case ((string_drop s4767_0 s4768_0)) of
+ s4769_0 =>
+ (case ((sep_matches_prefix s4769_0)) of
+ SOME ((() , s4770_0)) =>
+ (case ((string_drop s4769_0 s4770_0)) of
+ s4771_0 =>
+ (case ((frm_mnemonic_matches_prefix s4771_0)) of
+ SOME ((rm, s4772_0)) =>
+ let p0_ = (string_drop s4771_0 s4772_0) in
+ if (((p0_ = ""))) then SOME (FCVT_D_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4740_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4740_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4741_0=
+ ((case s4741_0 of
+ s4742_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4742_0)) of
+ SOME ((FCVT_WU_D, s4743_0)) =>
+ (case ((string_drop s4742_0 s4743_0)) of
+ s4744_0 =>
+ (case ((spc_matches_prefix0 s4744_0)) of
+ SOME ((() , s4745_0)) =>
+ (case ((string_drop s4744_0 s4745_0)) of
+ s4746_0 =>
+ (case ((reg_name_matches_prefix s4746_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4747_0)) =>
+ (case ((string_drop s4746_0 s4747_0)) of
+ s4748_0 =>
+ (case ((sep_matches_prefix s4748_0)) of
+ SOME ((() , s4749_0)) =>
+ (case ((string_drop s4748_0 s4749_0)) of
+ s4750_0 =>
+ (case ((freg_name_matches_prefix s4750_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4751_0)) =>
+ (case ((string_drop s4750_0 s4751_0)) of
+ s4752_0 =>
+ (case ((sep_matches_prefix s4752_0)) of
+ SOME ((() , s4753_0)) =>
+ (case ((string_drop s4752_0 s4753_0)) of
+ s4754_0 =>
+ (case ((frm_mnemonic_matches_prefix s4754_0)) of
+ SOME ((rm, s4755_0)) =>
+ let p0_ = (string_drop s4754_0 s4755_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4723_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4723_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4724_0=
+ ((case s4724_0 of
+ s4725_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4725_0)) of
+ SOME ((FCVT_W_D, s4726_0)) =>
+ (case ((string_drop s4725_0 s4726_0)) of
+ s4727_0 =>
+ (case ((spc_matches_prefix0 s4727_0)) of
+ SOME ((() , s4728_0)) =>
+ (case ((string_drop s4727_0 s4728_0)) of
+ s4729_0 =>
+ (case ((reg_name_matches_prefix s4729_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4730_0)) =>
+ (case ((string_drop s4729_0 s4730_0)) of
+ s4731_0 =>
+ (case ((sep_matches_prefix s4731_0)) of
+ SOME ((() , s4732_0)) =>
+ (case ((string_drop s4731_0 s4732_0)) of
+ s4733_0 =>
+ (case ((freg_name_matches_prefix s4733_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4734_0)) =>
+ (case ((string_drop s4733_0 s4734_0)) of
+ s4735_0 =>
+ (case ((sep_matches_prefix s4735_0)) of
+ SOME ((() , s4736_0)) =>
+ (case ((string_drop s4735_0 s4736_0)) of
+ s4737_0 =>
+ (case ((frm_mnemonic_matches_prefix s4737_0)) of
+ SOME ((rm, s4738_0)) =>
+ let p0_ = (string_drop s4737_0 s4738_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4706_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4706_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode)option) s4707_0=
+ ((case s4707_0 of
+ s4708_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s4708_0)) of
+ SOME ((FSQRT_D, s4709_0)) =>
+ (case ((string_drop s4708_0 s4709_0)) of
+ s4710_0 =>
+ (case ((spc_matches_prefix0 s4710_0)) of
+ SOME ((() , s4711_0)) =>
+ (case ((string_drop s4710_0 s4711_0)) of
+ s4712_0 =>
+ (case ((freg_name_matches_prefix s4712_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4713_0)) =>
+ (case ((string_drop s4712_0 s4713_0)) of
+ s4714_0 =>
+ (case ((sep_matches_prefix s4714_0)) of
+ SOME ((() , s4715_0)) =>
+ (case ((string_drop s4714_0 s4715_0)) of
+ s4716_0 =>
+ (case ((freg_name_matches_prefix s4716_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4717_0)) =>
+ (case ((string_drop s4716_0 s4717_0)) of
+ s4718_0 =>
+ (case ((sep_matches_prefix s4718_0)) of
+ SOME ((() , s4719_0)) =>
+ (case ((string_drop s4718_0 s4719_0)) of
+ s4720_0 =>
+ (case ((frm_mnemonic_matches_prefix s4720_0)) of
+ SOME ((rm, s4721_0)) =>
+ let p0_ = (string_drop s4720_0 s4721_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_D, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4685_ : string -> maybe ((f_bin_rm_op_D * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4685_:string ->(f_bin_rm_op_D#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s4686_0=
+ ((case s4686_0 of
+ s4687_0 =>
+ (case ((f_bin_rm_type_mnemonic_D_matches_prefix s4687_0)) of
+ SOME ((op, s4688_0)) =>
+ (case ((string_drop s4687_0 s4688_0)) of
+ s4689_0 =>
+ (case ((spc_matches_prefix0 s4689_0)) of
+ SOME ((() , s4690_0)) =>
+ (case ((string_drop s4689_0 s4690_0)) of
+ s4691_0 =>
+ (case ((freg_name_matches_prefix s4691_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4692_0)) =>
+ (case ((string_drop s4691_0 s4692_0)) of
+ s4693_0 =>
+ (case ((sep_matches_prefix s4693_0)) of
+ SOME ((() , s4694_0)) =>
+ (case ((string_drop s4693_0 s4694_0)) of
+ s4695_0 =>
+ (case ((freg_name_matches_prefix s4695_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4696_0)) =>
+ (case ((string_drop s4695_0 s4696_0)) of
+ s4697_0 =>
+ (case ((sep_matches_prefix s4697_0)) of
+ SOME ((() , s4698_0)) =>
+ (case ((string_drop s4697_0 s4698_0)) of
+ s4699_0 =>
+ (case ((freg_name_matches_prefix s4699_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4700_0)) =>
+ (case ((string_drop s4699_0 s4700_0)) of
+ s4701_0 =>
+ (case ((sep_matches_prefix s4701_0)) of
+ SOME ((() , s4702_0)) =>
+ (case ((string_drop s4701_0 s4702_0)) of
+ s4703_0 =>
+ (case ((frm_mnemonic_matches_prefix s4703_0)) of
+ SOME ((rm, s4704_0)) =>
+ let p0_ = (string_drop s4703_0 s4704_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4660_ : string -> maybe ((f_madd_op_D * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4660_:string ->(f_madd_op_D#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s4661_0=
+ ((case s4661_0 of
+ s4662_0 =>
+ (case ((f_madd_type_mnemonic_D_matches_prefix s4662_0)) of
+ SOME ((op, s4663_0)) =>
+ (case ((string_drop s4662_0 s4663_0)) of
+ s4664_0 =>
+ (case ((spc_matches_prefix0 s4664_0)) of
+ SOME ((() , s4665_0)) =>
+ (case ((string_drop s4664_0 s4665_0)) of
+ s4666_0 =>
+ (case ((freg_name_matches_prefix s4666_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4667_0)) =>
+ (case ((string_drop s4666_0 s4667_0)) of
+ s4668_0 =>
+ (case ((sep_matches_prefix s4668_0)) of
+ SOME ((() , s4669_0)) =>
+ (case ((string_drop s4668_0 s4669_0)) of
+ s4670_0 =>
+ (case ((freg_name_matches_prefix s4670_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4671_0)) =>
+ (case ((string_drop s4670_0 s4671_0)) of
+ s4672_0 =>
+ (case ((sep_matches_prefix s4672_0)) of
+ SOME ((() , s4673_0)) =>
+ (case ((string_drop s4672_0 s4673_0)) of
+ s4674_0 =>
+ (case ((freg_name_matches_prefix s4674_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4675_0)) =>
+ (case ((string_drop s4674_0 s4675_0)) of
+ s4676_0 =>
+ (case ((sep_matches_prefix s4676_0)) of
+ SOME ((() , s4677_0)) =>
+ (case ((string_drop s4676_0 s4677_0)) of
+ s4678_0 =>
+ (case ((freg_name_matches_prefix s4678_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s4679_0)) =>
+ (case ((string_drop s4678_0 s4679_0)) of
+ s4680_0 =>
+ (case ((sep_matches_prefix s4680_0)) of
+ SOME ((() , s4681_0)) =>
+ (case ((string_drop s4680_0 s4681_0)) of
+ s4682_0 =>
+ (case ((frm_mnemonic_matches_prefix s4682_0)) of
+ SOME ((rm, s4683_0)) =>
+ let p0_ = (string_drop s4682_0 s4683_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4644_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s4644_:string ->((3)words$word#(3)words$word#(5)words$word)option) s4645_0=
+ (let s4646_0 = s4645_0 in
+ if ((string_startswith s4646_0 "c.fsw")) then
+ (case ((string_drop s4646_0 ((string_length "c.fsw")))) of
+ s4647_0 =>
+ (case ((spc_matches_prefix0 s4647_0)) of
+ SOME ((() , s4648_0)) =>
+ (case ((string_drop s4647_0 s4648_0)) of
+ s4649_0 =>
+ (case ((creg_name_matches_prefix s4649_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s4650_0)) =>
+ (case ((string_drop s4649_0 s4650_0)) of
+ s4651_0 =>
+ (case ((sep_matches_prefix s4651_0)) of
+ SOME ((() , s4652_0)) =>
+ (case ((string_drop s4651_0 s4652_0)) of
+ s4653_0 =>
+ (case ((creg_name_matches_prefix s4653_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s4654_0)) =>
+ (case ((string_drop s4653_0 s4654_0)) of
+ s4655_0 =>
+ (case ((sep_matches_prefix s4655_0)) of
+ SOME ((() , s4656_0)) =>
+ (case ((string_drop s4655_0 s4656_0)) of
+ s4657_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4657_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1466, s4658_0)) =>
+ if (((((subrange_vec_dec v__1466 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1466 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1466 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s4657_0 s4658_0) in
+ if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4628_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+
+val _ = Define `
+ ((s4628_:string ->((3)words$word#(3)words$word#(5)words$word)option) s4629_0=
+ (let s4630_0 = s4629_0 in
+ if ((string_startswith s4630_0 "c.flw")) then
+ (case ((string_drop s4630_0 ((string_length "c.flw")))) of
+ s4631_0 =>
+ (case ((spc_matches_prefix0 s4631_0)) of
+ SOME ((() , s4632_0)) =>
+ (case ((string_drop s4631_0 s4632_0)) of
+ s4633_0 =>
+ (case ((creg_name_matches_prefix s4633_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s4634_0)) =>
+ (case ((string_drop s4633_0 s4634_0)) of
+ s4635_0 =>
+ (case ((sep_matches_prefix s4635_0)) of
+ SOME ((() , s4636_0)) =>
+ (case ((string_drop s4635_0 s4636_0)) of
+ s4637_0 =>
+ (case ((creg_name_matches_prefix s4637_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s4638_0)) =>
+ (case ((string_drop s4637_0 s4638_0)) of
+ s4639_0 =>
+ (case ((sep_matches_prefix s4639_0)) of
+ SOME ((() , s4640_0)) =>
+ (case ((string_drop s4639_0 s4640_0)) of
+ s4641_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4641_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1468, s4642_0)) =>
+ if (((((subrange_vec_dec v__1468 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1468 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1468 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s4641_0 s4642_0) in
+ if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4616_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s4616_:string ->((5)words$word#(6)words$word)option) s4617_0=
+ (let s4618_0 = s4617_0 in
+ if ((string_startswith s4618_0 "c.fswsp")) then
+ (case ((string_drop s4618_0 ((string_length "c.fswsp")))) of
+ s4619_0 =>
+ (case ((spc_matches_prefix0 s4619_0)) of
+ SOME ((() , s4620_0)) =>
+ (case ((string_drop s4619_0 s4620_0)) of
+ s4621_0 =>
+ (case ((reg_name_matches_prefix s4621_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4622_0)) =>
+ (case ((string_drop s4621_0 s4622_0)) of
+ s4623_0 =>
+ (case ((sep_matches_prefix s4623_0)) of
+ SOME ((() , s4624_0)) =>
+ (case ((string_drop s4623_0 s4624_0)) of
+ s4625_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4625_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s4626_0)) =>
+ let p0_ = (string_drop s4625_0 s4626_0) in
+ if (((p0_ = ""))) then SOME (rd, uimm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4604_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2506_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word)option) s2507_0=
- ((case s2507_0 of
- s2508_0 =>
- (case ((csr_mnemonic_matches_prefix s2508_0)) of
- SOME ((op, s2509_0)) =>
- let s2510_0 = (string_drop s2508_0 s2509_0) in
- if ((string_startswith s2510_0 "i")) then
- (case ((string_drop s2510_0 ((string_length "i")))) of
- s2511_0 =>
- (case ((spc_matches_prefix0 s2511_0)) of
- SOME ((() , s2512_0)) =>
- (case ((string_drop s2511_0 s2512_0)) of
- s2513_0 =>
- (case ((reg_name_matches_prefix s2513_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2514_0)) =>
- (case ((string_drop s2513_0 s2514_0)) of
- s2515_0 =>
- (case ((sep_matches_prefix s2515_0)) of
- SOME ((() , s2516_0)) =>
- (case ((string_drop s2515_0 s2516_0)) of
- s2517_0 =>
+ ((s4604_:string ->((5)words$word#(6)words$word)option) s4605_0=
+ (let s4606_0 = s4605_0 in
+ if ((string_startswith s4606_0 "c.flwsp")) then
+ (case ((string_drop s4606_0 ((string_length "c.flwsp")))) of
+ s4607_0 =>
+ (case ((spc_matches_prefix0 s4607_0)) of
+ SOME ((() , s4608_0)) =>
+ (case ((string_drop s4607_0 s4608_0)) of
+ s4609_0 =>
+ (case ((reg_name_matches_prefix s4609_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4610_0)) =>
+ (case ((string_drop s4609_0 s4610_0)) of
+ s4611_0 =>
+ (case ((sep_matches_prefix s4611_0)) of
+ SOME ((() , s4612_0)) =>
+ (case ((string_drop s4611_0 s4612_0)) of
+ s4613_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4613_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4614_0)) =>
+ let p0_ = (string_drop s4613_0 s4614_0) in
+ if (((p0_ = ""))) then SOME (rd, imm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4591_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4591_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s4592_0=
+ ((case s4592_0 of
+ s4593_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s4593_0)) of
+ SOME ((FCLASS_S, s4594_0)) =>
+ (case ((string_drop s4593_0 s4594_0)) of
+ s4595_0 =>
+ (case ((spc_matches_prefix0 s4595_0)) of
+ SOME ((() , s4596_0)) =>
+ (case ((string_drop s4595_0 s4596_0)) of
+ s4597_0 =>
+ (case ((reg_name_matches_prefix s4597_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4598_0)) =>
+ (case ((string_drop s4597_0 s4598_0)) of
+ s4599_0 =>
+ (case ((sep_matches_prefix s4599_0)) of
+ SOME ((() , s4600_0)) =>
+ (case ((string_drop s4599_0 s4600_0)) of
+ s4601_0 =>
+ (case ((freg_name_matches_prefix s4601_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4602_0)) =>
+ let p0_ = (string_drop s4601_0 s4602_0) in
+ if (((p0_ = ""))) then SOME (FCLASS_S, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4578_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4578_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s4579_0=
+ ((case s4579_0 of
+ s4580_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s4580_0)) of
+ SOME ((FMV_W_X, s4581_0)) =>
+ (case ((string_drop s4580_0 s4581_0)) of
+ s4582_0 =>
+ (case ((spc_matches_prefix0 s4582_0)) of
+ SOME ((() , s4583_0)) =>
+ (case ((string_drop s4582_0 s4583_0)) of
+ s4584_0 =>
+ (case ((freg_name_matches_prefix s4584_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4585_0)) =>
+ (case ((string_drop s4584_0 s4585_0)) of
+ s4586_0 =>
+ (case ((sep_matches_prefix s4586_0)) of
+ SOME ((() , s4587_0)) =>
+ (case ((string_drop s4586_0 s4587_0)) of
+ s4588_0 =>
+ (case ((reg_name_matches_prefix s4588_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4589_0)) =>
+ let p0_ = (string_drop s4588_0 s4589_0) in
+ if (((p0_ = ""))) then SOME (FMV_W_X, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4565_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4565_:string ->(f_un_op_S#(5)words$word#(5)words$word)option) s4566_0=
+ ((case s4566_0 of
+ s4567_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s4567_0)) of
+ SOME ((FMV_X_W, s4568_0)) =>
+ (case ((string_drop s4567_0 s4568_0)) of
+ s4569_0 =>
+ (case ((spc_matches_prefix0 s4569_0)) of
+ SOME ((() , s4570_0)) =>
+ (case ((string_drop s4569_0 s4570_0)) of
+ s4571_0 =>
+ (case ((reg_name_matches_prefix s4571_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4572_0)) =>
+ (case ((string_drop s4571_0 s4572_0)) of
+ s4573_0 =>
+ (case ((sep_matches_prefix s4573_0)) of
+ SOME ((() , s4574_0)) =>
+ (case ((string_drop s4573_0 s4574_0)) of
+ s4575_0 =>
+ (case ((freg_name_matches_prefix s4575_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4576_0)) =>
+ let p0_ = (string_drop s4575_0 s4576_0) in
+ if (((p0_ = ""))) then SOME (FMV_X_W, rd, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4548_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4548_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4549_0=
+ ((case s4549_0 of
+ s4550_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4550_0)) of
+ SOME ((FLE_S, s4551_0)) =>
+ (case ((string_drop s4550_0 s4551_0)) of
+ s4552_0 =>
+ (case ((spc_matches_prefix0 s4552_0)) of
+ SOME ((() , s4553_0)) =>
+ (case ((string_drop s4552_0 s4553_0)) of
+ s4554_0 =>
+ (case ((reg_name_matches_prefix s4554_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4555_0)) =>
+ (case ((string_drop s4554_0 s4555_0)) of
+ s4556_0 =>
+ (case ((sep_matches_prefix s4556_0)) of
+ SOME ((() , s4557_0)) =>
+ (case ((string_drop s4556_0 s4557_0)) of
+ s4558_0 =>
+ (case ((freg_name_matches_prefix s4558_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4559_0)) =>
+ (case ((string_drop s4558_0 s4559_0)) of
+ s4560_0 =>
+ (case ((sep_matches_prefix s4560_0)) of
+ SOME ((() , s4561_0)) =>
+ (case ((string_drop s4560_0 s4561_0)) of
+ s4562_0 =>
+ (case ((freg_name_matches_prefix s4562_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4563_0)) =>
+ let p0_ = (string_drop s4562_0 s4563_0) in
+ if (((p0_ = ""))) then SOME (FLE_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4531_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4531_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4532_0=
+ ((case s4532_0 of
+ s4533_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4533_0)) of
+ SOME ((FLT_S, s4534_0)) =>
+ (case ((string_drop s4533_0 s4534_0)) of
+ s4535_0 =>
+ (case ((spc_matches_prefix0 s4535_0)) of
+ SOME ((() , s4536_0)) =>
+ (case ((string_drop s4535_0 s4536_0)) of
+ s4537_0 =>
+ (case ((reg_name_matches_prefix s4537_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4538_0)) =>
+ (case ((string_drop s4537_0 s4538_0)) of
+ s4539_0 =>
+ (case ((sep_matches_prefix s4539_0)) of
+ SOME ((() , s4540_0)) =>
+ (case ((string_drop s4539_0 s4540_0)) of
+ s4541_0 =>
+ (case ((freg_name_matches_prefix s4541_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4542_0)) =>
+ (case ((string_drop s4541_0 s4542_0)) of
+ s4543_0 =>
+ (case ((sep_matches_prefix s4543_0)) of
+ SOME ((() , s4544_0)) =>
+ (case ((string_drop s4543_0 s4544_0)) of
+ s4545_0 =>
+ (case ((freg_name_matches_prefix s4545_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4546_0)) =>
+ let p0_ = (string_drop s4545_0 s4546_0) in
+ if (((p0_ = ""))) then SOME (FLT_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4514_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4514_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4515_0=
+ ((case s4515_0 of
+ s4516_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4516_0)) of
+ SOME ((FEQ_S, s4517_0)) =>
+ (case ((string_drop s4516_0 s4517_0)) of
+ s4518_0 =>
+ (case ((spc_matches_prefix0 s4518_0)) of
+ SOME ((() , s4519_0)) =>
+ (case ((string_drop s4518_0 s4519_0)) of
+ s4520_0 =>
+ (case ((reg_name_matches_prefix s4520_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4521_0)) =>
+ (case ((string_drop s4520_0 s4521_0)) of
+ s4522_0 =>
+ (case ((sep_matches_prefix s4522_0)) of
+ SOME ((() , s4523_0)) =>
+ (case ((string_drop s4522_0 s4523_0)) of
+ s4524_0 =>
+ (case ((freg_name_matches_prefix s4524_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4525_0)) =>
+ (case ((string_drop s4524_0 s4525_0)) of
+ s4526_0 =>
+ (case ((sep_matches_prefix s4526_0)) of
+ SOME ((() , s4527_0)) =>
+ (case ((string_drop s4526_0 s4527_0)) of
+ s4528_0 =>
+ (case ((freg_name_matches_prefix s4528_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4529_0)) =>
+ let p0_ = (string_drop s4528_0 s4529_0) in
+ if (((p0_ = ""))) then SOME (FEQ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4497_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4497_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4498_0=
+ ((case s4498_0 of
+ s4499_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4499_0)) of
+ SOME ((FMAX_S, s4500_0)) =>
+ (case ((string_drop s4499_0 s4500_0)) of
+ s4501_0 =>
+ (case ((spc_matches_prefix0 s4501_0)) of
+ SOME ((() , s4502_0)) =>
+ (case ((string_drop s4501_0 s4502_0)) of
+ s4503_0 =>
+ (case ((freg_name_matches_prefix s4503_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4504_0)) =>
+ (case ((string_drop s4503_0 s4504_0)) of
+ s4505_0 =>
+ (case ((sep_matches_prefix s4505_0)) of
+ SOME ((() , s4506_0)) =>
+ (case ((string_drop s4505_0 s4506_0)) of
+ s4507_0 =>
+ (case ((freg_name_matches_prefix s4507_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4508_0)) =>
+ (case ((string_drop s4507_0 s4508_0)) of
+ s4509_0 =>
+ (case ((sep_matches_prefix s4509_0)) of
+ SOME ((() , s4510_0)) =>
+ (case ((string_drop s4509_0 s4510_0)) of
+ s4511_0 =>
+ (case ((freg_name_matches_prefix s4511_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4512_0)) =>
+ let p0_ = (string_drop s4511_0 s4512_0) in
+ if (((p0_ = ""))) then SOME (FMAX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4480_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4480_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4481_0=
+ ((case s4481_0 of
+ s4482_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4482_0)) of
+ SOME ((FMIN_S, s4483_0)) =>
+ (case ((string_drop s4482_0 s4483_0)) of
+ s4484_0 =>
+ (case ((spc_matches_prefix0 s4484_0)) of
+ SOME ((() , s4485_0)) =>
+ (case ((string_drop s4484_0 s4485_0)) of
+ s4486_0 =>
+ (case ((freg_name_matches_prefix s4486_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4487_0)) =>
+ (case ((string_drop s4486_0 s4487_0)) of
+ s4488_0 =>
+ (case ((sep_matches_prefix s4488_0)) of
+ SOME ((() , s4489_0)) =>
+ (case ((string_drop s4488_0 s4489_0)) of
+ s4490_0 =>
+ (case ((freg_name_matches_prefix s4490_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4491_0)) =>
+ (case ((string_drop s4490_0 s4491_0)) of
+ s4492_0 =>
+ (case ((sep_matches_prefix s4492_0)) of
+ SOME ((() , s4493_0)) =>
+ (case ((string_drop s4492_0 s4493_0)) of
+ s4494_0 =>
+ (case ((freg_name_matches_prefix s4494_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4495_0)) =>
+ let p0_ = (string_drop s4494_0 s4495_0) in
+ if (((p0_ = ""))) then SOME (FMIN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4463_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4463_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4464_0=
+ ((case s4464_0 of
+ s4465_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4465_0)) of
+ SOME ((FSGNJX_S, s4466_0)) =>
+ (case ((string_drop s4465_0 s4466_0)) of
+ s4467_0 =>
+ (case ((spc_matches_prefix0 s4467_0)) of
+ SOME ((() , s4468_0)) =>
+ (case ((string_drop s4467_0 s4468_0)) of
+ s4469_0 =>
+ (case ((freg_name_matches_prefix s4469_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4470_0)) =>
+ (case ((string_drop s4469_0 s4470_0)) of
+ s4471_0 =>
+ (case ((sep_matches_prefix s4471_0)) of
+ SOME ((() , s4472_0)) =>
+ (case ((string_drop s4471_0 s4472_0)) of
+ s4473_0 =>
+ (case ((freg_name_matches_prefix s4473_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4474_0)) =>
+ (case ((string_drop s4473_0 s4474_0)) of
+ s4475_0 =>
+ (case ((sep_matches_prefix s4475_0)) of
+ SOME ((() , s4476_0)) =>
+ (case ((string_drop s4475_0 s4476_0)) of
+ s4477_0 =>
+ (case ((freg_name_matches_prefix s4477_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4478_0)) =>
+ let p0_ = (string_drop s4477_0 s4478_0) in
+ if (((p0_ = ""))) then SOME (FSGNJX_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4446_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4446_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4447_0=
+ ((case s4447_0 of
+ s4448_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4448_0)) of
+ SOME ((FSGNJN_S, s4449_0)) =>
+ (case ((string_drop s4448_0 s4449_0)) of
+ s4450_0 =>
+ (case ((spc_matches_prefix0 s4450_0)) of
+ SOME ((() , s4451_0)) =>
+ (case ((string_drop s4450_0 s4451_0)) of
+ s4452_0 =>
+ (case ((freg_name_matches_prefix s4452_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4453_0)) =>
+ (case ((string_drop s4452_0 s4453_0)) of
+ s4454_0 =>
+ (case ((sep_matches_prefix s4454_0)) of
+ SOME ((() , s4455_0)) =>
+ (case ((string_drop s4454_0 s4455_0)) of
+ s4456_0 =>
+ (case ((freg_name_matches_prefix s4456_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4457_0)) =>
+ (case ((string_drop s4456_0 s4457_0)) of
+ s4458_0 =>
+ (case ((sep_matches_prefix s4458_0)) of
+ SOME ((() , s4459_0)) =>
+ (case ((string_drop s4458_0 s4459_0)) of
+ s4460_0 =>
+ (case ((freg_name_matches_prefix s4460_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4461_0)) =>
+ let p0_ = (string_drop s4460_0 s4461_0) in
+ if (((p0_ = ""))) then SOME (FSGNJN_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4429_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4429_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word)option) s4430_0=
+ ((case s4430_0 of
+ s4431_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s4431_0)) of
+ SOME ((FSGNJ_S, s4432_0)) =>
+ (case ((string_drop s4431_0 s4432_0)) of
+ s4433_0 =>
+ (case ((spc_matches_prefix0 s4433_0)) of
+ SOME ((() , s4434_0)) =>
+ (case ((string_drop s4433_0 s4434_0)) of
+ s4435_0 =>
+ (case ((freg_name_matches_prefix s4435_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4436_0)) =>
+ (case ((string_drop s4435_0 s4436_0)) of
+ s4437_0 =>
+ (case ((sep_matches_prefix s4437_0)) of
+ SOME ((() , s4438_0)) =>
+ (case ((string_drop s4437_0 s4438_0)) of
+ s4439_0 =>
+ (case ((freg_name_matches_prefix s4439_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4440_0)) =>
+ (case ((string_drop s4439_0 s4440_0)) of
+ s4441_0 =>
+ (case ((sep_matches_prefix s4441_0)) of
+ SOME ((() , s4442_0)) =>
+ (case ((string_drop s4441_0 s4442_0)) of
+ s4443_0 =>
+ (case ((freg_name_matches_prefix s4443_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4444_0)) =>
+ let p0_ = (string_drop s4443_0 s4444_0) in
+ if (((p0_ = ""))) then SOME (FSGNJ_S, rd, rs1, rs2) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4412_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4412_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4413_0=
+ ((case s4413_0 of
+ s4414_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4414_0)) of
+ SOME ((FCVT_S_LU, s4415_0)) =>
+ (case ((string_drop s4414_0 s4415_0)) of
+ s4416_0 =>
+ (case ((spc_matches_prefix0 s4416_0)) of
+ SOME ((() , s4417_0)) =>
+ (case ((string_drop s4416_0 s4417_0)) of
+ s4418_0 =>
+ (case ((freg_name_matches_prefix s4418_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4419_0)) =>
+ (case ((string_drop s4418_0 s4419_0)) of
+ s4420_0 =>
+ (case ((sep_matches_prefix s4420_0)) of
+ SOME ((() , s4421_0)) =>
+ (case ((string_drop s4420_0 s4421_0)) of
+ s4422_0 =>
+ (case ((reg_name_matches_prefix s4422_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4423_0)) =>
+ (case ((string_drop s4422_0 s4423_0)) of
+ s4424_0 =>
+ (case ((sep_matches_prefix s4424_0)) of
+ SOME ((() , s4425_0)) =>
+ (case ((string_drop s4424_0 s4425_0)) of
+ s4426_0 =>
+ (case ((frm_mnemonic_matches_prefix s4426_0)) of
+ SOME ((rm, s4427_0)) =>
+ let p0_ = (string_drop s4426_0 s4427_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_LU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4395_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4395_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4396_0=
+ ((case s4396_0 of
+ s4397_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4397_0)) of
+ SOME ((FCVT_S_L, s4398_0)) =>
+ (case ((string_drop s4397_0 s4398_0)) of
+ s4399_0 =>
+ (case ((spc_matches_prefix0 s4399_0)) of
+ SOME ((() , s4400_0)) =>
+ (case ((string_drop s4399_0 s4400_0)) of
+ s4401_0 =>
+ (case ((freg_name_matches_prefix s4401_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4402_0)) =>
+ (case ((string_drop s4401_0 s4402_0)) of
+ s4403_0 =>
+ (case ((sep_matches_prefix s4403_0)) of
+ SOME ((() , s4404_0)) =>
+ (case ((string_drop s4403_0 s4404_0)) of
+ s4405_0 =>
+ (case ((reg_name_matches_prefix s4405_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4406_0)) =>
+ (case ((string_drop s4405_0 s4406_0)) of
+ s4407_0 =>
+ (case ((sep_matches_prefix s4407_0)) of
+ SOME ((() , s4408_0)) =>
+ (case ((string_drop s4407_0 s4408_0)) of
+ s4409_0 =>
+ (case ((frm_mnemonic_matches_prefix s4409_0)) of
+ SOME ((rm, s4410_0)) =>
+ let p0_ = (string_drop s4409_0 s4410_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_L, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4378_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4378_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4379_0=
+ ((case s4379_0 of
+ s4380_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4380_0)) of
+ SOME ((FCVT_LU_S, s4381_0)) =>
+ (case ((string_drop s4380_0 s4381_0)) of
+ s4382_0 =>
+ (case ((spc_matches_prefix0 s4382_0)) of
+ SOME ((() , s4383_0)) =>
+ (case ((string_drop s4382_0 s4383_0)) of
+ s4384_0 =>
+ (case ((reg_name_matches_prefix s4384_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4385_0)) =>
+ (case ((string_drop s4384_0 s4385_0)) of
+ s4386_0 =>
+ (case ((sep_matches_prefix s4386_0)) of
+ SOME ((() , s4387_0)) =>
+ (case ((string_drop s4386_0 s4387_0)) of
+ s4388_0 =>
+ (case ((freg_name_matches_prefix s4388_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4389_0)) =>
+ (case ((string_drop s4388_0 s4389_0)) of
+ s4390_0 =>
+ (case ((sep_matches_prefix s4390_0)) of
+ SOME ((() , s4391_0)) =>
+ (case ((string_drop s4390_0 s4391_0)) of
+ s4392_0 =>
+ (case ((frm_mnemonic_matches_prefix s4392_0)) of
+ SOME ((rm, s4393_0)) =>
+ let p0_ = (string_drop s4392_0 s4393_0) in
+ if (((p0_ = ""))) then SOME (FCVT_LU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4361_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4361_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4362_0=
+ ((case s4362_0 of
+ s4363_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4363_0)) of
+ SOME ((FCVT_L_S, s4364_0)) =>
+ (case ((string_drop s4363_0 s4364_0)) of
+ s4365_0 =>
+ (case ((spc_matches_prefix0 s4365_0)) of
+ SOME ((() , s4366_0)) =>
+ (case ((string_drop s4365_0 s4366_0)) of
+ s4367_0 =>
+ (case ((reg_name_matches_prefix s4367_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4368_0)) =>
+ (case ((string_drop s4367_0 s4368_0)) of
+ s4369_0 =>
+ (case ((sep_matches_prefix s4369_0)) of
+ SOME ((() , s4370_0)) =>
+ (case ((string_drop s4369_0 s4370_0)) of
+ s4371_0 =>
+ (case ((freg_name_matches_prefix s4371_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4372_0)) =>
+ (case ((string_drop s4371_0 s4372_0)) of
+ s4373_0 =>
+ (case ((sep_matches_prefix s4373_0)) of
+ SOME ((() , s4374_0)) =>
+ (case ((string_drop s4373_0 s4374_0)) of
+ s4375_0 =>
+ (case ((frm_mnemonic_matches_prefix s4375_0)) of
+ SOME ((rm, s4376_0)) =>
+ let p0_ = (string_drop s4375_0 s4376_0) in
+ if (((p0_ = ""))) then SOME (FCVT_L_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4344_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4344_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4345_0=
+ ((case s4345_0 of
+ s4346_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4346_0)) of
+ SOME ((FCVT_S_WU, s4347_0)) =>
+ (case ((string_drop s4346_0 s4347_0)) of
+ s4348_0 =>
+ (case ((spc_matches_prefix0 s4348_0)) of
+ SOME ((() , s4349_0)) =>
+ (case ((string_drop s4348_0 s4349_0)) of
+ s4350_0 =>
+ (case ((freg_name_matches_prefix s4350_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4351_0)) =>
+ (case ((string_drop s4350_0 s4351_0)) of
+ s4352_0 =>
+ (case ((sep_matches_prefix s4352_0)) of
+ SOME ((() , s4353_0)) =>
+ (case ((string_drop s4352_0 s4353_0)) of
+ s4354_0 =>
+ (case ((reg_name_matches_prefix s4354_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4355_0)) =>
+ (case ((string_drop s4354_0 s4355_0)) of
+ s4356_0 =>
+ (case ((sep_matches_prefix s4356_0)) of
+ SOME ((() , s4357_0)) =>
+ (case ((string_drop s4356_0 s4357_0)) of
+ s4358_0 =>
+ (case ((frm_mnemonic_matches_prefix s4358_0)) of
+ SOME ((rm, s4359_0)) =>
+ let p0_ = (string_drop s4358_0 s4359_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_WU, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4327_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4327_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4328_0=
+ ((case s4328_0 of
+ s4329_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4329_0)) of
+ SOME ((FCVT_S_W, s4330_0)) =>
+ (case ((string_drop s4329_0 s4330_0)) of
+ s4331_0 =>
+ (case ((spc_matches_prefix0 s4331_0)) of
+ SOME ((() , s4332_0)) =>
+ (case ((string_drop s4331_0 s4332_0)) of
+ s4333_0 =>
+ (case ((freg_name_matches_prefix s4333_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4334_0)) =>
+ (case ((string_drop s4333_0 s4334_0)) of
+ s4335_0 =>
+ (case ((sep_matches_prefix s4335_0)) of
+ SOME ((() , s4336_0)) =>
+ (case ((string_drop s4335_0 s4336_0)) of
+ s4337_0 =>
+ (case ((reg_name_matches_prefix s4337_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4338_0)) =>
+ (case ((string_drop s4337_0 s4338_0)) of
+ s4339_0 =>
+ (case ((sep_matches_prefix s4339_0)) of
+ SOME ((() , s4340_0)) =>
+ (case ((string_drop s4339_0 s4340_0)) of
+ s4341_0 =>
+ (case ((frm_mnemonic_matches_prefix s4341_0)) of
+ SOME ((rm, s4342_0)) =>
+ let p0_ = (string_drop s4341_0 s4342_0) in
+ if (((p0_ = ""))) then SOME (FCVT_S_W, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4310_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4310_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4311_0=
+ ((case s4311_0 of
+ s4312_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4312_0)) of
+ SOME ((FCVT_WU_S, s4313_0)) =>
+ (case ((string_drop s4312_0 s4313_0)) of
+ s4314_0 =>
+ (case ((spc_matches_prefix0 s4314_0)) of
+ SOME ((() , s4315_0)) =>
+ (case ((string_drop s4314_0 s4315_0)) of
+ s4316_0 =>
+ (case ((reg_name_matches_prefix s4316_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4317_0)) =>
+ (case ((string_drop s4316_0 s4317_0)) of
+ s4318_0 =>
+ (case ((sep_matches_prefix s4318_0)) of
+ SOME ((() , s4319_0)) =>
+ (case ((string_drop s4318_0 s4319_0)) of
+ s4320_0 =>
+ (case ((freg_name_matches_prefix s4320_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4321_0)) =>
+ (case ((string_drop s4320_0 s4321_0)) of
+ s4322_0 =>
+ (case ((sep_matches_prefix s4322_0)) of
+ SOME ((() , s4323_0)) =>
+ (case ((string_drop s4322_0 s4323_0)) of
+ s4324_0 =>
+ (case ((frm_mnemonic_matches_prefix s4324_0)) of
+ SOME ((rm, s4325_0)) =>
+ let p0_ = (string_drop s4324_0 s4325_0) in
+ if (((p0_ = ""))) then SOME (FCVT_WU_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4293_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4293_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4294_0=
+ ((case s4294_0 of
+ s4295_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4295_0)) of
+ SOME ((FCVT_W_S, s4296_0)) =>
+ (case ((string_drop s4295_0 s4296_0)) of
+ s4297_0 =>
+ (case ((spc_matches_prefix0 s4297_0)) of
+ SOME ((() , s4298_0)) =>
+ (case ((string_drop s4297_0 s4298_0)) of
+ s4299_0 =>
+ (case ((reg_name_matches_prefix s4299_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4300_0)) =>
+ (case ((string_drop s4299_0 s4300_0)) of
+ s4301_0 =>
+ (case ((sep_matches_prefix s4301_0)) of
+ SOME ((() , s4302_0)) =>
+ (case ((string_drop s4301_0 s4302_0)) of
+ s4303_0 =>
+ (case ((freg_name_matches_prefix s4303_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4304_0)) =>
+ (case ((string_drop s4303_0 s4304_0)) of
+ s4305_0 =>
+ (case ((sep_matches_prefix s4305_0)) of
+ SOME ((() , s4306_0)) =>
+ (case ((string_drop s4305_0 s4306_0)) of
+ s4307_0 =>
+ (case ((frm_mnemonic_matches_prefix s4307_0)) of
+ SOME ((rm, s4308_0)) =>
+ let p0_ = (string_drop s4307_0 s4308_0) in
+ if (((p0_ = ""))) then SOME (FCVT_W_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4276_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4276_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode)option) s4277_0=
+ ((case s4277_0 of
+ s4278_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s4278_0)) of
+ SOME ((FSQRT_S, s4279_0)) =>
+ (case ((string_drop s4278_0 s4279_0)) of
+ s4280_0 =>
+ (case ((spc_matches_prefix0 s4280_0)) of
+ SOME ((() , s4281_0)) =>
+ (case ((string_drop s4280_0 s4281_0)) of
+ s4282_0 =>
+ (case ((freg_name_matches_prefix s4282_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4283_0)) =>
+ (case ((string_drop s4282_0 s4283_0)) of
+ s4284_0 =>
+ (case ((sep_matches_prefix s4284_0)) of
+ SOME ((() , s4285_0)) =>
+ (case ((string_drop s4284_0 s4285_0)) of
+ s4286_0 =>
+ (case ((freg_name_matches_prefix s4286_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4287_0)) =>
+ (case ((string_drop s4286_0 s4287_0)) of
+ s4288_0 =>
+ (case ((sep_matches_prefix s4288_0)) of
+ SOME ((() , s4289_0)) =>
+ (case ((string_drop s4288_0 s4289_0)) of
+ s4290_0 =>
+ (case ((frm_mnemonic_matches_prefix s4290_0)) of
+ SOME ((rm, s4291_0)) =>
+ let p0_ = (string_drop s4290_0 s4291_0) in
+ if (((p0_ = ""))) then SOME (FSQRT_S, rd, rs1, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4255_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4255_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s4256_0=
+ ((case s4256_0 of
+ s4257_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s4257_0)) of
+ SOME ((op, s4258_0)) =>
+ (case ((string_drop s4257_0 s4258_0)) of
+ s4259_0 =>
+ (case ((spc_matches_prefix0 s4259_0)) of
+ SOME ((() , s4260_0)) =>
+ (case ((string_drop s4259_0 s4260_0)) of
+ s4261_0 =>
+ (case ((freg_name_matches_prefix s4261_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4262_0)) =>
+ (case ((string_drop s4261_0 s4262_0)) of
+ s4263_0 =>
+ (case ((sep_matches_prefix s4263_0)) of
+ SOME ((() , s4264_0)) =>
+ (case ((string_drop s4263_0 s4264_0)) of
+ s4265_0 =>
+ (case ((freg_name_matches_prefix s4265_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4266_0)) =>
+ (case ((string_drop s4265_0 s4266_0)) of
+ s4267_0 =>
+ (case ((sep_matches_prefix s4267_0)) of
+ SOME ((() , s4268_0)) =>
+ (case ((string_drop s4267_0 s4268_0)) of
+ s4269_0 =>
+ (case ((freg_name_matches_prefix s4269_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4270_0)) =>
+ (case ((string_drop s4269_0 s4270_0)) of
+ s4271_0 =>
+ (case ((sep_matches_prefix s4271_0)) of
+ SOME ((() , s4272_0)) =>
+ (case ((string_drop s4271_0 s4272_0)) of
+ s4273_0 =>
+ (case ((frm_mnemonic_matches_prefix s4273_0)) of
+ SOME ((rm, s4274_0)) =>
+ let p0_ = (string_drop s4273_0 s4274_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4230_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode))*)
+
+val _ = Define `
+ ((s4230_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode)option) s4231_0=
+ ((case s4231_0 of
+ s4232_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s4232_0)) of
+ SOME ((op, s4233_0)) =>
+ (case ((string_drop s4232_0 s4233_0)) of
+ s4234_0 =>
+ (case ((spc_matches_prefix0 s4234_0)) of
+ SOME ((() , s4235_0)) =>
+ (case ((string_drop s4234_0 s4235_0)) of
+ s4236_0 =>
+ (case ((freg_name_matches_prefix s4236_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4237_0)) =>
+ (case ((string_drop s4236_0 s4237_0)) of
+ s4238_0 =>
+ (case ((sep_matches_prefix s4238_0)) of
+ SOME ((() , s4239_0)) =>
+ (case ((string_drop s4238_0 s4239_0)) of
+ s4240_0 =>
+ (case ((freg_name_matches_prefix s4240_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4241_0)) =>
+ (case ((string_drop s4240_0 s4241_0)) of
+ s4242_0 =>
+ (case ((sep_matches_prefix s4242_0)) of
+ SOME ((() , s4243_0)) =>
+ (case ((string_drop s4242_0 s4243_0)) of
+ s4244_0 =>
+ (case ((freg_name_matches_prefix s4244_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4245_0)) =>
+ (case ((string_drop s4244_0 s4245_0)) of
+ s4246_0 =>
+ (case ((sep_matches_prefix s4246_0)) of
+ SOME ((() , s4247_0)) =>
+ (case ((string_drop s4246_0 s4247_0)) of
+ s4248_0 =>
+ (case ((freg_name_matches_prefix s4248_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s4249_0)) =>
+ (case ((string_drop s4248_0 s4249_0)) of
+ s4250_0 =>
+ (case ((sep_matches_prefix s4250_0)) of
+ SOME ((() , s4251_0)) =>
+ (case ((string_drop s4250_0 s4251_0)) of
+ s4252_0 =>
+ (case ((frm_mnemonic_matches_prefix s4252_0)) of
+ SOME ((rm, s4253_0)) =>
+ let p0_ = (string_drop s4252_0 s4253_0) in
+ if (((p0_ = ""))) then SOME (op, rd, rs1, rs2, rs3, rm) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4206_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s4206_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s4207_0=
+ (let s4208_0 = s4207_0 in
+ if ((string_startswith s4208_0 "fs")) then
+ (case ((string_drop s4208_0 ((string_length "fs")))) of
+ s4209_0 =>
+ (case ((size_mnemonic_matches_prefix s4209_0)) of
+ SOME ((width, s4210_0)) =>
+ (case ((string_drop s4209_0 s4210_0)) of
+ s4211_0 =>
+ (case ((spc_matches_prefix0 s4211_0)) of
+ SOME ((() , s4212_0)) =>
+ (case ((string_drop s4211_0 s4212_0)) of
+ s4213_0 =>
+ (case ((freg_name_matches_prefix s4213_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4214_0)) =>
+ (case ((string_drop s4213_0 s4214_0)) of
+ s4215_0 =>
+ (case ((sep_matches_prefix s4215_0)) of
+ SOME ((() , s4216_0)) =>
+ (case ((string_drop s4215_0 s4216_0)) of
+ s4217_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4217_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s4218_0)) =>
+ (case ((string_drop s4217_0 s4218_0)) of
+ s4219_0 =>
+ (case ((opt_spc_matches_prefix0 s4219_0)) of
+ SOME ((() , s4220_0)) =>
+ let s4221_0 = (string_drop s4219_0 s4220_0) in
+ if ((string_startswith s4221_0 "(")) then
+ (case ((string_drop s4221_0 ((string_length "(")))) of
+ s4222_0 =>
+ (case ((opt_spc_matches_prefix0 s4222_0)) of
+ SOME ((() , s4223_0)) =>
+ (case ((string_drop s4222_0 s4223_0)) of
+ s4224_0 =>
+ (case ((reg_name_matches_prefix s4224_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4225_0)) =>
+ (case ((string_drop s4224_0 s4225_0)) of
+ s4226_0 =>
+ (case ((opt_spc_matches_prefix0 s4226_0)) of
+ SOME ((() , s4227_0)) =>
+ let s4228_0 = (string_drop s4226_0 s4227_0) in
+ if ((string_startswith s4228_0 ")")) then
+ let p0_ = (string_drop s4228_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rs2, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4182_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s4182_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word)option) s4183_0=
+ (let s4184_0 = s4183_0 in
+ if ((string_startswith s4184_0 "fl")) then
+ (case ((string_drop s4184_0 ((string_length "fl")))) of
+ s4185_0 =>
+ (case ((size_mnemonic_matches_prefix s4185_0)) of
+ SOME ((width, s4186_0)) =>
+ (case ((string_drop s4185_0 s4186_0)) of
+ s4187_0 =>
+ (case ((spc_matches_prefix0 s4187_0)) of
+ SOME ((() , s4188_0)) =>
+ (case ((string_drop s4187_0 s4188_0)) of
+ s4189_0 =>
+ (case ((freg_name_matches_prefix s4189_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4190_0)) =>
+ (case ((string_drop s4189_0 s4190_0)) of
+ s4191_0 =>
+ (case ((sep_matches_prefix s4191_0)) of
+ SOME ((() , s4192_0)) =>
+ (case ((string_drop s4191_0 s4192_0)) of
+ s4193_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4193_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s4194_0)) =>
+ (case ((string_drop s4193_0 s4194_0)) of
+ s4195_0 =>
+ (case ((opt_spc_matches_prefix0 s4195_0)) of
+ SOME ((() , s4196_0)) =>
+ let s4197_0 = (string_drop s4195_0 s4196_0) in
+ if ((string_startswith s4197_0 "(")) then
+ (case ((string_drop s4197_0 ((string_length "(")))) of
+ s4198_0 =>
+ (case ((opt_spc_matches_prefix0 s4198_0)) of
+ SOME ((() , s4199_0)) =>
+ (case ((string_drop s4198_0 s4199_0)) of
+ s4200_0 =>
+ (case ((reg_name_matches_prefix s4200_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4201_0)) =>
+ (case ((string_drop s4200_0 s4201_0)) of
+ s4202_0 =>
+ (case ((opt_spc_matches_prefix0 s4202_0)) of
+ SOME ((() , s4203_0)) =>
+ let s4204_0 = (string_drop s4202_0 s4203_0) in
+ if ((string_startswith s4204_0 ")")) then
+ let p0_ = (string_drop s4204_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (width, rd, imm, rs1) else NONE else
+ NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4170_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s4170_:string ->((5)words$word#(5)words$word#(12)words$word)option) s4171_0=
+ (let s4172_0 = s4171_0 in
+ if ((string_startswith s4172_0 "fence.i.reserved.")) then
+ (case ((string_drop s4172_0 ((string_length "fence.i.reserved.")))) of
+ s4173_0 =>
+ (case ((reg_name_matches_prefix s4173_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4174_0)) =>
+ let s4175_0 = (string_drop s4173_0 s4174_0) in
+ if ((string_startswith s4175_0 ".")) then
+ (case ((string_drop s4175_0 ((string_length ".")))) of
+ s4176_0 =>
+ (case ((reg_name_matches_prefix s4176_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s4177_0)) =>
+ let s4178_0 = (string_drop s4176_0 s4177_0) in
+ if ((string_startswith s4178_0 ".")) then
+ (case ((string_drop s4178_0 ((string_length ".")))) of
+ s4179_0 =>
+ (case ((hex_bits_12_matches_prefix0 s4179_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s4180_0)) =>
+ let p0_ = (string_drop s4179_0 s4180_0) in
+ if (((p0_ = ""))) then SOME (rd, rs, imm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4152_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4))*)
+
+val _ = Define `
+ ((s4152_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word)option) s4153_0=
+ (let s4154_0 = s4153_0 in
+ if ((string_startswith s4154_0 "fence.reserved.")) then
+ (case ((string_drop s4154_0 ((string_length "fence.reserved.")))) of
+ s4155_0 =>
+ (case ((fence_bits_matches_prefix s4155_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s4156_0)) =>
+ let s4157_0 = (string_drop s4155_0 s4156_0) in
+ if ((string_startswith s4157_0 ".")) then
+ (case ((string_drop s4157_0 ((string_length ".")))) of
+ s4158_0 =>
+ (case ((fence_bits_matches_prefix s4158_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s4159_0)) =>
+ let s4160_0 = (string_drop s4158_0 s4159_0) in
+ if ((string_startswith s4160_0 ".")) then
+ (case ((string_drop s4160_0 ((string_length ".")))) of
+ s4161_0 =>
+ (case ((reg_name_matches_prefix s4161_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s4162_0)) =>
+ let s4163_0 = (string_drop s4161_0 s4162_0) in
+ if ((string_startswith s4163_0 ".")) then
+ (case ((string_drop s4163_0 ((string_length ".")))) of
+ s4164_0 =>
+ (case ((reg_name_matches_prefix s4164_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4165_0)) =>
+ let s4166_0 = (string_drop s4164_0 s4165_0) in
+ if ((string_startswith s4166_0 ".")) then
+ (case ((string_drop s4166_0 ((string_length ".")))) of
+ s4167_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s4167_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s4168_0)) =>
+ let p0_ = (string_drop s4167_0 s4168_0) in
+ if (((p0_ = ""))) then SOME (pred, succ, rs, rd, fm) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4146_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s4146_:string ->((3)words$word)option) s4147_0=
+ (let s4148_0 = s4147_0 in
+ if ((string_startswith s4148_0 "c.srai.hint.")) then
+ (case ((string_drop s4148_0 ((string_length "c.srai.hint.")))) of
+ s4149_0 =>
+ (case ((creg_name_matches_prefix s4149_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4150_0)) =>
+ let p0_ = (string_drop s4149_0 s4150_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4140_ : string -> maybe (mword ty3)*)
+
+val _ = Define `
+ ((s4140_:string ->((3)words$word)option) s4141_0=
+ (let s4142_0 = s4141_0 in
+ if ((string_startswith s4142_0 "c.srli.hint.")) then
+ (case ((string_drop s4142_0 ((string_length "c.srli.hint.")))) of
+ s4143_0 =>
+ (case ((creg_name_matches_prefix s4143_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s4144_0)) =>
+ let p0_ = (string_drop s4143_0 s4144_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4131_ : string -> maybe ((mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s4131_:string ->((5)words$word#(6)words$word)option) s4132_0=
+ (let s4133_0 = s4132_0 in
+ if ((string_startswith s4133_0 "c.slli.hint.")) then
+ (case ((string_drop s4133_0 ((string_length "c.slli.hint.")))) of
+ s4134_0 =>
+ (case ((reg_name_matches_prefix s4134_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4135_0)) =>
+ let s4136_0 = (string_drop s4134_0 s4135_0) in
+ if ((string_startswith s4136_0 ".")) then
+ (case ((string_drop s4136_0 ((string_length ".")))) of
+ s4137_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s4137_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s4138_0)) =>
+ let p0_ = (string_drop s4137_0 s4138_0) in
+ if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4125_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s4125_:string ->((5)words$word)option) s4126_0=
+ (let s4127_0 = s4126_0 in
+ if ((string_startswith s4127_0 "c.add.hint.")) then
+ (case ((string_drop s4127_0 ((string_length "c.add.hint.")))) of
+ s4128_0 =>
+ (case ((reg_name_matches_prefix s4128_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4129_0)) =>
+ let p0_ = (string_drop s4128_0 s4129_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4119_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s4119_:string ->((5)words$word)option) s4120_0=
+ (let s4121_0 = s4120_0 in
+ if ((string_startswith s4121_0 "c.mv.hint.")) then
+ (case ((string_drop s4121_0 ((string_length "c.mv.hint.")))) of
+ s4122_0 =>
+ (case ((reg_name_matches_prefix s4122_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4123_0)) =>
+ let p0_ = (string_drop s4122_0 s4123_0) in
+ if (((p0_ = ""))) then SOME rs2 else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4113_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s4113_:string ->((6)words$word)option) s4114_0=
+ (let s4115_0 = s4114_0 in
+ if ((string_startswith s4115_0 "c.lui.hint.")) then
+ (case ((string_drop s4115_0 ((string_length "c.lui.hint.")))) of
+ s4116_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4116_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4117_0)) =>
+ let p0_ = (string_drop s4116_0 s4117_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4107_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s4107_:string ->((6)words$word)option) s4108_0=
+ (let s4109_0 = s4108_0 in
+ if ((string_startswith s4109_0 "c.li.hint.")) then
+ (case ((string_drop s4109_0 ((string_length "c.li.hint.")))) of
+ s4110_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4110_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4111_0)) =>
+ let p0_ = (string_drop s4110_0 s4111_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4101_ : string -> maybe (mword ty5)*)
+
+val _ = Define `
+ ((s4101_:string ->((5)words$word)option) s4102_0=
+ (let s4103_0 = s4102_0 in
+ if ((string_startswith s4103_0 "c.addi.hint.")) then
+ (case ((string_drop s4103_0 ((string_length "c.addi.hint.")))) of
+ s4104_0 =>
+ (case ((reg_name_matches_prefix s4104_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s4105_0)) =>
+ let p0_ = (string_drop s4104_0 s4105_0) in
+ if (((p0_ = ""))) then SOME rsd else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4095_ : string -> maybe (mword ty6)*)
+
+val _ = Define `
+ ((s4095_:string ->((6)words$word)option) s4096_0=
+ (let s4097_0 = s4096_0 in
+ if ((string_startswith s4097_0 "c.nop.hint.")) then
+ (case ((string_drop s4097_0 ((string_length "c.nop.hint.")))) of
+ s4098_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s4098_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s4099_0)) =>
+ let p0_ = (string_drop s4098_0 s4099_0) in
+ if (((p0_ = ""))) then SOME imm else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s4078_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s4078_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s4079_0=
+ ((case s4079_0 of
+ s4080_0 =>
+ (case ((csr_mnemonic_matches_prefix s4080_0)) of
+ SOME ((op, s4081_0)) =>
+ (case ((string_drop s4080_0 s4081_0)) of
+ s4082_0 =>
+ (case ((spc_matches_prefix0 s4082_0)) of
+ SOME ((() , s4083_0)) =>
+ (case ((string_drop s4082_0 s4083_0)) of
+ s4084_0 =>
+ (case ((reg_name_matches_prefix s4084_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4085_0)) =>
+ (case ((string_drop s4084_0 s4085_0)) of
+ s4086_0 =>
+ (case ((sep_matches_prefix s4086_0)) of
+ SOME ((() , s4087_0)) =>
+ (case ((string_drop s4086_0 s4087_0)) of
+ s4088_0 =>
+ (case ((csr_name_map_matches_prefix s4088_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s4089_0)) =>
+ (case ((string_drop s4088_0 s4089_0)) of
+ s4090_0 =>
+ (case ((sep_matches_prefix s4090_0)) of
+ SOME ((() , s4091_0)) =>
+ (case ((string_drop s4090_0 s4091_0)) of
+ s4092_0 =>
+ (case ((reg_name_matches_prefix s4092_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4093_0)) =>
+ let p0_ = (string_drop s4092_0 s4093_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s4060_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5))*)
+
+val _ = Define `
+ ((s4060_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word)option) s4061_0=
+ ((case s4061_0 of
+ s4062_0 =>
+ (case ((csr_mnemonic_matches_prefix s4062_0)) of
+ SOME ((op, s4063_0)) =>
+ let s4064_0 = (string_drop s4062_0 s4063_0) in
+ if ((string_startswith s4064_0 "i")) then
+ (case ((string_drop s4064_0 ((string_length "i")))) of
+ s4065_0 =>
+ (case ((spc_matches_prefix0 s4065_0)) of
+ SOME ((() , s4066_0)) =>
+ (case ((string_drop s4065_0 s4066_0)) of
+ s4067_0 =>
+ (case ((reg_name_matches_prefix s4067_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4068_0)) =>
+ (case ((string_drop s4067_0 s4068_0)) of
+ s4069_0 =>
+ (case ((sep_matches_prefix s4069_0)) of
+ SOME ((() , s4070_0)) =>
+ (case ((string_drop s4069_0 s4070_0)) of
+ s4071_0 =>
+ (case ((csr_name_map_matches_prefix s4071_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s4072_0)) =>
+ (case ((string_drop s4071_0 s4072_0)) of
+ s4073_0 =>
+ (case ((sep_matches_prefix s4073_0)) of
+ SOME ((() , s4074_0)) =>
+ (case ((string_drop s4073_0 s4074_0)) of
+ s4075_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2517_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2518_0)) =>
- (case ((string_drop s2517_0 s2518_0)) of
- s2519_0 =>
- (case ((sep_matches_prefix s2519_0)) of
- SOME ((() , s2520_0)) =>
- (case ((string_drop s2519_0 s2520_0)) of
- s2521_0 =>
- (case ((csr_name_map_matches_prefix s2521_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s2522_0)) =>
- let p0_ = (string_drop s2521_0 s2522_0) in
- if (((p0_ = ""))) then SOME (op, rd, rs1, csr) else NONE
+ s4075_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4076_0)) =>
+ let p0_ = (string_drop s4075_0 s4076_0) in
+ if (((p0_ = ""))) then SOME (op, rd, csr, rs1) else NONE
| _ => NONE
)
)
@@ -28025,43 +48951,43 @@ val _ = Define `
)))`;
-(*val _s2487_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2487_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2488_0=
- (let s2489_0 = s2488_0 in
- if ((string_startswith s2489_0 "rem")) then
- (case ((string_drop s2489_0 ((string_length "rem")))) of
- s2490_0 =>
- (case ((maybe_not_u_matches_prefix s2490_0)) of
- SOME ((s, s2491_0)) =>
- let s2492_0 = (string_drop s2490_0 s2491_0) in
- if ((string_startswith s2492_0 "w")) then
- (case ((string_drop s2492_0 ((string_length "w")))) of
- s2493_0 =>
- (case ((spc_matches_prefix0 s2493_0)) of
- SOME ((() , s2494_0)) =>
- (case ((string_drop s2493_0 s2494_0)) of
- s2495_0 =>
- (case ((reg_name_matches_prefix s2495_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2496_0)) =>
- (case ((string_drop s2495_0 s2496_0)) of
- s2497_0 =>
- (case ((sep_matches_prefix s2497_0)) of
- SOME ((() , s2498_0)) =>
- (case ((string_drop s2497_0 s2498_0)) of
- s2499_0 =>
- (case ((reg_name_matches_prefix s2499_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2500_0)) =>
- (case ((string_drop s2499_0 s2500_0)) of
- s2501_0 =>
- (case ((sep_matches_prefix s2501_0)) of
- SOME ((() , s2502_0)) =>
- (case ((string_drop s2501_0 s2502_0)) of
- s2503_0 =>
- (case ((reg_name_matches_prefix s2503_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2504_0)) =>
- let p0_ = (string_drop s2503_0 s2504_0) in
+(*val _s4041_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4041_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s4042_0=
+ (let s4043_0 = s4042_0 in
+ if ((string_startswith s4043_0 "rem")) then
+ (case ((string_drop s4043_0 ((string_length "rem")))) of
+ s4044_0 =>
+ (case ((maybe_not_u_matches_prefix s4044_0)) of
+ SOME ((s, s4045_0)) =>
+ let s4046_0 = (string_drop s4044_0 s4045_0) in
+ if ((string_startswith s4046_0 "w")) then
+ (case ((string_drop s4046_0 ((string_length "w")))) of
+ s4047_0 =>
+ (case ((spc_matches_prefix0 s4047_0)) of
+ SOME ((() , s4048_0)) =>
+ (case ((string_drop s4047_0 s4048_0)) of
+ s4049_0 =>
+ (case ((reg_name_matches_prefix s4049_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4050_0)) =>
+ (case ((string_drop s4049_0 s4050_0)) of
+ s4051_0 =>
+ (case ((sep_matches_prefix s4051_0)) of
+ SOME ((() , s4052_0)) =>
+ (case ((string_drop s4051_0 s4052_0)) of
+ s4053_0 =>
+ (case ((reg_name_matches_prefix s4053_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4054_0)) =>
+ (case ((string_drop s4053_0 s4054_0)) of
+ s4055_0 =>
+ (case ((sep_matches_prefix s4055_0)) of
+ SOME ((() , s4056_0)) =>
+ (case ((string_drop s4055_0 s4056_0)) of
+ s4057_0 =>
+ (case ((reg_name_matches_prefix s4057_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4058_0)) =>
+ let p0_ = (string_drop s4057_0 s4058_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28087,43 +49013,43 @@ val _ = Define `
else NONE))`;
-(*val _s2468_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2468_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2469_0=
- (let s2470_0 = s2469_0 in
- if ((string_startswith s2470_0 "div")) then
- (case ((string_drop s2470_0 ((string_length "div")))) of
- s2471_0 =>
- (case ((maybe_not_u_matches_prefix s2471_0)) of
- SOME ((s, s2472_0)) =>
- let s2473_0 = (string_drop s2471_0 s2472_0) in
- if ((string_startswith s2473_0 "w")) then
- (case ((string_drop s2473_0 ((string_length "w")))) of
- s2474_0 =>
- (case ((spc_matches_prefix0 s2474_0)) of
- SOME ((() , s2475_0)) =>
- (case ((string_drop s2474_0 s2475_0)) of
- s2476_0 =>
- (case ((reg_name_matches_prefix s2476_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2477_0)) =>
- (case ((string_drop s2476_0 s2477_0)) of
- s2478_0 =>
- (case ((sep_matches_prefix s2478_0)) of
- SOME ((() , s2479_0)) =>
- (case ((string_drop s2478_0 s2479_0)) of
- s2480_0 =>
- (case ((reg_name_matches_prefix s2480_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2481_0)) =>
- (case ((string_drop s2480_0 s2481_0)) of
- s2482_0 =>
- (case ((sep_matches_prefix s2482_0)) of
- SOME ((() , s2483_0)) =>
- (case ((string_drop s2482_0 s2483_0)) of
- s2484_0 =>
- (case ((reg_name_matches_prefix s2484_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2485_0)) =>
- let p0_ = (string_drop s2484_0 s2485_0) in
+(*val _s4022_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4022_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s4023_0=
+ (let s4024_0 = s4023_0 in
+ if ((string_startswith s4024_0 "div")) then
+ (case ((string_drop s4024_0 ((string_length "div")))) of
+ s4025_0 =>
+ (case ((maybe_not_u_matches_prefix s4025_0)) of
+ SOME ((s, s4026_0)) =>
+ let s4027_0 = (string_drop s4025_0 s4026_0) in
+ if ((string_startswith s4027_0 "w")) then
+ (case ((string_drop s4027_0 ((string_length "w")))) of
+ s4028_0 =>
+ (case ((spc_matches_prefix0 s4028_0)) of
+ SOME ((() , s4029_0)) =>
+ (case ((string_drop s4028_0 s4029_0)) of
+ s4030_0 =>
+ (case ((reg_name_matches_prefix s4030_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4031_0)) =>
+ (case ((string_drop s4030_0 s4031_0)) of
+ s4032_0 =>
+ (case ((sep_matches_prefix s4032_0)) of
+ SOME ((() , s4033_0)) =>
+ (case ((string_drop s4032_0 s4033_0)) of
+ s4034_0 =>
+ (case ((reg_name_matches_prefix s4034_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4035_0)) =>
+ (case ((string_drop s4034_0 s4035_0)) of
+ s4036_0 =>
+ (case ((sep_matches_prefix s4036_0)) of
+ SOME ((() , s4037_0)) =>
+ (case ((string_drop s4036_0 s4037_0)) of
+ s4038_0 =>
+ (case ((reg_name_matches_prefix s4038_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4039_0)) =>
+ let p0_ = (string_drop s4038_0 s4039_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28149,37 +49075,37 @@ val _ = Define `
else NONE))`;
-(*val _s2452_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2452_:string ->((5)words$word#(5)words$word#(5)words$word)option) s2453_0=
- (let s2454_0 = s2453_0 in
- if ((string_startswith s2454_0 "mulw")) then
- (case ((string_drop s2454_0 ((string_length "mulw")))) of
- s2455_0 =>
- (case ((spc_matches_prefix0 s2455_0)) of
- SOME ((() , s2456_0)) =>
- (case ((string_drop s2455_0 s2456_0)) of
- s2457_0 =>
- (case ((reg_name_matches_prefix s2457_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2458_0)) =>
- (case ((string_drop s2457_0 s2458_0)) of
- s2459_0 =>
- (case ((sep_matches_prefix s2459_0)) of
- SOME ((() , s2460_0)) =>
- (case ((string_drop s2459_0 s2460_0)) of
- s2461_0 =>
- (case ((reg_name_matches_prefix s2461_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2462_0)) =>
- (case ((string_drop s2461_0 s2462_0)) of
- s2463_0 =>
- (case ((sep_matches_prefix s2463_0)) of
- SOME ((() , s2464_0)) =>
- (case ((string_drop s2463_0 s2464_0)) of
- s2465_0 =>
- (case ((reg_name_matches_prefix s2465_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2466_0)) =>
- let p0_ = (string_drop s2465_0 s2466_0) in
+(*val _s4006_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s4006_:string ->((5)words$word#(5)words$word#(5)words$word)option) s4007_0=
+ (let s4008_0 = s4007_0 in
+ if ((string_startswith s4008_0 "mulw")) then
+ (case ((string_drop s4008_0 ((string_length "mulw")))) of
+ s4009_0 =>
+ (case ((spc_matches_prefix0 s4009_0)) of
+ SOME ((() , s4010_0)) =>
+ (case ((string_drop s4009_0 s4010_0)) of
+ s4011_0 =>
+ (case ((reg_name_matches_prefix s4011_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s4012_0)) =>
+ (case ((string_drop s4011_0 s4012_0)) of
+ s4013_0 =>
+ (case ((sep_matches_prefix s4013_0)) of
+ SOME ((() , s4014_0)) =>
+ (case ((string_drop s4013_0 s4014_0)) of
+ s4015_0 =>
+ (case ((reg_name_matches_prefix s4015_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4016_0)) =>
+ (case ((string_drop s4015_0 s4016_0)) of
+ s4017_0 =>
+ (case ((sep_matches_prefix s4017_0)) of
+ SOME ((() , s4018_0)) =>
+ (case ((string_drop s4017_0 s4018_0)) of
+ s4019_0 =>
+ (case ((reg_name_matches_prefix s4019_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4020_0)) =>
+ let p0_ = (string_drop s4019_0 s4020_0) in
if (((p0_ = ""))) then SOME (rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28202,41 +49128,41 @@ val _ = Define `
else NONE))`;
-(*val _s2434_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3988_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2434_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2435_0=
- (let s2436_0 = s2435_0 in
- if ((string_startswith s2436_0 "rem")) then
- (case ((string_drop s2436_0 ((string_length "rem")))) of
- s2437_0 =>
- (case ((maybe_not_u_matches_prefix s2437_0)) of
- SOME ((s, s2438_0)) =>
- (case ((string_drop s2437_0 s2438_0)) of
- s2439_0 =>
- (case ((spc_matches_prefix0 s2439_0)) of
- SOME ((() , s2440_0)) =>
- (case ((string_drop s2439_0 s2440_0)) of
- s2441_0 =>
- (case ((reg_name_matches_prefix s2441_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2442_0)) =>
- (case ((string_drop s2441_0 s2442_0)) of
- s2443_0 =>
- (case ((sep_matches_prefix s2443_0)) of
- SOME ((() , s2444_0)) =>
- (case ((string_drop s2443_0 s2444_0)) of
- s2445_0 =>
- (case ((reg_name_matches_prefix s2445_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2446_0)) =>
- (case ((string_drop s2445_0 s2446_0)) of
- s2447_0 =>
- (case ((sep_matches_prefix s2447_0)) of
- SOME ((() , s2448_0)) =>
- (case ((string_drop s2447_0 s2448_0)) of
- s2449_0 =>
- (case ((reg_name_matches_prefix s2449_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2450_0)) =>
- let p0_ = (string_drop s2449_0 s2450_0) in
+ ((s3988_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3989_0=
+ (let s3990_0 = s3989_0 in
+ if ((string_startswith s3990_0 "rem")) then
+ (case ((string_drop s3990_0 ((string_length "rem")))) of
+ s3991_0 =>
+ (case ((maybe_not_u_matches_prefix s3991_0)) of
+ SOME ((s, s3992_0)) =>
+ (case ((string_drop s3991_0 s3992_0)) of
+ s3993_0 =>
+ (case ((spc_matches_prefix0 s3993_0)) of
+ SOME ((() , s3994_0)) =>
+ (case ((string_drop s3993_0 s3994_0)) of
+ s3995_0 =>
+ (case ((reg_name_matches_prefix s3995_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3996_0)) =>
+ (case ((string_drop s3995_0 s3996_0)) of
+ s3997_0 =>
+ (case ((sep_matches_prefix s3997_0)) of
+ SOME ((() , s3998_0)) =>
+ (case ((string_drop s3997_0 s3998_0)) of
+ s3999_0 =>
+ (case ((reg_name_matches_prefix s3999_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s4000_0)) =>
+ (case ((string_drop s3999_0 s4000_0)) of
+ s4001_0 =>
+ (case ((sep_matches_prefix s4001_0)) of
+ SOME ((() , s4002_0)) =>
+ (case ((string_drop s4001_0 s4002_0)) of
+ s4003_0 =>
+ (case ((reg_name_matches_prefix s4003_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s4004_0)) =>
+ let p0_ = (string_drop s4003_0 s4004_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28262,41 +49188,41 @@ val _ = Define `
else NONE))`;
-(*val _s2416_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3970_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2416_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s2417_0=
- (let s2418_0 = s2417_0 in
- if ((string_startswith s2418_0 "div")) then
- (case ((string_drop s2418_0 ((string_length "div")))) of
- s2419_0 =>
- (case ((maybe_not_u_matches_prefix s2419_0)) of
- SOME ((s, s2420_0)) =>
- (case ((string_drop s2419_0 s2420_0)) of
- s2421_0 =>
- (case ((spc_matches_prefix0 s2421_0)) of
- SOME ((() , s2422_0)) =>
- (case ((string_drop s2421_0 s2422_0)) of
- s2423_0 =>
- (case ((reg_name_matches_prefix s2423_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2424_0)) =>
- (case ((string_drop s2423_0 s2424_0)) of
- s2425_0 =>
- (case ((sep_matches_prefix s2425_0)) of
- SOME ((() , s2426_0)) =>
- (case ((string_drop s2425_0 s2426_0)) of
- s2427_0 =>
- (case ((reg_name_matches_prefix s2427_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2428_0)) =>
- (case ((string_drop s2427_0 s2428_0)) of
- s2429_0 =>
- (case ((sep_matches_prefix s2429_0)) of
- SOME ((() , s2430_0)) =>
- (case ((string_drop s2429_0 s2430_0)) of
- s2431_0 =>
- (case ((reg_name_matches_prefix s2431_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2432_0)) =>
- let p0_ = (string_drop s2431_0 s2432_0) in
+ ((s3970_:string ->(bool#(5)words$word#(5)words$word#(5)words$word)option) s3971_0=
+ (let s3972_0 = s3971_0 in
+ if ((string_startswith s3972_0 "div")) then
+ (case ((string_drop s3972_0 ((string_length "div")))) of
+ s3973_0 =>
+ (case ((maybe_not_u_matches_prefix s3973_0)) of
+ SOME ((s, s3974_0)) =>
+ (case ((string_drop s3973_0 s3974_0)) of
+ s3975_0 =>
+ (case ((spc_matches_prefix0 s3975_0)) of
+ SOME ((() , s3976_0)) =>
+ (case ((string_drop s3975_0 s3976_0)) of
+ s3977_0 =>
+ (case ((reg_name_matches_prefix s3977_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3978_0)) =>
+ (case ((string_drop s3977_0 s3978_0)) of
+ s3979_0 =>
+ (case ((sep_matches_prefix s3979_0)) of
+ SOME ((() , s3980_0)) =>
+ (case ((string_drop s3979_0 s3980_0)) of
+ s3981_0 =>
+ (case ((reg_name_matches_prefix s3981_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3982_0)) =>
+ (case ((string_drop s3981_0 s3982_0)) of
+ s3983_0 =>
+ (case ((sep_matches_prefix s3983_0)) of
+ SOME ((() , s3984_0)) =>
+ (case ((string_drop s3983_0 s3984_0)) of
+ s3985_0 =>
+ (case ((reg_name_matches_prefix s3985_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3986_0)) =>
+ let p0_ = (string_drop s3985_0 s3986_0) in
if (((p0_ = ""))) then SOME (s, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -28322,39 +49248,39 @@ val _ = Define `
else NONE))`;
-(*val _s2399_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3953_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s2399_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s2400_0=
- ((case s2400_0 of
- s2401_0 =>
- (case ((mul_mnemonic_matches_prefix s2401_0)) of
- SOME (((high, signed1, signed2), s2402_0)) =>
- (case ((string_drop s2401_0 s2402_0)) of
- s2403_0 =>
- (case ((spc_matches_prefix0 s2403_0)) of
- SOME ((() , s2404_0)) =>
- (case ((string_drop s2403_0 s2404_0)) of
- s2405_0 =>
- (case ((reg_name_matches_prefix s2405_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2406_0)) =>
- (case ((string_drop s2405_0 s2406_0)) of
- s2407_0 =>
- (case ((sep_matches_prefix s2407_0)) of
- SOME ((() , s2408_0)) =>
- (case ((string_drop s2407_0 s2408_0)) of
- s2409_0 =>
- (case ((reg_name_matches_prefix s2409_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2410_0)) =>
- (case ((string_drop s2409_0 s2410_0)) of
- s2411_0 =>
- (case ((sep_matches_prefix s2411_0)) of
- SOME ((() , s2412_0)) =>
- (case ((string_drop s2411_0 s2412_0)) of
- s2413_0 =>
- (case ((reg_name_matches_prefix s2413_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2414_0)) =>
- let p0_ = (string_drop s2413_0 s2414_0) in
+ ((s3953_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s3954_0=
+ ((case s3954_0 of
+ s3955_0 =>
+ (case ((mul_mnemonic_matches_prefix s3955_0)) of
+ SOME (((high, signed1, signed2), s3956_0)) =>
+ (case ((string_drop s3955_0 s3956_0)) of
+ s3957_0 =>
+ (case ((spc_matches_prefix0 s3957_0)) of
+ SOME ((() , s3958_0)) =>
+ (case ((string_drop s3957_0 s3958_0)) of
+ s3959_0 =>
+ (case ((reg_name_matches_prefix s3959_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3960_0)) =>
+ (case ((string_drop s3959_0 s3960_0)) of
+ s3961_0 =>
+ (case ((sep_matches_prefix s3961_0)) of
+ SOME ((() , s3962_0)) =>
+ (case ((string_drop s3961_0 s3962_0)) of
+ s3963_0 =>
+ (case ((reg_name_matches_prefix s3963_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3964_0)) =>
+ (case ((string_drop s3963_0 s3964_0)) of
+ s3965_0 =>
+ (case ((sep_matches_prefix s3965_0)) of
+ SOME ((() , s3966_0)) =>
+ (case ((string_drop s3965_0 s3966_0)) of
+ s3967_0 =>
+ (case ((reg_name_matches_prefix s3967_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3968_0)) =>
+ let p0_ = (string_drop s3967_0 s3968_0) in
if (((p0_ = ""))) then SOME (high, signed1, signed2, rd, rs1, rs2) else
NONE
| _ => NONE
@@ -28380,29 +49306,29 @@ val _ = Define `
)))`;
-(*val _s2387_ : string -> maybe ((mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s2387_:string ->((5)words$word#(5)words$word)option) s2388_0=
- (let s2389_0 = s2388_0 in
- if ((string_startswith s2389_0 "c.add")) then
- (case ((string_drop s2389_0 ((string_length "c.add")))) of
- s2390_0 =>
- (case ((spc_matches_prefix0 s2390_0)) of
- SOME ((() , s2391_0)) =>
- (case ((string_drop s2390_0 s2391_0)) of
- s2392_0 =>
- (case ((reg_name_matches_prefix s2392_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2393_0)) =>
- (case ((string_drop s2392_0 s2393_0)) of
- s2394_0 =>
- (case ((sep_matches_prefix s2394_0)) of
- SOME ((() , s2395_0)) =>
- (case ((string_drop s2394_0 s2395_0)) of
- s2396_0 =>
- (case ((reg_name_matches_prefix s2396_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2397_0)) =>
- let p0_ = (string_drop s2396_0 s2397_0) in
+(*val _s3941_ : string -> maybe ((mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3941_:string ->((5)words$word#(5)words$word)option) s3942_0=
+ (let s3943_0 = s3942_0 in
+ if ((string_startswith s3943_0 "c.add")) then
+ (case ((string_drop s3943_0 ((string_length "c.add")))) of
+ s3944_0 =>
+ (case ((spc_matches_prefix0 s3944_0)) of
+ SOME ((() , s3945_0)) =>
+ (case ((string_drop s3944_0 s3945_0)) of
+ s3946_0 =>
+ (case ((reg_name_matches_prefix s3946_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3947_0)) =>
+ (case ((string_drop s3946_0 s3947_0)) of
+ s3948_0 =>
+ (case ((sep_matches_prefix s3948_0)) of
+ SOME ((() , s3949_0)) =>
+ (case ((string_drop s3948_0 s3949_0)) of
+ s3950_0 =>
+ (case ((reg_name_matches_prefix s3950_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3951_0)) =>
+ let p0_ = (string_drop s3950_0 s3951_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28419,29 +49345,29 @@ val _ = Define `
else NONE))`;
-(*val _s2375_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s3929_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s2375_:string ->((5)words$word#(5)words$word)option) s2376_0=
- (let s2377_0 = s2376_0 in
- if ((string_startswith s2377_0 "c.mv")) then
- (case ((string_drop s2377_0 ((string_length "c.mv")))) of
- s2378_0 =>
- (case ((spc_matches_prefix0 s2378_0)) of
- SOME ((() , s2379_0)) =>
- (case ((string_drop s2378_0 s2379_0)) of
- s2380_0 =>
- (case ((reg_name_matches_prefix s2380_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2381_0)) =>
- (case ((string_drop s2380_0 s2381_0)) of
- s2382_0 =>
- (case ((sep_matches_prefix s2382_0)) of
- SOME ((() , s2383_0)) =>
- (case ((string_drop s2382_0 s2383_0)) of
- s2384_0 =>
- (case ((reg_name_matches_prefix s2384_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2385_0)) =>
- let p0_ = (string_drop s2384_0 s2385_0) in
+ ((s3929_:string ->((5)words$word#(5)words$word)option) s3930_0=
+ (let s3931_0 = s3930_0 in
+ if ((string_startswith s3931_0 "c.mv")) then
+ (case ((string_drop s3931_0 ((string_length "c.mv")))) of
+ s3932_0 =>
+ (case ((spc_matches_prefix0 s3932_0)) of
+ SOME ((() , s3933_0)) =>
+ (case ((string_drop s3932_0 s3933_0)) of
+ s3934_0 =>
+ (case ((reg_name_matches_prefix s3934_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3935_0)) =>
+ (case ((string_drop s3934_0 s3935_0)) of
+ s3936_0 =>
+ (case ((sep_matches_prefix s3936_0)) of
+ SOME ((() , s3937_0)) =>
+ (case ((string_drop s3936_0 s3937_0)) of
+ s3938_0 =>
+ (case ((reg_name_matches_prefix s3938_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3939_0)) =>
+ let p0_ = (string_drop s3938_0 s3939_0) in
if (((p0_ = ""))) then SOME (rd, rs2) else NONE
| _ => NONE
)
@@ -28458,21 +49384,21 @@ val _ = Define `
else NONE))`;
-(*val _s2367_ : string -> maybe (mword ty5)*)
+(*val _s3921_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s2367_:string ->((5)words$word)option) s2368_0=
- (let s2369_0 = s2368_0 in
- if ((string_startswith s2369_0 "c.jalr")) then
- (case ((string_drop s2369_0 ((string_length "c.jalr")))) of
- s2370_0 =>
- (case ((spc_matches_prefix0 s2370_0)) of
- SOME ((() , s2371_0)) =>
- (case ((string_drop s2370_0 s2371_0)) of
- s2372_0 =>
- (case ((reg_name_matches_prefix s2372_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2373_0)) =>
- let p0_ = (string_drop s2372_0 s2373_0) in
+ ((s3921_:string ->((5)words$word)option) s3922_0=
+ (let s3923_0 = s3922_0 in
+ if ((string_startswith s3923_0 "c.jalr")) then
+ (case ((string_drop s3923_0 ((string_length "c.jalr")))) of
+ s3924_0 =>
+ (case ((spc_matches_prefix0 s3924_0)) of
+ SOME ((() , s3925_0)) =>
+ (case ((string_drop s3924_0 s3925_0)) of
+ s3926_0 =>
+ (case ((reg_name_matches_prefix s3926_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3927_0)) =>
+ let p0_ = (string_drop s3926_0 s3927_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -28483,21 +49409,21 @@ val _ = Define `
else NONE))`;
-(*val _s2359_ : string -> maybe (mword ty5)*)
+(*val _s3913_ : string -> maybe (mword ty5)*)
val _ = Define `
- ((s2359_:string ->((5)words$word)option) s2360_0=
- (let s2361_0 = s2360_0 in
- if ((string_startswith s2361_0 "c.jr")) then
- (case ((string_drop s2361_0 ((string_length "c.jr")))) of
- s2362_0 =>
- (case ((spc_matches_prefix0 s2362_0)) of
- SOME ((() , s2363_0)) =>
- (case ((string_drop s2362_0 s2363_0)) of
- s2364_0 =>
- (case ((reg_name_matches_prefix s2364_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2365_0)) =>
- let p0_ = (string_drop s2364_0 s2365_0) in
+ ((s3913_:string ->((5)words$word)option) s3914_0=
+ (let s3915_0 = s3914_0 in
+ if ((string_startswith s3915_0 "c.jr")) then
+ (case ((string_drop s3915_0 ((string_length "c.jr")))) of
+ s3916_0 =>
+ (case ((spc_matches_prefix0 s3916_0)) of
+ SOME ((() , s3917_0)) =>
+ (case ((string_drop s3916_0 s3917_0)) of
+ s3918_0 =>
+ (case ((reg_name_matches_prefix s3918_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3919_0)) =>
+ let p0_ = (string_drop s3918_0 s3919_0) in
if (((p0_ = ""))) then SOME rs1 else NONE
| _ => NONE
)
@@ -28508,30 +49434,30 @@ val _ = Define `
else NONE))`;
-(*val _s2347_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3901_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2347_:string ->((5)words$word#(6)words$word)option) s2348_0=
- (let s2349_0 = s2348_0 in
- if ((string_startswith s2349_0 "c.sdsp")) then
- (case ((string_drop s2349_0 ((string_length "c.sdsp")))) of
- s2350_0 =>
- (case ((spc_matches_prefix0 s2350_0)) of
- SOME ((() , s2351_0)) =>
- (case ((string_drop s2350_0 s2351_0)) of
- s2352_0 =>
- (case ((reg_name_matches_prefix s2352_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2353_0)) =>
- (case ((string_drop s2352_0 s2353_0)) of
- s2354_0 =>
- (case ((sep_matches_prefix s2354_0)) of
- SOME ((() , s2355_0)) =>
- (case ((string_drop s2354_0 s2355_0)) of
- s2356_0 =>
+ ((s3901_:string ->((5)words$word#(6)words$word)option) s3902_0=
+ (let s3903_0 = s3902_0 in
+ if ((string_startswith s3903_0 "c.sdsp")) then
+ (case ((string_drop s3903_0 ((string_length "c.sdsp")))) of
+ s3904_0 =>
+ (case ((spc_matches_prefix0 s3904_0)) of
+ SOME ((() , s3905_0)) =>
+ (case ((string_drop s3904_0 s3905_0)) of
+ s3906_0 =>
+ (case ((reg_name_matches_prefix s3906_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3907_0)) =>
+ (case ((string_drop s3906_0 s3907_0)) of
+ s3908_0 =>
+ (case ((sep_matches_prefix s3908_0)) of
+ SOME ((() , s3909_0)) =>
+ (case ((string_drop s3908_0 s3909_0)) of
+ s3910_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2356_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2357_0)) =>
- let p0_ = (string_drop s2356_0 s2357_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3910_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3911_0)) =>
+ let p0_ = (string_drop s3910_0 s3911_0) in
if (((p0_ = ""))) then SOME (rs2, uimm) else NONE
| _ => NONE
)
@@ -28548,30 +49474,30 @@ val _ = Define `
else NONE))`;
-(*val _s2335_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3889_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2335_:string ->((5)words$word#(6)words$word)option) s2336_0=
- (let s2337_0 = s2336_0 in
- if ((string_startswith s2337_0 "c.swsp")) then
- (case ((string_drop s2337_0 ((string_length "c.swsp")))) of
- s2338_0 =>
- (case ((spc_matches_prefix0 s2338_0)) of
- SOME ((() , s2339_0)) =>
- (case ((string_drop s2338_0 s2339_0)) of
- s2340_0 =>
- (case ((reg_name_matches_prefix s2340_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2341_0)) =>
- (case ((string_drop s2340_0 s2341_0)) of
- s2342_0 =>
- (case ((sep_matches_prefix s2342_0)) of
- SOME ((() , s2343_0)) =>
- (case ((string_drop s2342_0 s2343_0)) of
- s2344_0 =>
+ ((s3889_:string ->((5)words$word#(6)words$word)option) s3890_0=
+ (let s3891_0 = s3890_0 in
+ if ((string_startswith s3891_0 "c.swsp")) then
+ (case ((string_drop s3891_0 ((string_length "c.swsp")))) of
+ s3892_0 =>
+ (case ((spc_matches_prefix0 s3892_0)) of
+ SOME ((() , s3893_0)) =>
+ (case ((string_drop s3892_0 s3893_0)) of
+ s3894_0 =>
+ (case ((reg_name_matches_prefix s3894_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3895_0)) =>
+ (case ((string_drop s3894_0 s3895_0)) of
+ s3896_0 =>
+ (case ((sep_matches_prefix s3896_0)) of
+ SOME ((() , s3897_0)) =>
+ (case ((string_drop s3896_0 s3897_0)) of
+ s3898_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2344_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2345_0)) =>
- let p0_ = (string_drop s2344_0 s2345_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3898_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3899_0)) =>
+ let p0_ = (string_drop s3898_0 s3899_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28588,30 +49514,30 @@ val _ = Define `
else NONE))`;
-(*val _s2323_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3877_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2323_:string ->((5)words$word#(6)words$word)option) s2324_0=
- (let s2325_0 = s2324_0 in
- if ((string_startswith s2325_0 "c.ldsp")) then
- (case ((string_drop s2325_0 ((string_length "c.ldsp")))) of
- s2326_0 =>
- (case ((spc_matches_prefix0 s2326_0)) of
- SOME ((() , s2327_0)) =>
- (case ((string_drop s2326_0 s2327_0)) of
- s2328_0 =>
- (case ((reg_name_matches_prefix s2328_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2329_0)) =>
- (case ((string_drop s2328_0 s2329_0)) of
- s2330_0 =>
- (case ((sep_matches_prefix s2330_0)) of
- SOME ((() , s2331_0)) =>
- (case ((string_drop s2330_0 s2331_0)) of
- s2332_0 =>
+ ((s3877_:string ->((5)words$word#(6)words$word)option) s3878_0=
+ (let s3879_0 = s3878_0 in
+ if ((string_startswith s3879_0 "c.ldsp")) then
+ (case ((string_drop s3879_0 ((string_length "c.ldsp")))) of
+ s3880_0 =>
+ (case ((spc_matches_prefix0 s3880_0)) of
+ SOME ((() , s3881_0)) =>
+ (case ((string_drop s3880_0 s3881_0)) of
+ s3882_0 =>
+ (case ((reg_name_matches_prefix s3882_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3883_0)) =>
+ (case ((string_drop s3882_0 s3883_0)) of
+ s3884_0 =>
+ (case ((sep_matches_prefix s3884_0)) of
+ SOME ((() , s3885_0)) =>
+ (case ((string_drop s3884_0 s3885_0)) of
+ s3886_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2332_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2333_0)) =>
- let p0_ = (string_drop s2332_0 s2333_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3886_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3887_0)) =>
+ let p0_ = (string_drop s3886_0 s3887_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28628,30 +49554,30 @@ val _ = Define `
else NONE))`;
-(*val _s2311_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3865_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2311_:string ->((5)words$word#(6)words$word)option) s2312_0=
- (let s2313_0 = s2312_0 in
- if ((string_startswith s2313_0 "c.lwsp")) then
- (case ((string_drop s2313_0 ((string_length "c.lwsp")))) of
- s2314_0 =>
- (case ((spc_matches_prefix0 s2314_0)) of
- SOME ((() , s2315_0)) =>
- (case ((string_drop s2314_0 s2315_0)) of
- s2316_0 =>
- (case ((reg_name_matches_prefix s2316_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2317_0)) =>
- (case ((string_drop s2316_0 s2317_0)) of
- s2318_0 =>
- (case ((sep_matches_prefix s2318_0)) of
- SOME ((() , s2319_0)) =>
- (case ((string_drop s2318_0 s2319_0)) of
- s2320_0 =>
+ ((s3865_:string ->((5)words$word#(6)words$word)option) s3866_0=
+ (let s3867_0 = s3866_0 in
+ if ((string_startswith s3867_0 "c.lwsp")) then
+ (case ((string_drop s3867_0 ((string_length "c.lwsp")))) of
+ s3868_0 =>
+ (case ((spc_matches_prefix0 s3868_0)) of
+ SOME ((() , s3869_0)) =>
+ (case ((string_drop s3868_0 s3869_0)) of
+ s3870_0 =>
+ (case ((reg_name_matches_prefix s3870_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3871_0)) =>
+ (case ((string_drop s3870_0 s3871_0)) of
+ s3872_0 =>
+ (case ((sep_matches_prefix s3872_0)) of
+ SOME ((() , s3873_0)) =>
+ (case ((string_drop s3872_0 s3873_0)) of
+ s3874_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2320_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s2321_0)) =>
- let p0_ = (string_drop s2320_0 s2321_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3874_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s3875_0)) =>
+ let p0_ = (string_drop s3874_0 s3875_0) in
if (((p0_ = ""))) then SOME (rd, uimm) else NONE
| _ => NONE
)
@@ -28668,30 +49594,30 @@ val _ = Define `
else NONE))`;
-(*val _s2299_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3853_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2299_:string ->((5)words$word#(6)words$word)option) s2300_0=
- (let s2301_0 = s2300_0 in
- if ((string_startswith s2301_0 "c.slli")) then
- (case ((string_drop s2301_0 ((string_length "c.slli")))) of
- s2302_0 =>
- (case ((spc_matches_prefix0 s2302_0)) of
- SOME ((() , s2303_0)) =>
- (case ((string_drop s2302_0 s2303_0)) of
- s2304_0 =>
- (case ((reg_name_matches_prefix s2304_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2305_0)) =>
- (case ((string_drop s2304_0 s2305_0)) of
- s2306_0 =>
- (case ((sep_matches_prefix s2306_0)) of
- SOME ((() , s2307_0)) =>
- (case ((string_drop s2306_0 s2307_0)) of
- s2308_0 =>
+ ((s3853_:string ->((5)words$word#(6)words$word)option) s3854_0=
+ (let s3855_0 = s3854_0 in
+ if ((string_startswith s3855_0 "c.slli")) then
+ (case ((string_drop s3855_0 ((string_length "c.slli")))) of
+ s3856_0 =>
+ (case ((spc_matches_prefix0 s3856_0)) of
+ SOME ((() , s3857_0)) =>
+ (case ((string_drop s3856_0 s3857_0)) of
+ s3858_0 =>
+ (case ((reg_name_matches_prefix s3858_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3859_0)) =>
+ (case ((string_drop s3858_0 s3859_0)) of
+ s3860_0 =>
+ (case ((sep_matches_prefix s3860_0)) of
+ SOME ((() , s3861_0)) =>
+ (case ((string_drop s3860_0 s3861_0)) of
+ s3862_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2308_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2309_0)) =>
- let p0_ = (string_drop s2308_0 s2309_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3862_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3863_0)) =>
+ let p0_ = (string_drop s3862_0 s3863_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -28708,30 +49634,30 @@ val _ = Define `
else NONE))`;
-(*val _s2287_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s3841_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2287_:string ->((3)words$word#(8)words$word)option) s2288_0=
- (let s2289_0 = s2288_0 in
- if ((string_startswith s2289_0 "c.bnez")) then
- (case ((string_drop s2289_0 ((string_length "c.bnez")))) of
- s2290_0 =>
- (case ((spc_matches_prefix0 s2290_0)) of
- SOME ((() , s2291_0)) =>
- (case ((string_drop s2290_0 s2291_0)) of
- s2292_0 =>
- (case ((creg_name_matches_prefix s2292_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s2293_0)) =>
- (case ((string_drop s2292_0 s2293_0)) of
- s2294_0 =>
- (case ((sep_matches_prefix s2294_0)) of
- SOME ((() , s2295_0)) =>
- (case ((string_drop s2294_0 s2295_0)) of
- s2296_0 =>
+ ((s3841_:string ->((3)words$word#(8)words$word)option) s3842_0=
+ (let s3843_0 = s3842_0 in
+ if ((string_startswith s3843_0 "c.bnez")) then
+ (case ((string_drop s3843_0 ((string_length "c.bnez")))) of
+ s3844_0 =>
+ (case ((spc_matches_prefix0 s3844_0)) of
+ SOME ((() , s3845_0)) =>
+ (case ((string_drop s3844_0 s3845_0)) of
+ s3846_0 =>
+ (case ((creg_name_matches_prefix s3846_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s3847_0)) =>
+ (case ((string_drop s3846_0 s3847_0)) of
+ s3848_0 =>
+ (case ((sep_matches_prefix s3848_0)) of
+ SOME ((() , s3849_0)) =>
+ (case ((string_drop s3848_0 s3849_0)) of
+ s3850_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2296_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s2297_0)) =>
- let p0_ = (string_drop s2296_0 s2297_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3850_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s3851_0)) =>
+ let p0_ = (string_drop s3850_0 s3851_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -28748,30 +49674,30 @@ val _ = Define `
else NONE))`;
-(*val _s2275_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s3829_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2275_:string ->((3)words$word#(8)words$word)option) s2276_0=
- (let s2277_0 = s2276_0 in
- if ((string_startswith s2277_0 "c.beqz")) then
- (case ((string_drop s2277_0 ((string_length "c.beqz")))) of
- s2278_0 =>
- (case ((spc_matches_prefix0 s2278_0)) of
- SOME ((() , s2279_0)) =>
- (case ((string_drop s2278_0 s2279_0)) of
- s2280_0 =>
- (case ((creg_name_matches_prefix s2280_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s2281_0)) =>
- (case ((string_drop s2280_0 s2281_0)) of
- s2282_0 =>
- (case ((sep_matches_prefix s2282_0)) of
- SOME ((() , s2283_0)) =>
- (case ((string_drop s2282_0 s2283_0)) of
- s2284_0 =>
+ ((s3829_:string ->((3)words$word#(8)words$word)option) s3830_0=
+ (let s3831_0 = s3830_0 in
+ if ((string_startswith s3831_0 "c.beqz")) then
+ (case ((string_drop s3831_0 ((string_length "c.beqz")))) of
+ s3832_0 =>
+ (case ((spc_matches_prefix0 s3832_0)) of
+ SOME ((() , s3833_0)) =>
+ (case ((string_drop s3832_0 s3833_0)) of
+ s3834_0 =>
+ (case ((creg_name_matches_prefix s3834_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s3835_0)) =>
+ (case ((string_drop s3834_0 s3835_0)) of
+ s3836_0 =>
+ (case ((sep_matches_prefix s3836_0)) of
+ SOME ((() , s3837_0)) =>
+ (case ((string_drop s3836_0 s3837_0)) of
+ s3838_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2284_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s2285_0)) =>
- let p0_ = (string_drop s2284_0 s2285_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3838_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s3839_0)) =>
+ let p0_ = (string_drop s3838_0 s3839_0) in
if (((p0_ = ""))) then SOME (rs, imm) else NONE
| _ => NONE
)
@@ -28788,22 +49714,22 @@ val _ = Define `
else NONE))`;
-(*val _s2267_ : string -> maybe (mword ty11)*)
+(*val _s3821_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s2267_:string ->((11)words$word)option) s2268_0=
- (let s2269_0 = s2268_0 in
- if ((string_startswith s2269_0 "c.j")) then
- (case ((string_drop s2269_0 ((string_length "c.j")))) of
- s2270_0 =>
- (case ((spc_matches_prefix0 s2270_0)) of
- SOME ((() , s2271_0)) =>
- (case ((string_drop s2270_0 s2271_0)) of
- s2272_0 =>
+ ((s3821_:string ->((11)words$word)option) s3822_0=
+ (let s3823_0 = s3822_0 in
+ if ((string_startswith s3823_0 "c.j")) then
+ (case ((string_drop s3823_0 ((string_length "c.j")))) of
+ s3824_0 =>
+ (case ((spc_matches_prefix0 s3824_0)) of
+ SOME ((() , s3825_0)) =>
+ (case ((string_drop s3824_0 s3825_0)) of
+ s3826_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2272_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s2273_0)) =>
- let p0_ = (string_drop s2272_0 s2273_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3826_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s3827_0)) =>
+ let p0_ = (string_drop s3826_0 s3827_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -28814,29 +49740,29 @@ val _ = Define `
else NONE))`;
-(*val _s2255_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3809_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2255_:string ->((3)words$word#(3)words$word)option) s2256_0=
- (let s2257_0 = s2256_0 in
- if ((string_startswith s2257_0 "c.addw")) then
- (case ((string_drop s2257_0 ((string_length "c.addw")))) of
- s2258_0 =>
- (case ((spc_matches_prefix0 s2258_0)) of
- SOME ((() , s2259_0)) =>
- (case ((string_drop s2258_0 s2259_0)) of
- s2260_0 =>
- (case ((creg_name_matches_prefix s2260_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2261_0)) =>
- (case ((string_drop s2260_0 s2261_0)) of
- s2262_0 =>
- (case ((sep_matches_prefix s2262_0)) of
- SOME ((() , s2263_0)) =>
- (case ((string_drop s2262_0 s2263_0)) of
- s2264_0 =>
- (case ((creg_name_matches_prefix s2264_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2265_0)) =>
- let p0_ = (string_drop s2264_0 s2265_0) in
+ ((s3809_:string ->((3)words$word#(3)words$word)option) s3810_0=
+ (let s3811_0 = s3810_0 in
+ if ((string_startswith s3811_0 "c.addw")) then
+ (case ((string_drop s3811_0 ((string_length "c.addw")))) of
+ s3812_0 =>
+ (case ((spc_matches_prefix0 s3812_0)) of
+ SOME ((() , s3813_0)) =>
+ (case ((string_drop s3812_0 s3813_0)) of
+ s3814_0 =>
+ (case ((creg_name_matches_prefix s3814_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3815_0)) =>
+ (case ((string_drop s3814_0 s3815_0)) of
+ s3816_0 =>
+ (case ((sep_matches_prefix s3816_0)) of
+ SOME ((() , s3817_0)) =>
+ (case ((string_drop s3816_0 s3817_0)) of
+ s3818_0 =>
+ (case ((creg_name_matches_prefix s3818_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3819_0)) =>
+ let p0_ = (string_drop s3818_0 s3819_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28853,29 +49779,29 @@ val _ = Define `
else NONE))`;
-(*val _s2243_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3797_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2243_:string ->((3)words$word#(3)words$word)option) s2244_0=
- (let s2245_0 = s2244_0 in
- if ((string_startswith s2245_0 "c.subw")) then
- (case ((string_drop s2245_0 ((string_length "c.subw")))) of
- s2246_0 =>
- (case ((spc_matches_prefix0 s2246_0)) of
- SOME ((() , s2247_0)) =>
- (case ((string_drop s2246_0 s2247_0)) of
- s2248_0 =>
- (case ((creg_name_matches_prefix s2248_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2249_0)) =>
- (case ((string_drop s2248_0 s2249_0)) of
- s2250_0 =>
- (case ((sep_matches_prefix s2250_0)) of
- SOME ((() , s2251_0)) =>
- (case ((string_drop s2250_0 s2251_0)) of
- s2252_0 =>
- (case ((creg_name_matches_prefix s2252_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2253_0)) =>
- let p0_ = (string_drop s2252_0 s2253_0) in
+ ((s3797_:string ->((3)words$word#(3)words$word)option) s3798_0=
+ (let s3799_0 = s3798_0 in
+ if ((string_startswith s3799_0 "c.subw")) then
+ (case ((string_drop s3799_0 ((string_length "c.subw")))) of
+ s3800_0 =>
+ (case ((spc_matches_prefix0 s3800_0)) of
+ SOME ((() , s3801_0)) =>
+ (case ((string_drop s3800_0 s3801_0)) of
+ s3802_0 =>
+ (case ((creg_name_matches_prefix s3802_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3803_0)) =>
+ (case ((string_drop s3802_0 s3803_0)) of
+ s3804_0 =>
+ (case ((sep_matches_prefix s3804_0)) of
+ SOME ((() , s3805_0)) =>
+ (case ((string_drop s3804_0 s3805_0)) of
+ s3806_0 =>
+ (case ((creg_name_matches_prefix s3806_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3807_0)) =>
+ let p0_ = (string_drop s3806_0 s3807_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28892,29 +49818,29 @@ val _ = Define `
else NONE))`;
-(*val _s2231_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3785_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2231_:string ->((3)words$word#(3)words$word)option) s2232_0=
- (let s2233_0 = s2232_0 in
- if ((string_startswith s2233_0 "c.and")) then
- (case ((string_drop s2233_0 ((string_length "c.and")))) of
- s2234_0 =>
- (case ((spc_matches_prefix0 s2234_0)) of
- SOME ((() , s2235_0)) =>
- (case ((string_drop s2234_0 s2235_0)) of
- s2236_0 =>
- (case ((creg_name_matches_prefix s2236_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2237_0)) =>
- (case ((string_drop s2236_0 s2237_0)) of
- s2238_0 =>
- (case ((sep_matches_prefix s2238_0)) of
- SOME ((() , s2239_0)) =>
- (case ((string_drop s2238_0 s2239_0)) of
- s2240_0 =>
- (case ((creg_name_matches_prefix s2240_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2241_0)) =>
- let p0_ = (string_drop s2240_0 s2241_0) in
+ ((s3785_:string ->((3)words$word#(3)words$word)option) s3786_0=
+ (let s3787_0 = s3786_0 in
+ if ((string_startswith s3787_0 "c.and")) then
+ (case ((string_drop s3787_0 ((string_length "c.and")))) of
+ s3788_0 =>
+ (case ((spc_matches_prefix0 s3788_0)) of
+ SOME ((() , s3789_0)) =>
+ (case ((string_drop s3788_0 s3789_0)) of
+ s3790_0 =>
+ (case ((creg_name_matches_prefix s3790_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3791_0)) =>
+ (case ((string_drop s3790_0 s3791_0)) of
+ s3792_0 =>
+ (case ((sep_matches_prefix s3792_0)) of
+ SOME ((() , s3793_0)) =>
+ (case ((string_drop s3792_0 s3793_0)) of
+ s3794_0 =>
+ (case ((creg_name_matches_prefix s3794_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3795_0)) =>
+ let p0_ = (string_drop s3794_0 s3795_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28931,29 +49857,29 @@ val _ = Define `
else NONE))`;
-(*val _s2219_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3773_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2219_:string ->((3)words$word#(3)words$word)option) s2220_0=
- (let s2221_0 = s2220_0 in
- if ((string_startswith s2221_0 "c.or")) then
- (case ((string_drop s2221_0 ((string_length "c.or")))) of
- s2222_0 =>
- (case ((spc_matches_prefix0 s2222_0)) of
- SOME ((() , s2223_0)) =>
- (case ((string_drop s2222_0 s2223_0)) of
- s2224_0 =>
- (case ((creg_name_matches_prefix s2224_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2225_0)) =>
- (case ((string_drop s2224_0 s2225_0)) of
- s2226_0 =>
- (case ((sep_matches_prefix s2226_0)) of
- SOME ((() , s2227_0)) =>
- (case ((string_drop s2226_0 s2227_0)) of
- s2228_0 =>
- (case ((creg_name_matches_prefix s2228_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2229_0)) =>
- let p0_ = (string_drop s2228_0 s2229_0) in
+ ((s3773_:string ->((3)words$word#(3)words$word)option) s3774_0=
+ (let s3775_0 = s3774_0 in
+ if ((string_startswith s3775_0 "c.or")) then
+ (case ((string_drop s3775_0 ((string_length "c.or")))) of
+ s3776_0 =>
+ (case ((spc_matches_prefix0 s3776_0)) of
+ SOME ((() , s3777_0)) =>
+ (case ((string_drop s3776_0 s3777_0)) of
+ s3778_0 =>
+ (case ((creg_name_matches_prefix s3778_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3779_0)) =>
+ (case ((string_drop s3778_0 s3779_0)) of
+ s3780_0 =>
+ (case ((sep_matches_prefix s3780_0)) of
+ SOME ((() , s3781_0)) =>
+ (case ((string_drop s3780_0 s3781_0)) of
+ s3782_0 =>
+ (case ((creg_name_matches_prefix s3782_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3783_0)) =>
+ let p0_ = (string_drop s3782_0 s3783_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -28970,29 +49896,29 @@ val _ = Define `
else NONE))`;
-(*val _s2207_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3761_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2207_:string ->((3)words$word#(3)words$word)option) s2208_0=
- (let s2209_0 = s2208_0 in
- if ((string_startswith s2209_0 "c.xor")) then
- (case ((string_drop s2209_0 ((string_length "c.xor")))) of
- s2210_0 =>
- (case ((spc_matches_prefix0 s2210_0)) of
- SOME ((() , s2211_0)) =>
- (case ((string_drop s2210_0 s2211_0)) of
- s2212_0 =>
- (case ((creg_name_matches_prefix s2212_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2213_0)) =>
- (case ((string_drop s2212_0 s2213_0)) of
- s2214_0 =>
- (case ((sep_matches_prefix s2214_0)) of
- SOME ((() , s2215_0)) =>
- (case ((string_drop s2214_0 s2215_0)) of
- s2216_0 =>
- (case ((creg_name_matches_prefix s2216_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2217_0)) =>
- let p0_ = (string_drop s2216_0 s2217_0) in
+ ((s3761_:string ->((3)words$word#(3)words$word)option) s3762_0=
+ (let s3763_0 = s3762_0 in
+ if ((string_startswith s3763_0 "c.xor")) then
+ (case ((string_drop s3763_0 ((string_length "c.xor")))) of
+ s3764_0 =>
+ (case ((spc_matches_prefix0 s3764_0)) of
+ SOME ((() , s3765_0)) =>
+ (case ((string_drop s3764_0 s3765_0)) of
+ s3766_0 =>
+ (case ((creg_name_matches_prefix s3766_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3767_0)) =>
+ (case ((string_drop s3766_0 s3767_0)) of
+ s3768_0 =>
+ (case ((sep_matches_prefix s3768_0)) of
+ SOME ((() , s3769_0)) =>
+ (case ((string_drop s3768_0 s3769_0)) of
+ s3770_0 =>
+ (case ((creg_name_matches_prefix s3770_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3771_0)) =>
+ let p0_ = (string_drop s3770_0 s3771_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -29009,29 +49935,29 @@ val _ = Define `
else NONE))`;
-(*val _s2195_ : string -> maybe ((mword ty3 * mword ty3))*)
+(*val _s3749_ : string -> maybe ((mword ty3 * mword ty3))*)
val _ = Define `
- ((s2195_:string ->((3)words$word#(3)words$word)option) s2196_0=
- (let s2197_0 = s2196_0 in
- if ((string_startswith s2197_0 "c.sub")) then
- (case ((string_drop s2197_0 ((string_length "c.sub")))) of
- s2198_0 =>
- (case ((spc_matches_prefix0 s2198_0)) of
- SOME ((() , s2199_0)) =>
- (case ((string_drop s2198_0 s2199_0)) of
- s2200_0 =>
- (case ((creg_name_matches_prefix s2200_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2201_0)) =>
- (case ((string_drop s2200_0 s2201_0)) of
- s2202_0 =>
- (case ((sep_matches_prefix s2202_0)) of
- SOME ((() , s2203_0)) =>
- (case ((string_drop s2202_0 s2203_0)) of
- s2204_0 =>
- (case ((creg_name_matches_prefix s2204_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s2205_0)) =>
- let p0_ = (string_drop s2204_0 s2205_0) in
+ ((s3749_:string ->((3)words$word#(3)words$word)option) s3750_0=
+ (let s3751_0 = s3750_0 in
+ if ((string_startswith s3751_0 "c.sub")) then
+ (case ((string_drop s3751_0 ((string_length "c.sub")))) of
+ s3752_0 =>
+ (case ((spc_matches_prefix0 s3752_0)) of
+ SOME ((() , s3753_0)) =>
+ (case ((string_drop s3752_0 s3753_0)) of
+ s3754_0 =>
+ (case ((creg_name_matches_prefix s3754_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3755_0)) =>
+ (case ((string_drop s3754_0 s3755_0)) of
+ s3756_0 =>
+ (case ((sep_matches_prefix s3756_0)) of
+ SOME ((() , s3757_0)) =>
+ (case ((string_drop s3756_0 s3757_0)) of
+ s3758_0 =>
+ (case ((creg_name_matches_prefix s3758_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s3759_0)) =>
+ let p0_ = (string_drop s3758_0 s3759_0) in
if (((p0_ = ""))) then SOME (rsd, rs2) else NONE
| _ => NONE
)
@@ -29048,30 +49974,30 @@ val _ = Define `
else NONE))`;
-(*val _s2183_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3737_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2183_:string ->((3)words$word#(6)words$word)option) s2184_0=
- (let s2185_0 = s2184_0 in
- if ((string_startswith s2185_0 "c.andi")) then
- (case ((string_drop s2185_0 ((string_length "c.andi")))) of
- s2186_0 =>
- (case ((spc_matches_prefix0 s2186_0)) of
- SOME ((() , s2187_0)) =>
- (case ((string_drop s2186_0 s2187_0)) of
- s2188_0 =>
- (case ((creg_name_matches_prefix s2188_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2189_0)) =>
- (case ((string_drop s2188_0 s2189_0)) of
- s2190_0 =>
- (case ((sep_matches_prefix s2190_0)) of
- SOME ((() , s2191_0)) =>
- (case ((string_drop s2190_0 s2191_0)) of
- s2192_0 =>
+ ((s3737_:string ->((3)words$word#(6)words$word)option) s3738_0=
+ (let s3739_0 = s3738_0 in
+ if ((string_startswith s3739_0 "c.andi")) then
+ (case ((string_drop s3739_0 ((string_length "c.andi")))) of
+ s3740_0 =>
+ (case ((spc_matches_prefix0 s3740_0)) of
+ SOME ((() , s3741_0)) =>
+ (case ((string_drop s3740_0 s3741_0)) of
+ s3742_0 =>
+ (case ((creg_name_matches_prefix s3742_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3743_0)) =>
+ (case ((string_drop s3742_0 s3743_0)) of
+ s3744_0 =>
+ (case ((sep_matches_prefix s3744_0)) of
+ SOME ((() , s3745_0)) =>
+ (case ((string_drop s3744_0 s3745_0)) of
+ s3746_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2192_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2193_0)) =>
- let p0_ = (string_drop s2192_0 s2193_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3746_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3747_0)) =>
+ let p0_ = (string_drop s3746_0 s3747_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -29088,30 +50014,30 @@ val _ = Define `
else NONE))`;
-(*val _s2171_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3725_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2171_:string ->((3)words$word#(6)words$word)option) s2172_0=
- (let s2173_0 = s2172_0 in
- if ((string_startswith s2173_0 "c.srai")) then
- (case ((string_drop s2173_0 ((string_length "c.srai")))) of
- s2174_0 =>
- (case ((spc_matches_prefix0 s2174_0)) of
- SOME ((() , s2175_0)) =>
- (case ((string_drop s2174_0 s2175_0)) of
- s2176_0 =>
- (case ((creg_name_matches_prefix s2176_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2177_0)) =>
- (case ((string_drop s2176_0 s2177_0)) of
- s2178_0 =>
- (case ((sep_matches_prefix s2178_0)) of
- SOME ((() , s2179_0)) =>
- (case ((string_drop s2178_0 s2179_0)) of
- s2180_0 =>
+ ((s3725_:string ->((3)words$word#(6)words$word)option) s3726_0=
+ (let s3727_0 = s3726_0 in
+ if ((string_startswith s3727_0 "c.srai")) then
+ (case ((string_drop s3727_0 ((string_length "c.srai")))) of
+ s3728_0 =>
+ (case ((spc_matches_prefix0 s3728_0)) of
+ SOME ((() , s3729_0)) =>
+ (case ((string_drop s3728_0 s3729_0)) of
+ s3730_0 =>
+ (case ((creg_name_matches_prefix s3730_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3731_0)) =>
+ (case ((string_drop s3730_0 s3731_0)) of
+ s3732_0 =>
+ (case ((sep_matches_prefix s3732_0)) of
+ SOME ((() , s3733_0)) =>
+ (case ((string_drop s3732_0 s3733_0)) of
+ s3734_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2180_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2181_0)) =>
- let p0_ = (string_drop s2180_0 s2181_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3734_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3735_0)) =>
+ let p0_ = (string_drop s3734_0 s3735_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -29128,30 +50054,30 @@ val _ = Define `
else NONE))`;
-(*val _s2159_ : string -> maybe ((mword ty3 * mword ty6))*)
+(*val _s3713_ : string -> maybe ((mword ty3 * mword ty6))*)
val _ = Define `
- ((s2159_:string ->((3)words$word#(6)words$word)option) s2160_0=
- (let s2161_0 = s2160_0 in
- if ((string_startswith s2161_0 "c.srli")) then
- (case ((string_drop s2161_0 ((string_length "c.srli")))) of
- s2162_0 =>
- (case ((spc_matches_prefix0 s2162_0)) of
- SOME ((() , s2163_0)) =>
- (case ((string_drop s2162_0 s2163_0)) of
- s2164_0 =>
- (case ((creg_name_matches_prefix s2164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s2165_0)) =>
- (case ((string_drop s2164_0 s2165_0)) of
- s2166_0 =>
- (case ((sep_matches_prefix s2166_0)) of
- SOME ((() , s2167_0)) =>
- (case ((string_drop s2166_0 s2167_0)) of
- s2168_0 =>
+ ((s3713_:string ->((3)words$word#(6)words$word)option) s3714_0=
+ (let s3715_0 = s3714_0 in
+ if ((string_startswith s3715_0 "c.srli")) then
+ (case ((string_drop s3715_0 ((string_length "c.srli")))) of
+ s3716_0 =>
+ (case ((spc_matches_prefix0 s3716_0)) of
+ SOME ((() , s3717_0)) =>
+ (case ((string_drop s3716_0 s3717_0)) of
+ s3718_0 =>
+ (case ((creg_name_matches_prefix s3718_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s3719_0)) =>
+ (case ((string_drop s3718_0 s3719_0)) of
+ s3720_0 =>
+ (case ((sep_matches_prefix s3720_0)) of
+ SOME ((() , s3721_0)) =>
+ (case ((string_drop s3720_0 s3721_0)) of
+ s3722_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2168_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2169_0)) =>
- let p0_ = (string_drop s2168_0 s2169_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3722_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3723_0)) =>
+ let p0_ = (string_drop s3722_0 s3723_0) in
if (((p0_ = ""))) then SOME (rsd, shamt) else NONE
| _ => NONE
)
@@ -29168,30 +50094,30 @@ val _ = Define `
else NONE))`;
-(*val _s2147_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3701_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2147_:string ->((5)words$word#(6)words$word)option) s2148_0=
- (let s2149_0 = s2148_0 in
- if ((string_startswith s2149_0 "c.lui")) then
- (case ((string_drop s2149_0 ((string_length "c.lui")))) of
- s2150_0 =>
- (case ((spc_matches_prefix0 s2150_0)) of
- SOME ((() , s2151_0)) =>
- (case ((string_drop s2150_0 s2151_0)) of
- s2152_0 =>
- (case ((reg_name_matches_prefix s2152_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2153_0)) =>
- (case ((string_drop s2152_0 s2153_0)) of
- s2154_0 =>
- (case ((sep_matches_prefix s2154_0)) of
- SOME ((() , s2155_0)) =>
- (case ((string_drop s2154_0 s2155_0)) of
- s2156_0 =>
+ ((s3701_:string ->((5)words$word#(6)words$word)option) s3702_0=
+ (let s3703_0 = s3702_0 in
+ if ((string_startswith s3703_0 "c.lui")) then
+ (case ((string_drop s3703_0 ((string_length "c.lui")))) of
+ s3704_0 =>
+ (case ((spc_matches_prefix0 s3704_0)) of
+ SOME ((() , s3705_0)) =>
+ (case ((string_drop s3704_0 s3705_0)) of
+ s3706_0 =>
+ (case ((reg_name_matches_prefix s3706_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3707_0)) =>
+ (case ((string_drop s3706_0 s3707_0)) of
+ s3708_0 =>
+ (case ((sep_matches_prefix s3708_0)) of
+ SOME ((() , s3709_0)) =>
+ (case ((string_drop s3708_0 s3709_0)) of
+ s3710_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2156_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2157_0)) =>
- let p0_ = (string_drop s2156_0 s2157_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3710_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3711_0)) =>
+ let p0_ = (string_drop s3710_0 s3711_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -29208,22 +50134,22 @@ val _ = Define `
else NONE))`;
-(*val _s2139_ : string -> maybe (mword ty6)*)
+(*val _s3693_ : string -> maybe (mword ty6)*)
val _ = Define `
- ((s2139_:string ->((6)words$word)option) s2140_0=
- (let s2141_0 = s2140_0 in
- if ((string_startswith s2141_0 "c.addi16sp")) then
- (case ((string_drop s2141_0 ((string_length "c.addi16sp")))) of
- s2142_0 =>
- (case ((spc_matches_prefix0 s2142_0)) of
- SOME ((() , s2143_0)) =>
- (case ((string_drop s2142_0 s2143_0)) of
- s2144_0 =>
+ ((s3693_:string ->((6)words$word)option) s3694_0=
+ (let s3695_0 = s3694_0 in
+ if ((string_startswith s3695_0 "c.addi16sp")) then
+ (case ((string_drop s3695_0 ((string_length "c.addi16sp")))) of
+ s3696_0 =>
+ (case ((spc_matches_prefix0 s3696_0)) of
+ SOME ((() , s3697_0)) =>
+ (case ((string_drop s3696_0 s3697_0)) of
+ s3698_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2144_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2145_0)) =>
- let p0_ = (string_drop s2144_0 s2145_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3698_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3699_0)) =>
+ let p0_ = (string_drop s3698_0 s3699_0) in
if (((p0_ = ""))) then SOME imm else NONE
| _ => NONE
)
@@ -29234,30 +50160,30 @@ val _ = Define `
else NONE))`;
-(*val _s2127_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3681_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2127_:string ->((5)words$word#(6)words$word)option) s2128_0=
- (let s2129_0 = s2128_0 in
- if ((string_startswith s2129_0 "c.li")) then
- (case ((string_drop s2129_0 ((string_length "c.li")))) of
- s2130_0 =>
- (case ((spc_matches_prefix0 s2130_0)) of
- SOME ((() , s2131_0)) =>
- (case ((string_drop s2130_0 s2131_0)) of
- s2132_0 =>
- (case ((reg_name_matches_prefix s2132_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2133_0)) =>
- (case ((string_drop s2132_0 s2133_0)) of
- s2134_0 =>
- (case ((sep_matches_prefix s2134_0)) of
- SOME ((() , s2135_0)) =>
- (case ((string_drop s2134_0 s2135_0)) of
- s2136_0 =>
+ ((s3681_:string ->((5)words$word#(6)words$word)option) s3682_0=
+ (let s3683_0 = s3682_0 in
+ if ((string_startswith s3683_0 "c.li")) then
+ (case ((string_drop s3683_0 ((string_length "c.li")))) of
+ s3684_0 =>
+ (case ((spc_matches_prefix0 s3684_0)) of
+ SOME ((() , s3685_0)) =>
+ (case ((string_drop s3684_0 s3685_0)) of
+ s3686_0 =>
+ (case ((reg_name_matches_prefix s3686_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3687_0)) =>
+ (case ((string_drop s3686_0 s3687_0)) of
+ s3688_0 =>
+ (case ((sep_matches_prefix s3688_0)) of
+ SOME ((() , s3689_0)) =>
+ (case ((string_drop s3688_0 s3689_0)) of
+ s3690_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2136_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2137_0)) =>
- let p0_ = (string_drop s2136_0 s2137_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3690_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3691_0)) =>
+ let p0_ = (string_drop s3690_0 s3691_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -29274,30 +50200,30 @@ val _ = Define `
else NONE))`;
-(*val _s2115_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3669_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2115_:string ->((5)words$word#(6)words$word)option) s2116_0=
- (let s2117_0 = s2116_0 in
- if ((string_startswith s2117_0 "c.addiw")) then
- (case ((string_drop s2117_0 ((string_length "c.addiw")))) of
- s2118_0 =>
- (case ((spc_matches_prefix0 s2118_0)) of
- SOME ((() , s2119_0)) =>
- (case ((string_drop s2118_0 s2119_0)) of
- s2120_0 =>
- (case ((reg_name_matches_prefix s2120_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2121_0)) =>
- (case ((string_drop s2120_0 s2121_0)) of
- s2122_0 =>
- (case ((sep_matches_prefix s2122_0)) of
- SOME ((() , s2123_0)) =>
- (case ((string_drop s2122_0 s2123_0)) of
- s2124_0 =>
+ ((s3669_:string ->((5)words$word#(6)words$word)option) s3670_0=
+ (let s3671_0 = s3670_0 in
+ if ((string_startswith s3671_0 "c.addiw")) then
+ (case ((string_drop s3671_0 ((string_length "c.addiw")))) of
+ s3672_0 =>
+ (case ((spc_matches_prefix0 s3672_0)) of
+ SOME ((() , s3673_0)) =>
+ (case ((string_drop s3672_0 s3673_0)) of
+ s3674_0 =>
+ (case ((reg_name_matches_prefix s3674_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3675_0)) =>
+ (case ((string_drop s3674_0 s3675_0)) of
+ s3676_0 =>
+ (case ((sep_matches_prefix s3676_0)) of
+ SOME ((() , s3677_0)) =>
+ (case ((string_drop s3676_0 s3677_0)) of
+ s3678_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2124_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s2125_0)) =>
- let p0_ = (string_drop s2124_0 s2125_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3678_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s3679_0)) =>
+ let p0_ = (string_drop s3678_0 s3679_0) in
if (((p0_ = ""))) then SOME (rsd, imm) else NONE
| _ => NONE
)
@@ -29314,28 +50240,27 @@ val _ = Define `
else NONE))`;
-(*val _s2107_ : string -> maybe (mword ty11)*)
+(*val _s3661_ : string -> maybe (mword ty11)*)
val _ = Define `
- ((s2107_:string ->((11)words$word)option) s2108_0=
- (let s2109_0 = s2108_0 in
- if ((string_startswith s2109_0 "c.jal")) then
- (case ((string_drop s2109_0 ((string_length "c.jal")))) of
- s2110_0 =>
- (case ((spc_matches_prefix0 s2110_0)) of
- SOME ((() , s2111_0)) =>
- (case ((string_drop s2110_0 s2111_0)) of
- s2112_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2112_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__814, s2113_0)) =>
- if (((((subrange_vec_dec v__814 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__814 (( 11 : int): ii)
+ ((s3661_:string ->((11)words$word)option) s3662_0=
+ (let s3663_0 = s3662_0 in
+ if ((string_startswith s3663_0 "c.jal")) then
+ (case ((string_drop s3663_0 ((string_length "c.jal")))) of
+ s3664_0 =>
+ (case ((spc_matches_prefix0 s3664_0)) of
+ SOME ((() , s3665_0)) =>
+ (case ((string_drop s3664_0 s3665_0)) of
+ s3666_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3666_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1470, s3667_0)) =>
+ if (((((subrange_vec_dec v__1470 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1470 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__814 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1470 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let p0_ = (string_drop s2112_0 s2113_0) in
+ let p0_ = (string_drop s3666_0 s3667_0) in
if (((p0_ = ""))) then SOME imm else NONE else NONE
| _ => NONE
)
@@ -29346,30 +50271,30 @@ val _ = Define `
else NONE))`;
-(*val _s2095_ : string -> maybe ((mword ty5 * mword ty6))*)
+(*val _s3649_ : string -> maybe ((mword ty5 * mword ty6))*)
val _ = Define `
- ((s2095_:string ->((5)words$word#(6)words$word)option) s2096_0=
- (let s2097_0 = s2096_0 in
- if ((string_startswith s2097_0 "c.addi")) then
- (case ((string_drop s2097_0 ((string_length "c.addi")))) of
- s2098_0 =>
- (case ((spc_matches_prefix0 s2098_0)) of
- SOME ((() , s2099_0)) =>
- (case ((string_drop s2098_0 s2099_0)) of
- s2100_0 =>
- (case ((reg_name_matches_prefix s2100_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s2101_0)) =>
- (case ((string_drop s2100_0 s2101_0)) of
- s2102_0 =>
- (case ((sep_matches_prefix s2102_0)) of
- SOME ((() , s2103_0)) =>
- (case ((string_drop s2102_0 s2103_0)) of
- s2104_0 =>
+ ((s3649_:string ->((5)words$word#(6)words$word)option) s3650_0=
+ (let s3651_0 = s3650_0 in
+ if ((string_startswith s3651_0 "c.addi")) then
+ (case ((string_drop s3651_0 ((string_length "c.addi")))) of
+ s3652_0 =>
+ (case ((spc_matches_prefix0 s3652_0)) of
+ SOME ((() , s3653_0)) =>
+ (case ((string_drop s3652_0 s3653_0)) of
+ s3654_0 =>
+ (case ((reg_name_matches_prefix s3654_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s3655_0)) =>
+ (case ((string_drop s3654_0 s3655_0)) of
+ s3656_0 =>
+ (case ((sep_matches_prefix s3656_0)) of
+ SOME ((() , s3657_0)) =>
+ (case ((string_drop s3656_0 s3657_0)) of
+ s3658_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2104_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s2105_0)) =>
- let p0_ = (string_drop s2104_0 s2105_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3658_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s3659_0)) =>
+ let p0_ = (string_drop s3658_0 s3659_0) in
if (((p0_ = ""))) then SOME (rsd, nzi) else NONE
| _ => NONE
)
@@ -29386,45 +50311,45 @@ val _ = Define `
else NONE))`;
-(*val _s2079_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3633_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2079_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2080_0=
- (let s2081_0 = s2080_0 in
- if ((string_startswith s2081_0 "c.sd")) then
- (case ((string_drop s2081_0 ((string_length "c.sd")))) of
- s2082_0 =>
- (case ((spc_matches_prefix0 s2082_0)) of
- SOME ((() , s2083_0)) =>
- (case ((string_drop s2082_0 s2083_0)) of
- s2084_0 =>
- (case ((creg_name_matches_prefix s2084_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2085_0)) =>
- (case ((string_drop s2084_0 s2085_0)) of
- s2086_0 =>
- (case ((sep_matches_prefix s2086_0)) of
- SOME ((() , s2087_0)) =>
- (case ((string_drop s2086_0 s2087_0)) of
- s2088_0 =>
- (case ((creg_name_matches_prefix s2088_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2089_0)) =>
- (case ((string_drop s2088_0 s2089_0)) of
- s2090_0 =>
- (case ((sep_matches_prefix s2090_0)) of
- SOME ((() , s2091_0)) =>
- (case ((string_drop s2090_0 s2091_0)) of
- s2092_0 =>
+ ((s3633_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3634_0=
+ (let s3635_0 = s3634_0 in
+ if ((string_startswith s3635_0 "c.sd")) then
+ (case ((string_drop s3635_0 ((string_length "c.sd")))) of
+ s3636_0 =>
+ (case ((spc_matches_prefix0 s3636_0)) of
+ SOME ((() , s3637_0)) =>
+ (case ((string_drop s3636_0 s3637_0)) of
+ s3638_0 =>
+ (case ((creg_name_matches_prefix s3638_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s3639_0)) =>
+ (case ((string_drop s3638_0 s3639_0)) of
+ s3640_0 =>
+ (case ((sep_matches_prefix s3640_0)) of
+ SOME ((() , s3641_0)) =>
+ (case ((string_drop s3640_0 s3641_0)) of
+ s3642_0 =>
+ (case ((creg_name_matches_prefix s3642_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s3643_0)) =>
+ (case ((string_drop s3642_0 s3643_0)) of
+ s3644_0 =>
+ (case ((sep_matches_prefix s3644_0)) of
+ SOME ((() , s3645_0)) =>
+ (case ((string_drop s3644_0 s3645_0)) of
+ s3646_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2092_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3646_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__816, s2093_0)) =>
- if (((((subrange_vec_dec v__816 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1472, s3647_0)) =>
+ if (((((subrange_vec_dec v__1472 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__816 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1472 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__816 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2092_0 s2093_0) in
+ ((subrange_vec_dec v__1472 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3646_0 s3647_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -29447,45 +50372,45 @@ val _ = Define `
else NONE))`;
-(*val _s2063_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3617_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2063_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2064_0=
- (let s2065_0 = s2064_0 in
- if ((string_startswith s2065_0 "c.sw")) then
- (case ((string_drop s2065_0 ((string_length "c.sw")))) of
- s2066_0 =>
- (case ((spc_matches_prefix0 s2066_0)) of
- SOME ((() , s2067_0)) =>
- (case ((string_drop s2066_0 s2067_0)) of
- s2068_0 =>
- (case ((creg_name_matches_prefix s2068_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2069_0)) =>
- (case ((string_drop s2068_0 s2069_0)) of
- s2070_0 =>
- (case ((sep_matches_prefix s2070_0)) of
- SOME ((() , s2071_0)) =>
- (case ((string_drop s2070_0 s2071_0)) of
- s2072_0 =>
- (case ((creg_name_matches_prefix s2072_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2073_0)) =>
- (case ((string_drop s2072_0 s2073_0)) of
- s2074_0 =>
- (case ((sep_matches_prefix s2074_0)) of
- SOME ((() , s2075_0)) =>
- (case ((string_drop s2074_0 s2075_0)) of
- s2076_0 =>
+ ((s3617_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3618_0=
+ (let s3619_0 = s3618_0 in
+ if ((string_startswith s3619_0 "c.sw")) then
+ (case ((string_drop s3619_0 ((string_length "c.sw")))) of
+ s3620_0 =>
+ (case ((spc_matches_prefix0 s3620_0)) of
+ SOME ((() , s3621_0)) =>
+ (case ((string_drop s3620_0 s3621_0)) of
+ s3622_0 =>
+ (case ((creg_name_matches_prefix s3622_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s3623_0)) =>
+ (case ((string_drop s3622_0 s3623_0)) of
+ s3624_0 =>
+ (case ((sep_matches_prefix s3624_0)) of
+ SOME ((() , s3625_0)) =>
+ (case ((string_drop s3624_0 s3625_0)) of
+ s3626_0 =>
+ (case ((creg_name_matches_prefix s3626_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s3627_0)) =>
+ (case ((string_drop s3626_0 s3627_0)) of
+ s3628_0 =>
+ (case ((sep_matches_prefix s3628_0)) of
+ SOME ((() , s3629_0)) =>
+ (case ((string_drop s3628_0 s3629_0)) of
+ s3630_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2076_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3630_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__818, s2077_0)) =>
- if (((((subrange_vec_dec v__818 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1474, s3631_0)) =>
+ if (((((subrange_vec_dec v__1474 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__818 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1474 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__818 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2076_0 s2077_0) in
+ ((subrange_vec_dec v__1474 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3630_0 s3631_0) in
if (((p0_ = ""))) then SOME (rsc1, rsc2, uimm) else NONE else NONE
| _ => NONE
)
@@ -29508,45 +50433,45 @@ val _ = Define `
else NONE))`;
-(*val _s2047_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3601_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2047_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2048_0=
- (let s2049_0 = s2048_0 in
- if ((string_startswith s2049_0 "c.ld")) then
- (case ((string_drop s2049_0 ((string_length "c.ld")))) of
- s2050_0 =>
- (case ((spc_matches_prefix0 s2050_0)) of
- SOME ((() , s2051_0)) =>
- (case ((string_drop s2050_0 s2051_0)) of
- s2052_0 =>
- (case ((creg_name_matches_prefix s2052_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2053_0)) =>
- (case ((string_drop s2052_0 s2053_0)) of
- s2054_0 =>
- (case ((sep_matches_prefix s2054_0)) of
- SOME ((() , s2055_0)) =>
- (case ((string_drop s2054_0 s2055_0)) of
- s2056_0 =>
- (case ((creg_name_matches_prefix s2056_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2057_0)) =>
- (case ((string_drop s2056_0 s2057_0)) of
- s2058_0 =>
- (case ((sep_matches_prefix s2058_0)) of
- SOME ((() , s2059_0)) =>
- (case ((string_drop s2058_0 s2059_0)) of
- s2060_0 =>
+ ((s3601_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3602_0=
+ (let s3603_0 = s3602_0 in
+ if ((string_startswith s3603_0 "c.ld")) then
+ (case ((string_drop s3603_0 ((string_length "c.ld")))) of
+ s3604_0 =>
+ (case ((spc_matches_prefix0 s3604_0)) of
+ SOME ((() , s3605_0)) =>
+ (case ((string_drop s3604_0 s3605_0)) of
+ s3606_0 =>
+ (case ((creg_name_matches_prefix s3606_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3607_0)) =>
+ (case ((string_drop s3606_0 s3607_0)) of
+ s3608_0 =>
+ (case ((sep_matches_prefix s3608_0)) of
+ SOME ((() , s3609_0)) =>
+ (case ((string_drop s3608_0 s3609_0)) of
+ s3610_0 =>
+ (case ((creg_name_matches_prefix s3610_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s3611_0)) =>
+ (case ((string_drop s3610_0 s3611_0)) of
+ s3612_0 =>
+ (case ((sep_matches_prefix s3612_0)) of
+ SOME ((() , s3613_0)) =>
+ (case ((string_drop s3612_0 s3613_0)) of
+ s3614_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2060_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3614_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__820, s2061_0)) =>
- if (((((subrange_vec_dec v__820 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1476, s3615_0)) =>
+ if (((((subrange_vec_dec v__1476 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__820 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1476 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__820 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2060_0 s2061_0) in
+ ((subrange_vec_dec v__1476 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3614_0 s3615_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -29569,45 +50494,45 @@ val _ = Define `
else NONE))`;
-(*val _s2031_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
+(*val _s3585_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5))*)
val _ = Define `
- ((s2031_:string ->((3)words$word#(3)words$word#(5)words$word)option) s2032_0=
- (let s2033_0 = s2032_0 in
- if ((string_startswith s2033_0 "c.lw")) then
- (case ((string_drop s2033_0 ((string_length "c.lw")))) of
- s2034_0 =>
- (case ((spc_matches_prefix0 s2034_0)) of
- SOME ((() , s2035_0)) =>
- (case ((string_drop s2034_0 s2035_0)) of
- s2036_0 =>
- (case ((creg_name_matches_prefix s2036_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2037_0)) =>
- (case ((string_drop s2036_0 s2037_0)) of
- s2038_0 =>
- (case ((sep_matches_prefix s2038_0)) of
- SOME ((() , s2039_0)) =>
- (case ((string_drop s2038_0 s2039_0)) of
- s2040_0 =>
- (case ((creg_name_matches_prefix s2040_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2041_0)) =>
- (case ((string_drop s2040_0 s2041_0)) of
- s2042_0 =>
- (case ((sep_matches_prefix s2042_0)) of
- SOME ((() , s2043_0)) =>
- (case ((string_drop s2042_0 s2043_0)) of
- s2044_0 =>
+ ((s3585_:string ->((3)words$word#(3)words$word#(5)words$word)option) s3586_0=
+ (let s3587_0 = s3586_0 in
+ if ((string_startswith s3587_0 "c.lw")) then
+ (case ((string_drop s3587_0 ((string_length "c.lw")))) of
+ s3588_0 =>
+ (case ((spc_matches_prefix0 s3588_0)) of
+ SOME ((() , s3589_0)) =>
+ (case ((string_drop s3588_0 s3589_0)) of
+ s3590_0 =>
+ (case ((creg_name_matches_prefix s3590_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3591_0)) =>
+ (case ((string_drop s3590_0 s3591_0)) of
+ s3592_0 =>
+ (case ((sep_matches_prefix s3592_0)) of
+ SOME ((() , s3593_0)) =>
+ (case ((string_drop s3592_0 s3593_0)) of
+ s3594_0 =>
+ (case ((creg_name_matches_prefix s3594_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s3595_0)) =>
+ (case ((string_drop s3594_0 s3595_0)) of
+ s3596_0 =>
+ (case ((sep_matches_prefix s3596_0)) of
+ SOME ((() , s3597_0)) =>
+ (case ((string_drop s3596_0 s3597_0)) of
+ s3598_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2044_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3598_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__822, s2045_0)) =>
- if (((((subrange_vec_dec v__822 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1478, s3599_0)) =>
+ if (((((subrange_vec_dec v__1478 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__822 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1478 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__822 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- let p0_ = (string_drop s2044_0 s2045_0) in
+ ((subrange_vec_dec v__1478 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let p0_ = (string_drop s3598_0 s3599_0) in
if (((p0_ = ""))) then SOME (rdc, rsc, uimm) else NONE else NONE
| _ => NONE
)
@@ -29630,36 +50555,36 @@ val _ = Define `
else NONE))`;
-(*val _s2019_ : string -> maybe ((mword ty3 * mword ty8))*)
+(*val _s3573_ : string -> maybe ((mword ty3 * mword ty8))*)
val _ = Define `
- ((s2019_:string ->((3)words$word#(8)words$word)option) s2020_0=
- (let s2021_0 = s2020_0 in
- if ((string_startswith s2021_0 "c.addi4spn")) then
- (case ((string_drop s2021_0 ((string_length "c.addi4spn")))) of
- s2022_0 =>
- (case ((spc_matches_prefix0 s2022_0)) of
- SOME ((() , s2023_0)) =>
- (case ((string_drop s2022_0 s2023_0)) of
- s2024_0 =>
- (case ((creg_name_matches_prefix s2024_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2025_0)) =>
- (case ((string_drop s2024_0 s2025_0)) of
- s2026_0 =>
- (case ((sep_matches_prefix s2026_0)) of
- SOME ((() , s2027_0)) =>
- (case ((string_drop s2026_0 s2027_0)) of
- s2028_0 =>
+ ((s3573_:string ->((3)words$word#(8)words$word)option) s3574_0=
+ (let s3575_0 = s3574_0 in
+ if ((string_startswith s3575_0 "c.addi4spn")) then
+ (case ((string_drop s3575_0 ((string_length "c.addi4spn")))) of
+ s3576_0 =>
+ (case ((spc_matches_prefix0 s3576_0)) of
+ SOME ((() , s3577_0)) =>
+ (case ((string_drop s3576_0 s3577_0)) of
+ s3578_0 =>
+ (case ((creg_name_matches_prefix s3578_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s3579_0)) =>
+ (case ((string_drop s3578_0 s3579_0)) of
+ s3580_0 =>
+ (case ((sep_matches_prefix s3580_0)) of
+ SOME ((() , s3581_0)) =>
+ (case ((string_drop s3580_0 s3581_0)) of
+ s3582_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2028_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__824, s2029_0)) =>
- if (((((subrange_vec_dec v__824 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3582_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1480, s3583_0)) =>
+ if (((((subrange_vec_dec v__1480 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__824 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1480 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__824 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- let p0_ = (string_drop s2028_0 s2029_0) in
+ ((subrange_vec_dec v__1480 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ let p0_ = (string_drop s3582_0 s3583_0) in
if (((p0_ = ""))) then SOME (rdc, nzimm) else NONE else NONE
| _ => NONE
)
@@ -29676,57 +50601,63 @@ val _ = Define `
else NONE))`;
-(*val _s1995_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1995_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1996_0=
- ((case s1996_0 of
- s1997_0 =>
- (case ((amo_mnemonic_matches_prefix s1997_0)) of
- SOME ((op, s1998_0)) =>
- let s1999_0 = (string_drop s1997_0 s1998_0) in
- if ((string_startswith s1999_0 ".")) then
- (case ((string_drop s1999_0 ((string_length ".")))) of
- s2000_0 =>
- (case ((size_mnemonic_matches_prefix s2000_0)) of
- SOME ((width, s2001_0)) =>
- (case ((string_drop s2000_0 s2001_0)) of
- s2002_0 =>
- (case ((maybe_aq_matches_prefix s2002_0)) of
- SOME ((aq, s2003_0)) =>
- (case ((string_drop s2002_0 s2003_0)) of
- s2004_0 =>
- (case ((maybe_rl_matches_prefix s2004_0)) of
- SOME ((rl, s2005_0)) =>
- (case ((string_drop s2004_0 s2005_0)) of
- s2006_0 =>
- (case ((spc_matches_prefix0 s2006_0)) of
- SOME ((() , s2007_0)) =>
- (case ((string_drop s2006_0 s2007_0)) of
- s2008_0 =>
- (case ((reg_name_matches_prefix s2008_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2009_0)) =>
- (case ((string_drop s2008_0 s2009_0)) of
- s2010_0 =>
- (case ((sep_matches_prefix s2010_0)) of
- SOME ((() , s2011_0)) =>
- (case ((string_drop s2010_0 s2011_0)) of
- s2012_0 =>
- (case ((reg_name_matches_prefix s2012_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2013_0)) =>
- (case ((string_drop s2012_0 s2013_0)) of
- s2014_0 =>
- (case ((sep_matches_prefix s2014_0)) of
- SOME ((() , s2015_0)) =>
- (case ((string_drop s2014_0 s2015_0)) of
- s2016_0 =>
- (case ((reg_name_matches_prefix s2016_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2017_0)) =>
- let p0_ = (string_drop s2016_0 s2017_0) in
- if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs1, rs2) else NONE
- | _ => NONE
- )
- )
+(*val _s3547_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3547_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s3548_0=
+ ((case s3548_0 of
+ s3549_0 =>
+ (case ((amo_mnemonic_matches_prefix s3549_0)) of
+ SOME ((op, s3550_0)) =>
+ let s3551_0 = (string_drop s3549_0 s3550_0) in
+ if ((string_startswith s3551_0 ".")) then
+ (case ((string_drop s3551_0 ((string_length ".")))) of
+ s3552_0 =>
+ (case ((size_mnemonic_matches_prefix s3552_0)) of
+ SOME ((width, s3553_0)) =>
+ (case ((string_drop s3552_0 s3553_0)) of
+ s3554_0 =>
+ (case ((maybe_aq_matches_prefix s3554_0)) of
+ SOME ((aq, s3555_0)) =>
+ (case ((string_drop s3554_0 s3555_0)) of
+ s3556_0 =>
+ (case ((maybe_rl_matches_prefix s3556_0)) of
+ SOME ((rl, s3557_0)) =>
+ (case ((string_drop s3556_0 s3557_0)) of
+ s3558_0 =>
+ (case ((spc_matches_prefix0 s3558_0)) of
+ SOME ((() , s3559_0)) =>
+ (case ((string_drop s3558_0 s3559_0)) of
+ s3560_0 =>
+ (case ((reg_name_matches_prefix s3560_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3561_0)) =>
+ (case ((string_drop s3560_0 s3561_0)) of
+ s3562_0 =>
+ (case ((sep_matches_prefix s3562_0)) of
+ SOME ((() , s3563_0)) =>
+ (case ((string_drop s3562_0 s3563_0)) of
+ s3564_0 =>
+ (case ((reg_name_matches_prefix s3564_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3565_0)) =>
+ (case ((string_drop s3564_0 s3565_0)) of
+ s3566_0 =>
+ (case ((sep_matches_prefix s3566_0)) of
+ SOME ((() , s3567_0)) =>
+ let s3568_0 = (string_drop s3566_0 s3567_0) in
+ if ((string_startswith s3568_0 "(")) then
+ (case ((string_drop s3568_0 ((string_length "(")))) of
+ s3569_0 =>
+ (case ((reg_name_matches_prefix s3569_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3570_0)) =>
+ let s3571_0 = (string_drop s3569_0 s3570_0) in
+ if ((string_startswith s3571_0 ")")) then
+ let p0_ = (string_drop s3571_0 ((string_length ")"))) in
+ if (((p0_ = ""))) then SOME (op, width, aq, rl, rd, rs2, rs1) else
+ NONE else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -29756,49 +50687,49 @@ val _ = Define `
)))`;
-(*val _s1973_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1973_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s1974_0=
- (let s1975_0 = s1974_0 in
- if ((string_startswith s1975_0 "sc.")) then
- (case ((string_drop s1975_0 ((string_length "sc.")))) of
- s1976_0 =>
- (case ((size_mnemonic_matches_prefix s1976_0)) of
- SOME ((size1, s1977_0)) =>
- (case ((string_drop s1976_0 s1977_0)) of
- s1978_0 =>
- (case ((maybe_aq_matches_prefix s1978_0)) of
- SOME ((aq, s1979_0)) =>
- (case ((string_drop s1978_0 s1979_0)) of
- s1980_0 =>
- (case ((maybe_rl_matches_prefix s1980_0)) of
- SOME ((rl, s1981_0)) =>
- (case ((string_drop s1980_0 s1981_0)) of
- s1982_0 =>
- (case ((spc_matches_prefix0 s1982_0)) of
- SOME ((() , s1983_0)) =>
- (case ((string_drop s1982_0 s1983_0)) of
- s1984_0 =>
- (case ((reg_name_matches_prefix s1984_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1985_0)) =>
- (case ((string_drop s1984_0 s1985_0)) of
- s1986_0 =>
- (case ((sep_matches_prefix s1986_0)) of
- SOME ((() , s1987_0)) =>
- (case ((string_drop s1986_0 s1987_0)) of
- s1988_0 =>
- (case ((reg_name_matches_prefix s1988_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1989_0)) =>
- (case ((string_drop s1988_0 s1989_0)) of
- s1990_0 =>
- (case ((sep_matches_prefix s1990_0)) of
- SOME ((() , s1991_0)) =>
- (case ((string_drop s1990_0 s1991_0)) of
- s1992_0 =>
- (case ((reg_name_matches_prefix s1992_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1993_0)) =>
- let p0_ = (string_drop s1992_0 s1993_0) in
+(*val _s3525_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3525_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word)option) s3526_0=
+ (let s3527_0 = s3526_0 in
+ if ((string_startswith s3527_0 "sc.")) then
+ (case ((string_drop s3527_0 ((string_length "sc.")))) of
+ s3528_0 =>
+ (case ((size_mnemonic_matches_prefix s3528_0)) of
+ SOME ((size1, s3529_0)) =>
+ (case ((string_drop s3528_0 s3529_0)) of
+ s3530_0 =>
+ (case ((maybe_aq_matches_prefix s3530_0)) of
+ SOME ((aq, s3531_0)) =>
+ (case ((string_drop s3530_0 s3531_0)) of
+ s3532_0 =>
+ (case ((maybe_rl_matches_prefix s3532_0)) of
+ SOME ((rl, s3533_0)) =>
+ (case ((string_drop s3532_0 s3533_0)) of
+ s3534_0 =>
+ (case ((spc_matches_prefix0 s3534_0)) of
+ SOME ((() , s3535_0)) =>
+ (case ((string_drop s3534_0 s3535_0)) of
+ s3536_0 =>
+ (case ((reg_name_matches_prefix s3536_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3537_0)) =>
+ (case ((string_drop s3536_0 s3537_0)) of
+ s3538_0 =>
+ (case ((sep_matches_prefix s3538_0)) of
+ SOME ((() , s3539_0)) =>
+ (case ((string_drop s3538_0 s3539_0)) of
+ s3540_0 =>
+ (case ((reg_name_matches_prefix s3540_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3541_0)) =>
+ (case ((string_drop s3540_0 s3541_0)) of
+ s3542_0 =>
+ (case ((sep_matches_prefix s3542_0)) of
+ SOME ((() , s3543_0)) =>
+ (case ((string_drop s3542_0 s3543_0)) of
+ s3544_0 =>
+ (case ((reg_name_matches_prefix s3544_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3545_0)) =>
+ let p0_ = (string_drop s3544_0 s3545_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -29830,41 +50761,41 @@ val _ = Define `
else NONE))`;
-(*val _s1955_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
+(*val _s3507_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1955_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s1956_0=
- (let s1957_0 = s1956_0 in
- if ((string_startswith s1957_0 "lr.")) then
- (case ((string_drop s1957_0 ((string_length "lr.")))) of
- s1958_0 =>
- (case ((size_mnemonic_matches_prefix s1958_0)) of
- SOME ((size1, s1959_0)) =>
- (case ((string_drop s1958_0 s1959_0)) of
- s1960_0 =>
- (case ((maybe_aq_matches_prefix s1960_0)) of
- SOME ((aq, s1961_0)) =>
- (case ((string_drop s1960_0 s1961_0)) of
- s1962_0 =>
- (case ((maybe_rl_matches_prefix s1962_0)) of
- SOME ((rl, s1963_0)) =>
- (case ((string_drop s1962_0 s1963_0)) of
- s1964_0 =>
- (case ((spc_matches_prefix0 s1964_0)) of
- SOME ((() , s1965_0)) =>
- (case ((string_drop s1964_0 s1965_0)) of
- s1966_0 =>
- (case ((reg_name_matches_prefix s1966_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1967_0)) =>
- (case ((string_drop s1966_0 s1967_0)) of
- s1968_0 =>
- (case ((sep_matches_prefix s1968_0)) of
- SOME ((() , s1969_0)) =>
- (case ((string_drop s1968_0 s1969_0)) of
- s1970_0 =>
- (case ((reg_name_matches_prefix s1970_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1971_0)) =>
- let p0_ = (string_drop s1970_0 s1971_0) in
+ ((s3507_:string ->(word_width#bool#bool#(5)words$word#(5)words$word)option) s3508_0=
+ (let s3509_0 = s3508_0 in
+ if ((string_startswith s3509_0 "lr.")) then
+ (case ((string_drop s3509_0 ((string_length "lr.")))) of
+ s3510_0 =>
+ (case ((size_mnemonic_matches_prefix s3510_0)) of
+ SOME ((size1, s3511_0)) =>
+ (case ((string_drop s3510_0 s3511_0)) of
+ s3512_0 =>
+ (case ((maybe_aq_matches_prefix s3512_0)) of
+ SOME ((aq, s3513_0)) =>
+ (case ((string_drop s3512_0 s3513_0)) of
+ s3514_0 =>
+ (case ((maybe_rl_matches_prefix s3514_0)) of
+ SOME ((rl, s3515_0)) =>
+ (case ((string_drop s3514_0 s3515_0)) of
+ s3516_0 =>
+ (case ((spc_matches_prefix0 s3516_0)) of
+ SOME ((() , s3517_0)) =>
+ (case ((string_drop s3516_0 s3517_0)) of
+ s3518_0 =>
+ (case ((reg_name_matches_prefix s3518_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3519_0)) =>
+ (case ((string_drop s3518_0 s3519_0)) of
+ s3520_0 =>
+ (case ((sep_matches_prefix s3520_0)) of
+ SOME ((() , s3521_0)) =>
+ (case ((string_drop s3520_0 s3521_0)) of
+ s3522_0 =>
+ (case ((reg_name_matches_prefix s3522_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3523_0)) =>
+ let p0_ = (string_drop s3522_0 s3523_0) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rd, rs1) else NONE
| _ => NONE
)
@@ -29890,29 +50821,29 @@ val _ = Define `
else NONE))`;
-(*val _s1943_ : string -> maybe ((mword ty5 * mword ty5))*)
+(*val _s3495_ : string -> maybe ((mword ty5 * mword ty5))*)
val _ = Define `
- ((s1943_:string ->((5)words$word#(5)words$word)option) s1944_0=
- (let s1945_0 = s1944_0 in
- if ((string_startswith s1945_0 "sfence.vma")) then
- (case ((string_drop s1945_0 ((string_length "sfence.vma")))) of
- s1946_0 =>
- (case ((spc_matches_prefix0 s1946_0)) of
- SOME ((() , s1947_0)) =>
- (case ((string_drop s1946_0 s1947_0)) of
- s1948_0 =>
- (case ((reg_name_matches_prefix s1948_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1949_0)) =>
- (case ((string_drop s1948_0 s1949_0)) of
- s1950_0 =>
- (case ((sep_matches_prefix s1950_0)) of
- SOME ((() , s1951_0)) =>
- (case ((string_drop s1950_0 s1951_0)) of
- s1952_0 =>
- (case ((reg_name_matches_prefix s1952_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1953_0)) =>
- let p0_ = (string_drop s1952_0 s1953_0) in
+ ((s3495_:string ->((5)words$word#(5)words$word)option) s3496_0=
+ (let s3497_0 = s3496_0 in
+ if ((string_startswith s3497_0 "sfence.vma")) then
+ (case ((string_drop s3497_0 ((string_length "sfence.vma")))) of
+ s3498_0 =>
+ (case ((spc_matches_prefix0 s3498_0)) of
+ SOME ((() , s3499_0)) =>
+ (case ((string_drop s3498_0 s3499_0)) of
+ s3500_0 =>
+ (case ((reg_name_matches_prefix s3500_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3501_0)) =>
+ (case ((string_drop s3500_0 s3501_0)) of
+ s3502_0 =>
+ (case ((sep_matches_prefix s3502_0)) of
+ SOME ((() , s3503_0)) =>
+ (case ((string_drop s3502_0 s3503_0)) of
+ s3504_0 =>
+ (case ((reg_name_matches_prefix s3504_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3505_0)) =>
+ let p0_ = (string_drop s3504_0 s3505_0) in
if (((p0_ = ""))) then SOME (rs1, rs2) else NONE
| _ => NONE
)
@@ -29929,29 +50860,29 @@ val _ = Define `
else NONE))`;
-(*val _s1931_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s3483_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1931_:string ->((4)words$word#(4)words$word)option) s1932_0=
- (let s1933_0 = s1932_0 in
- if ((string_startswith s1933_0 "fence.tso")) then
- (case ((string_drop s1933_0 ((string_length "fence.tso")))) of
- s1934_0 =>
- (case ((spc_matches_prefix0 s1934_0)) of
- SOME ((() , s1935_0)) =>
- (case ((string_drop s1934_0 s1935_0)) of
- s1936_0 =>
- (case ((fence_bits_matches_prefix s1936_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1937_0)) =>
- (case ((string_drop s1936_0 s1937_0)) of
- s1938_0 =>
- (case ((sep_matches_prefix s1938_0)) of
- SOME ((() , s1939_0)) =>
- (case ((string_drop s1938_0 s1939_0)) of
- s1940_0 =>
- (case ((fence_bits_matches_prefix s1940_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1941_0)) =>
- let p0_ = (string_drop s1940_0 s1941_0) in
+ ((s3483_:string ->((4)words$word#(4)words$word)option) s3484_0=
+ (let s3485_0 = s3484_0 in
+ if ((string_startswith s3485_0 "fence.tso")) then
+ (case ((string_drop s3485_0 ((string_length "fence.tso")))) of
+ s3486_0 =>
+ (case ((spc_matches_prefix0 s3486_0)) of
+ SOME ((() , s3487_0)) =>
+ (case ((string_drop s3486_0 s3487_0)) of
+ s3488_0 =>
+ (case ((fence_bits_matches_prefix s3488_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s3489_0)) =>
+ (case ((string_drop s3488_0 s3489_0)) of
+ s3490_0 =>
+ (case ((sep_matches_prefix s3490_0)) of
+ SOME ((() , s3491_0)) =>
+ (case ((string_drop s3490_0 s3491_0)) of
+ s3492_0 =>
+ (case ((fence_bits_matches_prefix s3492_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s3493_0)) =>
+ let p0_ = (string_drop s3492_0 s3493_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -29968,29 +50899,29 @@ val _ = Define `
else NONE))`;
-(*val _s1919_ : string -> maybe ((mword ty4 * mword ty4))*)
+(*val _s3471_ : string -> maybe ((mword ty4 * mword ty4))*)
val _ = Define `
- ((s1919_:string ->((4)words$word#(4)words$word)option) s1920_0=
- (let s1921_0 = s1920_0 in
- if ((string_startswith s1921_0 "fence")) then
- (case ((string_drop s1921_0 ((string_length "fence")))) of
- s1922_0 =>
- (case ((spc_matches_prefix0 s1922_0)) of
- SOME ((() , s1923_0)) =>
- (case ((string_drop s1922_0 s1923_0)) of
- s1924_0 =>
- (case ((fence_bits_matches_prefix s1924_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s1925_0)) =>
- (case ((string_drop s1924_0 s1925_0)) of
- s1926_0 =>
- (case ((sep_matches_prefix s1926_0)) of
- SOME ((() , s1927_0)) =>
- (case ((string_drop s1926_0 s1927_0)) of
- s1928_0 =>
- (case ((fence_bits_matches_prefix s1928_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s1929_0)) =>
- let p0_ = (string_drop s1928_0 s1929_0) in
+ ((s3471_:string ->((4)words$word#(4)words$word)option) s3472_0=
+ (let s3473_0 = s3472_0 in
+ if ((string_startswith s3473_0 "fence")) then
+ (case ((string_drop s3473_0 ((string_length "fence")))) of
+ s3474_0 =>
+ (case ((spc_matches_prefix0 s3474_0)) of
+ SOME ((() , s3475_0)) =>
+ (case ((string_drop s3474_0 s3475_0)) of
+ s3476_0 =>
+ (case ((fence_bits_matches_prefix s3476_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s3477_0)) =>
+ (case ((string_drop s3476_0 s3477_0)) of
+ s3478_0 =>
+ (case ((sep_matches_prefix s3478_0)) of
+ SOME ((() , s3479_0)) =>
+ (case ((string_drop s3478_0 s3479_0)) of
+ s3480_0 =>
+ (case ((fence_bits_matches_prefix s3480_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s3481_0)) =>
+ let p0_ = (string_drop s3480_0 s3481_0) in
if (((p0_ = ""))) then SOME (pred, succ) else NONE
| _ => NONE
)
@@ -30007,41 +50938,41 @@ val _ = Define `
else NONE))`;
-(*val _s1902_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3454_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1902_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s1903_0=
- ((case s1903_0 of
- s1904_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s1904_0)) of
- SOME ((op, s1905_0)) =>
- (case ((string_drop s1904_0 s1905_0)) of
- s1906_0 =>
- (case ((spc_matches_prefix0 s1906_0)) of
- SOME ((() , s1907_0)) =>
- (case ((string_drop s1906_0 s1907_0)) of
- s1908_0 =>
- (case ((reg_name_matches_prefix s1908_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1909_0)) =>
- (case ((string_drop s1908_0 s1909_0)) of
- s1910_0 =>
- (case ((sep_matches_prefix s1910_0)) of
- SOME ((() , s1911_0)) =>
- (case ((string_drop s1910_0 s1911_0)) of
- s1912_0 =>
- (case ((reg_name_matches_prefix s1912_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1913_0)) =>
- (case ((string_drop s1912_0 s1913_0)) of
- s1914_0 =>
- (case ((sep_matches_prefix s1914_0)) of
- SOME ((() , s1915_0)) =>
- (case ((string_drop s1914_0 s1915_0)) of
- s1916_0 =>
+ ((s3454_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word)option) s3455_0=
+ ((case s3455_0 of
+ s3456_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s3456_0)) of
+ SOME ((op, s3457_0)) =>
+ (case ((string_drop s3456_0 s3457_0)) of
+ s3458_0 =>
+ (case ((spc_matches_prefix0 s3458_0)) of
+ SOME ((() , s3459_0)) =>
+ (case ((string_drop s3458_0 s3459_0)) of
+ s3460_0 =>
+ (case ((reg_name_matches_prefix s3460_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3461_0)) =>
+ (case ((string_drop s3460_0 s3461_0)) of
+ s3462_0 =>
+ (case ((sep_matches_prefix s3462_0)) of
+ SOME ((() , s3463_0)) =>
+ (case ((string_drop s3462_0 s3463_0)) of
+ s3464_0 =>
+ (case ((reg_name_matches_prefix s3464_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3465_0)) =>
+ (case ((string_drop s3464_0 s3465_0)) of
+ s3466_0 =>
+ (case ((sep_matches_prefix s3466_0)) of
+ SOME ((() , s3467_0)) =>
+ (case ((string_drop s3466_0 s3467_0)) of
+ s3468_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1916_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1917_0)) =>
- let p0_ = (string_drop s1916_0 s1917_0) in
+ s3468_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s3469_0)) =>
+ let p0_ = (string_drop s3468_0 s3469_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -30066,39 +50997,39 @@ val _ = Define `
)))`;
-(*val _s1885_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1885_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s1886_0=
- ((case s1886_0 of
- s1887_0 =>
- (case ((rtypew_mnemonic_matches_prefix s1887_0)) of
- SOME ((op, s1888_0)) =>
- (case ((string_drop s1887_0 s1888_0)) of
- s1889_0 =>
- (case ((spc_matches_prefix0 s1889_0)) of
- SOME ((() , s1890_0)) =>
- (case ((string_drop s1889_0 s1890_0)) of
- s1891_0 =>
- (case ((reg_name_matches_prefix s1891_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1892_0)) =>
- (case ((string_drop s1891_0 s1892_0)) of
- s1893_0 =>
- (case ((sep_matches_prefix s1893_0)) of
- SOME ((() , s1894_0)) =>
- (case ((string_drop s1893_0 s1894_0)) of
- s1895_0 =>
- (case ((reg_name_matches_prefix s1895_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1896_0)) =>
- (case ((string_drop s1895_0 s1896_0)) of
- s1897_0 =>
- (case ((sep_matches_prefix s1897_0)) of
- SOME ((() , s1898_0)) =>
- (case ((string_drop s1897_0 s1898_0)) of
- s1899_0 =>
- (case ((reg_name_matches_prefix s1899_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1900_0)) =>
- let p0_ = (string_drop s1899_0 s1900_0) in
+(*val _s3437_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3437_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word)option) s3438_0=
+ ((case s3438_0 of
+ s3439_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s3439_0)) of
+ SOME ((op, s3440_0)) =>
+ (case ((string_drop s3439_0 s3440_0)) of
+ s3441_0 =>
+ (case ((spc_matches_prefix0 s3441_0)) of
+ SOME ((() , s3442_0)) =>
+ (case ((string_drop s3441_0 s3442_0)) of
+ s3443_0 =>
+ (case ((reg_name_matches_prefix s3443_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3444_0)) =>
+ (case ((string_drop s3443_0 s3444_0)) of
+ s3445_0 =>
+ (case ((sep_matches_prefix s3445_0)) of
+ SOME ((() , s3446_0)) =>
+ (case ((string_drop s3445_0 s3446_0)) of
+ s3447_0 =>
+ (case ((reg_name_matches_prefix s3447_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3448_0)) =>
+ (case ((string_drop s3447_0 s3448_0)) of
+ s3449_0 =>
+ (case ((sep_matches_prefix s3449_0)) of
+ SOME ((() , s3450_0)) =>
+ (case ((string_drop s3449_0 s3450_0)) of
+ s3451_0 =>
+ (case ((reg_name_matches_prefix s3451_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3452_0)) =>
+ let p0_ = (string_drop s3451_0 s3452_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -30123,41 +51054,41 @@ val _ = Define `
)))`;
-(*val _s1868_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
-
-val _ = Define `
- ((s1868_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s1869_0=
- ((case s1869_0 of
- s1870_0 =>
- (case ((shiftw_mnemonic_matches_prefix s1870_0)) of
- SOME ((op, s1871_0)) =>
- (case ((string_drop s1870_0 s1871_0)) of
- s1872_0 =>
- (case ((spc_matches_prefix0 s1872_0)) of
- SOME ((() , s1873_0)) =>
- (case ((string_drop s1872_0 s1873_0)) of
- s1874_0 =>
- (case ((reg_name_matches_prefix s1874_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1875_0)) =>
- (case ((string_drop s1874_0 s1875_0)) of
- s1876_0 =>
- (case ((sep_matches_prefix s1876_0)) of
- SOME ((() , s1877_0)) =>
- (case ((string_drop s1876_0 s1877_0)) of
- s1878_0 =>
- (case ((reg_name_matches_prefix s1878_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1879_0)) =>
- (case ((string_drop s1878_0 s1879_0)) of
- s1880_0 =>
- (case ((sep_matches_prefix s1880_0)) of
- SOME ((() , s1881_0)) =>
- (case ((string_drop s1880_0 s1881_0)) of
- s1882_0 =>
+(*val _s3420_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5))*)
+
+val _ = Define `
+ ((s3420_:string ->(sop#(5)words$word#(5)words$word#(5)words$word)option) s3421_0=
+ ((case s3421_0 of
+ s3422_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s3422_0)) of
+ SOME ((op, s3423_0)) =>
+ (case ((string_drop s3422_0 s3423_0)) of
+ s3424_0 =>
+ (case ((spc_matches_prefix0 s3424_0)) of
+ SOME ((() , s3425_0)) =>
+ (case ((string_drop s3424_0 s3425_0)) of
+ s3426_0 =>
+ (case ((reg_name_matches_prefix s3426_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3427_0)) =>
+ (case ((string_drop s3426_0 s3427_0)) of
+ s3428_0 =>
+ (case ((sep_matches_prefix s3428_0)) of
+ SOME ((() , s3429_0)) =>
+ (case ((string_drop s3428_0 s3429_0)) of
+ s3430_0 =>
+ (case ((reg_name_matches_prefix s3430_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3431_0)) =>
+ (case ((string_drop s3430_0 s3431_0)) of
+ s3432_0 =>
+ (case ((sep_matches_prefix s3432_0)) of
+ SOME ((() , s3433_0)) =>
+ (case ((string_drop s3432_0 s3433_0)) of
+ s3434_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1882_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s1883_0)) =>
- let p0_ = (string_drop s1882_0 s1883_0) in
+ s3434_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s3435_0)) =>
+ let p0_ = (string_drop s3434_0 s3435_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -30182,39 +51113,38 @@ val _ = Define `
)))`;
-(*val _s1852_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s1852_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1853_0=
- (let s1854_0 = s1853_0 in
- if ((string_startswith s1854_0 "addiw")) then
- (case ((string_drop s1854_0 ((string_length "addiw")))) of
- s1855_0 =>
- (case ((spc_matches_prefix0 s1855_0)) of
- SOME ((() , s1856_0)) =>
- (case ((string_drop s1855_0 s1856_0)) of
- s1857_0 =>
- (case ((reg_name_matches_prefix s1857_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1858_0)) =>
- (case ((string_drop s1857_0 s1858_0)) of
- s1859_0 =>
- (case ((sep_matches_prefix s1859_0)) of
- SOME ((() , s1860_0)) =>
- (case ((string_drop s1859_0 s1860_0)) of
- s1861_0 =>
- (case ((reg_name_matches_prefix s1861_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1862_0)) =>
- (case ((string_drop s1861_0 s1862_0)) of
- s1863_0 =>
- (case ((sep_matches_prefix s1863_0)) of
- SOME ((() , s1864_0)) =>
- (case ((string_drop s1863_0 s1864_0)) of
- s1865_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1865_0
+(*val _s3404_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s3404_:string ->((5)words$word#(5)words$word#(12)words$word)option) s3405_0=
+ (let s3406_0 = s3405_0 in
+ if ((string_startswith s3406_0 "addiw")) then
+ (case ((string_drop s3406_0 ((string_length "addiw")))) of
+ s3407_0 =>
+ (case ((spc_matches_prefix0 s3407_0)) of
+ SOME ((() , s3408_0)) =>
+ (case ((string_drop s3407_0 s3408_0)) of
+ s3409_0 =>
+ (case ((reg_name_matches_prefix s3409_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3410_0)) =>
+ (case ((string_drop s3409_0 s3410_0)) of
+ s3411_0 =>
+ (case ((sep_matches_prefix s3411_0)) of
+ SOME ((() , s3412_0)) =>
+ (case ((string_drop s3411_0 s3412_0)) of
+ s3413_0 =>
+ (case ((reg_name_matches_prefix s3413_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3414_0)) =>
+ (case ((string_drop s3413_0 s3414_0)) of
+ s3415_0 =>
+ (case ((sep_matches_prefix s3415_0)) of
+ SOME ((() , s3416_0)) =>
+ (case ((string_drop s3415_0 s3416_0)) of
+ s3417_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3417_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1866_0)) =>
- let p0_ = (string_drop s1865_0 s1866_0) in
+ SOME ((imm, s3418_0)) =>
+ let p0_ = (string_drop s3417_0 s3418_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30237,63 +51167,62 @@ val _ = Define `
else NONE))`;
-(*val _s1824_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s3376_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1824_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1825_0=
- (let s1826_0 = s1825_0 in
- if ((string_startswith s1826_0 "s")) then
- (case ((string_drop s1826_0 ((string_length "s")))) of
- s1827_0 =>
- (case ((size_mnemonic_matches_prefix s1827_0)) of
- SOME ((size1, s1828_0)) =>
- (case ((string_drop s1827_0 s1828_0)) of
- s1829_0 =>
- (case ((maybe_aq_matches_prefix s1829_0)) of
- SOME ((aq, s1830_0)) =>
- (case ((string_drop s1829_0 s1830_0)) of
- s1831_0 =>
- (case ((maybe_rl_matches_prefix s1831_0)) of
- SOME ((rl, s1832_0)) =>
- (case ((string_drop s1831_0 s1832_0)) of
- s1833_0 =>
- (case ((spc_matches_prefix0 s1833_0)) of
- SOME ((() , s1834_0)) =>
- (case ((string_drop s1833_0 s1834_0)) of
- s1835_0 =>
- (case ((reg_name_matches_prefix s1835_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1836_0)) =>
- (case ((string_drop s1835_0 s1836_0)) of
- s1837_0 =>
- (case ((sep_matches_prefix s1837_0)) of
- SOME ((() , s1838_0)) =>
- (case ((string_drop s1837_0 s1838_0)) of
- s1839_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1839_0
+ ((s3376_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s3377_0=
+ (let s3378_0 = s3377_0 in
+ if ((string_startswith s3378_0 "s")) then
+ (case ((string_drop s3378_0 ((string_length "s")))) of
+ s3379_0 =>
+ (case ((size_mnemonic_matches_prefix s3379_0)) of
+ SOME ((size1, s3380_0)) =>
+ (case ((string_drop s3379_0 s3380_0)) of
+ s3381_0 =>
+ (case ((maybe_aq_matches_prefix s3381_0)) of
+ SOME ((aq, s3382_0)) =>
+ (case ((string_drop s3381_0 s3382_0)) of
+ s3383_0 =>
+ (case ((maybe_rl_matches_prefix s3383_0)) of
+ SOME ((rl, s3384_0)) =>
+ (case ((string_drop s3383_0 s3384_0)) of
+ s3385_0 =>
+ (case ((spc_matches_prefix0 s3385_0)) of
+ SOME ((() , s3386_0)) =>
+ (case ((string_drop s3385_0 s3386_0)) of
+ s3387_0 =>
+ (case ((reg_name_matches_prefix s3387_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3388_0)) =>
+ (case ((string_drop s3387_0 s3388_0)) of
+ s3389_0 =>
+ (case ((sep_matches_prefix s3389_0)) of
+ SOME ((() , s3390_0)) =>
+ (case ((string_drop s3389_0 s3390_0)) of
+ s3391_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3391_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1840_0)) =>
- (case ((string_drop s1839_0 s1840_0)) of
- s1841_0 =>
- (case ((opt_spc_matches_prefix0 s1841_0)) of
- SOME ((() , s1842_0)) =>
- let s1843_0 = (string_drop s1841_0 s1842_0) in
- if ((string_startswith s1843_0 "(")) then
- (case ((string_drop s1843_0 ((string_length "(")))) of
- s1844_0 =>
- (case ((opt_spc_matches_prefix0 s1844_0)) of
- SOME ((() , s1845_0)) =>
- (case ((string_drop s1844_0 s1845_0)) of
- s1846_0 =>
- (case ((reg_name_matches_prefix s1846_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1847_0)) =>
- (case ((string_drop s1846_0 s1847_0)) of
- s1848_0 =>
- (case ((opt_spc_matches_prefix0 s1848_0)) of
- SOME ((() , s1849_0)) =>
- let s1850_0 = (string_drop s1848_0 s1849_0) in
- if ((string_startswith s1850_0 ")")) then
- let p0_ = (string_drop s1850_0 ((string_length ")"))) in
+ SOME ((imm, s3392_0)) =>
+ (case ((string_drop s3391_0 s3392_0)) of
+ s3393_0 =>
+ (case ((opt_spc_matches_prefix0 s3393_0)) of
+ SOME ((() , s3394_0)) =>
+ let s3395_0 = (string_drop s3393_0 s3394_0) in
+ if ((string_startswith s3395_0 "(")) then
+ (case ((string_drop s3395_0 ((string_length "(")))) of
+ s3396_0 =>
+ (case ((opt_spc_matches_prefix0 s3396_0)) of
+ SOME ((() , s3397_0)) =>
+ (case ((string_drop s3396_0 s3397_0)) of
+ s3398_0 =>
+ (case ((reg_name_matches_prefix s3398_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3399_0)) =>
+ (case ((string_drop s3398_0 s3399_0)) of
+ s3400_0 =>
+ (case ((opt_spc_matches_prefix0 s3400_0)) of
+ SOME ((() , s3401_0)) =>
+ let s3402_0 = (string_drop s3400_0 s3401_0) in
+ if ((string_startswith s3402_0 ")")) then
+ let p0_ = (string_drop s3402_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, aq, rl, rs2, imm, rs1) else NONE
else NONE
| _ => NONE
@@ -30332,67 +51261,66 @@ val _ = Define `
else NONE))`;
-(*val _s1794_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
+(*val _s3346_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5))*)
val _ = Define `
- ((s1794_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s1795_0=
- (let s1796_0 = s1795_0 in
- if ((string_startswith s1796_0 "l")) then
- (case ((string_drop s1796_0 ((string_length "l")))) of
- s1797_0 =>
- (case ((size_mnemonic_matches_prefix s1797_0)) of
- SOME ((size1, s1798_0)) =>
- (case ((string_drop s1797_0 s1798_0)) of
- s1799_0 =>
- (case ((maybe_u_matches_prefix s1799_0)) of
- SOME ((is_unsigned, s1800_0)) =>
- (case ((string_drop s1799_0 s1800_0)) of
- s1801_0 =>
- (case ((maybe_aq_matches_prefix s1801_0)) of
- SOME ((aq, s1802_0)) =>
- (case ((string_drop s1801_0 s1802_0)) of
- s1803_0 =>
- (case ((maybe_rl_matches_prefix s1803_0)) of
- SOME ((rl, s1804_0)) =>
- (case ((string_drop s1803_0 s1804_0)) of
- s1805_0 =>
- (case ((spc_matches_prefix0 s1805_0)) of
- SOME ((() , s1806_0)) =>
- (case ((string_drop s1805_0 s1806_0)) of
- s1807_0 =>
- (case ((reg_name_matches_prefix s1807_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1808_0)) =>
- (case ((string_drop s1807_0 s1808_0)) of
- s1809_0 =>
- (case ((sep_matches_prefix s1809_0)) of
- SOME ((() , s1810_0)) =>
- (case ((string_drop s1809_0 s1810_0)) of
- s1811_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1811_0
+ ((s3346_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word)option) s3347_0=
+ (let s3348_0 = s3347_0 in
+ if ((string_startswith s3348_0 "l")) then
+ (case ((string_drop s3348_0 ((string_length "l")))) of
+ s3349_0 =>
+ (case ((size_mnemonic_matches_prefix s3349_0)) of
+ SOME ((size1, s3350_0)) =>
+ (case ((string_drop s3349_0 s3350_0)) of
+ s3351_0 =>
+ (case ((maybe_u_matches_prefix s3351_0)) of
+ SOME ((is_unsigned, s3352_0)) =>
+ (case ((string_drop s3351_0 s3352_0)) of
+ s3353_0 =>
+ (case ((maybe_aq_matches_prefix s3353_0)) of
+ SOME ((aq, s3354_0)) =>
+ (case ((string_drop s3353_0 s3354_0)) of
+ s3355_0 =>
+ (case ((maybe_rl_matches_prefix s3355_0)) of
+ SOME ((rl, s3356_0)) =>
+ (case ((string_drop s3355_0 s3356_0)) of
+ s3357_0 =>
+ (case ((spc_matches_prefix0 s3357_0)) of
+ SOME ((() , s3358_0)) =>
+ (case ((string_drop s3357_0 s3358_0)) of
+ s3359_0 =>
+ (case ((reg_name_matches_prefix s3359_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3360_0)) =>
+ (case ((string_drop s3359_0 s3360_0)) of
+ s3361_0 =>
+ (case ((sep_matches_prefix s3361_0)) of
+ SOME ((() , s3362_0)) =>
+ (case ((string_drop s3361_0 s3362_0)) of
+ s3363_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3363_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1812_0)) =>
- (case ((string_drop s1811_0 s1812_0)) of
- s1813_0 =>
- (case ((opt_spc_matches_prefix0 s1813_0)) of
- SOME ((() , s1814_0)) =>
- let s1815_0 = (string_drop s1813_0 s1814_0) in
- if ((string_startswith s1815_0 "(")) then
- (case ((string_drop s1815_0 ((string_length "(")))) of
- s1816_0 =>
- (case ((opt_spc_matches_prefix0 s1816_0)) of
- SOME ((() , s1817_0)) =>
- (case ((string_drop s1816_0 s1817_0)) of
- s1818_0 =>
- (case ((reg_name_matches_prefix s1818_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1819_0)) =>
- (case ((string_drop s1818_0 s1819_0)) of
- s1820_0 =>
- (case ((opt_spc_matches_prefix0 s1820_0)) of
- SOME ((() , s1821_0)) =>
- let s1822_0 = (string_drop s1820_0 s1821_0) in
- if ((string_startswith s1822_0 ")")) then
- let p0_ = (string_drop s1822_0 ((string_length ")"))) in
+ SOME ((imm, s3364_0)) =>
+ (case ((string_drop s3363_0 s3364_0)) of
+ s3365_0 =>
+ (case ((opt_spc_matches_prefix0 s3365_0)) of
+ SOME ((() , s3366_0)) =>
+ let s3367_0 = (string_drop s3365_0 s3366_0) in
+ if ((string_startswith s3367_0 "(")) then
+ (case ((string_drop s3367_0 ((string_length "(")))) of
+ s3368_0 =>
+ (case ((opt_spc_matches_prefix0 s3368_0)) of
+ SOME ((() , s3369_0)) =>
+ (case ((string_drop s3368_0 s3369_0)) of
+ s3370_0 =>
+ (case ((reg_name_matches_prefix s3370_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3371_0)) =>
+ (case ((string_drop s3370_0 s3371_0)) of
+ s3372_0 =>
+ (case ((opt_spc_matches_prefix0 s3372_0)) of
+ SOME ((() , s3373_0)) =>
+ let s3374_0 = (string_drop s3372_0 s3373_0) in
+ if ((string_startswith s3374_0 ")")) then
+ let p0_ = (string_drop s3374_0 ((string_length ")"))) in
if (((p0_ = ""))) then SOME (size1, is_unsigned, aq, rl, rd, imm, rs1)
else NONE else NONE
| _ => NONE
@@ -30434,39 +51362,39 @@ val _ = Define `
else NONE))`;
-(*val _s1777_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
+(*val _s3329_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5))*)
val _ = Define `
- ((s1777_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s1778_0=
- ((case s1778_0 of
- s1779_0 =>
- (case ((rtype_mnemonic_matches_prefix s1779_0)) of
- SOME ((op, s1780_0)) =>
- (case ((string_drop s1779_0 s1780_0)) of
- s1781_0 =>
- (case ((spc_matches_prefix0 s1781_0)) of
- SOME ((() , s1782_0)) =>
- (case ((string_drop s1781_0 s1782_0)) of
- s1783_0 =>
- (case ((reg_name_matches_prefix s1783_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1784_0)) =>
- (case ((string_drop s1783_0 s1784_0)) of
- s1785_0 =>
- (case ((sep_matches_prefix s1785_0)) of
- SOME ((() , s1786_0)) =>
- (case ((string_drop s1785_0 s1786_0)) of
- s1787_0 =>
- (case ((reg_name_matches_prefix s1787_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1788_0)) =>
- (case ((string_drop s1787_0 s1788_0)) of
- s1789_0 =>
- (case ((sep_matches_prefix s1789_0)) of
- SOME ((() , s1790_0)) =>
- (case ((string_drop s1789_0 s1790_0)) of
- s1791_0 =>
- (case ((reg_name_matches_prefix s1791_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1792_0)) =>
- let p0_ = (string_drop s1791_0 s1792_0) in
+ ((s3329_:string ->(rop#(5)words$word#(5)words$word#(5)words$word)option) s3330_0=
+ ((case s3330_0 of
+ s3331_0 =>
+ (case ((rtype_mnemonic_matches_prefix s3331_0)) of
+ SOME ((op, s3332_0)) =>
+ (case ((string_drop s3331_0 s3332_0)) of
+ s3333_0 =>
+ (case ((spc_matches_prefix0 s3333_0)) of
+ SOME ((() , s3334_0)) =>
+ (case ((string_drop s3333_0 s3334_0)) of
+ s3335_0 =>
+ (case ((reg_name_matches_prefix s3335_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3336_0)) =>
+ (case ((string_drop s3335_0 s3336_0)) of
+ s3337_0 =>
+ (case ((sep_matches_prefix s3337_0)) of
+ SOME ((() , s3338_0)) =>
+ (case ((string_drop s3337_0 s3338_0)) of
+ s3339_0 =>
+ (case ((reg_name_matches_prefix s3339_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3340_0)) =>
+ (case ((string_drop s3339_0 s3340_0)) of
+ s3341_0 =>
+ (case ((sep_matches_prefix s3341_0)) of
+ SOME ((() , s3342_0)) =>
+ (case ((string_drop s3341_0 s3342_0)) of
+ s3343_0 =>
+ (case ((reg_name_matches_prefix s3343_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3344_0)) =>
+ let p0_ = (string_drop s3343_0 s3344_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, rs2) else NONE
| _ => NONE
)
@@ -30491,41 +51419,41 @@ val _ = Define `
)))`;
-(*val _s1760_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
-
-val _ = Define `
- ((s1760_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s1761_0=
- ((case s1761_0 of
- s1762_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s1762_0)) of
- SOME ((op, s1763_0)) =>
- (case ((string_drop s1762_0 s1763_0)) of
- s1764_0 =>
- (case ((spc_matches_prefix0 s1764_0)) of
- SOME ((() , s1765_0)) =>
- (case ((string_drop s1764_0 s1765_0)) of
- s1766_0 =>
- (case ((reg_name_matches_prefix s1766_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1767_0)) =>
- (case ((string_drop s1766_0 s1767_0)) of
- s1768_0 =>
- (case ((sep_matches_prefix s1768_0)) of
- SOME ((() , s1769_0)) =>
- (case ((string_drop s1768_0 s1769_0)) of
- s1770_0 =>
- (case ((reg_name_matches_prefix s1770_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1771_0)) =>
- (case ((string_drop s1770_0 s1771_0)) of
- s1772_0 =>
- (case ((sep_matches_prefix s1772_0)) of
- SOME ((() , s1773_0)) =>
- (case ((string_drop s1772_0 s1773_0)) of
- s1774_0 =>
+(*val _s3312_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6))*)
+
+val _ = Define `
+ ((s3312_:string ->(sop#(5)words$word#(5)words$word#(6)words$word)option) s3313_0=
+ ((case s3313_0 of
+ s3314_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s3314_0)) of
+ SOME ((op, s3315_0)) =>
+ (case ((string_drop s3314_0 s3315_0)) of
+ s3316_0 =>
+ (case ((spc_matches_prefix0 s3316_0)) of
+ SOME ((() , s3317_0)) =>
+ (case ((string_drop s3316_0 s3317_0)) of
+ s3318_0 =>
+ (case ((reg_name_matches_prefix s3318_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3319_0)) =>
+ (case ((string_drop s3318_0 s3319_0)) of
+ s3320_0 =>
+ (case ((sep_matches_prefix s3320_0)) of
+ SOME ((() , s3321_0)) =>
+ (case ((string_drop s3320_0 s3321_0)) of
+ s3322_0 =>
+ (case ((reg_name_matches_prefix s3322_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3323_0)) =>
+ (case ((string_drop s3322_0 s3323_0)) of
+ s3324_0 =>
+ (case ((sep_matches_prefix s3324_0)) of
+ SOME ((() , s3325_0)) =>
+ (case ((string_drop s3324_0 s3325_0)) of
+ s3326_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1774_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s1775_0)) =>
- let p0_ = (string_drop s1774_0 s1775_0) in
+ s3326_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s3327_0)) =>
+ let p0_ = (string_drop s3326_0 s3327_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, shamt) else NONE
| _ => NONE
)
@@ -30550,41 +51478,40 @@ val _ = Define `
)))`;
-(*val _s1743_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s1743_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s1744_0=
- ((case s1744_0 of
- s1745_0 =>
- (case ((itype_mnemonic_matches_prefix s1745_0)) of
- SOME ((op, s1746_0)) =>
- (case ((string_drop s1745_0 s1746_0)) of
- s1747_0 =>
- (case ((spc_matches_prefix0 s1747_0)) of
- SOME ((() , s1748_0)) =>
- (case ((string_drop s1747_0 s1748_0)) of
- s1749_0 =>
- (case ((reg_name_matches_prefix s1749_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1750_0)) =>
- (case ((string_drop s1749_0 s1750_0)) of
- s1751_0 =>
- (case ((sep_matches_prefix s1751_0)) of
- SOME ((() , s1752_0)) =>
- (case ((string_drop s1751_0 s1752_0)) of
- s1753_0 =>
- (case ((reg_name_matches_prefix s1753_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1754_0)) =>
- (case ((string_drop s1753_0 s1754_0)) of
- s1755_0 =>
- (case ((sep_matches_prefix s1755_0)) of
- SOME ((() , s1756_0)) =>
- (case ((string_drop s1755_0 s1756_0)) of
- s1757_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1757_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s1758_0)) =>
- let p0_ = (string_drop s1757_0 s1758_0) in
+(*val _s3295_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s3295_:string ->(iop#(5)words$word#(5)words$word#(12)words$word)option) s3296_0=
+ ((case s3296_0 of
+ s3297_0 =>
+ (case ((itype_mnemonic_matches_prefix s3297_0)) of
+ SOME ((op, s3298_0)) =>
+ (case ((string_drop s3297_0 s3298_0)) of
+ s3299_0 =>
+ (case ((spc_matches_prefix0 s3299_0)) of
+ SOME ((() , s3300_0)) =>
+ (case ((string_drop s3299_0 s3300_0)) of
+ s3301_0 =>
+ (case ((reg_name_matches_prefix s3301_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3302_0)) =>
+ (case ((string_drop s3301_0 s3302_0)) of
+ s3303_0 =>
+ (case ((sep_matches_prefix s3303_0)) of
+ SOME ((() , s3304_0)) =>
+ (case ((string_drop s3303_0 s3304_0)) of
+ s3305_0 =>
+ (case ((reg_name_matches_prefix s3305_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3306_0)) =>
+ (case ((string_drop s3305_0 s3306_0)) of
+ s3307_0 =>
+ (case ((sep_matches_prefix s3307_0)) of
+ SOME ((() , s3308_0)) =>
+ (case ((string_drop s3307_0 s3308_0)) of
+ s3309_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3309_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s3310_0)) =>
+ let p0_ = (string_drop s3309_0 s3310_0) in
if (((p0_ = ""))) then SOME (op, rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30609,41 +51536,41 @@ val _ = Define `
)))`;
-(*val _s1726_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
-
-val _ = Define `
- ((s1726_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s1727_0=
- ((case s1727_0 of
- s1728_0 =>
- (case ((btype_mnemonic_matches_prefix s1728_0)) of
- SOME ((op, s1729_0)) =>
- (case ((string_drop s1728_0 s1729_0)) of
- s1730_0 =>
- (case ((spc_matches_prefix0 s1730_0)) of
- SOME ((() , s1731_0)) =>
- (case ((string_drop s1730_0 s1731_0)) of
- s1732_0 =>
- (case ((reg_name_matches_prefix s1732_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1733_0)) =>
- (case ((string_drop s1732_0 s1733_0)) of
- s1734_0 =>
- (case ((sep_matches_prefix s1734_0)) of
- SOME ((() , s1735_0)) =>
- (case ((string_drop s1734_0 s1735_0)) of
- s1736_0 =>
- (case ((reg_name_matches_prefix s1736_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s1737_0)) =>
- (case ((string_drop s1736_0 s1737_0)) of
- s1738_0 =>
- (case ((sep_matches_prefix s1738_0)) of
- SOME ((() , s1739_0)) =>
- (case ((string_drop s1738_0 s1739_0)) of
- s1740_0 =>
+(*val _s3278_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13))*)
+
+val _ = Define `
+ ((s3278_:string ->(bop#(5)words$word#(5)words$word#(13)words$word)option) s3279_0=
+ ((case s3279_0 of
+ s3280_0 =>
+ (case ((btype_mnemonic_matches_prefix s3280_0)) of
+ SOME ((op, s3281_0)) =>
+ (case ((string_drop s3280_0 s3281_0)) of
+ s3282_0 =>
+ (case ((spc_matches_prefix0 s3282_0)) of
+ SOME ((() , s3283_0)) =>
+ (case ((string_drop s3282_0 s3283_0)) of
+ s3284_0 =>
+ (case ((reg_name_matches_prefix s3284_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3285_0)) =>
+ (case ((string_drop s3284_0 s3285_0)) of
+ s3286_0 =>
+ (case ((sep_matches_prefix s3286_0)) of
+ SOME ((() , s3287_0)) =>
+ (case ((string_drop s3286_0 s3287_0)) of
+ s3288_0 =>
+ (case ((reg_name_matches_prefix s3288_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s3289_0)) =>
+ (case ((string_drop s3288_0 s3289_0)) of
+ s3290_0 =>
+ (case ((sep_matches_prefix s3290_0)) of
+ SOME ((() , s3291_0)) =>
+ (case ((string_drop s3290_0 s3291_0)) of
+ s3292_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1740_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s1741_0)) =>
- let p0_ = (string_drop s1740_0 s1741_0) in
+ s3292_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s3293_0)) =>
+ let p0_ = (string_drop s3292_0 s3293_0) in
if (((p0_ = ""))) then SOME (op, rs1, rs2, imm) else NONE
| _ => NONE
)
@@ -30668,39 +51595,38 @@ val _ = Define `
)))`;
-(*val _s1710_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
-
-val _ = Define `
- ((s1710_:string ->((5)words$word#(5)words$word#(12)words$word)option) s1711_0=
- (let s1712_0 = s1711_0 in
- if ((string_startswith s1712_0 "jalr")) then
- (case ((string_drop s1712_0 ((string_length "jalr")))) of
- s1713_0 =>
- (case ((spc_matches_prefix0 s1713_0)) of
- SOME ((() , s1714_0)) =>
- (case ((string_drop s1713_0 s1714_0)) of
- s1715_0 =>
- (case ((reg_name_matches_prefix s1715_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1716_0)) =>
- (case ((string_drop s1715_0 s1716_0)) of
- s1717_0 =>
- (case ((sep_matches_prefix s1717_0)) of
- SOME ((() , s1718_0)) =>
- (case ((string_drop s1717_0 s1718_0)) of
- s1719_0 =>
- (case ((reg_name_matches_prefix s1719_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s1720_0)) =>
- (case ((string_drop s1719_0 s1720_0)) of
- s1721_0 =>
- (case ((sep_matches_prefix s1721_0)) of
- SOME ((() , s1722_0)) =>
- (case ((string_drop s1721_0 s1722_0)) of
- s1723_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1723_0
+(*val _s3262_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12))*)
+
+val _ = Define `
+ ((s3262_:string ->((5)words$word#(5)words$word#(12)words$word)option) s3263_0=
+ (let s3264_0 = s3263_0 in
+ if ((string_startswith s3264_0 "jalr")) then
+ (case ((string_drop s3264_0 ((string_length "jalr")))) of
+ s3265_0 =>
+ (case ((spc_matches_prefix0 s3265_0)) of
+ SOME ((() , s3266_0)) =>
+ (case ((string_drop s3265_0 s3266_0)) of
+ s3267_0 =>
+ (case ((reg_name_matches_prefix s3267_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3268_0)) =>
+ (case ((string_drop s3267_0 s3268_0)) of
+ s3269_0 =>
+ (case ((sep_matches_prefix s3269_0)) of
+ SOME ((() , s3270_0)) =>
+ (case ((string_drop s3269_0 s3270_0)) of
+ s3271_0 =>
+ (case ((reg_name_matches_prefix s3271_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s3272_0)) =>
+ (case ((string_drop s3271_0 s3272_0)) of
+ s3273_0 =>
+ (case ((sep_matches_prefix s3273_0)) of
+ SOME ((() , s3274_0)) =>
+ (case ((string_drop s3273_0 s3274_0)) of
+ s3275_0 =>
+ (case ((hex_bits_12_matches_prefix0 s3275_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s1724_0)) =>
- let p0_ = (string_drop s1723_0 s1724_0) in
+ SOME ((imm, s3276_0)) =>
+ let p0_ = (string_drop s3275_0 s3276_0) in
if (((p0_ = ""))) then SOME (rd, rs1, imm) else NONE
| _ => NONE
)
@@ -30723,30 +51649,30 @@ val _ = Define `
else NONE))`;
-(*val _s1698_ : string -> maybe ((mword ty5 * mword ty21))*)
+(*val _s3250_ : string -> maybe ((mword ty5 * mword ty21))*)
val _ = Define `
- ((s1698_:string ->((5)words$word#(21)words$word)option) s1699_0=
- (let s1700_0 = s1699_0 in
- if ((string_startswith s1700_0 "jal")) then
- (case ((string_drop s1700_0 ((string_length "jal")))) of
- s1701_0 =>
- (case ((spc_matches_prefix0 s1701_0)) of
- SOME ((() , s1702_0)) =>
- (case ((string_drop s1701_0 s1702_0)) of
- s1703_0 =>
- (case ((reg_name_matches_prefix s1703_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1704_0)) =>
- (case ((string_drop s1703_0 s1704_0)) of
- s1705_0 =>
- (case ((sep_matches_prefix s1705_0)) of
- SOME ((() , s1706_0)) =>
- (case ((string_drop s1705_0 s1706_0)) of
- s1707_0 =>
+ ((s3250_:string ->((5)words$word#(21)words$word)option) s3251_0=
+ (let s3252_0 = s3251_0 in
+ if ((string_startswith s3252_0 "jal")) then
+ (case ((string_drop s3252_0 ((string_length "jal")))) of
+ s3253_0 =>
+ (case ((spc_matches_prefix0 s3253_0)) of
+ SOME ((() , s3254_0)) =>
+ (case ((string_drop s3253_0 s3254_0)) of
+ s3255_0 =>
+ (case ((reg_name_matches_prefix s3255_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3256_0)) =>
+ (case ((string_drop s3255_0 s3256_0)) of
+ s3257_0 =>
+ (case ((sep_matches_prefix s3257_0)) of
+ SOME ((() , s3258_0)) =>
+ (case ((string_drop s3257_0 s3258_0)) of
+ s3259_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s1707_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s1708_0)) =>
- let p0_ = (string_drop s1707_0 s1708_0) in
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s3259_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s3260_0)) =>
+ let p0_ = (string_drop s3259_0 s3260_0) in
if (((p0_ = ""))) then SOME (rd, imm) else NONE
| _ => NONE
)
@@ -30763,33 +51689,33 @@ val _ = Define `
else NONE))`;
-(*val _s1685_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
+(*val _s3237_ : string -> maybe ((uop * mword ty5 * mword ty20))*)
val _ = Define `
- ((s1685_:string ->(uop#(5)words$word#(20)words$word)option) s1686_0=
- ((case s1686_0 of
- s1687_0 =>
- (case ((utype_mnemonic_matches_prefix s1687_0)) of
- SOME ((op, s1688_0)) =>
- (case ((string_drop s1687_0 s1688_0)) of
- s1689_0 =>
- (case ((spc_matches_prefix0 s1689_0)) of
- SOME ((() , s1690_0)) =>
- (case ((string_drop s1689_0 s1690_0)) of
- s1691_0 =>
- (case ((reg_name_matches_prefix s1691_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s1692_0)) =>
- (case ((string_drop s1691_0 s1692_0)) of
- s1693_0 =>
- (case ((sep_matches_prefix s1693_0)) of
- SOME ((() , s1694_0)) =>
- (case ((string_drop s1693_0 s1694_0)) of
- s1695_0 =>
+ ((s3237_:string ->(uop#(5)words$word#(20)words$word)option) s3238_0=
+ ((case s3238_0 of
+ s3239_0 =>
+ (case ((utype_mnemonic_matches_prefix s3239_0)) of
+ SOME ((op, s3240_0)) =>
+ (case ((string_drop s3239_0 s3240_0)) of
+ s3241_0 =>
+ (case ((spc_matches_prefix0 s3241_0)) of
+ SOME ((() , s3242_0)) =>
+ (case ((string_drop s3241_0 s3242_0)) of
+ s3243_0 =>
+ (case ((reg_name_matches_prefix s3243_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s3244_0)) =>
+ (case ((string_drop s3243_0 s3244_0)) of
+ s3245_0 =>
+ (case ((sep_matches_prefix s3245_0)) of
+ SOME ((() , s3246_0)) =>
+ (case ((string_drop s3245_0 s3246_0)) of
+ s3247_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s1695_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s1696_0)) =>
- let p0_ = (string_drop s1695_0 s1696_0) in
+ s3247_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s3248_0)) =>
+ let p0_ = (string_drop s3247_0 s3248_0) in
if (((p0_ = ""))) then SOME (op, rd, imm) else NONE
| _ => NONE
)
@@ -30810,475 +51736,997 @@ val _ = Define `
val _ = Define `
((assembly_backwards_matches:string -> bool) arg_=
- (let s1697_0 = arg_ in
- if ((case ((s1685_ s1697_0 : ((uop # 5 words$word # 20 words$word))option)) of
+ (let s3249_0 = arg_ in
+ if ((case ((s3237_ s3249_0 : ((uop # 5 words$word # 20 words$word))option)) of
SOME ((op, rd, imm)) => T
| _ => F
- )) then (case (s1685_ s1697_0 : (( uop # 5 words$word # 20 words$word)) option) of
+ )) then (case (s3237_ s3249_0 : (( uop # 5 words$word # 20 words$word)) option) of
(SOME ((op, rd, imm))) =>
T
)
- else if ((case ((s1698_ s1697_0 : (( 5 words$word # 21 words$word))option)) of
+ else if ((case ((s3250_ s3249_0 : (( 5 words$word # 21 words$word))option)) of
SOME ((rd, imm)) => T
| _ => F
- )) then (case (s1698_ s1697_0 : (( 5 words$word # 21 words$word)) option) of
+ )) then (case (s3250_ s3249_0 : (( 5 words$word # 21 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s1710_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s3262_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => T
| _ => F
- )) then (case (s1710_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s3262_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
T
)
- else if ((case ((s1726_ s1697_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
+ else if ((case ((s3278_ s3249_0 : ((bop # 5 words$word # 5 words$word # 13 words$word))option)) of
SOME ((op, rs1, rs2, imm)) => T
| _ => F
)) then (case
- (s1726_ s1697_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
+ (s3278_ s3249_0 : (( bop # 5 words$word # 5 words$word # 13 words$word)) option) of
(SOME ((op, rs1, rs2, imm))) =>
T
)
- else if ((case ((s1743_ s1697_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s3295_ s3249_0 : ((iop # 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((op, rd, rs1, imm)) => T
| _ => F
)) then (case
- (s1743_ s1697_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
+ (s3295_ s3249_0 : (( iop # 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((op, rd, rs1, imm))) =>
T
)
- else if ((case ((s1760_ s1697_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
+ else if ((case ((s3312_ s3249_0 : ((sop # 5 words$word # 5 words$word # 6 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => T
| _ => F
)) then (case
- (s1760_ s1697_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
+ (s3312_ s3249_0 : (( sop # 5 words$word # 5 words$word # 6 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1777_ s1697_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3329_ s3249_0 : ((rop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1777_ s1697_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3329_ s3249_0 : (( rop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1794_ s1697_0
+ else if ((case ((s3346_ s3249_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1)) => T
| _ => F
)) then (case
- (s1794_ s1697_0
+ (s3346_ s3249_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1))) =>
T
)
- else if ((case ((s1824_ s1697_0
+ else if ((case ((s3376_ s3249_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1)) => T
| _ => F
)) then (case
- (s1824_ s1697_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (s3376_ s3249_0 : (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1))) =>
T
)
- else if ((case ((s1852_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ else if ((case ((s3404_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
SOME ((rd, rs1, imm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s1852_ s1697_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ )) then (case (s3404_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
(SOME ((rd, rs1, imm))) =>
T
)
- else if ((case ((s1868_ s1697_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3420_ s3249_0 : ((sop # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1868_ s1697_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3420_ s3249_0 : (( sop # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1885_ s1697_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3437_ s3249_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1885_ s1697_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3437_ s3249_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1902_ s1697_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3454_ s3249_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((op, rd, rs1, shamt)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s1902_ s1697_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3454_ s3249_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((op, rd, rs1, shamt))) =>
T
)
- else if ((case ((s1919_ s1697_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s3471_ s3249_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1919_ s1697_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s3471_ s3249_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
T
)
- else if ((case ((s1931_ s1697_0 : (( 4 words$word # 4 words$word))option)) of
+ else if ((case ((s3483_ s3249_0 : (( 4 words$word # 4 words$word))option)) of
SOME ((pred, succ)) => T
| _ => F
- )) then (case (s1931_ s1697_0 : (( 4 words$word # 4 words$word)) option) of
+ )) then (case (s3483_ s3249_0 : (( 4 words$word # 4 words$word)) option) of
(SOME ((pred, succ))) =>
T
)
- else if (((s1697_0 = "fence.i"))) then T
- else if (((s1697_0 = "ecall"))) then T
- else if (((s1697_0 = "mret"))) then T
- else if (((s1697_0 = "sret"))) then T
- else if (((s1697_0 = "ebreak"))) then T
- else if (((s1697_0 = "wfi"))) then T
- else if ((case ((s1943_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
+ else if (((s3249_0 = "fence.i"))) then T
+ else if (((s3249_0 = "ecall"))) then T
+ else if (((s3249_0 = "mret"))) then T
+ else if (((s3249_0 = "sret"))) then T
+ else if (((s3249_0 = "ebreak"))) then T
+ else if (((s3249_0 = "wfi"))) then T
+ else if ((case ((s3495_ s3249_0 : (( 5 words$word # 5 words$word))option)) of
SOME ((rs1, rs2)) => T
| _ => F
- )) then (case (s1943_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s3495_ s3249_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rs1, rs2))) =>
T
)
- else if ((case ((s1955_ s1697_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3507_ s3249_0 : ((word_width # bool # bool # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1)) => T
| _ => F
)) then (case
- (s1955_ s1697_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
+ (s3507_ s3249_0 : (( word_width # bool # bool # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1))) =>
T
)
- else if ((case ((s1973_ s1697_0
+ else if ((case ((s3525_ s3249_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s1973_ s1697_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3525_ s3249_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2))) =>
T
)
- else if ((case ((s1995_ s1697_0
+ else if ((case ((s3547_ s3249_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1)) => T
| _ => F
)) then (case
- (s1995_ s1697_0
+ (s3547_ s3249_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1))) =>
T
)
- else if (((s1697_0 = "c.nop"))) then T
- else if ((case ((s2019_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
- SOME ((rdc, nzimm)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if (((s3249_0 = "c.nop"))) then T
+ else if ((case ((s3573_ s3249_0 : (( 3 words$word # 8 words$word))option)) of
+ SOME ((rdc, nzimm)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s2019_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s3573_ s3249_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rdc, nzimm))) =>
T
)
- else if ((case ((s2031_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3585_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => T
| _ => F
)) then (case
- (s2031_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3585_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
T
)
- else if ((case ((s2047_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3601_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rdc, rsc, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2047_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3601_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rdc, rsc, uimm))) =>
T
)
- else if ((case ((s2063_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3617_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => T
| _ => F
)) then (case
- (s2063_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3617_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
T
)
- else if ((case ((s2079_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ else if ((case ((s3633_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
SOME ((rsc1, rsc2, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2079_ s1697_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (s3633_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
(SOME ((rsc1, rsc2, uimm))) =>
T
)
- else if ((case ((s2095_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, nzi)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s3649_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, nzi)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2095_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3649_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, nzi))) =>
T
)
- else if ((case ((s2107_ s1697_0 : ( 11 words$word)option)) of
+ else if ((case ((s3661_ s3249_0 : ( 11 words$word)option)) of
SOME (imm) => ((( 64 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s2107_ s1697_0 : ( 11 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2115_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ )) then (case (s3661_ s3249_0 : ( 11 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3669_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2115_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3669_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
T
)
- else if ((case ((s2127_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, imm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3681_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => (rd <> zreg)
| _ => F
- )) then (case (s2127_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3681_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s2139_ s1697_0 : ( 6 words$word)option)) of
- SOME (imm) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3693_ s3249_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2139_ s1697_0 : ( 6 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2147_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ )) then (case (s3693_ s3249_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3701_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, imm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s2147_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3701_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, imm))) =>
T
)
- else if ((case ((s2159_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3713_ s3249_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2159_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3713_ s3249_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2171_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s3725_ s3249_0 : (( 3 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s2171_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3725_ s3249_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2183_ s1697_0 : (( 3 words$word # 6 words$word))option)) of
+ else if ((case ((s3737_ s3249_0 : (( 3 words$word # 6 words$word))option)) of
SOME ((rsd, imm)) => T
| _ => F
- )) then (case (s2183_ s1697_0 : (( 3 words$word # 6 words$word)) option) of
+ )) then (case (s3737_ s3249_0 : (( 3 words$word # 6 words$word)) option) of
(SOME ((rsd, imm))) =>
T
)
- else if ((case ((s2195_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3749_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2195_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3749_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2207_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3761_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2207_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3761_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2219_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3773_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2219_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3773_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2231_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3785_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => T
| _ => F
- )) then (case (s2231_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3785_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2243_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3797_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2243_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3797_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2255_ s1697_0 : (( 3 words$word # 3 words$word))option)) of
+ else if ((case ((s3809_ s3249_0 : (( 3 words$word # 3 words$word))option)) of
SOME ((rsd, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2255_ s1697_0 : (( 3 words$word # 3 words$word)) option) of
+ )) then (case (s3809_ s3249_0 : (( 3 words$word # 3 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2267_ s1697_0 : ( 11 words$word)option)) of
+ else if ((case ((s3821_ s3249_0 : ( 11 words$word)option)) of
SOME (imm) => T
| _ => F
- )) then (case (s2267_ s1697_0 : ( 11 words$word) option) of (SOME (imm)) => T )
- else if ((case ((s2275_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
+ )) then (case (s3821_ s3249_0 : ( 11 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s3829_ s3249_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s2275_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s3829_ s3249_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
T
)
- else if ((case ((s2287_ s1697_0 : (( 3 words$word # 8 words$word))option)) of
+ else if ((case ((s3841_ s3249_0 : (( 3 words$word # 8 words$word))option)) of
SOME ((rs, imm)) => T
| _ => F
- )) then (case (s2287_ s1697_0 : (( 3 words$word # 8 words$word)) option) of
+ )) then (case (s3841_ s3249_0 : (( 3 words$word # 8 words$word)) option) of
(SOME ((rs, imm))) =>
T
)
- else if ((case ((s2299_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rsd, shamt)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s3853_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2299_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3853_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rsd, shamt))) =>
T
)
- else if ((case ((s2311_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3865_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (rd <> zreg)
| _ => F
- )) then (case (s2311_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3865_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2323_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
- SOME ((rd, uimm)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s3877_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s2323_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3877_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2335_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s3889_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rd, uimm)) => T
| _ => F
- )) then (case (s2335_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3889_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rd, uimm))) =>
T
)
- else if ((case ((s2347_ s1697_0 : (( 5 words$word # 6 words$word))option)) of
+ else if ((case ((s3901_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
SOME ((rs2, uimm)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2347_ s1697_0 : (( 5 words$word # 6 words$word)) option) of
+ )) then (case (s3901_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
(SOME ((rs2, uimm))) =>
T
)
- else if ((case ((s2359_ s1697_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s3913_ s3249_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s2359_ s1697_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
- else if ((case ((s2367_ s1697_0 : ( 5 words$word)option)) of
- SOME (rs1) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ )) then (case (s3913_ s3249_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
+ else if ((case ((s3921_ s3249_0 : ( 5 words$word)option)) of
+ SOME (rs1) => (rs1 <> zreg)
| _ => F
- )) then (case (s2367_ s1697_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
- else if ((case ((s2375_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rd, rs2)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ )) then (case (s3921_ s3249_0 : ( 5 words$word) option) of (SOME (rs1)) => T )
+ else if ((case ((s3929_ s3249_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rd, rs2)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s2375_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s3929_ s3249_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs2))) =>
T
)
- else if (((s1697_0 = "c.ebreak"))) then T
- else if ((case ((s2387_ s1697_0 : (( 5 words$word # 5 words$word))option)) of
- SOME ((rsd, rs2)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if (((s3249_0 = "c.ebreak"))) then T
+ else if ((case ((s3941_ s3249_0 : (( 5 words$word # 5 words$word))option)) of
+ SOME ((rsd, rs2)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s2387_ s1697_0 : (( 5 words$word # 5 words$word)) option) of
+ )) then (case (s3941_ s3249_0 : (( 5 words$word # 5 words$word)) option) of
(SOME ((rsd, rs2))) =>
T
)
- else if ((case ((s2399_ s1697_0
+ else if ((case ((s3953_ s3249_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2399_ s1697_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3953_ s3249_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2416_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3970_ s3249_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2416_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3970_ s3249_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2434_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s3988_ s3249_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2434_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s3988_ s3249_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2452_ s1697_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s4006_ s3249_0 : (( 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s2452_ s1697_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
+ )) then (case (s4006_ s3249_0 : (( 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((rd, rs1, rs2))) =>
T
)
- else if ((case ((s2468_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s4022_ s3249_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2468_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s4022_ s3249_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2487_ s1697_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
+ else if ((case ((s4041_ s3249_0 : ((bool # 5 words$word # 5 words$word # 5 words$word))option)) of
SOME ((s, rd, rs1, rs2)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2487_ s1697_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (s4041_ s3249_0 : (( bool # 5 words$word # 5 words$word # 5 words$word)) option) of
(SOME ((s, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2506_ s1697_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s4060_ s3249_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4060_ s3249_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
+ T
+ )
+ else if ((case ((s4078_ s3249_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((op, rd, csr, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4078_ s3249_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((op, rd, csr, rs1))) =>
+ T
+ )
+ else if (((s3249_0 = "uret"))) then T
+ else if ((case ((s4095_ s3249_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s4095_ s3249_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s4101_ s3249_0 : ( 5 words$word)option)) of
+ SOME (rsd) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s4101_ s3249_0 : ( 5 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s4107_ s3249_0 : ( 6 words$word)option)) of
+ SOME (imm) => T
+ | _ => F
+ )) then (case (s4107_ s3249_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s4113_ s3249_0 : ( 6 words$word)option)) of
+ SOME (imm) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s4113_ s3249_0 : ( 6 words$word) option) of (SOME (imm)) => T )
+ else if ((case ((s4119_ s3249_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s4119_ s3249_0 : ( 5 words$word) option) of (SOME (rs2)) => T )
+ else if ((case ((s4125_ s3249_0 : ( 5 words$word)option)) of
+ SOME (rs2) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s4125_ s3249_0 : ( 5 words$word) option) of (SOME (rs2)) => T )
+ else if ((case ((s4131_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rsd, shamt)) => ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s4131_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rsd, shamt))) =>
+ T
+ )
+ else if ((case ((s4140_ s3249_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s4140_ s3249_0 : ( 3 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s4146_ s3249_0 : ( 3 words$word)option)) of
+ SOME (rsd) => T
+ | _ => F
+ )) then (case (s4146_ s3249_0 : ( 3 words$word) option) of (SOME (rsd)) => T )
+ else if ((case ((s4152_ s3249_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word))option)) of
+ SOME ((pred, succ, rs, rd, fm)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s4152_ s3249_0 : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word)) option) of
+ (SOME ((pred, succ, rs, rd, fm))) =>
+ T
+ )
+ else if ((case ((s4170_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word))option)) of
+ SOME ((rd, rs, imm)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case (s4170_ s3249_0 : (( 5 words$word # 5 words$word # 12 words$word)) option) of
+ (SOME ((rd, rs, imm))) =>
+ T
+ )
+ else if ((case ((s4182_ s3249_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rd, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4182_ s3249_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rd, imm, rs1))) =>
+ T
+ )
+ else if ((case ((s4206_ s3249_0 : ((word_width # 5 words$word # 12 words$word # 5 words$word))option)) of
+ SOME ((width, rs2, imm, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4206_ s3249_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word)) option) of
+ (SOME ((width, rs2, imm, rs1))) =>
+ T
+ )
+ else if ((case ((s4230_ s3249_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s4230_ s3249_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ T
+ )
+ else if ((case ((s4255_ s3249_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s4255_ s3249_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ T
+ )
+ else if ((case ((s4276_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4276_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4293_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4293_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4310_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4310_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4327_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4327_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4344_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4344_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4361_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4361_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4378_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4378_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4395_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4395_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4412_ s3249_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4412_ s3249_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4429_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4429_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4446_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4446_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4463_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4463_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4480_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4480_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4497_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4497_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4514_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2506_ s1697_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s4514_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2))) =>
T
)
- else if ((case ((s2524_ s1697_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word))option)) of
- SOME ((op, rd, rs1, csr)) => T
+ else if ((case ((s4531_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_S, rd, rs1, rs2)) => T
| _ => F
)) then (case
- (s2524_ s1697_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word)) option) of
- (SOME ((op, rd, rs1, csr))) =>
+ (s4531_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2))) =>
T
)
- else if (((s1697_0 = "uret"))) then T
- else if ((case ((s2541_ s1697_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s2541_ s1697_0 : ( 32 words$word) option) of (SOME (s)) => T )
- else if ((case ((s2549_ s1697_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
- then (case (s2549_ s1697_0 : ( 16 words$word) option) of (SOME (s)) => T )
+ else if ((case ((s4548_ s3249_0 : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_S, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4548_ s3249_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4565_ s3249_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_W, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4565_ s3249_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_W, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s4578_ s3249_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_W_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4578_ s3249_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_W_X, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s4591_ s3249_0 : ((f_un_op_S # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_S, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s4591_ s3249_0 : (( f_un_op_S # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_S, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s4604_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, imm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s4604_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, imm))) =>
+ T
+ )
+ else if ((case ((s4616_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s4616_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ T
+ )
+ else if ((case ((s4628_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s4628_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ T
+ )
+ else if ((case ((s4644_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s4644_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ T
+ )
+ else if ((case ((s4660_ s3249_0
+ : ((f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm)) => T
+ | _ => F
+ )) then (case
+ (s4660_ s3249_0
+ : (( f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm))) =>
+ T
+ )
+ else if ((case ((s4685_ s3249_0
+ : ((f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((op, rd, rs1, rs2, rm)) => T
+ | _ => F
+ )) then (case
+ (s4685_ s3249_0
+ : (( f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((op, rd, rs1, rs2, rm))) =>
+ T
+ )
+ else if ((case ((s4706_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FSQRT_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4706_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FSQRT_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4723_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_W_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4723_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_W_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4740_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_WU_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4740_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_WU_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4757_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_W, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4757_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_W, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4774_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_WU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4774_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_WU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4791_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_L_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4791_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_L_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4808_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_LU_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4808_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_LU_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4825_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_L, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4825_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_L, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4842_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_LU, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4842_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_LU, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4859_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_S_D, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4859_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_S_D, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4876_ s3249_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode))option)) of
+ SOME ((FCVT_D_S, rd, rs1, rm)) => T
+ | _ => F
+ )) then (case
+ (s4876_ s3249_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode)) option) of
+ (SOME ((FCVT_D_S, rd, rs1, rm))) =>
+ T
+ )
+ else if ((case ((s4893_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJ_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4893_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJ_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4910_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJN_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4910_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJN_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4927_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FSGNJX_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4927_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FSGNJX_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4944_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMIN_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4944_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMIN_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4961_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FMAX_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4961_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMAX_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4978_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FEQ_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4978_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FEQ_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s4995_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLT_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s4995_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLT_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s5012_ s3249_0 : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word))option)) of
+ SOME ((FLE_D, rd, rs1, rs2)) => T
+ | _ => F
+ )) then (case
+ (s5012_ s3249_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word)) option) of
+ (SOME ((FLE_D, rd, rs1, rs2))) =>
+ T
+ )
+ else if ((case ((s5029_ s3249_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_X_D, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s5029_ s3249_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_X_D, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s5042_ s3249_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FMV_D_X, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s5042_ s3249_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FMV_D_X, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s5055_ s3249_0 : ((f_un_op_D # 5 words$word # 5 words$word))option)) of
+ SOME ((FCLASS_D, rd, rs1)) => T
+ | _ => F
+ )) then (case
+ (s5055_ s3249_0 : (( f_un_op_D # 5 words$word # 5 words$word)) option) of
+ (SOME ((FCLASS_D, rd, rs1))) =>
+ T
+ )
+ else if ((case ((s5068_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rd, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s5068_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rd, uimm))) =>
+ T
+ )
+ else if ((case ((s5080_ s3249_0 : (( 5 words$word # 6 words$word))option)) of
+ SOME ((rs2, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s5080_ s3249_0 : (( 5 words$word # 6 words$word)) option) of
+ (SOME ((rs2, uimm))) =>
+ T
+ )
+ else if ((case ((s5092_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rdc, rsc, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s5092_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rdc, rsc, uimm))) =>
+ T
+ )
+ else if ((case ((s5108_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word))option)) of
+ SOME ((rsc1, rsc2, uimm)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s5108_ s3249_0 : (( 3 words$word # 3 words$word # 5 words$word)) option) of
+ (SOME ((rsc1, rsc2, uimm))) =>
+ T
+ )
+ else if ((case ((s5124_ s3249_0 : ( 32 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s5124_ s3249_0 : ( 32 words$word) option) of (SOME (s)) => T )
+ else if ((case ((s5132_ s3249_0 : ( 16 words$word)option)) of SOME (s) => T | _ => F ))
+ then (case (s5132_ s3249_0 : ( 16 words$word) option) of (SOME (s)) => T )
else F))`;
-(*val assembly_matches_prefix : string -> maybe ((ast * ii))*)
-
-(*val _s3457_ : string -> maybe ((mword ty16 * string))*)
+(*val _s7071_ : string -> maybe ((mword ty16 * string))*)
val _ = Define `
- ((s3457_:string ->((16)words$word#string)option) s3458_0=
- (let s3459_0 = s3458_0 in
- if ((string_startswith s3459_0 "c.illegal")) then
- (case ((string_drop s3459_0 ((string_length "c.illegal")))) of
- s3460_0 =>
- (case ((spc_matches_prefix0 s3460_0)) of
- SOME ((() , s3461_0)) =>
- (case ((string_drop s3460_0 s3461_0)) of
- s3462_0 =>
+ ((s7071_:string ->((16)words$word#string)option) s7072_0=
+ (let s7073_0 = s7072_0 in
+ if ((string_startswith s7073_0 "c.illegal")) then
+ (case ((string_drop s7073_0 ((string_length "c.illegal")))) of
+ s7074_0 =>
+ (case ((spc_matches_prefix0 s7074_0)) of
+ SOME ((() , s7075_0)) =>
+ (case ((string_drop s7074_0 s7075_0)) of
+ s7076_0 =>
(case ((hex_bits_16_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3462_0 : (( 16 words$word # ii)) option)) of
- SOME ((s, s3463_0)) =>
- (case ((string_drop s3462_0 s3463_0)) of s_ => SOME (s, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7076_0 : (( 16 words$word # ii)) option)) of
+ SOME ((s, s7077_0)) =>
+ (case ((string_drop s7076_0 s7077_0)) of s_ => SOME (s, s_) )
| _ => NONE
)
)
@@ -31288,22 +52736,22 @@ val _ = Define `
else NONE))`;
-(*val _s3449_ : string -> maybe ((mword ty32 * string))*)
+(*val _s7063_ : string -> maybe ((mword ty32 * string))*)
val _ = Define `
- ((s3449_:string ->((32)words$word#string)option) s3450_0=
- (let s3451_0 = s3450_0 in
- if ((string_startswith s3451_0 "illegal")) then
- (case ((string_drop s3451_0 ((string_length "illegal")))) of
- s3452_0 =>
- (case ((spc_matches_prefix0 s3452_0)) of
- SOME ((() , s3453_0)) =>
- (case ((string_drop s3452_0 s3453_0)) of
- s3454_0 =>
+ ((s7063_:string ->((32)words$word#string)option) s7064_0=
+ (let s7065_0 = s7064_0 in
+ if ((string_startswith s7065_0 "illegal")) then
+ (case ((string_drop s7065_0 ((string_length "illegal")))) of
+ s7066_0 =>
+ (case ((spc_matches_prefix0 s7066_0)) of
+ SOME ((() , s7067_0)) =>
+ (case ((string_drop s7066_0 s7067_0)) of
+ s7068_0 =>
(case ((hex_bits_32_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3454_0 : (( 32 words$word # ii)) option)) of
- SOME ((s, s3455_0)) =>
- (case ((string_drop s3454_0 s3455_0)) of s_ => SOME (s, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7068_0 : (( 32 words$word # ii)) option)) of
+ SOME ((s, s7069_0)) =>
+ (case ((string_drop s7068_0 s7069_0)) of s_ => SOME (s, s_) )
| _ => NONE
)
)
@@ -31313,51 +52761,234 @@ val _ = Define `
else NONE))`;
-(*val _s3445_ : string -> maybe string*)
+(*val _s7047_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s3445_:string ->(string)option) s3446_0=
- (let s3447_0 = s3446_0 in
- if ((string_startswith s3447_0 "uret")) then
- (case ((string_drop s3447_0 ((string_length "uret")))) of s_ => SOME s_ )
+ ((s7047_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s7048_0=
+ (let s7049_0 = s7048_0 in
+ if ((string_startswith s7049_0 "c.fsd")) then
+ (case ((string_drop s7049_0 ((string_length "c.fsd")))) of
+ s7050_0 =>
+ (case ((spc_matches_prefix0 s7050_0)) of
+ SOME ((() , s7051_0)) =>
+ (case ((string_drop s7050_0 s7051_0)) of
+ s7052_0 =>
+ (case ((creg_name_matches_prefix s7052_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s7053_0)) =>
+ (case ((string_drop s7052_0 s7053_0)) of
+ s7054_0 =>
+ (case ((sep_matches_prefix s7054_0)) of
+ SOME ((() , s7055_0)) =>
+ (case ((string_drop s7054_0 s7055_0)) of
+ s7056_0 =>
+ (case ((creg_name_matches_prefix s7056_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s7057_0)) =>
+ (case ((string_drop s7056_0 s7057_0)) of
+ s7058_0 =>
+ (case ((sep_matches_prefix s7058_0)) of
+ SOME ((() , s7059_0)) =>
+ (case ((string_drop s7058_0 s7059_0)) of
+ s7060_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7060_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1482, s7061_0)) =>
+ if (((((subrange_vec_dec v__1482 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1482 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1482 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s7060_0 s7061_0)) of
+ s_ => SOME (rsc1, rsc2, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
else NONE))`;
-(*val _s3428_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12 * string))*)
+(*val _s7031_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s3428_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word#string)option) s3429_0=
- ((case s3429_0 of
- s3430_0 =>
- (case ((csr_mnemonic_matches_prefix s3430_0)) of
- SOME ((op, s3431_0)) =>
- (case ((string_drop s3430_0 s3431_0)) of
- s3432_0 =>
- (case ((spc_matches_prefix0 s3432_0)) of
- SOME ((() , s3433_0)) =>
- (case ((string_drop s3432_0 s3433_0)) of
- s3434_0 =>
- (case ((reg_name_matches_prefix s3434_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3435_0)) =>
- (case ((string_drop s3434_0 s3435_0)) of
- s3436_0 =>
- (case ((sep_matches_prefix s3436_0)) of
- SOME ((() , s3437_0)) =>
- (case ((string_drop s3436_0 s3437_0)) of
- s3438_0 =>
- (case ((reg_name_matches_prefix s3438_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3439_0)) =>
- (case ((string_drop s3438_0 s3439_0)) of
- s3440_0 =>
- (case ((sep_matches_prefix s3440_0)) of
- SOME ((() , s3441_0)) =>
- (case ((string_drop s3440_0 s3441_0)) of
- s3442_0 =>
- (case ((csr_name_map_matches_prefix s3442_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s3443_0)) =>
- (case ((string_drop s3442_0 s3443_0)) of
- s_ => SOME (op, rd, rs1, csr, s_)
+ ((s7031_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s7032_0=
+ (let s7033_0 = s7032_0 in
+ if ((string_startswith s7033_0 "c.fld")) then
+ (case ((string_drop s7033_0 ((string_length "c.fld")))) of
+ s7034_0 =>
+ (case ((spc_matches_prefix0 s7034_0)) of
+ SOME ((() , s7035_0)) =>
+ (case ((string_drop s7034_0 s7035_0)) of
+ s7036_0 =>
+ (case ((creg_name_matches_prefix s7036_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s7037_0)) =>
+ (case ((string_drop s7036_0 s7037_0)) of
+ s7038_0 =>
+ (case ((sep_matches_prefix s7038_0)) of
+ SOME ((() , s7039_0)) =>
+ (case ((string_drop s7038_0 s7039_0)) of
+ s7040_0 =>
+ (case ((creg_name_matches_prefix s7040_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s7041_0)) =>
+ (case ((string_drop s7040_0 s7041_0)) of
+ s7042_0 =>
+ (case ((sep_matches_prefix s7042_0)) of
+ SOME ((() , s7043_0)) =>
+ (case ((string_drop s7042_0 s7043_0)) of
+ s7044_0 =>
+ (case ((hex_bits_8_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7044_0
+ : (( 8 words$word # ii)) option)) of
+ SOME ((v__1484, s7045_0)) =>
+ if (((((subrange_vec_dec v__1484 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1484 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1484 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s7044_0 s7045_0)) of
+ s_ => SOME (rdc, rsc, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s7019_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s7019_:string ->((5)words$word#(6)words$word#string)option) s7020_0=
+ (let s7021_0 = s7020_0 in
+ if ((string_startswith s7021_0 "c.fsdsp")) then
+ (case ((string_drop s7021_0 ((string_length "c.fsdsp")))) of
+ s7022_0 =>
+ (case ((spc_matches_prefix0 s7022_0)) of
+ SOME ((() , s7023_0)) =>
+ (case ((string_drop s7022_0 s7023_0)) of
+ s7024_0 =>
+ (case ((reg_name_matches_prefix s7024_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s7025_0)) =>
+ (case ((string_drop s7024_0 s7025_0)) of
+ s7026_0 =>
+ (case ((sep_matches_prefix s7026_0)) of
+ SOME ((() , s7027_0)) =>
+ (case ((string_drop s7026_0 s7027_0)) of
+ s7028_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7028_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s7029_0)) =>
+ (case ((string_drop s7028_0 s7029_0)) of s_ => SOME (rs2, uimm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s7007_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s7007_:string ->((5)words$word#(6)words$word#string)option) s7008_0=
+ (let s7009_0 = s7008_0 in
+ if ((string_startswith s7009_0 "c.fldsp")) then
+ (case ((string_drop s7009_0 ((string_length "c.fldsp")))) of
+ s7010_0 =>
+ (case ((spc_matches_prefix0 s7010_0)) of
+ SOME ((() , s7011_0)) =>
+ (case ((string_drop s7010_0 s7011_0)) of
+ s7012_0 =>
+ (case ((reg_name_matches_prefix s7012_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s7013_0)) =>
+ (case ((string_drop s7012_0 s7013_0)) of
+ s7014_0 =>
+ (case ((sep_matches_prefix s7014_0)) of
+ SOME ((() , s7015_0)) =>
+ (case ((string_drop s7014_0 s7015_0)) of
+ s7016_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s7016_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s7017_0)) =>
+ (case ((string_drop s7016_0 s7017_0)) of s_ => SOME (rd, uimm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6994_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6994_:string ->(f_un_op_D#(5)words$word#(5)words$word#string)option) s6995_0=
+ ((case s6995_0 of
+ s6996_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s6996_0)) of
+ SOME ((FCLASS_D, s6997_0)) =>
+ (case ((string_drop s6996_0 s6997_0)) of
+ s6998_0 =>
+ (case ((spc_matches_prefix0 s6998_0)) of
+ SOME ((() , s6999_0)) =>
+ (case ((string_drop s6998_0 s6999_0)) of
+ s7000_0 =>
+ (case ((reg_name_matches_prefix s7000_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s7001_0)) =>
+ (case ((string_drop s7000_0 s7001_0)) of
+ s7002_0 =>
+ (case ((sep_matches_prefix s7002_0)) of
+ SOME ((() , s7003_0)) =>
+ (case ((string_drop s7002_0 s7003_0)) of
+ s7004_0 =>
+ (case ((freg_name_matches_prefix s7004_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s7005_0)) =>
+ (case ((string_drop s7004_0 s7005_0)) of
+ s_ => SOME (FCLASS_D, rd, rs1, s_)
)
| _ => NONE
)
@@ -31373,6 +53004,44 @@ val _ = Define `
)
| _ => NONE
)
+ )))`;
+
+
+(*val _s6981_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6981_:string ->(f_un_op_D#(5)words$word#(5)words$word#string)option) s6982_0=
+ ((case s6982_0 of
+ s6983_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s6983_0)) of
+ SOME ((FMV_D_X, s6984_0)) =>
+ (case ((string_drop s6983_0 s6984_0)) of
+ s6985_0 =>
+ (case ((spc_matches_prefix0 s6985_0)) of
+ SOME ((() , s6986_0)) =>
+ (case ((string_drop s6985_0 s6986_0)) of
+ s6987_0 =>
+ (case ((freg_name_matches_prefix s6987_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6988_0)) =>
+ (case ((string_drop s6987_0 s6988_0)) of
+ s6989_0 =>
+ (case ((sep_matches_prefix s6989_0)) of
+ SOME ((() , s6990_0)) =>
+ (case ((string_drop s6989_0 s6990_0)) of
+ s6991_0 =>
+ (case ((reg_name_matches_prefix s6991_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6992_0)) =>
+ (case ((string_drop s6991_0 s6992_0)) of
+ s_ => SOME (FMV_D_X, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
)
| _ => NONE
)
@@ -31382,45 +53051,3321 @@ val _ = Define `
)))`;
-(*val _s3410_ : string -> maybe ((csrop * mword ty5 * mword ty5 * mword ty12 * string))*)
+(*val _s6968_ : string -> maybe ((f_un_op_D * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6968_:string ->(f_un_op_D#(5)words$word#(5)words$word#string)option) s6969_0=
+ ((case s6969_0 of
+ s6970_0 =>
+ (case ((f_un_type_mnemonic_D_matches_prefix s6970_0)) of
+ SOME ((FMV_X_D, s6971_0)) =>
+ (case ((string_drop s6970_0 s6971_0)) of
+ s6972_0 =>
+ (case ((spc_matches_prefix0 s6972_0)) of
+ SOME ((() , s6973_0)) =>
+ (case ((string_drop s6972_0 s6973_0)) of
+ s6974_0 =>
+ (case ((reg_name_matches_prefix s6974_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6975_0)) =>
+ (case ((string_drop s6974_0 s6975_0)) of
+ s6976_0 =>
+ (case ((sep_matches_prefix s6976_0)) of
+ SOME ((() , s6977_0)) =>
+ (case ((string_drop s6976_0 s6977_0)) of
+ s6978_0 =>
+ (case ((freg_name_matches_prefix s6978_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6979_0)) =>
+ (case ((string_drop s6978_0 s6979_0)) of
+ s_ => SOME (FMV_X_D, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6951_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6951_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6952_0=
+ ((case s6952_0 of
+ s6953_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6953_0)) of
+ SOME ((FLE_D, s6954_0)) =>
+ (case ((string_drop s6953_0 s6954_0)) of
+ s6955_0 =>
+ (case ((spc_matches_prefix0 s6955_0)) of
+ SOME ((() , s6956_0)) =>
+ (case ((string_drop s6955_0 s6956_0)) of
+ s6957_0 =>
+ (case ((reg_name_matches_prefix s6957_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6958_0)) =>
+ (case ((string_drop s6957_0 s6958_0)) of
+ s6959_0 =>
+ (case ((sep_matches_prefix s6959_0)) of
+ SOME ((() , s6960_0)) =>
+ (case ((string_drop s6959_0 s6960_0)) of
+ s6961_0 =>
+ (case ((freg_name_matches_prefix s6961_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6962_0)) =>
+ (case ((string_drop s6961_0 s6962_0)) of
+ s6963_0 =>
+ (case ((sep_matches_prefix s6963_0)) of
+ SOME ((() , s6964_0)) =>
+ (case ((string_drop s6963_0 s6964_0)) of
+ s6965_0 =>
+ (case ((freg_name_matches_prefix s6965_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6966_0)) =>
+ (case ((string_drop s6965_0 s6966_0)) of
+ s_ => SOME (FLE_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6934_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6934_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6935_0=
+ ((case s6935_0 of
+ s6936_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6936_0)) of
+ SOME ((FLT_D, s6937_0)) =>
+ (case ((string_drop s6936_0 s6937_0)) of
+ s6938_0 =>
+ (case ((spc_matches_prefix0 s6938_0)) of
+ SOME ((() , s6939_0)) =>
+ (case ((string_drop s6938_0 s6939_0)) of
+ s6940_0 =>
+ (case ((reg_name_matches_prefix s6940_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6941_0)) =>
+ (case ((string_drop s6940_0 s6941_0)) of
+ s6942_0 =>
+ (case ((sep_matches_prefix s6942_0)) of
+ SOME ((() , s6943_0)) =>
+ (case ((string_drop s6942_0 s6943_0)) of
+ s6944_0 =>
+ (case ((freg_name_matches_prefix s6944_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6945_0)) =>
+ (case ((string_drop s6944_0 s6945_0)) of
+ s6946_0 =>
+ (case ((sep_matches_prefix s6946_0)) of
+ SOME ((() , s6947_0)) =>
+ (case ((string_drop s6946_0 s6947_0)) of
+ s6948_0 =>
+ (case ((freg_name_matches_prefix s6948_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6949_0)) =>
+ (case ((string_drop s6948_0 s6949_0)) of
+ s_ => SOME (FLT_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6917_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6917_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6918_0=
+ ((case s6918_0 of
+ s6919_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6919_0)) of
+ SOME ((FEQ_D, s6920_0)) =>
+ (case ((string_drop s6919_0 s6920_0)) of
+ s6921_0 =>
+ (case ((spc_matches_prefix0 s6921_0)) of
+ SOME ((() , s6922_0)) =>
+ (case ((string_drop s6921_0 s6922_0)) of
+ s6923_0 =>
+ (case ((reg_name_matches_prefix s6923_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6924_0)) =>
+ (case ((string_drop s6923_0 s6924_0)) of
+ s6925_0 =>
+ (case ((sep_matches_prefix s6925_0)) of
+ SOME ((() , s6926_0)) =>
+ (case ((string_drop s6925_0 s6926_0)) of
+ s6927_0 =>
+ (case ((freg_name_matches_prefix s6927_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6928_0)) =>
+ (case ((string_drop s6927_0 s6928_0)) of
+ s6929_0 =>
+ (case ((sep_matches_prefix s6929_0)) of
+ SOME ((() , s6930_0)) =>
+ (case ((string_drop s6929_0 s6930_0)) of
+ s6931_0 =>
+ (case ((freg_name_matches_prefix s6931_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6932_0)) =>
+ (case ((string_drop s6931_0 s6932_0)) of
+ s_ => SOME (FEQ_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6900_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6900_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6901_0=
+ ((case s6901_0 of
+ s6902_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6902_0)) of
+ SOME ((FMAX_D, s6903_0)) =>
+ (case ((string_drop s6902_0 s6903_0)) of
+ s6904_0 =>
+ (case ((spc_matches_prefix0 s6904_0)) of
+ SOME ((() , s6905_0)) =>
+ (case ((string_drop s6904_0 s6905_0)) of
+ s6906_0 =>
+ (case ((freg_name_matches_prefix s6906_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6907_0)) =>
+ (case ((string_drop s6906_0 s6907_0)) of
+ s6908_0 =>
+ (case ((sep_matches_prefix s6908_0)) of
+ SOME ((() , s6909_0)) =>
+ (case ((string_drop s6908_0 s6909_0)) of
+ s6910_0 =>
+ (case ((freg_name_matches_prefix s6910_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6911_0)) =>
+ (case ((string_drop s6910_0 s6911_0)) of
+ s6912_0 =>
+ (case ((sep_matches_prefix s6912_0)) of
+ SOME ((() , s6913_0)) =>
+ (case ((string_drop s6912_0 s6913_0)) of
+ s6914_0 =>
+ (case ((freg_name_matches_prefix s6914_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6915_0)) =>
+ (case ((string_drop s6914_0 s6915_0)) of
+ s_ => SOME (FMAX_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6883_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6883_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6884_0=
+ ((case s6884_0 of
+ s6885_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6885_0)) of
+ SOME ((FMIN_D, s6886_0)) =>
+ (case ((string_drop s6885_0 s6886_0)) of
+ s6887_0 =>
+ (case ((spc_matches_prefix0 s6887_0)) of
+ SOME ((() , s6888_0)) =>
+ (case ((string_drop s6887_0 s6888_0)) of
+ s6889_0 =>
+ (case ((freg_name_matches_prefix s6889_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6890_0)) =>
+ (case ((string_drop s6889_0 s6890_0)) of
+ s6891_0 =>
+ (case ((sep_matches_prefix s6891_0)) of
+ SOME ((() , s6892_0)) =>
+ (case ((string_drop s6891_0 s6892_0)) of
+ s6893_0 =>
+ (case ((freg_name_matches_prefix s6893_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6894_0)) =>
+ (case ((string_drop s6893_0 s6894_0)) of
+ s6895_0 =>
+ (case ((sep_matches_prefix s6895_0)) of
+ SOME ((() , s6896_0)) =>
+ (case ((string_drop s6895_0 s6896_0)) of
+ s6897_0 =>
+ (case ((freg_name_matches_prefix s6897_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6898_0)) =>
+ (case ((string_drop s6897_0 s6898_0)) of
+ s_ => SOME (FMIN_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6866_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6866_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6867_0=
+ ((case s6867_0 of
+ s6868_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6868_0)) of
+ SOME ((FSGNJX_D, s6869_0)) =>
+ (case ((string_drop s6868_0 s6869_0)) of
+ s6870_0 =>
+ (case ((spc_matches_prefix0 s6870_0)) of
+ SOME ((() , s6871_0)) =>
+ (case ((string_drop s6870_0 s6871_0)) of
+ s6872_0 =>
+ (case ((freg_name_matches_prefix s6872_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6873_0)) =>
+ (case ((string_drop s6872_0 s6873_0)) of
+ s6874_0 =>
+ (case ((sep_matches_prefix s6874_0)) of
+ SOME ((() , s6875_0)) =>
+ (case ((string_drop s6874_0 s6875_0)) of
+ s6876_0 =>
+ (case ((freg_name_matches_prefix s6876_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6877_0)) =>
+ (case ((string_drop s6876_0 s6877_0)) of
+ s6878_0 =>
+ (case ((sep_matches_prefix s6878_0)) of
+ SOME ((() , s6879_0)) =>
+ (case ((string_drop s6878_0 s6879_0)) of
+ s6880_0 =>
+ (case ((freg_name_matches_prefix s6880_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6881_0)) =>
+ (case ((string_drop s6880_0 s6881_0)) of
+ s_ => SOME (FSGNJX_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6849_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6849_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6850_0=
+ ((case s6850_0 of
+ s6851_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6851_0)) of
+ SOME ((FSGNJN_D, s6852_0)) =>
+ (case ((string_drop s6851_0 s6852_0)) of
+ s6853_0 =>
+ (case ((spc_matches_prefix0 s6853_0)) of
+ SOME ((() , s6854_0)) =>
+ (case ((string_drop s6853_0 s6854_0)) of
+ s6855_0 =>
+ (case ((freg_name_matches_prefix s6855_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6856_0)) =>
+ (case ((string_drop s6855_0 s6856_0)) of
+ s6857_0 =>
+ (case ((sep_matches_prefix s6857_0)) of
+ SOME ((() , s6858_0)) =>
+ (case ((string_drop s6857_0 s6858_0)) of
+ s6859_0 =>
+ (case ((freg_name_matches_prefix s6859_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6860_0)) =>
+ (case ((string_drop s6859_0 s6860_0)) of
+ s6861_0 =>
+ (case ((sep_matches_prefix s6861_0)) of
+ SOME ((() , s6862_0)) =>
+ (case ((string_drop s6861_0 s6862_0)) of
+ s6863_0 =>
+ (case ((freg_name_matches_prefix s6863_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6864_0)) =>
+ (case ((string_drop s6863_0 s6864_0)) of
+ s_ => SOME (FSGNJN_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6832_ : string -> maybe ((f_bin_op_D * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6832_:string ->(f_bin_op_D#(5)words$word#(5)words$word#(5)words$word#string)option) s6833_0=
+ ((case s6833_0 of
+ s6834_0 =>
+ (case ((f_bin_type_mnemonic_D_matches_prefix s6834_0)) of
+ SOME ((FSGNJ_D, s6835_0)) =>
+ (case ((string_drop s6834_0 s6835_0)) of
+ s6836_0 =>
+ (case ((spc_matches_prefix0 s6836_0)) of
+ SOME ((() , s6837_0)) =>
+ (case ((string_drop s6836_0 s6837_0)) of
+ s6838_0 =>
+ (case ((freg_name_matches_prefix s6838_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6839_0)) =>
+ (case ((string_drop s6838_0 s6839_0)) of
+ s6840_0 =>
+ (case ((sep_matches_prefix s6840_0)) of
+ SOME ((() , s6841_0)) =>
+ (case ((string_drop s6840_0 s6841_0)) of
+ s6842_0 =>
+ (case ((freg_name_matches_prefix s6842_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6843_0)) =>
+ (case ((string_drop s6842_0 s6843_0)) of
+ s6844_0 =>
+ (case ((sep_matches_prefix s6844_0)) of
+ SOME ((() , s6845_0)) =>
+ (case ((string_drop s6844_0 s6845_0)) of
+ s6846_0 =>
+ (case ((freg_name_matches_prefix s6846_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6847_0)) =>
+ (case ((string_drop s6846_0 s6847_0)) of
+ s_ => SOME (FSGNJ_D, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6815_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6815_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6816_0=
+ ((case s6816_0 of
+ s6817_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6817_0)) of
+ SOME ((FCVT_D_S, s6818_0)) =>
+ (case ((string_drop s6817_0 s6818_0)) of
+ s6819_0 =>
+ (case ((spc_matches_prefix0 s6819_0)) of
+ SOME ((() , s6820_0)) =>
+ (case ((string_drop s6819_0 s6820_0)) of
+ s6821_0 =>
+ (case ((freg_name_matches_prefix s6821_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6822_0)) =>
+ (case ((string_drop s6821_0 s6822_0)) of
+ s6823_0 =>
+ (case ((sep_matches_prefix s6823_0)) of
+ SOME ((() , s6824_0)) =>
+ (case ((string_drop s6823_0 s6824_0)) of
+ s6825_0 =>
+ (case ((freg_name_matches_prefix s6825_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6826_0)) =>
+ (case ((string_drop s6825_0 s6826_0)) of
+ s6827_0 =>
+ (case ((sep_matches_prefix s6827_0)) of
+ SOME ((() , s6828_0)) =>
+ (case ((string_drop s6827_0 s6828_0)) of
+ s6829_0 =>
+ (case ((frm_mnemonic_matches_prefix s6829_0)) of
+ SOME ((rm, s6830_0)) =>
+ (case ((string_drop s6829_0 s6830_0)) of
+ s_ => SOME (FCVT_D_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6798_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6798_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6799_0=
+ ((case s6799_0 of
+ s6800_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6800_0)) of
+ SOME ((FCVT_S_D, s6801_0)) =>
+ (case ((string_drop s6800_0 s6801_0)) of
+ s6802_0 =>
+ (case ((spc_matches_prefix0 s6802_0)) of
+ SOME ((() , s6803_0)) =>
+ (case ((string_drop s6802_0 s6803_0)) of
+ s6804_0 =>
+ (case ((freg_name_matches_prefix s6804_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6805_0)) =>
+ (case ((string_drop s6804_0 s6805_0)) of
+ s6806_0 =>
+ (case ((sep_matches_prefix s6806_0)) of
+ SOME ((() , s6807_0)) =>
+ (case ((string_drop s6806_0 s6807_0)) of
+ s6808_0 =>
+ (case ((freg_name_matches_prefix s6808_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6809_0)) =>
+ (case ((string_drop s6808_0 s6809_0)) of
+ s6810_0 =>
+ (case ((sep_matches_prefix s6810_0)) of
+ SOME ((() , s6811_0)) =>
+ (case ((string_drop s6810_0 s6811_0)) of
+ s6812_0 =>
+ (case ((frm_mnemonic_matches_prefix s6812_0)) of
+ SOME ((rm, s6813_0)) =>
+ (case ((string_drop s6812_0 s6813_0)) of
+ s_ => SOME (FCVT_S_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6781_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6781_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6782_0=
+ ((case s6782_0 of
+ s6783_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6783_0)) of
+ SOME ((FCVT_D_LU, s6784_0)) =>
+ (case ((string_drop s6783_0 s6784_0)) of
+ s6785_0 =>
+ (case ((spc_matches_prefix0 s6785_0)) of
+ SOME ((() , s6786_0)) =>
+ (case ((string_drop s6785_0 s6786_0)) of
+ s6787_0 =>
+ (case ((freg_name_matches_prefix s6787_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6788_0)) =>
+ (case ((string_drop s6787_0 s6788_0)) of
+ s6789_0 =>
+ (case ((sep_matches_prefix s6789_0)) of
+ SOME ((() , s6790_0)) =>
+ (case ((string_drop s6789_0 s6790_0)) of
+ s6791_0 =>
+ (case ((reg_name_matches_prefix s6791_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6792_0)) =>
+ (case ((string_drop s6791_0 s6792_0)) of
+ s6793_0 =>
+ (case ((sep_matches_prefix s6793_0)) of
+ SOME ((() , s6794_0)) =>
+ (case ((string_drop s6793_0 s6794_0)) of
+ s6795_0 =>
+ (case ((frm_mnemonic_matches_prefix s6795_0)) of
+ SOME ((rm, s6796_0)) =>
+ (case ((string_drop s6795_0 s6796_0)) of
+ s_ => SOME (FCVT_D_LU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6764_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6764_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6765_0=
+ ((case s6765_0 of
+ s6766_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6766_0)) of
+ SOME ((FCVT_D_L, s6767_0)) =>
+ (case ((string_drop s6766_0 s6767_0)) of
+ s6768_0 =>
+ (case ((spc_matches_prefix0 s6768_0)) of
+ SOME ((() , s6769_0)) =>
+ (case ((string_drop s6768_0 s6769_0)) of
+ s6770_0 =>
+ (case ((freg_name_matches_prefix s6770_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6771_0)) =>
+ (case ((string_drop s6770_0 s6771_0)) of
+ s6772_0 =>
+ (case ((sep_matches_prefix s6772_0)) of
+ SOME ((() , s6773_0)) =>
+ (case ((string_drop s6772_0 s6773_0)) of
+ s6774_0 =>
+ (case ((reg_name_matches_prefix s6774_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6775_0)) =>
+ (case ((string_drop s6774_0 s6775_0)) of
+ s6776_0 =>
+ (case ((sep_matches_prefix s6776_0)) of
+ SOME ((() , s6777_0)) =>
+ (case ((string_drop s6776_0 s6777_0)) of
+ s6778_0 =>
+ (case ((frm_mnemonic_matches_prefix s6778_0)) of
+ SOME ((rm, s6779_0)) =>
+ (case ((string_drop s6778_0 s6779_0)) of
+ s_ => SOME (FCVT_D_L, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6747_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6747_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6748_0=
+ ((case s6748_0 of
+ s6749_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6749_0)) of
+ SOME ((FCVT_LU_D, s6750_0)) =>
+ (case ((string_drop s6749_0 s6750_0)) of
+ s6751_0 =>
+ (case ((spc_matches_prefix0 s6751_0)) of
+ SOME ((() , s6752_0)) =>
+ (case ((string_drop s6751_0 s6752_0)) of
+ s6753_0 =>
+ (case ((reg_name_matches_prefix s6753_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6754_0)) =>
+ (case ((string_drop s6753_0 s6754_0)) of
+ s6755_0 =>
+ (case ((sep_matches_prefix s6755_0)) of
+ SOME ((() , s6756_0)) =>
+ (case ((string_drop s6755_0 s6756_0)) of
+ s6757_0 =>
+ (case ((freg_name_matches_prefix s6757_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6758_0)) =>
+ (case ((string_drop s6757_0 s6758_0)) of
+ s6759_0 =>
+ (case ((sep_matches_prefix s6759_0)) of
+ SOME ((() , s6760_0)) =>
+ (case ((string_drop s6759_0 s6760_0)) of
+ s6761_0 =>
+ (case ((frm_mnemonic_matches_prefix s6761_0)) of
+ SOME ((rm, s6762_0)) =>
+ (case ((string_drop s6761_0 s6762_0)) of
+ s_ => SOME (FCVT_LU_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6730_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6730_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6731_0=
+ ((case s6731_0 of
+ s6732_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6732_0)) of
+ SOME ((FCVT_L_D, s6733_0)) =>
+ (case ((string_drop s6732_0 s6733_0)) of
+ s6734_0 =>
+ (case ((spc_matches_prefix0 s6734_0)) of
+ SOME ((() , s6735_0)) =>
+ (case ((string_drop s6734_0 s6735_0)) of
+ s6736_0 =>
+ (case ((reg_name_matches_prefix s6736_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6737_0)) =>
+ (case ((string_drop s6736_0 s6737_0)) of
+ s6738_0 =>
+ (case ((sep_matches_prefix s6738_0)) of
+ SOME ((() , s6739_0)) =>
+ (case ((string_drop s6738_0 s6739_0)) of
+ s6740_0 =>
+ (case ((freg_name_matches_prefix s6740_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6741_0)) =>
+ (case ((string_drop s6740_0 s6741_0)) of
+ s6742_0 =>
+ (case ((sep_matches_prefix s6742_0)) of
+ SOME ((() , s6743_0)) =>
+ (case ((string_drop s6742_0 s6743_0)) of
+ s6744_0 =>
+ (case ((frm_mnemonic_matches_prefix s6744_0)) of
+ SOME ((rm, s6745_0)) =>
+ (case ((string_drop s6744_0 s6745_0)) of
+ s_ => SOME (FCVT_L_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6713_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6713_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6714_0=
+ ((case s6714_0 of
+ s6715_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6715_0)) of
+ SOME ((FCVT_D_WU, s6716_0)) =>
+ (case ((string_drop s6715_0 s6716_0)) of
+ s6717_0 =>
+ (case ((spc_matches_prefix0 s6717_0)) of
+ SOME ((() , s6718_0)) =>
+ (case ((string_drop s6717_0 s6718_0)) of
+ s6719_0 =>
+ (case ((freg_name_matches_prefix s6719_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6720_0)) =>
+ (case ((string_drop s6719_0 s6720_0)) of
+ s6721_0 =>
+ (case ((sep_matches_prefix s6721_0)) of
+ SOME ((() , s6722_0)) =>
+ (case ((string_drop s6721_0 s6722_0)) of
+ s6723_0 =>
+ (case ((reg_name_matches_prefix s6723_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6724_0)) =>
+ (case ((string_drop s6723_0 s6724_0)) of
+ s6725_0 =>
+ (case ((sep_matches_prefix s6725_0)) of
+ SOME ((() , s6726_0)) =>
+ (case ((string_drop s6725_0 s6726_0)) of
+ s6727_0 =>
+ (case ((frm_mnemonic_matches_prefix s6727_0)) of
+ SOME ((rm, s6728_0)) =>
+ (case ((string_drop s6727_0 s6728_0)) of
+ s_ => SOME (FCVT_D_WU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6696_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6696_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6697_0=
+ ((case s6697_0 of
+ s6698_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6698_0)) of
+ SOME ((FCVT_D_W, s6699_0)) =>
+ (case ((string_drop s6698_0 s6699_0)) of
+ s6700_0 =>
+ (case ((spc_matches_prefix0 s6700_0)) of
+ SOME ((() , s6701_0)) =>
+ (case ((string_drop s6700_0 s6701_0)) of
+ s6702_0 =>
+ (case ((freg_name_matches_prefix s6702_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6703_0)) =>
+ (case ((string_drop s6702_0 s6703_0)) of
+ s6704_0 =>
+ (case ((sep_matches_prefix s6704_0)) of
+ SOME ((() , s6705_0)) =>
+ (case ((string_drop s6704_0 s6705_0)) of
+ s6706_0 =>
+ (case ((reg_name_matches_prefix s6706_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6707_0)) =>
+ (case ((string_drop s6706_0 s6707_0)) of
+ s6708_0 =>
+ (case ((sep_matches_prefix s6708_0)) of
+ SOME ((() , s6709_0)) =>
+ (case ((string_drop s6708_0 s6709_0)) of
+ s6710_0 =>
+ (case ((frm_mnemonic_matches_prefix s6710_0)) of
+ SOME ((rm, s6711_0)) =>
+ (case ((string_drop s6710_0 s6711_0)) of
+ s_ => SOME (FCVT_D_W, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6679_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6679_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6680_0=
+ ((case s6680_0 of
+ s6681_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6681_0)) of
+ SOME ((FCVT_WU_D, s6682_0)) =>
+ (case ((string_drop s6681_0 s6682_0)) of
+ s6683_0 =>
+ (case ((spc_matches_prefix0 s6683_0)) of
+ SOME ((() , s6684_0)) =>
+ (case ((string_drop s6683_0 s6684_0)) of
+ s6685_0 =>
+ (case ((reg_name_matches_prefix s6685_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6686_0)) =>
+ (case ((string_drop s6685_0 s6686_0)) of
+ s6687_0 =>
+ (case ((sep_matches_prefix s6687_0)) of
+ SOME ((() , s6688_0)) =>
+ (case ((string_drop s6687_0 s6688_0)) of
+ s6689_0 =>
+ (case ((freg_name_matches_prefix s6689_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6690_0)) =>
+ (case ((string_drop s6689_0 s6690_0)) of
+ s6691_0 =>
+ (case ((sep_matches_prefix s6691_0)) of
+ SOME ((() , s6692_0)) =>
+ (case ((string_drop s6691_0 s6692_0)) of
+ s6693_0 =>
+ (case ((frm_mnemonic_matches_prefix s6693_0)) of
+ SOME ((rm, s6694_0)) =>
+ (case ((string_drop s6693_0 s6694_0)) of
+ s_ => SOME (FCVT_WU_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6662_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6662_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6663_0=
+ ((case s6663_0 of
+ s6664_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6664_0)) of
+ SOME ((FCVT_W_D, s6665_0)) =>
+ (case ((string_drop s6664_0 s6665_0)) of
+ s6666_0 =>
+ (case ((spc_matches_prefix0 s6666_0)) of
+ SOME ((() , s6667_0)) =>
+ (case ((string_drop s6666_0 s6667_0)) of
+ s6668_0 =>
+ (case ((reg_name_matches_prefix s6668_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6669_0)) =>
+ (case ((string_drop s6668_0 s6669_0)) of
+ s6670_0 =>
+ (case ((sep_matches_prefix s6670_0)) of
+ SOME ((() , s6671_0)) =>
+ (case ((string_drop s6670_0 s6671_0)) of
+ s6672_0 =>
+ (case ((freg_name_matches_prefix s6672_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6673_0)) =>
+ (case ((string_drop s6672_0 s6673_0)) of
+ s6674_0 =>
+ (case ((sep_matches_prefix s6674_0)) of
+ SOME ((() , s6675_0)) =>
+ (case ((string_drop s6674_0 s6675_0)) of
+ s6676_0 =>
+ (case ((frm_mnemonic_matches_prefix s6676_0)) of
+ SOME ((rm, s6677_0)) =>
+ (case ((string_drop s6676_0 s6677_0)) of
+ s_ => SOME (FCVT_W_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6645_ : string -> maybe ((f_un_rm_op_D * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6645_:string ->(f_un_rm_op_D#(5)words$word#(5)words$word#rounding_mode#string)option) s6646_0=
+ ((case s6646_0 of
+ s6647_0 =>
+ (case ((f_un_rm_type_mnemonic_D_matches_prefix s6647_0)) of
+ SOME ((FSQRT_D, s6648_0)) =>
+ (case ((string_drop s6647_0 s6648_0)) of
+ s6649_0 =>
+ (case ((spc_matches_prefix0 s6649_0)) of
+ SOME ((() , s6650_0)) =>
+ (case ((string_drop s6649_0 s6650_0)) of
+ s6651_0 =>
+ (case ((freg_name_matches_prefix s6651_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6652_0)) =>
+ (case ((string_drop s6651_0 s6652_0)) of
+ s6653_0 =>
+ (case ((sep_matches_prefix s6653_0)) of
+ SOME ((() , s6654_0)) =>
+ (case ((string_drop s6653_0 s6654_0)) of
+ s6655_0 =>
+ (case ((freg_name_matches_prefix s6655_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6656_0)) =>
+ (case ((string_drop s6655_0 s6656_0)) of
+ s6657_0 =>
+ (case ((sep_matches_prefix s6657_0)) of
+ SOME ((() , s6658_0)) =>
+ (case ((string_drop s6657_0 s6658_0)) of
+ s6659_0 =>
+ (case ((frm_mnemonic_matches_prefix s6659_0)) of
+ SOME ((rm, s6660_0)) =>
+ (case ((string_drop s6659_0 s6660_0)) of
+ s_ => SOME (FSQRT_D, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6624_ : string -> maybe ((f_bin_rm_op_D * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6624_:string ->(f_bin_rm_op_D#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s6625_0=
+ ((case s6625_0 of
+ s6626_0 =>
+ (case ((f_bin_rm_type_mnemonic_D_matches_prefix s6626_0)) of
+ SOME ((op, s6627_0)) =>
+ (case ((string_drop s6626_0 s6627_0)) of
+ s6628_0 =>
+ (case ((spc_matches_prefix0 s6628_0)) of
+ SOME ((() , s6629_0)) =>
+ (case ((string_drop s6628_0 s6629_0)) of
+ s6630_0 =>
+ (case ((freg_name_matches_prefix s6630_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6631_0)) =>
+ (case ((string_drop s6630_0 s6631_0)) of
+ s6632_0 =>
+ (case ((sep_matches_prefix s6632_0)) of
+ SOME ((() , s6633_0)) =>
+ (case ((string_drop s6632_0 s6633_0)) of
+ s6634_0 =>
+ (case ((freg_name_matches_prefix s6634_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6635_0)) =>
+ (case ((string_drop s6634_0 s6635_0)) of
+ s6636_0 =>
+ (case ((sep_matches_prefix s6636_0)) of
+ SOME ((() , s6637_0)) =>
+ (case ((string_drop s6636_0 s6637_0)) of
+ s6638_0 =>
+ (case ((freg_name_matches_prefix s6638_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6639_0)) =>
+ (case ((string_drop s6638_0 s6639_0)) of
+ s6640_0 =>
+ (case ((sep_matches_prefix s6640_0)) of
+ SOME ((() , s6641_0)) =>
+ (case ((string_drop s6640_0 s6641_0)) of
+ s6642_0 =>
+ (case ((frm_mnemonic_matches_prefix s6642_0)) of
+ SOME ((rm, s6643_0)) =>
+ (case ((string_drop s6642_0 s6643_0)) of
+ s_ => SOME (op, rd, rs1, rs2, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6599_ : string -> maybe ((f_madd_op_D * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6599_:string ->(f_madd_op_D#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s6600_0=
+ ((case s6600_0 of
+ s6601_0 =>
+ (case ((f_madd_type_mnemonic_D_matches_prefix s6601_0)) of
+ SOME ((op, s6602_0)) =>
+ (case ((string_drop s6601_0 s6602_0)) of
+ s6603_0 =>
+ (case ((spc_matches_prefix0 s6603_0)) of
+ SOME ((() , s6604_0)) =>
+ (case ((string_drop s6603_0 s6604_0)) of
+ s6605_0 =>
+ (case ((freg_name_matches_prefix s6605_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6606_0)) =>
+ (case ((string_drop s6605_0 s6606_0)) of
+ s6607_0 =>
+ (case ((sep_matches_prefix s6607_0)) of
+ SOME ((() , s6608_0)) =>
+ (case ((string_drop s6607_0 s6608_0)) of
+ s6609_0 =>
+ (case ((freg_name_matches_prefix s6609_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6610_0)) =>
+ (case ((string_drop s6609_0 s6610_0)) of
+ s6611_0 =>
+ (case ((sep_matches_prefix s6611_0)) of
+ SOME ((() , s6612_0)) =>
+ (case ((string_drop s6611_0 s6612_0)) of
+ s6613_0 =>
+ (case ((freg_name_matches_prefix s6613_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6614_0)) =>
+ (case ((string_drop s6613_0 s6614_0)) of
+ s6615_0 =>
+ (case ((sep_matches_prefix s6615_0)) of
+ SOME ((() , s6616_0)) =>
+ (case ((string_drop s6615_0 s6616_0)) of
+ s6617_0 =>
+ (case ((freg_name_matches_prefix s6617_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s6618_0)) =>
+ (case ((string_drop s6617_0 s6618_0)) of
+ s6619_0 =>
+ (case ((sep_matches_prefix s6619_0)) of
+ SOME ((() , s6620_0)) =>
+ (case ((string_drop s6619_0 s6620_0)) of
+ s6621_0 =>
+ (case ((frm_mnemonic_matches_prefix s6621_0)) of
+ SOME ((rm, s6622_0)) =>
+ (case ((string_drop s6621_0 s6622_0)) of
+ s_ =>
+ SOME (op, rd, rs1, rs2, rs3, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6583_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6583_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s6584_0=
+ (let s6585_0 = s6584_0 in
+ if ((string_startswith s6585_0 "c.fsw")) then
+ (case ((string_drop s6585_0 ((string_length "c.fsw")))) of
+ s6586_0 =>
+ (case ((spc_matches_prefix0 s6586_0)) of
+ SOME ((() , s6587_0)) =>
+ (case ((string_drop s6586_0 s6587_0)) of
+ s6588_0 =>
+ (case ((creg_name_matches_prefix s6588_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s6589_0)) =>
+ (case ((string_drop s6588_0 s6589_0)) of
+ s6590_0 =>
+ (case ((sep_matches_prefix s6590_0)) of
+ SOME ((() , s6591_0)) =>
+ (case ((string_drop s6590_0 s6591_0)) of
+ s6592_0 =>
+ (case ((creg_name_matches_prefix s6592_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s6593_0)) =>
+ (case ((string_drop s6592_0 s6593_0)) of
+ s6594_0 =>
+ (case ((sep_matches_prefix s6594_0)) of
+ SOME ((() , s6595_0)) =>
+ (case ((string_drop s6594_0 s6595_0)) of
+ s6596_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6596_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1486, s6597_0)) =>
+ if (((((subrange_vec_dec v__1486 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1486 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1486 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s6596_0 s6597_0)) of
+ s_ => SOME (rsc1, rsc2, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6567_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6567_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s6568_0=
+ (let s6569_0 = s6568_0 in
+ if ((string_startswith s6569_0 "c.flw")) then
+ (case ((string_drop s6569_0 ((string_length "c.flw")))) of
+ s6570_0 =>
+ (case ((spc_matches_prefix0 s6570_0)) of
+ SOME ((() , s6571_0)) =>
+ (case ((string_drop s6570_0 s6571_0)) of
+ s6572_0 =>
+ (case ((creg_name_matches_prefix s6572_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s6573_0)) =>
+ (case ((string_drop s6572_0 s6573_0)) of
+ s6574_0 =>
+ (case ((sep_matches_prefix s6574_0)) of
+ SOME ((() , s6575_0)) =>
+ (case ((string_drop s6574_0 s6575_0)) of
+ s6576_0 =>
+ (case ((creg_name_matches_prefix s6576_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s6577_0)) =>
+ (case ((string_drop s6576_0 s6577_0)) of
+ s6578_0 =>
+ (case ((sep_matches_prefix s6578_0)) of
+ SOME ((() , s6579_0)) =>
+ (case ((string_drop s6578_0 s6579_0)) of
+ s6580_0 =>
+ (case ((hex_bits_7_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6580_0
+ : (( 7 words$word # ii)) option)) of
+ SOME ((v__1488, s6581_0)) =>
+ if (((((subrange_vec_dec v__1488 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1488 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ let (uimm : 5 words$word) =
+ ((subrange_vec_dec v__1488 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s6580_0 s6581_0)) of
+ s_ => SOME (rdc, rsc, uimm, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6555_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s6555_:string ->((5)words$word#(6)words$word#string)option) s6556_0=
+ (let s6557_0 = s6556_0 in
+ if ((string_startswith s6557_0 "c.fswsp")) then
+ (case ((string_drop s6557_0 ((string_length "c.fswsp")))) of
+ s6558_0 =>
+ (case ((spc_matches_prefix0 s6558_0)) of
+ SOME ((() , s6559_0)) =>
+ (case ((string_drop s6558_0 s6559_0)) of
+ s6560_0 =>
+ (case ((reg_name_matches_prefix s6560_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6561_0)) =>
+ (case ((string_drop s6560_0 s6561_0)) of
+ s6562_0 =>
+ (case ((sep_matches_prefix s6562_0)) of
+ SOME ((() , s6563_0)) =>
+ (case ((string_drop s6562_0 s6563_0)) of
+ s6564_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6564_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s6565_0)) =>
+ (case ((string_drop s6564_0 s6565_0)) of s_ => SOME (rd, uimm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6543_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s6543_:string ->((5)words$word#(6)words$word#string)option) s6544_0=
+ (let s6545_0 = s6544_0 in
+ if ((string_startswith s6545_0 "c.flwsp")) then
+ (case ((string_drop s6545_0 ((string_length "c.flwsp")))) of
+ s6546_0 =>
+ (case ((spc_matches_prefix0 s6546_0)) of
+ SOME ((() , s6547_0)) =>
+ (case ((string_drop s6546_0 s6547_0)) of
+ s6548_0 =>
+ (case ((reg_name_matches_prefix s6548_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6549_0)) =>
+ (case ((string_drop s6548_0 s6549_0)) of
+ s6550_0 =>
+ (case ((sep_matches_prefix s6550_0)) of
+ SOME ((() , s6551_0)) =>
+ (case ((string_drop s6550_0 s6551_0)) of
+ s6552_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6552_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s6553_0)) =>
+ (case ((string_drop s6552_0 s6553_0)) of s_ => SOME (rd, imm, s_) )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6530_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6530_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s6531_0=
+ ((case s6531_0 of
+ s6532_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s6532_0)) of
+ SOME ((FCLASS_S, s6533_0)) =>
+ (case ((string_drop s6532_0 s6533_0)) of
+ s6534_0 =>
+ (case ((spc_matches_prefix0 s6534_0)) of
+ SOME ((() , s6535_0)) =>
+ (case ((string_drop s6534_0 s6535_0)) of
+ s6536_0 =>
+ (case ((reg_name_matches_prefix s6536_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6537_0)) =>
+ (case ((string_drop s6536_0 s6537_0)) of
+ s6538_0 =>
+ (case ((sep_matches_prefix s6538_0)) of
+ SOME ((() , s6539_0)) =>
+ (case ((string_drop s6538_0 s6539_0)) of
+ s6540_0 =>
+ (case ((freg_name_matches_prefix s6540_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6541_0)) =>
+ (case ((string_drop s6540_0 s6541_0)) of
+ s_ => SOME (FCLASS_S, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6517_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6517_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s6518_0=
+ ((case s6518_0 of
+ s6519_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s6519_0)) of
+ SOME ((FMV_W_X, s6520_0)) =>
+ (case ((string_drop s6519_0 s6520_0)) of
+ s6521_0 =>
+ (case ((spc_matches_prefix0 s6521_0)) of
+ SOME ((() , s6522_0)) =>
+ (case ((string_drop s6521_0 s6522_0)) of
+ s6523_0 =>
+ (case ((freg_name_matches_prefix s6523_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6524_0)) =>
+ (case ((string_drop s6523_0 s6524_0)) of
+ s6525_0 =>
+ (case ((sep_matches_prefix s6525_0)) of
+ SOME ((() , s6526_0)) =>
+ (case ((string_drop s6525_0 s6526_0)) of
+ s6527_0 =>
+ (case ((reg_name_matches_prefix s6527_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6528_0)) =>
+ (case ((string_drop s6527_0 s6528_0)) of
+ s_ => SOME (FMV_W_X, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6504_ : string -> maybe ((f_un_op_S * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6504_:string ->(f_un_op_S#(5)words$word#(5)words$word#string)option) s6505_0=
+ ((case s6505_0 of
+ s6506_0 =>
+ (case ((f_un_type_mnemonic_S_matches_prefix s6506_0)) of
+ SOME ((FMV_X_W, s6507_0)) =>
+ (case ((string_drop s6506_0 s6507_0)) of
+ s6508_0 =>
+ (case ((spc_matches_prefix0 s6508_0)) of
+ SOME ((() , s6509_0)) =>
+ (case ((string_drop s6508_0 s6509_0)) of
+ s6510_0 =>
+ (case ((reg_name_matches_prefix s6510_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6511_0)) =>
+ (case ((string_drop s6510_0 s6511_0)) of
+ s6512_0 =>
+ (case ((sep_matches_prefix s6512_0)) of
+ SOME ((() , s6513_0)) =>
+ (case ((string_drop s6512_0 s6513_0)) of
+ s6514_0 =>
+ (case ((freg_name_matches_prefix s6514_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6515_0)) =>
+ (case ((string_drop s6514_0 s6515_0)) of
+ s_ => SOME (FMV_X_W, rd, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6487_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6487_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6488_0=
+ ((case s6488_0 of
+ s6489_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6489_0)) of
+ SOME ((FLE_S, s6490_0)) =>
+ (case ((string_drop s6489_0 s6490_0)) of
+ s6491_0 =>
+ (case ((spc_matches_prefix0 s6491_0)) of
+ SOME ((() , s6492_0)) =>
+ (case ((string_drop s6491_0 s6492_0)) of
+ s6493_0 =>
+ (case ((reg_name_matches_prefix s6493_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6494_0)) =>
+ (case ((string_drop s6493_0 s6494_0)) of
+ s6495_0 =>
+ (case ((sep_matches_prefix s6495_0)) of
+ SOME ((() , s6496_0)) =>
+ (case ((string_drop s6495_0 s6496_0)) of
+ s6497_0 =>
+ (case ((freg_name_matches_prefix s6497_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6498_0)) =>
+ (case ((string_drop s6497_0 s6498_0)) of
+ s6499_0 =>
+ (case ((sep_matches_prefix s6499_0)) of
+ SOME ((() , s6500_0)) =>
+ (case ((string_drop s6499_0 s6500_0)) of
+ s6501_0 =>
+ (case ((freg_name_matches_prefix s6501_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6502_0)) =>
+ (case ((string_drop s6501_0 s6502_0)) of
+ s_ => SOME (FLE_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6470_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6470_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6471_0=
+ ((case s6471_0 of
+ s6472_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6472_0)) of
+ SOME ((FLT_S, s6473_0)) =>
+ (case ((string_drop s6472_0 s6473_0)) of
+ s6474_0 =>
+ (case ((spc_matches_prefix0 s6474_0)) of
+ SOME ((() , s6475_0)) =>
+ (case ((string_drop s6474_0 s6475_0)) of
+ s6476_0 =>
+ (case ((reg_name_matches_prefix s6476_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6477_0)) =>
+ (case ((string_drop s6476_0 s6477_0)) of
+ s6478_0 =>
+ (case ((sep_matches_prefix s6478_0)) of
+ SOME ((() , s6479_0)) =>
+ (case ((string_drop s6478_0 s6479_0)) of
+ s6480_0 =>
+ (case ((freg_name_matches_prefix s6480_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6481_0)) =>
+ (case ((string_drop s6480_0 s6481_0)) of
+ s6482_0 =>
+ (case ((sep_matches_prefix s6482_0)) of
+ SOME ((() , s6483_0)) =>
+ (case ((string_drop s6482_0 s6483_0)) of
+ s6484_0 =>
+ (case ((freg_name_matches_prefix s6484_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6485_0)) =>
+ (case ((string_drop s6484_0 s6485_0)) of
+ s_ => SOME (FLT_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6453_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6453_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6454_0=
+ ((case s6454_0 of
+ s6455_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6455_0)) of
+ SOME ((FEQ_S, s6456_0)) =>
+ (case ((string_drop s6455_0 s6456_0)) of
+ s6457_0 =>
+ (case ((spc_matches_prefix0 s6457_0)) of
+ SOME ((() , s6458_0)) =>
+ (case ((string_drop s6457_0 s6458_0)) of
+ s6459_0 =>
+ (case ((reg_name_matches_prefix s6459_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6460_0)) =>
+ (case ((string_drop s6459_0 s6460_0)) of
+ s6461_0 =>
+ (case ((sep_matches_prefix s6461_0)) of
+ SOME ((() , s6462_0)) =>
+ (case ((string_drop s6461_0 s6462_0)) of
+ s6463_0 =>
+ (case ((freg_name_matches_prefix s6463_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6464_0)) =>
+ (case ((string_drop s6463_0 s6464_0)) of
+ s6465_0 =>
+ (case ((sep_matches_prefix s6465_0)) of
+ SOME ((() , s6466_0)) =>
+ (case ((string_drop s6465_0 s6466_0)) of
+ s6467_0 =>
+ (case ((freg_name_matches_prefix s6467_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6468_0)) =>
+ (case ((string_drop s6467_0 s6468_0)) of
+ s_ => SOME (FEQ_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6436_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6436_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6437_0=
+ ((case s6437_0 of
+ s6438_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6438_0)) of
+ SOME ((FMAX_S, s6439_0)) =>
+ (case ((string_drop s6438_0 s6439_0)) of
+ s6440_0 =>
+ (case ((spc_matches_prefix0 s6440_0)) of
+ SOME ((() , s6441_0)) =>
+ (case ((string_drop s6440_0 s6441_0)) of
+ s6442_0 =>
+ (case ((freg_name_matches_prefix s6442_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6443_0)) =>
+ (case ((string_drop s6442_0 s6443_0)) of
+ s6444_0 =>
+ (case ((sep_matches_prefix s6444_0)) of
+ SOME ((() , s6445_0)) =>
+ (case ((string_drop s6444_0 s6445_0)) of
+ s6446_0 =>
+ (case ((freg_name_matches_prefix s6446_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6447_0)) =>
+ (case ((string_drop s6446_0 s6447_0)) of
+ s6448_0 =>
+ (case ((sep_matches_prefix s6448_0)) of
+ SOME ((() , s6449_0)) =>
+ (case ((string_drop s6448_0 s6449_0)) of
+ s6450_0 =>
+ (case ((freg_name_matches_prefix s6450_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6451_0)) =>
+ (case ((string_drop s6450_0 s6451_0)) of
+ s_ => SOME (FMAX_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6419_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6419_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6420_0=
+ ((case s6420_0 of
+ s6421_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6421_0)) of
+ SOME ((FMIN_S, s6422_0)) =>
+ (case ((string_drop s6421_0 s6422_0)) of
+ s6423_0 =>
+ (case ((spc_matches_prefix0 s6423_0)) of
+ SOME ((() , s6424_0)) =>
+ (case ((string_drop s6423_0 s6424_0)) of
+ s6425_0 =>
+ (case ((freg_name_matches_prefix s6425_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6426_0)) =>
+ (case ((string_drop s6425_0 s6426_0)) of
+ s6427_0 =>
+ (case ((sep_matches_prefix s6427_0)) of
+ SOME ((() , s6428_0)) =>
+ (case ((string_drop s6427_0 s6428_0)) of
+ s6429_0 =>
+ (case ((freg_name_matches_prefix s6429_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6430_0)) =>
+ (case ((string_drop s6429_0 s6430_0)) of
+ s6431_0 =>
+ (case ((sep_matches_prefix s6431_0)) of
+ SOME ((() , s6432_0)) =>
+ (case ((string_drop s6431_0 s6432_0)) of
+ s6433_0 =>
+ (case ((freg_name_matches_prefix s6433_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6434_0)) =>
+ (case ((string_drop s6433_0 s6434_0)) of
+ s_ => SOME (FMIN_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6402_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6402_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6403_0=
+ ((case s6403_0 of
+ s6404_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6404_0)) of
+ SOME ((FSGNJX_S, s6405_0)) =>
+ (case ((string_drop s6404_0 s6405_0)) of
+ s6406_0 =>
+ (case ((spc_matches_prefix0 s6406_0)) of
+ SOME ((() , s6407_0)) =>
+ (case ((string_drop s6406_0 s6407_0)) of
+ s6408_0 =>
+ (case ((freg_name_matches_prefix s6408_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6409_0)) =>
+ (case ((string_drop s6408_0 s6409_0)) of
+ s6410_0 =>
+ (case ((sep_matches_prefix s6410_0)) of
+ SOME ((() , s6411_0)) =>
+ (case ((string_drop s6410_0 s6411_0)) of
+ s6412_0 =>
+ (case ((freg_name_matches_prefix s6412_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6413_0)) =>
+ (case ((string_drop s6412_0 s6413_0)) of
+ s6414_0 =>
+ (case ((sep_matches_prefix s6414_0)) of
+ SOME ((() , s6415_0)) =>
+ (case ((string_drop s6414_0 s6415_0)) of
+ s6416_0 =>
+ (case ((freg_name_matches_prefix s6416_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6417_0)) =>
+ (case ((string_drop s6416_0 s6417_0)) of
+ s_ => SOME (FSGNJX_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6385_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6385_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6386_0=
+ ((case s6386_0 of
+ s6387_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6387_0)) of
+ SOME ((FSGNJN_S, s6388_0)) =>
+ (case ((string_drop s6387_0 s6388_0)) of
+ s6389_0 =>
+ (case ((spc_matches_prefix0 s6389_0)) of
+ SOME ((() , s6390_0)) =>
+ (case ((string_drop s6389_0 s6390_0)) of
+ s6391_0 =>
+ (case ((freg_name_matches_prefix s6391_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6392_0)) =>
+ (case ((string_drop s6391_0 s6392_0)) of
+ s6393_0 =>
+ (case ((sep_matches_prefix s6393_0)) of
+ SOME ((() , s6394_0)) =>
+ (case ((string_drop s6393_0 s6394_0)) of
+ s6395_0 =>
+ (case ((freg_name_matches_prefix s6395_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6396_0)) =>
+ (case ((string_drop s6395_0 s6396_0)) of
+ s6397_0 =>
+ (case ((sep_matches_prefix s6397_0)) of
+ SOME ((() , s6398_0)) =>
+ (case ((string_drop s6397_0 s6398_0)) of
+ s6399_0 =>
+ (case ((freg_name_matches_prefix s6399_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6400_0)) =>
+ (case ((string_drop s6399_0 s6400_0)) of
+ s_ => SOME (FSGNJN_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6368_ : string -> maybe ((f_bin_op_S * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6368_:string ->(f_bin_op_S#(5)words$word#(5)words$word#(5)words$word#string)option) s6369_0=
+ ((case s6369_0 of
+ s6370_0 =>
+ (case ((f_bin_type_mnemonic_S_matches_prefix s6370_0)) of
+ SOME ((FSGNJ_S, s6371_0)) =>
+ (case ((string_drop s6370_0 s6371_0)) of
+ s6372_0 =>
+ (case ((spc_matches_prefix0 s6372_0)) of
+ SOME ((() , s6373_0)) =>
+ (case ((string_drop s6372_0 s6373_0)) of
+ s6374_0 =>
+ (case ((freg_name_matches_prefix s6374_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6375_0)) =>
+ (case ((string_drop s6374_0 s6375_0)) of
+ s6376_0 =>
+ (case ((sep_matches_prefix s6376_0)) of
+ SOME ((() , s6377_0)) =>
+ (case ((string_drop s6376_0 s6377_0)) of
+ s6378_0 =>
+ (case ((freg_name_matches_prefix s6378_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6379_0)) =>
+ (case ((string_drop s6378_0 s6379_0)) of
+ s6380_0 =>
+ (case ((sep_matches_prefix s6380_0)) of
+ SOME ((() , s6381_0)) =>
+ (case ((string_drop s6380_0 s6381_0)) of
+ s6382_0 =>
+ (case ((freg_name_matches_prefix s6382_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6383_0)) =>
+ (case ((string_drop s6382_0 s6383_0)) of
+ s_ => SOME (FSGNJ_S, rd, rs1, rs2, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6351_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6351_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6352_0=
+ ((case s6352_0 of
+ s6353_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6353_0)) of
+ SOME ((FCVT_S_LU, s6354_0)) =>
+ (case ((string_drop s6353_0 s6354_0)) of
+ s6355_0 =>
+ (case ((spc_matches_prefix0 s6355_0)) of
+ SOME ((() , s6356_0)) =>
+ (case ((string_drop s6355_0 s6356_0)) of
+ s6357_0 =>
+ (case ((freg_name_matches_prefix s6357_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6358_0)) =>
+ (case ((string_drop s6357_0 s6358_0)) of
+ s6359_0 =>
+ (case ((sep_matches_prefix s6359_0)) of
+ SOME ((() , s6360_0)) =>
+ (case ((string_drop s6359_0 s6360_0)) of
+ s6361_0 =>
+ (case ((reg_name_matches_prefix s6361_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6362_0)) =>
+ (case ((string_drop s6361_0 s6362_0)) of
+ s6363_0 =>
+ (case ((sep_matches_prefix s6363_0)) of
+ SOME ((() , s6364_0)) =>
+ (case ((string_drop s6363_0 s6364_0)) of
+ s6365_0 =>
+ (case ((frm_mnemonic_matches_prefix s6365_0)) of
+ SOME ((rm, s6366_0)) =>
+ (case ((string_drop s6365_0 s6366_0)) of
+ s_ => SOME (FCVT_S_LU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6334_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6334_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6335_0=
+ ((case s6335_0 of
+ s6336_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6336_0)) of
+ SOME ((FCVT_S_L, s6337_0)) =>
+ (case ((string_drop s6336_0 s6337_0)) of
+ s6338_0 =>
+ (case ((spc_matches_prefix0 s6338_0)) of
+ SOME ((() , s6339_0)) =>
+ (case ((string_drop s6338_0 s6339_0)) of
+ s6340_0 =>
+ (case ((freg_name_matches_prefix s6340_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6341_0)) =>
+ (case ((string_drop s6340_0 s6341_0)) of
+ s6342_0 =>
+ (case ((sep_matches_prefix s6342_0)) of
+ SOME ((() , s6343_0)) =>
+ (case ((string_drop s6342_0 s6343_0)) of
+ s6344_0 =>
+ (case ((reg_name_matches_prefix s6344_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6345_0)) =>
+ (case ((string_drop s6344_0 s6345_0)) of
+ s6346_0 =>
+ (case ((sep_matches_prefix s6346_0)) of
+ SOME ((() , s6347_0)) =>
+ (case ((string_drop s6346_0 s6347_0)) of
+ s6348_0 =>
+ (case ((frm_mnemonic_matches_prefix s6348_0)) of
+ SOME ((rm, s6349_0)) =>
+ (case ((string_drop s6348_0 s6349_0)) of
+ s_ => SOME (FCVT_S_L, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6317_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6317_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6318_0=
+ ((case s6318_0 of
+ s6319_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6319_0)) of
+ SOME ((FCVT_LU_S, s6320_0)) =>
+ (case ((string_drop s6319_0 s6320_0)) of
+ s6321_0 =>
+ (case ((spc_matches_prefix0 s6321_0)) of
+ SOME ((() , s6322_0)) =>
+ (case ((string_drop s6321_0 s6322_0)) of
+ s6323_0 =>
+ (case ((reg_name_matches_prefix s6323_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6324_0)) =>
+ (case ((string_drop s6323_0 s6324_0)) of
+ s6325_0 =>
+ (case ((sep_matches_prefix s6325_0)) of
+ SOME ((() , s6326_0)) =>
+ (case ((string_drop s6325_0 s6326_0)) of
+ s6327_0 =>
+ (case ((freg_name_matches_prefix s6327_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6328_0)) =>
+ (case ((string_drop s6327_0 s6328_0)) of
+ s6329_0 =>
+ (case ((sep_matches_prefix s6329_0)) of
+ SOME ((() , s6330_0)) =>
+ (case ((string_drop s6329_0 s6330_0)) of
+ s6331_0 =>
+ (case ((frm_mnemonic_matches_prefix s6331_0)) of
+ SOME ((rm, s6332_0)) =>
+ (case ((string_drop s6331_0 s6332_0)) of
+ s_ => SOME (FCVT_LU_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6300_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6300_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6301_0=
+ ((case s6301_0 of
+ s6302_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6302_0)) of
+ SOME ((FCVT_L_S, s6303_0)) =>
+ (case ((string_drop s6302_0 s6303_0)) of
+ s6304_0 =>
+ (case ((spc_matches_prefix0 s6304_0)) of
+ SOME ((() , s6305_0)) =>
+ (case ((string_drop s6304_0 s6305_0)) of
+ s6306_0 =>
+ (case ((reg_name_matches_prefix s6306_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6307_0)) =>
+ (case ((string_drop s6306_0 s6307_0)) of
+ s6308_0 =>
+ (case ((sep_matches_prefix s6308_0)) of
+ SOME ((() , s6309_0)) =>
+ (case ((string_drop s6308_0 s6309_0)) of
+ s6310_0 =>
+ (case ((freg_name_matches_prefix s6310_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6311_0)) =>
+ (case ((string_drop s6310_0 s6311_0)) of
+ s6312_0 =>
+ (case ((sep_matches_prefix s6312_0)) of
+ SOME ((() , s6313_0)) =>
+ (case ((string_drop s6312_0 s6313_0)) of
+ s6314_0 =>
+ (case ((frm_mnemonic_matches_prefix s6314_0)) of
+ SOME ((rm, s6315_0)) =>
+ (case ((string_drop s6314_0 s6315_0)) of
+ s_ => SOME (FCVT_L_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6283_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6283_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6284_0=
+ ((case s6284_0 of
+ s6285_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6285_0)) of
+ SOME ((FCVT_S_WU, s6286_0)) =>
+ (case ((string_drop s6285_0 s6286_0)) of
+ s6287_0 =>
+ (case ((spc_matches_prefix0 s6287_0)) of
+ SOME ((() , s6288_0)) =>
+ (case ((string_drop s6287_0 s6288_0)) of
+ s6289_0 =>
+ (case ((freg_name_matches_prefix s6289_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6290_0)) =>
+ (case ((string_drop s6289_0 s6290_0)) of
+ s6291_0 =>
+ (case ((sep_matches_prefix s6291_0)) of
+ SOME ((() , s6292_0)) =>
+ (case ((string_drop s6291_0 s6292_0)) of
+ s6293_0 =>
+ (case ((reg_name_matches_prefix s6293_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6294_0)) =>
+ (case ((string_drop s6293_0 s6294_0)) of
+ s6295_0 =>
+ (case ((sep_matches_prefix s6295_0)) of
+ SOME ((() , s6296_0)) =>
+ (case ((string_drop s6295_0 s6296_0)) of
+ s6297_0 =>
+ (case ((frm_mnemonic_matches_prefix s6297_0)) of
+ SOME ((rm, s6298_0)) =>
+ (case ((string_drop s6297_0 s6298_0)) of
+ s_ => SOME (FCVT_S_WU, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6266_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6266_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6267_0=
+ ((case s6267_0 of
+ s6268_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6268_0)) of
+ SOME ((FCVT_S_W, s6269_0)) =>
+ (case ((string_drop s6268_0 s6269_0)) of
+ s6270_0 =>
+ (case ((spc_matches_prefix0 s6270_0)) of
+ SOME ((() , s6271_0)) =>
+ (case ((string_drop s6270_0 s6271_0)) of
+ s6272_0 =>
+ (case ((freg_name_matches_prefix s6272_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6273_0)) =>
+ (case ((string_drop s6272_0 s6273_0)) of
+ s6274_0 =>
+ (case ((sep_matches_prefix s6274_0)) of
+ SOME ((() , s6275_0)) =>
+ (case ((string_drop s6274_0 s6275_0)) of
+ s6276_0 =>
+ (case ((reg_name_matches_prefix s6276_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6277_0)) =>
+ (case ((string_drop s6276_0 s6277_0)) of
+ s6278_0 =>
+ (case ((sep_matches_prefix s6278_0)) of
+ SOME ((() , s6279_0)) =>
+ (case ((string_drop s6278_0 s6279_0)) of
+ s6280_0 =>
+ (case ((frm_mnemonic_matches_prefix s6280_0)) of
+ SOME ((rm, s6281_0)) =>
+ (case ((string_drop s6280_0 s6281_0)) of
+ s_ => SOME (FCVT_S_W, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6249_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6249_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6250_0=
+ ((case s6250_0 of
+ s6251_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6251_0)) of
+ SOME ((FCVT_WU_S, s6252_0)) =>
+ (case ((string_drop s6251_0 s6252_0)) of
+ s6253_0 =>
+ (case ((spc_matches_prefix0 s6253_0)) of
+ SOME ((() , s6254_0)) =>
+ (case ((string_drop s6253_0 s6254_0)) of
+ s6255_0 =>
+ (case ((reg_name_matches_prefix s6255_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6256_0)) =>
+ (case ((string_drop s6255_0 s6256_0)) of
+ s6257_0 =>
+ (case ((sep_matches_prefix s6257_0)) of
+ SOME ((() , s6258_0)) =>
+ (case ((string_drop s6257_0 s6258_0)) of
+ s6259_0 =>
+ (case ((freg_name_matches_prefix s6259_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6260_0)) =>
+ (case ((string_drop s6259_0 s6260_0)) of
+ s6261_0 =>
+ (case ((sep_matches_prefix s6261_0)) of
+ SOME ((() , s6262_0)) =>
+ (case ((string_drop s6261_0 s6262_0)) of
+ s6263_0 =>
+ (case ((frm_mnemonic_matches_prefix s6263_0)) of
+ SOME ((rm, s6264_0)) =>
+ (case ((string_drop s6263_0 s6264_0)) of
+ s_ => SOME (FCVT_WU_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6232_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6232_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6233_0=
+ ((case s6233_0 of
+ s6234_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6234_0)) of
+ SOME ((FCVT_W_S, s6235_0)) =>
+ (case ((string_drop s6234_0 s6235_0)) of
+ s6236_0 =>
+ (case ((spc_matches_prefix0 s6236_0)) of
+ SOME ((() , s6237_0)) =>
+ (case ((string_drop s6236_0 s6237_0)) of
+ s6238_0 =>
+ (case ((reg_name_matches_prefix s6238_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6239_0)) =>
+ (case ((string_drop s6238_0 s6239_0)) of
+ s6240_0 =>
+ (case ((sep_matches_prefix s6240_0)) of
+ SOME ((() , s6241_0)) =>
+ (case ((string_drop s6240_0 s6241_0)) of
+ s6242_0 =>
+ (case ((freg_name_matches_prefix s6242_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6243_0)) =>
+ (case ((string_drop s6242_0 s6243_0)) of
+ s6244_0 =>
+ (case ((sep_matches_prefix s6244_0)) of
+ SOME ((() , s6245_0)) =>
+ (case ((string_drop s6244_0 s6245_0)) of
+ s6246_0 =>
+ (case ((frm_mnemonic_matches_prefix s6246_0)) of
+ SOME ((rm, s6247_0)) =>
+ (case ((string_drop s6246_0 s6247_0)) of
+ s_ => SOME (FCVT_W_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6215_ : string -> maybe ((f_un_rm_op_S * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6215_:string ->(f_un_rm_op_S#(5)words$word#(5)words$word#rounding_mode#string)option) s6216_0=
+ ((case s6216_0 of
+ s6217_0 =>
+ (case ((f_un_rm_type_mnemonic_S_matches_prefix s6217_0)) of
+ SOME ((FSQRT_S, s6218_0)) =>
+ (case ((string_drop s6217_0 s6218_0)) of
+ s6219_0 =>
+ (case ((spc_matches_prefix0 s6219_0)) of
+ SOME ((() , s6220_0)) =>
+ (case ((string_drop s6219_0 s6220_0)) of
+ s6221_0 =>
+ (case ((freg_name_matches_prefix s6221_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6222_0)) =>
+ (case ((string_drop s6221_0 s6222_0)) of
+ s6223_0 =>
+ (case ((sep_matches_prefix s6223_0)) of
+ SOME ((() , s6224_0)) =>
+ (case ((string_drop s6223_0 s6224_0)) of
+ s6225_0 =>
+ (case ((freg_name_matches_prefix s6225_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6226_0)) =>
+ (case ((string_drop s6225_0 s6226_0)) of
+ s6227_0 =>
+ (case ((sep_matches_prefix s6227_0)) of
+ SOME ((() , s6228_0)) =>
+ (case ((string_drop s6227_0 s6228_0)) of
+ s6229_0 =>
+ (case ((frm_mnemonic_matches_prefix s6229_0)) of
+ SOME ((rm, s6230_0)) =>
+ (case ((string_drop s6229_0 s6230_0)) of
+ s_ => SOME (FSQRT_S, rd, rs1, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6194_ : string -> maybe ((f_bin_rm_op_S * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6194_:string ->(f_bin_rm_op_S#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s6195_0=
+ ((case s6195_0 of
+ s6196_0 =>
+ (case ((f_bin_rm_type_mnemonic_S_matches_prefix s6196_0)) of
+ SOME ((op, s6197_0)) =>
+ (case ((string_drop s6196_0 s6197_0)) of
+ s6198_0 =>
+ (case ((spc_matches_prefix0 s6198_0)) of
+ SOME ((() , s6199_0)) =>
+ (case ((string_drop s6198_0 s6199_0)) of
+ s6200_0 =>
+ (case ((freg_name_matches_prefix s6200_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6201_0)) =>
+ (case ((string_drop s6200_0 s6201_0)) of
+ s6202_0 =>
+ (case ((sep_matches_prefix s6202_0)) of
+ SOME ((() , s6203_0)) =>
+ (case ((string_drop s6202_0 s6203_0)) of
+ s6204_0 =>
+ (case ((freg_name_matches_prefix s6204_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6205_0)) =>
+ (case ((string_drop s6204_0 s6205_0)) of
+ s6206_0 =>
+ (case ((sep_matches_prefix s6206_0)) of
+ SOME ((() , s6207_0)) =>
+ (case ((string_drop s6206_0 s6207_0)) of
+ s6208_0 =>
+ (case ((freg_name_matches_prefix s6208_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6209_0)) =>
+ (case ((string_drop s6208_0 s6209_0)) of
+ s6210_0 =>
+ (case ((sep_matches_prefix s6210_0)) of
+ SOME ((() , s6211_0)) =>
+ (case ((string_drop s6210_0 s6211_0)) of
+ s6212_0 =>
+ (case ((frm_mnemonic_matches_prefix s6212_0)) of
+ SOME ((rm, s6213_0)) =>
+ (case ((string_drop s6212_0 s6213_0)) of
+ s_ => SOME (op, rd, rs1, rs2, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6169_ : string -> maybe ((f_madd_op_S * mword ty5 * mword ty5 * mword ty5 * mword ty5 * rounding_mode * string))*)
+
+val _ = Define `
+ ((s6169_:string ->(f_madd_op_S#(5)words$word#(5)words$word#(5)words$word#(5)words$word#rounding_mode#string)option) s6170_0=
+ ((case s6170_0 of
+ s6171_0 =>
+ (case ((f_madd_type_mnemonic_S_matches_prefix s6171_0)) of
+ SOME ((op, s6172_0)) =>
+ (case ((string_drop s6171_0 s6172_0)) of
+ s6173_0 =>
+ (case ((spc_matches_prefix0 s6173_0)) of
+ SOME ((() , s6174_0)) =>
+ (case ((string_drop s6173_0 s6174_0)) of
+ s6175_0 =>
+ (case ((freg_name_matches_prefix s6175_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6176_0)) =>
+ (case ((string_drop s6175_0 s6176_0)) of
+ s6177_0 =>
+ (case ((sep_matches_prefix s6177_0)) of
+ SOME ((() , s6178_0)) =>
+ (case ((string_drop s6177_0 s6178_0)) of
+ s6179_0 =>
+ (case ((freg_name_matches_prefix s6179_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6180_0)) =>
+ (case ((string_drop s6179_0 s6180_0)) of
+ s6181_0 =>
+ (case ((sep_matches_prefix s6181_0)) of
+ SOME ((() , s6182_0)) =>
+ (case ((string_drop s6181_0 s6182_0)) of
+ s6183_0 =>
+ (case ((freg_name_matches_prefix s6183_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6184_0)) =>
+ (case ((string_drop s6183_0 s6184_0)) of
+ s6185_0 =>
+ (case ((sep_matches_prefix s6185_0)) of
+ SOME ((() , s6186_0)) =>
+ (case ((string_drop s6185_0 s6186_0)) of
+ s6187_0 =>
+ (case ((freg_name_matches_prefix s6187_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs3, s6188_0)) =>
+ (case ((string_drop s6187_0 s6188_0)) of
+ s6189_0 =>
+ (case ((sep_matches_prefix s6189_0)) of
+ SOME ((() , s6190_0)) =>
+ (case ((string_drop s6189_0 s6190_0)) of
+ s6191_0 =>
+ (case ((frm_mnemonic_matches_prefix s6191_0)) of
+ SOME ((rm, s6192_0)) =>
+ (case ((string_drop s6191_0 s6192_0)) of
+ s_ =>
+ SOME (op, rd, rs1, rs2, rs3, rm, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s6145_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6145_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word#string)option) s6146_0=
+ (let s6147_0 = s6146_0 in
+ if ((string_startswith s6147_0 "fs")) then
+ (case ((string_drop s6147_0 ((string_length "fs")))) of
+ s6148_0 =>
+ (case ((size_mnemonic_matches_prefix s6148_0)) of
+ SOME ((width, s6149_0)) =>
+ (case ((string_drop s6148_0 s6149_0)) of
+ s6150_0 =>
+ (case ((spc_matches_prefix0 s6150_0)) of
+ SOME ((() , s6151_0)) =>
+ (case ((string_drop s6150_0 s6151_0)) of
+ s6152_0 =>
+ (case ((freg_name_matches_prefix s6152_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6153_0)) =>
+ (case ((string_drop s6152_0 s6153_0)) of
+ s6154_0 =>
+ (case ((sep_matches_prefix s6154_0)) of
+ SOME ((() , s6155_0)) =>
+ (case ((string_drop s6154_0 s6155_0)) of
+ s6156_0 =>
+ (case ((hex_bits_12_matches_prefix0 s6156_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s6157_0)) =>
+ (case ((string_drop s6156_0 s6157_0)) of
+ s6158_0 =>
+ (case ((opt_spc_matches_prefix0 s6158_0)) of
+ SOME ((() , s6159_0)) =>
+ let s6160_0 = (string_drop s6158_0 s6159_0) in
+ if ((string_startswith s6160_0 "(")) then
+ (case ((string_drop s6160_0 ((string_length "(")))) of
+ s6161_0 =>
+ (case ((opt_spc_matches_prefix0 s6161_0)) of
+ SOME ((() , s6162_0)) =>
+ (case ((string_drop s6161_0 s6162_0)) of
+ s6163_0 =>
+ (case ((reg_name_matches_prefix s6163_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6164_0)) =>
+ (case ((string_drop s6163_0 s6164_0)) of
+ s6165_0 =>
+ (case ((opt_spc_matches_prefix0 s6165_0)) of
+ SOME ((() , s6166_0)) =>
+ let s6167_0 = (string_drop s6165_0 s6166_0) in
+ if ((string_startswith s6167_0 ")")) then
+ (case ((string_drop s6167_0 ((string_length ")")))) of
+ s_ =>
+ SOME (width, rs2, imm, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6121_ : string -> maybe ((word_width * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6121_:string ->(word_width#(5)words$word#(12)words$word#(5)words$word#string)option) s6122_0=
+ (let s6123_0 = s6122_0 in
+ if ((string_startswith s6123_0 "fl")) then
+ (case ((string_drop s6123_0 ((string_length "fl")))) of
+ s6124_0 =>
+ (case ((size_mnemonic_matches_prefix s6124_0)) of
+ SOME ((width, s6125_0)) =>
+ (case ((string_drop s6124_0 s6125_0)) of
+ s6126_0 =>
+ (case ((spc_matches_prefix0 s6126_0)) of
+ SOME ((() , s6127_0)) =>
+ (case ((string_drop s6126_0 s6127_0)) of
+ s6128_0 =>
+ (case ((freg_name_matches_prefix s6128_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6129_0)) =>
+ (case ((string_drop s6128_0 s6129_0)) of
+ s6130_0 =>
+ (case ((sep_matches_prefix s6130_0)) of
+ SOME ((() , s6131_0)) =>
+ (case ((string_drop s6130_0 s6131_0)) of
+ s6132_0 =>
+ (case ((hex_bits_12_matches_prefix0 s6132_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s6133_0)) =>
+ (case ((string_drop s6132_0 s6133_0)) of
+ s6134_0 =>
+ (case ((opt_spc_matches_prefix0 s6134_0)) of
+ SOME ((() , s6135_0)) =>
+ let s6136_0 = (string_drop s6134_0 s6135_0) in
+ if ((string_startswith s6136_0 "(")) then
+ (case ((string_drop s6136_0 ((string_length "(")))) of
+ s6137_0 =>
+ (case ((opt_spc_matches_prefix0 s6137_0)) of
+ SOME ((() , s6138_0)) =>
+ (case ((string_drop s6137_0 s6138_0)) of
+ s6139_0 =>
+ (case ((reg_name_matches_prefix s6139_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6140_0)) =>
+ (case ((string_drop s6139_0 s6140_0)) of
+ s6141_0 =>
+ (case ((opt_spc_matches_prefix0 s6141_0)) of
+ SOME ((() , s6142_0)) =>
+ let s6143_0 = (string_drop s6141_0 s6142_0) in
+ if ((string_startswith s6143_0 ")")) then
+ (case ((string_drop s6143_0 ((string_length ")")))) of
+ s_ =>
+ SOME (width, rd, imm, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6109_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
val _ = Define `
- ((s3410_:string ->(csrop#(5)words$word#(5)words$word#(12)words$word#string)option) s3411_0=
- ((case s3411_0 of
- s3412_0 =>
- (case ((csr_mnemonic_matches_prefix s3412_0)) of
- SOME ((op, s3413_0)) =>
- let s3414_0 = (string_drop s3412_0 s3413_0) in
- if ((string_startswith s3414_0 "i")) then
- (case ((string_drop s3414_0 ((string_length "i")))) of
- s3415_0 =>
- (case ((spc_matches_prefix0 s3415_0)) of
- SOME ((() , s3416_0)) =>
- (case ((string_drop s3415_0 s3416_0)) of
- s3417_0 =>
- (case ((reg_name_matches_prefix s3417_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3418_0)) =>
- (case ((string_drop s3417_0 s3418_0)) of
- s3419_0 =>
- (case ((sep_matches_prefix s3419_0)) of
- SOME ((() , s3420_0)) =>
- (case ((string_drop s3419_0 s3420_0)) of
- s3421_0 =>
+ ((s6109_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s6110_0=
+ (let s6111_0 = s6110_0 in
+ if ((string_startswith s6111_0 "fence.i.reserved.")) then
+ (case ((string_drop s6111_0 ((string_length "fence.i.reserved.")))) of
+ s6112_0 =>
+ (case ((reg_name_matches_prefix s6112_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6113_0)) =>
+ let s6114_0 = (string_drop s6112_0 s6113_0) in
+ if ((string_startswith s6114_0 ".")) then
+ (case ((string_drop s6114_0 ((string_length ".")))) of
+ s6115_0 =>
+ (case ((reg_name_matches_prefix s6115_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s6116_0)) =>
+ let s6117_0 = (string_drop s6115_0 s6116_0) in
+ if ((string_startswith s6117_0 ".")) then
+ (case ((string_drop s6117_0 ((string_length ".")))) of
+ s6118_0 =>
+ (case ((hex_bits_12_matches_prefix0 s6118_0 : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s6119_0)) =>
+ (case ((string_drop s6118_0 s6119_0)) of
+ s_ => SOME (rd, rs, imm, s_)
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6091_ : string -> maybe ((mword ty4 * mword ty4 * mword ty5 * mword ty5 * mword ty4 * string))*)
+
+val _ = Define `
+ ((s6091_:string ->((4)words$word#(4)words$word#(5)words$word#(5)words$word#(4)words$word#string)option) s6092_0=
+ (let s6093_0 = s6092_0 in
+ if ((string_startswith s6093_0 "fence.reserved.")) then
+ (case ((string_drop s6093_0 ((string_length "fence.reserved.")))) of
+ s6094_0 =>
+ (case ((fence_bits_matches_prefix s6094_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s6095_0)) =>
+ let s6096_0 = (string_drop s6094_0 s6095_0) in
+ if ((string_startswith s6096_0 ".")) then
+ (case ((string_drop s6096_0 ((string_length ".")))) of
+ s6097_0 =>
+ (case ((fence_bits_matches_prefix s6097_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s6098_0)) =>
+ let s6099_0 = (string_drop s6097_0 s6098_0) in
+ if ((string_startswith s6099_0 ".")) then
+ (case ((string_drop s6099_0 ((string_length ".")))) of
+ s6100_0 =>
+ (case ((reg_name_matches_prefix s6100_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs, s6101_0)) =>
+ let s6102_0 = (string_drop s6100_0 s6101_0) in
+ if ((string_startswith s6102_0 ".")) then
+ (case ((string_drop s6102_0 ((string_length ".")))) of
+ s6103_0 =>
+ (case ((reg_name_matches_prefix s6103_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6104_0)) =>
+ let s6105_0 = (string_drop s6103_0 s6104_0) in
+ if ((string_startswith s6105_0 ".")) then
+ (case ((string_drop s6105_0 ((string_length ".")))) of
+ s6106_0 =>
+ (case ((hex_bits_4_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s6106_0 : (( 4 words$word # ii)) option)) of
+ SOME ((fm, s6107_0)) =>
+ (case ((string_drop s6106_0 s6107_0)) of
+ s_ => SOME (pred, succ, rs, rd, fm, s_)
+ )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6085_ : string -> maybe ((mword ty3 * string))*)
+
+val _ = Define `
+ ((s6085_:string ->((3)words$word#string)option) s6086_0=
+ (let s6087_0 = s6086_0 in
+ if ((string_startswith s6087_0 "c.srai.hint.")) then
+ (case ((string_drop s6087_0 ((string_length "c.srai.hint.")))) of
+ s6088_0 =>
+ (case ((creg_name_matches_prefix s6088_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s6089_0)) =>
+ (case ((string_drop s6088_0 s6089_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6079_ : string -> maybe ((mword ty3 * string))*)
+
+val _ = Define `
+ ((s6079_:string ->((3)words$word#string)option) s6080_0=
+ (let s6081_0 = s6080_0 in
+ if ((string_startswith s6081_0 "c.srli.hint.")) then
+ (case ((string_drop s6081_0 ((string_length "c.srli.hint.")))) of
+ s6082_0 =>
+ (case ((creg_name_matches_prefix s6082_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s6083_0)) =>
+ (case ((string_drop s6082_0 s6083_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6070_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s6070_:string ->((5)words$word#(6)words$word#string)option) s6071_0=
+ (let s6072_0 = s6071_0 in
+ if ((string_startswith s6072_0 "c.slli.hint.")) then
+ (case ((string_drop s6072_0 ((string_length "c.slli.hint.")))) of
+ s6073_0 =>
+ (case ((reg_name_matches_prefix s6073_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s6074_0)) =>
+ let s6075_0 = (string_drop s6073_0 s6074_0) in
+ if ((string_startswith s6075_0 ".")) then
+ (case ((string_drop s6075_0 ((string_length ".")))) of
+ s6076_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict
+ s6076_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s6077_0)) =>
+ (case ((string_drop s6076_0 s6077_0)) of s_ => SOME (rsd, shamt, s_) )
+ | _ => NONE
+ )
+ ) else NONE
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6064_ : string -> maybe ((mword ty5 * string))*)
+
+val _ = Define `
+ ((s6064_:string ->((5)words$word#string)option) s6065_0=
+ (let s6066_0 = s6065_0 in
+ if ((string_startswith s6066_0 "c.add.hint.")) then
+ (case ((string_drop s6066_0 ((string_length "c.add.hint.")))) of
+ s6067_0 =>
+ (case ((reg_name_matches_prefix s6067_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6068_0)) =>
+ (case ((string_drop s6067_0 s6068_0)) of s_ => SOME (rs2, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6058_ : string -> maybe ((mword ty5 * string))*)
+
+val _ = Define `
+ ((s6058_:string ->((5)words$word#string)option) s6059_0=
+ (let s6060_0 = s6059_0 in
+ if ((string_startswith s6060_0 "c.mv.hint.")) then
+ (case ((string_drop s6060_0 ((string_length "c.mv.hint.")))) of
+ s6061_0 =>
+ (case ((reg_name_matches_prefix s6061_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s6062_0)) =>
+ (case ((string_drop s6061_0 s6062_0)) of s_ => SOME (rs2, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6052_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s6052_:string ->((6)words$word#string)option) s6053_0=
+ (let s6054_0 = s6053_0 in
+ if ((string_startswith s6054_0 "c.lui.hint.")) then
+ (case ((string_drop s6054_0 ((string_length "c.lui.hint.")))) of
+ s6055_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6055_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s6056_0)) =>
+ (case ((string_drop s6055_0 s6056_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6046_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s6046_:string ->((6)words$word#string)option) s6047_0=
+ (let s6048_0 = s6047_0 in
+ if ((string_startswith s6048_0 "c.li.hint.")) then
+ (case ((string_drop s6048_0 ((string_length "c.li.hint.")))) of
+ s6049_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6049_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s6050_0)) =>
+ (case ((string_drop s6049_0 s6050_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6040_ : string -> maybe ((mword ty5 * string))*)
+
+val _ = Define `
+ ((s6040_:string ->((5)words$word#string)option) s6041_0=
+ (let s6042_0 = s6041_0 in
+ if ((string_startswith s6042_0 "c.addi.hint.")) then
+ (case ((string_drop s6042_0 ((string_length "c.addi.hint.")))) of
+ s6043_0 =>
+ (case ((reg_name_matches_prefix s6043_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s6044_0)) =>
+ (case ((string_drop s6043_0 s6044_0)) of s_ => SOME (rsd, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6034_ : string -> maybe ((mword ty6 * string))*)
+
+val _ = Define `
+ ((s6034_:string ->((6)words$word#string)option) s6035_0=
+ (let s6036_0 = s6035_0 in
+ if ((string_startswith s6036_0 "c.nop.hint.")) then
+ (case ((string_drop s6036_0 ((string_length "c.nop.hint.")))) of
+ s6037_0 =>
+ (case ((hex_bits_6_matches_prefix
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s6037_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s6038_0)) =>
+ (case ((string_drop s6037_0 s6038_0)) of s_ => SOME (imm, s_) )
+ | _ => NONE
+ )
+ )
+ else NONE))`;
+
+
+(*val _s6030_ : string -> maybe string*)
+
+val _ = Define `
+ ((s6030_:string ->(string)option) s6031_0=
+ (let s6032_0 = s6031_0 in
+ if ((string_startswith s6032_0 "uret")) then
+ (case ((string_drop s6032_0 ((string_length "uret")))) of s_ => SOME s_ )
+ else NONE))`;
+
+
+(*val _s6013_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s6013_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word#string)option) s6014_0=
+ ((case s6014_0 of
+ s6015_0 =>
+ (case ((csr_mnemonic_matches_prefix s6015_0)) of
+ SOME ((op, s6016_0)) =>
+ (case ((string_drop s6015_0 s6016_0)) of
+ s6017_0 =>
+ (case ((spc_matches_prefix0 s6017_0)) of
+ SOME ((() , s6018_0)) =>
+ (case ((string_drop s6017_0 s6018_0)) of
+ s6019_0 =>
+ (case ((reg_name_matches_prefix s6019_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6020_0)) =>
+ (case ((string_drop s6019_0 s6020_0)) of
+ s6021_0 =>
+ (case ((sep_matches_prefix s6021_0)) of
+ SOME ((() , s6022_0)) =>
+ (case ((string_drop s6021_0 s6022_0)) of
+ s6023_0 =>
+ (case ((csr_name_map_matches_prefix s6023_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s6024_0)) =>
+ (case ((string_drop s6023_0 s6024_0)) of
+ s6025_0 =>
+ (case ((sep_matches_prefix s6025_0)) of
+ SOME ((() , s6026_0)) =>
+ (case ((string_drop s6025_0 s6026_0)) of
+ s6027_0 =>
+ (case ((reg_name_matches_prefix s6027_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6028_0)) =>
+ (case ((string_drop s6027_0 s6028_0)) of
+ s_ => SOME (op, rd, csr, rs1, s_)
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )
+ | _ => NONE
+ )
+ )))`;
+
+
+(*val _s5995_ : string -> maybe ((csrop * mword ty5 * mword ty12 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5995_:string ->(csrop#(5)words$word#(12)words$word#(5)words$word#string)option) s5996_0=
+ ((case s5996_0 of
+ s5997_0 =>
+ (case ((csr_mnemonic_matches_prefix s5997_0)) of
+ SOME ((op, s5998_0)) =>
+ let s5999_0 = (string_drop s5997_0 s5998_0) in
+ if ((string_startswith s5999_0 "i")) then
+ (case ((string_drop s5999_0 ((string_length "i")))) of
+ s6000_0 =>
+ (case ((spc_matches_prefix0 s6000_0)) of
+ SOME ((() , s6001_0)) =>
+ (case ((string_drop s6000_0 s6001_0)) of
+ s6002_0 =>
+ (case ((reg_name_matches_prefix s6002_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s6003_0)) =>
+ (case ((string_drop s6002_0 s6003_0)) of
+ s6004_0 =>
+ (case ((sep_matches_prefix s6004_0)) of
+ SOME ((() , s6005_0)) =>
+ (case ((string_drop s6004_0 s6005_0)) of
+ s6006_0 =>
+ (case ((csr_name_map_matches_prefix s6006_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((csr, s6007_0)) =>
+ (case ((string_drop s6006_0 s6007_0)) of
+ s6008_0 =>
+ (case ((sep_matches_prefix s6008_0)) of
+ SOME ((() , s6009_0)) =>
+ (case ((string_drop s6008_0 s6009_0)) of
+ s6010_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s3421_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3422_0)) =>
- (case ((string_drop s3421_0 s3422_0)) of
- s3423_0 =>
- (case ((sep_matches_prefix s3423_0)) of
- SOME ((() , s3424_0)) =>
- (case ((string_drop s3423_0 s3424_0)) of
- s3425_0 =>
- (case ((csr_name_map_matches_prefix s3425_0
- : (( 12 words$word # ii)) option)) of
- SOME ((csr, s3426_0)) =>
- (case ((string_drop s3425_0 s3426_0)) of
- s_ => SOME (op, rd, rs1, csr, s_)
+ s6010_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s6011_0)) =>
+ (case ((string_drop s6010_0 s6011_0)) of
+ s_ => SOME (op, rd, csr, rs1, s_)
)
| _ => NONE
)
@@ -31445,43 +56390,43 @@ val _ = Define `
)))`;
-(*val _s3391_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s3391_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3392_0=
- (let s3393_0 = s3392_0 in
- if ((string_startswith s3393_0 "rem")) then
- (case ((string_drop s3393_0 ((string_length "rem")))) of
- s3394_0 =>
- (case ((maybe_not_u_matches_prefix s3394_0)) of
- SOME ((s, s3395_0)) =>
- let s3396_0 = (string_drop s3394_0 s3395_0) in
- if ((string_startswith s3396_0 "w")) then
- (case ((string_drop s3396_0 ((string_length "w")))) of
- s3397_0 =>
- (case ((spc_matches_prefix0 s3397_0)) of
- SOME ((() , s3398_0)) =>
- (case ((string_drop s3397_0 s3398_0)) of
- s3399_0 =>
- (case ((reg_name_matches_prefix s3399_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3400_0)) =>
- (case ((string_drop s3399_0 s3400_0)) of
- s3401_0 =>
- (case ((sep_matches_prefix s3401_0)) of
- SOME ((() , s3402_0)) =>
- (case ((string_drop s3401_0 s3402_0)) of
- s3403_0 =>
- (case ((reg_name_matches_prefix s3403_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3404_0)) =>
- (case ((string_drop s3403_0 s3404_0)) of
- s3405_0 =>
- (case ((sep_matches_prefix s3405_0)) of
- SOME ((() , s3406_0)) =>
- (case ((string_drop s3405_0 s3406_0)) of
- s3407_0 =>
- (case ((reg_name_matches_prefix s3407_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3408_0)) =>
- (case ((string_drop s3407_0 s3408_0)) of
+(*val _s5976_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5976_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5977_0=
+ (let s5978_0 = s5977_0 in
+ if ((string_startswith s5978_0 "rem")) then
+ (case ((string_drop s5978_0 ((string_length "rem")))) of
+ s5979_0 =>
+ (case ((maybe_not_u_matches_prefix s5979_0)) of
+ SOME ((s, s5980_0)) =>
+ let s5981_0 = (string_drop s5979_0 s5980_0) in
+ if ((string_startswith s5981_0 "w")) then
+ (case ((string_drop s5981_0 ((string_length "w")))) of
+ s5982_0 =>
+ (case ((spc_matches_prefix0 s5982_0)) of
+ SOME ((() , s5983_0)) =>
+ (case ((string_drop s5982_0 s5983_0)) of
+ s5984_0 =>
+ (case ((reg_name_matches_prefix s5984_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5985_0)) =>
+ (case ((string_drop s5984_0 s5985_0)) of
+ s5986_0 =>
+ (case ((sep_matches_prefix s5986_0)) of
+ SOME ((() , s5987_0)) =>
+ (case ((string_drop s5986_0 s5987_0)) of
+ s5988_0 =>
+ (case ((reg_name_matches_prefix s5988_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5989_0)) =>
+ (case ((string_drop s5988_0 s5989_0)) of
+ s5990_0 =>
+ (case ((sep_matches_prefix s5990_0)) of
+ SOME ((() , s5991_0)) =>
+ (case ((string_drop s5990_0 s5991_0)) of
+ s5992_0 =>
+ (case ((reg_name_matches_prefix s5992_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5993_0)) =>
+ (case ((string_drop s5992_0 s5993_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31508,43 +56453,43 @@ val _ = Define `
else NONE))`;
-(*val _s3372_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s3372_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3373_0=
- (let s3374_0 = s3373_0 in
- if ((string_startswith s3374_0 "div")) then
- (case ((string_drop s3374_0 ((string_length "div")))) of
- s3375_0 =>
- (case ((maybe_not_u_matches_prefix s3375_0)) of
- SOME ((s, s3376_0)) =>
- let s3377_0 = (string_drop s3375_0 s3376_0) in
- if ((string_startswith s3377_0 "w")) then
- (case ((string_drop s3377_0 ((string_length "w")))) of
- s3378_0 =>
- (case ((spc_matches_prefix0 s3378_0)) of
- SOME ((() , s3379_0)) =>
- (case ((string_drop s3378_0 s3379_0)) of
- s3380_0 =>
- (case ((reg_name_matches_prefix s3380_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3381_0)) =>
- (case ((string_drop s3380_0 s3381_0)) of
- s3382_0 =>
- (case ((sep_matches_prefix s3382_0)) of
- SOME ((() , s3383_0)) =>
- (case ((string_drop s3382_0 s3383_0)) of
- s3384_0 =>
- (case ((reg_name_matches_prefix s3384_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3385_0)) =>
- (case ((string_drop s3384_0 s3385_0)) of
- s3386_0 =>
- (case ((sep_matches_prefix s3386_0)) of
- SOME ((() , s3387_0)) =>
- (case ((string_drop s3386_0 s3387_0)) of
- s3388_0 =>
- (case ((reg_name_matches_prefix s3388_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3389_0)) =>
- (case ((string_drop s3388_0 s3389_0)) of
+(*val _s5957_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5957_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5958_0=
+ (let s5959_0 = s5958_0 in
+ if ((string_startswith s5959_0 "div")) then
+ (case ((string_drop s5959_0 ((string_length "div")))) of
+ s5960_0 =>
+ (case ((maybe_not_u_matches_prefix s5960_0)) of
+ SOME ((s, s5961_0)) =>
+ let s5962_0 = (string_drop s5960_0 s5961_0) in
+ if ((string_startswith s5962_0 "w")) then
+ (case ((string_drop s5962_0 ((string_length "w")))) of
+ s5963_0 =>
+ (case ((spc_matches_prefix0 s5963_0)) of
+ SOME ((() , s5964_0)) =>
+ (case ((string_drop s5963_0 s5964_0)) of
+ s5965_0 =>
+ (case ((reg_name_matches_prefix s5965_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5966_0)) =>
+ (case ((string_drop s5965_0 s5966_0)) of
+ s5967_0 =>
+ (case ((sep_matches_prefix s5967_0)) of
+ SOME ((() , s5968_0)) =>
+ (case ((string_drop s5967_0 s5968_0)) of
+ s5969_0 =>
+ (case ((reg_name_matches_prefix s5969_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5970_0)) =>
+ (case ((string_drop s5969_0 s5970_0)) of
+ s5971_0 =>
+ (case ((sep_matches_prefix s5971_0)) of
+ SOME ((() , s5972_0)) =>
+ (case ((string_drop s5971_0 s5972_0)) of
+ s5973_0 =>
+ (case ((reg_name_matches_prefix s5973_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5974_0)) =>
+ (case ((string_drop s5973_0 s5974_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31571,37 +56516,37 @@ val _ = Define `
else NONE))`;
-(*val _s3356_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5941_ : string -> maybe ((mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3356_:string ->((5)words$word#(5)words$word#(5)words$word#string)option) s3357_0=
- (let s3358_0 = s3357_0 in
- if ((string_startswith s3358_0 "mulw")) then
- (case ((string_drop s3358_0 ((string_length "mulw")))) of
- s3359_0 =>
- (case ((spc_matches_prefix0 s3359_0)) of
- SOME ((() , s3360_0)) =>
- (case ((string_drop s3359_0 s3360_0)) of
- s3361_0 =>
- (case ((reg_name_matches_prefix s3361_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3362_0)) =>
- (case ((string_drop s3361_0 s3362_0)) of
- s3363_0 =>
- (case ((sep_matches_prefix s3363_0)) of
- SOME ((() , s3364_0)) =>
- (case ((string_drop s3363_0 s3364_0)) of
- s3365_0 =>
- (case ((reg_name_matches_prefix s3365_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3366_0)) =>
- (case ((string_drop s3365_0 s3366_0)) of
- s3367_0 =>
- (case ((sep_matches_prefix s3367_0)) of
- SOME ((() , s3368_0)) =>
- (case ((string_drop s3367_0 s3368_0)) of
- s3369_0 =>
- (case ((reg_name_matches_prefix s3369_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3370_0)) =>
- (case ((string_drop s3369_0 s3370_0)) of s_ => SOME (rd, rs1, rs2, s_) )
+ ((s5941_:string ->((5)words$word#(5)words$word#(5)words$word#string)option) s5942_0=
+ (let s5943_0 = s5942_0 in
+ if ((string_startswith s5943_0 "mulw")) then
+ (case ((string_drop s5943_0 ((string_length "mulw")))) of
+ s5944_0 =>
+ (case ((spc_matches_prefix0 s5944_0)) of
+ SOME ((() , s5945_0)) =>
+ (case ((string_drop s5944_0 s5945_0)) of
+ s5946_0 =>
+ (case ((reg_name_matches_prefix s5946_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5947_0)) =>
+ (case ((string_drop s5946_0 s5947_0)) of
+ s5948_0 =>
+ (case ((sep_matches_prefix s5948_0)) of
+ SOME ((() , s5949_0)) =>
+ (case ((string_drop s5948_0 s5949_0)) of
+ s5950_0 =>
+ (case ((reg_name_matches_prefix s5950_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5951_0)) =>
+ (case ((string_drop s5950_0 s5951_0)) of
+ s5952_0 =>
+ (case ((sep_matches_prefix s5952_0)) of
+ SOME ((() , s5953_0)) =>
+ (case ((string_drop s5952_0 s5953_0)) of
+ s5954_0 =>
+ (case ((reg_name_matches_prefix s5954_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5955_0)) =>
+ (case ((string_drop s5954_0 s5955_0)) of s_ => SOME (rd, rs1, rs2, s_) )
| _ => NONE
)
)
@@ -31623,41 +56568,41 @@ val _ = Define `
else NONE))`;
-(*val _s3338_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5923_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3338_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3339_0=
- (let s3340_0 = s3339_0 in
- if ((string_startswith s3340_0 "rem")) then
- (case ((string_drop s3340_0 ((string_length "rem")))) of
- s3341_0 =>
- (case ((maybe_not_u_matches_prefix s3341_0)) of
- SOME ((s, s3342_0)) =>
- (case ((string_drop s3341_0 s3342_0)) of
- s3343_0 =>
- (case ((spc_matches_prefix0 s3343_0)) of
- SOME ((() , s3344_0)) =>
- (case ((string_drop s3343_0 s3344_0)) of
- s3345_0 =>
- (case ((reg_name_matches_prefix s3345_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3346_0)) =>
- (case ((string_drop s3345_0 s3346_0)) of
- s3347_0 =>
- (case ((sep_matches_prefix s3347_0)) of
- SOME ((() , s3348_0)) =>
- (case ((string_drop s3347_0 s3348_0)) of
- s3349_0 =>
- (case ((reg_name_matches_prefix s3349_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3350_0)) =>
- (case ((string_drop s3349_0 s3350_0)) of
- s3351_0 =>
- (case ((sep_matches_prefix s3351_0)) of
- SOME ((() , s3352_0)) =>
- (case ((string_drop s3351_0 s3352_0)) of
- s3353_0 =>
- (case ((reg_name_matches_prefix s3353_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3354_0)) =>
- (case ((string_drop s3353_0 s3354_0)) of
+ ((s5923_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5924_0=
+ (let s5925_0 = s5924_0 in
+ if ((string_startswith s5925_0 "rem")) then
+ (case ((string_drop s5925_0 ((string_length "rem")))) of
+ s5926_0 =>
+ (case ((maybe_not_u_matches_prefix s5926_0)) of
+ SOME ((s, s5927_0)) =>
+ (case ((string_drop s5926_0 s5927_0)) of
+ s5928_0 =>
+ (case ((spc_matches_prefix0 s5928_0)) of
+ SOME ((() , s5929_0)) =>
+ (case ((string_drop s5928_0 s5929_0)) of
+ s5930_0 =>
+ (case ((reg_name_matches_prefix s5930_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5931_0)) =>
+ (case ((string_drop s5930_0 s5931_0)) of
+ s5932_0 =>
+ (case ((sep_matches_prefix s5932_0)) of
+ SOME ((() , s5933_0)) =>
+ (case ((string_drop s5932_0 s5933_0)) of
+ s5934_0 =>
+ (case ((reg_name_matches_prefix s5934_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5935_0)) =>
+ (case ((string_drop s5934_0 s5935_0)) of
+ s5936_0 =>
+ (case ((sep_matches_prefix s5936_0)) of
+ SOME ((() , s5937_0)) =>
+ (case ((string_drop s5936_0 s5937_0)) of
+ s5938_0 =>
+ (case ((reg_name_matches_prefix s5938_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5939_0)) =>
+ (case ((string_drop s5938_0 s5939_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31684,41 +56629,41 @@ val _ = Define `
else NONE))`;
-(*val _s3320_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5905_ : string -> maybe ((bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3320_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3321_0=
- (let s3322_0 = s3321_0 in
- if ((string_startswith s3322_0 "div")) then
- (case ((string_drop s3322_0 ((string_length "div")))) of
- s3323_0 =>
- (case ((maybe_not_u_matches_prefix s3323_0)) of
- SOME ((s, s3324_0)) =>
- (case ((string_drop s3323_0 s3324_0)) of
- s3325_0 =>
- (case ((spc_matches_prefix0 s3325_0)) of
- SOME ((() , s3326_0)) =>
- (case ((string_drop s3325_0 s3326_0)) of
- s3327_0 =>
- (case ((reg_name_matches_prefix s3327_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3328_0)) =>
- (case ((string_drop s3327_0 s3328_0)) of
- s3329_0 =>
- (case ((sep_matches_prefix s3329_0)) of
- SOME ((() , s3330_0)) =>
- (case ((string_drop s3329_0 s3330_0)) of
- s3331_0 =>
- (case ((reg_name_matches_prefix s3331_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3332_0)) =>
- (case ((string_drop s3331_0 s3332_0)) of
- s3333_0 =>
- (case ((sep_matches_prefix s3333_0)) of
- SOME ((() , s3334_0)) =>
- (case ((string_drop s3333_0 s3334_0)) of
- s3335_0 =>
- (case ((reg_name_matches_prefix s3335_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3336_0)) =>
- (case ((string_drop s3335_0 s3336_0)) of
+ ((s5905_:string ->(bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5906_0=
+ (let s5907_0 = s5906_0 in
+ if ((string_startswith s5907_0 "div")) then
+ (case ((string_drop s5907_0 ((string_length "div")))) of
+ s5908_0 =>
+ (case ((maybe_not_u_matches_prefix s5908_0)) of
+ SOME ((s, s5909_0)) =>
+ (case ((string_drop s5908_0 s5909_0)) of
+ s5910_0 =>
+ (case ((spc_matches_prefix0 s5910_0)) of
+ SOME ((() , s5911_0)) =>
+ (case ((string_drop s5910_0 s5911_0)) of
+ s5912_0 =>
+ (case ((reg_name_matches_prefix s5912_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5913_0)) =>
+ (case ((string_drop s5912_0 s5913_0)) of
+ s5914_0 =>
+ (case ((sep_matches_prefix s5914_0)) of
+ SOME ((() , s5915_0)) =>
+ (case ((string_drop s5914_0 s5915_0)) of
+ s5916_0 =>
+ (case ((reg_name_matches_prefix s5916_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5917_0)) =>
+ (case ((string_drop s5916_0 s5917_0)) of
+ s5918_0 =>
+ (case ((sep_matches_prefix s5918_0)) of
+ SOME ((() , s5919_0)) =>
+ (case ((string_drop s5918_0 s5919_0)) of
+ s5920_0 =>
+ (case ((reg_name_matches_prefix s5920_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5921_0)) =>
+ (case ((string_drop s5920_0 s5921_0)) of
s_ => SOME (s, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31745,39 +56690,39 @@ val _ = Define `
else NONE))`;
-(*val _s3303_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5888_ : string -> maybe ((bool * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3303_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s3304_0=
- ((case s3304_0 of
- s3305_0 =>
- (case ((mul_mnemonic_matches_prefix s3305_0)) of
- SOME (((high, signed1, signed2), s3306_0)) =>
- (case ((string_drop s3305_0 s3306_0)) of
- s3307_0 =>
- (case ((spc_matches_prefix0 s3307_0)) of
- SOME ((() , s3308_0)) =>
- (case ((string_drop s3307_0 s3308_0)) of
- s3309_0 =>
- (case ((reg_name_matches_prefix s3309_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3310_0)) =>
- (case ((string_drop s3309_0 s3310_0)) of
- s3311_0 =>
- (case ((sep_matches_prefix s3311_0)) of
- SOME ((() , s3312_0)) =>
- (case ((string_drop s3311_0 s3312_0)) of
- s3313_0 =>
- (case ((reg_name_matches_prefix s3313_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3314_0)) =>
- (case ((string_drop s3313_0 s3314_0)) of
- s3315_0 =>
- (case ((sep_matches_prefix s3315_0)) of
- SOME ((() , s3316_0)) =>
- (case ((string_drop s3315_0 s3316_0)) of
- s3317_0 =>
- (case ((reg_name_matches_prefix s3317_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3318_0)) =>
- (case ((string_drop s3317_0 s3318_0)) of
+ ((s5888_:string ->(bool#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5889_0=
+ ((case s5889_0 of
+ s5890_0 =>
+ (case ((mul_mnemonic_matches_prefix s5890_0)) of
+ SOME (((high, signed1, signed2), s5891_0)) =>
+ (case ((string_drop s5890_0 s5891_0)) of
+ s5892_0 =>
+ (case ((spc_matches_prefix0 s5892_0)) of
+ SOME ((() , s5893_0)) =>
+ (case ((string_drop s5892_0 s5893_0)) of
+ s5894_0 =>
+ (case ((reg_name_matches_prefix s5894_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5895_0)) =>
+ (case ((string_drop s5894_0 s5895_0)) of
+ s5896_0 =>
+ (case ((sep_matches_prefix s5896_0)) of
+ SOME ((() , s5897_0)) =>
+ (case ((string_drop s5896_0 s5897_0)) of
+ s5898_0 =>
+ (case ((reg_name_matches_prefix s5898_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5899_0)) =>
+ (case ((string_drop s5898_0 s5899_0)) of
+ s5900_0 =>
+ (case ((sep_matches_prefix s5900_0)) of
+ SOME ((() , s5901_0)) =>
+ (case ((string_drop s5900_0 s5901_0)) of
+ s5902_0 =>
+ (case ((reg_name_matches_prefix s5902_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5903_0)) =>
+ (case ((string_drop s5902_0 s5903_0)) of
s_ => SOME (high, signed1, signed2, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -31803,29 +56748,29 @@ val _ = Define `
)))`;
-(*val _s3291_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s5876_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3291_:string ->((5)words$word#(5)words$word#string)option) s3292_0=
- (let s3293_0 = s3292_0 in
- if ((string_startswith s3293_0 "c.add")) then
- (case ((string_drop s3293_0 ((string_length "c.add")))) of
- s3294_0 =>
- (case ((spc_matches_prefix0 s3294_0)) of
- SOME ((() , s3295_0)) =>
- (case ((string_drop s3294_0 s3295_0)) of
- s3296_0 =>
- (case ((reg_name_matches_prefix s3296_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3297_0)) =>
- (case ((string_drop s3296_0 s3297_0)) of
- s3298_0 =>
- (case ((sep_matches_prefix s3298_0)) of
- SOME ((() , s3299_0)) =>
- (case ((string_drop s3298_0 s3299_0)) of
- s3300_0 =>
- (case ((reg_name_matches_prefix s3300_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3301_0)) =>
- (case ((string_drop s3300_0 s3301_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5876_:string ->((5)words$word#(5)words$word#string)option) s5877_0=
+ (let s5878_0 = s5877_0 in
+ if ((string_startswith s5878_0 "c.add")) then
+ (case ((string_drop s5878_0 ((string_length "c.add")))) of
+ s5879_0 =>
+ (case ((spc_matches_prefix0 s5879_0)) of
+ SOME ((() , s5880_0)) =>
+ (case ((string_drop s5879_0 s5880_0)) of
+ s5881_0 =>
+ (case ((reg_name_matches_prefix s5881_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s5882_0)) =>
+ (case ((string_drop s5881_0 s5882_0)) of
+ s5883_0 =>
+ (case ((sep_matches_prefix s5883_0)) of
+ SOME ((() , s5884_0)) =>
+ (case ((string_drop s5883_0 s5884_0)) of
+ s5885_0 =>
+ (case ((reg_name_matches_prefix s5885_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5886_0)) =>
+ (case ((string_drop s5885_0 s5886_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -31841,41 +56786,41 @@ val _ = Define `
else NONE))`;
-(*val _s3287_ : string -> maybe string*)
+(*val _s5872_ : string -> maybe string*)
val _ = Define `
- ((s3287_:string ->(string)option) s3288_0=
- (let s3289_0 = s3288_0 in
- if ((string_startswith s3289_0 "c.ebreak")) then
- (case ((string_drop s3289_0 ((string_length "c.ebreak")))) of
+ ((s5872_:string ->(string)option) s5873_0=
+ (let s5874_0 = s5873_0 in
+ if ((string_startswith s5874_0 "c.ebreak")) then
+ (case ((string_drop s5874_0 ((string_length "c.ebreak")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s3275_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s5860_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s3275_:string ->((5)words$word#(5)words$word#string)option) s3276_0=
- (let s3277_0 = s3276_0 in
- if ((string_startswith s3277_0 "c.mv")) then
- (case ((string_drop s3277_0 ((string_length "c.mv")))) of
- s3278_0 =>
- (case ((spc_matches_prefix0 s3278_0)) of
- SOME ((() , s3279_0)) =>
- (case ((string_drop s3278_0 s3279_0)) of
- s3280_0 =>
- (case ((reg_name_matches_prefix s3280_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3281_0)) =>
- (case ((string_drop s3280_0 s3281_0)) of
- s3282_0 =>
- (case ((sep_matches_prefix s3282_0)) of
- SOME ((() , s3283_0)) =>
- (case ((string_drop s3282_0 s3283_0)) of
- s3284_0 =>
- (case ((reg_name_matches_prefix s3284_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3285_0)) =>
- (case ((string_drop s3284_0 s3285_0)) of s_ => SOME (rd, rs2, s_) )
+ ((s5860_:string ->((5)words$word#(5)words$word#string)option) s5861_0=
+ (let s5862_0 = s5861_0 in
+ if ((string_startswith s5862_0 "c.mv")) then
+ (case ((string_drop s5862_0 ((string_length "c.mv")))) of
+ s5863_0 =>
+ (case ((spc_matches_prefix0 s5863_0)) of
+ SOME ((() , s5864_0)) =>
+ (case ((string_drop s5863_0 s5864_0)) of
+ s5865_0 =>
+ (case ((reg_name_matches_prefix s5865_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5866_0)) =>
+ (case ((string_drop s5865_0 s5866_0)) of
+ s5867_0 =>
+ (case ((sep_matches_prefix s5867_0)) of
+ SOME ((() , s5868_0)) =>
+ (case ((string_drop s5867_0 s5868_0)) of
+ s5869_0 =>
+ (case ((reg_name_matches_prefix s5869_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5870_0)) =>
+ (case ((string_drop s5869_0 s5870_0)) of s_ => SOME (rd, rs2, s_) )
| _ => NONE
)
)
@@ -31891,21 +56836,21 @@ val _ = Define `
else NONE))`;
-(*val _s3267_ : string -> maybe ((mword ty5 * string))*)
+(*val _s5852_ : string -> maybe ((mword ty5 * string))*)
val _ = Define `
- ((s3267_:string ->((5)words$word#string)option) s3268_0=
- (let s3269_0 = s3268_0 in
- if ((string_startswith s3269_0 "c.jalr")) then
- (case ((string_drop s3269_0 ((string_length "c.jalr")))) of
- s3270_0 =>
- (case ((spc_matches_prefix0 s3270_0)) of
- SOME ((() , s3271_0)) =>
- (case ((string_drop s3270_0 s3271_0)) of
- s3272_0 =>
- (case ((reg_name_matches_prefix s3272_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3273_0)) =>
- (case ((string_drop s3272_0 s3273_0)) of s_ => SOME (rs1, s_) )
+ ((s5852_:string ->((5)words$word#string)option) s5853_0=
+ (let s5854_0 = s5853_0 in
+ if ((string_startswith s5854_0 "c.jalr")) then
+ (case ((string_drop s5854_0 ((string_length "c.jalr")))) of
+ s5855_0 =>
+ (case ((spc_matches_prefix0 s5855_0)) of
+ SOME ((() , s5856_0)) =>
+ (case ((string_drop s5855_0 s5856_0)) of
+ s5857_0 =>
+ (case ((reg_name_matches_prefix s5857_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5858_0)) =>
+ (case ((string_drop s5857_0 s5858_0)) of s_ => SOME (rs1, s_) )
| _ => NONE
)
)
@@ -31915,21 +56860,21 @@ val _ = Define `
else NONE))`;
-(*val _s3259_ : string -> maybe ((mword ty5 * string))*)
+(*val _s5844_ : string -> maybe ((mword ty5 * string))*)
val _ = Define `
- ((s3259_:string ->((5)words$word#string)option) s3260_0=
- (let s3261_0 = s3260_0 in
- if ((string_startswith s3261_0 "c.jr")) then
- (case ((string_drop s3261_0 ((string_length "c.jr")))) of
- s3262_0 =>
- (case ((spc_matches_prefix0 s3262_0)) of
- SOME ((() , s3263_0)) =>
- (case ((string_drop s3262_0 s3263_0)) of
- s3264_0 =>
- (case ((reg_name_matches_prefix s3264_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s3265_0)) =>
- (case ((string_drop s3264_0 s3265_0)) of s_ => SOME (rs1, s_) )
+ ((s5844_:string ->((5)words$word#string)option) s5845_0=
+ (let s5846_0 = s5845_0 in
+ if ((string_startswith s5846_0 "c.jr")) then
+ (case ((string_drop s5846_0 ((string_length "c.jr")))) of
+ s5847_0 =>
+ (case ((spc_matches_prefix0 s5847_0)) of
+ SOME ((() , s5848_0)) =>
+ (case ((string_drop s5847_0 s5848_0)) of
+ s5849_0 =>
+ (case ((reg_name_matches_prefix s5849_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5850_0)) =>
+ (case ((string_drop s5849_0 s5850_0)) of s_ => SOME (rs1, s_) )
| _ => NONE
)
)
@@ -31939,30 +56884,30 @@ val _ = Define `
else NONE))`;
-(*val _s3247_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5832_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3247_:string ->((5)words$word#(6)words$word#string)option) s3248_0=
- (let s3249_0 = s3248_0 in
- if ((string_startswith s3249_0 "c.sdsp")) then
- (case ((string_drop s3249_0 ((string_length "c.sdsp")))) of
- s3250_0 =>
- (case ((spc_matches_prefix0 s3250_0)) of
- SOME ((() , s3251_0)) =>
- (case ((string_drop s3250_0 s3251_0)) of
- s3252_0 =>
- (case ((reg_name_matches_prefix s3252_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s3253_0)) =>
- (case ((string_drop s3252_0 s3253_0)) of
- s3254_0 =>
- (case ((sep_matches_prefix s3254_0)) of
- SOME ((() , s3255_0)) =>
- (case ((string_drop s3254_0 s3255_0)) of
- s3256_0 =>
+ ((s5832_:string ->((5)words$word#(6)words$word#string)option) s5833_0=
+ (let s5834_0 = s5833_0 in
+ if ((string_startswith s5834_0 "c.sdsp")) then
+ (case ((string_drop s5834_0 ((string_length "c.sdsp")))) of
+ s5835_0 =>
+ (case ((spc_matches_prefix0 s5835_0)) of
+ SOME ((() , s5836_0)) =>
+ (case ((string_drop s5835_0 s5836_0)) of
+ s5837_0 =>
+ (case ((reg_name_matches_prefix s5837_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5838_0)) =>
+ (case ((string_drop s5837_0 s5838_0)) of
+ s5839_0 =>
+ (case ((sep_matches_prefix s5839_0)) of
+ SOME ((() , s5840_0)) =>
+ (case ((string_drop s5839_0 s5840_0)) of
+ s5841_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3256_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3257_0)) =>
- (case ((string_drop s3256_0 s3257_0)) of s_ => SOME (rs2, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5841_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5842_0)) =>
+ (case ((string_drop s5841_0 s5842_0)) of s_ => SOME (rs2, uimm, s_) )
| _ => NONE
)
)
@@ -31978,30 +56923,30 @@ val _ = Define `
else NONE))`;
-(*val _s3235_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5820_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3235_:string ->((5)words$word#(6)words$word#string)option) s3236_0=
- (let s3237_0 = s3236_0 in
- if ((string_startswith s3237_0 "c.swsp")) then
- (case ((string_drop s3237_0 ((string_length "c.swsp")))) of
- s3238_0 =>
- (case ((spc_matches_prefix0 s3238_0)) of
- SOME ((() , s3239_0)) =>
- (case ((string_drop s3238_0 s3239_0)) of
- s3240_0 =>
- (case ((reg_name_matches_prefix s3240_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3241_0)) =>
- (case ((string_drop s3240_0 s3241_0)) of
- s3242_0 =>
- (case ((sep_matches_prefix s3242_0)) of
- SOME ((() , s3243_0)) =>
- (case ((string_drop s3242_0 s3243_0)) of
- s3244_0 =>
+ ((s5820_:string ->((5)words$word#(6)words$word#string)option) s5821_0=
+ (let s5822_0 = s5821_0 in
+ if ((string_startswith s5822_0 "c.swsp")) then
+ (case ((string_drop s5822_0 ((string_length "c.swsp")))) of
+ s5823_0 =>
+ (case ((spc_matches_prefix0 s5823_0)) of
+ SOME ((() , s5824_0)) =>
+ (case ((string_drop s5823_0 s5824_0)) of
+ s5825_0 =>
+ (case ((reg_name_matches_prefix s5825_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5826_0)) =>
+ (case ((string_drop s5825_0 s5826_0)) of
+ s5827_0 =>
+ (case ((sep_matches_prefix s5827_0)) of
+ SOME ((() , s5828_0)) =>
+ (case ((string_drop s5827_0 s5828_0)) of
+ s5829_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3244_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3245_0)) =>
- (case ((string_drop s3244_0 s3245_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5829_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5830_0)) =>
+ (case ((string_drop s5829_0 s5830_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -32017,30 +56962,30 @@ val _ = Define `
else NONE))`;
-(*val _s3223_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5808_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3223_:string ->((5)words$word#(6)words$word#string)option) s3224_0=
- (let s3225_0 = s3224_0 in
- if ((string_startswith s3225_0 "c.ldsp")) then
- (case ((string_drop s3225_0 ((string_length "c.ldsp")))) of
- s3226_0 =>
- (case ((spc_matches_prefix0 s3226_0)) of
- SOME ((() , s3227_0)) =>
- (case ((string_drop s3226_0 s3227_0)) of
- s3228_0 =>
- (case ((reg_name_matches_prefix s3228_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3229_0)) =>
- (case ((string_drop s3228_0 s3229_0)) of
- s3230_0 =>
- (case ((sep_matches_prefix s3230_0)) of
- SOME ((() , s3231_0)) =>
- (case ((string_drop s3230_0 s3231_0)) of
- s3232_0 =>
+ ((s5808_:string ->((5)words$word#(6)words$word#string)option) s5809_0=
+ (let s5810_0 = s5809_0 in
+ if ((string_startswith s5810_0 "c.ldsp")) then
+ (case ((string_drop s5810_0 ((string_length "c.ldsp")))) of
+ s5811_0 =>
+ (case ((spc_matches_prefix0 s5811_0)) of
+ SOME ((() , s5812_0)) =>
+ (case ((string_drop s5811_0 s5812_0)) of
+ s5813_0 =>
+ (case ((reg_name_matches_prefix s5813_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5814_0)) =>
+ (case ((string_drop s5813_0 s5814_0)) of
+ s5815_0 =>
+ (case ((sep_matches_prefix s5815_0)) of
+ SOME ((() , s5816_0)) =>
+ (case ((string_drop s5815_0 s5816_0)) of
+ s5817_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3232_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3233_0)) =>
- (case ((string_drop s3232_0 s3233_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5817_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5818_0)) =>
+ (case ((string_drop s5817_0 s5818_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -32056,30 +57001,30 @@ val _ = Define `
else NONE))`;
-(*val _s3211_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5796_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3211_:string ->((5)words$word#(6)words$word#string)option) s3212_0=
- (let s3213_0 = s3212_0 in
- if ((string_startswith s3213_0 "c.lwsp")) then
- (case ((string_drop s3213_0 ((string_length "c.lwsp")))) of
- s3214_0 =>
- (case ((spc_matches_prefix0 s3214_0)) of
- SOME ((() , s3215_0)) =>
- (case ((string_drop s3214_0 s3215_0)) of
- s3216_0 =>
- (case ((reg_name_matches_prefix s3216_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3217_0)) =>
- (case ((string_drop s3216_0 s3217_0)) of
- s3218_0 =>
- (case ((sep_matches_prefix s3218_0)) of
- SOME ((() , s3219_0)) =>
- (case ((string_drop s3218_0 s3219_0)) of
- s3220_0 =>
+ ((s5796_:string ->((5)words$word#(6)words$word#string)option) s5797_0=
+ (let s5798_0 = s5797_0 in
+ if ((string_startswith s5798_0 "c.lwsp")) then
+ (case ((string_drop s5798_0 ((string_length "c.lwsp")))) of
+ s5799_0 =>
+ (case ((spc_matches_prefix0 s5799_0)) of
+ SOME ((() , s5800_0)) =>
+ (case ((string_drop s5799_0 s5800_0)) of
+ s5801_0 =>
+ (case ((reg_name_matches_prefix s5801_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5802_0)) =>
+ (case ((string_drop s5801_0 s5802_0)) of
+ s5803_0 =>
+ (case ((sep_matches_prefix s5803_0)) of
+ SOME ((() , s5804_0)) =>
+ (case ((string_drop s5803_0 s5804_0)) of
+ s5805_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3220_0 : (( 6 words$word # ii)) option)) of
- SOME ((uimm, s3221_0)) =>
- (case ((string_drop s3220_0 s3221_0)) of s_ => SOME (rd, uimm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5805_0 : (( 6 words$word # ii)) option)) of
+ SOME ((uimm, s5806_0)) =>
+ (case ((string_drop s5805_0 s5806_0)) of s_ => SOME (rd, uimm, s_) )
| _ => NONE
)
)
@@ -32095,30 +57040,30 @@ val _ = Define `
else NONE))`;
-(*val _s3199_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5784_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3199_:string ->((5)words$word#(6)words$word#string)option) s3200_0=
- (let s3201_0 = s3200_0 in
- if ((string_startswith s3201_0 "c.slli")) then
- (case ((string_drop s3201_0 ((string_length "c.slli")))) of
- s3202_0 =>
- (case ((spc_matches_prefix0 s3202_0)) of
- SOME ((() , s3203_0)) =>
- (case ((string_drop s3202_0 s3203_0)) of
- s3204_0 =>
- (case ((reg_name_matches_prefix s3204_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3205_0)) =>
- (case ((string_drop s3204_0 s3205_0)) of
- s3206_0 =>
- (case ((sep_matches_prefix s3206_0)) of
- SOME ((() , s3207_0)) =>
- (case ((string_drop s3206_0 s3207_0)) of
- s3208_0 =>
+ ((s5784_:string ->((5)words$word#(6)words$word#string)option) s5785_0=
+ (let s5786_0 = s5785_0 in
+ if ((string_startswith s5786_0 "c.slli")) then
+ (case ((string_drop s5786_0 ((string_length "c.slli")))) of
+ s5787_0 =>
+ (case ((spc_matches_prefix0 s5787_0)) of
+ SOME ((() , s5788_0)) =>
+ (case ((string_drop s5787_0 s5788_0)) of
+ s5789_0 =>
+ (case ((reg_name_matches_prefix s5789_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s5790_0)) =>
+ (case ((string_drop s5789_0 s5790_0)) of
+ s5791_0 =>
+ (case ((sep_matches_prefix s5791_0)) of
+ SOME ((() , s5792_0)) =>
+ (case ((string_drop s5791_0 s5792_0)) of
+ s5793_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3208_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3209_0)) =>
- (case ((string_drop s3208_0 s3209_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5793_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s5794_0)) =>
+ (case ((string_drop s5793_0 s5794_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -32134,30 +57079,30 @@ val _ = Define `
else NONE))`;
-(*val _s3187_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s5772_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s3187_:string ->((3)words$word#(8)words$word#string)option) s3188_0=
- (let s3189_0 = s3188_0 in
- if ((string_startswith s3189_0 "c.bnez")) then
- (case ((string_drop s3189_0 ((string_length "c.bnez")))) of
- s3190_0 =>
- (case ((spc_matches_prefix0 s3190_0)) of
- SOME ((() , s3191_0)) =>
- (case ((string_drop s3190_0 s3191_0)) of
- s3192_0 =>
- (case ((creg_name_matches_prefix s3192_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s3193_0)) =>
- (case ((string_drop s3192_0 s3193_0)) of
- s3194_0 =>
- (case ((sep_matches_prefix s3194_0)) of
- SOME ((() , s3195_0)) =>
- (case ((string_drop s3194_0 s3195_0)) of
- s3196_0 =>
+ ((s5772_:string ->((3)words$word#(8)words$word#string)option) s5773_0=
+ (let s5774_0 = s5773_0 in
+ if ((string_startswith s5774_0 "c.bnez")) then
+ (case ((string_drop s5774_0 ((string_length "c.bnez")))) of
+ s5775_0 =>
+ (case ((spc_matches_prefix0 s5775_0)) of
+ SOME ((() , s5776_0)) =>
+ (case ((string_drop s5775_0 s5776_0)) of
+ s5777_0 =>
+ (case ((creg_name_matches_prefix s5777_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s5778_0)) =>
+ (case ((string_drop s5777_0 s5778_0)) of
+ s5779_0 =>
+ (case ((sep_matches_prefix s5779_0)) of
+ SOME ((() , s5780_0)) =>
+ (case ((string_drop s5779_0 s5780_0)) of
+ s5781_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3196_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s3197_0)) =>
- (case ((string_drop s3196_0 s3197_0)) of s_ => SOME (rs, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5781_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s5782_0)) =>
+ (case ((string_drop s5781_0 s5782_0)) of s_ => SOME (rs, imm, s_) )
| _ => NONE
)
)
@@ -32173,30 +57118,30 @@ val _ = Define `
else NONE))`;
-(*val _s3175_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s5760_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s3175_:string ->((3)words$word#(8)words$word#string)option) s3176_0=
- (let s3177_0 = s3176_0 in
- if ((string_startswith s3177_0 "c.beqz")) then
- (case ((string_drop s3177_0 ((string_length "c.beqz")))) of
- s3178_0 =>
- (case ((spc_matches_prefix0 s3178_0)) of
- SOME ((() , s3179_0)) =>
- (case ((string_drop s3178_0 s3179_0)) of
- s3180_0 =>
- (case ((creg_name_matches_prefix s3180_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs, s3181_0)) =>
- (case ((string_drop s3180_0 s3181_0)) of
- s3182_0 =>
- (case ((sep_matches_prefix s3182_0)) of
- SOME ((() , s3183_0)) =>
- (case ((string_drop s3182_0 s3183_0)) of
- s3184_0 =>
+ ((s5760_:string ->((3)words$word#(8)words$word#string)option) s5761_0=
+ (let s5762_0 = s5761_0 in
+ if ((string_startswith s5762_0 "c.beqz")) then
+ (case ((string_drop s5762_0 ((string_length "c.beqz")))) of
+ s5763_0 =>
+ (case ((spc_matches_prefix0 s5763_0)) of
+ SOME ((() , s5764_0)) =>
+ (case ((string_drop s5763_0 s5764_0)) of
+ s5765_0 =>
+ (case ((creg_name_matches_prefix s5765_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs, s5766_0)) =>
+ (case ((string_drop s5765_0 s5766_0)) of
+ s5767_0 =>
+ (case ((sep_matches_prefix s5767_0)) of
+ SOME ((() , s5768_0)) =>
+ (case ((string_drop s5767_0 s5768_0)) of
+ s5769_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3184_0 : (( 8 words$word # ii)) option)) of
- SOME ((imm, s3185_0)) =>
- (case ((string_drop s3184_0 s3185_0)) of s_ => SOME (rs, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5769_0 : (( 8 words$word # ii)) option)) of
+ SOME ((imm, s5770_0)) =>
+ (case ((string_drop s5769_0 s5770_0)) of s_ => SOME (rs, imm, s_) )
| _ => NONE
)
)
@@ -32212,22 +57157,22 @@ val _ = Define `
else NONE))`;
-(*val _s3167_ : string -> maybe ((mword ty11 * string))*)
+(*val _s5752_ : string -> maybe ((mword ty11 * string))*)
val _ = Define `
- ((s3167_:string ->((11)words$word#string)option) s3168_0=
- (let s3169_0 = s3168_0 in
- if ((string_startswith s3169_0 "c.j")) then
- (case ((string_drop s3169_0 ((string_length "c.j")))) of
- s3170_0 =>
- (case ((spc_matches_prefix0 s3170_0)) of
- SOME ((() , s3171_0)) =>
- (case ((string_drop s3170_0 s3171_0)) of
- s3172_0 =>
+ ((s5752_:string ->((11)words$word#string)option) s5753_0=
+ (let s5754_0 = s5753_0 in
+ if ((string_startswith s5754_0 "c.j")) then
+ (case ((string_drop s5754_0 ((string_length "c.j")))) of
+ s5755_0 =>
+ (case ((spc_matches_prefix0 s5755_0)) of
+ SOME ((() , s5756_0)) =>
+ (case ((string_drop s5755_0 s5756_0)) of
+ s5757_0 =>
(case ((hex_bits_11_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3172_0 : (( 11 words$word # ii)) option)) of
- SOME ((imm, s3173_0)) =>
- (case ((string_drop s3172_0 s3173_0)) of s_ => SOME (imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5757_0 : (( 11 words$word # ii)) option)) of
+ SOME ((imm, s5758_0)) =>
+ (case ((string_drop s5757_0 s5758_0)) of s_ => SOME (imm, s_) )
| _ => NONE
)
)
@@ -32237,29 +57182,29 @@ val _ = Define `
else NONE))`;
-(*val _s3155_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5740_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3155_:string ->((3)words$word#(3)words$word#string)option) s3156_0=
- (let s3157_0 = s3156_0 in
- if ((string_startswith s3157_0 "c.addw")) then
- (case ((string_drop s3157_0 ((string_length "c.addw")))) of
- s3158_0 =>
- (case ((spc_matches_prefix0 s3158_0)) of
- SOME ((() , s3159_0)) =>
- (case ((string_drop s3158_0 s3159_0)) of
- s3160_0 =>
- (case ((creg_name_matches_prefix s3160_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3161_0)) =>
- (case ((string_drop s3160_0 s3161_0)) of
- s3162_0 =>
- (case ((sep_matches_prefix s3162_0)) of
- SOME ((() , s3163_0)) =>
- (case ((string_drop s3162_0 s3163_0)) of
- s3164_0 =>
- (case ((creg_name_matches_prefix s3164_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3165_0)) =>
- (case ((string_drop s3164_0 s3165_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5740_:string ->((3)words$word#(3)words$word#string)option) s5741_0=
+ (let s5742_0 = s5741_0 in
+ if ((string_startswith s5742_0 "c.addw")) then
+ (case ((string_drop s5742_0 ((string_length "c.addw")))) of
+ s5743_0 =>
+ (case ((spc_matches_prefix0 s5743_0)) of
+ SOME ((() , s5744_0)) =>
+ (case ((string_drop s5743_0 s5744_0)) of
+ s5745_0 =>
+ (case ((creg_name_matches_prefix s5745_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5746_0)) =>
+ (case ((string_drop s5745_0 s5746_0)) of
+ s5747_0 =>
+ (case ((sep_matches_prefix s5747_0)) of
+ SOME ((() , s5748_0)) =>
+ (case ((string_drop s5747_0 s5748_0)) of
+ s5749_0 =>
+ (case ((creg_name_matches_prefix s5749_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5750_0)) =>
+ (case ((string_drop s5749_0 s5750_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32275,29 +57220,29 @@ val _ = Define `
else NONE))`;
-(*val _s3143_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5728_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3143_:string ->((3)words$word#(3)words$word#string)option) s3144_0=
- (let s3145_0 = s3144_0 in
- if ((string_startswith s3145_0 "c.subw")) then
- (case ((string_drop s3145_0 ((string_length "c.subw")))) of
- s3146_0 =>
- (case ((spc_matches_prefix0 s3146_0)) of
- SOME ((() , s3147_0)) =>
- (case ((string_drop s3146_0 s3147_0)) of
- s3148_0 =>
- (case ((creg_name_matches_prefix s3148_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3149_0)) =>
- (case ((string_drop s3148_0 s3149_0)) of
- s3150_0 =>
- (case ((sep_matches_prefix s3150_0)) of
- SOME ((() , s3151_0)) =>
- (case ((string_drop s3150_0 s3151_0)) of
- s3152_0 =>
- (case ((creg_name_matches_prefix s3152_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3153_0)) =>
- (case ((string_drop s3152_0 s3153_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5728_:string ->((3)words$word#(3)words$word#string)option) s5729_0=
+ (let s5730_0 = s5729_0 in
+ if ((string_startswith s5730_0 "c.subw")) then
+ (case ((string_drop s5730_0 ((string_length "c.subw")))) of
+ s5731_0 =>
+ (case ((spc_matches_prefix0 s5731_0)) of
+ SOME ((() , s5732_0)) =>
+ (case ((string_drop s5731_0 s5732_0)) of
+ s5733_0 =>
+ (case ((creg_name_matches_prefix s5733_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5734_0)) =>
+ (case ((string_drop s5733_0 s5734_0)) of
+ s5735_0 =>
+ (case ((sep_matches_prefix s5735_0)) of
+ SOME ((() , s5736_0)) =>
+ (case ((string_drop s5735_0 s5736_0)) of
+ s5737_0 =>
+ (case ((creg_name_matches_prefix s5737_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5738_0)) =>
+ (case ((string_drop s5737_0 s5738_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32313,29 +57258,29 @@ val _ = Define `
else NONE))`;
-(*val _s3131_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5716_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3131_:string ->((3)words$word#(3)words$word#string)option) s3132_0=
- (let s3133_0 = s3132_0 in
- if ((string_startswith s3133_0 "c.and")) then
- (case ((string_drop s3133_0 ((string_length "c.and")))) of
- s3134_0 =>
- (case ((spc_matches_prefix0 s3134_0)) of
- SOME ((() , s3135_0)) =>
- (case ((string_drop s3134_0 s3135_0)) of
- s3136_0 =>
- (case ((creg_name_matches_prefix s3136_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3137_0)) =>
- (case ((string_drop s3136_0 s3137_0)) of
- s3138_0 =>
- (case ((sep_matches_prefix s3138_0)) of
- SOME ((() , s3139_0)) =>
- (case ((string_drop s3138_0 s3139_0)) of
- s3140_0 =>
- (case ((creg_name_matches_prefix s3140_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3141_0)) =>
- (case ((string_drop s3140_0 s3141_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5716_:string ->((3)words$word#(3)words$word#string)option) s5717_0=
+ (let s5718_0 = s5717_0 in
+ if ((string_startswith s5718_0 "c.and")) then
+ (case ((string_drop s5718_0 ((string_length "c.and")))) of
+ s5719_0 =>
+ (case ((spc_matches_prefix0 s5719_0)) of
+ SOME ((() , s5720_0)) =>
+ (case ((string_drop s5719_0 s5720_0)) of
+ s5721_0 =>
+ (case ((creg_name_matches_prefix s5721_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5722_0)) =>
+ (case ((string_drop s5721_0 s5722_0)) of
+ s5723_0 =>
+ (case ((sep_matches_prefix s5723_0)) of
+ SOME ((() , s5724_0)) =>
+ (case ((string_drop s5723_0 s5724_0)) of
+ s5725_0 =>
+ (case ((creg_name_matches_prefix s5725_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5726_0)) =>
+ (case ((string_drop s5725_0 s5726_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32351,29 +57296,29 @@ val _ = Define `
else NONE))`;
-(*val _s3119_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5704_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3119_:string ->((3)words$word#(3)words$word#string)option) s3120_0=
- (let s3121_0 = s3120_0 in
- if ((string_startswith s3121_0 "c.or")) then
- (case ((string_drop s3121_0 ((string_length "c.or")))) of
- s3122_0 =>
- (case ((spc_matches_prefix0 s3122_0)) of
- SOME ((() , s3123_0)) =>
- (case ((string_drop s3122_0 s3123_0)) of
- s3124_0 =>
- (case ((creg_name_matches_prefix s3124_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3125_0)) =>
- (case ((string_drop s3124_0 s3125_0)) of
- s3126_0 =>
- (case ((sep_matches_prefix s3126_0)) of
- SOME ((() , s3127_0)) =>
- (case ((string_drop s3126_0 s3127_0)) of
- s3128_0 =>
- (case ((creg_name_matches_prefix s3128_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3129_0)) =>
- (case ((string_drop s3128_0 s3129_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5704_:string ->((3)words$word#(3)words$word#string)option) s5705_0=
+ (let s5706_0 = s5705_0 in
+ if ((string_startswith s5706_0 "c.or")) then
+ (case ((string_drop s5706_0 ((string_length "c.or")))) of
+ s5707_0 =>
+ (case ((spc_matches_prefix0 s5707_0)) of
+ SOME ((() , s5708_0)) =>
+ (case ((string_drop s5707_0 s5708_0)) of
+ s5709_0 =>
+ (case ((creg_name_matches_prefix s5709_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5710_0)) =>
+ (case ((string_drop s5709_0 s5710_0)) of
+ s5711_0 =>
+ (case ((sep_matches_prefix s5711_0)) of
+ SOME ((() , s5712_0)) =>
+ (case ((string_drop s5711_0 s5712_0)) of
+ s5713_0 =>
+ (case ((creg_name_matches_prefix s5713_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5714_0)) =>
+ (case ((string_drop s5713_0 s5714_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32389,29 +57334,29 @@ val _ = Define `
else NONE))`;
-(*val _s3107_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5692_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3107_:string ->((3)words$word#(3)words$word#string)option) s3108_0=
- (let s3109_0 = s3108_0 in
- if ((string_startswith s3109_0 "c.xor")) then
- (case ((string_drop s3109_0 ((string_length "c.xor")))) of
- s3110_0 =>
- (case ((spc_matches_prefix0 s3110_0)) of
- SOME ((() , s3111_0)) =>
- (case ((string_drop s3110_0 s3111_0)) of
- s3112_0 =>
- (case ((creg_name_matches_prefix s3112_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3113_0)) =>
- (case ((string_drop s3112_0 s3113_0)) of
- s3114_0 =>
- (case ((sep_matches_prefix s3114_0)) of
- SOME ((() , s3115_0)) =>
- (case ((string_drop s3114_0 s3115_0)) of
- s3116_0 =>
- (case ((creg_name_matches_prefix s3116_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3117_0)) =>
- (case ((string_drop s3116_0 s3117_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5692_:string ->((3)words$word#(3)words$word#string)option) s5693_0=
+ (let s5694_0 = s5693_0 in
+ if ((string_startswith s5694_0 "c.xor")) then
+ (case ((string_drop s5694_0 ((string_length "c.xor")))) of
+ s5695_0 =>
+ (case ((spc_matches_prefix0 s5695_0)) of
+ SOME ((() , s5696_0)) =>
+ (case ((string_drop s5695_0 s5696_0)) of
+ s5697_0 =>
+ (case ((creg_name_matches_prefix s5697_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5698_0)) =>
+ (case ((string_drop s5697_0 s5698_0)) of
+ s5699_0 =>
+ (case ((sep_matches_prefix s5699_0)) of
+ SOME ((() , s5700_0)) =>
+ (case ((string_drop s5699_0 s5700_0)) of
+ s5701_0 =>
+ (case ((creg_name_matches_prefix s5701_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5702_0)) =>
+ (case ((string_drop s5701_0 s5702_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32427,29 +57372,29 @@ val _ = Define `
else NONE))`;
-(*val _s3095_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
+(*val _s5680_ : string -> maybe ((mword ty3 * mword ty3 * string))*)
val _ = Define `
- ((s3095_:string ->((3)words$word#(3)words$word#string)option) s3096_0=
- (let s3097_0 = s3096_0 in
- if ((string_startswith s3097_0 "c.sub")) then
- (case ((string_drop s3097_0 ((string_length "c.sub")))) of
- s3098_0 =>
- (case ((spc_matches_prefix0 s3098_0)) of
- SOME ((() , s3099_0)) =>
- (case ((string_drop s3098_0 s3099_0)) of
- s3100_0 =>
- (case ((creg_name_matches_prefix s3100_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3101_0)) =>
- (case ((string_drop s3100_0 s3101_0)) of
- s3102_0 =>
- (case ((sep_matches_prefix s3102_0)) of
- SOME ((() , s3103_0)) =>
- (case ((string_drop s3102_0 s3103_0)) of
- s3104_0 =>
- (case ((creg_name_matches_prefix s3104_0 : (( 3 words$word # ii)) option)) of
- SOME ((rs2, s3105_0)) =>
- (case ((string_drop s3104_0 s3105_0)) of s_ => SOME (rsd, rs2, s_) )
+ ((s5680_:string ->((3)words$word#(3)words$word#string)option) s5681_0=
+ (let s5682_0 = s5681_0 in
+ if ((string_startswith s5682_0 "c.sub")) then
+ (case ((string_drop s5682_0 ((string_length "c.sub")))) of
+ s5683_0 =>
+ (case ((spc_matches_prefix0 s5683_0)) of
+ SOME ((() , s5684_0)) =>
+ (case ((string_drop s5683_0 s5684_0)) of
+ s5685_0 =>
+ (case ((creg_name_matches_prefix s5685_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5686_0)) =>
+ (case ((string_drop s5685_0 s5686_0)) of
+ s5687_0 =>
+ (case ((sep_matches_prefix s5687_0)) of
+ SOME ((() , s5688_0)) =>
+ (case ((string_drop s5687_0 s5688_0)) of
+ s5689_0 =>
+ (case ((creg_name_matches_prefix s5689_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rs2, s5690_0)) =>
+ (case ((string_drop s5689_0 s5690_0)) of s_ => SOME (rsd, rs2, s_) )
| _ => NONE
)
)
@@ -32465,30 +57410,30 @@ val _ = Define `
else NONE))`;
-(*val _s3083_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s5668_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3083_:string ->((3)words$word#(6)words$word#string)option) s3084_0=
- (let s3085_0 = s3084_0 in
- if ((string_startswith s3085_0 "c.andi")) then
- (case ((string_drop s3085_0 ((string_length "c.andi")))) of
- s3086_0 =>
- (case ((spc_matches_prefix0 s3086_0)) of
- SOME ((() , s3087_0)) =>
- (case ((string_drop s3086_0 s3087_0)) of
- s3088_0 =>
- (case ((creg_name_matches_prefix s3088_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3089_0)) =>
- (case ((string_drop s3088_0 s3089_0)) of
- s3090_0 =>
- (case ((sep_matches_prefix s3090_0)) of
- SOME ((() , s3091_0)) =>
- (case ((string_drop s3090_0 s3091_0)) of
- s3092_0 =>
+ ((s5668_:string ->((3)words$word#(6)words$word#string)option) s5669_0=
+ (let s5670_0 = s5669_0 in
+ if ((string_startswith s5670_0 "c.andi")) then
+ (case ((string_drop s5670_0 ((string_length "c.andi")))) of
+ s5671_0 =>
+ (case ((spc_matches_prefix0 s5671_0)) of
+ SOME ((() , s5672_0)) =>
+ (case ((string_drop s5671_0 s5672_0)) of
+ s5673_0 =>
+ (case ((creg_name_matches_prefix s5673_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5674_0)) =>
+ (case ((string_drop s5673_0 s5674_0)) of
+ s5675_0 =>
+ (case ((sep_matches_prefix s5675_0)) of
+ SOME ((() , s5676_0)) =>
+ (case ((string_drop s5675_0 s5676_0)) of
+ s5677_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3092_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3093_0)) =>
- (case ((string_drop s3092_0 s3093_0)) of s_ => SOME (rsd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5677_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5678_0)) =>
+ (case ((string_drop s5677_0 s5678_0)) of s_ => SOME (rsd, imm, s_) )
| _ => NONE
)
)
@@ -32504,30 +57449,30 @@ val _ = Define `
else NONE))`;
-(*val _s3071_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s5656_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3071_:string ->((3)words$word#(6)words$word#string)option) s3072_0=
- (let s3073_0 = s3072_0 in
- if ((string_startswith s3073_0 "c.srai")) then
- (case ((string_drop s3073_0 ((string_length "c.srai")))) of
- s3074_0 =>
- (case ((spc_matches_prefix0 s3074_0)) of
- SOME ((() , s3075_0)) =>
- (case ((string_drop s3074_0 s3075_0)) of
- s3076_0 =>
- (case ((creg_name_matches_prefix s3076_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3077_0)) =>
- (case ((string_drop s3076_0 s3077_0)) of
- s3078_0 =>
- (case ((sep_matches_prefix s3078_0)) of
- SOME ((() , s3079_0)) =>
- (case ((string_drop s3078_0 s3079_0)) of
- s3080_0 =>
+ ((s5656_:string ->((3)words$word#(6)words$word#string)option) s5657_0=
+ (let s5658_0 = s5657_0 in
+ if ((string_startswith s5658_0 "c.srai")) then
+ (case ((string_drop s5658_0 ((string_length "c.srai")))) of
+ s5659_0 =>
+ (case ((spc_matches_prefix0 s5659_0)) of
+ SOME ((() , s5660_0)) =>
+ (case ((string_drop s5659_0 s5660_0)) of
+ s5661_0 =>
+ (case ((creg_name_matches_prefix s5661_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5662_0)) =>
+ (case ((string_drop s5661_0 s5662_0)) of
+ s5663_0 =>
+ (case ((sep_matches_prefix s5663_0)) of
+ SOME ((() , s5664_0)) =>
+ (case ((string_drop s5663_0 s5664_0)) of
+ s5665_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3080_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3081_0)) =>
- (case ((string_drop s3080_0 s3081_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5665_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s5666_0)) =>
+ (case ((string_drop s5665_0 s5666_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -32543,30 +57488,30 @@ val _ = Define `
else NONE))`;
-(*val _s3059_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
+(*val _s5644_ : string -> maybe ((mword ty3 * mword ty6 * string))*)
val _ = Define `
- ((s3059_:string ->((3)words$word#(6)words$word#string)option) s3060_0=
- (let s3061_0 = s3060_0 in
- if ((string_startswith s3061_0 "c.srli")) then
- (case ((string_drop s3061_0 ((string_length "c.srli")))) of
- s3062_0 =>
- (case ((spc_matches_prefix0 s3062_0)) of
- SOME ((() , s3063_0)) =>
- (case ((string_drop s3062_0 s3063_0)) of
- s3064_0 =>
- (case ((creg_name_matches_prefix s3064_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsd, s3065_0)) =>
- (case ((string_drop s3064_0 s3065_0)) of
- s3066_0 =>
- (case ((sep_matches_prefix s3066_0)) of
- SOME ((() , s3067_0)) =>
- (case ((string_drop s3066_0 s3067_0)) of
- s3068_0 =>
+ ((s5644_:string ->((3)words$word#(6)words$word#string)option) s5645_0=
+ (let s5646_0 = s5645_0 in
+ if ((string_startswith s5646_0 "c.srli")) then
+ (case ((string_drop s5646_0 ((string_length "c.srli")))) of
+ s5647_0 =>
+ (case ((spc_matches_prefix0 s5647_0)) of
+ SOME ((() , s5648_0)) =>
+ (case ((string_drop s5647_0 s5648_0)) of
+ s5649_0 =>
+ (case ((creg_name_matches_prefix s5649_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsd, s5650_0)) =>
+ (case ((string_drop s5649_0 s5650_0)) of
+ s5651_0 =>
+ (case ((sep_matches_prefix s5651_0)) of
+ SOME ((() , s5652_0)) =>
+ (case ((string_drop s5651_0 s5652_0)) of
+ s5653_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3068_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s3069_0)) =>
- (case ((string_drop s3068_0 s3069_0)) of s_ => SOME (rsd, shamt, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5653_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s5654_0)) =>
+ (case ((string_drop s5653_0 s5654_0)) of s_ => SOME (rsd, shamt, s_) )
| _ => NONE
)
)
@@ -32582,30 +57527,30 @@ val _ = Define `
else NONE))`;
-(*val _s3047_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5632_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3047_:string ->((5)words$word#(6)words$word#string)option) s3048_0=
- (let s3049_0 = s3048_0 in
- if ((string_startswith s3049_0 "c.lui")) then
- (case ((string_drop s3049_0 ((string_length "c.lui")))) of
- s3050_0 =>
- (case ((spc_matches_prefix0 s3050_0)) of
- SOME ((() , s3051_0)) =>
- (case ((string_drop s3050_0 s3051_0)) of
- s3052_0 =>
- (case ((reg_name_matches_prefix s3052_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3053_0)) =>
- (case ((string_drop s3052_0 s3053_0)) of
- s3054_0 =>
- (case ((sep_matches_prefix s3054_0)) of
- SOME ((() , s3055_0)) =>
- (case ((string_drop s3054_0 s3055_0)) of
- s3056_0 =>
+ ((s5632_:string ->((5)words$word#(6)words$word#string)option) s5633_0=
+ (let s5634_0 = s5633_0 in
+ if ((string_startswith s5634_0 "c.lui")) then
+ (case ((string_drop s5634_0 ((string_length "c.lui")))) of
+ s5635_0 =>
+ (case ((spc_matches_prefix0 s5635_0)) of
+ SOME ((() , s5636_0)) =>
+ (case ((string_drop s5635_0 s5636_0)) of
+ s5637_0 =>
+ (case ((reg_name_matches_prefix s5637_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5638_0)) =>
+ (case ((string_drop s5637_0 s5638_0)) of
+ s5639_0 =>
+ (case ((sep_matches_prefix s5639_0)) of
+ SOME ((() , s5640_0)) =>
+ (case ((string_drop s5639_0 s5640_0)) of
+ s5641_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3056_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3057_0)) =>
- (case ((string_drop s3056_0 s3057_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5641_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5642_0)) =>
+ (case ((string_drop s5641_0 s5642_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -32621,22 +57566,22 @@ val _ = Define `
else NONE))`;
-(*val _s3039_ : string -> maybe ((mword ty6 * string))*)
+(*val _s5624_ : string -> maybe ((mword ty6 * string))*)
val _ = Define `
- ((s3039_:string ->((6)words$word#string)option) s3040_0=
- (let s3041_0 = s3040_0 in
- if ((string_startswith s3041_0 "c.addi16sp")) then
- (case ((string_drop s3041_0 ((string_length "c.addi16sp")))) of
- s3042_0 =>
- (case ((spc_matches_prefix0 s3042_0)) of
- SOME ((() , s3043_0)) =>
- (case ((string_drop s3042_0 s3043_0)) of
- s3044_0 =>
+ ((s5624_:string ->((6)words$word#string)option) s5625_0=
+ (let s5626_0 = s5625_0 in
+ if ((string_startswith s5626_0 "c.addi16sp")) then
+ (case ((string_drop s5626_0 ((string_length "c.addi16sp")))) of
+ s5627_0 =>
+ (case ((spc_matches_prefix0 s5627_0)) of
+ SOME ((() , s5628_0)) =>
+ (case ((string_drop s5627_0 s5628_0)) of
+ s5629_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3044_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3045_0)) =>
- (case ((string_drop s3044_0 s3045_0)) of s_ => SOME (imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5629_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5630_0)) =>
+ (case ((string_drop s5629_0 s5630_0)) of s_ => SOME (imm, s_) )
| _ => NONE
)
)
@@ -32646,30 +57591,30 @@ val _ = Define `
else NONE))`;
-(*val _s3027_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5612_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3027_:string ->((5)words$word#(6)words$word#string)option) s3028_0=
- (let s3029_0 = s3028_0 in
- if ((string_startswith s3029_0 "c.li")) then
- (case ((string_drop s3029_0 ((string_length "c.li")))) of
- s3030_0 =>
- (case ((spc_matches_prefix0 s3030_0)) of
- SOME ((() , s3031_0)) =>
- (case ((string_drop s3030_0 s3031_0)) of
- s3032_0 =>
- (case ((reg_name_matches_prefix s3032_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s3033_0)) =>
- (case ((string_drop s3032_0 s3033_0)) of
- s3034_0 =>
- (case ((sep_matches_prefix s3034_0)) of
- SOME ((() , s3035_0)) =>
- (case ((string_drop s3034_0 s3035_0)) of
- s3036_0 =>
+ ((s5612_:string ->((5)words$word#(6)words$word#string)option) s5613_0=
+ (let s5614_0 = s5613_0 in
+ if ((string_startswith s5614_0 "c.li")) then
+ (case ((string_drop s5614_0 ((string_length "c.li")))) of
+ s5615_0 =>
+ (case ((spc_matches_prefix0 s5615_0)) of
+ SOME ((() , s5616_0)) =>
+ (case ((string_drop s5615_0 s5616_0)) of
+ s5617_0 =>
+ (case ((reg_name_matches_prefix s5617_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5618_0)) =>
+ (case ((string_drop s5617_0 s5618_0)) of
+ s5619_0 =>
+ (case ((sep_matches_prefix s5619_0)) of
+ SOME ((() , s5620_0)) =>
+ (case ((string_drop s5619_0 s5620_0)) of
+ s5621_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3036_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3037_0)) =>
- (case ((string_drop s3036_0 s3037_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5621_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5622_0)) =>
+ (case ((string_drop s5621_0 s5622_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -32685,30 +57630,30 @@ val _ = Define `
else NONE))`;
-(*val _s3015_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5600_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s3015_:string ->((5)words$word#(6)words$word#string)option) s3016_0=
- (let s3017_0 = s3016_0 in
- if ((string_startswith s3017_0 "c.addiw")) then
- (case ((string_drop s3017_0 ((string_length "c.addiw")))) of
- s3018_0 =>
- (case ((spc_matches_prefix0 s3018_0)) of
- SOME ((() , s3019_0)) =>
- (case ((string_drop s3018_0 s3019_0)) of
- s3020_0 =>
- (case ((reg_name_matches_prefix s3020_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3021_0)) =>
- (case ((string_drop s3020_0 s3021_0)) of
- s3022_0 =>
- (case ((sep_matches_prefix s3022_0)) of
- SOME ((() , s3023_0)) =>
- (case ((string_drop s3022_0 s3023_0)) of
- s3024_0 =>
+ ((s5600_:string ->((5)words$word#(6)words$word#string)option) s5601_0=
+ (let s5602_0 = s5601_0 in
+ if ((string_startswith s5602_0 "c.addiw")) then
+ (case ((string_drop s5602_0 ((string_length "c.addiw")))) of
+ s5603_0 =>
+ (case ((spc_matches_prefix0 s5603_0)) of
+ SOME ((() , s5604_0)) =>
+ (case ((string_drop s5603_0 s5604_0)) of
+ s5605_0 =>
+ (case ((reg_name_matches_prefix s5605_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s5606_0)) =>
+ (case ((string_drop s5605_0 s5606_0)) of
+ s5607_0 =>
+ (case ((sep_matches_prefix s5607_0)) of
+ SOME ((() , s5608_0)) =>
+ (case ((string_drop s5607_0 s5608_0)) of
+ s5609_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3024_0 : (( 6 words$word # ii)) option)) of
- SOME ((imm, s3025_0)) =>
- (case ((string_drop s3024_0 s3025_0)) of s_ => SOME (rsd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5609_0 : (( 6 words$word # ii)) option)) of
+ SOME ((imm, s5610_0)) =>
+ (case ((string_drop s5609_0 s5610_0)) of s_ => SOME (rsd, imm, s_) )
| _ => NONE
)
)
@@ -32724,28 +57669,27 @@ val _ = Define `
else NONE))`;
-(*val _s3007_ : string -> maybe ((mword ty11 * string))*)
+(*val _s5592_ : string -> maybe ((mword ty11 * string))*)
val _ = Define `
- ((s3007_:string ->((11)words$word#string)option) s3008_0=
- (let s3009_0 = s3008_0 in
- if ((string_startswith s3009_0 "c.jal")) then
- (case ((string_drop s3009_0 ((string_length "c.jal")))) of
- s3010_0 =>
- (case ((spc_matches_prefix0 s3010_0)) of
- SOME ((() , s3011_0)) =>
- (case ((string_drop s3010_0 s3011_0)) of
- s3012_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3012_0 : (( 12 words$word # ii)) option)) of
- SOME ((v__826, s3013_0)) =>
- if (((((subrange_vec_dec v__826 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
- = (vec_of_bits [B0] : 1 words$word)))) then
- let (imm : 11 words$word) = ((subrange_vec_dec v__826 (( 11 : int): ii)
+ ((s5592_:string ->((11)words$word#string)option) s5593_0=
+ (let s5594_0 = s5593_0 in
+ if ((string_startswith s5594_0 "c.jal")) then
+ (case ((string_drop s5594_0 ((string_length "c.jal")))) of
+ s5595_0 =>
+ (case ((spc_matches_prefix0 s5595_0)) of
+ SOME ((() , s5596_0)) =>
+ (case ((string_drop s5595_0 s5596_0)) of
+ s5597_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5597_0 : (( 12 words$word # ii)) option)) of
+ SOME ((v__1490, s5598_0)) =>
+ if (((((subrange_vec_dec v__1490 (( 0 : int): ii) (( 0 : int): ii) : 1 words$word))
+ = (0b0w : 1 words$word)))) then
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1490 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- let (imm : 11 words$word) = ((subrange_vec_dec v__826 (( 11 : int): ii)
+ let (imm : 11 words$word) = ((subrange_vec_dec v__1490 (( 11 : int): ii)
(( 1 : int): ii) : 11 words$word)) in
- (case ((string_drop s3012_0 s3013_0)) of s_ => SOME (imm, s_) ) else
+ (case ((string_drop s5597_0 s5598_0)) of s_ => SOME (imm, s_) ) else
NONE
| _ => NONE
)
@@ -32756,30 +57700,30 @@ val _ = Define `
else NONE))`;
-(*val _s2995_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
+(*val _s5580_ : string -> maybe ((mword ty5 * mword ty6 * string))*)
val _ = Define `
- ((s2995_:string ->((5)words$word#(6)words$word#string)option) s2996_0=
- (let s2997_0 = s2996_0 in
- if ((string_startswith s2997_0 "c.addi")) then
- (case ((string_drop s2997_0 ((string_length "c.addi")))) of
- s2998_0 =>
- (case ((spc_matches_prefix0 s2998_0)) of
- SOME ((() , s2999_0)) =>
- (case ((string_drop s2998_0 s2999_0)) of
- s3000_0 =>
- (case ((reg_name_matches_prefix s3000_0 : (( 5 words$word # ii)) option)) of
- SOME ((rsd, s3001_0)) =>
- (case ((string_drop s3000_0 s3001_0)) of
- s3002_0 =>
- (case ((sep_matches_prefix s3002_0)) of
- SOME ((() , s3003_0)) =>
- (case ((string_drop s3002_0 s3003_0)) of
- s3004_0 =>
+ ((s5580_:string ->((5)words$word#(6)words$word#string)option) s5581_0=
+ (let s5582_0 = s5581_0 in
+ if ((string_startswith s5582_0 "c.addi")) then
+ (case ((string_drop s5582_0 ((string_length "c.addi")))) of
+ s5583_0 =>
+ (case ((spc_matches_prefix0 s5583_0)) of
+ SOME ((() , s5584_0)) =>
+ (case ((string_drop s5583_0 s5584_0)) of
+ s5585_0 =>
+ (case ((reg_name_matches_prefix s5585_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rsd, s5586_0)) =>
+ (case ((string_drop s5585_0 s5586_0)) of
+ s5587_0 =>
+ (case ((sep_matches_prefix s5587_0)) of
+ SOME ((() , s5588_0)) =>
+ (case ((string_drop s5587_0 s5588_0)) of
+ s5589_0 =>
(case ((hex_bits_6_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s3004_0 : (( 6 words$word # ii)) option)) of
- SOME ((nzi, s3005_0)) =>
- (case ((string_drop s3004_0 s3005_0)) of s_ => SOME (rsd, nzi, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5589_0 : (( 6 words$word # ii)) option)) of
+ SOME ((nzi, s5590_0)) =>
+ (case ((string_drop s5589_0 s5590_0)) of s_ => SOME (rsd, nzi, s_) )
| _ => NONE
)
)
@@ -32795,45 +57739,45 @@ val _ = Define `
else NONE))`;
-(*val _s2979_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s5564_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2979_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2980_0=
- (let s2981_0 = s2980_0 in
- if ((string_startswith s2981_0 "c.sd")) then
- (case ((string_drop s2981_0 ((string_length "c.sd")))) of
- s2982_0 =>
- (case ((spc_matches_prefix0 s2982_0)) of
- SOME ((() , s2983_0)) =>
- (case ((string_drop s2982_0 s2983_0)) of
- s2984_0 =>
- (case ((creg_name_matches_prefix s2984_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2985_0)) =>
- (case ((string_drop s2984_0 s2985_0)) of
- s2986_0 =>
- (case ((sep_matches_prefix s2986_0)) of
- SOME ((() , s2987_0)) =>
- (case ((string_drop s2986_0 s2987_0)) of
- s2988_0 =>
- (case ((creg_name_matches_prefix s2988_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2989_0)) =>
- (case ((string_drop s2988_0 s2989_0)) of
- s2990_0 =>
- (case ((sep_matches_prefix s2990_0)) of
- SOME ((() , s2991_0)) =>
- (case ((string_drop s2990_0 s2991_0)) of
- s2992_0 =>
+ ((s5564_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5565_0=
+ (let s5566_0 = s5565_0 in
+ if ((string_startswith s5566_0 "c.sd")) then
+ (case ((string_drop s5566_0 ((string_length "c.sd")))) of
+ s5567_0 =>
+ (case ((spc_matches_prefix0 s5567_0)) of
+ SOME ((() , s5568_0)) =>
+ (case ((string_drop s5567_0 s5568_0)) of
+ s5569_0 =>
+ (case ((creg_name_matches_prefix s5569_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s5570_0)) =>
+ (case ((string_drop s5569_0 s5570_0)) of
+ s5571_0 =>
+ (case ((sep_matches_prefix s5571_0)) of
+ SOME ((() , s5572_0)) =>
+ (case ((string_drop s5571_0 s5572_0)) of
+ s5573_0 =>
+ (case ((creg_name_matches_prefix s5573_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s5574_0)) =>
+ (case ((string_drop s5573_0 s5574_0)) of
+ s5575_0 =>
+ (case ((sep_matches_prefix s5575_0)) of
+ SOME ((() , s5576_0)) =>
+ (case ((string_drop s5575_0 s5576_0)) of
+ s5577_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2992_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5577_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__828, s2993_0)) =>
- if (((((subrange_vec_dec v__828 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1492, s5578_0)) =>
+ if (((((subrange_vec_dec v__1492 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__828 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1492 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__828 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- (case ((string_drop s2992_0 s2993_0)) of
+ ((subrange_vec_dec v__1492 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5577_0 s5578_0)) of
s_ => SOME (rsc1, rsc2, uimm, s_)
) else NONE
| _ => NONE
@@ -32857,45 +57801,45 @@ val _ = Define `
else NONE))`;
-(*val _s2963_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s5548_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2963_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2964_0=
- (let s2965_0 = s2964_0 in
- if ((string_startswith s2965_0 "c.sw")) then
- (case ((string_drop s2965_0 ((string_length "c.sw")))) of
- s2966_0 =>
- (case ((spc_matches_prefix0 s2966_0)) of
- SOME ((() , s2967_0)) =>
- (case ((string_drop s2966_0 s2967_0)) of
- s2968_0 =>
- (case ((creg_name_matches_prefix s2968_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc1, s2969_0)) =>
- (case ((string_drop s2968_0 s2969_0)) of
- s2970_0 =>
- (case ((sep_matches_prefix s2970_0)) of
- SOME ((() , s2971_0)) =>
- (case ((string_drop s2970_0 s2971_0)) of
- s2972_0 =>
- (case ((creg_name_matches_prefix s2972_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc2, s2973_0)) =>
- (case ((string_drop s2972_0 s2973_0)) of
- s2974_0 =>
- (case ((sep_matches_prefix s2974_0)) of
- SOME ((() , s2975_0)) =>
- (case ((string_drop s2974_0 s2975_0)) of
- s2976_0 =>
+ ((s5548_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5549_0=
+ (let s5550_0 = s5549_0 in
+ if ((string_startswith s5550_0 "c.sw")) then
+ (case ((string_drop s5550_0 ((string_length "c.sw")))) of
+ s5551_0 =>
+ (case ((spc_matches_prefix0 s5551_0)) of
+ SOME ((() , s5552_0)) =>
+ (case ((string_drop s5551_0 s5552_0)) of
+ s5553_0 =>
+ (case ((creg_name_matches_prefix s5553_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc1, s5554_0)) =>
+ (case ((string_drop s5553_0 s5554_0)) of
+ s5555_0 =>
+ (case ((sep_matches_prefix s5555_0)) of
+ SOME ((() , s5556_0)) =>
+ (case ((string_drop s5555_0 s5556_0)) of
+ s5557_0 =>
+ (case ((creg_name_matches_prefix s5557_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc2, s5558_0)) =>
+ (case ((string_drop s5557_0 s5558_0)) of
+ s5559_0 =>
+ (case ((sep_matches_prefix s5559_0)) of
+ SOME ((() , s5560_0)) =>
+ (case ((string_drop s5559_0 s5560_0)) of
+ s5561_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2976_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5561_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__830, s2977_0)) =>
- if (((((subrange_vec_dec v__830 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1494, s5562_0)) =>
+ if (((((subrange_vec_dec v__1494 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__830 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1494 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__830 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- (case ((string_drop s2976_0 s2977_0)) of
+ ((subrange_vec_dec v__1494 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5561_0 s5562_0)) of
s_ => SOME (rsc1, rsc2, uimm, s_)
) else NONE
| _ => NONE
@@ -32919,45 +57863,45 @@ val _ = Define `
else NONE))`;
-(*val _s2947_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s5532_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2947_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2948_0=
- (let s2949_0 = s2948_0 in
- if ((string_startswith s2949_0 "c.ld")) then
- (case ((string_drop s2949_0 ((string_length "c.ld")))) of
- s2950_0 =>
- (case ((spc_matches_prefix0 s2950_0)) of
- SOME ((() , s2951_0)) =>
- (case ((string_drop s2950_0 s2951_0)) of
- s2952_0 =>
- (case ((creg_name_matches_prefix s2952_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2953_0)) =>
- (case ((string_drop s2952_0 s2953_0)) of
- s2954_0 =>
- (case ((sep_matches_prefix s2954_0)) of
- SOME ((() , s2955_0)) =>
- (case ((string_drop s2954_0 s2955_0)) of
- s2956_0 =>
- (case ((creg_name_matches_prefix s2956_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2957_0)) =>
- (case ((string_drop s2956_0 s2957_0)) of
- s2958_0 =>
- (case ((sep_matches_prefix s2958_0)) of
- SOME ((() , s2959_0)) =>
- (case ((string_drop s2958_0 s2959_0)) of
- s2960_0 =>
+ ((s5532_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5533_0=
+ (let s5534_0 = s5533_0 in
+ if ((string_startswith s5534_0 "c.ld")) then
+ (case ((string_drop s5534_0 ((string_length "c.ld")))) of
+ s5535_0 =>
+ (case ((spc_matches_prefix0 s5535_0)) of
+ SOME ((() , s5536_0)) =>
+ (case ((string_drop s5535_0 s5536_0)) of
+ s5537_0 =>
+ (case ((creg_name_matches_prefix s5537_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s5538_0)) =>
+ (case ((string_drop s5537_0 s5538_0)) of
+ s5539_0 =>
+ (case ((sep_matches_prefix s5539_0)) of
+ SOME ((() , s5540_0)) =>
+ (case ((string_drop s5539_0 s5540_0)) of
+ s5541_0 =>
+ (case ((creg_name_matches_prefix s5541_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s5542_0)) =>
+ (case ((string_drop s5541_0 s5542_0)) of
+ s5543_0 =>
+ (case ((sep_matches_prefix s5543_0)) of
+ SOME ((() , s5544_0)) =>
+ (case ((string_drop s5543_0 s5544_0)) of
+ s5545_0 =>
(case ((hex_bits_8_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2960_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5545_0
: (( 8 words$word # ii)) option)) of
- SOME ((v__832, s2961_0)) =>
- if (((((subrange_vec_dec v__832 (( 2 : int): ii) (( 0 : int): ii) : 3 words$word))
- = (vec_of_bits [B0;B0;B0] : 3 words$word)))) then
+ SOME ((v__1496, s5546_0)) =>
+ if (((((subrange_vec_dec v__1496 (( 2 : int): ii) (( 0 : int): ii)
+ : 3 words$word)) = (0b000w : 3 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__832 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1496 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__832 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
- (case ((string_drop s2960_0 s2961_0)) of
+ ((subrange_vec_dec v__1496 (( 7 : int): ii) (( 3 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5545_0 s5546_0)) of
s_ => SOME (rdc, rsc, uimm, s_)
) else NONE
| _ => NONE
@@ -32981,45 +57925,45 @@ val _ = Define `
else NONE))`;
-(*val _s2931_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
+(*val _s5516_ : string -> maybe ((mword ty3 * mword ty3 * mword ty5 * string))*)
val _ = Define `
- ((s2931_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s2932_0=
- (let s2933_0 = s2932_0 in
- if ((string_startswith s2933_0 "c.lw")) then
- (case ((string_drop s2933_0 ((string_length "c.lw")))) of
- s2934_0 =>
- (case ((spc_matches_prefix0 s2934_0)) of
- SOME ((() , s2935_0)) =>
- (case ((string_drop s2934_0 s2935_0)) of
- s2936_0 =>
- (case ((creg_name_matches_prefix s2936_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2937_0)) =>
- (case ((string_drop s2936_0 s2937_0)) of
- s2938_0 =>
- (case ((sep_matches_prefix s2938_0)) of
- SOME ((() , s2939_0)) =>
- (case ((string_drop s2938_0 s2939_0)) of
- s2940_0 =>
- (case ((creg_name_matches_prefix s2940_0 : (( 3 words$word # ii)) option)) of
- SOME ((rsc, s2941_0)) =>
- (case ((string_drop s2940_0 s2941_0)) of
- s2942_0 =>
- (case ((sep_matches_prefix s2942_0)) of
- SOME ((() , s2943_0)) =>
- (case ((string_drop s2942_0 s2943_0)) of
- s2944_0 =>
+ ((s5516_:string ->((3)words$word#(3)words$word#(5)words$word#string)option) s5517_0=
+ (let s5518_0 = s5517_0 in
+ if ((string_startswith s5518_0 "c.lw")) then
+ (case ((string_drop s5518_0 ((string_length "c.lw")))) of
+ s5519_0 =>
+ (case ((spc_matches_prefix0 s5519_0)) of
+ SOME ((() , s5520_0)) =>
+ (case ((string_drop s5519_0 s5520_0)) of
+ s5521_0 =>
+ (case ((creg_name_matches_prefix s5521_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s5522_0)) =>
+ (case ((string_drop s5521_0 s5522_0)) of
+ s5523_0 =>
+ (case ((sep_matches_prefix s5523_0)) of
+ SOME ((() , s5524_0)) =>
+ (case ((string_drop s5523_0 s5524_0)) of
+ s5525_0 =>
+ (case ((creg_name_matches_prefix s5525_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rsc, s5526_0)) =>
+ (case ((string_drop s5525_0 s5526_0)) of
+ s5527_0 =>
+ (case ((sep_matches_prefix s5527_0)) of
+ SOME ((() , s5528_0)) =>
+ (case ((string_drop s5527_0 s5528_0)) of
+ s5529_0 =>
(case ((hex_bits_7_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2944_0
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5529_0
: (( 7 words$word # ii)) option)) of
- SOME ((v__834, s2945_0)) =>
- if (((((subrange_vec_dec v__834 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ SOME ((v__1498, s5530_0)) =>
+ if (((((subrange_vec_dec v__1498 (( 1 : int): ii) (( 0 : int): ii)
+ : 2 words$word)) = (0b00w : 2 words$word)))) then
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__834 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ ((subrange_vec_dec v__1498 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
let (uimm : 5 words$word) =
- ((subrange_vec_dec v__834 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
- (case ((string_drop s2944_0 s2945_0)) of
+ ((subrange_vec_dec v__1498 (( 6 : int): ii) (( 2 : int): ii) : 5 words$word)) in
+ (case ((string_drop s5529_0 s5530_0)) of
s_ => SOME (rdc, rsc, uimm, s_)
) else NONE
| _ => NONE
@@ -33043,36 +57987,36 @@ val _ = Define `
else NONE))`;
-(*val _s2919_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
+(*val _s5504_ : string -> maybe ((mword ty3 * mword ty8 * string))*)
val _ = Define `
- ((s2919_:string ->((3)words$word#(8)words$word#string)option) s2920_0=
- (let s2921_0 = s2920_0 in
- if ((string_startswith s2921_0 "c.addi4spn")) then
- (case ((string_drop s2921_0 ((string_length "c.addi4spn")))) of
- s2922_0 =>
- (case ((spc_matches_prefix0 s2922_0)) of
- SOME ((() , s2923_0)) =>
- (case ((string_drop s2922_0 s2923_0)) of
- s2924_0 =>
- (case ((creg_name_matches_prefix s2924_0 : (( 3 words$word # ii)) option)) of
- SOME ((rdc, s2925_0)) =>
- (case ((string_drop s2924_0 s2925_0)) of
- s2926_0 =>
- (case ((sep_matches_prefix s2926_0)) of
- SOME ((() , s2927_0)) =>
- (case ((string_drop s2926_0 s2927_0)) of
- s2928_0 =>
+ ((s5504_:string ->((3)words$word#(8)words$word#string)option) s5505_0=
+ (let s5506_0 = s5505_0 in
+ if ((string_startswith s5506_0 "c.addi4spn")) then
+ (case ((string_drop s5506_0 ((string_length "c.addi4spn")))) of
+ s5507_0 =>
+ (case ((spc_matches_prefix0 s5507_0)) of
+ SOME ((() , s5508_0)) =>
+ (case ((string_drop s5507_0 s5508_0)) of
+ s5509_0 =>
+ (case ((creg_name_matches_prefix s5509_0 : (( 3 words$word # ii)) option)) of
+ SOME ((rdc, s5510_0)) =>
+ (case ((string_drop s5509_0 s5510_0)) of
+ s5511_0 =>
+ (case ((sep_matches_prefix s5511_0)) of
+ SOME ((() , s5512_0)) =>
+ (case ((string_drop s5511_0 s5512_0)) of
+ s5513_0 =>
(case ((hex_bits_10_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2928_0 : (( 10 words$word # ii)) option)) of
- SOME ((v__836, s2929_0)) =>
- if (((((subrange_vec_dec v__836 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
- = (vec_of_bits [B0;B0] : 2 words$word)))) then
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5513_0 : (( 10 words$word # ii)) option)) of
+ SOME ((v__1500, s5514_0)) =>
+ if (((((subrange_vec_dec v__1500 (( 1 : int): ii) (( 0 : int): ii) : 2 words$word))
+ = (0b00w : 2 words$word)))) then
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__836 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ ((subrange_vec_dec v__1500 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
let (nzimm : 8 words$word) =
- ((subrange_vec_dec v__836 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
- (case ((string_drop s2928_0 s2929_0)) of s_ => SOME (rdc, nzimm, s_) )
+ ((subrange_vec_dec v__1500 (( 9 : int): ii) (( 2 : int): ii) : 8 words$word)) in
+ (case ((string_drop s5513_0 s5514_0)) of s_ => SOME (rdc, nzimm, s_) )
else NONE
| _ => NONE
)
@@ -33089,69 +58033,74 @@ val _ = Define `
else NONE))`;
-(*val _s2915_ : string -> maybe string*)
+(*val _s5500_ : string -> maybe string*)
val _ = Define `
- ((s2915_:string ->(string)option) s2916_0=
- (let s2917_0 = s2916_0 in
- if ((string_startswith s2917_0 "c.nop")) then
- (case ((string_drop s2917_0 ((string_length "c.nop")))) of s_ => SOME s_ )
+ ((s5500_:string ->(string)option) s5501_0=
+ (let s5502_0 = s5501_0 in
+ if ((string_startswith s5502_0 "c.nop")) then
+ (case ((string_drop s5502_0 ((string_length "c.nop")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2891_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5474_ : string -> maybe ((amoop * word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2891_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s2892_0=
- ((case s2892_0 of
- s2893_0 =>
- (case ((amo_mnemonic_matches_prefix s2893_0)) of
- SOME ((op, s2894_0)) =>
- let s2895_0 = (string_drop s2893_0 s2894_0) in
- if ((string_startswith s2895_0 ".")) then
- (case ((string_drop s2895_0 ((string_length ".")))) of
- s2896_0 =>
- (case ((size_mnemonic_matches_prefix s2896_0)) of
- SOME ((width, s2897_0)) =>
- (case ((string_drop s2896_0 s2897_0)) of
- s2898_0 =>
- (case ((maybe_aq_matches_prefix s2898_0)) of
- SOME ((aq, s2899_0)) =>
- (case ((string_drop s2898_0 s2899_0)) of
- s2900_0 =>
- (case ((maybe_rl_matches_prefix s2900_0)) of
- SOME ((rl, s2901_0)) =>
- (case ((string_drop s2900_0 s2901_0)) of
- s2902_0 =>
- (case ((spc_matches_prefix0 s2902_0)) of
- SOME ((() , s2903_0)) =>
- (case ((string_drop s2902_0 s2903_0)) of
- s2904_0 =>
- (case ((reg_name_matches_prefix s2904_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2905_0)) =>
- (case ((string_drop s2904_0 s2905_0)) of
- s2906_0 =>
- (case ((sep_matches_prefix s2906_0)) of
- SOME ((() , s2907_0)) =>
- (case ((string_drop s2906_0 s2907_0)) of
- s2908_0 =>
- (case ((reg_name_matches_prefix s2908_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2909_0)) =>
- (case ((string_drop s2908_0 s2909_0)) of
- s2910_0 =>
- (case ((sep_matches_prefix s2910_0)) of
- SOME ((() , s2911_0)) =>
- (case ((string_drop s2910_0 s2911_0)) of
- s2912_0 =>
- (case ((reg_name_matches_prefix s2912_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2913_0)) =>
- (case ((string_drop s2912_0 s2913_0)) of
- s_ =>
- SOME (op, width, aq, rl, rd, rs1, rs2, s_)
- )
- | _ => NONE
- )
- )
+ ((s5474_:string ->(amoop#word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5475_0=
+ ((case s5475_0 of
+ s5476_0 =>
+ (case ((amo_mnemonic_matches_prefix s5476_0)) of
+ SOME ((op, s5477_0)) =>
+ let s5478_0 = (string_drop s5476_0 s5477_0) in
+ if ((string_startswith s5478_0 ".")) then
+ (case ((string_drop s5478_0 ((string_length ".")))) of
+ s5479_0 =>
+ (case ((size_mnemonic_matches_prefix s5479_0)) of
+ SOME ((width, s5480_0)) =>
+ (case ((string_drop s5479_0 s5480_0)) of
+ s5481_0 =>
+ (case ((maybe_aq_matches_prefix s5481_0)) of
+ SOME ((aq, s5482_0)) =>
+ (case ((string_drop s5481_0 s5482_0)) of
+ s5483_0 =>
+ (case ((maybe_rl_matches_prefix s5483_0)) of
+ SOME ((rl, s5484_0)) =>
+ (case ((string_drop s5483_0 s5484_0)) of
+ s5485_0 =>
+ (case ((spc_matches_prefix0 s5485_0)) of
+ SOME ((() , s5486_0)) =>
+ (case ((string_drop s5485_0 s5486_0)) of
+ s5487_0 =>
+ (case ((reg_name_matches_prefix s5487_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5488_0)) =>
+ (case ((string_drop s5487_0 s5488_0)) of
+ s5489_0 =>
+ (case ((sep_matches_prefix s5489_0)) of
+ SOME ((() , s5490_0)) =>
+ (case ((string_drop s5489_0 s5490_0)) of
+ s5491_0 =>
+ (case ((reg_name_matches_prefix s5491_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5492_0)) =>
+ (case ((string_drop s5491_0 s5492_0)) of
+ s5493_0 =>
+ (case ((sep_matches_prefix s5493_0)) of
+ SOME ((() , s5494_0)) =>
+ let s5495_0 = (string_drop s5493_0 s5494_0) in
+ if ((string_startswith s5495_0 "(")) then
+ (case ((string_drop s5495_0 ((string_length "(")))) of
+ s5496_0 =>
+ (case ((reg_name_matches_prefix s5496_0
+ : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5497_0)) =>
+ let s5498_0 = (string_drop s5496_0 s5497_0) in
+ if ((string_startswith s5498_0 ")")) then
+ (case ((string_drop s5498_0 ((string_length ")")))) of
+ s_ =>
+ SOME (op, width, aq, rl, rd, rs2, rs1, s_)
+ ) else NONE
+ | _ => NONE
+ )
+ ) else NONE
| _ => NONE
)
)
@@ -33181,49 +58130,49 @@ val _ = Define `
)))`;
-(*val _s2869_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2869_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s2870_0=
- (let s2871_0 = s2870_0 in
- if ((string_startswith s2871_0 "sc.")) then
- (case ((string_drop s2871_0 ((string_length "sc.")))) of
- s2872_0 =>
- (case ((size_mnemonic_matches_prefix s2872_0)) of
- SOME ((size1, s2873_0)) =>
- (case ((string_drop s2872_0 s2873_0)) of
- s2874_0 =>
- (case ((maybe_aq_matches_prefix s2874_0)) of
- SOME ((aq, s2875_0)) =>
- (case ((string_drop s2874_0 s2875_0)) of
- s2876_0 =>
- (case ((maybe_rl_matches_prefix s2876_0)) of
- SOME ((rl, s2877_0)) =>
- (case ((string_drop s2876_0 s2877_0)) of
- s2878_0 =>
- (case ((spc_matches_prefix0 s2878_0)) of
- SOME ((() , s2879_0)) =>
- (case ((string_drop s2878_0 s2879_0)) of
- s2880_0 =>
- (case ((reg_name_matches_prefix s2880_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2881_0)) =>
- (case ((string_drop s2880_0 s2881_0)) of
- s2882_0 =>
- (case ((sep_matches_prefix s2882_0)) of
- SOME ((() , s2883_0)) =>
- (case ((string_drop s2882_0 s2883_0)) of
- s2884_0 =>
- (case ((reg_name_matches_prefix s2884_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2885_0)) =>
- (case ((string_drop s2884_0 s2885_0)) of
- s2886_0 =>
- (case ((sep_matches_prefix s2886_0)) of
- SOME ((() , s2887_0)) =>
- (case ((string_drop s2886_0 s2887_0)) of
- s2888_0 =>
- (case ((reg_name_matches_prefix s2888_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2889_0)) =>
- (case ((string_drop s2888_0 s2889_0)) of
+(*val _s5452_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5452_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#(5)words$word#string)option) s5453_0=
+ (let s5454_0 = s5453_0 in
+ if ((string_startswith s5454_0 "sc.")) then
+ (case ((string_drop s5454_0 ((string_length "sc.")))) of
+ s5455_0 =>
+ (case ((size_mnemonic_matches_prefix s5455_0)) of
+ SOME ((size1, s5456_0)) =>
+ (case ((string_drop s5455_0 s5456_0)) of
+ s5457_0 =>
+ (case ((maybe_aq_matches_prefix s5457_0)) of
+ SOME ((aq, s5458_0)) =>
+ (case ((string_drop s5457_0 s5458_0)) of
+ s5459_0 =>
+ (case ((maybe_rl_matches_prefix s5459_0)) of
+ SOME ((rl, s5460_0)) =>
+ (case ((string_drop s5459_0 s5460_0)) of
+ s5461_0 =>
+ (case ((spc_matches_prefix0 s5461_0)) of
+ SOME ((() , s5462_0)) =>
+ (case ((string_drop s5461_0 s5462_0)) of
+ s5463_0 =>
+ (case ((reg_name_matches_prefix s5463_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5464_0)) =>
+ (case ((string_drop s5463_0 s5464_0)) of
+ s5465_0 =>
+ (case ((sep_matches_prefix s5465_0)) of
+ SOME ((() , s5466_0)) =>
+ (case ((string_drop s5465_0 s5466_0)) of
+ s5467_0 =>
+ (case ((reg_name_matches_prefix s5467_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5468_0)) =>
+ (case ((string_drop s5467_0 s5468_0)) of
+ s5469_0 =>
+ (case ((sep_matches_prefix s5469_0)) of
+ SOME ((() , s5470_0)) =>
+ (case ((string_drop s5469_0 s5470_0)) of
+ s5471_0 =>
+ (case ((reg_name_matches_prefix s5471_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5472_0)) =>
+ (case ((string_drop s5471_0 s5472_0)) of
s_ =>
SOME (size1, aq, rl, rd, rs1, rs2, s_)
)
@@ -33257,41 +58206,41 @@ val _ = Define `
else NONE))`;
-(*val _s2851_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * string))*)
+(*val _s5434_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2851_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#string)option) s2852_0=
- (let s2853_0 = s2852_0 in
- if ((string_startswith s2853_0 "lr.")) then
- (case ((string_drop s2853_0 ((string_length "lr.")))) of
- s2854_0 =>
- (case ((size_mnemonic_matches_prefix s2854_0)) of
- SOME ((size1, s2855_0)) =>
- (case ((string_drop s2854_0 s2855_0)) of
- s2856_0 =>
- (case ((maybe_aq_matches_prefix s2856_0)) of
- SOME ((aq, s2857_0)) =>
- (case ((string_drop s2856_0 s2857_0)) of
- s2858_0 =>
- (case ((maybe_rl_matches_prefix s2858_0)) of
- SOME ((rl, s2859_0)) =>
- (case ((string_drop s2858_0 s2859_0)) of
- s2860_0 =>
- (case ((spc_matches_prefix0 s2860_0)) of
- SOME ((() , s2861_0)) =>
- (case ((string_drop s2860_0 s2861_0)) of
- s2862_0 =>
- (case ((reg_name_matches_prefix s2862_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2863_0)) =>
- (case ((string_drop s2862_0 s2863_0)) of
- s2864_0 =>
- (case ((sep_matches_prefix s2864_0)) of
- SOME ((() , s2865_0)) =>
- (case ((string_drop s2864_0 s2865_0)) of
- s2866_0 =>
- (case ((reg_name_matches_prefix s2866_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2867_0)) =>
- (case ((string_drop s2866_0 s2867_0)) of
+ ((s5434_:string ->(word_width#bool#bool#(5)words$word#(5)words$word#string)option) s5435_0=
+ (let s5436_0 = s5435_0 in
+ if ((string_startswith s5436_0 "lr.")) then
+ (case ((string_drop s5436_0 ((string_length "lr.")))) of
+ s5437_0 =>
+ (case ((size_mnemonic_matches_prefix s5437_0)) of
+ SOME ((size1, s5438_0)) =>
+ (case ((string_drop s5437_0 s5438_0)) of
+ s5439_0 =>
+ (case ((maybe_aq_matches_prefix s5439_0)) of
+ SOME ((aq, s5440_0)) =>
+ (case ((string_drop s5439_0 s5440_0)) of
+ s5441_0 =>
+ (case ((maybe_rl_matches_prefix s5441_0)) of
+ SOME ((rl, s5442_0)) =>
+ (case ((string_drop s5441_0 s5442_0)) of
+ s5443_0 =>
+ (case ((spc_matches_prefix0 s5443_0)) of
+ SOME ((() , s5444_0)) =>
+ (case ((string_drop s5443_0 s5444_0)) of
+ s5445_0 =>
+ (case ((reg_name_matches_prefix s5445_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5446_0)) =>
+ (case ((string_drop s5445_0 s5446_0)) of
+ s5447_0 =>
+ (case ((sep_matches_prefix s5447_0)) of
+ SOME ((() , s5448_0)) =>
+ (case ((string_drop s5447_0 s5448_0)) of
+ s5449_0 =>
+ (case ((reg_name_matches_prefix s5449_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5450_0)) =>
+ (case ((string_drop s5449_0 s5450_0)) of
s_ => SOME (size1, aq, rl, rd, rs1, s_)
)
| _ => NONE
@@ -33318,29 +58267,29 @@ val _ = Define `
else NONE))`;
-(*val _s2839_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
+(*val _s5422_ : string -> maybe ((mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2839_:string ->((5)words$word#(5)words$word#string)option) s2840_0=
- (let s2841_0 = s2840_0 in
- if ((string_startswith s2841_0 "sfence.vma")) then
- (case ((string_drop s2841_0 ((string_length "sfence.vma")))) of
- s2842_0 =>
- (case ((spc_matches_prefix0 s2842_0)) of
- SOME ((() , s2843_0)) =>
- (case ((string_drop s2842_0 s2843_0)) of
- s2844_0 =>
- (case ((reg_name_matches_prefix s2844_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2845_0)) =>
- (case ((string_drop s2844_0 s2845_0)) of
- s2846_0 =>
- (case ((sep_matches_prefix s2846_0)) of
- SOME ((() , s2847_0)) =>
- (case ((string_drop s2846_0 s2847_0)) of
- s2848_0 =>
- (case ((reg_name_matches_prefix s2848_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2849_0)) =>
- (case ((string_drop s2848_0 s2849_0)) of s_ => SOME (rs1, rs2, s_) )
+ ((s5422_:string ->((5)words$word#(5)words$word#string)option) s5423_0=
+ (let s5424_0 = s5423_0 in
+ if ((string_startswith s5424_0 "sfence.vma")) then
+ (case ((string_drop s5424_0 ((string_length "sfence.vma")))) of
+ s5425_0 =>
+ (case ((spc_matches_prefix0 s5425_0)) of
+ SOME ((() , s5426_0)) =>
+ (case ((string_drop s5425_0 s5426_0)) of
+ s5427_0 =>
+ (case ((reg_name_matches_prefix s5427_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5428_0)) =>
+ (case ((string_drop s5427_0 s5428_0)) of
+ s5429_0 =>
+ (case ((sep_matches_prefix s5429_0)) of
+ SOME ((() , s5430_0)) =>
+ (case ((string_drop s5429_0 s5430_0)) of
+ s5431_0 =>
+ (case ((reg_name_matches_prefix s5431_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5432_0)) =>
+ (case ((string_drop s5431_0 s5432_0)) of s_ => SOME (rs1, rs2, s_) )
| _ => NONE
)
)
@@ -33356,93 +58305,93 @@ val _ = Define `
else NONE))`;
-(*val _s2835_ : string -> maybe string*)
+(*val _s5418_ : string -> maybe string*)
val _ = Define `
- ((s2835_:string ->(string)option) s2836_0=
- (let s2837_0 = s2836_0 in
- if ((string_startswith s2837_0 "wfi")) then
- (case ((string_drop s2837_0 ((string_length "wfi")))) of s_ => SOME s_ )
+ ((s5418_:string ->(string)option) s5419_0=
+ (let s5420_0 = s5419_0 in
+ if ((string_startswith s5420_0 "wfi")) then
+ (case ((string_drop s5420_0 ((string_length "wfi")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2831_ : string -> maybe string*)
+(*val _s5414_ : string -> maybe string*)
val _ = Define `
- ((s2831_:string ->(string)option) s2832_0=
- (let s2833_0 = s2832_0 in
- if ((string_startswith s2833_0 "ebreak")) then
- (case ((string_drop s2833_0 ((string_length "ebreak")))) of
+ ((s5414_:string ->(string)option) s5415_0=
+ (let s5416_0 = s5415_0 in
+ if ((string_startswith s5416_0 "ebreak")) then
+ (case ((string_drop s5416_0 ((string_length "ebreak")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s2827_ : string -> maybe string*)
+(*val _s5410_ : string -> maybe string*)
val _ = Define `
- ((s2827_:string ->(string)option) s2828_0=
- (let s2829_0 = s2828_0 in
- if ((string_startswith s2829_0 "sret")) then
- (case ((string_drop s2829_0 ((string_length "sret")))) of s_ => SOME s_ )
+ ((s5410_:string ->(string)option) s5411_0=
+ (let s5412_0 = s5411_0 in
+ if ((string_startswith s5412_0 "sret")) then
+ (case ((string_drop s5412_0 ((string_length "sret")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2823_ : string -> maybe string*)
+(*val _s5406_ : string -> maybe string*)
val _ = Define `
- ((s2823_:string ->(string)option) s2824_0=
- (let s2825_0 = s2824_0 in
- if ((string_startswith s2825_0 "mret")) then
- (case ((string_drop s2825_0 ((string_length "mret")))) of s_ => SOME s_ )
+ ((s5406_:string ->(string)option) s5407_0=
+ (let s5408_0 = s5407_0 in
+ if ((string_startswith s5408_0 "mret")) then
+ (case ((string_drop s5408_0 ((string_length "mret")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2819_ : string -> maybe string*)
+(*val _s5402_ : string -> maybe string*)
val _ = Define `
- ((s2819_:string ->(string)option) s2820_0=
- (let s2821_0 = s2820_0 in
- if ((string_startswith s2821_0 "ecall")) then
- (case ((string_drop s2821_0 ((string_length "ecall")))) of s_ => SOME s_ )
+ ((s5402_:string ->(string)option) s5403_0=
+ (let s5404_0 = s5403_0 in
+ if ((string_startswith s5404_0 "ecall")) then
+ (case ((string_drop s5404_0 ((string_length "ecall")))) of s_ => SOME s_ )
else NONE))`;
-(*val _s2815_ : string -> maybe string*)
+(*val _s5398_ : string -> maybe string*)
val _ = Define `
- ((s2815_:string ->(string)option) s2816_0=
- (let s2817_0 = s2816_0 in
- if ((string_startswith s2817_0 "fence.i")) then
- (case ((string_drop s2817_0 ((string_length "fence.i")))) of
+ ((s5398_:string ->(string)option) s5399_0=
+ (let s5400_0 = s5399_0 in
+ if ((string_startswith s5400_0 "fence.i")) then
+ (case ((string_drop s5400_0 ((string_length "fence.i")))) of
s_ => SOME s_
)
else NONE))`;
-(*val _s2803_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
+(*val _s5386_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
val _ = Define `
- ((s2803_:string ->((4)words$word#(4)words$word#string)option) s2804_0=
- (let s2805_0 = s2804_0 in
- if ((string_startswith s2805_0 "fence.tso")) then
- (case ((string_drop s2805_0 ((string_length "fence.tso")))) of
- s2806_0 =>
- (case ((spc_matches_prefix0 s2806_0)) of
- SOME ((() , s2807_0)) =>
- (case ((string_drop s2806_0 s2807_0)) of
- s2808_0 =>
- (case ((fence_bits_matches_prefix s2808_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s2809_0)) =>
- (case ((string_drop s2808_0 s2809_0)) of
- s2810_0 =>
- (case ((sep_matches_prefix s2810_0)) of
- SOME ((() , s2811_0)) =>
- (case ((string_drop s2810_0 s2811_0)) of
- s2812_0 =>
- (case ((fence_bits_matches_prefix s2812_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s2813_0)) =>
- (case ((string_drop s2812_0 s2813_0)) of s_ => SOME (pred, succ, s_) )
+ ((s5386_:string ->((4)words$word#(4)words$word#string)option) s5387_0=
+ (let s5388_0 = s5387_0 in
+ if ((string_startswith s5388_0 "fence.tso")) then
+ (case ((string_drop s5388_0 ((string_length "fence.tso")))) of
+ s5389_0 =>
+ (case ((spc_matches_prefix0 s5389_0)) of
+ SOME ((() , s5390_0)) =>
+ (case ((string_drop s5389_0 s5390_0)) of
+ s5391_0 =>
+ (case ((fence_bits_matches_prefix s5391_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s5392_0)) =>
+ (case ((string_drop s5391_0 s5392_0)) of
+ s5393_0 =>
+ (case ((sep_matches_prefix s5393_0)) of
+ SOME ((() , s5394_0)) =>
+ (case ((string_drop s5393_0 s5394_0)) of
+ s5395_0 =>
+ (case ((fence_bits_matches_prefix s5395_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s5396_0)) =>
+ (case ((string_drop s5395_0 s5396_0)) of s_ => SOME (pred, succ, s_) )
| _ => NONE
)
)
@@ -33458,29 +58407,29 @@ val _ = Define `
else NONE))`;
-(*val _s2791_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
+(*val _s5374_ : string -> maybe ((mword ty4 * mword ty4 * string))*)
val _ = Define `
- ((s2791_:string ->((4)words$word#(4)words$word#string)option) s2792_0=
- (let s2793_0 = s2792_0 in
- if ((string_startswith s2793_0 "fence")) then
- (case ((string_drop s2793_0 ((string_length "fence")))) of
- s2794_0 =>
- (case ((spc_matches_prefix0 s2794_0)) of
- SOME ((() , s2795_0)) =>
- (case ((string_drop s2794_0 s2795_0)) of
- s2796_0 =>
- (case ((fence_bits_matches_prefix s2796_0 : (( 4 words$word # ii)) option)) of
- SOME ((pred, s2797_0)) =>
- (case ((string_drop s2796_0 s2797_0)) of
- s2798_0 =>
- (case ((sep_matches_prefix s2798_0)) of
- SOME ((() , s2799_0)) =>
- (case ((string_drop s2798_0 s2799_0)) of
- s2800_0 =>
- (case ((fence_bits_matches_prefix s2800_0 : (( 4 words$word # ii)) option)) of
- SOME ((succ, s2801_0)) =>
- (case ((string_drop s2800_0 s2801_0)) of s_ => SOME (pred, succ, s_) )
+ ((s5374_:string ->((4)words$word#(4)words$word#string)option) s5375_0=
+ (let s5376_0 = s5375_0 in
+ if ((string_startswith s5376_0 "fence")) then
+ (case ((string_drop s5376_0 ((string_length "fence")))) of
+ s5377_0 =>
+ (case ((spc_matches_prefix0 s5377_0)) of
+ SOME ((() , s5378_0)) =>
+ (case ((string_drop s5377_0 s5378_0)) of
+ s5379_0 =>
+ (case ((fence_bits_matches_prefix s5379_0 : (( 4 words$word # ii)) option)) of
+ SOME ((pred, s5380_0)) =>
+ (case ((string_drop s5379_0 s5380_0)) of
+ s5381_0 =>
+ (case ((sep_matches_prefix s5381_0)) of
+ SOME ((() , s5382_0)) =>
+ (case ((string_drop s5381_0 s5382_0)) of
+ s5383_0 =>
+ (case ((fence_bits_matches_prefix s5383_0 : (( 4 words$word # ii)) option)) of
+ SOME ((succ, s5384_0)) =>
+ (case ((string_drop s5383_0 s5384_0)) of s_ => SOME (pred, succ, s_) )
| _ => NONE
)
)
@@ -33496,41 +58445,41 @@ val _ = Define `
else NONE))`;
-(*val _s2774_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5357_ : string -> maybe ((sopw * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2774_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word#string)option) s2775_0=
- ((case s2775_0 of
- s2776_0 =>
- (case ((shiftiwop_mnemonic_matches_prefix s2776_0)) of
- SOME ((op, s2777_0)) =>
- (case ((string_drop s2776_0 s2777_0)) of
- s2778_0 =>
- (case ((spc_matches_prefix0 s2778_0)) of
- SOME ((() , s2779_0)) =>
- (case ((string_drop s2778_0 s2779_0)) of
- s2780_0 =>
- (case ((reg_name_matches_prefix s2780_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2781_0)) =>
- (case ((string_drop s2780_0 s2781_0)) of
- s2782_0 =>
- (case ((sep_matches_prefix s2782_0)) of
- SOME ((() , s2783_0)) =>
- (case ((string_drop s2782_0 s2783_0)) of
- s2784_0 =>
- (case ((reg_name_matches_prefix s2784_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2785_0)) =>
- (case ((string_drop s2784_0 s2785_0)) of
- s2786_0 =>
- (case ((sep_matches_prefix s2786_0)) of
- SOME ((() , s2787_0)) =>
- (case ((string_drop s2786_0 s2787_0)) of
- s2788_0 =>
+ ((s5357_:string ->(sopw#(5)words$word#(5)words$word#(5)words$word#string)option) s5358_0=
+ ((case s5358_0 of
+ s5359_0 =>
+ (case ((shiftiwop_mnemonic_matches_prefix s5359_0)) of
+ SOME ((op, s5360_0)) =>
+ (case ((string_drop s5359_0 s5360_0)) of
+ s5361_0 =>
+ (case ((spc_matches_prefix0 s5361_0)) of
+ SOME ((() , s5362_0)) =>
+ (case ((string_drop s5361_0 s5362_0)) of
+ s5363_0 =>
+ (case ((reg_name_matches_prefix s5363_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5364_0)) =>
+ (case ((string_drop s5363_0 s5364_0)) of
+ s5365_0 =>
+ (case ((sep_matches_prefix s5365_0)) of
+ SOME ((() , s5366_0)) =>
+ (case ((string_drop s5365_0 s5366_0)) of
+ s5367_0 =>
+ (case ((reg_name_matches_prefix s5367_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5368_0)) =>
+ (case ((string_drop s5367_0 s5368_0)) of
+ s5369_0 =>
+ (case ((sep_matches_prefix s5369_0)) of
+ SOME ((() , s5370_0)) =>
+ (case ((string_drop s5369_0 s5370_0)) of
+ s5371_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2788_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s2789_0)) =>
- (case ((string_drop s2788_0 s2789_0)) of
+ s5371_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s5372_0)) =>
+ (case ((string_drop s5371_0 s5372_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -33556,39 +58505,39 @@ val _ = Define `
)))`;
-(*val _s2757_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2757_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word#string)option) s2758_0=
- ((case s2758_0 of
- s2759_0 =>
- (case ((rtypew_mnemonic_matches_prefix s2759_0)) of
- SOME ((op, s2760_0)) =>
- (case ((string_drop s2759_0 s2760_0)) of
- s2761_0 =>
- (case ((spc_matches_prefix0 s2761_0)) of
- SOME ((() , s2762_0)) =>
- (case ((string_drop s2761_0 s2762_0)) of
- s2763_0 =>
- (case ((reg_name_matches_prefix s2763_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2764_0)) =>
- (case ((string_drop s2763_0 s2764_0)) of
- s2765_0 =>
- (case ((sep_matches_prefix s2765_0)) of
- SOME ((() , s2766_0)) =>
- (case ((string_drop s2765_0 s2766_0)) of
- s2767_0 =>
- (case ((reg_name_matches_prefix s2767_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2768_0)) =>
- (case ((string_drop s2767_0 s2768_0)) of
- s2769_0 =>
- (case ((sep_matches_prefix s2769_0)) of
- SOME ((() , s2770_0)) =>
- (case ((string_drop s2769_0 s2770_0)) of
- s2771_0 =>
- (case ((reg_name_matches_prefix s2771_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2772_0)) =>
- (case ((string_drop s2771_0 s2772_0)) of
+(*val _s5340_ : string -> maybe ((ropw * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5340_:string ->(ropw#(5)words$word#(5)words$word#(5)words$word#string)option) s5341_0=
+ ((case s5341_0 of
+ s5342_0 =>
+ (case ((rtypew_mnemonic_matches_prefix s5342_0)) of
+ SOME ((op, s5343_0)) =>
+ (case ((string_drop s5342_0 s5343_0)) of
+ s5344_0 =>
+ (case ((spc_matches_prefix0 s5344_0)) of
+ SOME ((() , s5345_0)) =>
+ (case ((string_drop s5344_0 s5345_0)) of
+ s5346_0 =>
+ (case ((reg_name_matches_prefix s5346_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5347_0)) =>
+ (case ((string_drop s5346_0 s5347_0)) of
+ s5348_0 =>
+ (case ((sep_matches_prefix s5348_0)) of
+ SOME ((() , s5349_0)) =>
+ (case ((string_drop s5348_0 s5349_0)) of
+ s5350_0 =>
+ (case ((reg_name_matches_prefix s5350_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5351_0)) =>
+ (case ((string_drop s5350_0 s5351_0)) of
+ s5352_0 =>
+ (case ((sep_matches_prefix s5352_0)) of
+ SOME ((() , s5353_0)) =>
+ (case ((string_drop s5352_0 s5353_0)) of
+ s5354_0 =>
+ (case ((reg_name_matches_prefix s5354_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5355_0)) =>
+ (case ((string_drop s5354_0 s5355_0)) of
s_ => SOME (op, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -33614,41 +58563,41 @@ val _ = Define `
)))`;
-(*val _s2740_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5 * string))*)
-
-val _ = Define `
- ((s2740_:string ->(sop#(5)words$word#(5)words$word#(5)words$word#string)option) s2741_0=
- ((case s2741_0 of
- s2742_0 =>
- (case ((shiftw_mnemonic_matches_prefix s2742_0)) of
- SOME ((op, s2743_0)) =>
- (case ((string_drop s2742_0 s2743_0)) of
- s2744_0 =>
- (case ((spc_matches_prefix0 s2744_0)) of
- SOME ((() , s2745_0)) =>
- (case ((string_drop s2744_0 s2745_0)) of
- s2746_0 =>
- (case ((reg_name_matches_prefix s2746_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2747_0)) =>
- (case ((string_drop s2746_0 s2747_0)) of
- s2748_0 =>
- (case ((sep_matches_prefix s2748_0)) of
- SOME ((() , s2749_0)) =>
- (case ((string_drop s2748_0 s2749_0)) of
- s2750_0 =>
- (case ((reg_name_matches_prefix s2750_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2751_0)) =>
- (case ((string_drop s2750_0 s2751_0)) of
- s2752_0 =>
- (case ((sep_matches_prefix s2752_0)) of
- SOME ((() , s2753_0)) =>
- (case ((string_drop s2752_0 s2753_0)) of
- s2754_0 =>
+(*val _s5323_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty5 * string))*)
+
+val _ = Define `
+ ((s5323_:string ->(sop#(5)words$word#(5)words$word#(5)words$word#string)option) s5324_0=
+ ((case s5324_0 of
+ s5325_0 =>
+ (case ((shiftw_mnemonic_matches_prefix s5325_0)) of
+ SOME ((op, s5326_0)) =>
+ (case ((string_drop s5325_0 s5326_0)) of
+ s5327_0 =>
+ (case ((spc_matches_prefix0 s5327_0)) of
+ SOME ((() , s5328_0)) =>
+ (case ((string_drop s5327_0 s5328_0)) of
+ s5329_0 =>
+ (case ((reg_name_matches_prefix s5329_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5330_0)) =>
+ (case ((string_drop s5329_0 s5330_0)) of
+ s5331_0 =>
+ (case ((sep_matches_prefix s5331_0)) of
+ SOME ((() , s5332_0)) =>
+ (case ((string_drop s5331_0 s5332_0)) of
+ s5333_0 =>
+ (case ((reg_name_matches_prefix s5333_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5334_0)) =>
+ (case ((string_drop s5333_0 s5334_0)) of
+ s5335_0 =>
+ (case ((sep_matches_prefix s5335_0)) of
+ SOME ((() , s5336_0)) =>
+ (case ((string_drop s5335_0 s5336_0)) of
+ s5337_0 =>
(case ((hex_bits_5_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2754_0 : (( 5 words$word # ii)) option)) of
- SOME ((shamt, s2755_0)) =>
- (case ((string_drop s2754_0 s2755_0)) of
+ s5337_0 : (( 5 words$word # ii)) option)) of
+ SOME ((shamt, s5338_0)) =>
+ (case ((string_drop s5337_0 s5338_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -33674,39 +58623,38 @@ val _ = Define `
)))`;
-(*val _s2724_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2724_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s2725_0=
- (let s2726_0 = s2725_0 in
- if ((string_startswith s2726_0 "addiw")) then
- (case ((string_drop s2726_0 ((string_length "addiw")))) of
- s2727_0 =>
- (case ((spc_matches_prefix0 s2727_0)) of
- SOME ((() , s2728_0)) =>
- (case ((string_drop s2727_0 s2728_0)) of
- s2729_0 =>
- (case ((reg_name_matches_prefix s2729_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2730_0)) =>
- (case ((string_drop s2729_0 s2730_0)) of
- s2731_0 =>
- (case ((sep_matches_prefix s2731_0)) of
- SOME ((() , s2732_0)) =>
- (case ((string_drop s2731_0 s2732_0)) of
- s2733_0 =>
- (case ((reg_name_matches_prefix s2733_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2734_0)) =>
- (case ((string_drop s2733_0 s2734_0)) of
- s2735_0 =>
- (case ((sep_matches_prefix s2735_0)) of
- SOME ((() , s2736_0)) =>
- (case ((string_drop s2735_0 s2736_0)) of
- s2737_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2737_0
+(*val _s5307_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s5307_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s5308_0=
+ (let s5309_0 = s5308_0 in
+ if ((string_startswith s5309_0 "addiw")) then
+ (case ((string_drop s5309_0 ((string_length "addiw")))) of
+ s5310_0 =>
+ (case ((spc_matches_prefix0 s5310_0)) of
+ SOME ((() , s5311_0)) =>
+ (case ((string_drop s5310_0 s5311_0)) of
+ s5312_0 =>
+ (case ((reg_name_matches_prefix s5312_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5313_0)) =>
+ (case ((string_drop s5312_0 s5313_0)) of
+ s5314_0 =>
+ (case ((sep_matches_prefix s5314_0)) of
+ SOME ((() , s5315_0)) =>
+ (case ((string_drop s5314_0 s5315_0)) of
+ s5316_0 =>
+ (case ((reg_name_matches_prefix s5316_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5317_0)) =>
+ (case ((string_drop s5316_0 s5317_0)) of
+ s5318_0 =>
+ (case ((sep_matches_prefix s5318_0)) of
+ SOME ((() , s5319_0)) =>
+ (case ((string_drop s5318_0 s5319_0)) of
+ s5320_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5320_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2738_0)) =>
- (case ((string_drop s2737_0 s2738_0)) of s_ => SOME (rd, rs1, imm, s_) )
+ SOME ((imm, s5321_0)) =>
+ (case ((string_drop s5320_0 s5321_0)) of s_ => SOME (rd, rs1, imm, s_) )
| _ => NONE
)
)
@@ -33728,63 +58676,62 @@ val _ = Define `
else NONE))`;
-(*val _s2696_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
+(*val _s5279_ : string -> maybe ((word_width * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
val _ = Define `
- ((s2696_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s2697_0=
- (let s2698_0 = s2697_0 in
- if ((string_startswith s2698_0 "s")) then
- (case ((string_drop s2698_0 ((string_length "s")))) of
- s2699_0 =>
- (case ((size_mnemonic_matches_prefix s2699_0)) of
- SOME ((size1, s2700_0)) =>
- (case ((string_drop s2699_0 s2700_0)) of
- s2701_0 =>
- (case ((maybe_aq_matches_prefix s2701_0)) of
- SOME ((aq, s2702_0)) =>
- (case ((string_drop s2701_0 s2702_0)) of
- s2703_0 =>
- (case ((maybe_rl_matches_prefix s2703_0)) of
- SOME ((rl, s2704_0)) =>
- (case ((string_drop s2703_0 s2704_0)) of
- s2705_0 =>
- (case ((spc_matches_prefix0 s2705_0)) of
- SOME ((() , s2706_0)) =>
- (case ((string_drop s2705_0 s2706_0)) of
- s2707_0 =>
- (case ((reg_name_matches_prefix s2707_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2708_0)) =>
- (case ((string_drop s2707_0 s2708_0)) of
- s2709_0 =>
- (case ((sep_matches_prefix s2709_0)) of
- SOME ((() , s2710_0)) =>
- (case ((string_drop s2709_0 s2710_0)) of
- s2711_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2711_0
+ ((s5279_:string ->(word_width#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s5280_0=
+ (let s5281_0 = s5280_0 in
+ if ((string_startswith s5281_0 "s")) then
+ (case ((string_drop s5281_0 ((string_length "s")))) of
+ s5282_0 =>
+ (case ((size_mnemonic_matches_prefix s5282_0)) of
+ SOME ((size1, s5283_0)) =>
+ (case ((string_drop s5282_0 s5283_0)) of
+ s5284_0 =>
+ (case ((maybe_aq_matches_prefix s5284_0)) of
+ SOME ((aq, s5285_0)) =>
+ (case ((string_drop s5284_0 s5285_0)) of
+ s5286_0 =>
+ (case ((maybe_rl_matches_prefix s5286_0)) of
+ SOME ((rl, s5287_0)) =>
+ (case ((string_drop s5286_0 s5287_0)) of
+ s5288_0 =>
+ (case ((spc_matches_prefix0 s5288_0)) of
+ SOME ((() , s5289_0)) =>
+ (case ((string_drop s5288_0 s5289_0)) of
+ s5290_0 =>
+ (case ((reg_name_matches_prefix s5290_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5291_0)) =>
+ (case ((string_drop s5290_0 s5291_0)) of
+ s5292_0 =>
+ (case ((sep_matches_prefix s5292_0)) of
+ SOME ((() , s5293_0)) =>
+ (case ((string_drop s5292_0 s5293_0)) of
+ s5294_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5294_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2712_0)) =>
- (case ((string_drop s2711_0 s2712_0)) of
- s2713_0 =>
- (case ((opt_spc_matches_prefix0 s2713_0)) of
- SOME ((() , s2714_0)) =>
- let s2715_0 = (string_drop s2713_0 s2714_0) in
- if ((string_startswith s2715_0 "(")) then
- (case ((string_drop s2715_0 ((string_length "(")))) of
- s2716_0 =>
- (case ((opt_spc_matches_prefix0 s2716_0)) of
- SOME ((() , s2717_0)) =>
- (case ((string_drop s2716_0 s2717_0)) of
- s2718_0 =>
- (case ((reg_name_matches_prefix s2718_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2719_0)) =>
- (case ((string_drop s2718_0 s2719_0)) of
- s2720_0 =>
- (case ((opt_spc_matches_prefix0 s2720_0)) of
- SOME ((() , s2721_0)) =>
- let s2722_0 = (string_drop s2720_0 s2721_0) in
- if ((string_startswith s2722_0 ")")) then
- (case ((string_drop s2722_0 ((string_length ")")))) of
+ SOME ((imm, s5295_0)) =>
+ (case ((string_drop s5294_0 s5295_0)) of
+ s5296_0 =>
+ (case ((opt_spc_matches_prefix0 s5296_0)) of
+ SOME ((() , s5297_0)) =>
+ let s5298_0 = (string_drop s5296_0 s5297_0) in
+ if ((string_startswith s5298_0 "(")) then
+ (case ((string_drop s5298_0 ((string_length "(")))) of
+ s5299_0 =>
+ (case ((opt_spc_matches_prefix0 s5299_0)) of
+ SOME ((() , s5300_0)) =>
+ (case ((string_drop s5299_0 s5300_0)) of
+ s5301_0 =>
+ (case ((reg_name_matches_prefix s5301_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5302_0)) =>
+ (case ((string_drop s5301_0 s5302_0)) of
+ s5303_0 =>
+ (case ((opt_spc_matches_prefix0 s5303_0)) of
+ SOME ((() , s5304_0)) =>
+ let s5305_0 = (string_drop s5303_0 s5304_0) in
+ if ((string_startswith s5305_0 ")")) then
+ (case ((string_drop s5305_0 ((string_length ")")))) of
s_ =>
SOME (size1, aq, rl, rs2, imm, rs1, s_)
) else NONE
@@ -33824,67 +58771,66 @@ val _ = Define `
else NONE))`;
-(*val _s2666_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
+(*val _s5249_ : string -> maybe ((word_width * bool * bool * bool * mword ty5 * mword ty12 * mword ty5 * string))*)
val _ = Define `
- ((s2666_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s2667_0=
- (let s2668_0 = s2667_0 in
- if ((string_startswith s2668_0 "l")) then
- (case ((string_drop s2668_0 ((string_length "l")))) of
- s2669_0 =>
- (case ((size_mnemonic_matches_prefix s2669_0)) of
- SOME ((size1, s2670_0)) =>
- (case ((string_drop s2669_0 s2670_0)) of
- s2671_0 =>
- (case ((maybe_u_matches_prefix s2671_0)) of
- SOME ((is_unsigned, s2672_0)) =>
- (case ((string_drop s2671_0 s2672_0)) of
- s2673_0 =>
- (case ((maybe_aq_matches_prefix s2673_0)) of
- SOME ((aq, s2674_0)) =>
- (case ((string_drop s2673_0 s2674_0)) of
- s2675_0 =>
- (case ((maybe_rl_matches_prefix s2675_0)) of
- SOME ((rl, s2676_0)) =>
- (case ((string_drop s2675_0 s2676_0)) of
- s2677_0 =>
- (case ((spc_matches_prefix0 s2677_0)) of
- SOME ((() , s2678_0)) =>
- (case ((string_drop s2677_0 s2678_0)) of
- s2679_0 =>
- (case ((reg_name_matches_prefix s2679_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2680_0)) =>
- (case ((string_drop s2679_0 s2680_0)) of
- s2681_0 =>
- (case ((sep_matches_prefix s2681_0)) of
- SOME ((() , s2682_0)) =>
- (case ((string_drop s2681_0 s2682_0)) of
- s2683_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2683_0
+ ((s5249_:string ->(word_width#bool#bool#bool#(5)words$word#(12)words$word#(5)words$word#string)option) s5250_0=
+ (let s5251_0 = s5250_0 in
+ if ((string_startswith s5251_0 "l")) then
+ (case ((string_drop s5251_0 ((string_length "l")))) of
+ s5252_0 =>
+ (case ((size_mnemonic_matches_prefix s5252_0)) of
+ SOME ((size1, s5253_0)) =>
+ (case ((string_drop s5252_0 s5253_0)) of
+ s5254_0 =>
+ (case ((maybe_u_matches_prefix s5254_0)) of
+ SOME ((is_unsigned, s5255_0)) =>
+ (case ((string_drop s5254_0 s5255_0)) of
+ s5256_0 =>
+ (case ((maybe_aq_matches_prefix s5256_0)) of
+ SOME ((aq, s5257_0)) =>
+ (case ((string_drop s5256_0 s5257_0)) of
+ s5258_0 =>
+ (case ((maybe_rl_matches_prefix s5258_0)) of
+ SOME ((rl, s5259_0)) =>
+ (case ((string_drop s5258_0 s5259_0)) of
+ s5260_0 =>
+ (case ((spc_matches_prefix0 s5260_0)) of
+ SOME ((() , s5261_0)) =>
+ (case ((string_drop s5260_0 s5261_0)) of
+ s5262_0 =>
+ (case ((reg_name_matches_prefix s5262_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5263_0)) =>
+ (case ((string_drop s5262_0 s5263_0)) of
+ s5264_0 =>
+ (case ((sep_matches_prefix s5264_0)) of
+ SOME ((() , s5265_0)) =>
+ (case ((string_drop s5264_0 s5265_0)) of
+ s5266_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5266_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2684_0)) =>
- (case ((string_drop s2683_0 s2684_0)) of
- s2685_0 =>
- (case ((opt_spc_matches_prefix0 s2685_0)) of
- SOME ((() , s2686_0)) =>
- let s2687_0 = (string_drop s2685_0 s2686_0) in
- if ((string_startswith s2687_0 "(")) then
- (case ((string_drop s2687_0 ((string_length "(")))) of
- s2688_0 =>
- (case ((opt_spc_matches_prefix0 s2688_0)) of
- SOME ((() , s2689_0)) =>
- (case ((string_drop s2688_0 s2689_0)) of
- s2690_0 =>
- (case ((reg_name_matches_prefix s2690_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2691_0)) =>
- (case ((string_drop s2690_0 s2691_0)) of
- s2692_0 =>
- (case ((opt_spc_matches_prefix0 s2692_0)) of
- SOME ((() , s2693_0)) =>
- let s2694_0 = (string_drop s2692_0 s2693_0) in
- if ((string_startswith s2694_0 ")")) then
- (case ((string_drop s2694_0 ((string_length ")")))) of
+ SOME ((imm, s5267_0)) =>
+ (case ((string_drop s5266_0 s5267_0)) of
+ s5268_0 =>
+ (case ((opt_spc_matches_prefix0 s5268_0)) of
+ SOME ((() , s5269_0)) =>
+ let s5270_0 = (string_drop s5268_0 s5269_0) in
+ if ((string_startswith s5270_0 "(")) then
+ (case ((string_drop s5270_0 ((string_length "(")))) of
+ s5271_0 =>
+ (case ((opt_spc_matches_prefix0 s5271_0)) of
+ SOME ((() , s5272_0)) =>
+ (case ((string_drop s5271_0 s5272_0)) of
+ s5273_0 =>
+ (case ((reg_name_matches_prefix s5273_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5274_0)) =>
+ (case ((string_drop s5273_0 s5274_0)) of
+ s5275_0 =>
+ (case ((opt_spc_matches_prefix0 s5275_0)) of
+ SOME ((() , s5276_0)) =>
+ let s5277_0 = (string_drop s5275_0 s5276_0) in
+ if ((string_startswith s5277_0 ")")) then
+ (case ((string_drop s5277_0 ((string_length ")")))) of
s_ =>
SOME (size1, is_unsigned, aq, rl, rd, imm, rs1, s_)
) else NONE
@@ -33927,39 +58873,39 @@ val _ = Define `
else NONE))`;
-(*val _s2649_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5 * string))*)
+(*val _s5232_ : string -> maybe ((rop * mword ty5 * mword ty5 * mword ty5 * string))*)
val _ = Define `
- ((s2649_:string ->(rop#(5)words$word#(5)words$word#(5)words$word#string)option) s2650_0=
- ((case s2650_0 of
- s2651_0 =>
- (case ((rtype_mnemonic_matches_prefix s2651_0)) of
- SOME ((op, s2652_0)) =>
- (case ((string_drop s2651_0 s2652_0)) of
- s2653_0 =>
- (case ((spc_matches_prefix0 s2653_0)) of
- SOME ((() , s2654_0)) =>
- (case ((string_drop s2653_0 s2654_0)) of
- s2655_0 =>
- (case ((reg_name_matches_prefix s2655_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2656_0)) =>
- (case ((string_drop s2655_0 s2656_0)) of
- s2657_0 =>
- (case ((sep_matches_prefix s2657_0)) of
- SOME ((() , s2658_0)) =>
- (case ((string_drop s2657_0 s2658_0)) of
- s2659_0 =>
- (case ((reg_name_matches_prefix s2659_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2660_0)) =>
- (case ((string_drop s2659_0 s2660_0)) of
- s2661_0 =>
- (case ((sep_matches_prefix s2661_0)) of
- SOME ((() , s2662_0)) =>
- (case ((string_drop s2661_0 s2662_0)) of
- s2663_0 =>
- (case ((reg_name_matches_prefix s2663_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2664_0)) =>
- (case ((string_drop s2663_0 s2664_0)) of
+ ((s5232_:string ->(rop#(5)words$word#(5)words$word#(5)words$word#string)option) s5233_0=
+ ((case s5233_0 of
+ s5234_0 =>
+ (case ((rtype_mnemonic_matches_prefix s5234_0)) of
+ SOME ((op, s5235_0)) =>
+ (case ((string_drop s5234_0 s5235_0)) of
+ s5236_0 =>
+ (case ((spc_matches_prefix0 s5236_0)) of
+ SOME ((() , s5237_0)) =>
+ (case ((string_drop s5236_0 s5237_0)) of
+ s5238_0 =>
+ (case ((reg_name_matches_prefix s5238_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5239_0)) =>
+ (case ((string_drop s5238_0 s5239_0)) of
+ s5240_0 =>
+ (case ((sep_matches_prefix s5240_0)) of
+ SOME ((() , s5241_0)) =>
+ (case ((string_drop s5240_0 s5241_0)) of
+ s5242_0 =>
+ (case ((reg_name_matches_prefix s5242_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5243_0)) =>
+ (case ((string_drop s5242_0 s5243_0)) of
+ s5244_0 =>
+ (case ((sep_matches_prefix s5244_0)) of
+ SOME ((() , s5245_0)) =>
+ (case ((string_drop s5244_0 s5245_0)) of
+ s5246_0 =>
+ (case ((reg_name_matches_prefix s5246_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5247_0)) =>
+ (case ((string_drop s5246_0 s5247_0)) of
s_ => SOME (op, rd, rs1, rs2, s_)
)
| _ => NONE
@@ -33985,41 +58931,41 @@ val _ = Define `
)))`;
-(*val _s2632_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6 * string))*)
-
-val _ = Define `
- ((s2632_:string ->(sop#(5)words$word#(5)words$word#(6)words$word#string)option) s2633_0=
- ((case s2633_0 of
- s2634_0 =>
- (case ((shiftiop_mnemonic_matches_prefix s2634_0)) of
- SOME ((op, s2635_0)) =>
- (case ((string_drop s2634_0 s2635_0)) of
- s2636_0 =>
- (case ((spc_matches_prefix0 s2636_0)) of
- SOME ((() , s2637_0)) =>
- (case ((string_drop s2636_0 s2637_0)) of
- s2638_0 =>
- (case ((reg_name_matches_prefix s2638_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2639_0)) =>
- (case ((string_drop s2638_0 s2639_0)) of
- s2640_0 =>
- (case ((sep_matches_prefix s2640_0)) of
- SOME ((() , s2641_0)) =>
- (case ((string_drop s2640_0 s2641_0)) of
- s2642_0 =>
- (case ((reg_name_matches_prefix s2642_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2643_0)) =>
- (case ((string_drop s2642_0 s2643_0)) of
- s2644_0 =>
- (case ((sep_matches_prefix s2644_0)) of
- SOME ((() , s2645_0)) =>
- (case ((string_drop s2644_0 s2645_0)) of
- s2646_0 =>
+(*val _s5215_ : string -> maybe ((sop * mword ty5 * mword ty5 * mword ty6 * string))*)
+
+val _ = Define `
+ ((s5215_:string ->(sop#(5)words$word#(5)words$word#(6)words$word#string)option) s5216_0=
+ ((case s5216_0 of
+ s5217_0 =>
+ (case ((shiftiop_mnemonic_matches_prefix s5217_0)) of
+ SOME ((op, s5218_0)) =>
+ (case ((string_drop s5217_0 s5218_0)) of
+ s5219_0 =>
+ (case ((spc_matches_prefix0 s5219_0)) of
+ SOME ((() , s5220_0)) =>
+ (case ((string_drop s5219_0 s5220_0)) of
+ s5221_0 =>
+ (case ((reg_name_matches_prefix s5221_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5222_0)) =>
+ (case ((string_drop s5221_0 s5222_0)) of
+ s5223_0 =>
+ (case ((sep_matches_prefix s5223_0)) of
+ SOME ((() , s5224_0)) =>
+ (case ((string_drop s5223_0 s5224_0)) of
+ s5225_0 =>
+ (case ((reg_name_matches_prefix s5225_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5226_0)) =>
+ (case ((string_drop s5225_0 s5226_0)) of
+ s5227_0 =>
+ (case ((sep_matches_prefix s5227_0)) of
+ SOME ((() , s5228_0)) =>
+ (case ((string_drop s5227_0 s5228_0)) of
+ s5229_0 =>
(case ((hex_bits_6_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2646_0 : (( 6 words$word # ii)) option)) of
- SOME ((shamt, s2647_0)) =>
- (case ((string_drop s2646_0 s2647_0)) of
+ s5229_0 : (( 6 words$word # ii)) option)) of
+ SOME ((shamt, s5230_0)) =>
+ (case ((string_drop s5229_0 s5230_0)) of
s_ => SOME (op, rd, rs1, shamt, s_)
)
| _ => NONE
@@ -34045,41 +58991,40 @@ val _ = Define `
)))`;
-(*val _s2615_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2615_:string ->(iop#(5)words$word#(5)words$word#(12)words$word#string)option) s2616_0=
- ((case s2616_0 of
- s2617_0 =>
- (case ((itype_mnemonic_matches_prefix s2617_0)) of
- SOME ((op, s2618_0)) =>
- (case ((string_drop s2617_0 s2618_0)) of
- s2619_0 =>
- (case ((spc_matches_prefix0 s2619_0)) of
- SOME ((() , s2620_0)) =>
- (case ((string_drop s2619_0 s2620_0)) of
- s2621_0 =>
- (case ((reg_name_matches_prefix s2621_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2622_0)) =>
- (case ((string_drop s2621_0 s2622_0)) of
- s2623_0 =>
- (case ((sep_matches_prefix s2623_0)) of
- SOME ((() , s2624_0)) =>
- (case ((string_drop s2623_0 s2624_0)) of
- s2625_0 =>
- (case ((reg_name_matches_prefix s2625_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2626_0)) =>
- (case ((string_drop s2625_0 s2626_0)) of
- s2627_0 =>
- (case ((sep_matches_prefix s2627_0)) of
- SOME ((() , s2628_0)) =>
- (case ((string_drop s2627_0 s2628_0)) of
- s2629_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2629_0 : (( 12 words$word # ii)) option)) of
- SOME ((imm, s2630_0)) =>
- (case ((string_drop s2629_0 s2630_0)) of
+(*val _s5198_ : string -> maybe ((iop * mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s5198_:string ->(iop#(5)words$word#(5)words$word#(12)words$word#string)option) s5199_0=
+ ((case s5199_0 of
+ s5200_0 =>
+ (case ((itype_mnemonic_matches_prefix s5200_0)) of
+ SOME ((op, s5201_0)) =>
+ (case ((string_drop s5200_0 s5201_0)) of
+ s5202_0 =>
+ (case ((spc_matches_prefix0 s5202_0)) of
+ SOME ((() , s5203_0)) =>
+ (case ((string_drop s5202_0 s5203_0)) of
+ s5204_0 =>
+ (case ((reg_name_matches_prefix s5204_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5205_0)) =>
+ (case ((string_drop s5204_0 s5205_0)) of
+ s5206_0 =>
+ (case ((sep_matches_prefix s5206_0)) of
+ SOME ((() , s5207_0)) =>
+ (case ((string_drop s5206_0 s5207_0)) of
+ s5208_0 =>
+ (case ((reg_name_matches_prefix s5208_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5209_0)) =>
+ (case ((string_drop s5208_0 s5209_0)) of
+ s5210_0 =>
+ (case ((sep_matches_prefix s5210_0)) of
+ SOME ((() , s5211_0)) =>
+ (case ((string_drop s5210_0 s5211_0)) of
+ s5212_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5212_0
+ : (( 12 words$word # ii)) option)) of
+ SOME ((imm, s5213_0)) =>
+ (case ((string_drop s5212_0 s5213_0)) of
s_ => SOME (op, rd, rs1, imm, s_)
)
| _ => NONE
@@ -34105,41 +59050,41 @@ val _ = Define `
)))`;
-(*val _s2598_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13 * string))*)
-
-val _ = Define `
- ((s2598_:string ->(bop#(5)words$word#(5)words$word#(13)words$word#string)option) s2599_0=
- ((case s2599_0 of
- s2600_0 =>
- (case ((btype_mnemonic_matches_prefix s2600_0)) of
- SOME ((op, s2601_0)) =>
- (case ((string_drop s2600_0 s2601_0)) of
- s2602_0 =>
- (case ((spc_matches_prefix0 s2602_0)) of
- SOME ((() , s2603_0)) =>
- (case ((string_drop s2602_0 s2603_0)) of
- s2604_0 =>
- (case ((reg_name_matches_prefix s2604_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2605_0)) =>
- (case ((string_drop s2604_0 s2605_0)) of
- s2606_0 =>
- (case ((sep_matches_prefix s2606_0)) of
- SOME ((() , s2607_0)) =>
- (case ((string_drop s2606_0 s2607_0)) of
- s2608_0 =>
- (case ((reg_name_matches_prefix s2608_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs2, s2609_0)) =>
- (case ((string_drop s2608_0 s2609_0)) of
- s2610_0 =>
- (case ((sep_matches_prefix s2610_0)) of
- SOME ((() , s2611_0)) =>
- (case ((string_drop s2610_0 s2611_0)) of
- s2612_0 =>
+(*val _s5181_ : string -> maybe ((bop * mword ty5 * mword ty5 * mword ty13 * string))*)
+
+val _ = Define `
+ ((s5181_:string ->(bop#(5)words$word#(5)words$word#(13)words$word#string)option) s5182_0=
+ ((case s5182_0 of
+ s5183_0 =>
+ (case ((btype_mnemonic_matches_prefix s5183_0)) of
+ SOME ((op, s5184_0)) =>
+ (case ((string_drop s5183_0 s5184_0)) of
+ s5185_0 =>
+ (case ((spc_matches_prefix0 s5185_0)) of
+ SOME ((() , s5186_0)) =>
+ (case ((string_drop s5185_0 s5186_0)) of
+ s5187_0 =>
+ (case ((reg_name_matches_prefix s5187_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5188_0)) =>
+ (case ((string_drop s5187_0 s5188_0)) of
+ s5189_0 =>
+ (case ((sep_matches_prefix s5189_0)) of
+ SOME ((() , s5190_0)) =>
+ (case ((string_drop s5189_0 s5190_0)) of
+ s5191_0 =>
+ (case ((reg_name_matches_prefix s5191_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs2, s5192_0)) =>
+ (case ((string_drop s5191_0 s5192_0)) of
+ s5193_0 =>
+ (case ((sep_matches_prefix s5193_0)) of
+ SOME ((() , s5194_0)) =>
+ (case ((string_drop s5193_0 s5194_0)) of
+ s5195_0 =>
(case ((hex_bits_13_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2612_0 : (( 13 words$word # ii)) option)) of
- SOME ((imm, s2613_0)) =>
- (case ((string_drop s2612_0 s2613_0)) of
+ s5195_0 : (( 13 words$word # ii)) option)) of
+ SOME ((imm, s5196_0)) =>
+ (case ((string_drop s5195_0 s5196_0)) of
s_ => SOME (op, rs1, rs2, imm, s_)
)
| _ => NONE
@@ -34165,39 +59110,38 @@ val _ = Define `
)))`;
-(*val _s2582_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
-
-val _ = Define `
- ((s2582_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s2583_0=
- (let s2584_0 = s2583_0 in
- if ((string_startswith s2584_0 "jalr")) then
- (case ((string_drop s2584_0 ((string_length "jalr")))) of
- s2585_0 =>
- (case ((spc_matches_prefix0 s2585_0)) of
- SOME ((() , s2586_0)) =>
- (case ((string_drop s2585_0 s2586_0)) of
- s2587_0 =>
- (case ((reg_name_matches_prefix s2587_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2588_0)) =>
- (case ((string_drop s2587_0 s2588_0)) of
- s2589_0 =>
- (case ((sep_matches_prefix s2589_0)) of
- SOME ((() , s2590_0)) =>
- (case ((string_drop s2589_0 s2590_0)) of
- s2591_0 =>
- (case ((reg_name_matches_prefix s2591_0 : (( 5 words$word # ii)) option)) of
- SOME ((rs1, s2592_0)) =>
- (case ((string_drop s2591_0 s2592_0)) of
- s2593_0 =>
- (case ((sep_matches_prefix s2593_0)) of
- SOME ((() , s2594_0)) =>
- (case ((string_drop s2593_0 s2594_0)) of
- s2595_0 =>
- (case ((hex_bits_12_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2595_0
+(*val _s5165_ : string -> maybe ((mword ty5 * mword ty5 * mword ty12 * string))*)
+
+val _ = Define `
+ ((s5165_:string ->((5)words$word#(5)words$word#(12)words$word#string)option) s5166_0=
+ (let s5167_0 = s5166_0 in
+ if ((string_startswith s5167_0 "jalr")) then
+ (case ((string_drop s5167_0 ((string_length "jalr")))) of
+ s5168_0 =>
+ (case ((spc_matches_prefix0 s5168_0)) of
+ SOME ((() , s5169_0)) =>
+ (case ((string_drop s5168_0 s5169_0)) of
+ s5170_0 =>
+ (case ((reg_name_matches_prefix s5170_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5171_0)) =>
+ (case ((string_drop s5170_0 s5171_0)) of
+ s5172_0 =>
+ (case ((sep_matches_prefix s5172_0)) of
+ SOME ((() , s5173_0)) =>
+ (case ((string_drop s5172_0 s5173_0)) of
+ s5174_0 =>
+ (case ((reg_name_matches_prefix s5174_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rs1, s5175_0)) =>
+ (case ((string_drop s5174_0 s5175_0)) of
+ s5176_0 =>
+ (case ((sep_matches_prefix s5176_0)) of
+ SOME ((() , s5177_0)) =>
+ (case ((string_drop s5176_0 s5177_0)) of
+ s5178_0 =>
+ (case ((hex_bits_12_matches_prefix0 s5178_0
: (( 12 words$word # ii)) option)) of
- SOME ((imm, s2596_0)) =>
- (case ((string_drop s2595_0 s2596_0)) of s_ => SOME (rd, rs1, imm, s_) )
+ SOME ((imm, s5179_0)) =>
+ (case ((string_drop s5178_0 s5179_0)) of s_ => SOME (rd, rs1, imm, s_) )
| _ => NONE
)
)
@@ -34219,30 +59163,30 @@ val _ = Define `
else NONE))`;
-(*val _s2570_ : string -> maybe ((mword ty5 * mword ty21 * string))*)
+(*val _s5153_ : string -> maybe ((mword ty5 * mword ty21 * string))*)
val _ = Define `
- ((s2570_:string ->((5)words$word#(21)words$word#string)option) s2571_0=
- (let s2572_0 = s2571_0 in
- if ((string_startswith s2572_0 "jal")) then
- (case ((string_drop s2572_0 ((string_length "jal")))) of
- s2573_0 =>
- (case ((spc_matches_prefix0 s2573_0)) of
- SOME ((() , s2574_0)) =>
- (case ((string_drop s2573_0 s2574_0)) of
- s2575_0 =>
- (case ((reg_name_matches_prefix s2575_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2576_0)) =>
- (case ((string_drop s2575_0 s2576_0)) of
- s2577_0 =>
- (case ((sep_matches_prefix s2577_0)) of
- SOME ((() , s2578_0)) =>
- (case ((string_drop s2577_0 s2578_0)) of
- s2579_0 =>
+ ((s5153_:string ->((5)words$word#(21)words$word#string)option) s5154_0=
+ (let s5155_0 = s5154_0 in
+ if ((string_startswith s5155_0 "jal")) then
+ (case ((string_drop s5155_0 ((string_length "jal")))) of
+ s5156_0 =>
+ (case ((spc_matches_prefix0 s5156_0)) of
+ SOME ((() , s5157_0)) =>
+ (case ((string_drop s5156_0 s5157_0)) of
+ s5158_0 =>
+ (case ((reg_name_matches_prefix s5158_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5159_0)) =>
+ (case ((string_drop s5158_0 s5159_0)) of
+ s5160_0 =>
+ (case ((sep_matches_prefix s5160_0)) of
+ SOME ((() , s5161_0)) =>
+ (case ((string_drop s5160_0 s5161_0)) of
+ s5162_0 =>
(case ((hex_bits_21_matches_prefix
- instance_Sail2_values_Bitvector_Machine_word_mword_dict s2579_0 : (( 21 words$word # ii)) option)) of
- SOME ((imm, s2580_0)) =>
- (case ((string_drop s2579_0 s2580_0)) of s_ => SOME (rd, imm, s_) )
+ instance_Sail2_values_Bitvector_Machine_word_mword_dict s5162_0 : (( 21 words$word # ii)) option)) of
+ SOME ((imm, s5163_0)) =>
+ (case ((string_drop s5162_0 s5163_0)) of s_ => SOME (rd, imm, s_) )
| _ => NONE
)
)
@@ -34258,33 +59202,33 @@ val _ = Define `
else NONE))`;
-(*val _s2557_ : string -> maybe ((uop * mword ty5 * mword ty20 * string))*)
+(*val _s5140_ : string -> maybe ((uop * mword ty5 * mword ty20 * string))*)
val _ = Define `
- ((s2557_:string ->(uop#(5)words$word#(20)words$word#string)option) s2558_0=
- ((case s2558_0 of
- s2559_0 =>
- (case ((utype_mnemonic_matches_prefix s2559_0)) of
- SOME ((op, s2560_0)) =>
- (case ((string_drop s2559_0 s2560_0)) of
- s2561_0 =>
- (case ((spc_matches_prefix0 s2561_0)) of
- SOME ((() , s2562_0)) =>
- (case ((string_drop s2561_0 s2562_0)) of
- s2563_0 =>
- (case ((reg_name_matches_prefix s2563_0 : (( 5 words$word # ii)) option)) of
- SOME ((rd, s2564_0)) =>
- (case ((string_drop s2563_0 s2564_0)) of
- s2565_0 =>
- (case ((sep_matches_prefix s2565_0)) of
- SOME ((() , s2566_0)) =>
- (case ((string_drop s2565_0 s2566_0)) of
- s2567_0 =>
+ ((s5140_:string ->(uop#(5)words$word#(20)words$word#string)option) s5141_0=
+ ((case s5141_0 of
+ s5142_0 =>
+ (case ((utype_mnemonic_matches_prefix s5142_0)) of
+ SOME ((op, s5143_0)) =>
+ (case ((string_drop s5142_0 s5143_0)) of
+ s5144_0 =>
+ (case ((spc_matches_prefix0 s5144_0)) of
+ SOME ((() , s5145_0)) =>
+ (case ((string_drop s5144_0 s5145_0)) of
+ s5146_0 =>
+ (case ((reg_name_matches_prefix s5146_0 : (( 5 words$word # ii)) option)) of
+ SOME ((rd, s5147_0)) =>
+ (case ((string_drop s5146_0 s5147_0)) of
+ s5148_0 =>
+ (case ((sep_matches_prefix s5148_0)) of
+ SOME ((() , s5149_0)) =>
+ (case ((string_drop s5148_0 s5149_0)) of
+ s5150_0 =>
(case ((hex_bits_20_matches_prefix
instance_Sail2_values_Bitvector_Machine_word_mword_dict
- s2567_0 : (( 20 words$word # ii)) option)) of
- SOME ((imm, s2568_0)) =>
- (case ((string_drop s2567_0 s2568_0)) of s_ => SOME (op, rd, imm, s_) )
+ s5150_0 : (( 20 words$word # ii)) option)) of
+ SOME ((imm, s5151_0)) =>
+ (case ((string_drop s5150_0 s5151_0)) of s_ => SOME (op, rd, imm, s_) )
| _ => NONE
)
)
@@ -34304,547 +59248,1220 @@ val _ = Define `
val _ = Define `
((assembly_matches_prefix:string ->(ast#int)option) arg_=
- (let s2569_0 = arg_ in
- if ((case ((s2557_ s2569_0 : ((uop # 5 words$word # 20 words$word # string))option)) of
+ (let s5152_0 = arg_ in
+ if ((case ((s5140_ s5152_0 : ((uop # 5 words$word # 20 words$word # string))option)) of
SOME ((op, rd, imm, s_)) => T
| _ => F
)) then (case
- (s2557_ s2569_0 : (( uop # 5 words$word # 20 words$word # string)) option) of
+ (s5140_ s5152_0 : (( uop # 5 words$word # 20 words$word # string)) option) of
(SOME ((op, rd, imm, s_))) =>
SOME (UTYPE (imm, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2570_ s2569_0 : (( 5 words$word # 21 words$word # string))option)) of
+ else if ((case ((s5153_ s5152_0 : (( 5 words$word # 21 words$word # string))option)) of
SOME ((rd, imm, s_)) => T
| _ => F
- )) then (case (s2570_ s2569_0 : (( 5 words$word # 21 words$word # string)) option) of
+ )) then (case (s5153_ s5152_0 : (( 5 words$word # 21 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (RISCV_JAL (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2582_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s5165_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((rd, rs1, imm, s_)) => T
| _ => F
)) then (case
- (s2582_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s5165_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((rd, rs1, imm, s_))) =>
SOME
(RISCV_JALR (imm, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2598_ s2569_0 : ((bop # 5 words$word # 5 words$word # 13 words$word # string))option)) of
+ else if ((case ((s5181_ s5152_0 : ((bop # 5 words$word # 5 words$word # 13 words$word # string))option)) of
SOME ((op, rs1, rs2, imm, s_)) => T
| _ => F
)) then (case
- (s2598_ s2569_0 : (( bop # 5 words$word # 5 words$word # 13 words$word # string)) option) of
+ (s5181_ s5152_0 : (( bop # 5 words$word # 5 words$word # 13 words$word # string)) option) of
(SOME ((op, rs1, rs2, imm, s_))) =>
SOME
(BTYPE (imm, rs2, rs1, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2615_ s2569_0 : ((iop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s5198_ s5152_0 : ((iop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((op, rd, rs1, imm, s_)) => T
| _ => F
)) then (case
- (s2615_ s2569_0 : (( iop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s5198_ s5152_0 : (( iop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((op, rd, rs1, imm, s_))) =>
SOME
(ITYPE (imm, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2632_ s2569_0 : ((sop # 5 words$word # 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5215_ s5152_0 : ((sop # 5 words$word # 5 words$word # 6 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => T
| _ => F
)) then (case
- (s2632_ s2569_0 : (( sop # 5 words$word # 5 words$word # 6 words$word # string)) option) of
+ (s5215_ s5152_0 : (( sop # 5 words$word # 5 words$word # 6 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTIOP (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2649_ s2569_0 : ((rop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5232_ s5152_0 : ((rop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s2649_ s2569_0 : (( rop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5232_ s5152_0 : (( rop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, rs2, s_))) =>
SOME
(RTYPE (rs2, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2666_ s2569_0
+ else if ((case ((s5249_ s5152_0
: ((word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word # string))option)) of
SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1, s_)) => T
| _ => F
)) then (case
- (s2666_ s2569_0
+ (s5249_ s5152_0
: (( word_width # bool # bool # bool # 5 words$word # 12 words$word # 5 words$word # string)) option) of
(SOME ((size1, is_unsigned, aq, rl, rd, imm, rs1, s_))) =>
SOME
(LOAD (imm, rs1, rd, is_unsigned, size1, aq, rl),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2696_ s2569_0
+ else if ((case ((s5279_ s5152_0
: ((word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rs2, imm, rs1, s_)) => T
| _ => F
)) then (case
- (s2696_ s2569_0
+ (s5279_ s5152_0
: (( word_width # bool # bool # 5 words$word # 12 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rs2, imm, rs1, s_))) =>
SOME
(STORE (imm, rs2, rs1, size1, aq, rl),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2724_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ else if ((case ((s5307_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
SOME ((rd, rs1, imm, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2724_ s2569_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (s5307_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
(SOME ((rd, rs1, imm, s_))) =>
SOME (ADDIW (imm, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2740_ s2569_0 : ((sop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5323_ s5152_0 : ((sop # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2740_ s2569_0 : (( sop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5323_ s5152_0 : (( sop # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTW (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2757_ s2569_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5340_ s5152_0 : ((ropw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2757_ s2569_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5340_ s5152_0 : (( ropw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, rs2, s_))) =>
SOME
(RTYPEW (rs2, rs1, rd, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2774_ s2569_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5357_ s5152_0 : ((sopw # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((op, rd, rs1, shamt, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2774_ s2569_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5357_ s5152_0 : (( sopw # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((op, rd, rs1, shamt, s_))) =>
SOME
(SHIFTIWOP (shamt, rs1, rd, op), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2791_ s2569_0 : (( 4 words$word # 4 words$word # string))option)) of
+ else if ((case ((s5374_ s5152_0 : (( 4 words$word # 4 words$word # string))option)) of
SOME ((pred, succ, s_)) => T
| _ => F
- )) then (case (s2791_ s2569_0 : (( 4 words$word # 4 words$word # string)) option) of
+ )) then (case (s5374_ s5152_0 : (( 4 words$word # 4 words$word # string)) option) of
(SOME ((pred, succ, s_))) =>
SOME (FENCE (pred, succ), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2803_ s2569_0 : (( 4 words$word # 4 words$word # string))option)) of
+ else if ((case ((s5386_ s5152_0 : (( 4 words$word # 4 words$word # string))option)) of
SOME ((pred, succ, s_)) => T
| _ => F
- )) then (case (s2803_ s2569_0 : (( 4 words$word # 4 words$word # string)) option) of
+ )) then (case (s5386_ s5152_0 : (( 4 words$word # 4 words$word # string)) option) of
(SOME ((pred, succ, s_))) =>
SOME (FENCE_TSO (pred, succ), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2815_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2815_ s2569_0 of
+ else if ((case ((s5398_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5398_ s5152_0 of
(SOME (s_)) =>
SOME (FENCEI () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2819_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2819_ s2569_0 of
+ else if ((case ((s5402_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5402_ s5152_0 of
(SOME (s_)) =>
SOME (ECALL () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2823_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2823_ s2569_0 of
+ else if ((case ((s5406_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5406_ s5152_0 of
(SOME (s_)) =>
SOME (MRET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2827_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2827_ s2569_0 of
+ else if ((case ((s5410_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5410_ s5152_0 of
(SOME (s_)) =>
SOME (SRET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2831_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2831_ s2569_0 of
+ else if ((case ((s5414_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5414_ s5152_0 of
(SOME (s_)) =>
SOME (EBREAK () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2835_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2835_ s2569_0 of
+ else if ((case ((s5418_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5418_ s5152_0 of
(SOME (s_)) =>
SOME (WFI () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2839_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5422_ s5152_0 : (( 5 words$word # 5 words$word # string))option)) of
SOME ((rs1, rs2, s_)) => T
| _ => F
- )) then (case (s2839_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s5422_ s5152_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rs1, rs2, s_))) =>
SOME (SFENCE_VMA (rs1, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2851_ s2569_0
+ else if ((case ((s5434_ s5152_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rd, rs1, s_)) => T
| _ => F
)) then (case
- (s2851_ s2569_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # string)) option) of
+ (s5434_ s5152_0 : (( word_width # bool # bool # 5 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rd, rs1, s_))) =>
SOME
(LOADRES (aq, rl, rs1, size1, rd), ((string_length arg_)) -
((string_length s_)))
)
- else if ((case ((s2869_ s2569_0
+ else if ((case ((s5452_ s5152_0
: ((word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((size1, aq, rl, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s2869_ s2569_0
+ (s5452_ s5152_0
: (( word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((size1, aq, rl, rd, rs1, rs2, s_))) =>
SOME
(STORECON (aq, rl, rs2, rs1, size1, rd),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2891_ s2569_0
+ else if ((case ((s5474_ s5152_0
: ((amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
- SOME ((op, width, aq, rl, rd, rs1, rs2, s_)) => T
+ SOME ((op, width, aq, rl, rd, rs2, rs1, s_)) => T
| _ => F
)) then (case
- (s2891_ s2569_0
+ (s5474_ s5152_0
: (( amoop # word_width # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
- (SOME ((op, width, aq, rl, rd, rs1, rs2, s_))) =>
+ (SOME ((op, width, aq, rl, rd, rs2, rs1, s_))) =>
SOME
(AMO (op, aq, rl, rs2, rs1, width, rd),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2915_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s2915_ s2569_0 of
+ else if ((case ((s5500_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5500_ s5152_0 of
(SOME (s_)) =>
SOME (C_NOP () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2919_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
- SOME ((rdc, nzimm, s_)) => (nzimm <> (vec_of_bits [B0;B0;B0;B0;B0;B0;B0;B0] : 8 words$word))
+ else if ((case ((s5504_ s5152_0 : (( 3 words$word # 8 words$word # string))option)) of
+ SOME ((rdc, nzimm, s_)) => (nzimm <> (0x00w : 8 words$word))
| _ => F
- )) then (case (s2919_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s5504_ s5152_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rdc, nzimm, s_))) =>
SOME
(C_ADDI4SPN (rdc, nzimm), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2931_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5516_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rdc, rsc, uimm, s_)) => T
| _ => F
)) then (case
- (s2931_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s5516_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rdc, rsc, uimm, s_))) =>
SOME (C_LW (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2947_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5532_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rdc, rsc, uimm, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2947_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s5532_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rdc, rsc, uimm, s_))) =>
SOME (C_LD (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2963_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5548_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rsc1, rsc2, uimm, s_)) => T
| _ => F
)) then (case
- (s2963_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s5548_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rsc1, rsc2, uimm, s_))) =>
SOME
(C_SW (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2979_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5564_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
SOME ((rsc1, rsc2, uimm, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s2979_ s2569_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (s5564_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
(SOME ((rsc1, rsc2, uimm, s_))) =>
SOME
(C_SD (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s2995_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rsd, nzi, s_)) =>
- ((((nzi <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s5580_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, nzi, s_)) => ((((nzi <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s2995_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5580_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, nzi, s_))) =>
SOME (C_ADDI (nzi, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3007_ s2569_0 : (( 11 words$word # string))option)) of
+ else if ((case ((s5592_ s5152_0 : (( 11 words$word # string))option)) of
SOME ((imm, s_)) => ((( 64 : int):ii) = (( 32 : int):ii))
| _ => F
- )) then (case (s3007_ s2569_0 : (( 11 words$word # string)) option) of
+ )) then (case (s5592_ s5152_0 : (( 11 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_JAL imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3015_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5600_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rsd, imm, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3015_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5600_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, imm, s_))) =>
SOME (C_ADDIW (imm, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3027_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, imm, s_)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s5612_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, imm, s_)) => (rd <> zreg)
| _ => F
- )) then (case (s3027_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5612_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (C_LI (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3039_ s2569_0 : (( 6 words$word # string))option)) of
- SOME ((imm, s_)) => (imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s5624_ s5152_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => (imm <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3039_ s2569_0 : (( 6 words$word # string)) option) of
+ )) then (case (s5624_ s5152_0 : (( 6 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_ADDI16SP imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3047_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5632_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rd, imm, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((((((regidx_to_regno rd)) <> ((regidx_to_regno sp))))) /\ (((imm <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))))))))
+ ((((rd <> zreg))) /\ ((((((rd <> sp))) /\ (((imm <> (0b000000w : 6 words$word))))))))
| _ => F
- )) then (case (s3047_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5632_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, imm, s_))) =>
SOME (C_LUI (imm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3059_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
- SOME ((rsd, shamt, s_)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s5644_ s5152_0 : (( 3 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3059_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s5644_ s5152_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SRLI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3071_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
- SOME ((rsd, shamt, s_)) => (shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word))
+ else if ((case ((s5656_ s5152_0 : (( 3 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) => (shamt <> (0b000000w : 6 words$word))
| _ => F
- )) then (case (s3071_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s5656_ s5152_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SRAI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3083_ s2569_0 : (( 3 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5668_ s5152_0 : (( 3 words$word # 6 words$word # string))option)) of
SOME ((rsd, imm, s_)) => T
| _ => F
- )) then (case (s3083_ s2569_0 : (( 3 words$word # 6 words$word # string)) option) of
+ )) then (case (s5668_ s5152_0 : (( 3 words$word # 6 words$word # string)) option) of
(SOME ((rsd, imm, s_))) =>
SOME (C_ANDI (imm, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3095_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5680_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3095_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5680_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_SUB (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3107_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5692_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3107_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5692_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_XOR (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3119_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5704_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3119_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5704_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_OR (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3131_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5716_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => T
| _ => F
- )) then (case (s3131_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5716_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_AND (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3143_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5728_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3143_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5728_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_SUBW (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3155_ s2569_0 : (( 3 words$word # 3 words$word # string))option)) of
+ else if ((case ((s5740_ s5152_0 : (( 3 words$word # 3 words$word # string))option)) of
SOME ((rsd, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3155_ s2569_0 : (( 3 words$word # 3 words$word # string)) option) of
+ )) then (case (s5740_ s5152_0 : (( 3 words$word # 3 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_ADDW (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3167_ s2569_0 : (( 11 words$word # string))option)) of
+ else if ((case ((s5752_ s5152_0 : (( 11 words$word # string))option)) of
SOME ((imm, s_)) => T
| _ => F
- )) then (case (s3167_ s2569_0 : (( 11 words$word # string)) option) of
+ )) then (case (s5752_ s5152_0 : (( 11 words$word # string)) option) of
(SOME ((imm, s_))) =>
SOME (C_J imm, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3175_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
+ else if ((case ((s5760_ s5152_0 : (( 3 words$word # 8 words$word # string))option)) of
SOME ((rs, imm, s_)) => T
| _ => F
- )) then (case (s3175_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s5760_ s5152_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rs, imm, s_))) =>
SOME (C_BEQZ (imm, rs), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3187_ s2569_0 : (( 3 words$word # 8 words$word # string))option)) of
+ else if ((case ((s5772_ s5152_0 : (( 3 words$word # 8 words$word # string))option)) of
SOME ((rs, imm, s_)) => T
| _ => F
- )) then (case (s3187_ s2569_0 : (( 3 words$word # 8 words$word # string)) option) of
+ )) then (case (s5772_ s5152_0 : (( 3 words$word # 8 words$word # string)) option) of
(SOME ((rs, imm, s_))) =>
SOME (C_BNEZ (imm, rs), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3199_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5784_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rsd, shamt, s_)) =>
- ((((shamt <> (vec_of_bits [B0;B0;B0;B0;B0;B0] : 6 words$word)))) /\ (((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))))
+ ((((shamt <> (0b000000w : 6 words$word)))) /\ (((rsd <> zreg))))
| _ => F
- )) then (case (s3199_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5784_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rsd, shamt, s_))) =>
SOME (C_SLLI (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3211_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, uimm, s_)) => (((regidx_to_regno rd)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s5796_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => (rd <> zreg)
| _ => F
- )) then (case (s3211_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5796_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_LWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3223_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
- SOME ((rd, uimm, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ else if ((case ((s5808_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => ((((rd <> zreg))) /\ ((((( 64 : int):ii) = (( 64 : int):ii)))))
| _ => F
- )) then (case (s3223_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5808_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_LDSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3235_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5820_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rd, uimm, s_)) => T
| _ => F
- )) then (case (s3235_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5820_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rd, uimm, s_))) =>
SOME (C_SWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3247_ s2569_0 : (( 5 words$word # 6 words$word # string))option)) of
+ else if ((case ((s5832_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
SOME ((rs2, uimm, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
- )) then (case (s3247_ s2569_0 : (( 5 words$word # 6 words$word # string)) option) of
+ )) then (case (s5832_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
(SOME ((rs2, uimm, s_))) =>
SOME (C_SDSP (uimm, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3259_ s2569_0 : (( 5 words$word # string))option)) of
- SOME ((rs1, s_)) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s5844_ s5152_0 : (( 5 words$word # string))option)) of
+ SOME ((rs1, s_)) => (rs1 <> zreg)
| _ => F
- )) then (case (s3259_ s2569_0 : (( 5 words$word # string)) option) of
+ )) then (case (s5844_ s5152_0 : (( 5 words$word # string)) option) of
(SOME ((rs1, s_))) =>
SOME (C_JR rs1, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3267_ s2569_0 : (( 5 words$word # string))option)) of
- SOME ((rs1, s_)) => (((regidx_to_regno rs1)) <> ((regidx_to_regno zreg)))
+ else if ((case ((s5852_ s5152_0 : (( 5 words$word # string))option)) of
+ SOME ((rs1, s_)) => (rs1 <> zreg)
| _ => F
- )) then (case (s3267_ s2569_0 : (( 5 words$word # string)) option) of
+ )) then (case (s5852_ s5152_0 : (( 5 words$word # string)) option) of
(SOME ((rs1, s_))) =>
SOME (C_JALR rs1, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3275_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
- SOME ((rd, rs2, s_)) =>
- ((((((regidx_to_regno rd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s5860_ s5152_0 : (( 5 words$word # 5 words$word # string))option)) of
+ SOME ((rd, rs2, s_)) => ((((rd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s3275_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s5860_ s5152_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rd, rs2, s_))) =>
SOME (C_MV (rd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3287_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s3287_ s2569_0 of
+ else if ((case ((s5872_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s5872_ s5152_0 of
(SOME (s_)) =>
SOME (C_EBREAK () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3291_ s2569_0 : (( 5 words$word # 5 words$word # string))option)) of
- SOME ((rsd, rs2, s_)) =>
- ((((((regidx_to_regno rsd)) <> ((regidx_to_regno zreg))))) /\ (((((regidx_to_regno rs2)) <> ((regidx_to_regno zreg))))))
+ else if ((case ((s5876_ s5152_0 : (( 5 words$word # 5 words$word # string))option)) of
+ SOME ((rsd, rs2, s_)) => ((((rsd <> zreg))) /\ (((rs2 <> zreg))))
| _ => F
- )) then (case (s3291_ s2569_0 : (( 5 words$word # 5 words$word # string)) option) of
+ )) then (case (s5876_ s5152_0 : (( 5 words$word # 5 words$word # string)) option) of
(SOME ((rsd, rs2, s_))) =>
SOME (C_ADD (rsd, rs2), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3303_ s2569_0
+ else if ((case ((s5888_ s5152_0
: ((bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((high, signed1, signed2, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3303_ s2569_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5888_ s5152_0 : (( bool # bool # bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((high, signed1, signed2, rd, rs1, rs2, s_))) =>
SOME
(MUL (rs2, rs1, rd, high, signed1, signed2),
((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3320_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5905_ s5152_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3320_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5905_ s5152_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (DIV0 (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3338_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5923_ s5152_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => T
| _ => F
)) then (case
- (s3338_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5923_ s5152_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (REM (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3356_ s2569_0 : (( 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5941_ s5152_0 : (( 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((rd, rs1, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3356_ s2569_0 : (( 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5941_ s5152_0 : (( 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((rd, rs1, rs2, s_))) =>
SOME (MULW (rs2, rs1, rd), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3372_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5957_ s5152_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3372_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5957_ s5152_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (DIVW (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3391_ s2569_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ else if ((case ((s5976_ s5152_0 : ((bool # 5 words$word # 5 words$word # 5 words$word # string))option)) of
SOME ((s, rd, rs1, rs2, s_)) => ((( 64 : int):ii) = (( 64 : int):ii))
| _ => F
)) then (case
- (s3391_ s2569_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (s5976_ s5152_0 : (( bool # 5 words$word # 5 words$word # 5 words$word # string)) option) of
(SOME ((s, rd, rs1, rs2, s_))) =>
SOME (REMW (rs2, rs1, rd, s), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3410_ s2569_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
- SOME ((op, rd, rs1, csr, s_)) => T
+ else if ((case ((s5995_ s5152_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((op, rd, csr, rs1, s_)) => T
| _ => F
)) then (case
- (s3410_ s2569_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
- (SOME ((op, rd, rs1, csr, s_))) =>
+ (s5995_ s5152_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((op, rd, csr, rs1, s_))) =>
SOME
(CSR (csr, rs1, rd, T, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3428_ s2569_0 : ((csrop # 5 words$word # 5 words$word # 12 words$word # string))option)) of
- SOME ((op, rd, rs1, csr, s_)) => T
+ else if ((case ((s6013_ s5152_0 : ((csrop # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((op, rd, csr, rs1, s_)) => T
| _ => F
)) then (case
- (s3428_ s2569_0 : (( csrop # 5 words$word # 5 words$word # 12 words$word # string)) option) of
- (SOME ((op, rd, rs1, csr, s_))) =>
+ (s6013_ s5152_0 : (( csrop # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((op, rd, csr, rs1, s_))) =>
SOME
(CSR (csr, rs1, rd, F, op), ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3445_ s2569_0)) of SOME (s_) => T | _ => F )) then
- (case s3445_ s2569_0 of
+ else if ((case ((s6030_ s5152_0)) of SOME (s_) => T | _ => F )) then
+ (case s6030_ s5152_0 of
(SOME (s_)) =>
SOME (URET () , ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3449_ s2569_0 : (( 32 words$word # string))option)) of
+ else if ((case ((s6034_ s5152_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => T
+ | _ => F
+ )) then (case (s6034_ s5152_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_NOP_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6040_ s5152_0 : (( 5 words$word # string))option)) of
+ SOME ((rsd, s_)) => (rsd <> zreg)
+ | _ => F
+ )) then (case (s6040_ s5152_0 : (( 5 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_ADDI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6046_ s5152_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => T
+ | _ => F
+ )) then (case (s6046_ s5152_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_LI_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6052_ s5152_0 : (( 6 words$word # string))option)) of
+ SOME ((imm, s_)) => (imm <> (0b000000w : 6 words$word))
+ | _ => F
+ )) then (case (s6052_ s5152_0 : (( 6 words$word # string)) option) of
+ (SOME ((imm, s_))) =>
+ SOME (C_LUI_HINT imm, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6058_ s5152_0 : (( 5 words$word # string))option)) of
+ SOME ((rs2, s_)) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s6058_ s5152_0 : (( 5 words$word # string)) option) of
+ (SOME ((rs2, s_))) =>
+ SOME (C_MV_HINT rs2, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6064_ s5152_0 : (( 5 words$word # string))option)) of
+ SOME ((rs2, s_)) => (rs2 <> zreg)
+ | _ => F
+ )) then (case (s6064_ s5152_0 : (( 5 words$word # string)) option) of
+ (SOME ((rs2, s_))) =>
+ SOME (C_ADD_HINT rs2, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6070_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rsd, shamt, s_)) =>
+ ((((shamt = (0b000000w : 6 words$word)))) \/ (((rsd = zreg))))
+ | _ => F
+ )) then (case (s6070_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rsd, shamt, s_))) =>
+ SOME
+ (C_SLLI_HINT (shamt, rsd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6079_ s5152_0 : (( 3 words$word # string))option)) of
+ SOME ((rsd, s_)) => T
+ | _ => F
+ )) then (case (s6079_ s5152_0 : (( 3 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_SRLI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6085_ s5152_0 : (( 3 words$word # string))option)) of
+ SOME ((rsd, s_)) => T
+ | _ => F
+ )) then (case (s6085_ s5152_0 : (( 3 words$word # string)) option) of
+ (SOME ((rsd, s_))) =>
+ SOME (C_SRAI_HINT rsd, ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6091_ s5152_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word # string))option)) of
+ SOME ((pred, succ, rs, rd, fm, s_)) =>
+ (((((((fm <> (0x0w : 4 words$word)))) /\ (((fm <> (0x8w : 4 words$word))))))) \/ ((((((rs <> (0b00000w : 5 words$word)))) \/ (((rd <> (0b00000w : 5 words$word))))))))
+ | _ => F
+ )) then (case
+ (s6091_ s5152_0
+ : (( 4 words$word # 4 words$word # 5 words$word # 5 words$word # 4 words$word # string)) option) of
+ (SOME ((pred, succ, rs, rd, fm, s_))) =>
+ SOME
+ (FENCE_RESERVED (fm, pred, succ, rs, rd),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6109_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string))option)) of
+ SOME ((rd, rs, imm, s_)) =>
+ ((((imm <> (0x000w : 12 words$word)))) \/ ((((((rs <> zreg))) \/ (((rd <> zreg)))))))
+ | _ => F
+ )) then (case
+ (s6109_ s5152_0 : (( 5 words$word # 5 words$word # 12 words$word # string)) option) of
+ (SOME ((rd, rs, imm, s_))) =>
+ SOME
+ (FENCEI_RESERVED (imm, rs, rd), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6121_ s5152_0
+ : ((word_width # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((width, rd, imm, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6121_ s5152_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((width, rd, imm, rs1, s_))) =>
+ SOME
+ (LOAD_FP (imm, rs1, rd, width), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6145_ s5152_0
+ : ((word_width # 5 words$word # 12 words$word # 5 words$word # string))option)) of
+ SOME ((width, rs2, imm, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6145_ s5152_0 : (( word_width # 5 words$word # 12 words$word # 5 words$word # string)) option) of
+ (SOME ((width, rs2, imm, rs1, s_))) =>
+ SOME
+ (STORE_FP (imm, rs2, rs1, width), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6169_ s5152_0
+ : ((f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6169_ s5152_0
+ : (( f_madd_op_S # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm, s_))) =>
+ SOME
+ (F_MADD_TYPE_S (rs3, rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6194_ s5152_0
+ : ((f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6194_ s5152_0
+ : (( f_bin_rm_op_S # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rm, s_))) =>
+ SOME
+ (F_BIN_RM_TYPE_S (rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6215_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FSQRT_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6215_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FSQRT_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FSQRT_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6232_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_W_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6232_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_W_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_W_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6249_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_WU_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6249_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_WU_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_WU_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6266_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_W, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6266_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_W, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_W),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6283_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_WU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6283_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_WU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_WU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6300_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_L_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6300_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_L_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_L_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6317_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_LU_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6317_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_LU_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_LU_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6334_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_L, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6334_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_L, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_L),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6351_ s5152_0
+ : ((f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_LU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6351_ s5152_0 : (( f_un_rm_op_S # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_LU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_S (rs1, rm, rd, FCVT_S_LU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6368_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJ_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6368_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJ_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJ_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6385_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJN_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6385_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJN_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJN_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6402_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJX_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6402_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJX_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FSGNJX_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6419_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMIN_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6419_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMIN_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FMIN_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6436_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMAX_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6436_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMAX_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FMAX_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6453_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FEQ_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6453_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FEQ_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FEQ_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6470_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLT_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6470_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLT_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FLT_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6487_ s5152_0
+ : ((f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLE_S, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6487_ s5152_0 : (( f_bin_op_S # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLE_S, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_S (rs2, rs1, rd, FLE_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6504_ s5152_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_X_W, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6504_ s5152_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_X_W, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FMV_X_W), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6517_ s5152_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_W_X, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6517_ s5152_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_W_X, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FMV_W_X), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6530_ s5152_0 : ((f_un_op_S # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FCLASS_S, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6530_ s5152_0 : (( f_un_op_S # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FCLASS_S, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_S (rs1, rd, FCLASS_S), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6543_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, imm, s_)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s6543_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rd, imm, s_))) =>
+ SOME (C_FLWSP (imm, rd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6555_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case (s6555_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rd, uimm, s_))) =>
+ SOME (C_FSWSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6567_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rdc, rsc, uimm, s_)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s6567_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rdc, rsc, uimm, s_))) =>
+ SOME (C_FLW (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6583_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rsc1, rsc2, uimm, s_)) => ((( 64 : int):ii) = (( 32 : int):ii))
+ | _ => F
+ )) then (case
+ (s6583_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rsc1, rsc2, uimm, s_))) =>
+ SOME
+ (C_FSW (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6599_ s5152_0
+ : ((f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rs3, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6599_ s5152_0
+ : (( f_madd_op_D # 5 words$word # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rs3, rm, s_))) =>
+ SOME
+ (F_MADD_TYPE_D (rs3, rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6624_ s5152_0
+ : ((f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((op, rd, rs1, rs2, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6624_ s5152_0
+ : (( f_bin_rm_op_D # 5 words$word # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((op, rd, rs1, rs2, rm, s_))) =>
+ SOME
+ (F_BIN_RM_TYPE_D (rs2, rs1, rm, rd, op),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6645_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FSQRT_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6645_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FSQRT_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FSQRT_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6662_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_W_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6662_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_W_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_W_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6679_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_WU_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6679_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_WU_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_WU_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6696_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_D_W, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6696_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_D_W, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_W),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6713_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_D_WU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6713_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_D_WU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_WU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6730_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_L_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6730_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_L_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_L_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6747_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_LU_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6747_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_LU_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_LU_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6764_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_D_L, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6764_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_D_L, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_L),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6781_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_D_LU, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6781_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_D_LU, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_LU),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6798_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_S_D, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6798_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_S_D, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_S_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6815_ s5152_0
+ : ((f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string))option)) of
+ SOME ((FCVT_D_S, rd, rs1, rm, s_)) => T
+ | _ => F
+ )) then (case
+ (s6815_ s5152_0 : (( f_un_rm_op_D # 5 words$word # 5 words$word # rounding_mode # string)) option) of
+ (SOME ((FCVT_D_S, rd, rs1, rm, s_))) =>
+ SOME
+ (F_UN_RM_TYPE_D (rs1, rm, rd, FCVT_D_S),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6832_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJ_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6832_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJ_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJ_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6849_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJN_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6849_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJN_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJN_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6866_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FSGNJX_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6866_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FSGNJX_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FSGNJX_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6883_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMIN_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6883_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMIN_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FMIN_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6900_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMAX_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6900_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMAX_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FMAX_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6917_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FEQ_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6917_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FEQ_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FEQ_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6934_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLT_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6934_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLT_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FLT_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6951_ s5152_0
+ : ((f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FLE_D, rd, rs1, rs2, s_)) => T
+ | _ => F
+ )) then (case
+ (s6951_ s5152_0 : (( f_bin_op_D # 5 words$word # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FLE_D, rd, rs1, rs2, s_))) =>
+ SOME
+ (F_BIN_TYPE_D (rs2, rs1, rd, FLE_D),
+ ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s6968_ s5152_0 : ((f_un_op_D # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_X_D, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6968_ s5152_0 : (( f_un_op_D # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_X_D, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_D (rs1, rd, FMV_X_D), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6981_ s5152_0 : ((f_un_op_D # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FMV_D_X, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6981_ s5152_0 : (( f_un_op_D # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FMV_D_X, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_D (rs1, rd, FMV_D_X), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s6994_ s5152_0 : ((f_un_op_D # 5 words$word # 5 words$word # string))option)) of
+ SOME ((FCLASS_D, rd, rs1, s_)) => T
+ | _ => F
+ )) then (case
+ (s6994_ s5152_0 : (( f_un_op_D # 5 words$word # 5 words$word # string)) option) of
+ (SOME ((FCLASS_D, rd, rs1, s_))) =>
+ SOME
+ (F_UN_TYPE_D (rs1, rd, FCLASS_D), ((string_length arg_)) -
+ ((string_length s_)))
+ )
+ else if ((case ((s7007_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rd, uimm, s_)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s7007_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rd, uimm, s_))) =>
+ SOME (C_FLDSP (uimm, rd), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s7019_ s5152_0 : (( 5 words$word # 6 words$word # string))option)) of
+ SOME ((rs2, uimm, s_)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case (s7019_ s5152_0 : (( 5 words$word # 6 words$word # string)) option) of
+ (SOME ((rs2, uimm, s_))) =>
+ SOME (C_FSDSP (uimm, rs2), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s7031_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rdc, rsc, uimm, s_)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s7031_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rdc, rsc, uimm, s_))) =>
+ SOME (C_FLD (uimm, rsc, rdc), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s7047_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string))option)) of
+ SOME ((rsc1, rsc2, uimm, s_)) => (((((( 64 : int):ii) = (( 32 : int):ii)))) \/ ((((( 64 : int):ii) = (( 64 : int):ii)))))
+ | _ => F
+ )) then (case
+ (s7047_ s5152_0 : (( 3 words$word # 3 words$word # 5 words$word # string)) option) of
+ (SOME ((rsc1, rsc2, uimm, s_))) =>
+ SOME
+ (C_FSD (uimm, rsc1, rsc2), ((string_length arg_)) - ((string_length s_)))
+ )
+ else if ((case ((s7063_ s5152_0 : (( 32 words$word # string))option)) of
SOME ((s, s_)) => T
| _ => F
- )) then (case (s3449_ s2569_0 : (( 32 words$word # string)) option) of
+ )) then (case (s7063_ s5152_0 : (( 32 words$word # string)) option) of
(SOME ((s, s_))) =>
SOME (ILLEGAL s, ((string_length arg_)) - ((string_length s_)))
)
- else if ((case ((s3457_ s2569_0 : (( 16 words$word # string))option)) of
+ else if ((case ((s7071_ s5152_0 : (( 16 words$word # string))option)) of
SOME ((s, s_)) => T
| _ => F
- )) then (case (s3457_ s2569_0 : (( 16 words$word # string)) option) of
+ )) then (case (s7071_ s5152_0 : (( 16 words$word # string)) option) of
(SOME ((s, s_))) =>
SOME (C_ILLEGAL s, ((string_length arg_)) - ((string_length s_)))
)
@@ -34861,10 +60478,10 @@ val _ = Define `
((decode:(32)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bv= (encdec_backwards bv))`;
-(*val decodeCompressed : mword ty16 -> ast*)
+(*val decodeCompressed : mword ty16 -> M ast*)
val _ = Define `
- ((decodeCompressed:(16)words$word -> ast) bv= (encdec_compressed_backwards bv))`;
+ ((decodeCompressed:(16)words$word ->(regstate)sail2_state_monad$sequential_state ->(((ast),(exception))sail2_state_monad$result#(regstate)sail2_state_monad$sequential_state)set) bv= (encdec_compressed_backwards bv))`;
(*val ext_init : unit -> unit*)
@@ -34900,8 +60517,7 @@ val _ = Define `
(*val isRVC : mword ty16 -> bool*)
val _ = Define `
- ((isRVC:(16)words$word -> bool) h=
- (~ (((((subrange_vec_dec h (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))`;
+ ((isRVC:(16)words$word -> bool) h= (~ (((((subrange_vec_dec h (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))`;
(*val fetch : unit -> M FetchResult*)
@@ -34913,28 +60529,26 @@ val _ = Define `
(case ((ext_fetch_check_pc w__0 w__1)) of
Ext_FetchAddr_Error (e) => sail2_state_monad$returnS (F_Ext_Error e)
| Ext_FetchAddr_OK (use_pc) => sail2_state_monad$bindS
- (sail2_state$or_boolS
- (sail2_state_monad$returnS (((((cast_unit_vec0 ((access_vec_dec use_pc (( 0 : int):ii))) : 1 words$word)) <> (vec_of_bits [B0] : 1 words$word)))))
- (sail2_state$and_boolS
- (sail2_state_monad$returnS (((((cast_unit_vec0 ((access_vec_dec use_pc (( 1 : int):ii))) : 1 words$word)) <> (vec_of_bits [B0] : 1 words$word)))))
+ (sail2_state$or_boolS (sail2_state_monad$returnS (((((access_vec_dec use_pc (( 0 : int):ii))) <> B0))))
+ (sail2_state$and_boolS (sail2_state_monad$returnS (((((access_vec_dec use_pc (( 1 : int):ii))) <> B0))))
( sail2_state_monad$bindS(haveRVC () ) (\ (w__2 : bool) . sail2_state_monad$returnS ((~ w__2)))))) (\ (w__4 : bool) .
if w__4 then sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__5 : 64 words$word) .
- sail2_state_monad$returnS (F_Error (E_Fetch_Addr_Align, w__5)))
+ sail2_state_monad$returnS (F_Error (E_Fetch_Addr_Align () , w__5)))
else sail2_state_monad$bindS
- (translateAddr use_pc Execute : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__6 : (( 64 words$word), ExceptionType)
+ (translateAddr use_pc (Execute () ) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__6 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__6 of
- TR_Failure (e) => sail2_state_monad$bindS
+ TR_Failure ((e, _)) => sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__7 : 64 words$word) .
sail2_state_monad$returnS (F_Error (e, w__7)))
- | TR_Address (ppclo) => sail2_state_monad$bindS
- (mem_read Execute ppclo (( 2 : int):ii) F F F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__8 : ( 16 words$word)
+ | TR_Address ((ppclo, _)) => sail2_state_monad$bindS
+ (mem_read (Execute () ) ppclo (( 2 : int):ii) F F F : ( ( 16 words$word)MemoryOpResult) M) (\ (w__8 : ( 16 words$word)
MemoryOpResult) .
(case w__8 of
MemException (e) => sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__9 : 64 words$word) .
- sail2_state_monad$returnS (F_Error (E_Fetch_Access_Fault, w__9)))
+ sail2_state_monad$returnS (F_Error (e, w__9)))
| MemValue (ilo) =>
if ((isRVC ilo)) then sail2_state_monad$returnS (F_RVC ilo)
else sail2_state_monad$bindS
@@ -34944,16 +60558,16 @@ val _ = Define `
(case ((ext_fetch_check_pc w__11 PC_hi)) of
Ext_FetchAddr_Error (e) => sail2_state_monad$returnS (F_Ext_Error e)
| Ext_FetchAddr_OK (use_pc_hi) => sail2_state_monad$bindS
- (translateAddr use_pc_hi Execute : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__12 : (( 64 words$word), ExceptionType)
+ (translateAddr use_pc_hi (Execute () ) : ( (( 64 words$word), ExceptionType)TR_Result) M) (\ (w__12 : (( 64 words$word), ExceptionType)
TR_Result) .
(case w__12 of
- TR_Failure (e) => sail2_state_monad$returnS (F_Error (e, PC_hi))
- | TR_Address (ppchi) => sail2_state_monad$bindS
- (mem_read Execute ppchi (( 2 : int):ii) F F F
+ TR_Failure ((e, _)) => sail2_state_monad$returnS (F_Error (e, PC_hi))
+ | TR_Address ((ppchi, _)) => sail2_state_monad$bindS
+ (mem_read (Execute () ) ppchi (( 2 : int):ii) F F F
: ( ( 16 words$word)MemoryOpResult) M) (\ (w__13 : ( 16 words$word)
MemoryOpResult) .
sail2_state_monad$returnS ((case w__13 of
- MemException (e) => F_Error (E_Fetch_Access_Fault, PC_hi)
+ MemException (e) => F_Error (e, PC_hi)
| MemValue (ihi) => F_Base ((concat_vec ihi ilo : 32 words$word))
)))
))
@@ -34986,8 +60600,8 @@ val _ = Define `
let (_ : unit) = (ext_handle_fetch_check_error e) in
sail2_state_monad$returnS (RETIRE_FAIL, F)
| F_Error ((e, addr)) => sail2_state_monad$seqS (handle_mem_exception addr e) (sail2_state_monad$returnS (RETIRE_FAIL, F))
- | F_RVC (h) =>
- let ast = (decodeCompressed h) in sail2_state_monad$bindS (sail2_state_monad$seqS
+ | F_RVC (h) => sail2_state_monad$bindS
+ (decodeCompressed h) (\ ast . sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_instr () )) then sail2_state_monad$bindS
(sail2_state_monad$read_regS cur_privilege_ref) (\ (w__3 : Privilege) . sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__4 : 64 words$word) . sail2_state_monad$bindS
@@ -35009,7 +60623,7 @@ val _ = Define `
(sail2_state_monad$write_regS nextPC_ref ((add_vec_int w__7 (( 2 : int):ii) : 64 words$word)))
(ext_post_decode_hook ast)) (\ (w__8 : ast) . sail2_state_monad$bindS
(execute w__8) (\ (w__9 : Retired) . sail2_state_monad$returnS (w__9, T))))
- else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS (RETIRE_FAIL, T)))
+ else sail2_state_monad$seqS (handle_illegal () ) (sail2_state_monad$returnS (RETIRE_FAIL, T))))
| F_Base (w) => sail2_state_monad$bindS
(decode w) (\ ast . sail2_state_monad$bindS (sail2_state_monad$seqS
(if ((get_config_print_instr () )) then sail2_state_monad$bindS
@@ -35056,7 +60670,7 @@ val _ = Define `
(if w__1 then sail2_state_monad$bindS
(sail2_state_monad$read_regS htif_exit_code_ref : ( 64 words$word) M) (\ (w__2 : 64 words$word) .
let exit_val = (lem$w2ui w__2) in
- sail2_state_monad$returnS (let _ =
+ sail2_state_monad$returnS (let (_ : unit) =
(if (((exit_val = (( 0 : int):ii)))) then print_endline "SUCCESS"
else print_int "FAILURE: " exit_val) in
i))
@@ -35080,11 +60694,17 @@ val _ = Define `
val _ = Define `
-((GPRstr:(string)list)=
+((GPRstrs:(string)list)=
(["x31";"x30";"x29";"x28";"x27";"x26";"x25";"x24";"x23";"x22";"x21";"x20";"x19";"x18";"x17";"x16";
"x15";"x14";"x13";"x12";"x11";"x10";"x9";"x8";"x7";"x6";"x5";"x4";"x3";"x2";"x1";"x0"]))`;
+(*val GPRstr : mword ty5 -> string*)
+
+val _ = Define `
+ ((GPRstr:(5)words$word -> string) i= (access_list_dec GPRstrs ((lem$w2ui i))))`;
+
+
val _ = Define `
((CIA_fp:regfp)= (RFull "CIA"))`;
@@ -35107,13 +60727,13 @@ val _ = Define `
EBREAK (() ) => sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| UTYPE ((imm, rd, op)) =>
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| RISCV_JAL ((imm, rd)) =>
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
let (offset : 64 bits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__0 : 64 words$word) .
let (Nias : niafp list) = ([NIAFP_concrete_address ((add_vec w__0 offset : 64 words$word))]) in
@@ -35121,22 +60741,22 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| RISCV_JALR ((imm, rs, rd)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
let (offset : 64 bits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in
let (Nias : niafp list) = ([NIAFP_indirect_address () ]) in
let (ik : instruction_kind) = (IK_branch () ) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| BTYPE ((imm, rs2, rs1, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let ik = (IK_branch () ) in
let (offset : 64 bits) = ((EXTS (( 64 : int):ii) imm : 64 words$word)) in sail2_state_monad$bindS
(sail2_state_monad$read_regS PC_ref : ( 64 words$word) M) (\ (w__1 : 64 words$word) .
@@ -35145,30 +60765,30 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| ITYPE ((imm, rs, rd, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| SHIFTIOP ((imm, rs, rd, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| RTYPE ((rs2, rs1, rd, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| CSR ((csr, rs1, rd, is_imm, op)) =>
let (isWrite : bool) =
@@ -35177,19 +60797,17 @@ val _ = Define `
| _ => if is_imm then (((lem$w2ui rs1)) <> (( 0 : int):ii)) else (((lem$w2ui rs1)) <> (( 0 : int):ii))
)) in
let (iR : regfp list) = ((RFull ((csr_name csr))) :: iR) in
- let (iR : regfp list) =
- (if ((~ is_imm)) then (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR
- else iR) in
+ let (iR : regfp list) = (if ((~ is_imm)) then (RFull ((GPRstr rs1))) :: iR else iR) in
let (oR : regfp list) = (if isWrite then (RFull ((csr_name csr))) :: oR else oR) in
- let (oR : regfp list) = ((RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ let (oR : regfp list) = ((RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| LOAD ((imm, rs, rd, unsign, width, aq, rl)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
let aR = iR in sail2_state_monad$bindS
(case (aq, rl) of
(F, F) => sail2_state_monad$returnS (IK_mem_read Read_plain)
@@ -35201,14 +60819,14 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| STORE ((imm, rs2, rs1, width, aq, rl)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (aR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then aR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: aR) in sail2_state_monad$bindS
+ (if (((rs1 = (0b00000w : 5 words$word)))) then aR
+ else (RFull ((GPRstr rs1))) :: aR) in sail2_state_monad$bindS
(case (aq, rl) of
(F, F) => sail2_state_monad$returnS (IK_mem_write Write_plain)
| (F, T) => sail2_state_monad$returnS (IK_mem_write Write_RISCV_release)
@@ -35219,53 +60837,54 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| ADDIW ((imm, rs, rd)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| SHIFTW ((imm, rs, rd, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs))))) :: iR) in
+ (if (((rs = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| RTYPEW ((rs2, rs1, rd, op)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| FENCE ((pred, succ)) => sail2_state_monad$bindS
(case (pred, succ) of
- (v__838, v__839) =>
- if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_rw_rw)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_r_rw)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_r_r)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_rw_w)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_w_w)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_w_rw)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_rw_r)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_r_w)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B0] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_w_r)
- else if ((((((((subrange_vec_dec v__838 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word)))) /\ (((((subrange_vec_dec v__839 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B0;B0] : 2 words$word))))))) then
+ (v__1502, v__1503) =>
+ if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_rw_rw () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_r_rw () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_r_r () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_rw_w () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_w_w () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_w_rw () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_rw_r () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_r_w () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b01w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b10w : 2 words$word))))))) then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_w_r () ))
+ else if ((((((((subrange_vec_dec v__1502 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word)))) /\ (((((subrange_vec_dec v__1503 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b00w : 2 words$word))))))) then
sail2_state_monad$returnS (IK_simple () )
else internal_error "barrier type not implemented in initial_analysis"
) (\ (w__17 : instruction_kind) .
@@ -35273,9 +60892,10 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| FENCE_TSO ((pred, succ)) => sail2_state_monad$bindS
(case (pred, succ) of
- (v__878, v__879) =>
- if ((((((((subrange_vec_dec v__878 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word)))) /\ (((((subrange_vec_dec v__879 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (vec_of_bits [B1;B1] : 2 words$word))))))) then
- sail2_state_monad$returnS (IK_barrier Barrier_RISCV_tso)
+ (v__1542, v__1543) =>
+ if ((((((((subrange_vec_dec v__1542 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))) /\ (((((subrange_vec_dec v__1543 (( 1 : int):ii) (( 0 : int):ii) : 2 words$word)) = (0b11w : 2 words$word)))))))
+ then
+ sail2_state_monad$returnS (IK_barrier (Barrier_RISCV_tso () ))
else internal_error "barrier type not implemented in initial_analysis"
) (\ (w__20 : instruction_kind) .
let (ik : instruction_kind) = w__20 in
@@ -35285,11 +60905,11 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR)
| LOADRES ((aq, rl, rs1, width, rd)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
let aR = iR in sail2_state_monad$bindS
(case (aq, rl) of
(F, F) => sail2_state_monad$returnS (IK_mem_read Read_RISCV_reserved)
@@ -35301,17 +60921,17 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| STORECON ((aq, rl, rs2, rs1, width, rd)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (aR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then aR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: aR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then aR
+ else (RFull ((GPRstr rs1))) :: aR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in sail2_state_monad$bindS
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in sail2_state_monad$bindS
(case (aq, rl) of
(F, F) => sail2_state_monad$returnS (IK_mem_write Write_RISCV_conditional)
| (F, T) => sail2_state_monad$returnS (IK_mem_write Write_RISCV_conditional_release)
@@ -35322,17 +60942,17 @@ val _ = Define `
sail2_state_monad$returnS (Nias, aR, iR, ik, oR))
| AMO ((op, aq, rl, rs2, rs1, width, rd)) =>
let (iR : regfp list) =
- (if (((((regidx_to_regno rs2)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs2))))) :: iR) in
+ (if (((rs2 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs2))) :: iR) in
let (iR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then iR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: iR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then iR
+ else (RFull ((GPRstr rs1))) :: iR) in
let (aR : regfp list) =
- (if (((((regidx_to_regno rs1)) = (( 0 : int):ii)))) then aR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rs1))))) :: aR) in
+ (if (((rs1 = (0b00000w : 5 words$word)))) then aR
+ else (RFull ((GPRstr rs1))) :: aR) in
let (oR : regfp list) =
- (if (((((regidx_to_regno rd)) = (( 0 : int):ii)))) then oR
- else (RFull ((access_list_dec GPRstr ((regidx_to_regno rd))))) :: oR) in
+ (if (((rd = (0b00000w : 5 words$word)))) then oR
+ else (RFull ((GPRstr rd))) :: oR) in
let (ik : instruction_kind) =
((case (aq, rl) of
(F, F) => IK_mem_rmw (Read_RISCV_reserved, Write_RISCV_conditional)
diff --git a/prover_snapshots/hol4/RV64/riscv_extrasScript.sml b/prover_snapshots/hol4/RV64/riscv_extrasScript.sml
index c6d4fe2..6d00d57 100644
--- a/prover_snapshots/hol4/RV64/riscv_extrasScript.sml
+++ b/prover_snapshots/hol4/RV64/riscv_extrasScript.sml
@@ -1,4 +1,4 @@
-(*Generated by Lem from handwritten_support/riscv_extras.lem.*)
+(*Generated by Lem from handwritten_support/0.11/riscv_extras.lem.*)
open HolKernel Parse boolLib bossLib;
open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
@@ -19,37 +19,37 @@ val _ = new_theory "riscv_extras"
val _ = type_abbrev((* 'a *) "bitvector" , ``: 'a words$word``);
val _ = Define `
- ((MEM_fence_rw_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_rw))`;
+ ((MEM_fence_rw_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_rw () )))`;
val _ = Define `
- ((MEM_fence_r_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_rw))`;
+ ((MEM_fence_r_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_rw () )))`;
val _ = Define `
- ((MEM_fence_r_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_r))`;
+ ((MEM_fence_r_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_r () )))`;
val _ = Define `
- ((MEM_fence_rw_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_w))`;
+ ((MEM_fence_rw_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_w () )))`;
val _ = Define `
- ((MEM_fence_w_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_w))`;
+ ((MEM_fence_w_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_w () )))`;
val _ = Define `
- ((MEM_fence_w_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_rw))`;
+ ((MEM_fence_w_rw:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_rw () )))`;
val _ = Define `
- ((MEM_fence_rw_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_rw_r))`;
+ ((MEM_fence_rw_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_rw_r () )))`;
val _ = Define `
- ((MEM_fence_r_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_r_w))`;
+ ((MEM_fence_r_w:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_r_w () )))`;
val _ = Define `
- ((MEM_fence_w_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_w_r))`;
+ ((MEM_fence_w_r:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_w_r () )))`;
val _ = Define `
- ((MEM_fence_tso:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_tso))`;
+ ((MEM_fence_tso:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_tso () )))`;
val _ = Define `
- ((MEM_fence_i:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier Barrier_RISCV_i))`;
+ ((MEM_fence_i:unit -> 'b sail2_state_monad$sequential_state ->(((unit),'a)sail2_state_monad$result#'b sail2_state_monad$sequential_state)set) () = (barrier (Barrier_RISCV_i () )))`;
(*val MEMea : forall 'rv 'a 'e. Size 'a => bitvector 'a -> integer -> monad 'rv unit 'e*)
@@ -169,6 +169,16 @@ val _ = Define `
((sys_enable_rvc:unit -> bool) () = T)`;
+(*val sys_enable_next : unit -> bool*)
+val _ = Define `
+ ((sys_enable_next:unit -> bool) () = T)`;
+
+
+(*val sys_enable_fdext : unit -> bool*)
+val _ = Define `
+ ((sys_enable_fdext:unit -> bool) () = T)`;
+
+
(*val plat_ram_base : forall 'a. Size 'a => unit -> bitvector 'a*)
val _ = Define `
((plat_ram_base:unit -> 'a words$word) () = (integer_word$i2w(( 0 : int))))`;
diff --git a/prover_snapshots/hol4/RV64/riscv_extras_fdextScript.sml b/prover_snapshots/hol4/RV64/riscv_extras_fdextScript.sml
new file mode 100644
index 0000000..ab68323
--- /dev/null
+++ b/prover_snapshots/hol4/RV64/riscv_extras_fdextScript.sml
@@ -0,0 +1,209 @@
+(*Generated by Lem from handwritten_support/0.11/riscv_extras_fdext.lem.*)
+open HolKernel Parse boolLib bossLib;
+open lem_pervasivesTheory lem_pervasives_extraTheory sail2_instr_kindsTheory sail2_valuesTheory sail2_prompt_monadTheory sail2_operators_mwordsTheory sail2_promptTheory;
+
+val _ = numLib.prefer_num();
+
+
+
+val _ = new_theory "riscv_extras_fdext"
+
+(*open import Pervasives*)
+(*open import Pervasives_extra*)
+(*open import Sail2_instr_kinds*)
+(*open import Sail2_values*)
+(*open import Sail2_operators_mwords*)
+(*open import Sail2_prompt_monad*)
+(*open import Sail2_prompt*)
+
+val _ = type_abbrev((* 'a *) "bitvector0" , ``: 'a words$word``);
+
+(* stub functions emulating the C softfloat interface *)
+
+(*val softfloat_f32_add : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_add:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_sub : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_sub:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_mul : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_mul:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f32_div : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_div:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_add : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_add:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_sub : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_sub:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_mul : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_mul:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+(*val softfloat_f64_div : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_div:'rm words$word -> 's words$word -> 's words$word -> unit) _ _ _= () )`;
+
+
+
+(*val softfloat_f32_muladd : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_muladd:'rm words$word -> 's words$word -> 's words$word -> 's words$word -> unit) _ _ _ _= () )`;
+
+
+(*val softfloat_f64_muladd : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_muladd:'rm words$word -> 's words$word -> 's words$word -> 's words$word -> unit) _ _ _ _= () )`;
+
+
+
+(*val softfloat_f32_sqrt : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_sqrt:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_sqrt : forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_sqrt:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_to_i32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_i32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_ui32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_ui32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i32_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i32_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui32_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui32_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_i64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_i64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_to_ui64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_ui64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f64_to_i32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_i32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_ui32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_ui32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_i64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_i64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_ui64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_ui64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_i64_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_i64_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_ui64_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_ui64_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_to_f64: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_to_f64:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_to_f32: forall 'rm 's. Size 'rm, Size 's => bitvector 'rm -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_to_f32:'rm words$word -> 's words$word -> unit) _ _= () )`;
+
+
+
+(*val softfloat_f32_lt : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_lt:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_le : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_le:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f32_eq : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f32_eq:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_lt : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_lt:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_le : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_le:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+
+(*val softfloat_f64_eq : forall 's. Size 's => bitvector 's -> bitvector 's -> unit*)
+val _ = Define `
+ ((softfloat_f64_eq:'s words$word -> 's words$word -> unit) _ _= () )`;
+
+val _ = export_theory()
+
diff --git a/prover_snapshots/hol4/RV64/riscv_typesScript.sml b/prover_snapshots/hol4/RV64/riscv_typesScript.sml
index 2af410b..3a4fa31 100644
--- a/prover_snapshots/hol4/RV64/riscv_typesScript.sml
+++ b/prover_snapshots/hol4/RV64/riscv_typesScript.sml
@@ -65,12 +65,32 @@ val _ = Hol_datatype `
+
+
+
+
val _ = type_abbrev( "xlenbits" , ``: 64 bits``);
+
+
+
+
+val _ = type_abbrev( "flenbits" , ``: 64 bits``);
+
val _ = type_abbrev( "mem_meta" , ``: unit``);
+val _ = type_abbrev( "exc_code" , ``: 8 bits``);
+
+val _ = type_abbrev( "ext_ptw" , ``: unit``);
+
+val _ = type_abbrev( "ext_ptw_fail" , ``: unit``);
+
+val _ = type_abbrev( "ext_ptw_error" , ``: unit``);
+
+val _ = type_abbrev( "ext_exc_type" , ``: unit``);
+
val _ = type_abbrev( "half" , ``: 16 bits``);
val _ = type_abbrev( "word" , ``: 32 bits``);
@@ -92,7 +112,7 @@ val _ = type_abbrev( "imm20" , ``: 20 bits``);
val _ = type_abbrev( "amo" , ``: 1 bits``);
val _ = Hol_datatype `
- Architecture = RV32 | RV64 | RV128`;
+ Architecture = RV32 | RV64 | RV128`;
@@ -102,38 +122,147 @@ val _ = type_abbrev( "arch_xlen" , ``: 2 bits``);
val _ = type_abbrev( "priv_level" , ``: 2 bits``);
val _ = Hol_datatype `
- Privilege = User | Supervisor | Machine`;
+ Privilege = User | Supervisor | Machine`;
+
+
+
+
+val _ = Hol_datatype `
+ AccessType = Read of ('a) | Write of ('a) | ReadWrite of (('a # 'a)) | Execute of (unit)`;
+
+
+
+
+val _ = Hol_datatype `
+ ExceptionType =
+ E_Fetch_Addr_Align of (unit)
+ | E_Fetch_Access_Fault of (unit)
+ | E_Illegal_Instr of (unit)
+ | E_Breakpoint of (unit)
+ | E_Load_Addr_Align of (unit)
+ | E_Load_Access_Fault of (unit)
+ | E_SAMO_Addr_Align of (unit)
+ | E_SAMO_Access_Fault of (unit)
+ | E_U_EnvCall of (unit)
+ | E_S_EnvCall of (unit)
+ | E_Reserved_10 of (unit)
+ | E_M_EnvCall of (unit)
+ | E_Fetch_Page_Fault of (unit)
+ | E_Load_Page_Fault of (unit)
+ | E_Reserved_14 of (unit)
+ | E_SAMO_Page_Fault of (unit)
+ | E_Extension of (ext_exc_type)`;
+
+
+
+
+val _ = Hol_datatype `
+ amoop = AMOSWAP | AMOADD | AMOXOR | AMOAND | AMOOR | AMOMIN | AMOMAX | AMOMINU | AMOMAXU`;
+
+
+
+
+val _ = Hol_datatype `
+ bop = RISCV_BEQ | RISCV_BNE | RISCV_BLT | RISCV_BGE | RISCV_BLTU | RISCV_BGEU`;
+
+
+
+
+val _ = Hol_datatype `
+ csrop = CSRRW | CSRRS | CSRRC`;
+
+
+
+
+val _ = Hol_datatype `
+ f_bin_op_D = FSGNJ_D | FSGNJN_D | FSGNJX_D | FMIN_D | FMAX_D | FEQ_D | FLT_D | FLE_D`;
+
+
+
+
+val _ = Hol_datatype `
+ f_bin_op_S = FSGNJ_S | FSGNJN_S | FSGNJX_S | FMIN_S | FMAX_S | FEQ_S | FLT_S | FLE_S`;
val _ = Hol_datatype `
- amoop = AMOSWAP | AMOADD | AMOXOR | AMOAND | AMOOR | AMOMIN | AMOMAX | AMOMINU | AMOMAXU`;
+ f_bin_rm_op_D = FADD_D | FSUB_D | FMUL_D | FDIV_D`;
val _ = Hol_datatype `
- bop = RISCV_BEQ | RISCV_BNE | RISCV_BLT | RISCV_BGE | RISCV_BLTU | RISCV_BGEU`;
+ f_bin_rm_op_S = FADD_S | FSUB_S | FMUL_S | FDIV_S`;
val _ = Hol_datatype `
- csrop = CSRRW | CSRRS | CSRRC`;
+ f_madd_op_D = FMADD_D | FMSUB_D | FNMSUB_D | FNMADD_D`;
val _ = Hol_datatype `
- iop = RISCV_ADDI | RISCV_SLTI | RISCV_SLTIU | RISCV_XORI | RISCV_ORI | RISCV_ANDI`;
+ f_madd_op_S = FMADD_S | FMSUB_S | FNMSUB_S | FNMADD_S`;
+
+
+
+
+val _ = Hol_datatype `
+ f_un_op_D = FCLASS_D | FMV_X_D | FMV_D_X`;
+
+
+
+
+val _ = Hol_datatype `
+ f_un_op_S = FCLASS_S | FMV_X_W | FMV_W_X`;
+
+
+
+
+val _ = Hol_datatype `
+ f_un_rm_op_D =
+ FSQRT_D
+ | FCVT_W_D
+ | FCVT_WU_D
+ | FCVT_D_W
+ | FCVT_D_WU
+ | FCVT_S_D
+ | FCVT_D_S
+ | FCVT_L_D
+ | FCVT_LU_D
+ | FCVT_D_L
+ | FCVT_D_LU`;
+
+
+
+
+val _ = Hol_datatype `
+ f_un_rm_op_S =
+ FSQRT_S
+ | FCVT_W_S
+ | FCVT_WU_S
+ | FCVT_S_W
+ | FCVT_S_WU
+ | FCVT_L_S
+ | FCVT_LU_S
+ | FCVT_S_L
+ | FCVT_S_LU`;
+
+
+
+
+val _ = Hol_datatype `
+ iop = RISCV_ADDI | RISCV_SLTI | RISCV_SLTIU | RISCV_XORI | RISCV_ORI | RISCV_ANDI`;
val _ = Hol_datatype `
rop =
- RISCV_ADD
+ RISCV_ADD
| RISCV_SUB
| RISCV_SLL
| RISCV_SLT
@@ -148,31 +277,37 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- ropw = RISCV_ADDW | RISCV_SUBW | RISCV_SLLW | RISCV_SRLW | RISCV_SRAW`;
+ ropw = RISCV_ADDW | RISCV_SUBW | RISCV_SLLW | RISCV_SRLW | RISCV_SRAW`;
val _ = Hol_datatype `
- sop = RISCV_SLLI | RISCV_SRLI | RISCV_SRAI`;
+ rounding_mode = RM_RNE | RM_RTZ | RM_RDN | RM_RUP | RM_RMM | RM_DYN`;
val _ = Hol_datatype `
- sopw = RISCV_SLLIW | RISCV_SRLIW | RISCV_SRAIW`;
+ sop = RISCV_SLLI | RISCV_SRLI | RISCV_SRAI`;
val _ = Hol_datatype `
- uop = RISCV_LUI | RISCV_AUIPC`;
+ sopw = RISCV_SLLIW | RISCV_SRLIW | RISCV_SRAIW`;
val _ = Hol_datatype `
- word_width = BYTE | HALF | WORD | DOUBLE`;
+ uop = RISCV_LUI | RISCV_AUIPC`;
+
+
+
+
+val _ = Hol_datatype `
+ word_width = BYTE | HALF | WORD | DOUBLE`;
@@ -246,6 +381,37 @@ val _ = Hol_datatype `
| REMW of ((regidx # regidx # regidx # bool))
| CSR of (( 12 bits # regidx # regidx # bool # csrop))
| URET of (unit)
+ | C_NOP_HINT of ( 6 bits)
+ | C_ADDI_HINT of (regidx)
+ | C_LI_HINT of ( 6 bits)
+ | C_LUI_HINT of ( 6 bits)
+ | C_MV_HINT of (regidx)
+ | C_ADD_HINT of (regidx)
+ | C_SLLI_HINT of (( 6 bits # regidx))
+ | C_SRLI_HINT of (cregidx)
+ | C_SRAI_HINT of (cregidx)
+ | FENCE_RESERVED of (( 4 bits # 4 bits # 4 bits # regidx # regidx))
+ | FENCEI_RESERVED of (( 12 bits # regidx # regidx))
+ | LOAD_FP of (( 12 bits # regidx # regidx # word_width))
+ | STORE_FP of (( 12 bits # regidx # regidx # word_width))
+ | F_MADD_TYPE_S of ((regidx # regidx # regidx # rounding_mode # regidx # f_madd_op_S))
+ | F_BIN_RM_TYPE_S of ((regidx # regidx # rounding_mode # regidx # f_bin_rm_op_S))
+ | F_UN_RM_TYPE_S of ((regidx # rounding_mode # regidx # f_un_rm_op_S))
+ | F_BIN_TYPE_S of ((regidx # regidx # regidx # f_bin_op_S))
+ | F_UN_TYPE_S of ((regidx # regidx # f_un_op_S))
+ | C_FLWSP of (( 6 bits # regidx))
+ | C_FSWSP of (( 6 bits # regidx))
+ | C_FLW of (( 5 bits # cregidx # cregidx))
+ | C_FSW of (( 5 bits # cregidx # cregidx))
+ | F_MADD_TYPE_D of ((regidx # regidx # regidx # rounding_mode # regidx # f_madd_op_D))
+ | F_BIN_RM_TYPE_D of ((regidx # regidx # rounding_mode # regidx # f_bin_rm_op_D))
+ | F_UN_RM_TYPE_D of ((regidx # rounding_mode # regidx # f_un_rm_op_D))
+ | F_BIN_TYPE_D of ((regidx # regidx # regidx # f_bin_op_D))
+ | F_UN_TYPE_D of ((regidx # regidx # f_un_op_D))
+ | C_FLDSP of (( 6 bits # regidx))
+ | C_FSDSP of (( 6 bits # regidx))
+ | C_FLD of (( 5 bits # cregidx # cregidx))
+ | C_FSD of (( 5 bits # cregidx # cregidx))
| ILLEGAL of (word)
| C_ILLEGAL of (half)`;
@@ -253,22 +419,27 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- Retired = RETIRE_SUCCESS | RETIRE_FAIL`;
+ PTW_Error =
+ PTW_Invalid_Addr of (unit)
+ | PTW_Access of (unit)
+ | PTW_Invalid_PTE of (unit)
+ | PTW_No_Permission of (unit)
+ | PTW_Misaligned of (unit)
+ | PTW_PTE_Update of (unit)
+ | PTW_Ext_Error of (ext_ptw_error)`;
val _ = Hol_datatype `
- AccessType = Read | Write | ReadWrite | Execute`;
-
+ Retired = RETIRE_SUCCESS | RETIRE_FAIL`;
-val _ = type_abbrev( "exc_code" , ``: 8 bits``);
val _ = Hol_datatype `
InterruptType =
- I_U_Software
+ I_U_Software
| I_S_Software
| I_M_Software
| I_U_Timer
@@ -282,29 +453,6 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
- ExceptionType =
- E_Fetch_Addr_Align
- | E_Fetch_Access_Fault
- | E_Illegal_Instr
- | E_Breakpoint
- | E_Load_Addr_Align
- | E_Load_Access_Fault
- | E_SAMO_Addr_Align
- | E_SAMO_Access_Fault
- | E_U_EnvCall
- | E_S_EnvCall
- | E_Reserved_10
- | E_M_EnvCall
- | E_Fetch_Page_Fault
- | E_Load_Page_Fault
- | E_Reserved_14
- | E_SAMO_Page_Fault
- | E_CHERI`;
-
-
-
-
-val _ = Hol_datatype `
exception = Error_not_implemented of (string) | Error_internal_error of (unit)`;
@@ -313,7 +461,7 @@ val _ = Hol_datatype `
val _ = type_abbrev( "tv_mode" , ``: 2 bits``);
val _ = Hol_datatype `
- TrapVectorMode = TV_Direct | TV_Vector | TV_Reserved`;
+ TrapVectorMode = TV_Direct | TV_Vector | TV_Reserved`;
@@ -321,7 +469,7 @@ val _ = Hol_datatype `
val _ = type_abbrev( "ext_status" , ``: 2 bits``);
val _ = Hol_datatype `
- ExtStatus = Off | Initial | Clean | Dirty`;
+ ExtStatus = Off | Initial | Clean | Dirty`;
@@ -329,242 +477,285 @@ val _ = Hol_datatype `
val _ = type_abbrev( "satp_mode" , ``: 4 bits``);
val _ = Hol_datatype `
- SATPMode = Sbare | Sv32 | Sv39 | Sv48`;
+ SATPMode = Sbare | Sv32 | Sv39 | Sv48`;
val _ = type_abbrev( "csrRW" , ``: 2 bits``);
+val _ = type_abbrev( "ext_access_type" , ``: unit``);
+
val _ = type_abbrev( "regtype" , ``: xlenbits``);
+val _ = type_abbrev( "fregtype" , ``: flenbits``);
+
val _ = Hol_datatype `
Misa = <| Misa_Misa_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- SV48_PTE = <| SV48_PTE_SV48_PTE_chunk_0 : 64 words$word |>`;
+ Counteren = <| Counteren_Counteren_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- PTE_Bits = <| PTE_Bits_PTE_Bits_chunk_0 : 8 words$word |>`;
+ Counterin = <| Counterin_Counterin_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Pmpcfg_ent = <| Pmpcfg_ent_Pmpcfg_ent_chunk_0 : 8 words$word |>`;
+ Fcsr = <| Fcsr_Fcsr_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Mstatus = <| Mstatus_Mstatus_chunk_0 : 64 words$word |>`;
+ Mcause = <| Mcause_Mcause_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Sstatus = <| Sstatus_Sstatus_chunk_0 : 64 words$word |>`;
+ Medeleg = <| Medeleg_Medeleg_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Ustatus = <| Ustatus_Ustatus_chunk_0 : 64 words$word |>`;
+ Minterrupts = <| Minterrupts_Minterrupts_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Minterrupts = <| Minterrupts_Minterrupts_chunk_0 : 64 words$word |>`;
+ Mstatus = <| Mstatus_Mstatus_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Sinterrupts = <| Sinterrupts_Sinterrupts_chunk_0 : 64 words$word |>`;
+ Mstatush = <| Mstatush_Mstatush_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Uinterrupts = <| Uinterrupts_Uinterrupts_chunk_0 : 64 words$word |>`;
+ Mtvec = <| Mtvec_Mtvec_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Medeleg = <| Medeleg_Medeleg_chunk_0 : 64 words$word |>`;
+ PTE_Bits = <| PTE_Bits_PTE_Bits_chunk_0 : 8 words$word |>`;
val _ = Hol_datatype `
- Sedeleg = <| Sedeleg_Sedeleg_chunk_0 : 64 words$word |>`;
+ Pmpcfg_ent = <| Pmpcfg_ent_Pmpcfg_ent_chunk_0 : 8 words$word |>`;
val _ = Hol_datatype `
- Mtvec = <| Mtvec_Mtvec_chunk_0 : 64 words$word |>`;
+ SV32_PTE = <| SV32_PTE_SV32_PTE_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Satp32 = <| Satp32_Satp32_chunk_0 : 32 words$word |>`;
+ SV32_Paddr = <| SV32_Paddr_SV32_Paddr_chunk_0 : 34 words$word |>`;
val _ = Hol_datatype `
- Mcause = <| Mcause_Mcause_chunk_0 : 64 words$word |>`;
+ SV32_Vaddr = <| SV32_Vaddr_SV32_Vaddr_chunk_0 : 32 words$word |>`;
val _ = Hol_datatype `
- Counteren = <| Counteren_Counteren_chunk_0 : 32 words$word |>`;
+ SV39_PTE = <| SV39_PTE_SV39_PTE_chunk_0 : 64 words$word |>`;
val _ = Hol_datatype `
- Satp64 = <| Satp64_Satp64_chunk_0 : 64 words$word |>`;
+ SV39_Paddr = <| SV39_Paddr_SV39_Paddr_chunk_0 : 56 words$word |>`;
val _ = Hol_datatype `
- PmpAddrMatchType = OFF | TOR | NA4 | NAPOT`;
+ SV39_Vaddr = <| SV39_Vaddr_SV39_Vaddr_chunk_0 : 39 words$word |>`;
+
+val _ = Hol_datatype `
+ SV48_PTE = <| SV48_PTE_SV48_PTE_chunk_0 : 64 words$word |>`;
-val _ = type_abbrev( "pmp_addr_range" , ``: ((xlenbits # xlenbits))option``);
val _ = Hol_datatype `
- pmpAddrMatch = PMP_NoMatch | PMP_PartialMatch | PMP_Match`;
+ SV48_Paddr = <| SV48_Paddr_SV48_Paddr_chunk_0 : 56 words$word |>`;
+val _ = Hol_datatype `
+ SV48_Vaddr = <| SV48_Vaddr_SV48_Vaddr_chunk_0 : 48 words$word |>`;
+
+
val _ = Hol_datatype `
- pmpMatch = PMP_Success | PMP_Continue | PMP_Fail`;
+ Satp32 = <| Satp32_Satp32_chunk_0 : 32 words$word |>`;
+
+val _ = Hol_datatype `
+ Satp64 = <| Satp64_Satp64_chunk_0 : 64 words$word |>`;
+
val _ = Hol_datatype `
- Ext_FetchAddr_Check = Ext_FetchAddr_OK of (xlenbits) | Ext_FetchAddr_Error of ('a)`;
+ Sedeleg = <| Sedeleg_Sedeleg_chunk_0 : 64 words$word |>`;
+
+val _ = Hol_datatype `
+ Sinterrupts = <| Sinterrupts_Sinterrupts_chunk_0 : 64 words$word |>`;
+
val _ = Hol_datatype `
- Ext_ControlAddr_Check = Ext_ControlAddr_OK of (xlenbits) | Ext_ControlAddr_Error of ('a)`;
+ Sstatus = <| Sstatus_Sstatus_chunk_0 : 64 words$word |>`;
+
+val _ = Hol_datatype `
+ Uinterrupts = <| Uinterrupts_Uinterrupts_chunk_0 : 64 words$word |>`;
+
val _ = Hol_datatype `
- Ext_DataAddr_Check = Ext_DataAddr_OK of (xlenbits) | Ext_DataAddr_Error of ('a)`;
+ Ustatus = <| Ustatus_Ustatus_chunk_0 : 64 words$word |>`;
+
+val _ = Hol_datatype `
+ htif_cmd = <| htif_cmd_htif_cmd_chunk_0 : 64 words$word |>`;
-val _ = type_abbrev( "ext_fetch_addr_error" , ``: unit``);
-val _ = type_abbrev( "ext_control_addr_error" , ``: unit``);
+val _ = Hol_datatype `
+ PmpAddrMatchType = OFF | TOR | NA4 | NAPOT`;
-val _ = type_abbrev( "ext_data_addr_error" , ``: unit``);
-val _ = type_abbrev( "ext_exception" , ``: unit``);
+
+
+val _ = type_abbrev( "pmp_addr_range" , ``: ((xlenbits # xlenbits))option``);
val _ = Hol_datatype `
- sync_exception =
- <| sync_exception_trap : ExceptionType;
- sync_exception_excinfo : xlenbits option;
- sync_exception_ext : ext_exception option |>`;
+ pmpAddrMatch = PMP_NoMatch | PMP_PartialMatch | PMP_Match`;
+
val _ = Hol_datatype `
- interrupt_set =
- Ints_Pending of (xlenbits) | Ints_Delegated of (xlenbits) | Ints_Empty of (unit)`;
+ pmpMatch = PMP_Success | PMP_Continue | PMP_Fail`;
val _ = Hol_datatype `
- ctl_result =
- CTL_TRAP of (sync_exception) | CTL_SRET of (unit) | CTL_MRET of (unit) | CTL_URET of (unit)`;
+ Ext_FetchAddr_Check = Ext_FetchAddr_OK of (xlenbits) | Ext_FetchAddr_Error of ('a)`;
val _ = Hol_datatype `
- MemoryOpResult = MemValue of ('a) | MemException of (ExceptionType)`;
+ Ext_ControlAddr_Check = Ext_ControlAddr_OK of (xlenbits) | Ext_ControlAddr_Error of ('a)`;
val _ = Hol_datatype `
- htif_cmd = <| htif_cmd_htif_cmd_chunk_0 : 64 words$word |>`;
+ Ext_DataAddr_Check = Ext_DataAddr_OK of (xlenbits) | Ext_DataAddr_Error of ('a)`;
-val _ = type_abbrev( "pteAttribs" , ``: 8 bits``);
val _ = Hol_datatype `
- PTW_Error = PTW_Access | PTW_Invalid_PTE | PTW_No_Permission | PTW_Misaligned | PTW_PTE_Update`;
+ Ext_PhysAddr_Check = Ext_PhysAddr_OK of (unit) | Ext_PhysAddr_Error of (ExceptionType)`;
-val _ = type_abbrev( "vaddr32" , ``: 32 bits``);
+val _ = type_abbrev( "ext_fetch_addr_error" , ``: unit``);
-val _ = type_abbrev( "paddr32" , ``: 34 bits``);
+val _ = type_abbrev( "ext_control_addr_error" , ``: unit``);
-val _ = type_abbrev( "pte32" , ``: 32 bits``);
+val _ = type_abbrev( "ext_data_addr_error" , ``: unit``);
-val _ = type_abbrev( "asid32" , ``: 9 bits``);
+val _ = type_abbrev( "ext_exception" , ``: unit``);
val _ = Hol_datatype `
- SV32_Vaddr = <| SV32_Vaddr_SV32_Vaddr_chunk_0 : 32 words$word |>`;
+ sync_exception =
+ <| sync_exception_trap : ExceptionType;
+ sync_exception_excinfo : xlenbits option;
+ sync_exception_ext : ext_exception option |>`;
-val _ = Hol_datatype `
- SV48_Vaddr = <| SV48_Vaddr_SV48_Vaddr_chunk_0 : 48 words$word |>`;
+val _ = type_abbrev( "bits_rm" , ``: 3 bits``);
+val _ = type_abbrev( "bits_fflags" , ``: 5 bits``);
+val _ = type_abbrev( "bits_S" , ``: 32 bits``);
-val _ = Hol_datatype `
- SV48_Paddr = <| SV48_Paddr_SV48_Paddr_chunk_0 : 56 words$word |>`;
+val _ = type_abbrev( "bits_D" , ``: 64 bits``);
+
+val _ = type_abbrev( "bits_W" , ``: 32 bits``);
+val _ = type_abbrev( "bits_WU" , ``: 32 bits``);
+val _ = type_abbrev( "bits_L" , ``: 64 bits``);
+
+val _ = type_abbrev( "bits_LU" , ``: 64 bits``);
val _ = Hol_datatype `
- SV32_Paddr = <| SV32_Paddr_SV32_Paddr_chunk_0 : 34 words$word |>`;
+ interrupt_set =
+ Ints_Pending of (xlenbits) | Ints_Delegated of (xlenbits) | Ints_Empty of (unit)`;
+
val _ = Hol_datatype `
- SV32_PTE = <| SV32_PTE_SV32_PTE_chunk_0 : 32 words$word |>`;
+ ctl_result =
+ CTL_TRAP of (sync_exception) | CTL_SRET of (unit) | CTL_MRET of (unit) | CTL_URET of (unit)`;
-val _ = type_abbrev( "paddr64" , ``: 56 bits``);
-val _ = type_abbrev( "pte64" , ``: 64 bits``);
+val _ = Hol_datatype `
+ MemoryOpResult = MemValue of ('a) | MemException of (ExceptionType)`;
-val _ = type_abbrev( "asid64" , ``: 16 bits``);
-val _ = type_abbrev( "vaddr39" , ``: 39 bits``);
-val _ = Hol_datatype `
- SV39_Vaddr = <| SV39_Vaddr_SV39_Vaddr_chunk_0 : 39 words$word |>`;
+val _ = type_abbrev( "pteAttribs" , ``: 8 bits``);
+val _ = type_abbrev( "extPte" , ``: 10 bits``);
val _ = Hol_datatype `
- SV39_Paddr = <| SV39_Paddr_SV39_Paddr_chunk_0 : 56 words$word |>`;
+ PTE_Check = PTE_Check_Success of (ext_ptw) | PTE_Check_Failure of ((ext_ptw # ext_ptw_fail))`;
-val _ = Hol_datatype `
- SV39_PTE = <| SV39_PTE_SV39_PTE_chunk_0 : 64 words$word |>`;
+val _ = type_abbrev( "vaddr32" , ``: 32 bits``);
+
+val _ = type_abbrev( "paddr32" , ``: 34 bits``);
+
+val _ = type_abbrev( "pte32" , ``: 32 bits``);
+
+val _ = type_abbrev( "asid32" , ``: 9 bits``);
+
+val _ = type_abbrev( "paddr64" , ``: 56 bits``);
+val _ = type_abbrev( "pte64" , ``: 64 bits``);
+
+val _ = type_abbrev( "asid64" , ``: 16 bits``);
+
+val _ = type_abbrev( "vaddr39" , ``: 39 bits``);
val _ = type_abbrev( "vaddr48" , ``: 48 bits``);
@@ -572,13 +763,15 @@ val _ = type_abbrev( "pte48" , ``: 64 bits``);
val _ = Hol_datatype `
PTW_Result =
- PTW_Success of (('paddr # 'pte # 'paddr # ii # bool)) | PTW_Failure of (PTW_Error)`;
+ PTW_Success of (('paddr # 'pte # 'paddr # ii # bool # ext_ptw))
+ | PTW_Failure of ((PTW_Error # ext_ptw))`;
val _ = Hol_datatype `
- TR_Result = TR_Address of ('a_paddr) | TR_Failure of ('b_failure)`;
+ TR_Result =
+ TR_Address of (('a_paddr # ext_ptw)) | TR_Failure of (('b_failure # ext_ptw))`;
@@ -613,15 +806,18 @@ val _ = Hol_datatype `
val _ = Hol_datatype `
register_value =
- Regval_vector of ((ii # bool # register_value list))
+ Regval_vector of ( register_value list)
| Regval_list of ( register_value list)
| Regval_option of ( register_value option)
| Regval_Counteren of (Counteren)
+ | Regval_Counterin of (Counterin)
+ | Regval_Fcsr of (Fcsr)
| Regval_Mcause of (Mcause)
| Regval_Medeleg of (Medeleg)
| Regval_Minterrupts of (Minterrupts)
| Regval_Misa of (Misa)
| Regval_Mstatus of (Mstatus)
+ | Regval_Mstatush of (Mstatush)
| Regval_Mtvec of (Mtvec)
| Regval_Pmpcfg_ent of (Pmpcfg_ent)
| Regval_Privilege of (Privilege)
@@ -629,125 +825,38 @@ val _ = Hol_datatype `
| Regval_Sinterrupts of (Sinterrupts)
| Regval_TLB_Entry_16_39_56_64 of ( (16, 39, 56, 64)TLB_Entry)
| Regval_TLB_Entry_16_48_56_64 of ( (16, 48, 56, 64)TLB_Entry)
- | Regval_bool of (bool)
- | Regval_vector_32_dec_bit of ( 32 words$word)
- | Regval_vector_64_dec_bit of ( 64 words$word)`;
+ | Regval_bit of (bitU)
+ | Regval_bitvector_32_dec of ( 32 words$word)
+ | Regval_bitvector_4_dec of ( 4 words$word)
+ | Regval_bitvector_64_dec of ( 64 words$word)
+ | Regval_bool of (bool)`;
val _ = Hol_datatype `
regstate =
- <| satp : 64 words$word;
- tlb48 : ( (16, 48, 56, 64)TLB_Entry)option;
- tlb39 : ( (16, 39, 56, 64)TLB_Entry)option;
- htif_exit_code : 64 words$word;
- htif_done : bool;
- htif_tohost : 64 words$word;
- mtimecmp : 64 words$word;
- utval : 64 words$word;
- ucause : Mcause;
- uepc : 64 words$word;
- uscratch : 64 words$word;
- utvec : Mtvec;
- pmpaddr15 : 64 words$word;
- pmpaddr14 : 64 words$word;
- pmpaddr13 : 64 words$word;
- pmpaddr12 : 64 words$word;
- pmpaddr11 : 64 words$word;
- pmpaddr10 : 64 words$word;
- pmpaddr9 : 64 words$word;
- pmpaddr8 : 64 words$word;
- pmpaddr7 : 64 words$word;
- pmpaddr6 : 64 words$word;
- pmpaddr5 : 64 words$word;
- pmpaddr4 : 64 words$word;
- pmpaddr3 : 64 words$word;
- pmpaddr2 : 64 words$word;
- pmpaddr1 : 64 words$word;
- pmpaddr0 : 64 words$word;
- pmp15cfg : Pmpcfg_ent;
- pmp14cfg : Pmpcfg_ent;
- pmp13cfg : Pmpcfg_ent;
- pmp12cfg : Pmpcfg_ent;
- pmp11cfg : Pmpcfg_ent;
- pmp10cfg : Pmpcfg_ent;
- pmp9cfg : Pmpcfg_ent;
- pmp8cfg : Pmpcfg_ent;
- pmp7cfg : Pmpcfg_ent;
- pmp6cfg : Pmpcfg_ent;
- pmp5cfg : Pmpcfg_ent;
- pmp4cfg : Pmpcfg_ent;
- pmp3cfg : Pmpcfg_ent;
- pmp2cfg : Pmpcfg_ent;
- pmp1cfg : Pmpcfg_ent;
- pmp0cfg : Pmpcfg_ent;
- tselect : 64 words$word;
- stval : 64 words$word;
- scause : Mcause;
- sepc : 64 words$word;
- sscratch : 64 words$word;
- stvec : Mtvec;
- sideleg : Sinterrupts;
- sedeleg : Sedeleg;
- mhartid : 64 words$word;
- marchid : 64 words$word;
- mimpid : 64 words$word;
- mvendorid : 32 words$word;
- minstret_written : bool;
- minstret : 64 words$word;
- mtime : 64 words$word;
- mcycle : 64 words$word;
- scounteren : Counteren;
- mcounteren : Counteren;
- mscratch : 64 words$word;
- mtval : 64 words$word;
- mepc : 64 words$word;
- mcause : Mcause;
- mtvec : Mtvec;
- medeleg : Medeleg;
- mideleg : Minterrupts;
- mie : Minterrupts;
- mip : Minterrupts;
- mstatus : Mstatus;
- misa : Misa;
- cur_inst : 64 words$word;
- cur_privilege : Privilege;
- x31 : 64 words$word;
- x30 : 64 words$word;
- x29 : 64 words$word;
- x28 : 64 words$word;
- x27 : 64 words$word;
- x26 : 64 words$word;
- x25 : 64 words$word;
- x24 : 64 words$word;
- x23 : 64 words$word;
- x22 : 64 words$word;
- x21 : 64 words$word;
- x20 : 64 words$word;
- x19 : 64 words$word;
- x18 : 64 words$word;
- x17 : 64 words$word;
- x16 : 64 words$word;
- x15 : 64 words$word;
- x14 : 64 words$word;
- x13 : 64 words$word;
- x12 : 64 words$word;
- x11 : 64 words$word;
- x10 : 64 words$word;
- x9 : 64 words$word;
- x8 : 64 words$word;
- x7 : 64 words$word;
- x6 : 64 words$word;
- x5 : 64 words$word;
- x4 : 64 words$word;
- x3 : 64 words$word;
- x2 : 64 words$word;
- x1 : 64 words$word;
- Xs : ( 64 words$word) list;
- instbits : 64 words$word;
- nextPC : 64 words$word;
- PC : 64 words$word |>`;
+ <| Counteren_reg : string -> Counteren;
+ Counterin_reg : string -> Counterin;
+ Fcsr_reg : string -> Fcsr;
+ Mcause_reg : string -> Mcause;
+ Medeleg_reg : string -> Medeleg;
+ Minterrupts_reg : string -> Minterrupts;
+ Misa_reg : string -> Misa;
+ Mstatus_reg : string -> Mstatus;
+ Mstatush_reg : string -> Mstatush;
+ Mtvec_reg : string -> Mtvec;
+ Pmpcfg_ent_reg : string -> Pmpcfg_ent;
+ Privilege_reg : string -> Privilege;
+ Sedeleg_reg : string -> Sedeleg;
+ Sinterrupts_reg : string -> Sinterrupts;
+ bit_reg : string -> bitU;
+ bitvector_32_dec_reg : string -> 32 words$word;
+ bitvector_4_dec_reg : string -> 4 words$word;
+ bitvector_64_dec_reg : string -> 64 words$word;
+ bool_reg : string -> bool;
+ option_TLB_Entry_16_39_56_64_reg : string -> ( (16, 39, 56, 64)TLB_Entry)option;
+ option_TLB_Entry_16_48_56_64_reg : string -> ( (16, 48, 56, 64)TLB_Entry)option |>`;
@@ -766,6 +875,31 @@ val _ = Define `
((regval_of_Counteren:Counteren -> register_value) v= (Regval_Counteren v))`;
+(*val Counterin_of_regval : register_value -> maybe Counterin*)
+
+val _ = Define `
+ ((Counterin_of_regval:register_value ->(Counterin)option) merge_var=
+ ((case merge_var of Regval_Counterin (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Counterin : Counterin -> register_value*)
+
+val _ = Define `
+ ((regval_of_Counterin:Counterin -> register_value) v= (Regval_Counterin v))`;
+
+
+(*val Fcsr_of_regval : register_value -> maybe Fcsr*)
+
+val _ = Define `
+ ((Fcsr_of_regval:register_value ->(Fcsr)option) merge_var= ((case merge_var of Regval_Fcsr (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Fcsr : Fcsr -> register_value*)
+
+val _ = Define `
+ ((regval_of_Fcsr:Fcsr -> register_value) v= (Regval_Fcsr v))`;
+
+
(*val Mcause_of_regval : register_value -> maybe Mcause*)
val _ = Define `
@@ -830,6 +964,19 @@ val _ = Define `
((regval_of_Mstatus:Mstatus -> register_value) v= (Regval_Mstatus v))`;
+(*val Mstatush_of_regval : register_value -> maybe Mstatush*)
+
+val _ = Define `
+ ((Mstatush_of_regval:register_value ->(Mstatush)option) merge_var=
+ ((case merge_var of Regval_Mstatush (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_Mstatush : Mstatush -> register_value*)
+
+val _ = Define `
+ ((regval_of_Mstatush:Mstatush -> register_value) v= (Regval_Mstatush v))`;
+
+
(*val Mtvec_of_regval : register_value -> maybe Mtvec*)
val _ = Define `
@@ -920,42 +1067,67 @@ val _ = Define `
((regval_of_TLB_Entry_16_48_56_64:((16),(48),(56),(64))TLB_Entry -> register_value) v= (Regval_TLB_Entry_16_48_56_64 v))`;
-(*val bool_of_regval : register_value -> maybe bool*)
+(*val bit_of_regval : register_value -> maybe bitU*)
val _ = Define `
- ((bool_of_regval:register_value ->(bool)option) merge_var= ((case merge_var of Regval_bool (v) => SOME v | _ => NONE )))`;
+ ((bit_of_regval:register_value ->(bitU)option) merge_var= ((case merge_var of Regval_bit (v) => SOME v | _ => NONE )))`;
-(*val regval_of_bool : bool -> register_value*)
+(*val regval_of_bit : bitU -> register_value*)
val _ = Define `
- ((regval_of_bool:bool -> register_value) v= (Regval_bool v))`;
+ ((regval_of_bit:bitU -> register_value) v= (Regval_bit v))`;
-(*val vector_32_dec_bit_of_regval : register_value -> maybe (mword ty32)*)
+(*val bitvector_32_dec_of_regval : register_value -> maybe (mword ty32)*)
val _ = Define `
- ((vector_32_dec_bit_of_regval:register_value ->((32)words$word)option) merge_var=
- ((case merge_var of Regval_vector_32_dec_bit (v) => SOME v | _ => NONE )))`;
+ ((bitvector_32_dec_of_regval:register_value ->((32)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_32_dec (v) => SOME v | _ => NONE )))`;
-(*val regval_of_vector_32_dec_bit : mword ty32 -> register_value*)
+(*val regval_of_bitvector_32_dec : mword ty32 -> register_value*)
val _ = Define `
- ((regval_of_vector_32_dec_bit:(32)words$word -> register_value) v= (Regval_vector_32_dec_bit v))`;
+ ((regval_of_bitvector_32_dec:(32)words$word -> register_value) v= (Regval_bitvector_32_dec v))`;
-(*val vector_64_dec_bit_of_regval : register_value -> maybe (mword ty64)*)
+(*val bitvector_4_dec_of_regval : register_value -> maybe (mword ty4)*)
val _ = Define `
- ((vector_64_dec_bit_of_regval:register_value ->((64)words$word)option) merge_var=
- ((case merge_var of Regval_vector_64_dec_bit (v) => SOME v | _ => NONE )))`;
+ ((bitvector_4_dec_of_regval:register_value ->((4)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_4_dec (v) => SOME v | _ => NONE )))`;
-(*val regval_of_vector_64_dec_bit : mword ty64 -> register_value*)
+(*val regval_of_bitvector_4_dec : mword ty4 -> register_value*)
val _ = Define `
- ((regval_of_vector_64_dec_bit:(64)words$word -> register_value) v= (Regval_vector_64_dec_bit v))`;
+ ((regval_of_bitvector_4_dec:(4)words$word -> register_value) v= (Regval_bitvector_4_dec v))`;
+
+
+(*val bitvector_64_dec_of_regval : register_value -> maybe (mword ty64)*)
+
+val _ = Define `
+ ((bitvector_64_dec_of_regval:register_value ->((64)words$word)option) merge_var=
+ ((case merge_var of Regval_bitvector_64_dec (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_bitvector_64_dec : mword ty64 -> register_value*)
+
+val _ = Define `
+ ((regval_of_bitvector_64_dec:(64)words$word -> register_value) v= (Regval_bitvector_64_dec v))`;
+
+
+(*val bool_of_regval : register_value -> maybe bool*)
+
+val _ = Define `
+ ((bool_of_regval:register_value ->(bool)option) merge_var= ((case merge_var of Regval_bool (v) => SOME v | _ => NONE )))`;
+
+
+(*val regval_of_bool : bool -> register_value*)
+
+val _ = Define `
+ ((regval_of_bool:bool -> register_value) v= (Regval_bool v))`;
@@ -964,14 +1136,14 @@ val _ = Define `
val _ = Define `
((vector_of_regval:(register_value -> 'a option) -> register_value ->('a list)option) of_regval1=
(\x . (case x of
- Regval_vector (_, _, v) => just_list (MAP of_regval1 v)
+ Regval_vector v => just_list (MAP of_regval1 v)
| _ => NONE
)))`;
-(*val regval_of_vector : forall 'a. ('a -> register_value) -> integer -> bool -> list 'a -> register_value*)
+(*val regval_of_vector : forall 'a. ('a -> register_value) -> list 'a -> register_value*)
val _ = Define `
- ((regval_of_vector:('a -> register_value) -> int -> bool -> 'a list -> register_value) regval_of1 size1 is_inc xs= (Regval_vector (size1, is_inc, MAP regval_of1 xs)))`;
+ ((regval_of_vector:('a -> register_value) -> 'a list -> register_value) regval_of1 xs= (Regval_vector (MAP regval_of1 xs)))`;
(*val list_of_regval : forall 'a. (register_value -> maybe 'a) -> register_value -> maybe (list 'a)*)
@@ -1006,17 +1178,19 @@ val _ = Define `
val _ = Define `
((satp_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "satp";
- read_from := (\ s . s.satp);
- write_to := (\ v s . (( s with<| satp := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "satp");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "satp" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((tlb48_ref:((regstate),(register_value),((((16),(48),(56),(64))TLB_Entry)option))register_ref)= (<|
name := "tlb48";
- read_from := (\ s . s.tlb48);
- write_to := (\ v s . (( s with<| tlb48 := v |>)));
+ read_from := (\ s . s.option_TLB_Entry_16_48_56_64_reg "tlb48");
+ write_to := (\ v s . (( s with<| option_TLB_Entry_16_48_56_64_reg :=
+ (\ reg . if reg = "tlb48" then v else s.option_TLB_Entry_16_48_56_64_reg reg) |>)));
of_regval := (\ v . option_of_regval (\ v . TLB_Entry_16_48_56_64_of_regval v) v);
regval_of := (\ v . regval_of_option (\ v . regval_of_TLB_Entry_16_48_56_64 v) v) |>))`;
@@ -1024,26 +1198,49 @@ val _ = Define `
val _ = Define `
((tlb39_ref:((regstate),(register_value),((((16),(39),(56),(64))TLB_Entry)option))register_ref)= (<|
name := "tlb39";
- read_from := (\ s . s.tlb39);
- write_to := (\ v s . (( s with<| tlb39 := v |>)));
+ read_from := (\ s . s.option_TLB_Entry_16_39_56_64_reg "tlb39");
+ write_to := (\ v s . (( s with<| option_TLB_Entry_16_39_56_64_reg :=
+ (\ reg . if reg = "tlb39" then v else s.option_TLB_Entry_16_39_56_64_reg reg) |>)));
of_regval := (\ v . option_of_regval (\ v . TLB_Entry_16_39_56_64_of_regval v) v);
regval_of := (\ v . regval_of_option (\ v . regval_of_TLB_Entry_16_39_56_64 v) v) |>))`;
val _ = Define `
+ ((htif_payload_writes_ref:((regstate),(register_value),((4)words$word))register_ref)= (<|
+ name := "htif_payload_writes";
+ read_from := (\ s . s.bitvector_4_dec_reg "htif_payload_writes");
+ write_to := (\ v s . (( s with<| bitvector_4_dec_reg :=
+ (\ reg . if reg = "htif_payload_writes" then v else s.bitvector_4_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_4_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_4_dec v) |>))`;
+
+
+val _ = Define `
+ ((htif_cmd_write_ref:((regstate),(register_value),(bitU))register_ref)= (<|
+ name := "htif_cmd_write";
+ read_from := (\ s . s.bit_reg "htif_cmd_write");
+ write_to := (\ v s . (( s with<| bit_reg :=
+ (\ reg . if reg = "htif_cmd_write" then v else s.bit_reg reg) |>)));
+ of_regval := (\ v . bit_of_regval v);
+ regval_of := (\ v . regval_of_bit v) |>))`;
+
+
+val _ = Define `
((htif_exit_code_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "htif_exit_code";
- read_from := (\ s . s.htif_exit_code);
- write_to := (\ v s . (( s with<| htif_exit_code := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "htif_exit_code");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "htif_exit_code" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((htif_done_ref:((regstate),(register_value),(bool))register_ref)= (<|
name := "htif_done";
- read_from := (\ s . s.htif_done);
- write_to := (\ v s . (( s with<| htif_done := v |>)));
+ read_from := (\ s . s.bool_reg "htif_done");
+ write_to := (\ v s . (( s with<| bool_reg :=
+ (\ reg . if reg = "htif_done" then v else s.bool_reg reg) |>)));
of_regval := (\ v . bool_of_regval v);
regval_of := (\ v . regval_of_bool v) |>))`;
@@ -1051,35 +1248,389 @@ val _ = Define `
val _ = Define `
((htif_tohost_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "htif_tohost";
- read_from := (\ s . s.htif_tohost);
- write_to := (\ v s . (( s with<| htif_tohost := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "htif_tohost");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "htif_tohost" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mtimecmp_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mtimecmp";
- read_from := (\ s . s.mtimecmp);
- write_to := (\ v s . (( s with<| mtimecmp := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mtimecmp");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mtimecmp" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((fcsr_ref:((regstate),(register_value),(Fcsr))register_ref)= (<|
+ name := "fcsr";
+ read_from := (\ s . s.Fcsr_reg "fcsr");
+ write_to := (\ v s . (( s with<| Fcsr_reg :=
+ (\ reg . if reg = "fcsr" then v else s.Fcsr_reg reg) |>)));
+ of_regval := (\ v . Fcsr_of_regval v);
+ regval_of := (\ v . regval_of_Fcsr v) |>))`;
+
+
+val _ = Define `
+ ((f31_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f31";
+ read_from := (\ s . s.bitvector_64_dec_reg "f31");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f31" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f30_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f30";
+ read_from := (\ s . s.bitvector_64_dec_reg "f30");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f30" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f29_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f29";
+ read_from := (\ s . s.bitvector_64_dec_reg "f29");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f29" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f28_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f28";
+ read_from := (\ s . s.bitvector_64_dec_reg "f28");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f28" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f27_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f27";
+ read_from := (\ s . s.bitvector_64_dec_reg "f27");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f27" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f26_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f26";
+ read_from := (\ s . s.bitvector_64_dec_reg "f26");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f26" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f25_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f25";
+ read_from := (\ s . s.bitvector_64_dec_reg "f25");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f25" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f24_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f24";
+ read_from := (\ s . s.bitvector_64_dec_reg "f24");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f24" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f23_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f23";
+ read_from := (\ s . s.bitvector_64_dec_reg "f23");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f23" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f22_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f22";
+ read_from := (\ s . s.bitvector_64_dec_reg "f22");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f22" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f21_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f21";
+ read_from := (\ s . s.bitvector_64_dec_reg "f21");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f21" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f20_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f20";
+ read_from := (\ s . s.bitvector_64_dec_reg "f20");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f20" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f19_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f19";
+ read_from := (\ s . s.bitvector_64_dec_reg "f19");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f19" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f18_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f18";
+ read_from := (\ s . s.bitvector_64_dec_reg "f18");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f18" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f17_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f17";
+ read_from := (\ s . s.bitvector_64_dec_reg "f17");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f17" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f16_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f16";
+ read_from := (\ s . s.bitvector_64_dec_reg "f16");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f16" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f15_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f15";
+ read_from := (\ s . s.bitvector_64_dec_reg "f15");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f15" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f14_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f14";
+ read_from := (\ s . s.bitvector_64_dec_reg "f14");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f14" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f13_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f13";
+ read_from := (\ s . s.bitvector_64_dec_reg "f13");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f13" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f12_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f12";
+ read_from := (\ s . s.bitvector_64_dec_reg "f12");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f12" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f11_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f11";
+ read_from := (\ s . s.bitvector_64_dec_reg "f11");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f11" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f10_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f10";
+ read_from := (\ s . s.bitvector_64_dec_reg "f10");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f10" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f9_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f9";
+ read_from := (\ s . s.bitvector_64_dec_reg "f9");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f9" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f8_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f8";
+ read_from := (\ s . s.bitvector_64_dec_reg "f8");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f8" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f7_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f7";
+ read_from := (\ s . s.bitvector_64_dec_reg "f7");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f7" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f6_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f6";
+ read_from := (\ s . s.bitvector_64_dec_reg "f6");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f6" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f5_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f5";
+ read_from := (\ s . s.bitvector_64_dec_reg "f5");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f5" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f4_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f4";
+ read_from := (\ s . s.bitvector_64_dec_reg "f4");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f4" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f3_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f3";
+ read_from := (\ s . s.bitvector_64_dec_reg "f3");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f3" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f2_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f2";
+ read_from := (\ s . s.bitvector_64_dec_reg "f2");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f2" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f1_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f1";
+ read_from := (\ s . s.bitvector_64_dec_reg "f1");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f1" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((f0_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "f0";
+ read_from := (\ s . s.bitvector_64_dec_reg "f0");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "f0" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((float_fflags_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "float_fflags";
+ read_from := (\ s . s.bitvector_64_dec_reg "float_fflags");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "float_fflags" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((float_result_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
+ name := "float_result";
+ read_from := (\ s . s.bitvector_64_dec_reg "float_result");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "float_result" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((utval_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "utval";
- read_from := (\ s . s.utval);
- write_to := (\ v s . (( s with<| utval := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "utval");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "utval" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((ucause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "ucause";
- read_from := (\ s . s.ucause);
- write_to := (\ v s . (( s with<| ucause := v |>)));
+ read_from := (\ s . s.Mcause_reg "ucause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "ucause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1087,26 +1638,29 @@ val _ = Define `
val _ = Define `
((uepc_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "uepc";
- read_from := (\ s . s.uepc);
- write_to := (\ v s . (( s with<| uepc := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "uepc");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "uepc" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((uscratch_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "uscratch";
- read_from := (\ s . s.uscratch);
- write_to := (\ v s . (( s with<| uscratch := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "uscratch");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "uscratch" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((utvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "utvec";
- read_from := (\ s . s.utvec);
- write_to := (\ v s . (( s with<| utvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "utvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "utvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1114,152 +1668,169 @@ val _ = Define `
val _ = Define `
((pmpaddr15_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr15";
- read_from := (\ s . s.pmpaddr15);
- write_to := (\ v s . (( s with<| pmpaddr15 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr15");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr15" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr14_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr14";
- read_from := (\ s . s.pmpaddr14);
- write_to := (\ v s . (( s with<| pmpaddr14 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr14");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr14" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr13_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr13";
- read_from := (\ s . s.pmpaddr13);
- write_to := (\ v s . (( s with<| pmpaddr13 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr13");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr13" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr12_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr12";
- read_from := (\ s . s.pmpaddr12);
- write_to := (\ v s . (( s with<| pmpaddr12 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr12");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr12" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr11_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr11";
- read_from := (\ s . s.pmpaddr11);
- write_to := (\ v s . (( s with<| pmpaddr11 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr11");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr11" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr10_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr10";
- read_from := (\ s . s.pmpaddr10);
- write_to := (\ v s . (( s with<| pmpaddr10 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr10");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr10" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr9_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr9";
- read_from := (\ s . s.pmpaddr9);
- write_to := (\ v s . (( s with<| pmpaddr9 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr9");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr9" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr8_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr8";
- read_from := (\ s . s.pmpaddr8);
- write_to := (\ v s . (( s with<| pmpaddr8 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr8");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr8" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr7_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr7";
- read_from := (\ s . s.pmpaddr7);
- write_to := (\ v s . (( s with<| pmpaddr7 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr7");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr7" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr6_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr6";
- read_from := (\ s . s.pmpaddr6);
- write_to := (\ v s . (( s with<| pmpaddr6 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr6");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr6" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr5_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr5";
- read_from := (\ s . s.pmpaddr5);
- write_to := (\ v s . (( s with<| pmpaddr5 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr5");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr5" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr4_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr4";
- read_from := (\ s . s.pmpaddr4);
- write_to := (\ v s . (( s with<| pmpaddr4 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr4");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr4" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr3_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr3";
- read_from := (\ s . s.pmpaddr3);
- write_to := (\ v s . (( s with<| pmpaddr3 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr3");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr3" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr2_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr2";
- read_from := (\ s . s.pmpaddr2);
- write_to := (\ v s . (( s with<| pmpaddr2 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr2");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr2" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr1_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr1";
- read_from := (\ s . s.pmpaddr1);
- write_to := (\ v s . (( s with<| pmpaddr1 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr1");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr1" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmpaddr0_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "pmpaddr0";
- read_from := (\ s . s.pmpaddr0);
- write_to := (\ v s . (( s with<| pmpaddr0 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "pmpaddr0");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "pmpaddr0" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((pmp15cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp15cfg";
- read_from := (\ s . s.pmp15cfg);
- write_to := (\ v s . (( s with<| pmp15cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp15cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp15cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1267,8 +1838,9 @@ val _ = Define `
val _ = Define `
((pmp14cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp14cfg";
- read_from := (\ s . s.pmp14cfg);
- write_to := (\ v s . (( s with<| pmp14cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp14cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp14cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1276,8 +1848,9 @@ val _ = Define `
val _ = Define `
((pmp13cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp13cfg";
- read_from := (\ s . s.pmp13cfg);
- write_to := (\ v s . (( s with<| pmp13cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp13cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp13cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1285,8 +1858,9 @@ val _ = Define `
val _ = Define `
((pmp12cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp12cfg";
- read_from := (\ s . s.pmp12cfg);
- write_to := (\ v s . (( s with<| pmp12cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp12cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp12cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1294,8 +1868,9 @@ val _ = Define `
val _ = Define `
((pmp11cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp11cfg";
- read_from := (\ s . s.pmp11cfg);
- write_to := (\ v s . (( s with<| pmp11cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp11cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp11cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1303,8 +1878,9 @@ val _ = Define `
val _ = Define `
((pmp10cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp10cfg";
- read_from := (\ s . s.pmp10cfg);
- write_to := (\ v s . (( s with<| pmp10cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp10cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp10cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1312,8 +1888,9 @@ val _ = Define `
val _ = Define `
((pmp9cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp9cfg";
- read_from := (\ s . s.pmp9cfg);
- write_to := (\ v s . (( s with<| pmp9cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp9cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp9cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1321,8 +1898,9 @@ val _ = Define `
val _ = Define `
((pmp8cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp8cfg";
- read_from := (\ s . s.pmp8cfg);
- write_to := (\ v s . (( s with<| pmp8cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp8cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp8cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1330,8 +1908,9 @@ val _ = Define `
val _ = Define `
((pmp7cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp7cfg";
- read_from := (\ s . s.pmp7cfg);
- write_to := (\ v s . (( s with<| pmp7cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp7cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp7cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1339,8 +1918,9 @@ val _ = Define `
val _ = Define `
((pmp6cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp6cfg";
- read_from := (\ s . s.pmp6cfg);
- write_to := (\ v s . (( s with<| pmp6cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp6cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp6cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1348,8 +1928,9 @@ val _ = Define `
val _ = Define `
((pmp5cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp5cfg";
- read_from := (\ s . s.pmp5cfg);
- write_to := (\ v s . (( s with<| pmp5cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp5cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp5cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1357,8 +1938,9 @@ val _ = Define `
val _ = Define `
((pmp4cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp4cfg";
- read_from := (\ s . s.pmp4cfg);
- write_to := (\ v s . (( s with<| pmp4cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp4cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp4cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1366,8 +1948,9 @@ val _ = Define `
val _ = Define `
((pmp3cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp3cfg";
- read_from := (\ s . s.pmp3cfg);
- write_to := (\ v s . (( s with<| pmp3cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp3cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp3cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1375,8 +1958,9 @@ val _ = Define `
val _ = Define `
((pmp2cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp2cfg";
- read_from := (\ s . s.pmp2cfg);
- write_to := (\ v s . (( s with<| pmp2cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp2cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp2cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1384,8 +1968,9 @@ val _ = Define `
val _ = Define `
((pmp1cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp1cfg";
- read_from := (\ s . s.pmp1cfg);
- write_to := (\ v s . (( s with<| pmp1cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp1cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp1cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1393,8 +1978,9 @@ val _ = Define `
val _ = Define `
((pmp0cfg_ref:((regstate),(register_value),(Pmpcfg_ent))register_ref)= (<|
name := "pmp0cfg";
- read_from := (\ s . s.pmp0cfg);
- write_to := (\ v s . (( s with<| pmp0cfg := v |>)));
+ read_from := (\ s . s.Pmpcfg_ent_reg "pmp0cfg");
+ write_to := (\ v s . (( s with<| Pmpcfg_ent_reg :=
+ (\ reg . if reg = "pmp0cfg" then v else s.Pmpcfg_ent_reg reg) |>)));
of_regval := (\ v . Pmpcfg_ent_of_regval v);
regval_of := (\ v . regval_of_Pmpcfg_ent v) |>))`;
@@ -1402,26 +1988,29 @@ val _ = Define `
val _ = Define `
((tselect_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "tselect";
- read_from := (\ s . s.tselect);
- write_to := (\ v s . (( s with<| tselect := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "tselect");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "tselect" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((stval_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "stval";
- read_from := (\ s . s.stval);
- write_to := (\ v s . (( s with<| stval := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "stval");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "stval" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((scause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "scause";
- read_from := (\ s . s.scause);
- write_to := (\ v s . (( s with<| scause := v |>)));
+ read_from := (\ s . s.Mcause_reg "scause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "scause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1429,26 +2018,29 @@ val _ = Define `
val _ = Define `
((sepc_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "sepc";
- read_from := (\ s . s.sepc);
- write_to := (\ v s . (( s with<| sepc := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "sepc");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "sepc" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((sscratch_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "sscratch";
- read_from := (\ s . s.sscratch);
- write_to := (\ v s . (( s with<| sscratch := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "sscratch");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "sscratch" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((stvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "stvec";
- read_from := (\ s . s.stvec);
- write_to := (\ v s . (( s with<| stvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "stvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "stvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1456,8 +2048,9 @@ val _ = Define `
val _ = Define `
((sideleg_ref:((regstate),(register_value),(Sinterrupts))register_ref)= (<|
name := "sideleg";
- read_from := (\ s . s.sideleg);
- write_to := (\ v s . (( s with<| sideleg := v |>)));
+ read_from := (\ s . s.Sinterrupts_reg "sideleg");
+ write_to := (\ v s . (( s with<| Sinterrupts_reg :=
+ (\ reg . if reg = "sideleg" then v else s.Sinterrupts_reg reg) |>)));
of_regval := (\ v . Sinterrupts_of_regval v);
regval_of := (\ v . regval_of_Sinterrupts v) |>))`;
@@ -1465,8 +2058,9 @@ val _ = Define `
val _ = Define `
((sedeleg_ref:((regstate),(register_value),(Sedeleg))register_ref)= (<|
name := "sedeleg";
- read_from := (\ s . s.sedeleg);
- write_to := (\ v s . (( s with<| sedeleg := v |>)));
+ read_from := (\ s . s.Sedeleg_reg "sedeleg");
+ write_to := (\ v s . (( s with<| Sedeleg_reg :=
+ (\ reg . if reg = "sedeleg" then v else s.Sedeleg_reg reg) |>)));
of_regval := (\ v . Sedeleg_of_regval v);
regval_of := (\ v . regval_of_Sedeleg v) |>))`;
@@ -1474,44 +2068,49 @@ val _ = Define `
val _ = Define `
((mhartid_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mhartid";
- read_from := (\ s . s.mhartid);
- write_to := (\ v s . (( s with<| mhartid := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mhartid");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mhartid" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((marchid_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "marchid";
- read_from := (\ s . s.marchid);
- write_to := (\ v s . (( s with<| marchid := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "marchid");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "marchid" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mimpid_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mimpid";
- read_from := (\ s . s.mimpid);
- write_to := (\ v s . (( s with<| mimpid := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mimpid");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mimpid" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mvendorid_ref:((regstate),(register_value),((32)words$word))register_ref)= (<|
name := "mvendorid";
- read_from := (\ s . s.mvendorid);
- write_to := (\ v s . (( s with<| mvendorid := v |>)));
- of_regval := (\ v . vector_32_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_32_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_32_dec_reg "mvendorid");
+ write_to := (\ v s . (( s with<| bitvector_32_dec_reg :=
+ (\ reg . if reg = "mvendorid" then v else s.bitvector_32_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_32_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_32_dec v) |>))`;
val _ = Define `
((minstret_written_ref:((regstate),(register_value),(bool))register_ref)= (<|
name := "minstret_written";
- read_from := (\ s . s.minstret_written);
- write_to := (\ v s . (( s with<| minstret_written := v |>)));
+ read_from := (\ s . s.bool_reg "minstret_written");
+ write_to := (\ v s . (( s with<| bool_reg :=
+ (\ reg . if reg = "minstret_written" then v else s.bool_reg reg) |>)));
of_regval := (\ v . bool_of_regval v);
regval_of := (\ v . regval_of_bool v) |>))`;
@@ -1519,35 +2118,49 @@ val _ = Define `
val _ = Define `
((minstret_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "minstret";
- read_from := (\ s . s.minstret);
- write_to := (\ v s . (( s with<| minstret := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "minstret");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "minstret" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mtime_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mtime";
- read_from := (\ s . s.mtime);
- write_to := (\ v s . (( s with<| mtime := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mtime");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mtime" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mcycle_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mcycle";
- read_from := (\ s . s.mcycle);
- write_to := (\ v s . (( s with<| mcycle := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mcycle");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mcycle" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
+
+
+val _ = Define `
+ ((mcountinhibit_ref:((regstate),(register_value),(Counterin))register_ref)= (<|
+ name := "mcountinhibit";
+ read_from := (\ s . s.Counterin_reg "mcountinhibit");
+ write_to := (\ v s . (( s with<| Counterin_reg :=
+ (\ reg . if reg = "mcountinhibit" then v else s.Counterin_reg reg) |>)));
+ of_regval := (\ v . Counterin_of_regval v);
+ regval_of := (\ v . regval_of_Counterin v) |>))`;
val _ = Define `
((scounteren_ref:((regstate),(register_value),(Counteren))register_ref)= (<|
name := "scounteren";
- read_from := (\ s . s.scounteren);
- write_to := (\ v s . (( s with<| scounteren := v |>)));
+ read_from := (\ s . s.Counteren_reg "scounteren");
+ write_to := (\ v s . (( s with<| Counteren_reg :=
+ (\ reg . if reg = "scounteren" then v else s.Counteren_reg reg) |>)));
of_regval := (\ v . Counteren_of_regval v);
regval_of := (\ v . regval_of_Counteren v) |>))`;
@@ -1555,8 +2168,9 @@ val _ = Define `
val _ = Define `
((mcounteren_ref:((regstate),(register_value),(Counteren))register_ref)= (<|
name := "mcounteren";
- read_from := (\ s . s.mcounteren);
- write_to := (\ v s . (( s with<| mcounteren := v |>)));
+ read_from := (\ s . s.Counteren_reg "mcounteren");
+ write_to := (\ v s . (( s with<| Counteren_reg :=
+ (\ reg . if reg = "mcounteren" then v else s.Counteren_reg reg) |>)));
of_regval := (\ v . Counteren_of_regval v);
regval_of := (\ v . regval_of_Counteren v) |>))`;
@@ -1564,35 +2178,39 @@ val _ = Define `
val _ = Define `
((mscratch_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mscratch";
- read_from := (\ s . s.mscratch);
- write_to := (\ v s . (( s with<| mscratch := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mscratch");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mscratch" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mtval_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mtval";
- read_from := (\ s . s.mtval);
- write_to := (\ v s . (( s with<| mtval := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mtval");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mtval" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mepc_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "mepc";
- read_from := (\ s . s.mepc);
- write_to := (\ v s . (( s with<| mepc := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "mepc");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "mepc" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((mcause_ref:((regstate),(register_value),(Mcause))register_ref)= (<|
name := "mcause";
- read_from := (\ s . s.mcause);
- write_to := (\ v s . (( s with<| mcause := v |>)));
+ read_from := (\ s . s.Mcause_reg "mcause");
+ write_to := (\ v s . (( s with<| Mcause_reg :=
+ (\ reg . if reg = "mcause" then v else s.Mcause_reg reg) |>)));
of_regval := (\ v . Mcause_of_regval v);
regval_of := (\ v . regval_of_Mcause v) |>))`;
@@ -1600,8 +2218,9 @@ val _ = Define `
val _ = Define `
((mtvec_ref:((regstate),(register_value),(Mtvec))register_ref)= (<|
name := "mtvec";
- read_from := (\ s . s.mtvec);
- write_to := (\ v s . (( s with<| mtvec := v |>)));
+ read_from := (\ s . s.Mtvec_reg "mtvec");
+ write_to := (\ v s . (( s with<| Mtvec_reg :=
+ (\ reg . if reg = "mtvec" then v else s.Mtvec_reg reg) |>)));
of_regval := (\ v . Mtvec_of_regval v);
regval_of := (\ v . regval_of_Mtvec v) |>))`;
@@ -1609,8 +2228,9 @@ val _ = Define `
val _ = Define `
((medeleg_ref:((regstate),(register_value),(Medeleg))register_ref)= (<|
name := "medeleg";
- read_from := (\ s . s.medeleg);
- write_to := (\ v s . (( s with<| medeleg := v |>)));
+ read_from := (\ s . s.Medeleg_reg "medeleg");
+ write_to := (\ v s . (( s with<| Medeleg_reg :=
+ (\ reg . if reg = "medeleg" then v else s.Medeleg_reg reg) |>)));
of_regval := (\ v . Medeleg_of_regval v);
regval_of := (\ v . regval_of_Medeleg v) |>))`;
@@ -1618,8 +2238,9 @@ val _ = Define `
val _ = Define `
((mideleg_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mideleg";
- read_from := (\ s . s.mideleg);
- write_to := (\ v s . (( s with<| mideleg := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mideleg");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mideleg" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1627,8 +2248,9 @@ val _ = Define `
val _ = Define `
((mie_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mie";
- read_from := (\ s . s.mie);
- write_to := (\ v s . (( s with<| mie := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mie");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mie" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1636,8 +2258,9 @@ val _ = Define `
val _ = Define `
((mip_ref:((regstate),(register_value),(Minterrupts))register_ref)= (<|
name := "mip";
- read_from := (\ s . s.mip);
- write_to := (\ v s . (( s with<| mip := v |>)));
+ read_from := (\ s . s.Minterrupts_reg "mip");
+ write_to := (\ v s . (( s with<| Minterrupts_reg :=
+ (\ reg . if reg = "mip" then v else s.Minterrupts_reg reg) |>)));
of_regval := (\ v . Minterrupts_of_regval v);
regval_of := (\ v . regval_of_Minterrupts v) |>))`;
@@ -1645,17 +2268,29 @@ val _ = Define `
val _ = Define `
((mstatus_ref:((regstate),(register_value),(Mstatus))register_ref)= (<|
name := "mstatus";
- read_from := (\ s . s.mstatus);
- write_to := (\ v s . (( s with<| mstatus := v |>)));
+ read_from := (\ s . s.Mstatus_reg "mstatus");
+ write_to := (\ v s . (( s with<| Mstatus_reg :=
+ (\ reg . if reg = "mstatus" then v else s.Mstatus_reg reg) |>)));
of_regval := (\ v . Mstatus_of_regval v);
regval_of := (\ v . regval_of_Mstatus v) |>))`;
val _ = Define `
+ ((mstatush_ref:((regstate),(register_value),(Mstatush))register_ref)= (<|
+ name := "mstatush";
+ read_from := (\ s . s.Mstatush_reg "mstatush");
+ write_to := (\ v s . (( s with<| Mstatush_reg :=
+ (\ reg . if reg = "mstatush" then v else s.Mstatush_reg reg) |>)));
+ of_regval := (\ v . Mstatush_of_regval v);
+ regval_of := (\ v . regval_of_Mstatush v) |>))`;
+
+
+val _ = Define `
((misa_ref:((regstate),(register_value),(Misa))register_ref)= (<|
name := "misa";
- read_from := (\ s . s.misa);
- write_to := (\ v s . (( s with<| misa := v |>)));
+ read_from := (\ s . s.Misa_reg "misa");
+ write_to := (\ v s . (( s with<| Misa_reg :=
+ (\ reg . if reg = "misa" then v else s.Misa_reg reg) |>)));
of_regval := (\ v . Misa_of_regval v);
regval_of := (\ v . regval_of_Misa v) |>))`;
@@ -1663,17 +2298,19 @@ val _ = Define `
val _ = Define `
((cur_inst_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "cur_inst";
- read_from := (\ s . s.cur_inst);
- write_to := (\ v s . (( s with<| cur_inst := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "cur_inst");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "cur_inst" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((cur_privilege_ref:((regstate),(register_value),(Privilege))register_ref)= (<|
name := "cur_privilege";
- read_from := (\ s . s.cur_privilege);
- write_to := (\ v s . (( s with<| cur_privilege := v |>)));
+ read_from := (\ s . s.Privilege_reg "cur_privilege");
+ write_to := (\ v s . (( s with<| Privilege_reg :=
+ (\ reg . if reg = "cur_privilege" then v else s.Privilege_reg reg) |>)));
of_regval := (\ v . Privilege_of_regval v);
regval_of := (\ v . regval_of_Privilege v) |>))`;
@@ -1681,316 +2318,341 @@ val _ = Define `
val _ = Define `
((x31_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x31";
- read_from := (\ s . s.x31);
- write_to := (\ v s . (( s with<| x31 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x31");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x31" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x30_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x30";
- read_from := (\ s . s.x30);
- write_to := (\ v s . (( s with<| x30 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x30");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x30" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x29_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x29";
- read_from := (\ s . s.x29);
- write_to := (\ v s . (( s with<| x29 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x29");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x29" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x28_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x28";
- read_from := (\ s . s.x28);
- write_to := (\ v s . (( s with<| x28 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x28");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x28" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x27_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x27";
- read_from := (\ s . s.x27);
- write_to := (\ v s . (( s with<| x27 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x27");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x27" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x26_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x26";
- read_from := (\ s . s.x26);
- write_to := (\ v s . (( s with<| x26 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x26");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x26" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x25_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x25";
- read_from := (\ s . s.x25);
- write_to := (\ v s . (( s with<| x25 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x25");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x25" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x24_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x24";
- read_from := (\ s . s.x24);
- write_to := (\ v s . (( s with<| x24 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x24");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x24" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x23_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x23";
- read_from := (\ s . s.x23);
- write_to := (\ v s . (( s with<| x23 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x23");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x23" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x22_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x22";
- read_from := (\ s . s.x22);
- write_to := (\ v s . (( s with<| x22 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x22");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x22" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x21_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x21";
- read_from := (\ s . s.x21);
- write_to := (\ v s . (( s with<| x21 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x21");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x21" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x20_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x20";
- read_from := (\ s . s.x20);
- write_to := (\ v s . (( s with<| x20 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x20");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x20" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x19_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x19";
- read_from := (\ s . s.x19);
- write_to := (\ v s . (( s with<| x19 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x19");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x19" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x18_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x18";
- read_from := (\ s . s.x18);
- write_to := (\ v s . (( s with<| x18 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x18");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x18" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x17_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x17";
- read_from := (\ s . s.x17);
- write_to := (\ v s . (( s with<| x17 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x17");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x17" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x16_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x16";
- read_from := (\ s . s.x16);
- write_to := (\ v s . (( s with<| x16 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x16");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x16" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x15_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x15";
- read_from := (\ s . s.x15);
- write_to := (\ v s . (( s with<| x15 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x15");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x15" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x14_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x14";
- read_from := (\ s . s.x14);
- write_to := (\ v s . (( s with<| x14 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x14");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x14" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x13_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x13";
- read_from := (\ s . s.x13);
- write_to := (\ v s . (( s with<| x13 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x13");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x13" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x12_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x12";
- read_from := (\ s . s.x12);
- write_to := (\ v s . (( s with<| x12 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x12");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x12" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x11_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x11";
- read_from := (\ s . s.x11);
- write_to := (\ v s . (( s with<| x11 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x11");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x11" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x10_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x10";
- read_from := (\ s . s.x10);
- write_to := (\ v s . (( s with<| x10 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x10");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x10" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x9_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x9";
- read_from := (\ s . s.x9);
- write_to := (\ v s . (( s with<| x9 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x9");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x9" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x8_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x8";
- read_from := (\ s . s.x8);
- write_to := (\ v s . (( s with<| x8 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x8");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x8" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x7_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x7";
- read_from := (\ s . s.x7);
- write_to := (\ v s . (( s with<| x7 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x7");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x7" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x6_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x6";
- read_from := (\ s . s.x6);
- write_to := (\ v s . (( s with<| x6 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x6");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x6" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x5_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x5";
- read_from := (\ s . s.x5);
- write_to := (\ v s . (( s with<| x5 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x5");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x5" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x4_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x4";
- read_from := (\ s . s.x4);
- write_to := (\ v s . (( s with<| x4 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x4");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x4" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x3_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x3";
- read_from := (\ s . s.x3);
- write_to := (\ v s . (( s with<| x3 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x3");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x3" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x2_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x2";
- read_from := (\ s . s.x2);
- write_to := (\ v s . (( s with<| x2 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x2");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x2" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((x1_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "x1";
- read_from := (\ s . s.x1);
- write_to := (\ v s . (( s with<| x1 := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
-
-
-val _ = Define `
- ((Xs_ref:((regstate),(register_value),(((64)words$word)list))register_ref)= (<|
- name := "Xs";
- read_from := (\ s . s.Xs);
- write_to := (\ v s . (( s with<| Xs := v |>)));
- of_regval := (\ v . vector_of_regval (\ v . vector_64_dec_bit_of_regval v) v);
- regval_of := (\ v . regval_of_vector (\ v . regval_of_vector_64_dec_bit v)(( 32 : int)) F v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "x1");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "x1" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((instbits_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "instbits";
- read_from := (\ s . s.instbits);
- write_to := (\ v s . (( s with<| instbits := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "instbits");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "instbits" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((nextPC_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "nextPC";
- read_from := (\ s . s.nextPC);
- write_to := (\ v s . (( s with<| nextPC := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "nextPC");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "nextPC" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
val _ = Define `
((PC_ref:((regstate),(register_value),((64)words$word))register_ref)= (<|
name := "PC";
- read_from := (\ s . s.PC);
- write_to := (\ v s . (( s with<| PC := v |>)));
- of_regval := (\ v . vector_64_dec_bit_of_regval v);
- regval_of := (\ v . regval_of_vector_64_dec_bit v) |>))`;
+ read_from := (\ s . s.bitvector_64_dec_reg "PC");
+ write_to := (\ v s . (( s with<| bitvector_64_dec_reg :=
+ (\ reg . if reg = "PC" then v else s.bitvector_64_dec_reg reg) |>)));
+ of_regval := (\ v . bitvector_64_dec_of_regval v);
+ regval_of := (\ v . regval_of_bitvector_64_dec v) |>))`;
(*val get_regval : string -> regstate -> maybe register_value*)
@@ -1999,10 +2661,47 @@ val _ = Define `
(if reg_name = "satp" then SOME (satp_ref.regval_of (satp_ref.read_from s)) else
if reg_name = "tlb48" then SOME (tlb48_ref.regval_of (tlb48_ref.read_from s)) else
if reg_name = "tlb39" then SOME (tlb39_ref.regval_of (tlb39_ref.read_from s)) else
+ if reg_name = "htif_payload_writes" then SOME (htif_payload_writes_ref.regval_of (htif_payload_writes_ref.read_from s)) else
+ if reg_name = "htif_cmd_write" then SOME (htif_cmd_write_ref.regval_of (htif_cmd_write_ref.read_from s)) else
if reg_name = "htif_exit_code" then SOME (htif_exit_code_ref.regval_of (htif_exit_code_ref.read_from s)) else
if reg_name = "htif_done" then SOME (htif_done_ref.regval_of (htif_done_ref.read_from s)) else
if reg_name = "htif_tohost" then SOME (htif_tohost_ref.regval_of (htif_tohost_ref.read_from s)) else
if reg_name = "mtimecmp" then SOME (mtimecmp_ref.regval_of (mtimecmp_ref.read_from s)) else
+ if reg_name = "fcsr" then SOME (fcsr_ref.regval_of (fcsr_ref.read_from s)) else
+ if reg_name = "f31" then SOME (f31_ref.regval_of (f31_ref.read_from s)) else
+ if reg_name = "f30" then SOME (f30_ref.regval_of (f30_ref.read_from s)) else
+ if reg_name = "f29" then SOME (f29_ref.regval_of (f29_ref.read_from s)) else
+ if reg_name = "f28" then SOME (f28_ref.regval_of (f28_ref.read_from s)) else
+ if reg_name = "f27" then SOME (f27_ref.regval_of (f27_ref.read_from s)) else
+ if reg_name = "f26" then SOME (f26_ref.regval_of (f26_ref.read_from s)) else
+ if reg_name = "f25" then SOME (f25_ref.regval_of (f25_ref.read_from s)) else
+ if reg_name = "f24" then SOME (f24_ref.regval_of (f24_ref.read_from s)) else
+ if reg_name = "f23" then SOME (f23_ref.regval_of (f23_ref.read_from s)) else
+ if reg_name = "f22" then SOME (f22_ref.regval_of (f22_ref.read_from s)) else
+ if reg_name = "f21" then SOME (f21_ref.regval_of (f21_ref.read_from s)) else
+ if reg_name = "f20" then SOME (f20_ref.regval_of (f20_ref.read_from s)) else
+ if reg_name = "f19" then SOME (f19_ref.regval_of (f19_ref.read_from s)) else
+ if reg_name = "f18" then SOME (f18_ref.regval_of (f18_ref.read_from s)) else
+ if reg_name = "f17" then SOME (f17_ref.regval_of (f17_ref.read_from s)) else
+ if reg_name = "f16" then SOME (f16_ref.regval_of (f16_ref.read_from s)) else
+ if reg_name = "f15" then SOME (f15_ref.regval_of (f15_ref.read_from s)) else
+ if reg_name = "f14" then SOME (f14_ref.regval_of (f14_ref.read_from s)) else
+ if reg_name = "f13" then SOME (f13_ref.regval_of (f13_ref.read_from s)) else
+ if reg_name = "f12" then SOME (f12_ref.regval_of (f12_ref.read_from s)) else
+ if reg_name = "f11" then SOME (f11_ref.regval_of (f11_ref.read_from s)) else
+ if reg_name = "f10" then SOME (f10_ref.regval_of (f10_ref.read_from s)) else
+ if reg_name = "f9" then SOME (f9_ref.regval_of (f9_ref.read_from s)) else
+ if reg_name = "f8" then SOME (f8_ref.regval_of (f8_ref.read_from s)) else
+ if reg_name = "f7" then SOME (f7_ref.regval_of (f7_ref.read_from s)) else
+ if reg_name = "f6" then SOME (f6_ref.regval_of (f6_ref.read_from s)) else
+ if reg_name = "f5" then SOME (f5_ref.regval_of (f5_ref.read_from s)) else
+ if reg_name = "f4" then SOME (f4_ref.regval_of (f4_ref.read_from s)) else
+ if reg_name = "f3" then SOME (f3_ref.regval_of (f3_ref.read_from s)) else
+ if reg_name = "f2" then SOME (f2_ref.regval_of (f2_ref.read_from s)) else
+ if reg_name = "f1" then SOME (f1_ref.regval_of (f1_ref.read_from s)) else
+ if reg_name = "f0" then SOME (f0_ref.regval_of (f0_ref.read_from s)) else
+ if reg_name = "float_fflags" then SOME (float_fflags_ref.regval_of (float_fflags_ref.read_from s)) else
+ if reg_name = "float_result" then SOME (float_result_ref.regval_of (float_result_ref.read_from s)) else
if reg_name = "utval" then SOME (utval_ref.regval_of (utval_ref.read_from s)) else
if reg_name = "ucause" then SOME (ucause_ref.regval_of (ucause_ref.read_from s)) else
if reg_name = "uepc" then SOME (uepc_ref.regval_of (uepc_ref.read_from s)) else
@@ -2056,6 +2755,7 @@ val _ = Define `
if reg_name = "minstret" then SOME (minstret_ref.regval_of (minstret_ref.read_from s)) else
if reg_name = "mtime" then SOME (mtime_ref.regval_of (mtime_ref.read_from s)) else
if reg_name = "mcycle" then SOME (mcycle_ref.regval_of (mcycle_ref.read_from s)) else
+ if reg_name = "mcountinhibit" then SOME (mcountinhibit_ref.regval_of (mcountinhibit_ref.read_from s)) else
if reg_name = "scounteren" then SOME (scounteren_ref.regval_of (scounteren_ref.read_from s)) else
if reg_name = "mcounteren" then SOME (mcounteren_ref.regval_of (mcounteren_ref.read_from s)) else
if reg_name = "mscratch" then SOME (mscratch_ref.regval_of (mscratch_ref.read_from s)) else
@@ -2068,6 +2768,7 @@ val _ = Define `
if reg_name = "mie" then SOME (mie_ref.regval_of (mie_ref.read_from s)) else
if reg_name = "mip" then SOME (mip_ref.regval_of (mip_ref.read_from s)) else
if reg_name = "mstatus" then SOME (mstatus_ref.regval_of (mstatus_ref.read_from s)) else
+ if reg_name = "mstatush" then SOME (mstatush_ref.regval_of (mstatush_ref.read_from s)) else
if reg_name = "misa" then SOME (misa_ref.regval_of (misa_ref.read_from s)) else
if reg_name = "cur_inst" then SOME (cur_inst_ref.regval_of (cur_inst_ref.read_from s)) else
if reg_name = "cur_privilege" then SOME (cur_privilege_ref.regval_of (cur_privilege_ref.read_from s)) else
@@ -2102,7 +2803,6 @@ val _ = Define `
if reg_name = "x3" then SOME (x3_ref.regval_of (x3_ref.read_from s)) else
if reg_name = "x2" then SOME (x2_ref.regval_of (x2_ref.read_from s)) else
if reg_name = "x1" then SOME (x1_ref.regval_of (x1_ref.read_from s)) else
- if reg_name = "Xs" then SOME (Xs_ref.regval_of (Xs_ref.read_from s)) else
if reg_name = "instbits" then SOME (instbits_ref.regval_of (instbits_ref.read_from s)) else
if reg_name = "nextPC" then SOME (nextPC_ref.regval_of (nextPC_ref.read_from s)) else
if reg_name = "PC" then SOME (PC_ref.regval_of (PC_ref.read_from s)) else
@@ -2115,10 +2815,47 @@ val _ = Define `
(if reg_name = "satp" then OPTION_MAP (\ v . satp_ref.write_to v s) (satp_ref.of_regval v) else
if reg_name = "tlb48" then OPTION_MAP (\ v . tlb48_ref.write_to v s) (tlb48_ref.of_regval v) else
if reg_name = "tlb39" then OPTION_MAP (\ v . tlb39_ref.write_to v s) (tlb39_ref.of_regval v) else
+ if reg_name = "htif_payload_writes" then OPTION_MAP (\ v . htif_payload_writes_ref.write_to v s) (htif_payload_writes_ref.of_regval v) else
+ if reg_name = "htif_cmd_write" then OPTION_MAP (\ v . htif_cmd_write_ref.write_to v s) (htif_cmd_write_ref.of_regval v) else
if reg_name = "htif_exit_code" then OPTION_MAP (\ v . htif_exit_code_ref.write_to v s) (htif_exit_code_ref.of_regval v) else
if reg_name = "htif_done" then OPTION_MAP (\ v . htif_done_ref.write_to v s) (htif_done_ref.of_regval v) else
if reg_name = "htif_tohost" then OPTION_MAP (\ v . htif_tohost_ref.write_to v s) (htif_tohost_ref.of_regval v) else
if reg_name = "mtimecmp" then OPTION_MAP (\ v . mtimecmp_ref.write_to v s) (mtimecmp_ref.of_regval v) else
+ if reg_name = "fcsr" then OPTION_MAP (\ v . fcsr_ref.write_to v s) (fcsr_ref.of_regval v) else
+ if reg_name = "f31" then OPTION_MAP (\ v . f31_ref.write_to v s) (f31_ref.of_regval v) else
+ if reg_name = "f30" then OPTION_MAP (\ v . f30_ref.write_to v s) (f30_ref.of_regval v) else
+ if reg_name = "f29" then OPTION_MAP (\ v . f29_ref.write_to v s) (f29_ref.of_regval v) else
+ if reg_name = "f28" then OPTION_MAP (\ v . f28_ref.write_to v s) (f28_ref.of_regval v) else
+ if reg_name = "f27" then OPTION_MAP (\ v . f27_ref.write_to v s) (f27_ref.of_regval v) else
+ if reg_name = "f26" then OPTION_MAP (\ v . f26_ref.write_to v s) (f26_ref.of_regval v) else
+ if reg_name = "f25" then OPTION_MAP (\ v . f25_ref.write_to v s) (f25_ref.of_regval v) else
+ if reg_name = "f24" then OPTION_MAP (\ v . f24_ref.write_to v s) (f24_ref.of_regval v) else
+ if reg_name = "f23" then OPTION_MAP (\ v . f23_ref.write_to v s) (f23_ref.of_regval v) else
+ if reg_name = "f22" then OPTION_MAP (\ v . f22_ref.write_to v s) (f22_ref.of_regval v) else
+ if reg_name = "f21" then OPTION_MAP (\ v . f21_ref.write_to v s) (f21_ref.of_regval v) else
+ if reg_name = "f20" then OPTION_MAP (\ v . f20_ref.write_to v s) (f20_ref.of_regval v) else
+ if reg_name = "f19" then OPTION_MAP (\ v . f19_ref.write_to v s) (f19_ref.of_regval v) else
+ if reg_name = "f18" then OPTION_MAP (\ v . f18_ref.write_to v s) (f18_ref.of_regval v) else
+ if reg_name = "f17" then OPTION_MAP (\ v . f17_ref.write_to v s) (f17_ref.of_regval v) else
+ if reg_name = "f16" then OPTION_MAP (\ v . f16_ref.write_to v s) (f16_ref.of_regval v) else
+ if reg_name = "f15" then OPTION_MAP (\ v . f15_ref.write_to v s) (f15_ref.of_regval v) else
+ if reg_name = "f14" then OPTION_MAP (\ v . f14_ref.write_to v s) (f14_ref.of_regval v) else
+ if reg_name = "f13" then OPTION_MAP (\ v . f13_ref.write_to v s) (f13_ref.of_regval v) else
+ if reg_name = "f12" then OPTION_MAP (\ v . f12_ref.write_to v s) (f12_ref.of_regval v) else
+ if reg_name = "f11" then OPTION_MAP (\ v . f11_ref.write_to v s) (f11_ref.of_regval v) else
+ if reg_name = "f10" then OPTION_MAP (\ v . f10_ref.write_to v s) (f10_ref.of_regval v) else
+ if reg_name = "f9" then OPTION_MAP (\ v . f9_ref.write_to v s) (f9_ref.of_regval v) else
+ if reg_name = "f8" then OPTION_MAP (\ v . f8_ref.write_to v s) (f8_ref.of_regval v) else
+ if reg_name = "f7" then OPTION_MAP (\ v . f7_ref.write_to v s) (f7_ref.of_regval v) else
+ if reg_name = "f6" then OPTION_MAP (\ v . f6_ref.write_to v s) (f6_ref.of_regval v) else
+ if reg_name = "f5" then OPTION_MAP (\ v . f5_ref.write_to v s) (f5_ref.of_regval v) else
+ if reg_name = "f4" then OPTION_MAP (\ v . f4_ref.write_to v s) (f4_ref.of_regval v) else
+ if reg_name = "f3" then OPTION_MAP (\ v . f3_ref.write_to v s) (f3_ref.of_regval v) else
+ if reg_name = "f2" then OPTION_MAP (\ v . f2_ref.write_to v s) (f2_ref.of_regval v) else
+ if reg_name = "f1" then OPTION_MAP (\ v . f1_ref.write_to v s) (f1_ref.of_regval v) else
+ if reg_name = "f0" then OPTION_MAP (\ v . f0_ref.write_to v s) (f0_ref.of_regval v) else
+ if reg_name = "float_fflags" then OPTION_MAP (\ v . float_fflags_ref.write_to v s) (float_fflags_ref.of_regval v) else
+ if reg_name = "float_result" then OPTION_MAP (\ v . float_result_ref.write_to v s) (float_result_ref.of_regval v) else
if reg_name = "utval" then OPTION_MAP (\ v . utval_ref.write_to v s) (utval_ref.of_regval v) else
if reg_name = "ucause" then OPTION_MAP (\ v . ucause_ref.write_to v s) (ucause_ref.of_regval v) else
if reg_name = "uepc" then OPTION_MAP (\ v . uepc_ref.write_to v s) (uepc_ref.of_regval v) else
@@ -2172,6 +2909,7 @@ val _ = Define `
if reg_name = "minstret" then OPTION_MAP (\ v . minstret_ref.write_to v s) (minstret_ref.of_regval v) else
if reg_name = "mtime" then OPTION_MAP (\ v . mtime_ref.write_to v s) (mtime_ref.of_regval v) else
if reg_name = "mcycle" then OPTION_MAP (\ v . mcycle_ref.write_to v s) (mcycle_ref.of_regval v) else
+ if reg_name = "mcountinhibit" then OPTION_MAP (\ v . mcountinhibit_ref.write_to v s) (mcountinhibit_ref.of_regval v) else
if reg_name = "scounteren" then OPTION_MAP (\ v . scounteren_ref.write_to v s) (scounteren_ref.of_regval v) else
if reg_name = "mcounteren" then OPTION_MAP (\ v . mcounteren_ref.write_to v s) (mcounteren_ref.of_regval v) else
if reg_name = "mscratch" then OPTION_MAP (\ v . mscratch_ref.write_to v s) (mscratch_ref.of_regval v) else
@@ -2184,6 +2922,7 @@ val _ = Define `
if reg_name = "mie" then OPTION_MAP (\ v . mie_ref.write_to v s) (mie_ref.of_regval v) else
if reg_name = "mip" then OPTION_MAP (\ v . mip_ref.write_to v s) (mip_ref.of_regval v) else
if reg_name = "mstatus" then OPTION_MAP (\ v . mstatus_ref.write_to v s) (mstatus_ref.of_regval v) else
+ if reg_name = "mstatush" then OPTION_MAP (\ v . mstatush_ref.write_to v s) (mstatush_ref.of_regval v) else
if reg_name = "misa" then OPTION_MAP (\ v . misa_ref.write_to v s) (misa_ref.of_regval v) else
if reg_name = "cur_inst" then OPTION_MAP (\ v . cur_inst_ref.write_to v s) (cur_inst_ref.of_regval v) else
if reg_name = "cur_privilege" then OPTION_MAP (\ v . cur_privilege_ref.write_to v s) (cur_privilege_ref.of_regval v) else
@@ -2218,7 +2957,6 @@ val _ = Define `
if reg_name = "x3" then OPTION_MAP (\ v . x3_ref.write_to v s) (x3_ref.of_regval v) else
if reg_name = "x2" then OPTION_MAP (\ v . x2_ref.write_to v s) (x2_ref.of_regval v) else
if reg_name = "x1" then OPTION_MAP (\ v . x1_ref.write_to v s) (x1_ref.of_regval v) else
- if reg_name = "Xs" then OPTION_MAP (\ v . Xs_ref.write_to v s) (Xs_ref.of_regval v) else
if reg_name = "instbits" then OPTION_MAP (\ v . instbits_ref.write_to v s) (instbits_ref.of_regval v) else
if reg_name = "nextPC" then OPTION_MAP (\ v . nextPC_ref.write_to v s) (nextPC_ref.of_regval v) else
if reg_name = "PC" then OPTION_MAP (\ v . PC_ref.write_to v s) (PC_ref.of_regval v) else
diff --git a/prover_snapshots/hol4/lib/lem/lem_debugScript.sml b/prover_snapshots/hol4/lib/lem/lem_debugScript.sml
new file mode 100644
index 0000000..83410f7
--- /dev/null
+++ b/prover_snapshots/hol4/lib/lem/lem_debugScript.sml
@@ -0,0 +1,33 @@
+(*Generated by Lem from debug.lem.*)
+open HolKernel Parse boolLib bossLib;
+val _ = numLib.prefer_num();
+
+
+
+val _ = new_theory "lem_debug"
+
+
+
+(* debugging functions; these should *not* be used in production code,
+ but are invaluable in debugging the OCaml extraction, as long as
+ one pays attention to the interaction with monads;
+ the typical use pattern is:
+ let _ = Debug.print_string "..." in
+ ...
+
+ With monads, the "let _" should be out of the monad, not wrapped
+ inside the monad (otherwise, the evaluation order is that of the
+ monad).
+*)
+
+(*val print_string : string -> unit*)
+val _ = Define `
+ ((print_string:string -> unit) str= () )`;
+
+
+(*val print_endline : string -> unit*)
+val _ = Define `
+ ((print_endline:string -> unit) str= () )`;
+
+val _ = export_theory()
+
diff --git a/prover_snapshots/hol4/lib/lem/lem_listScript.sml b/prover_snapshots/hol4/lib/lem/lem_listScript.sml
index 1b8f25f..b7d8d9b 100644
--- a/prover_snapshots/hol4/lib/lem/lem_listScript.sml
+++ b/prover_snapshots/hol4/lib/lem/lem_listScript.sml
@@ -336,13 +336,13 @@ val _ = Define `
(* genlist *)
(* ------------------------- *)
-(* [genlist f n] generates the list [f 0; f 1; ... (f (n-1))] *)
+(* [genlist f n] generates the list [f 1; ... (f (n-1))] *)
(*val genlist : forall 'a. (nat -> 'a) -> nat -> list 'a*)
-(*let rec genlist f n=
- match n with
- | 0 -> []
+(*let rec genlist f (n : nat)=
+ match (n : nat) with
+ | (0:nat) -> []
| n' + 1 -> snoc (f n') (genlist f n')
end*)
diff --git a/prover_snapshots/hol4/lib/lem/lem_machine_wordScript.sml b/prover_snapshots/hol4/lib/lem/lem_machine_wordScript.sml
index 40bbef3..45634fb 100644
--- a/prover_snapshots/hol4/lib/lem/lem_machine_wordScript.sml
+++ b/prover_snapshots/hol4/lib/lem/lem_machine_wordScript.sml
@@ -429,5 +429,7 @@ val _ = Define `
(*val signedDivide : forall 'a. mword 'a -> mword 'a -> mword 'a*)
(*val modulo : forall 'a. mword 'a -> mword 'a -> mword 'a*)
+
+(*val wordFromNumeral : forall 'a. Size 'a => numeral -> mword 'a*)
val _ = export_theory()
diff --git a/prover_snapshots/hol4/lib/lem/lem_numScript.sml b/prover_snapshots/hol4/lib/lem/lem_numScript.sml
index d891079..a8b4122 100644
--- a/prover_snapshots/hol4/lib/lem/lem_numScript.sml
+++ b/prover_snapshots/hol4/lib/lem/lem_numScript.sml
@@ -13,7 +13,7 @@ val _ = new_theory "lem_num"
(*open import Bool Basic_classes*)
(*open import {isabelle} `HOL-Word.Word` `Complex_Main`*)
(*open import {hol} `integerTheory` `intReduce` `wordsTheory` `wordsLib` `ratTheory` `realTheory` `intrealTheory` `transcTheory`*)
-(*open import {coq} `Coq.Numbers.BinNums` `Coq.ZArith.BinInt` `Coq.ZArith.Zpower` `Coq.ZArith.Zdiv` `Coq.ZArith.Zmax` `Coq.Reals.Rsqrt_def` `Coq.Numbers.Natural.Peano.NPeano` `Coq.QArith.Qabs` `Coq.QArith.Qminmax` `Coq.QArith.Qround` `Coq.Reals.ROrderedType` `Coq.Reals.Rbase` `Coq.Reals.Rfunctions`*)
+(*open import {coq} `Coq.Numbers.BinNums` `Coq.ZArith.BinInt` `Coq.ZArith.Zpower` `Coq.ZArith.Zdiv` `Coq.ZArith.Zmax` `Coq.Reals.Rsqrt_def` `Coq.Numbers.Natural.Peano.NPeano` `Coq.QArith.Qabs` `Coq.QArith.Qminmax` `Coq.QArith.Qround` `Coq.Reals.ROrderedType` `Coq.Reals.Rbase` `Coq.Reals.Rfunctions`*)
(*class inline ( Numeral 'a )
val fromNumeral : numeral -> 'a
diff --git a/prover_snapshots/hol4/lib/sail/Holmakefile b/prover_snapshots/hol4/lib/sail/Holmakefile
index 344b8b7..df1123f 100644
--- a/prover_snapshots/hol4/lib/sail/Holmakefile
+++ b/prover_snapshots/hol4/lib/sail/Holmakefile
@@ -1,3 +1,5 @@
+# Ensure LEM_DIR is set before running Holmake, e.g., by using the accompanying Makefile
+
LEM_SCRIPTS = sail2_instr_kindsScript.sml sail2_valuesScript.sml sail2_operatorsScript.sml \
sail2_operators_mwordsScript.sml sail2_operators_bitlistsScript.sml \
sail2_state_monadScript.sml sail2_stateScript.sml sail2_promptScript.sml sail2_prompt_monadScript.sml \
diff --git a/prover_snapshots/hol4/lib/sail/Makefile b/prover_snapshots/hol4/lib/sail/Makefile
new file mode 100644
index 0000000..ccd871d
--- /dev/null
+++ b/prover_snapshots/hol4/lib/sail/Makefile
@@ -0,0 +1,36 @@
+LEM_DIR?=$(shell opam config var lem:share)
+
+LEMSRC = \
+ ../../src/gen_lib/sail2_instr_kinds.lem \
+ ../../src/gen_lib/sail2_values.lem \
+ ../../src/gen_lib/sail2_operators.lem \
+ ../../src/gen_lib/sail2_operators_mwords.lem \
+ ../../src/gen_lib/sail2_operators_bitlists.lem \
+ ../../src/gen_lib/sail2_state_monad.lem \
+ ../../src/gen_lib/sail2_state.lem \
+ ../../src/gen_lib/sail2_string.lem \
+ sail2_prompt_monad.lem \
+ sail2_prompt.lem
+
+SCRIPTS = sail2_instr_kindsScript.sml sail2_valuesScript.sml sail2_operatorsScript.sml \
+ sail2_operators_mwordsScript.sml sail2_operators_bitlistsScript.sml \
+ sail2_state_monadScript.sml sail2_stateScript.sml \
+ sail2_prompt_monadScript.sml sail2_promptScript.sml \
+ sail2_stringScript.sml
+
+THYS = $(patsubst %Script.sml,%Theory.uo,$(SCRIPTS))
+
+all: sail-heap $(THYS)
+all-scripts: $(SCRIPTS)
+
+$(SCRIPTS): $(LEMSRC)
+ lem -hol -outdir . -auxiliary_level none -lib ../../src/lem_interp -lib ../../src/gen_lib $(LEMSRC)
+
+$(THYS) sail-heap: $(SCRIPTS)
+ LEM_DIR=$(LEM_DIR) Holmake
+
+# Holmake will also clear out the generated $(SCRIPTS) files
+clean:
+ Holmake cleanAll
+
+.PHONY: all all-scripts clean
diff --git a/prover_snapshots/hol4/lib/sail/sail2_instr_kindsScript.sml b/prover_snapshots/hol4/lib/sail/sail2_instr_kindsScript.sml
index c4ba665..6c8f915 100644
--- a/prover_snapshots/hol4/lib/sail/sail2_instr_kindsScript.sml
+++ b/prover_snapshots/hol4/lib/sail/sail2_instr_kindsScript.sml
@@ -1,4 +1,4 @@
-(*Generated by Lem from ../../src/lem_interp/sail2_instr_kinds.lem.*)
+(*Generated by Lem from ../../src/gen_lib/sail2_instr_kinds.lem.*)
open HolKernel Parse boolLib bossLib;
open lem_pervasives_extraTheory;
@@ -172,62 +172,112 @@ val _ = Define `
val _ = Hol_datatype `
+ a64_barrier_domain =
+ A64_FullShare
+ | A64_InnerShare
+ | A64_OuterShare
+ | A64_NonShare`;
+
+
+val _ = Hol_datatype `
+ a64_barrier_type =
+ A64_barrier_all
+ | A64_barrier_LD
+ | A64_barrier_ST`;
+
+
+val _ = Hol_datatype `
barrier_kind =
(* Power barriers *)
- Barrier_Sync | Barrier_LwSync | Barrier_Eieio | Barrier_Isync
+ Barrier_Sync of unit | Barrier_LwSync of unit | Barrier_Eieio of unit | Barrier_Isync of unit
(* AArch64 barriers *)
- | Barrier_DMB | Barrier_DMB_ST | Barrier_DMB_LD | Barrier_DSB
- | Barrier_DSB_ST | Barrier_DSB_LD | Barrier_ISB
- | Barrier_TM_COMMIT
+ | Barrier_DMB of (a64_barrier_domain # a64_barrier_type)
+ | Barrier_DSB of (a64_barrier_domain # a64_barrier_type)
+ | Barrier_ISB of unit
+ | Barrier_TM_COMMIT of unit
(* MIPS barriers *)
- | Barrier_MIPS_SYNC
+ | Barrier_MIPS_SYNC of unit
(* RISC-V barriers *)
- | Barrier_RISCV_rw_rw
- | Barrier_RISCV_r_rw
- | Barrier_RISCV_r_r
- | Barrier_RISCV_rw_w
- | Barrier_RISCV_w_w
- | Barrier_RISCV_w_rw
- | Barrier_RISCV_rw_r
- | Barrier_RISCV_r_w
- | Barrier_RISCV_w_r
- | Barrier_RISCV_tso
- | Barrier_RISCV_i
+ | Barrier_RISCV_rw_rw of unit
+ | Barrier_RISCV_r_rw of unit
+ | Barrier_RISCV_r_r of unit
+ | Barrier_RISCV_rw_w of unit
+ | Barrier_RISCV_w_w of unit
+ | Barrier_RISCV_w_rw of unit
+ | Barrier_RISCV_rw_r of unit
+ | Barrier_RISCV_r_w of unit
+ | Barrier_RISCV_w_r of unit
+ | Barrier_RISCV_tso of unit
+ | Barrier_RISCV_i of unit
(* X86 *)
- | Barrier_x86_MFENCE`;
+ | Barrier_x86_MFENCE of unit`;
+val _ = Define `
+ ((string_a64_barrier_domain:a64_barrier_domain -> string)=
+ (\x . (case x of
+ A64_FullShare => "A64_FullShare"
+ | A64_InnerShare => "A64_InnerShare"
+ | A64_OuterShare => "A64_OuterShare"
+ | A64_NonShare => "A64_NonShare"
+ )))`;
+
+
+val _ = Define `
+((instance_Show_Show_Sail2_instr_kinds_a64_barrier_domain_dict:(a64_barrier_domain)Show_class)= (<|
+
+ show_method := string_a64_barrier_domain|>))`;
+
+
+val _ = Define `
+ ((string_a64_barrier_type:a64_barrier_type -> string)=
+ (\x . (case x of
+ A64_barrier_all => "A64_barrier_all"
+ | A64_barrier_LD => "A64_barrier_LD"
+ | A64_barrier_ST => "A64_barrier_ST"
+ )))`;
+
+
+val _ = Define `
+((instance_Show_Show_Sail2_instr_kinds_a64_barrier_type_dict:(a64_barrier_type)Show_class)= (<|
+
+ show_method := string_a64_barrier_type|>))`;
+
val _ = Define `
((instance_Show_Show_Sail2_instr_kinds_barrier_kind_dict:(barrier_kind)Show_class)= (<|
show_method := (\x .
(case x of
- Barrier_Sync => "Barrier_Sync"
- | Barrier_LwSync => "Barrier_LwSync"
- | Barrier_Eieio => "Barrier_Eieio"
- | Barrier_Isync => "Barrier_Isync"
- | Barrier_DMB => "Barrier_DMB"
- | Barrier_DMB_ST => "Barrier_DMB_ST"
- | Barrier_DMB_LD => "Barrier_DMB_LD"
- | Barrier_DSB => "Barrier_DSB"
- | Barrier_DSB_ST => "Barrier_DSB_ST"
- | Barrier_DSB_LD => "Barrier_DSB_LD"
- | Barrier_ISB => "Barrier_ISB"
- | Barrier_TM_COMMIT => "Barrier_TM_COMMIT"
- | Barrier_MIPS_SYNC => "Barrier_MIPS_SYNC"
- | Barrier_RISCV_rw_rw => "Barrier_RISCV_rw_rw"
- | Barrier_RISCV_r_rw => "Barrier_RISCV_r_rw"
- | Barrier_RISCV_r_r => "Barrier_RISCV_r_r"
- | Barrier_RISCV_rw_w => "Barrier_RISCV_rw_w"
- | Barrier_RISCV_w_w => "Barrier_RISCV_w_w"
- | Barrier_RISCV_w_rw => "Barrier_RISCV_w_rw"
- | Barrier_RISCV_rw_r => "Barrier_RISCV_rw_r"
- | Barrier_RISCV_r_w => "Barrier_RISCV_r_w"
- | Barrier_RISCV_w_r => "Barrier_RISCV_w_r"
- | Barrier_RISCV_tso => "Barrier_RISCV_tso"
- | Barrier_RISCV_i => "Barrier_RISCV_i"
- | Barrier_x86_MFENCE => "Barrier_x86_MFENCE"
+ Barrier_Sync () => "Barrier_Sync"
+ | Barrier_LwSync () => "Barrier_LwSync"
+ | Barrier_Eieio () => "Barrier_Eieio"
+ | Barrier_Isync () => "Barrier_Isync"
+ | Barrier_DMB (dom,typ) => STRCAT "Barrier_DMB ("
+ (STRCAT (string_a64_barrier_domain dom)
+ (STRCAT ", "
+ (STRCAT (string_a64_barrier_type typ)
+ ")")))
+ | Barrier_DSB (dom,typ) => STRCAT "Barrier_DSB ("
+ (STRCAT (string_a64_barrier_domain dom)
+ (STRCAT ", "
+ (STRCAT (string_a64_barrier_type typ)
+ ")")))
+ | Barrier_ISB () => "Barrier_ISB"
+ | Barrier_TM_COMMIT () => "Barrier_TM_COMMIT"
+ | Barrier_MIPS_SYNC () => "Barrier_MIPS_SYNC"
+ | Barrier_RISCV_rw_rw () => "Barrier_RISCV_rw_rw"
+ | Barrier_RISCV_r_rw () => "Barrier_RISCV_r_rw"
+ | Barrier_RISCV_r_r () => "Barrier_RISCV_r_r"
+ | Barrier_RISCV_rw_w () => "Barrier_RISCV_rw_w"
+ | Barrier_RISCV_w_w () => "Barrier_RISCV_w_w"
+ | Barrier_RISCV_w_rw () => "Barrier_RISCV_w_rw"
+ | Barrier_RISCV_rw_r () => "Barrier_RISCV_rw_r"
+ | Barrier_RISCV_r_w () => "Barrier_RISCV_r_w"
+ | Barrier_RISCV_w_r () => "Barrier_RISCV_w_r"
+ | Barrier_RISCV_tso () => "Barrier_RISCV_tso"
+ | Barrier_RISCV_i () => "Barrier_RISCV_i"
+ | Barrier_x86_MFENCE () => "Barrier_x86_MFENCE"
))|>))`;
@@ -299,44 +349,61 @@ val _ = Define `
(case x of
IK_barrier barrier_kind => STRCAT "IK_barrier "
(((\x . (case x of
- Barrier_Sync => "Barrier_Sync"
- | Barrier_LwSync => "Barrier_LwSync"
- | Barrier_Eieio => "Barrier_Eieio"
- | Barrier_Isync => "Barrier_Isync"
- | Barrier_DMB => "Barrier_DMB"
- | Barrier_DMB_ST => "Barrier_DMB_ST"
- | Barrier_DMB_LD => "Barrier_DMB_LD"
- | Barrier_DSB => "Barrier_DSB"
- | Barrier_DSB_ST => "Barrier_DSB_ST"
- | Barrier_DSB_LD => "Barrier_DSB_LD"
- | Barrier_ISB => "Barrier_ISB"
- | Barrier_TM_COMMIT =>
+ Barrier_Sync () =>
+ "Barrier_Sync"
+ | Barrier_LwSync () =>
+ "Barrier_LwSync"
+ | Barrier_Eieio () =>
+ "Barrier_Eieio"
+ | Barrier_Isync () =>
+ "Barrier_Isync"
+ | Barrier_DMB (dom,typ) =>
+ STRCAT "Barrier_DMB ("
+ (STRCAT
+ (string_a64_barrier_domain
+ dom)
+ (STRCAT ", "
+ (STRCAT
+ (string_a64_barrier_type
+ typ) ")")))
+ | Barrier_DSB (dom,typ) =>
+ STRCAT "Barrier_DSB ("
+ (STRCAT
+ (string_a64_barrier_domain
+ dom)
+ (STRCAT ", "
+ (STRCAT
+ (string_a64_barrier_type
+ typ) ")")))
+ | Barrier_ISB () =>
+ "Barrier_ISB"
+ | Barrier_TM_COMMIT () =>
"Barrier_TM_COMMIT"
- | Barrier_MIPS_SYNC =>
+ | Barrier_MIPS_SYNC () =>
"Barrier_MIPS_SYNC"
- | Barrier_RISCV_rw_rw =>
+ | Barrier_RISCV_rw_rw () =>
"Barrier_RISCV_rw_rw"
- | Barrier_RISCV_r_rw =>
+ | Barrier_RISCV_r_rw () =>
"Barrier_RISCV_r_rw"
- | Barrier_RISCV_r_r =>
+ | Barrier_RISCV_r_r () =>
"Barrier_RISCV_r_r"
- | Barrier_RISCV_rw_w =>
+ | Barrier_RISCV_rw_w () =>
"Barrier_RISCV_rw_w"
- | Barrier_RISCV_w_w =>
+ | Barrier_RISCV_w_w () =>
"Barrier_RISCV_w_w"
- | Barrier_RISCV_w_rw =>
+ | Barrier_RISCV_w_rw () =>
"Barrier_RISCV_w_rw"
- | Barrier_RISCV_rw_r =>
+ | Barrier_RISCV_rw_r () =>
"Barrier_RISCV_rw_r"
- | Barrier_RISCV_r_w =>
+ | Barrier_RISCV_r_w () =>
"Barrier_RISCV_r_w"
- | Barrier_RISCV_w_r =>
+ | Barrier_RISCV_w_r () =>
"Barrier_RISCV_w_r"
- | Barrier_RISCV_tso =>
+ | Barrier_RISCV_tso () =>
"Barrier_RISCV_tso"
- | Barrier_RISCV_i =>
+ | Barrier_RISCV_i () =>
"Barrier_RISCV_i"
- | Barrier_x86_MFENCE =>
+ | Barrier_x86_MFENCE () =>
"Barrier_x86_MFENCE"
)) barrier_kind))
| IK_mem_read read_kind => STRCAT "IK_mem_read "
@@ -508,35 +575,80 @@ val _ = Define `
val _ = Define `
+((instance_Sail2_instr_kinds_EnumerationType_Sail2_instr_kinds_a64_barrier_domain_dict:(a64_barrier_domain)EnumerationType_class)= (<|
+
+ toNat_method := (\x .
+ (case x of
+ A64_FullShare =>( 0 : num)
+ | A64_InnerShare =>( 1 : num)
+ | A64_OuterShare =>( 2 : num)
+ | A64_NonShare =>( 3 : num)
+ ))|>))`;
+
+
+val _ = Define `
+((instance_Sail2_instr_kinds_EnumerationType_Sail2_instr_kinds_a64_barrier_type_dict:(a64_barrier_type)EnumerationType_class)= (<|
+
+ toNat_method := (\x .
+ (case x of
+ A64_barrier_all =>( 0 : num)
+ | A64_barrier_LD =>( 1 : num)
+ | A64_barrier_ST =>( 2 : num)
+ ))|>))`;
+
+
+val _ = Define `
((instance_Sail2_instr_kinds_EnumerationType_Sail2_instr_kinds_barrier_kind_dict:(barrier_kind)EnumerationType_class)= (<|
toNat_method := (\x .
(case x of
- Barrier_Sync =>( 0 : num)
- | Barrier_LwSync =>( 1 : num)
- | Barrier_Eieio =>( 2 : num)
- | Barrier_Isync =>( 3 : num)
- | Barrier_DMB =>( 4 : num)
- | Barrier_DMB_ST =>( 5 : num)
- | Barrier_DMB_LD =>( 6 : num)
- | Barrier_DSB =>( 7 : num)
- | Barrier_DSB_ST =>( 8 : num)
- | Barrier_DSB_LD =>( 9 : num)
- | Barrier_ISB =>( 10 : num)
- | Barrier_TM_COMMIT =>( 11 : num)
- | Barrier_MIPS_SYNC =>( 12 : num)
- | Barrier_RISCV_rw_rw =>( 13 : num)
- | Barrier_RISCV_r_rw =>( 14 : num)
- | Barrier_RISCV_r_r =>( 15 : num)
- | Barrier_RISCV_rw_w =>( 16 : num)
- | Barrier_RISCV_w_w =>( 17 : num)
- | Barrier_RISCV_w_rw =>( 18 : num)
- | Barrier_RISCV_rw_r =>( 19 : num)
- | Barrier_RISCV_r_w =>( 20 : num)
- | Barrier_RISCV_w_r =>( 21 : num)
- | Barrier_RISCV_tso =>( 22 : num)
- | Barrier_RISCV_i =>( 23 : num)
- | Barrier_x86_MFENCE =>( 24 : num)
+ Barrier_Sync () =>( 0 : num)
+ | Barrier_LwSync () =>( 1 : num)
+ | Barrier_Eieio () =>( 2 : num)
+ | Barrier_Isync () =>( 3 : num)
+ | Barrier_DMB (dom,typ) =>(( 4 : num) +
+ (((\x . (case x of
+ A64_FullShare =>( 0 : num)
+ | A64_InnerShare =>( 1 : num)
+ | A64_OuterShare =>( 2 : num)
+ | A64_NonShare =>( 3 : num)
+ )) dom))) +
+ (( 4 : num) *
+ (((\x . (case x of
+ A64_barrier_all =>(
+ 0 : num)
+ | A64_barrier_LD =>( 1 : num)
+ | A64_barrier_ST =>( 2 : num)
+ )) typ))) (* 4-15 *)
+ | Barrier_DSB (dom,typ) =>(( 16 : num) +
+ (((\x . (case x of
+ A64_FullShare =>( 0 : num)
+ | A64_InnerShare =>( 1 : num)
+ | A64_OuterShare =>( 2 : num)
+ | A64_NonShare =>( 3 : num)
+ )) dom))) +
+ (( 4 : num) *
+ (((\x . (case x of
+ A64_barrier_all =>(
+ 0 : num)
+ | A64_barrier_LD =>( 1 : num)
+ | A64_barrier_ST =>( 2 : num)
+ )) typ))) (* 16-27 *)
+ | Barrier_ISB () =>( 28 : num)
+ | Barrier_TM_COMMIT () =>( 29 : num)
+ | Barrier_MIPS_SYNC () =>( 30 : num)
+ | Barrier_RISCV_rw_rw () =>( 31 : num)
+ | Barrier_RISCV_r_rw () =>( 32 : num)
+ | Barrier_RISCV_r_r () =>( 33 : num)
+ | Barrier_RISCV_rw_w () =>( 34 : num)
+ | Barrier_RISCV_w_w () =>( 35 : num)
+ | Barrier_RISCV_w_rw () =>( 36 : num)
+ | Barrier_RISCV_rw_r () =>( 37 : num)
+ | Barrier_RISCV_r_w () =>( 38 : num)
+ | Barrier_RISCV_w_r () =>( 39 : num)
+ | Barrier_RISCV_tso () =>( 40 : num)
+ | Barrier_RISCV_i () =>( 41 : num)
+ | Barrier_x86_MFENCE () =>( 42 : num)
))|>))`;
val _ = export_theory()
diff --git a/prover_snapshots/hol4/lib/sail/sail2_operators_bitlistsScript.sml b/prover_snapshots/hol4/lib/sail/sail2_operators_bitlistsScript.sml
index 7055b1e..adf3f2a 100644
--- a/prover_snapshots/hol4/lib/sail/sail2_operators_bitlistsScript.sml
+++ b/prover_snapshots/hol4/lib/sail/sail2_operators_bitlistsScript.sml
@@ -82,6 +82,11 @@ val _ = Define `
((zeros0:int ->(bitU)list) len= (repeat [B0] len))`;
+(*val ones : integer -> list bitU*)
+val _ = Define `
+ ((ones:int ->(bitU)list) len= (repeat [B1] len))`;
+
+
(*val vector_truncate : list bitU -> integer -> list bitU*)
val _ = Define `
((vector_truncate0:(bitU)list -> int ->(bitU)list) bs len= (extz_bv
diff --git a/prover_snapshots/hol4/lib/sail/sail2_prompt.lem b/prover_snapshots/hol4/lib/sail/sail2_prompt.lem
new file mode 100644
index 0000000..3107d3a
--- /dev/null
+++ b/prover_snapshots/hol4/lib/sail/sail2_prompt.lem
@@ -0,0 +1,20 @@
+open import Sail2_prompt_monad
+open import Sail2_state_monad
+open import Sail2_state
+
+let inline undefined_bool = undefined_boolS
+let inline bool_of_bitU_nondet = bool_of_bitU_nondetS
+let inline bool_of_bitU_fail = Sail2_state.bool_of_bitU_fail
+let inline bools_of_bits_nondet = bools_of_bits_nondetS
+let inline of_bits_nondet = of_bits_nondetS
+let inline of_bits_fail = of_bits_failS
+let inline mword_nondet = mword_nondetS
+let inline reg_deref = read_regS
+let inline choose msg xs = chooseS xs
+let inline internal_pick = internal_pickS
+
+let inline foreachM = foreachS
+let inline whileM = whileS
+let inline untilM = untilS
+let inline and_boolM = and_boolS
+let inline or_boolM = or_boolS
diff --git a/prover_snapshots/hol4/lib/sail/sail2_prompt_monad.lem b/prover_snapshots/hol4/lib/sail/sail2_prompt_monad.lem
new file mode 100644
index 0000000..896c1a9
--- /dev/null
+++ b/prover_snapshots/hol4/lib/sail/sail2_prompt_monad.lem
@@ -0,0 +1,53 @@
+open import Pervasives_extra
+open import Sail2_instr_kinds
+open import Sail2_values
+open import Sail2_state_monad
+
+(* Fake interface of the prompt monad by redirecting to the state monad, since
+ the former is not currently supported by HOL4 *)
+
+type monad 'rv 'a 'e = monadS 'rv 'a 'e
+type monadR 'rv 'a 'e 'r = monadRS 'rv 'a 'e 'r
+
+(* We need to use a target_rep for these because HOL doesn't handle unused
+ type parameters well. *)
+
+type base_monad 'regval 'regstate 'a 'e = monad 'regstate 'a 'e
+declare hol target_rep type base_monad 'regval 'regstate 'a 'e = `monad` 'regstate 'a 'e
+type base_monadR 'regval 'regstate 'a 'r 'e = monadR 'regstate 'a 'r 'e
+declare hol target_rep type base_monadR 'regval 'regstate 'a 'r 'e = `monadR` 'regstate 'a 'r 'e
+
+let inline return = returnS
+let inline bind = bindS
+let inline (>>=) = (>>$=)
+let inline (>>) = (>>$)
+
+let inline choose_bool msg = choose_boolS ()
+let inline undefined_bool = undefined_boolS
+let inline exit = exitS
+
+let inline throw = throwS
+let inline try_catch = try_catchS
+
+let inline catch_early_return = catch_early_returnS
+let inline early_return = early_returnS
+let inline liftR = liftRS
+let inline try_catchR = try_catchRS
+
+let inline maybe_fail = maybe_failS
+
+let inline read_memt_bytes = read_memt_bytesS
+let inline read_mem_bytes = read_mem_bytesS
+let inline read_reg = read_regS
+let inline reg_deref = read_regS
+let inline read_memt = read_memtS
+let inline read_mem = read_memS
+let inline excl_result = excl_resultS
+let inline write_reg = write_regS
+let inline write_mem_ea wk addrsize addr sz = return ()
+let inline write_memt = write_memtS
+let inline write_mem = write_memS
+let barrier _ = return ()
+let footprint _ = return ()
+
+let inline assert_exp = assert_expS
diff --git a/prover_snapshots/hol4/lib/sail/sail2_state_monadScript.sml b/prover_snapshots/hol4/lib/sail/sail2_state_monadScript.sml
index 6af7a24..a504cca 100644
--- a/prover_snapshots/hol4/lib/sail/sail2_state_monadScript.sml
+++ b/prover_snapshots/hol4/lib/sail/sail2_state_monadScript.sml
@@ -226,10 +226,9 @@ val _ = Define `
(let addrs = (GENLIST (\ n . addr + n) sz) in
let a_v = (lem_list$list_combine addrs v) in
let write_byte = (\mem p . (case (mem ,p ) of
- ( mem , (addr, v) ) => mem |+ ( addr ,
- v )
+ ( mem , (addr, v) ) =>mem |+ (addr, v)
)) in
- let write_tag = (\ mem addr . mem |+ ( addr , tag )) in
+ let write_tag = (\ mem addr . mem |+ (addr, tag)) in
( s with<| memstate := (FOLDL write_byte s.memstate a_v);
tagstate := (FOLDL write_tag s.tagstate addrs) |>)))`;
diff --git a/prover_snapshots/hol4/lib/sail/sail2_valuesAuxiliaryScript.sml b/prover_snapshots/hol4/lib/sail/sail2_valuesAuxiliaryScript.sml
index b475c5e..d35efac 100644
--- a/prover_snapshots/hol4/lib/sail/sail2_valuesAuxiliaryScript.sml
+++ b/prover_snapshots/hol4/lib/sail/sail2_valuesAuxiliaryScript.sml
@@ -125,9 +125,8 @@ val just_list_spec = store_thm("just_list_spec",
conj_tac
\\ ho_match_mp_tac just_list_ind
\\ Cases \\ rw[]
- \\ rw[Once just_list_def]
+ \\ srw_tac [boolSimps.NORMEQ_ss] [Once just_list_def]
>- ( CASE_TAC \\ fs[] \\ CASE_TAC )
- >- PROVE_TAC[]
\\ Cases_on`es` \\ fs[]
\\ CASE_TAC \\ fs[]
\\ CASE_TAC \\ fs[]
diff --git a/prover_snapshots/hol4/lib/sail/sail2_valuesScript.sml b/prover_snapshots/hol4/lib/sail/sail2_valuesScript.sml
index 134b086..2396801 100644
--- a/prover_snapshots/hol4/lib/sail/sail2_valuesScript.sml
+++ b/prover_snapshots/hol4/lib/sail/sail2_valuesScript.sml
@@ -34,26 +34,6 @@ val _ = Define `
(*val neq : forall 'a. Eq 'a => 'a -> 'a -> bool*)
-(*let add_int l r = integerAdd l r
-let add_signed l r = integerAdd l r
-let sub_int l r = integerMinus l r
-let mult_int l r = integerMult l r
-let div_int l r = integerDiv l r
-let div_nat l r = natDiv l r
-let power_int_nat l r = integerPow l r
-let power_int_int l r = integerPow l (nat_of_int r)
-let negate_int i = integerNegate i
-let min_int l r = integerMin l r
-let max_int l r = integerMax l r
-
-let add_real l r = realAdd l r
-let sub_real l r = realMinus l r
-let mult_real l r = realMult l r
-let div_real l r = realDiv l r
-let negate_real r = realNegate r
-let abs_real r = realAbs r
-let power_real b e = realPowInteger b e*)
-
(*val print_endline : string -> unit*)
val _ = Define `
((print_endline:string -> unit) _= () )`;
@@ -556,6 +536,29 @@ val _ = Define `
)))`;
+val _ = Define `
+ ((nibble_of_char:char ->(bitU#bitU#bitU#bitU)option)=
+ (\x . (case x of
+ #"0" => SOME (B0, B0, B0, B0)
+ | #"1" => SOME (B0, B0, B0, B1)
+ | #"2" => SOME (B0, B0, B1, B0)
+ | #"3" => SOME (B0, B0, B1, B1)
+ | #"4" => SOME (B0, B1, B0, B0)
+ | #"5" => SOME (B0, B1, B0, B1)
+ | #"6" => SOME (B0, B1, B1, B0)
+ | #"7" => SOME (B0, B1, B1, B1)
+ | #"8" => SOME (B1, B0, B0, B0)
+ | #"9" => SOME (B1, B0, B0, B1)
+ | #"A" => SOME (B1, B0, B1, B0)
+ | #"B" => SOME (B1, B0, B1, B1)
+ | #"C" => SOME (B1, B1, B0, B0)
+ | #"D" => SOME (B1, B1, B0, B1)
+ | #"E" => SOME (B1, B1, B1, B0)
+ | #"F" => SOME (B1, B1, B1, B1)
+ | _ => NONE
+ )))`;
+
+
val _ = Define `
((hexstring_of_bits:(bitU)list ->((char)list)option) bs= ((case bs of
b1 :: b2 :: b3 :: b4 :: bs =>
@@ -571,13 +574,75 @@ val _ = Define `
val _ = Define `
- ((show_bitlist:(bitU)list -> string) bs=
+ ((show_bitlist_prefix:char ->(bitU)list -> string) c bs=
((case hexstring_of_bits bs of
- SOME s => IMPLODE (#"0" :: (#"x" :: s))
- | NONE => IMPLODE (#"0" :: (#"b" :: MAP bitU_char bs))
+ SOME s => IMPLODE (c :: (#"x" :: s))
+ | NONE => IMPLODE (c :: (#"b" :: MAP bitU_char bs))
)))`;
+val _ = Define `
+ ((show_bitlist:(bitU)list -> string) bs= (show_bitlist_prefix #"0" bs))`;
+
+
+(*val hex_char : natural -> char*)
+
+val _ = Define `
+ ((hex_char:num -> char) n=
+ (
+ if(n = ( 0: num)) then #"0" else
+ (
+ if(n = ( 1: num)) then #"1" else
+ (
+ if(n = ( 2: num)) then #"2" else
+ (
+ if(n = ( 3: num)) then #"3" else
+ (
+ if(n = ( 4: num)) then #"4" else
+ (
+ if(n = ( 5: num)) then #"5" else
+ (
+ if(n = ( 6: num)) then #"6" else
+ (
+ if(n = ( 7: num)) then #"7" else
+ (
+ if(n = ( 8: num)) then #"8" else
+ (
+ if(n = ( 9: num)) then #"9" else
+ (
+ if(n = ( 10: num)) then #"A" else
+ (
+ if(n = ( 11: num)) then #"B" else
+ (
+ if(n = ( 12: num)) then #"C" else
+ (
+ if(n = ( 13: num)) then #"D" else
+ (
+ if(n = ( 14: num)) then #"E" else
+ (
+ if(n = ( 15: num)) then #"F" else
+ (failwith
+ "hex_char: not a hexadecimal digit"))))))))))))))))))`;
+
+
+(*val hex_str_aux : natural -> list char -> list char*)
+
+ val hex_str_aux_defn = Hol_defn "hex_str_aux" `
+ ((hex_str_aux:num ->(char)list ->(char)list) n acc=
+ (if n =( 0:num) then acc else
+ hex_str_aux (n DIV( 16:num)) (hex_char (n MOD( 16:num)) :: acc)))`;
+
+val _ = Lib.with_flag (computeLib.auto_import_definitions, false) Defn.save_defn hex_str_aux_defn;
+
+(*val hex_str : integer -> string*)
+
+val _ = Define `
+ ((hex_str:int -> string) i=
+ (if i <( 0 : int) then failwith "hex_str: negative" else
+ if i =( 0 : int) then "0x0" else
+ STRCAT"0x" (IMPLODE (hex_str_aux (Num (ABS (ABS i))) []))))`;
+
+
(*val subrange_list_inc : forall 'a. list 'a -> integer -> integer -> list 'a*)
val _ = Define `
((subrange_list_inc:'a list -> int -> int -> 'a list) xs i j=