summaryrefslogtreecommitdiff
path: root/cheri/Makefile
diff options
context:
space:
mode:
authorRobert Norton2016-07-26 11:26:16 +0100
committerRobert Norton2016-07-26 11:26:29 +0100
commit71d0832af1d5c28278f5434169eeaadba8807426 (patch)
tree3ea85a83c5bc00b56e3e18c7d9c7a51683cbb5bb /cheri/Makefile
parentc922e08af4cf8c1fc5cd65d4550275d0c56c2c2f (diff)
Add Makefile and marker comments in cheri sail file for extracting individual instructions to go in CHERI documentation.
Diffstat (limited to 'cheri/Makefile')
-rw-r--r--cheri/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/cheri/Makefile b/cheri/Makefile
new file mode 100644
index 00000000..1c7c2304
--- /dev/null
+++ b/cheri/Makefile
@@ -0,0 +1,30 @@
+EXTRACT_INST=sed -n "/START_${1}\b/,/END_${1}\b/p" cheri_insts.sail | sed 's/^ //;1d;$$d' > inst_$1.sail
+
+extract: cheri_insts.sail
+ $(call EXTRACT_INST,CGetX)
+ $(call EXTRACT_INST,CGetPCC)
+ $(call EXTRACT_INST,CGetPCCSetOffset)
+ $(call EXTRACT_INST,CGetCause)
+ $(call EXTRACT_INST,CSetCause)
+ $(call EXTRACT_INST,CAndPerm)
+ $(call EXTRACT_INST,CToPtr)
+ $(call EXTRACT_INST,CSub)
+ $(call EXTRACT_INST,CPtrCmp)
+ $(call EXTRACT_INST,CIncOffset)
+ $(call EXTRACT_INST,CSetOffset)
+ $(call EXTRACT_INST,CSetBounds)
+ $(call EXTRACT_INST,CClearTag)
+ $(call EXTRACT_INST,CClearRegs)
+ $(call EXTRACT_INST,CFromPtr)
+ $(call EXTRACT_INST,CCheckPerm)
+ $(call EXTRACT_INST,CCheckType)
+ $(call EXTRACT_INST,CSeal)
+ $(call EXTRACT_INST,CUnseal)
+ $(call EXTRACT_INST,CCall)
+ $(call EXTRACT_INST,CReturn)
+ $(call EXTRACT_INST,CBx)
+ $(call EXTRACT_INST,CJALR)
+ $(call EXTRACT_INST,CLoad)
+ $(call EXTRACT_INST,CStore)
+ $(call EXTRACT_INST,CSC)
+ $(call EXTRACT_INST,CLC)