From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id EA8C4385416F for ; Mon, 10 Oct 2022 13:49:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA8C4385416F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp82t1665409771tnfcefwq Received: from rios-cad5.localdomain ( [42.247.22.65]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Oct 2022 21:49:29 +0800 (CST) X-QQ-SSF: 01400000000000D0J000000A0000000 X-QQ-FEAT: 27H4dUct9tiWlFfApkbe/+I2nX7mh2rRLx9pK4J0a/K/uPu157JaHWxtDmZPT R7vu7yg5WAlqCGqdo5fEhwirvosOoAU8T/T+ZaQkLkXqo/g1jkTF1dWKA/6AWnqQgk+Fag+ kK2zwwM8nGp3BcD40FIq3SiIlNrnARO9o1XhNapaproLxypBbe8m6cQXozRyb0U21yMzLs/ uWrQjU1b9KqBYULTfUWT2QdkylRViPN6+exIk+sWORA8RcbgOHkSvet/Z5C06bqn68C//KX 5wVmTMSathxH32tYo8jSnxMzkV+EOM/rhtOOK0oRiehy4zoC1P/E9VU0XZmH5U0PEeox1ON 8bfjZgDy4RHrFhQkxVhNBzGyRb+H444RCitK0TGAju3wWGTa+VNa6qadxZU5N9GEb8uDDBV HcA7vuPTfHw= X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Ju-Zhe Zhong Subject: [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc. Date: Mon, 10 Oct 2022 21:49:28 +0800 Message-Id: <20221010134928.171673-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Ju-Zhe Zhong 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