回复: Re: RISCV: Support Zilsd and Zcmlsd extensions.

孙东亚 sundongya@nucleisys.com
Wed Nov 27 07:20:11 GMT 2024


Thanks for your advise and based on the provided suggestions, the following modifications have been made:
1. Renamed zcmlsd to zclsd according to upstream changes : https://github.com/riscv/riscv-zilsd.

2. Re-adapted the patch on the master branch based on the latest version of binutils.
3. Modified the indentation of the patch to make it more standardized.
4. For all new instructions, a test case has been added.



bfd/ChangeLog:

        * elfxx-riscv.c (riscv_parse_check_conflicts): "zclsd" conflict with the “c+f'/ zcf”extension.
        (riscv_multi_subset_supports): Handle zilsd and zclsd.
        (riscv_multi_subset_supports_ext): Handle zilsd and zclsd.


gas/ChangeLog:


        * config/tc-riscv.c (validate_riscv_insn): Add new operand Gd,Gt for zilsd.ld, zilsd.sd.
        (riscv_ip): Ditto.
        * testsuite/gas/riscv/zclsd-ld-fail.d: New test.
        * testsuite/gas/riscv/zclsd-ld-fail.l: New test.
        * testsuite/gas/riscv/zclsd-ld-fail.s: New test.
        * testsuite/gas/riscv/zclsd-ld.d: New test.
        * testsuite/gas/riscv/zclsd-ld.s: New test.
        * testsuite/gas/riscv/zclsd-ldsp-fail.d: New test.
        * testsuite/gas/riscv/zclsd-ldsp-fail.l: New test.
        * testsuite/gas/riscv/zclsd-ldsp-fail.s: New test.
        * testsuite/gas/riscv/zclsd-ldsp.d: New test.
        * testsuite/gas/riscv/zclsd-ldsp.s: New test.
        * testsuite/gas/riscv/zclsd-sd-fail.d: New test.
        * testsuite/gas/riscv/zclsd-sd-fail.l: New test.
        * testsuite/gas/riscv/zclsd-sd-fail.s: New test.
        * testsuite/gas/riscv/zclsd-sd.d: New test.
        * testsuite/gas/riscv/zclsd-sd.s: New test.
        * testsuite/gas/riscv/zclsd-sdsp-fail.d: New test.
        * testsuite/gas/riscv/zclsd-sdsp-fail.l: New test.
        * testsuite/gas/riscv/zclsd-sdsp-fail.s: New test.
        * testsuite/gas/riscv/zclsd-sdsp.d: New test.
        * testsuite/gas/riscv/zclsd-sdsp.s: New test.
        * testsuite/gas/riscv/zilsd-ld-fail.d: New test.
        * testsuite/gas/riscv/zilsd-ld-fail.l: New test.
        * testsuite/gas/riscv/zilsd-ld-fail.s: New test.
        * testsuite/gas/riscv/zilsd-ld.d: New test.
        * testsuite/gas/riscv/zilsd-ld.s: New test.
        * testsuite/gas/riscv/zilsd-sd-fail.d: New test.
        * testsuite/gas/riscv/zilsd-sd-fail.l: New test.
        * testsuite/gas/riscv/zilsd-sd-fail.s: New test.
        * testsuite/gas/riscv/zilsd-sd.d: New test.
        * testsuite/gas/riscv/zilsd-sd.s: New test.


include/ChangeLog:


        * opcode/riscv.h (enum riscv_insn_class): Add INSN_CLASS_ZILSD and INSN_CLASS_ZCMLSD.


opcodes/ChangeLog:


        * riscv-dis.c (print_insn_args): Print zilsd instruction information.

        * riscv-opc.c: Add zilsd and zcmlsd instructions.  


---
 bfd/elfxx-riscv.c                         | 22 ++++++++++++++++++++++ gas/config/tc-riscv.c                     | 36 ++++++++++++++++++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ld-fail.d   |  3 +++
 gas/testsuite/gas/riscv/zclsd-ld-fail.l   | 23 +++++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ld-fail.s   | 26 ++++++++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ld.d        | 14 ++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ld.s        |  5 +++++
 gas/testsuite/gas/riscv/zclsd-ldsp-fail.d |  3 +++
 gas/testsuite/gas/riscv/zclsd-ldsp-fail.l | 18 ++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ldsp-fail.s | 20 ++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ldsp.d      | 17 +++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-ldsp.s      |  8 ++++++++
 gas/testsuite/gas/riscv/zclsd-sd-fail.d   |  3 +++
 gas/testsuite/gas/riscv/zclsd-sd-fail.l   | 23 +++++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sd-fail.s   | 26 ++++++++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sd.d        | 14 ++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sd.s        |  5 +++++
 gas/testsuite/gas/riscv/zclsd-sdsp-fail.d |  3 +++
 gas/testsuite/gas/riscv/zclsd-sdsp-fail.l | 18 ++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sdsp-fail.s | 20 ++++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sdsp.d      | 19 +++++++++++++++++++
 gas/testsuite/gas/riscv/zclsd-sdsp.s      | 10 ++++++++++
 gas/testsuite/gas/riscv/zilsd-ld-fail.d   |  3 +++
 gas/testsuite/gas/riscv/zilsd-ld-fail.l   | 12 ++++++++++++
 gas/testsuite/gas/riscv/zilsd-ld-fail.s   | 15 +++++++++++++++
 gas/testsuite/gas/riscv/zilsd-ld.d        | 15 +++++++++++++++
 gas/testsuite/gas/riscv/zilsd-ld.s        |  6 ++++++
 gas/testsuite/gas/riscv/zilsd-sd-fail.d   |  3 +++
 gas/testsuite/gas/riscv/zilsd-sd-fail.l   | 13 +++++++++++++
 gas/testsuite/gas/riscv/zilsd-sd-fail.s   | 16 ++++++++++++++++
 gas/testsuite/gas/riscv/zilsd-sd.d        | 15 +++++++++++++++
 gas/testsuite/gas/riscv/zilsd-sd.s        |  6 ++++++
 include/opcode/riscv.h                    |  2 ++
 opcodes/riscv-dis.c                       | 18 ++++++++++++++++++
 opcodes/riscv-opc.c                       | 12 ++++++++++++
 35 files changed, 472 insertions(+)





                    Palmer Dabbelt<palmer@dabbelt.com> 在 2024年7月23日 周二 7:35 写道:

On Mon, 22 Jul 2024 02:06:23 PDT (-0700), sundongya@nucleisys.com wrote:
> This patch adds support for the Zilsd and Zcmlsd extension, Which is documented at&nbsp; &nbsp;https://github.com/riscv/riscv-zilsd/releases/tag/v0.9.0&nbsp;.
> Currently, the patch has been merged into&nbsp;https://github.com/nxp-auto-tools/binutils_zilsd by Edmar Wienskoski <edmar.wienskoski@NXP.com&gt;.

The README says "Zclsd", but the patches say "Zcmlsd".  Not sure if 
they're different, or just different names.

Also: this is just "stable", which is generally meaningless in RISC-V 
land.  We usually wait until "frozen" before merging something -- we'll 
still review it, though (as Jan already has done some).


>
>
>
>
>
> bfd/ChangeLog:
>
> &nbsp;
>
> &nbsp; &nbsp; &nbsp; &nbsp; * bfd/elfxx-riscv.c (riscv_parse_check_conflicts):  “zcmlsd” conflict with the “c+f'/ zcf”extension.
>
> &nbsp; &nbsp; &nbsp; &nbsp; (riscv_multi_subset_supports):Handle zilsd and zcmlsd.
>
> &nbsp; &nbsp; &nbsp; &nbsp; (riscv_multi_subset_supports_ext): Handle zilsd and zcmlsd.
>
> &nbsp;
>
> gas/ChangeLog:
>
> &nbsp;
>
> &nbsp; &nbsp; &nbsp; &nbsp; *gas/ config/tc-riscv.c (validate_riscv_insn):Add new operand Gd,Gt for zilsd.ld, zilsd.sd.
> &nbsp; &nbsp; &nbsp; &nbsp; (riscv_ip):&nbsp;Ditto.
> &nbsp;
>
> include/ChangeLog:
>
> &nbsp;
>
> &nbsp; &nbsp; &nbsp; &nbsp; * include/opcode/riscv.h (enum riscv_insn_class):Add INSN_CLASS_ZILSD and INSN_CLASS_ZCMLSD.
>
> &nbsp;
>
> opcodes/ChangeLog:
>
> &nbsp;
>
> &nbsp; &nbsp; &nbsp; &nbsp; * opcode/riscv-dis.c (print_insn_args): Print zilsd instruction information.
>
> &nbsp; &nbsp; &nbsp; &nbsp; * opecode/riscv-opc.c: Add zilsd and zcmlsd instructions.
>
>
>
> ---
>
> &nbsp;bfd/elfxx-riscv.c &nbsp; &nbsp; &nbsp;| 23 +++++++++++++++++++++--
> &nbsp;gas/config/tc-riscv.c &nbsp;| 35 +++++++++++++++++++++++++++++++++++
> &nbsp;include/opcode/riscv.h | &nbsp;2 ++
> &nbsp;opcodes/riscv-dis.c &nbsp; &nbsp;| 18 ++++++++++++++++++
> &nbsp;opcodes/riscv-opc.c &nbsp; &nbsp;| 12 ++++++++++++
> &nbsp;5 files changed, 88 insertions(+), 2 deletions(-)
>
>
> Co-developed-by: SUN Dongya <sundongya@nucleisys.com&gt;Co-developed-by: LIU Xu <liuxu@nucleisys.com&gt;Co-developed-by: ZHAO Fujin <zhaofujin@nucleisys.com&gt;Co-developed-by: Edmar Wienskoski <edmar.wienskoski@NXP.com&gt;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20241127/8d6ccf58/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zilsd_zclsd.patch
Type: application/octet-stream
Size: 26531 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20241127/8d6ccf58/attachment-0001.obj>


More information about the Binutils mailing list