Skip to content

Commit

Permalink
Reserve encodings for CHERI-RISC-V memory versioning instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtc27 authored and bsdjhb committed Apr 4, 2022
1 parent 0795116 commit f55516c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app-isaquick-riscv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,9 @@ \chapter{CHERI-RISC-V ISA Quick Reference}
\vspace{1em}

{\scriptsize
\rvcherienctablesrcsrc
\def\rvcherireservedfootnotemark{$\dagger$}
\rvcherienctablesrcsrc\\\\
$\dagger$ Reserved for future use.
}

\vspace{1em}
Expand Down Expand Up @@ -835,7 +837,9 @@ \chapter{CHERI-RISC-V ISA Quick Reference}
\vspace{1em}

{\scriptsize
\rvcherienctablesrcdest
\def\rvcherireservedfootnotemark{$\dagger$}
\rvcherienctablesrcdest\\\\
$\dagger$ Reserved for future use.
}

\vspace{1em}
Expand Down
7 changes: 7 additions & 0 deletions def-riscv-insns-macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
\newcommand{\@rvcheridest}[2]{\@rvcherisrcdest{0x1f}{#2}{#1}}
\newcommand{\@rvcheriscr}[4]{\@rvcherisrcsrcdest{#1}{#2}{#4}{#3}}
\newcommand{\@rvchericlear}[1]{\@rvcherisrcsrcdestclear{0x7f}{m}{q}{#1}}
\newcommand{\@rvcheristorever}[3]{\@rvcherisrcsrcdest{0x7e}{#1}{#3}{#2}}
\newcommand{\@rvcheriexpload}[3]{\@rvcherisrcsrcdest{0x7d}{#2}{#3}{#1}}
\newcommand{\@rvcheriexpstore}[3]{\@rvcherisrcsrcdest{0x7c}{#1}{#3}{#2}}
\newcommand{\@rvcheriexpstorecond}[4]{\@rvcherisrcsrcdest{0x7c}{#1}{#4}{#2/#3}}
Expand Down Expand Up @@ -250,6 +251,12 @@
\@rvcheriasmencdef{srcdest}{"#2}{q(uarter), m(ask)}%
}}

\newcommand{\rvcheristorever}[4][]{{%
\@rvcheriinsnsetkeys{#1}%
\@rvcheribitboxdef{\@rvcherirawbitbox{storever}{\@rvcheriinsnfmtfunc{#2}}{#3}{#4}}%
\@rvcheriasmencdef{srcsrc}{"#2}{#3, #4}%
}}

\newcommand{\rvcheriexpload}[4][]{{%
\@rvcheriinsnsetkeys{#1}%
\@rvcheribitboxdef{\@rvcherirawbitbox{expload}{\@rvcheriinsnfmtfunc{#2}}{#3}{#4}}%
Expand Down
7 changes: 7 additions & 0 deletions def-riscv-insns.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
\rvcherisrcdest[name=CLoadTags]{12}{rd}{cs1}
\rvcherisrc[name=CClearTags,noref,tablesuffix=\rvcherireservedfootnotemark]{0}{cs1}

\rvcherisrcdest[name=CGetVersion,noref,tablesuffix=\rvcherireservedfootnotemark]{13}{rd}{cs1}
\rvcherisrcsrcdest[name=CSetVersion,noref,tablesuffix=\rvcherireservedfootnotemark]{2}{cd}{cs1}{rs2}
\rvcheristorever[name=CStoreVersion,noref,tablesuffix=\rvcherireservedfootnotemark]{2}{rs2}{cs1}
\rvcherisrcdest[name=CLoadVersion,noref,tablesuffix=\rvcherireservedfootnotemark]{16}{rd}{cs1}
\rvcherisrcdest[name=CLoadVersions,noref,tablesuffix=\rvcherireservedfootnotemark]{15}{rd}{cs1}
\rvcherisrcsrcdest[name=CAmoCDecVersion,noref,tablesuffix=\rvcherireservedfootnotemark]{3}{rd}{cs2}{cs1}

\rvcheriexpload[name=LB.DDC]{00}{rd}{rs1}
\rvcheriexpload[name=LH.DDC]{01}{rd}{rs1}
\rvcheriexpload[name=LW.DDC]{02}{rd}{rs1}
Expand Down

0 comments on commit f55516c

Please sign in to comment.