public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc.
@ 2022-10-10 13:49 juzhe.zhong
  2022-10-10 14:00 ` 钟居哲
  0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2022-10-10 13:49 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, Ju-Zhe Zhong

From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

gcc/ChangeLog:

        * config/riscv/riscv-vector-builtins.cc (struct vector_type_info): Move from riscv-vector-builtins.h.
        * config/riscv/riscv-vector-builtins.h (struct vector_type_info): Move to riscv-vector-builtins.cc.

---
 gcc/config/riscv/riscv-vector-builtins.cc | 16 ++++++++++++++++
 gcc/config/riscv/riscv-vector-builtins.h  | 16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
index 0096e32f5e4..d7b567a7ba1 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -50,6 +50,22 @@ using namespace riscv_vector;
 
 namespace riscv_vector {
 
+/* Static information about each vector type.  */
+struct vector_type_info
+{
+  /* The name of the type as declared by riscv_vector.h
+     which is recommend to use. For example: 'vint32m1_t'.  */
+  const char *name;
+
+  /* ABI name of vector type. The type is always available
+     under this name, even when riscv_vector.h isn't included.
+     For example:  '__rvv_int32m1_t'.  */
+  const char *abi_name;
+
+  /* The C++ mangling of ABI_NAME.  */
+  const char *mangled_name;
+};
+
 /* Information about each RVV type.  */
 static CONSTEXPR const vector_type_info vector_types[] = {
 #define DEF_RVV_TYPE(USER_NAME, NCHARS, ABI_NAME, ARGS...)    \
diff --git a/gcc/config/riscv/riscv-vector-builtins.h b/gcc/config/riscv/riscv-vector-builtins.h
index 6ca0b073964..524fb0b02c2 100644
--- a/gcc/config/riscv/riscv-vector-builtins.h
+++ b/gcc/config/riscv/riscv-vector-builtins.h
@@ -26,22 +26,6 @@ namespace riscv_vector {
 /* This is for segment instructions.  */
 const unsigned int MAX_TUPLE_SIZE = 8;
 
-/* Static information about each vector type.  */
-struct vector_type_info
-{
-  /* The name of the type as declared by riscv_vector.h
-     which is recommend to use. For example: 'vint32m1_t'.  */
-  const char *user_name;
-
-  /* ABI name of vector type. The type is always available
-     under this name, even when riscv_vector.h isn't included.
-     For example:  '__rvv_int32m1_t'.  */
-  const char *abi_name;
-
-  /* The C++ mangling of ABI_NAME.  */
-  const char *mangled_name;
-};
-
 /* Enumerates the RVV types, together called
    "vector types" for brevity.  */
 enum vector_type_index
-- 
2.36.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc.
  2022-10-10 13:49 [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc juzhe.zhong
@ 2022-10-10 14:00 ` 钟居哲
  0 siblings, 0 replies; 2+ messages in thread
From: 钟居哲 @ 2022-10-10 14:00 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng

[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]

Ignore this patch plz. It's not finished.
The correct && full patch is this:
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603148.html 
Thanks.



juzhe.zhong@rivai.ai
 
From: juzhe.zhong
Date: 2022-10-10 21:49
To: gcc-patches
CC: kito.cheng; Ju-Zhe Zhong
Subject: [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc.
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
 
gcc/ChangeLog:
 
        * config/riscv/riscv-vector-builtins.cc (struct vector_type_info): Move from riscv-vector-builtins.h.
        * config/riscv/riscv-vector-builtins.h (struct vector_type_info): Move to riscv-vector-builtins.cc.
 
---
gcc/config/riscv/riscv-vector-builtins.cc | 16 ++++++++++++++++
gcc/config/riscv/riscv-vector-builtins.h  | 16 ----------------
2 files changed, 16 insertions(+), 16 deletions(-)
 
diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
index 0096e32f5e4..d7b567a7ba1 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -50,6 +50,22 @@ using namespace riscv_vector;
namespace riscv_vector {
+/* Static information about each vector type.  */
+struct vector_type_info
+{
+  /* The name of the type as declared by riscv_vector.h
+     which is recommend to use. For example: 'vint32m1_t'.  */
+  const char *name;
+
+  /* ABI name of vector type. The type is always available
+     under this name, even when riscv_vector.h isn't included.
+     For example:  '__rvv_int32m1_t'.  */
+  const char *abi_name;
+
+  /* The C++ mangling of ABI_NAME.  */
+  const char *mangled_name;
+};
+
/* Information about each RVV type.  */
static CONSTEXPR const vector_type_info vector_types[] = {
#define DEF_RVV_TYPE(USER_NAME, NCHARS, ABI_NAME, ARGS...)    \
diff --git a/gcc/config/riscv/riscv-vector-builtins.h b/gcc/config/riscv/riscv-vector-builtins.h
index 6ca0b073964..524fb0b02c2 100644
--- a/gcc/config/riscv/riscv-vector-builtins.h
+++ b/gcc/config/riscv/riscv-vector-builtins.h
@@ -26,22 +26,6 @@ namespace riscv_vector {
/* This is for segment instructions.  */
const unsigned int MAX_TUPLE_SIZE = 8;
-/* Static information about each vector type.  */
-struct vector_type_info
-{
-  /* The name of the type as declared by riscv_vector.h
-     which is recommend to use. For example: 'vint32m1_t'.  */
-  const char *user_name;
-
-  /* ABI name of vector type. The type is always available
-     under this name, even when riscv_vector.h isn't included.
-     For example:  '__rvv_int32m1_t'.  */
-  const char *abi_name;
-
-  /* The C++ mangling of ABI_NAME.  */
-  const char *mangled_name;
-};
-
/* Enumerates the RVV types, together called
    "vector types" for brevity.  */
enum vector_type_index
-- 
2.36.1
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-10 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 13:49 [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc juzhe.zhong
2022-10-10 14:00 ` 钟居哲

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).