Skip to content

Commit

Permalink
reformat into 1 table
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqkurd-repo committed Oct 29, 2024
1 parent 00bd304 commit 7c3e72a
Showing 1 changed file with 16 additions and 30 deletions.
46 changes: 16 additions & 30 deletions src/insns/acperm_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,42 +40,28 @@ The rules from <<acperm_rules>> must be followed when removing permissions.

[#acperm_rules]
.ACPERM common rules
[%autowidth,float="center",align="center",cols="2,3,3",options="header"]
[%autowidth,float="center",align="center",cols="3,3,3",options="header"]
|===
| Rule | Permission | Only valid if
| 1 | <<c_perm>> | <<r_perm>> or <<w_perm>>
3+| See <<acperm_rules_rv32>> for rules 2-5 (RV32 only)
| 7 | <<sl_perm>> | <<w_perm>> and <<c_perm>>
| 8 | <<el_perm>> | <<c_perm>> and <<r_perm>>
| 9 | <<lm_perm>> | <<c_perm>> and <<r_perm>>
| 10 | <<asr_perm>> | <<x_perm>>
| 11 | <<m_bit>> | <<x_perm>>
3+| See <<acperm_rules_rv32>> for rule 12 (RV32 only)
| Rule | Permission | Only valid if
| 1 (RV32 only) | <<asr_perm>> | All other permissions are set.
| 2 | <<c_perm>> | <<r_perm>> or <<w_perm>>
| 3 (RV32 only) | <<c_perm>> | <<r_perm>>
| 4 (RV32 only) | <<x_perm>> | <<r_perm>>
| 5 (RV32 only) | <<w_perm>> | not(<<c_perm>>) or (<<c_perm>> and not(<<lm_perm>>))
| 6 (RV32 only) | <<x_perm>> | <<w_perm>> or <<c_perm>>
| 7 (RV32 only) | <<x_perm>> | <<c_perm>> == <<lm_perm>> == <<el_perm>>
| 8 | <<sl_perm>> | <<w_perm>> and <<c_perm>>
| 9 | <<el_perm>> | <<c_perm>> and <<r_perm>>
| 10 | <<lm_perm>> | <<c_perm>> and <<r_perm>>
| 11 | <<asr_perm>> | <<x_perm>>
| 12 | <<m_bit>> | <<x_perm>>
|===

The behaviour of currently illegal combinations from <<acperm_rules>> is to clear the permission if invalid (or in the case of <<sl_perm>> set it to 0 (_local_)).

* For RV64 all such combinations may be redefined by future extensions.
* For RV32 none of these combinations are possible.
RV32 needs additional rules as some combinations which are legal on RV64 are not possible on RV32.
These rules are specifically to meet the encoding requirements for <<cap_perms_encoding32>>, or
<<cap_perms_encoding_levels32>> if <<cheri_levels_ext,{cheri_levels_ext_name}>> is implemented.

[#acperm_rules_rv32]
.ACPERM RV32 additional rules
[%autowidth,float="center",align="center",cols="2,2,3",options="header"]
|===
| Rule | Permission | Only valid if
| 2 | <<c_perm>> | <<r_perm>>
| 3 | <<x_perm>> | <<r_perm>>
| 4 | <<w_perm>> | not(<<c_perm>>) or (<<c_perm>> and not(<<lm_perm>>))
| 5 | <<x_perm>> | <<w_perm>> or <<c_perm>>
| 6 | <<x_perm>> | <<c_perm>> == <<lm_perm>> == <<el_perm>>
| 12 | <<asr_perm>> | All other permissions are set.
|===

In all cases invalid permissions from <<acperm_rules_rv32>> are cleared.
* For the RV32 only rules none of these combinations are possible to meet the encoding requirements for <<cap_perms_encoding32>>, or
<<cap_perms_encoding_levels32>> if <<cheri_levels_ext,{cheri_levels_ext_name}>> is implemented. In all cases invalid permissions are cleared.
.Capability permissions bit field
[#acperm_bit_field]
Expand Down

0 comments on commit 7c3e72a

Please sign in to comment.