On 11/14/2024 1:56 PM, Christian Herber wrote:
> We are delighted to announce the start of the public review period for
> the following proposed standard extensions to the RISC-V ISA:
>
>
> Zilsd: Load/Store Pair for RV32
> Zclsd: Load/Store Pair for RV32 (compressed)
>
This reminds me of something...
Maybe it might make sense to define an extension, say:
The LQ and SQ encodings can be understood as Load/Store Pair on RV64.
Or, at least, this is something (among other things) that I am doing in
my own non-standard implementation.
Also, FLQ and FSQ for Load/Store Pair to the F registers (when FLEN=64).
Basically, same basic idea, just for RV64.
AFAIK, there is not presently any formal proposals for 64-bit Load/Store
Pair.
Or, say, as a possible RV64 version of Zilsd?...
Makes sense to me...
No particular comment otherwise, except that it can help with code
density and performance, so no strong reason to not have it.
Except maybe in smaller microcontrollers (where cost optimization is
likely the main priority).
In other news (unrelated), for my own thing, I am tempted to move my
"jumbo prefixes" to a different part of the encoding space.
Current:
* jiiiiii-iiiii-jjjjj-100-kkkkk-00-11011 J21
* 0iiiiii-iiiii-jjjjj-100-kkkkk-00-11011 J21_IMM
* 1iiiiii-iiiii-zzzzz-100-omnpp-00-11011 J21_OP
This conflicts with an ADDIWU instruction that existed in an earlier
version of BitManip, but has since been removed. I didn't notice this
when I was looking for an encoding to use, but it could matter if
someone did actually want to re-add ADDIWU (I am on the fence, as I see
it the improvements to code density and performance due to these
prefixes is larger than that which would have been given by an ADDIWU
instruction; though, for my own uses, I did re-add ADDWU and SUBWU).
Also, where it is now currently results in an ugly hack in my
superscalar handling code. But, OTOH, this may not matter as much if one
assumes ADDIWU isn't coming back.
Possible new encoding:
* jiiiiii-iiiii-jjjjj-100-kkkkk-11-00111 J21_NEW
* 0iiiiii-iiiii-jjjjj-100-kkkkk-11-00111 J21_IMM_NEW
* 1iiiiii-iiiii-zzzzz-100-omnpp-11-00111 J21_OP_NEW
This would put it in the same block as JALR. Best I can tell, by my own
gathered lists, there is nothing else here. I could then phase out the
existing encodings.
Also wanting to define an encoding to load a 64-bit value into F0..F31.
Where, in the existing scheme:
"J21 + J21 + LUI": Loads a 64-bit value into Xn, no bits left over.
"J21 + J21 + AUIPC": Maybe loads 64b into F0..F31 ?...
These combinations using 96 bits / 12-bytes of space.
I still consider these 96-bit cases as optional, as they imply a wider
fetch and more complexity than needed for 64-bit encodings (say, loading
a 64-bit value in two 64-bit encodings; eating 16 bytes of space, and
around 2 clock cycles in my implementation; vs 1 clock cycle for a
96-bit encoding).
As noted, as-is:
J21_IMM + 3R_Imm12 operations extends immediate to 33 bits;
Can be applied to all existing Imm12 or Disp12 instructions.
J21 + 3R operations may synthesize an immediate for some ops;
Say, for example, MULW lacking an immediate form, etc.
J21 + LUI: Encodes a 33-bit (sign-extended) constant load (*1).
J21 + AUIPC: Encodes a 33-bit PC+Disp (*1).
*1: The remaining bits in the prefix left as more encoding space.
For LUI, encodings also allow loading a 32-bit value into F0..F31.
Base instruction gives high 20 bits of Imm/Disp;
Prefix gives the low 12 bits, and a sign-extension bit.
J21 + JAL: Extends branch displacement to 33 bits.
Though, the displacement is decoded same as AUIPC in this case.
Existing JAL displacement encoding is nightmarish...
Using the same format as J21_AUIPC allows reusing the same reloc.
Granted, I still don't really expect that anyone else would likely adopt
any of this (and probably wouldn't see so much direct use by
applications), but I do still see good results (regarding code density
and performance) in my own testing (and still seems relevant to tasks
like "make OpenGL and similar faster").
Ignoring a few other (more aggressive) experiments at the moment...
>
> To respond to the public review, please either email comments to the
> public isa-dev mailing list or add issues and/or pull requests (PRs) to
> the GitHub repo:
https://github.com/riscv/riscv-zilsd/issues. We welcome
> all input and appreciate your time and effort in helping us by reviewing
> the specification.
>
>
> During the public review period, corrections, comments, and suggestions,
> will be gathered for review. Any minor corrections and/or
> uncontroversial changes will be incorporated into the specification. Any
> remaining issues or proposed changes will be addressed in the public
> review summary report. If there are no issues that require incompatible
> changes to the public review specification, the Unprivileged ISA
> Committee will recommend the updated specifications be approved and
> ratified by the RISC-V Technical Steering Committee and the RISC-V Board
> of Directors.
>
>
> Thanks to all the contributors for all their hard work.
>
>
> Christian Herber
>
> Owner of the Load/Store Pair for RV32 fast-track extension
>
>
> --
> 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 <mailto:
isa-
>
dev+uns...@groups.riscv.org>.
> To view this discussion visit
https://groups.google.com/a/
>
groups.riscv.org/d/msgid/isa-dev/
> GV1PR04MB95136F374F294D9CAFDEA865865B2%
40GV1PR04MB9513.eurprd04.prod.outlook.com <
https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/GV1PR04MB95136F374F294D9CAFDEA865865B2%40GV1PR04MB9513.eurprd04.prod.outlook.com?utm_medium=email&utm_source=footer>.