summaryrefslogtreecommitdiff
path: root/src/lem_interp
diff options
context:
space:
mode:
authorJon French2019-03-14 13:56:37 +0000
committerJon French2019-03-14 13:56:37 +0000
commit0d88c148a2a068a95b5fc3d5c25b599faf3e75a0 (patch)
treecb507bee25582f503ae4047ce32558352aeb8b27 /src/lem_interp
parent4f14ccb421443dbc10b88e190526dda754f324aa (diff)
parentec8cad1daa76fb265014d3d313173905925c9922 (diff)
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'src/lem_interp')
-rw-r--r--src/lem_interp/sail2_instr_kinds.lem26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lem_interp/sail2_instr_kinds.lem b/src/lem_interp/sail2_instr_kinds.lem
index eadc85bf..bd3a3eb7 100644
--- a/src/lem_interp/sail2_instr_kinds.lem
+++ b/src/lem_interp/sail2_instr_kinds.lem
@@ -203,6 +203,30 @@ instance (Show trans_kind)
end
end
+(* cache maintenance instructions *)
+type cache_op_kind =
+ (* AArch64 DC *)
+ | Cache_op_D_IVAC | Cache_op_D_ISW | Cache_op_D_CSW | Cache_op_D_CISW
+ | Cache_op_D_ZVA | Cache_op_D_CVAC | Cache_op_D_CVAU | Cache_op_D_CIVAC
+ (* AArch64 IC *)
+ | Cache_op_I_IALLUIS | Cache_op_I_IALLU | Cache_op_I_IVAU
+
+instance (Show cache_op_kind)
+ let show = function
+ | Cache_op_D_IVAC -> "Cache_op_D_IVAC"
+ | Cache_op_D_ISW -> "Cache_op_D_ISW"
+ | Cache_op_D_CSW -> "Cache_op_D_CSW"
+ | Cache_op_D_CISW -> "Cache_op_D_CISW"
+ | Cache_op_D_ZVA -> "Cache_op_D_ZVA"
+ | Cache_op_D_CVAC -> "Cache_op_D_CVAC"
+ | Cache_op_D_CVAU -> "Cache_op_D_CVAU"
+ | Cache_op_D_CIVAC -> "Cache_op_D_CIVAC"
+ | Cache_op_I_IALLUIS -> "Cache_op_I_IALLUIS"
+ | Cache_op_I_IALLU -> "Cache_op_I_IALLU"
+ | Cache_op_I_IVAU -> "Cache_op_I_IVAU"
+ end
+end
+
type instruction_kind =
| IK_barrier of barrier_kind
| IK_mem_read of read_kind
@@ -213,6 +237,7 @@ type instruction_kind =
and branch/jump (single nia of kind NIA_concrete_address) *)
| IK_trans of trans_kind
| IK_simple of unit
+ | IK_cache_op of cache_op_kind
instance (Show instruction_kind)
@@ -224,6 +249,7 @@ instance (Show instruction_kind)
| IK_branch () -> "IK_branch"
| IK_trans trans_kind -> "IK_trans " ^ (show trans_kind)
| IK_simple () -> "IK_simple"
+ | IK_cache_op cache_kind -> "IK_cache_op " ^ (show cache_kind)
end
end