Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added note to cbuildcap and reserved cs1 == 0 #103

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/insns/cbuildcap_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ sealed, `cs1` 's permissions and bounds are equal or a superset of `cs2` 's,
`cs2` 's bounds are not malformed (see
xref:section_cap_malformed[xrefstyle=short]), and all reserved bits in `cs2` 's
metadata are 0. <<CBUILDCAP>> is typically used alongside <<CSETHIGH>> to build
capabilities from integer values. The case `cs1 == 0` trivially leads to the tag
of `cd` being stripped.
capabilities from integer values.

NOTE: The case `cs1 == 0` trivially leads to the tag of `cd` being stripped.
We opted to not make this a pseudo instruction to clear the tag of capability.
`cbuildcap cd, c0, cs2` will behave differently in the case of otypes being
added. Thus we reserve the encoding `cs1 == 0` for now.
andresag01 marked this conversation as resolved.
Show resolved Hide resolved

Prerequisites::
{cheri_base_ext_name}
Expand Down
2 changes: 1 addition & 1 deletion src/insns/wavedrom/cbuildcap.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{bits: 7, name: 'opcode', attr: ['7', 'OP=0110011'], type: 8},
{bits: 5, name: 'cd', attr: ['5', 'dest'], type: 2},
{bits: 3, name: 'funct3', attr: ['3', 'CBUILDCAP=101'], type: 8},
{bits: 5, name: 'cs1', attr: ['5', 'src1'], type: 4},
{bits: 5, name: 'cs1', attr: ['5', 'src1 != 0'], type: 4},
{bits: 5, name: 'cs2', attr: ['5', 'src2'], type: 3},
{bits: 7, name: 'funct7', attr: ['7', 'CBUILDCAP=0000110'], type: 3},
]}
Expand Down
Loading