diff options
| author | Alasdair Armstrong | 2020-09-28 14:24:21 +0100 |
|---|---|---|
| committer | GitHub | 2020-09-28 14:24:21 +0100 |
| commit | 551bca444eaf0acd97324c12005e9a8280437217 (patch) | |
| tree | f1dab8ac1a2444ec1c164f380ce0d217dc8b357f /test/latex | |
| parent | c79b2759fa85373d25c1d2d64c3599a5773a4c68 (diff) | |
| parent | 263ffca94d22e1ff7ce32d8f6ba782b0fcacd0d7 (diff) | |
Merge pull request #98 from arichardson/add-sectioning-commands
Handle sectioning commands in saildoc LaTeX output
Diffstat (limited to 'test/latex')
| -rw-r--r-- | test/latex/candperm.commands.tex.exp | 15 | ||||
| -rw-r--r-- | test/latex/candperm.sail | 18 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/latex/candperm.commands.tex.exp b/test/latex/candperm.commands.tex.exp index df253d71..14153396 100644 --- a/test/latex/candperm.commands.tex.exp +++ b/test/latex/candperm.commands.tex.exp @@ -39,6 +39,21 @@ and bits \firstUPerm{} .. \lastUPerm{} of \emph{rd}. }{\lstinputlisting[language=sail]{out/fclCAndPermMarkdownWithRefMacrozexecute33a689e3a631b9b905b85461d3814943.tex}}}} +\newcommand{\sailfclCAndPermMarkdownWithExceptionsexecute}{\saildoclabelled{fclCAndPermMarkdownWithExceptionszexecute}{\saildocfcl{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 \firstUPerm{} .. \lastUPerm{} of \emph{rd}. + +\subsubsection*{Exceptions:} +An exception is raised if: + +\begin{itemize} +\item \emph{cs1.tag} is not set. +\item \emph{cs1} is sealed. +\end{itemize} +}{\lstinputlisting[language=sail]{out/fclCAndPermMarkdownWithExceptionszexecute33a689e3a631b9b905b85461d3814943.tex}}}} + \newcommand{\sailval}[1]{ diff --git a/test/latex/candperm.sail b/test/latex/candperm.sail index 75482db1..656818d2 100644 --- a/test/latex/candperm.sail +++ b/test/latex/candperm.sail @@ -63,5 +63,23 @@ function clause execute(CAndPermMarkdownWithRefMacro(cd, cs1, rs2)) = { return () } +union clause ast = CAndPermMarkdownWithExceptions : (int, int, int) +/*! + * Capability register *cd* is replaced with the contents of capability + * register *cs1* with the \cperms{} field set to the bitwise-AND of + * its previous value and bits 0 .. 10 of integer register *rs2* + * and the \cuperms{} field set to the bitwise and of its previous value + * and bits \firstUPerm{} .. \lastUPerm{} of *rd*. + * + * ### Exceptions: + * An exception is raised if: + * - *cs1.tag* is not set. + * - *cs1* is sealed. + */ +function clause execute(CAndPermMarkdownWithExceptions(cd, cs1, rs2)) = { + /* Implementation */ + return () +} + end execute end ast |
