-
Notifications
You must be signed in to change notification settings - Fork 1
Draft Extension: Zfbfmin
, Zvfbfmin
and Zvfbfwma
#115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
a4lg
wants to merge
4
commits into
master
Choose a base branch
from
riscv-bfloat16
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8e671c4
to
ded5bde
Compare
44397b9
to
2b34365
Compare
0f4abce
to
33a7f9d
Compare
1477628
to
2ace9c5
Compare
[DO NOT MERGE] Until RISC-V BF16 extensions are frozen/ratified and the final version number is determined, this patch should not be merged upstream. This commit uses unratified version 0.8 as in the latest PDF documentation (instead of possible 1.0 after ratification). This commit adds support for the 'Zfbfmin' extension, the scalar BF16 conversion extension. It consists of two new instructions and four previously 'Zfhmin'-only instructions. This commit is based on the following specification: <riscv/riscv-bfloat16@5578e34> bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add 'Zfbfmin' -> 'F'. (riscv_supported_std_z_ext): Add 'Zfbfmin'. (riscv_multi_subset_supports): Recategory INSN_CLASS_ZFHMIN to mean 'Zfhmin' or 'Zfbfmin'. Add support to INSN_CLASS_ZFBFMIN. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * testsuite/gas/riscv/zfbfmin.s: New test. * testsuite/gas/riscv/zfbfmin.d: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_FCVT_BF16_S, MASK_FCVT_BF16_S, MATCH_FCVT_S_BF16, MASK_FCVT_S_BF16): New. * opcode/riscv.h (enum riscv_insn_class): Add new instruction class INSN_CLASS_ZFBFMIN. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Add 'Zfbfmin'-only instructions.
[DO NOT MERGE] Until RISC-V BF16 extensions are frozen/ratified and the final version number is determined, this patch should not be merged upstream. This commit uses unratified version 0.8 as in the latest PDF documentation (instead of possible 1.0 after ratification). This commit adds support for the 'Zvfbfmin' extension, the vector BF16 conversion only extension, consisting of two narrowing / widening conversion instructions between BF16 and FP32. This commit is based on the following specification: <riscv/riscv-bfloat16@5578e34> bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add implications 'Zvfbfmin' -> 'Zfbfmin' and 'Zve32f'. (riscv_supported_std_z_ext): Add 'Zvfbfmin'. (riscv_multi_subset_supports): Add support to INSN_CLASS_ZVFBFMIN. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * testsuite/gas/riscv/zvfbfmin.s: New test. * testsuite/gas/riscv/zvfbfmin.d: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_VFNCVTBF16_F_F_W, MASK_VFNCVTBF16_F_F_W, MATCH_VFWCVTBF16_F_F_V, MASK_VFWCVTBF16_F_F_V): New. * opcode/riscv.h (enum riscv_insn_class): Add new instruction class INSN_CLASS_ZVFBFMIN. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Add 'Zvfbfmin' instructions.
[DO NOT MERGE] Until RISC-V BF16 extensions are frozen/ratified and the final version number is determined, this patch should not be merged upstream. This commit uses unratified version 0.8 as in the latest PDF documentation (instead of possible 1.0 after ratification). This commit adds support for the 'Zvfbfwma' extension, the vector BF16 multiply then FP32 accumlation extension, consisting of two widening multiply-accumulate instructions. This commit is based on the following specification: <riscv/riscv-bfloat16@5578e34> bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add 'Zvfbfwma' -> 'Zvfbfmin' implication. (riscv_supported_std_z_ext): Add 'Zvfbfwma'. (riscv_multi_subset_supports): Add support to INSN_CLASS_ZVFBFWMA. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * testsuite/gas/riscv/zvfbfwma.s: New test. * testsuite/gas/riscv/zvfbfwma.d: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_VFWMACCBF16_VF, MASK_VFWMACCBF16_VF, MATCH_VFWMACCBF16_VV, MASK_VFWMACCBF16_VV): New. * opcode/riscv.h (enum riscv_insn_class): Add new instruction class INSN_CLASS_ZVFBFWMA. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Add 'Zvfbfwma' instructions.
This commit adds an assembler directive ".bfloat16" to help BFloat16 extensions ('Zfbfmin', 'Zvfbfmin' and 'Zvfbfwma') users. gas/ChangeLog: * config/tc-riscv.c (FLT_CHARS): Add BFloat16 'b' to supported floating point formats. (riscv_pseudo_table) Add ".bfloat16" directive. * testsuite/gas/riscv/bfloat16.s: Copied from testsuite/gas/aarch64/bfloat16-directive.s. * testsuite/gas/riscv/bfloat16-be.d: New test ported from testsuite/gas/aarch64/bfloat16-directive-be.d and float16-be.d. * testsuite/gas/riscv/bfloat16-le.d: New test ported from testsuite/gas/aarch64/bfloat16-directive-le.d and float16-le.d.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wiki Page (details): https://github.com/a4lg/binutils-gdb/wiki/riscv_bfloat16