From f697e33c88c6d3c629a906324463c8ab5743231a Mon Sep 17 00:00:00 2001 From: Tariq Kurd Date: Fri, 28 Feb 2025 14:42:40 +0100 Subject: [PATCH] note about masks for reserved bits --- src/insns/acperm_32bit.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insns/acperm_32bit.adoc b/src/insns/acperm_32bit.adoc index 86cd1236..9135a820 100644 --- a/src/insns/acperm_32bit.adoc +++ b/src/insns/acperm_32bit.adoc @@ -23,11 +23,11 @@ Encoding:: include::wavedrom/acperm.adoc[] Description:: -ACPERM performs the following operations: +<> performs the following operations: . Convert the AP and SDP fields of capability `cs1` into a bit field with the format shown in xref:acperm_bit_field[xrefstyle=short]. -. Calculate the bitwise AND of the bit field with the mask `rs2`. +. Calculate the bitwise AND of the bit field with the mask `rs2`.^1^ . If the AP and <> field in `cs1` could not have been produced by <> then clear all AP permissions, and the <> to {CAP_MODE_VALUE}. Skip the next step. . Clear AP permissions as required to meet the rules below. @@ -35,6 +35,8 @@ clear all AP permissions, and the <> to {CAP_MODE_VALUE}. Skip the next s . Copy `cs1` to `cd`, and update the AP and SDP fields with the newly calculated versions. . Set `cd.tag=0` if `cs1` is sealed or if any reserved fields of `cs1` are set. + +^1^ Only mask bits associated with currently defined permissions have an effect, mask bits associated with _reserved_ permissions are ignored. ++ Some combinations of permissions cannot be encoded for MXLEN=32, and are not useful when MXLEN=64. These cases are defined to return useful minimal sets of permissions, which may be no permissions. +