public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6490] RISC-V: Add prototypes for RISC-V Crypto built-in functions
@ 2023-03-05 17:05 Kito Cheng
0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-03-05 17:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:89456334473c6b1ea1713740fb5f5191cd0b2235
commit r13-6490-g89456334473c6b1ea1713740fb5f5191cd0b2235
Author: Liao Shihua <shihua@iscas.ac.cn>
Date: Mon Feb 20 15:01:21 2023 +0800
RISC-V: Add prototypes for RISC-V Crypto built-in functions
This patch adds prototypes for RISC-V Crypto built-in functions.
gcc/ChangeLog:
* config/riscv/riscv-builtins.cc (RISCV_FTYPE_NAME2): New.
(RISCV_FTYPE_NAME3): New.
(RISCV_ATYPE_QI): New.
(RISCV_ATYPE_HI): New.
(RISCV_FTYPE_ATYPES2): New.
(RISCV_FTYPE_ATYPES3): New.
* config/riscv/riscv-ftypes.def (2): New.
(3): New.
Co-Authored-By: SiYu Wu <siyu@isrc.iscas.ac.cn>
Diff:
---
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/config/riscv/riscv-builtins.cc
+++ b/gcc/config/riscv/riscv-builtins.cc
@@ -42,6 +42,8 @@ along with GCC; see the file COPYING3. If not see
/* Macros to create an enumeration identifier for a function prototype. */
#define RISCV_FTYPE_NAME0(A) RISCV_##A##_FTYPE
#define RISCV_FTYPE_NAME1(A, B) RISCV_##A##_FTYPE_##B
+#define RISCV_FTYPE_NAME2(A, B, C) RISCV_##A##_FTYPE_##B##_##C
+#define RISCV_FTYPE_NAME3(A, B, C, D) RISCV_##A##_FTYPE_##B##_##C##_##D
/* Classifies the prototype of a built-in function. */
enum riscv_function_type {
@@ -132,6 +134,8 @@ AVAIL (always, (!0))
/* Argument types. */
#define RISCV_ATYPE_VOID void_type_node
#define RISCV_ATYPE_USI unsigned_intSI_type_node
+#define RISCV_ATYPE_QI intQI_type_node
+#define RISCV_ATYPE_HI intHI_type_node
#define RISCV_ATYPE_SI intSI_type_node
#define RISCV_ATYPE_DI intDI_type_node
#define RISCV_ATYPE_VOID_PTR ptr_type_node
@@ -142,6 +146,10 @@ AVAIL (always, (!0))
RISCV_ATYPE_##A
#define RISCV_FTYPE_ATYPES1(A, B) \
RISCV_ATYPE_##A, RISCV_ATYPE_##B
+#define RISCV_FTYPE_ATYPES2(A, B, C) \
+ RISCV_ATYPE_##A, RISCV_ATYPE_##B, RISCV_ATYPE_##C
+#define RISCV_FTYPE_ATYPES3(A, B, C, D) \
+ RISCV_ATYPE_##A, RISCV_ATYPE_##B, RISCV_ATYPE_##C, RISCV_ATYPE_##D
static const struct riscv_builtin_description riscv_builtins[] = {
#include "riscv-cmo.def"
diff --git a/gcc/config/riscv/riscv-ftypes.def b/gcc/config/riscv/riscv-ftypes.def
index 3a40c33e7c2..3b518195a29 100644
--- a/gcc/config/riscv/riscv-ftypes.def
+++ b/gcc/config/riscv/riscv-ftypes.def
@@ -32,3 +32,13 @@ DEF_RISCV_FTYPE (1, (VOID, USI))
DEF_RISCV_FTYPE (1, (VOID, VOID_PTR))
DEF_RISCV_FTYPE (1, (SI, SI))
DEF_RISCV_FTYPE (1, (DI, DI))
+DEF_RISCV_FTYPE (2, (SI, QI, QI))
+DEF_RISCV_FTYPE (2, (SI, HI, HI))
+DEF_RISCV_FTYPE (2, (SI, SI, SI))
+DEF_RISCV_FTYPE (2, (DI, QI, QI))
+DEF_RISCV_FTYPE (2, (DI, HI, HI))
+DEF_RISCV_FTYPE (2, (DI, SI, SI))
+DEF_RISCV_FTYPE (2, (DI, DI, SI))
+DEF_RISCV_FTYPE (2, (DI, DI, DI))
+DEF_RISCV_FTYPE (3, (SI, SI, SI, SI))
+DEF_RISCV_FTYPE (3, (DI, DI, DI, SI))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-05 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-05 17:05 [gcc r13-6490] RISC-V: Add prototypes for RISC-V Crypto built-in functions Kito Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).