From ad1bdb17a372396dfa063ea3e54e9f8b41c01b98 Mon Sep 17 00:00:00 2001 From: Tariq Kurd Date: Tue, 30 Jan 2024 12:33:45 +0000 Subject: [PATCH 1/2] clarify PCC bounds after zcmt instruction --- src/instructions.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/instructions.adoc b/src/instructions.adoc index d4fa5c25..d05d6ab9 100644 --- a/src/instructions.adoc +++ b/src/instructions.adoc @@ -210,6 +210,15 @@ All instruction fetches from the jump vector table are checked against <>. See <>, <>, <>, <>. +If the access to the jump table succeeds, then the instructions execute as follows: + +* In capability mode +** <> executes as <> or <>+<> +** <> executes as <> or <>+<> +* In legacy mode +** <> executes as <> or <>+<> +** <> executes as <> or <>+<> + include::insns/zcmt_cmjalt.adoc[] include::insns/zcmt_cmjt.adoc[] From aa7fb696db13009b8903742813d8a96bba04f975 Mon Sep 17 00:00:00 2001 From: Tariq Kurd Date: Wed, 31 Jan 2024 09:15:50 +0000 Subject: [PATCH 2/2] fix xrefs and add note that PCC metadata is retained --- src/insns/cjal_jal_32bit.adoc | 10 ++++++++++ src/insns/cjalr_jalr_32bit.adoc | 10 ++++++++++ src/instructions.adoc | 12 +++++++----- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/insns/cjal_jal_32bit.adoc b/src/insns/cjal_jal_32bit.adoc index e3bed1f2..b4f10e01 100644 --- a/src/insns/cjal_jal_32bit.adoc +++ b/src/insns/cjal_jal_32bit.adoc @@ -1,6 +1,16 @@ <<< //[#insns-cjal_jal-32bit,reftext="Jumps (CJAL, JAL), 32-bit encodings"] +[#CJ,reftext="CJ"] +==== CJ + +Expands to <> following the expansion rule for <> expanding to <> from cite:[riscv-unpriv-spec]. + +[#J,reftext="J"] +==== J + +Expands to <> following the expansion rule from cite:[riscv-unpriv-spec]. + [#CJAL,reftext="CJAL"] ==== CJAL diff --git a/src/insns/cjalr_jalr_32bit.adoc b/src/insns/cjalr_jalr_32bit.adoc index 6ab8beb6..79a7c327 100644 --- a/src/insns/cjalr_jalr_32bit.adoc +++ b/src/insns/cjalr_jalr_32bit.adoc @@ -1,5 +1,15 @@ <<< +[#CJR,reftext="CJR"] +==== CJR + +Expands to <> following the expansion rule for <> expanding to <> from cite:[riscv-unpriv-spec]. + +[#JR,reftext="JR"] +==== JR + +Expands to <> following the expansion rule from cite:[riscv-unpriv-spec]. + [#CJALR,reftext="CJALR"] ==== CJALR diff --git a/src/instructions.adoc b/src/instructions.adoc index d05d6ab9..823cd403 100644 --- a/src/instructions.adoc +++ b/src/instructions.adoc @@ -208,16 +208,18 @@ include::img/jvtcreg.edn[] All instruction fetches from the jump vector table are checked against <>. -See <>, <>, <>, <>. +See <>, <>, <>, <>. If the access to the jump table succeeds, then the instructions execute as follows: * In capability mode -** <> executes as <> or <>+<> -** <> executes as <> or <>+<> +** <> executes as <> or <>+<> +** <> executes as <> or <>+<> * In legacy mode -** <> executes as <> or <>+<> -** <> executes as <> or <>+<> +** <> executes as <> or <>+<> +** <> executes as <> or <>+<> + +As a result the capability metadata is retained in the <> during execution. include::insns/zcmt_cmjalt.adoc[] include::insns/zcmt_cmjt.adoc[]