summaryrefslogtreecommitdiff
path: root/cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
diff options
context:
space:
mode:
authorPeter Sewell2018-07-27 18:52:40 +0100
committerPeter Sewell2018-07-27 18:52:40 +0100
commit34c745ff78a409daeddf4b5a78e28c85c62eb6fd (patch)
treee9f391cab299f83953a489992de590cbb220c983 /cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
parent4c84c70eafbbf9bea475e3264f21eedc3555021f (diff)
Revert "wib" (mistaken delete of sail_latexcc)
This reverts commit 4c84c70eafbbf9bea475e3264f21eedc3555021f.
Diffstat (limited to 'cheri/sail_latexcc/sailccfncapRegToCapStruct.tex')
-rw-r--r--cheri/sail_latexcc/sailccfncapRegToCapStruct.tex27
1 files changed, 27 insertions, 0 deletions
diff --git a/cheri/sail_latexcc/sailccfncapRegToCapStruct.tex b/cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
new file mode 100644
index 00000000..4af338b9
--- /dev/null
+++ b/cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
@@ -0,0 +1,27 @@
+function #\hyperref[zcapRegToCapStruct]{capRegToCapStruct}#(c) : CapReg -> CapStruct =
+ let s : bool = c[104] in
+ let Bc : #\hyperref[zbits]{bits}#(20) = if s then c[103..96] @ 0x000 else c[103..84] in
+ let Tc : #\hyperref[zbits]{bits}#(20) = if s then c[83..76] @ 0x000 else c[83..64] in
+ let otype : #\hyperref[zbits]{bits}#(24) = if s then c[95..84] @ c[75..64] else #\hyperref[zzzeros]{zeros}#() in
+ struct {
+ tag = c[128],
+ uperms = c[127..124],
+ access_system_regs = c[123],
+ permit_unseal = c[122],
+ permit_ccall = c[121],
+ permit_seal = c[120],
+ permit_store_local_cap = c[119],
+ permit_store_cap = c[118],
+ permit_load_cap = c[117],
+ permit_store = c[116],
+ permit_load = c[115],
+ permit_execute = c[114],
+ global = c[113],
+ reserved = c[112..111],
+ E = c[110..105],
+ sealed = s,
+ B = Bc,
+ T = Tc,
+ otype = otype,
+ address = c[63..0]
+ }