You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds supports for all new RVY loads/stores (capability-wide
versions: ly/sy instructions). Additionally, for RVY (CHERI), loads and
stores are mode-dependent, using either a YLEN register or a XLEN
register as the base.
In the former case loads/stores are authorized by that register,
and in the latter (compatibility cast), the loads/stores keep using an
address but are authorized by the DDC CSR. The assembler mnemonics are
the same in both cases. Prior to the standardization process CHERI
assembly used c-prefixed register names for capabilities, so we had the
following syntax:
lw x4, 0(c3) # capability mode: use new `CLW` instruction
lw x4, 0(x3) # integer mode: use existing `LW` instruction
During the standardization this was changed to keep the same register
name in both modes, so now we have `lw x4, 0(x3)` in both modes but we
have to select between two instructions: one using the normal GPR
register class and one using the YGPR register class.
The newly added test checks that we select the right instruction
(`LW` or `LW_Y`) using --show-inst, since both the encoding and the
assembler syntax are the same in both modes.
This commit changes the Load_ri and Store_rri tablegen classes into a
multiclass that defines the RVI and RVY at the same time to reduce the
size of the diff and hopefully improve maintainability. The downstream
fork had duplicated definitions which avoids merge conflicts but does
mean any refactorings do not make it to the almost identical duplicate
definitions. The other advantage is that we also get support for the
other load/store instructions that are not explicitly tested in this
commit.
0 commit comments