During the end of the RVI ratification and following it, the meaning of "reserved" was subtly morphed.During the early RVI development, prior to RISCV.org and during its early years, "reserved" consistently meant that the instruction encoding was unavailable to implementations. IThe implementation was required to trap with illegal instruction if encoding was detected in the input stream.
Now that requirement is substantially relaxed.Trapping is not mandated.Behaviour is undefined for such an encoding.Specifically allowed is behaviour that might be expected if the reserved encoding followed and the patterning of the other instructions. e.g. C.LI explicitly does not include x0 in its encoding, however, when rd is x0 it is considered a hint.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/86272c02-8424-4a69-8434-7d452a893088n%40groups.riscv.org.
I'm unclear which bit of the above you predict will come back to bite:- defining destination=X0 to be a hint (which is a bit different than say it's a reserved encoding, oh, and it's a hint)- defining reserved encodings as unspecified and that trapping is not mandated
I'm a little unclear about what"Specifically allowed is behaviour that might be expected if the reserved encoding followed and the patterning of the other instructions"means beyond the hint definition when rd=x0; those are specifically called out in the spec for each base opcode (can C-extopcode) to which it applies, so they aren't RESERVED as such.
Correct . The idea is that C.LI X0,n is not the same hint as ADDI X0, X0, n .
So the encoding means something different than "normal"
[expansion case].
@DHorner: did you have some other examples in mind?
Perhaps RV32 C.SRLI [and other shifts] is a better example.
When nzuimm[5]=1 the instruction is designated NSE. The original old term, Non-Standard Extension.
But I think it is now understood to be "reserved".
It is allowed to expand to SRLI with the high shift bit set, and thus on RV32 trap [or not] as a SRLI does [or not] .
Or it could map to any other 32 bit instruction; however, it is
not a custom extension but a NSE.
I will raise an issue in github rsicv-isa-manual to suggest NSE
is removed here as well and we standardize on "reserved".
In section 16.8 RVC Instruction Set Listing NSE is used to indication Custom Encoding, a subset of Non-Standard Extension/Encoding.
I opened this issue to fix it up some: https://github.com/riscv/riscv-isa-manual/issues/629So, the better example is :
C.ADDI4SPN (RES, nzuimm=0)
Reserved when nzuimm=0, that is when it would [otherwise] translate to the "hint" ADDI X2, X2, 0.
A compliant implementation can make that mapping explicit.
However, it would not be compliant with a future version of the standard that uses that encoding for something other than a hint.
I'm unclear which bit of the above you predict will come back to bite:- defining destination=X0 to be a hint (which is a bit different than say it's a reserved encoding, oh, and it's a hint)- defining reserved encodings as unspecified and that trapping is not mandated
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/853ae867-1aed-4379-b6aa-6f02f6abc38fn%40groups.riscv.org.
The instruction decoder should be able to distinguish all 2^32 encodings into the set {Legal, Exception}
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/853ae867-1aed-4379-b6aa-6f02f6abc38fn%40groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAF4tt%3DAT0GtiN6opadfx8GvvE8BrnbX4ZFYp-YhdgOBCRE0LBQ%40mail.gmail.com.
Defined instruction-set categories: standard, reserved, custom, non-standard, and non-conforming
We briefly note that the entire privileged-level design described in this document could be replaced
with an entirely different privileged-level design without changing the unprivileged ISA, and possibly
without even changing the ABI. In particular, this privileged specification was designed to run
existing popular operating systems, and so embodies the conventional level-based protection
model. Alternate privileged specifications could embody other more flexible protection-domain
models. For simplicity of expression, the text is written as if this was the only possible privileged
architecture.