diff options
| author | Alex Richardson | 2020-09-25 12:31:04 +0100 |
|---|---|---|
| committer | Alex Richardson | 2020-09-25 12:31:04 +0100 |
| commit | f22136def93656ebe8c4c6e49214983365ecd6e2 (patch) | |
| tree | af7546afd800b63164ff3acb71be49ea77e2cd94 /test/latex/candperm.sail | |
| parent | 782d3860eb0134c81d4a4204b7caab72cda3bd1d (diff) | |
Add an initial LaTeX test
This is for a bug I encountered while moving some docs over from the ISA
spec into sail documentation comments.
Diffstat (limited to 'test/latex/candperm.sail')
| -rw-r--r-- | test/latex/candperm.sail | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/latex/candperm.sail b/test/latex/candperm.sail new file mode 100644 index 00000000..4aec545a --- /dev/null +++ b/test/latex/candperm.sail @@ -0,0 +1,28 @@ +/* Test that we can parse the CAndPerm documentation correctly: + * Previously the \hyperref expressions were broken. */ +default Order dec + +scattered union ast('datasize : Int, 'destsize : Int, 'regsize : Int) +val execute : forall ('datasize : Int) ('destsize : Int) ('regsize : Int). + ast('datasize, 'destsize, 'regsize) -> unit +scattered function execute +/*! CAndPerm union clause documentation */ +union clause ast = CAndPerm : (int, int, int) +/*! + * Capability register \emph{cd} is replaced with the contents of capability + * register \emph{cs1} with the \cperms{} field set to the bitwise-AND of + * its previous value and bits 0 .. 10 of integer register \emph{rs2} + * and the \cuperms{} field set to the bitwise and of its previous value + * and bits \hyperref[table:pseudocode-constants]{\emph{first\_uperm}} .. + * \hyperref[table:pseudocode-constants]{\emph{last\_uperm}} of \emph{rd}. + */ +function clause execute(CAndPerm(cd, cs1, rs2)) = { + /* Implementation */ + return () +} +/* Note: need at least two function clauses to generate latex output */ +union clause ast = CSetFlags : (int, int, int) +function clause execute CSetFlags(cd, cs1, rs2) = return(()) + +end execute +end ast |
