Skip to content

Commit

Permalink
fix xrefs and add note that PCC metadata is retained
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqkurd-repo committed Jan 31, 2024
1 parent ad1bdb1 commit aa7fb69
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/insns/cjal_jal_32bit.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<<<
//[#insns-cjal_jal-32bit,reftext="Jumps (CJAL, JAL), 32-bit encodings"]

[#CJ,reftext="CJ"]
==== CJ

Expands to <<CJAL>> following the expansion rule for <<J>> expanding to <<JAL>> from cite:[riscv-unpriv-spec].

[#J,reftext="J"]
==== J

Expands to <<JAL>> following the expansion rule from cite:[riscv-unpriv-spec].

[#CJAL,reftext="CJAL"]
==== CJAL

Expand Down
10 changes: 10 additions & 0 deletions src/insns/cjalr_jalr_32bit.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<<<

[#CJR,reftext="CJR"]
==== CJR

Expands to <<CJALR>> following the expansion rule for <<JR>> expanding to <<JARL>> from cite:[riscv-unpriv-spec].

[#JR,reftext="JR"]
==== JR

Expands to <<JALR>> following the expansion rule from cite:[riscv-unpriv-spec].

[#CJALR,reftext="CJALR"]
==== CJALR

Expand Down
12 changes: 7 additions & 5 deletions src/instructions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,18 @@ include::img/jvtcreg.edn[]

All instruction fetches from the jump vector table are checked against <<jvtc>>.

See <<CM.CJALT>>, <<CM.JALT>>, <<CM.CJT>>, <<CM.JT>>.
See <<CM_CJALT>>, <<CM_JALT>>, <<CM_CJT>>, <<CM_JT>>.

If the access to the jump table succeeds, then the instructions execute as follows:

* In capability mode
** <<cm.jt>> executes as <<cj>> or <<auipcc>>+<<cjr>>
** <<cm.jalt>> executes as <<cjal>> or <<auipcc>>+<<cjalr>>
** <<CM_JT>> executes as <<CJ>> or <<AUIPCC>>+<<CJR>>
** <<CM_JALT>> executes as <<CJAL>> or <<AUIPCC>>+<<CJALR>>
* In legacy mode
** <<cm.jt>> executes as <<j>> or <<auipc>>+<<jr>>
** <<cm.jalt>> executes as <<jal>> or <<auipc>>+<<jalr>>
** <<CM_JT>> executes as <<J>> or <<AUIPC>>+<<JR>>
** <<CM_JALT>> executes as <<JAL>> or <<AUIPC>>+<<JALR>>
As a result the capability metadata is retained in the <<pcc>> during execution.

include::insns/zcmt_cmjalt.adoc[]
include::insns/zcmt_cmjt.adoc[]
Expand Down

0 comments on commit aa7fb69

Please sign in to comment.