This patch has been merged in GCC-14 but it needs to be added into GCC-13 as
well.
Missing boolean_expression TARGET_ZMMUL in riscv_rtx_costs() cause different
instructions when
multiplying an integer with a constant. (
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1482 )
int foo
在 2024/8/6 12:34, Jeff Law 写道:
On 8/5/24 10:23 AM, Patrick O'Neill wrote:
On 8/5/24 01:23, Liao Shihua wrote:
PR 116150: Zvk* and Zvb* extensions requires v or zve*
extension, but on gcc v is implied.
gcc/ChangeLog:
* common/config/riscv/riscv-common.cc: Remove
PR 116150: Zvk* and Zvb* extensions requires v or zve* extension, but
on gcc v is implied.
gcc/ChangeLog:
* common/config/riscv/riscv-common.cc: Removed the zvk extension's
implicit expansion of v extension.
* config/riscv/arch-canonicalize: Ditto.
* config/ris
Update v1->v2
Add testcase for this patch.
Missing boolean_expression TARGET_ZMMUL in riscv_rtx_costs() cause different
instructions when
multiplying an integer with a constant. (
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1482 )
int foo(int *ib) {
*ib = *ib * 33938;
Missing boolean_expression TARGET_ZMMUL in riscv_rtx_costs() casuse different
instructions when multiplying an integer with a constant.
( https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1482 )
int foo(int *ib) {
*ib = *ib * 33938;
return 0;
}
rv64im:
lw a4,0(a1)
This patch adds C intrinsics for Bitmanip Extension.
RISCV_BUILTIN_NO_PREFIX is a new riscv_builtin_description like RISCV_BUILTIN.
But it uses CODE_FOR_##INSN rather than CODE_FOR_riscv_##INSN.
Changed orcb, clmul, brev8 pattern's mode form X to GPR because orcbsi,
clmul_si,
brev8_si are both in
This patch adds C intrinsics for Scalar Crypto Extension.
gcc/ChangeLog:
* config.gcc: Include riscv_crypto.h.
* config/riscv/riscv_crypto.h: New file.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/scalar_crypto_intrinsic-32.c: New test.
* gcc.target/riscv/scalar_c
The serials patch provides a mapping from the RV intrinsics to the builtin
names.
There are some duplicates testsuites between intrinsic and built-in function.
Remove the Scalar Bitmanip and Scalar Crypto Built-In function testsuites
that will be included in the intrinsic functions.
gcc/testsuite
in and intrinsic.
4. Typo fix.
Update v1 -> v2:
1. Rename *_intrinsic-* to *_intrinsic-XLEN.
2. Typo fix.
3. Intrinsics with immediate arguments will use marcos at O0 .
It's a little patch add just provides a mapping from the RV intrinsics to the
builtin
names within GCC.
This patch adds C intrinsics for Bitmanip Extension.
RISCV_BUILTIN_NO_PREFIX is a new riscv_builtin_description like RISCV_BUILTIN.
But it uses CODE_FOR_##INSN rather than CODE_FOR_riscv_##INSN.
Changed orcb, clmul, brev8 pattern's mode form X to GPR because orcbsi,
clmul_si,
brev8_si are both in
This patch adds C intrinsics for Scalar Crypto Extension.
gcc/ChangeLog:
* config.gcc: Include riscv_crypto.h.
* config/riscv/riscv_crypto.h: New file.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/scalar_crypto_intrinsic-32.c: New test.
* gcc.target/riscv/scalar_c
s with immediate arguments will use marcos at O0 .
It's a little patch add just provides a mapping from the RV intrinsics to the
builtin
names within GCC.
Liao Shihua (3):
RISC-V: Remove the Scalar Bitmanip and Crypto Built-In function
testsuites
RISC-V: Add C intrinsic for Scalar Crypt
The serials patch provides a mapping from the RV intrinsics to the builtin
names.
There are some duplicates testsuites between intrinsic and built-in function.
Remove the Scalar Bitmanip and Scalar Crypto Built-In function testsuites
that will be included in the intrinsic functions.
gcc/testsuit
e:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622233.html
No problem.
And I would tend to remove the D03 constraint if we used const_0_3_operand.
BR
Liao Shihua
In Scalar Crypto Built-In functions, some require immediate parameters,
But register_operand are incorrectly used in the pattern.
E.g.:
__builtin_riscv_aes64ks1i(rs1,1)
Before:
li a5,1
aes64ks1i a0,a0,a5
Assembler messages:
Error: instruction aes64ks1i requires
This patch adds C intrinsics for Bitmanip Extension.
RISCV_BUILTIN_NO_PREFIX is a new riscv_builtin_description like RISCV_BUILTIN.
But it uses CODE_FOR_##INSN rather than CODE_FOR_riscv_##INSN.
gcc/ChangeLog:
* config.gcc: Add riscv_bitmanip.h
* config/riscv/riscv-builtins.cc (AV
This patch adds C intrinsics for Scalar Crypto Extension.
gcc/ChangeLog:
* config.gcc: Add riscv_crypto.h.
* config/riscv/riscv_crypto.h: New file.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/scalar_crypto_intrinsic-32.c: New test.
* gcc.target/riscv/scalar_crypt
m the RV intrinsics to the
builtin
names within GCC.
Liao Shihua (2):
Add C intrinsics of Scalar Crypto Extension
Add C intrinsics of Bitmanip Extension
gcc/config.gcc| 2 +-
gcc/config/riscv/riscv-builtins.cc| 22 ++
gcc/config/riscv/riscv-ft
This patch adds C intrinsics for Bitmanip Extension.
RISCV_BUILTIN_NO_PREFIX is a new riscv_builtin_description like RISCV_BUILTIN.
But it uses CODE_FOR_##INSN rather than CODE_FOR_riscv_##INSN.
Some of the instructions are different to spec, see
https://github.com/riscv-non-isa/riscv-c-api-doc/
This patch adds C intrinsics for Scalar Crypto Extension.
gcc/ChangeLog:
* config.gcc: Add riscv_crypto.h.
* config/riscv/riscv_crypto.h: New file.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/scalar_crypto_intrinsic-1.c: New test.
* gcc.target/riscv/scalar_cryp
It's a little patch add just provides a mapping from the RV intrinsics to the
builtin
names within GCC.
Liao Shihua (2):
Add C intrinsics of Scalar Crypto Extension
Add C intrinsics of Bitmanip Extension
gcc/config.gcc| 2 +-
gcc/config/riscv/
在 2023/11/29 23:03, Christoph Müllner 写道:
On Mon, Nov 27, 2023 at 9:36 AM Liao Shihua wrote:
This patch add C intrinsics for scalar crypto extension.
Because of riscv-c-api
(https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44/files) includes
zbkb/zbkc/zbkx's
intrinsics i
This patch add C intrinsics for scalar crypto extension.
Because of riscv-c-api
(https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44/files) includes
zbkb/zbkc/zbkx's
intrinsics in bit manipulation extension, this patch only support zkn*/zks*'s
intrinsics.
gcc/ChangeLog:
* config.g
x86_64/i686/AArch64 has for a few months working std::bfloat16_t
support, __bf16 there is no longer a storage only type, but can
be used for arithmetics and is supported in libgcc and libstdc++.
The patch adds similar support for RISC-V. __bf16 has been merged
in psABI. The c
upport bfloat16_t in RISC-V port, but
Zfbf extension's patch will be sent after it released.
Liao Shihua
在 2023/6/1 14:51, Jin Ma 写道:
hi,
Are there any new developments about Zfb? Are there any plans to implement
the Zvfbfmin and Zvfbfwma expansion? I see that Zfb is being reviewed in
llvm, mayb
ble?
Oh, I was negligent and will make improvements in the next patch.
Best Regards
Liao Shihua
This patch support ilp32 on rv64.
It remove option check when -march=rv64* -mabi=ilp32. And replace XLEN_SPEC in
LINK_SPEC by ABI_LEN_SPEC. In addition, it some machine descriptions.
The series kernel support in this link.
https://lore.kernel.org/linux-riscv/20230518131013.3366406-1-guo...@kern
According to https://github.com/riscv/riscv-bfloat16 , zfbfmin extension
depends on zfh/zfhmin extension.
According to the discussion
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/367, this use __bf16
and use DF16b in riscv_mangle_type like x86.
gcc\ChangeLog:
* com
This patch supports Zknh extension.
It includes instruction's machine description and built-in funtions.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sha256sig0_): Add ZKNH's
instructions.
(riscv_sha256sig1_):
(riscv_sha256sum0_):
(riscv_sha256sum1_):
This patch supports Zkbk, Zbkc and Zkbx extension.
It includes instruction's machine description and built-in funtions.
It is worth mentioning that this patch only adds instructions in Zbkb but no
longer in Zbb.
If any instructions both in Zbb and Zbkb, they will be generated by code
generator
This patch supports Zkne and Zknd extension.
It includes instruction's machine description and built-in funtions.
gcc/ChangeLog:
* config/riscv/constraints.md (D03): Add constants of bs and rnum.
(DsA):
* config/riscv/crypto.md (riscv_aes32dsi): Add ZKND's and ZKNE's
in
This patch adds prototypes for RISC-V Crypto built-in functions.
gcc/ChangeLog:
* config/riscv/riscv-builtins.cc (RISCV_FTYPE_NAME2):
(RISCV_FTYPE_NAME3):
(RISCV_ATYPE_QI):
(RISCV_ATYPE_HI):
(RISCV_FTYPE_ATYPES2):
(RISCV_FTYPE_ATYPES3):
* co
/v1.0.0-scalar
It works by Wu Siyu and Liao Shihua .
Liao Shihua (5):
Add prototypes for RISC-V Crypto built-in functions
Implement ZBKB, ZBKC and ZBKX extensions
Implement ZKND and ZKNE extensions
Implement ZKNH extension
Implement ZKSH and ZKSED extensions
gcc/config/riscv/bitmanip.md
This patch supports Zksh and Zksed extension.
It includes instruction's machine description and built-in funtions.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sm3p0_): Add ZKSED's and ZKSH's
instructions.
(riscv_sm3p1_):
(riscv_sm4ed_):
(riscv_sm4ks_):
This patch support Zkbk, Zbkc and Zkbx extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
It is worth mentioning that this patch only adds instructions in Zbkb but no
longer in Zbb.
If any instructions both in Zbb and Zbkb, they will be generated by code
This patch support Zknh extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sha256sig0_):Add ZKNH's
instructions.
(riscv_sha256sig1_): Likewise.
(riscv_sha256sum0_): Likewise.
This patch support Zkne and Zknd extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/constraints.md (D03): New constraints of bs.
(DsA):New constraints of rnum.
* config/riscv/crypto.md (riscv_aes32ds
can be found here:
https://github.com/riscv/riscv-crypto/releases/tag/v1.0.0-scalar
https://github.com/riscv-non-isa/riscv-c-api-doc/pull/31
It works by Wu Siyu and Liao Shihua .
Liao Shihua (5):
Add prototypes for RISC-V Crypto built-in functions
Implement ZBKB, ZBKC and ZBKX extensions
This patch support Zksh and Zksed extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sm3p0_): Add ZKSH's and ZKSED's
instructions.
(riscv_sm3p1_): Likewise.
(riscv_sm4ed_): Likewise
gcc/ChangeLog:
* config/riscv/riscv-builtins.cc (RISCV_FTYPE_NAME2): New enumeration
identifier.
(RISCV_FTYPE_NAME3): Likewise.
(RISCV_ATYPE_QI): New Argument types.
(RISCV_ATYPE_HI): Likewise.
(RISCV_FTYPE_ATYPES2): New RISCV_ATYPE.
(RISCV_FTYPE_AT
This patch support Zkbk, Zbkc and Zkbx extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
It is worth mentioning that this patch only adds instructions in Zbkb but no
longer in Zbb.
If any instructions both in Zbb and Zbkb, they will be generated by code
This patch support Zknh extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sha256sig0_):Add ZKNH's
instructions.
(riscv_sha256sig1_): Likewise.
(riscv_sha256sum0_): Likewise.
can be found here:
https://github.com/riscv/riscv-crypto/releases/tag/v1.0.0-scalar
https://github.com/riscv-non-isa/riscv-c-api-doc/pull/31
It works by Wu Siyu and Liao Shihua .
Liao Shihua (5):
Add prototypes for RISC-V Crypto built-in functions
Implement ZBKB, ZBKC and ZBKX extensions
This patch support Zksh and Zksed extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sm3p0_): Add ZKSH's and ZKSED's
instructions.
(riscv_sm3p1_): Likewise.
(riscv_sm4ed_): Likewise
This patch support Zkne and Zknd extension.
It includes instruction's machine description, built-in funtion, and
intrinsics.
gcc/ChangeLog:
* config/riscv/constraints.md (D03): New constraints of bs.
(DsA):New constraints of rnum.
* config/riscv/crypto.md (riscv_aes32ds
Co-Authored-By: SiYu Wu
---
gcc/config/riscv/riscv-builtins.cc | 8
gcc/config/riscv/riscv-ftypes.def | 10 ++
2 files changed, 18 insertions(+)
diff --git a/gcc/config/riscv/riscv-builtins.cc
b/gcc/config/riscv/riscv-builtins.cc
index 25ca407f9a9..ded91e17554 100644
--- a/gcc
Implement ZBKB, ZBKC and ZBKX extensions.
ZBKB is Bitmanip instructions for Cryptography.
ZBKC is Carry-less multiply instructions.
ZBKX is Crossbar permutation instructions.
Only add Machine description and intrinsics of these instructions which are
not defined in the first Bitman
Implement ZKND and ZKNE extensions.
ZKND is NIST Suite: AES Decryption.
ZKNE is NIST Suite: AES Encryption.
gcc/ChangeLog:
* config/riscv/constraints.md (D03): New constraints of bs.
(DsA):New constraints of rnum.
* config/riscv/crypto.md (riscv_aes
Implement ZKSH and ZKSED extensions.
ZKSH is ShangMi Suite: SM3 Hash Function Instructions.
ZKSED is ShangMi Suite: SM4 Block Cipher Instructions.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sm3p0_): Add ZKSH's and ZKSED's
instructions.
(riscv_sm3p1_): Like
Add prototypes for RISC-V Crypto built-in functions .
gcc/ChangeLog:
* config/riscv/riscv-builtins.cc (RISCV_FTYPE_NAME2): New enumeration
identifier.
(RISCV_FTYPE_NAME3): Likewise.
(RISCV_ATYPE_QI): New Argument types.
(RISCV_ATYPE_HI): Likewise.
(RIS
Implement ZKNH extensions.
ZKNH is NIST Suite: Hash Function Instructions.
gcc/ChangeLog:
* config/riscv/crypto.md (riscv_sha256sig0_):Add ZKNH's
instructions.
(riscv_sha256sig1_): Likewise.
(riscv_sha256sum0_): Likewise.
(riscv_sha256sum1_): Likewise.
This patch implement RISC-V Scalar Cryptography extension.
It includes machine descrption , intrinsic and testcase .
Liao Shihua (5):
Add prototypes for RISC-V Crypto built-in functions
Implement ZBKB, ZBKC and ZBKX extensions
Implement ZKND and ZKNE extensions
Implement ZKNH
This patch implement RISC-V Scalar Cryptography extension.
It includes machine descrption , intrinsic and testcase .
Liao Shihua (5):
Add prototypes for RISC-V Crypto built-in functions
Implement ZBKB, ZBKC and ZBKX extensions
Implement ZKND and ZKNE extensions
Implement ZKNH
could easier test that?
On Wed, Dec 28, 2022 at 2:25 AM Palmer Dabbelt wrote:
On Tue, 27 Dec 2022 10:24:10 PST (-0800), gcc-patches@gcc.gnu.org wrote:
On 12/12/22 23:49, shi...@iscas.ac.cn wrote:
From: Liao Shihua
This patch support rv64 insn in ilp32 ABI. It was inspired by aarch64
54 matches
Mail list logo