From db662a3722df721d3d0bac21cba9d757a42dcfa1 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Tue, 15 Oct 2024 20:48:15 +0000 Subject: [PATCH] CSetBoundsRoundDown archdoc --- archdoc/app-isaquick-riscv.tex | 2 ++ archdoc/chap-changes.tex | 1 + archdoc/chap-encoding-sail.tex | 3 +++ archdoc/chap-isaref-riscv.tex | 2 ++ archdoc/def-riscv-insns.tex | 1 + archdoc/insn-riscv/csetboundsrounddown.tex | 16 ++++++++++++++++ 6 files changed, 25 insertions(+) create mode 100644 archdoc/insn-riscv/csetboundsrounddown.tex diff --git a/archdoc/app-isaquick-riscv.tex b/archdoc/app-isaquick-riscv.tex index 63396ab..17925e7 100644 --- a/archdoc/app-isaquick-riscv.tex +++ b/archdoc/app-isaquick-riscv.tex @@ -51,6 +51,8 @@ \chapter{Instruction encoding summary} \rvcheriisaquick{CSetBoundsExact} + \rvcheriisaquick{CSetBoundsRoundDown} + \rvcheriisaquick{CSetBoundsImm} \rvcheriisaquick{CSetHigh} diff --git a/archdoc/chap-changes.tex b/archdoc/chap-changes.tex index f974ccf..091993c 100644 --- a/archdoc/chap-changes.tex +++ b/archdoc/chap-changes.tex @@ -44,5 +44,6 @@ \chapter{Version history} \item[\ghissue{71}, \ghpr{87}] \rvcheriasminsnref{CUnseal} now no longer requires exact equality between sealed input otype and authority address. Instead, it merely requires that the otype of the sealed input is within bounds to yield a tagged result. The address of a sealing-root capability is now meaningful only to \rvcheriasminsnref{CSeal}. + \item[\ghissue{72},\ghpr{74}] Introduce \rvcheriasminsnref{CSetBoundsRoundDown} to facilitate constructing representable slices of buffers. \end{description} \end{description} diff --git a/archdoc/chap-encoding-sail.tex b/archdoc/chap-encoding-sail.tex index ce7feb0..7b70eaa 100644 --- a/archdoc/chap-encoding-sail.tex +++ b/archdoc/chap-encoding-sail.tex @@ -24,6 +24,9 @@ \chapter{Sail listings for capability encoding} \medskip \sailRISCVfnsetCapBounds +\medskip +\sailRISCVfnsetCapBoundsRoundDown + \medskip \sailRISCVfngetRepresentableAlignmentMask diff --git a/archdoc/chap-isaref-riscv.tex b/archdoc/chap-isaref-riscv.tex index ea921d6..871c996 100644 --- a/archdoc/chap-isaref-riscv.tex +++ b/archdoc/chap-isaref-riscv.tex @@ -248,6 +248,7 @@ \subsection*{Functions for manipulating capabilities} \medskip \sailRISCVval{setCapBounds} +\sailRISCVval{setCapBoundsRoundDown} \sailRISCVval{setCapAddr} \sailRISCVval{incCapAddr} % \sailRISCVval{setCapOffset} @@ -305,6 +306,7 @@ \section{\cherimcu{} Instructions} \input{insn-riscv/csetaddr} \input{insn-riscv/csetbounds} \input{insn-riscv/csetboundsexact} +\input{insn-riscv/csetboundsrounddown} \input{insn-riscv/csetboundsimm} \input{insn-riscv/csetequalexact} \input{insn-riscv/csethigh} diff --git a/archdoc/def-riscv-insns.tex b/archdoc/def-riscv-insns.tex index 54cade0..0d1c093 100644 --- a/archdoc/def-riscv-insns.tex +++ b/archdoc/def-riscv-insns.tex @@ -33,6 +33,7 @@ \rvcherisrcsrcdestimm[name=CIncAddrImm]{1}{cd}{cs1}{imm} \rvcherisrcsrcdest[name=CSetBounds]{8}{cd}{cs1}{rs2} \rvcherisrcsrcdest[name=CSetBoundsExact]{9}{cd}{cs1}{rs2} +\rvcherisrcsrcdest[name=CSetBoundsRoundDown]{A}{cd}{cs1}{rs2} \rvcherisrcsrcdestimm[name=CSetBoundsImm]{2}{cd}{cs1}{uimm} \rvcherisrcsrcdest[name=CSetHigh]{16}{cd}{cs1}{rs2} \rvcherisrcdest[name=CClearTag]{B}{cd}{cs1} diff --git a/archdoc/insn-riscv/csetboundsrounddown.tex b/archdoc/insn-riscv/csetboundsrounddown.tex new file mode 100644 index 0000000..441d39d --- /dev/null +++ b/archdoc/insn-riscv/csetboundsrounddown.tex @@ -0,0 +1,16 @@ +\clearpage +\phantomsection +\addcontentsline{toc}{subsection}{CSetBoundsRoundDown} +\insnriscvlabel{csetboundsrounddown} +\subsection*{CSetBoundsRoundDown} + +\subsubsection*{Format} + +\rvcheriasm{CSetBoundsRoundDown} + +\begin{center} +\rvcheriheader +\rvcheribitbox{CSetBoundsRoundDown} +\end{center} + +\sailRISCVisarefbody{CSetBoundsRoundDown}