summaryrefslogtreecommitdiff
path: root/cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-07-27 16:29:40 +0100
committerAlasdair Armstrong2018-07-27 16:29:40 +0100
commit313c004c1829700697ea2fe1281cc1f7afe5904a (patch)
tree8af9ee022502c8d422daf98178000df5e9317e97 /cheri/sail_latexcc/sailccfncapRegToCapStruct.tex
parent4861ebb08ccd3e13af19b9c12f2164b66a5d2bb0 (diff)
Check in snapshot of cheri latex
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]
+ }