From c72726045dac6fa2add7bbba7c331316534d4f91 Mon Sep 17 00:00:00 2001 From: Paolo Savini Date: Mon, 6 Nov 2023 23:14:41 +0000 Subject: [PATCH] [RISCV] Update the CORE-V C API headers to follow the RISC-V conventions. This patch changes the C API headers that were added for the CORE-V ISA extensions so that they follow the standard described for RISC-V here: https://github.com/riscv-non-isa/riscv-c-api-doc/blob/master/riscv-c-api.md#intrinsic-functions The C API headers must provide a uniform interface for instrinsic functions that is compatible with any compiler that supports them. In the wrapper of a C API intrinsic function definition any compiler can implement the functionality differently, whether it is with an existing instrinsic function, or with inline assembly etc... The user code that adds a C API RISC-V header is agnostic to the implementation and is then compatible with any compiler that has the header. The RISC-V intrinsic functions have - the common prefix '__riscv_' to avoid name collision with other targets. - a vendor specific prefix if they belong to a vendor specific extension. - the name of the function. - the type of the function: this is typically used to distinguish different versions of the same intrinsic function that differ only for the type of one or more operands. Another convention is to use the type 'long' instead of integer types like int32_t or uint32_t as the type 'long' will be set to the current XLEN. According to these conventions the CORE-V intrinsic functions are now redefined like: long __riscv_cv_name_type(long op1, long op2) { return __builtin_riscv_cv_name_type(op1, op2); } --- clang/lib/Headers/riscv_corev_alu.h | 106 +++- clang/lib/Headers/riscv_corev_bitmanip.h | 60 +- clang/lib/Headers/riscv_corev_elw.h | 8 +- clang/lib/Headers/riscv_corev_mac.h | 109 +++- clang/lib/Headers/riscv_corev_simd.h | 740 ++++++++++++++++++----- 5 files changed, 828 insertions(+), 195 deletions(-) diff --git a/clang/lib/Headers/riscv_corev_alu.h b/clang/lib/Headers/riscv_corev_alu.h index a9fe11008162..14f0a6202352 100644 --- a/clang/lib/Headers/riscv_corev_alu.h +++ b/clang/lib/Headers/riscv_corev_alu.h @@ -17,27 +17,91 @@ extern "C" { #endif #if defined(__riscv_xcvalu) -int __builtin_abs (int j); -int __builtin_riscv_cv_alu_slet (int32_t i, int32_t j); -int __builtin_riscv_cv_alu_sletu (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_alu_min (int32_t i, int32_t j); -uint32_t __builtin_riscv_cv_alu_minu (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_alu_max (int32_t i, int32_t j); -uint32_t __builtin_riscv_cv_alu_maxu (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_alu_exths (int16_t i); -uint32_t __builtin_riscv_cv_alu_exthz (uint16_t i); -int32_t __builtin_riscv_cv_alu_extbs (int8_t i); -uint32_t __builtin_riscv_cv_alu_extbz (uint8_t); -int32_t __builtin_riscv_cv_alu_clip (int32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_alu_clipu (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_alu_addN (int32_t x, int32_t y, uint8_t shft); -uint32_t __builtin_riscv_cv_alu_adduN (uint32_t x, uint32_t y, uint8_t shft); -int32_t __builtin_riscv_cv_alu_addRN (int32_t x, int32_t y, uint8_t shft); -uint32_t __builtin_riscv_cv_alu_adduRN (uint32_t x, uint32_t y, uint8_t shft); -int32_t __builtin_riscv_cv_alu_subN (int32_t x, int32_t y, uint8_t shft); -uint32_t __builtin_riscv_cv_alu_subuN (uint32_t x, uint32_t y, uint8_t shft); -int32_t __builtin_riscv_cv_alu_subRN (int32_t x, int32_t y, uint8_t shft); -uint32_t __builtin_riscv_cv_alu_subuRN (uint32_t x, uint32_t y, uint8_t shft); + +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) + +long __riscv_cv_abs(long a) { return __builtin_abs(a); } + +long __riscv_cv_alu_slet(long a, long b) { + return __builtin_riscv_cv_alu_slet(a, b); +} + +long __riscv_cv_alu_sletu(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_alu_sletu(a, b); +} + +long __riscv_cv_alu_min(long a, long b) { + return __builtin_riscv_cv_alu_min(a, b); +} + +unsigned long __riscv_cv_alu_minu(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_alu_minu(a, b); +} + +long __riscv_cv_alu_max(long a, long b) { + return __builtin_riscv_cv_alu_max(a, b); +} + +unsigned long __riscv_cv_alu_maxu(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_alu_maxu(a, b); +} + +long __riscv_cv_alu_exths(int16_t a) { return __builtin_riscv_cv_alu_exths(a); } + +unsigned long __riscv_cv_alu_exthz(uint16_t a) { + return __builtin_riscv_cv_alu_exthz(a); +} + +long __riscv_cv_alu_extbs(int8_t a) { return __builtin_riscv_cv_alu_extbs(a); } + +unsigned long __riscv_cv_alu_extbz(uint8_t a) { + return __builtin_riscv_cv_alu_extbz(a); +} + +long __riscv_cv_alu_clip(long a, unsigned long b) { + return __builtin_riscv_cv_alu_clip(a, b); +} + +unsigned long __riscv_cv_alu_clipu(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_alu_clipu(a, b); +} + +long __riscv_cv_alu_addN(long a, long b, uint8_t shft) { + return __builtin_riscv_cv_alu_addN(a, b, shft); +} + +unsigned long __riscv_cv_alu_adduN(unsigned long a, unsigned long b, + uint8_t shft) { + return __builtin_riscv_cv_alu_adduN(a, b, shft); +} + +long __riscv_cv_alu_addRN(long a, long b, uint8_t shft) { + return __builtin_riscv_cv_alu_addRN(a, b, shft); +} + +unsigned long __riscv_cv_alu_adduRN(unsigned long a, unsigned long b, + uint8_t shft) { + return __builtin_riscv_cv_alu_adduRN(a, b, shft); +} + +long __riscv_cv_alu_subN(long a, long b, uint8_t shft) { + return __builtin_riscv_cv_alu_subN(a, b, shft); +} + +unsigned long __riscv_cv_alu_subuN(unsigned long a, unsigned long b, + uint8_t shft) { + return __builtin_riscv_cv_alu_subuN(a, b, shft); +} + +long __riscv_cv_alu_subRN(long a, long b, uint8_t shft) { + return __builtin_riscv_cv_alu_subRN(a, b, shft); +} + +unsigned long __riscv_cv_alu_subuRN(unsigned long a, unsigned long b, + uint8_t shft) { + return __builtin_riscv_cv_alu_subuRN(a, b, shft); +} + #endif // defined(__riscv_xcvalu) #if defined(__cplusplus) diff --git a/clang/lib/Headers/riscv_corev_bitmanip.h b/clang/lib/Headers/riscv_corev_bitmanip.h index f2ac96f7d124..8e0d50638822 100644 --- a/clang/lib/Headers/riscv_corev_bitmanip.h +++ b/clang/lib/Headers/riscv_corev_bitmanip.h @@ -17,17 +17,55 @@ extern "C" { #endif #if defined(__riscv_xcvbitmanip) -int32_t __builtin_riscv_cv_bitmanip_extract (int32_t i, uint16_t range); -uint32_t __builtin_riscv_cv_bitmanip_extractu (uint32_t i, uint16_t range); -uint32_t __builtin_riscv_cv_bitmanip_insert (uint32_t i, uint16_t range, uint32_t k); -uint32_t __builtin_riscv_cv_bitmanip_bclr (uint32_t i, uint16_t range); -uint32_t __builtin_riscv_cv_bitmanip_bset (uint32_t i, uint16_t range); -uint8_t __builtin_riscv_cv_bitmanip_ff1 (uint32_t i); -uint8_t __builtin_riscv_cv_bitmanip_fl1 (uint32_t i); -uint8_t __builtin_riscv_cv_bitmanip_clb (uint32_t i); -uint8_t __builtin_riscv_cv_bitmanip_cnt (uint32_t i); -uint32_t __builtin_riscv_cv_bitmanip_ror (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_bitmanip_bitrev (uint32_t i, uint8_t pts, uint8_t radix); + +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) + +long __riscv_cv_bitmanip_extract(long a, uint16_t range) { + return __builtin_riscv_cv_bitmanip_extract(a, range); +} + +unsigned long __riscv_cv_bitmanip_extractu(unsigned long a, uint16_t range) { + return __builtin_riscv_cv_bitmanip_extractu(a, range); +} + +unsigned long __riscv_cv_bitmanip_insert(unsigned long a, uint16_t range, + unsigned long k) { + return __builtin_riscv_cv_bitmanip_insert(a, range, k); +} + +unsigned long __riscv_cv_bitmanip_bclr(unsigned long a, uint16_t range) { + return __builtin_riscv_cv_bitmanip_bclr(a, range); +} + +unsigned long __riscv_cv_bitmanip_bset(unsigned long a, uint16_t range) { + return __builtin_riscv_cv_bitmanip_bset(a, range); +} + +uint8_t __riscv_cv_bitmanip_ff1(unsigned long a) { + return __builtin_riscv_cv_bitmanip_ff1(a); +} + +uint8_t __riscv_cv_bitmanip_fl1(unsigned long a) { + return __builtin_riscv_cv_bitmanip_fl1(a); +} + +uint8_t __riscv_cv_bitmanip_clb(unsigned long a) { + return __builtin_riscv_cv_bitmanip_clb(a); +} + +uint8_t __riscv_cv_bitmanip_cnt(unsigned long a) { + return __builtin_riscv_cv_bitmanip_cnt(a); +} + +unsigned long __riscv_cv_bitmanip_ror(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_bitmanip_ror(a, b); +} + +unsigned long __riscv_cv_bitmanip_bitrev(unsigned long a, uint8_t pts, + uint8_t radix) { + return __builtin_riscv_cv_bitmanip_bitrev(a, pts, radix); +} + #endif // defined(__riscv_xcvbitmanip) #if defined(__cplusplus) diff --git a/clang/lib/Headers/riscv_corev_elw.h b/clang/lib/Headers/riscv_corev_elw.h index f72d9070b9a4..62610cac2e27 100644 --- a/clang/lib/Headers/riscv_corev_elw.h +++ b/clang/lib/Headers/riscv_corev_elw.h @@ -17,7 +17,13 @@ extern "C" { #endif #if defined(__riscv_xcvelw) -uint32_t __builtin_riscv_cv_elw_elw (void *loc); + +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) + +unsigned long __riscv_cv_elw_elw(void *loc) { + return __builtin_riscv_cv_elw_elw(loc); +} + #endif // defined(__riscv_xcvelw) #if defined(__cplusplus) diff --git a/clang/lib/Headers/riscv_corev_mac.h b/clang/lib/Headers/riscv_corev_mac.h index 703a3c5167ec..c4772726cd56 100644 --- a/clang/lib/Headers/riscv_corev_mac.h +++ b/clang/lib/Headers/riscv_corev_mac.h @@ -17,24 +17,97 @@ extern "C" { #endif #if defined(__riscv_xcvmac) -int32_t __builtin_riscv_cv_mac_mac (int32_t x, int32_t y, int32_t z); -int32_t __builtin_riscv_cv_mac_msu (int32_t x, int32_t y, int32_t z); -uint32_t __builtin_riscv_cv_mac_muluN (uint32_t x, uint32_t y, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_mulhhuN (uint32_t x, uint32_t y, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_mulsN (uint32_t x, uint32_t y, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_mulhhsN (uint32_t x, uint32_t y, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_muluRN (uint32_t x, uint32_t y, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_mulhhuRN (uint32_t x, uint32_t y, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_mulsRN (uint32_t x, uint32_t y, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_mulhhsRN (uint32_t x, uint32_t y, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_macuN (uint32_t x, uint32_t y, uint32_t z, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_machhuN (uint32_t x, uint32_t y, uint32_t z, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_macsN (uint32_t x, uint32_t y, int32_t z, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_machhsN (uint32_t x, uint32_t y, int32_t z, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_macuRN (uint32_t x, uint32_t y, uint32_t z, const uint8_t shft); -uint32_t __builtin_riscv_cv_mac_machhuRN (uint32_t x, uint32_t y, uint32_t z, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_macsRN (uint32_t x, uint32_t y, int32_t z, const uint8_t shft); -int32_t __builtin_riscv_cv_mac_machhsRN (uint32_t x, uint32_t y, int32_t z, const uint8_t shft); + +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) + +long __riscv_cv_mac_mac(long a, long b, long c) { + return __builtin_riscv_cv_mac_mac(a, b, c); +} + +long __riscv_cv_mac_msu(long a, long b, long c) { + return __builtin_riscv_cv_mac_msu(a, b, c); +} + +unsigned long __riscv_cv_mac_muluN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_muluN(a, b, shft); +} + +unsigned long __riscv_cv_mac_mulhhuN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulhhuN(a, b, shft); +} + +long __riscv_cv_mac_mulsN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulsN(a, b, shft); +} + +long __riscv_cv_mac_mulhhsN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulhhsN(a, b, shft); +} + +unsigned long __riscv_cv_mac_muluRN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_muluRN(a, b, shft); +} + +unsigned long __riscv_cv_mac_mulhhuRN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulhhuRN(a, b, shft); +} + +long __riscv_cv_mac_mulsRN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulsRN(a, b, shft); +} + +long __riscv_cv_mac_mulhhsRN(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_mac_mulhhsRN(a, b, shft); +} + +unsigned long __riscv_cv_mac_macuN(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_mac_macuN(a, b, c, shft); +} + +unsigned long __riscv_cv_mac_machhuN(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_mac_machhuN(a, b, c, shft); +} + +long __riscv_cv_mac_macsN(unsigned long a, unsigned long b, long c, + const uint8_t shft) { + return __builtin_riscv_cv_mac_macsN(a, b, c, shft); +} + +long __riscv_cv_mac_machhsN(unsigned long a, unsigned long b, long c, + const uint8_t shft) { + return __builtin_riscv_cv_mac_machhsN(a, b, c, shft); +} + +unsigned long __riscv_cv_mac_macuRN(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_mac_macuRN(a, b, c, shft); +} + +unsigned long __riscv_cv_mac_machhuRN(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_mac_machhuRN(a, b, c, shft); +} + +long __riscv_cv_mac_macsRN(unsigned long a, unsigned long b, long c, + const uint8_t shft) { + return __builtin_riscv_cv_mac_macsRN(a, b, c, shft); +} + +long __riscv_cv_mac_machhsRN(unsigned long a, unsigned long b, long c, + const uint8_t shft) { + return __builtin_riscv_cv_mac_machhsRN(a, b, c, shft); +} + #endif // defined(__riscv_xcvmac) #if defined(__cplusplus) diff --git a/clang/lib/Headers/riscv_corev_simd.h b/clang/lib/Headers/riscv_corev_simd.h index 09e6d317d394..53aa5efab174 100644 --- a/clang/lib/Headers/riscv_corev_simd.h +++ b/clang/lib/Headers/riscv_corev_simd.h @@ -17,150 +17,602 @@ extern "C" { #endif #if defined(__riscv_xcvsimd) -uint32_t __builtin_riscv_cv_simd_add_h (uint32_t i, uint32_t j, const uint8_t shft); -uint32_t __builtin_riscv_cv_simd_add_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_add_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_add_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_sub_h (uint32_t i, uint32_t j, const uint8_t shft); -uint32_t __builtin_riscv_cv_simd_sub_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_sub_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_sub_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_avg_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_avg_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_avg_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_avg_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_avgu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_avgu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_avgu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_avgu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_min_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_min_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_min_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_min_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_minu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_minu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_minu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_minu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_max_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_max_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_max_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_max_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_maxu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_maxu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_maxu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_maxu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_srl_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_srl_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_srl_sc_h (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_srl_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_sra_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_sra_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_sra_sc_h (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_sra_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_sll_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_sll_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_sll_sc_h (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_sll_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_or_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_or_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_or_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_or_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_xor_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_xor_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_xor_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_xor_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_and_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_and_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_and_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_and_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_abs_h (uint32_t i); -uint32_t __builtin_riscv_cv_simd_abs_b (uint32_t i); -uint32_t __builtin_riscv_cv_simd_neg_h (uint32_t i); -uint32_t __builtin_riscv_cv_simd_neg_b (uint32_t i); -int32_t __builtin_riscv_cv_simd_extract_h (uint32_t i, const uint8_t sel); -int32_t __builtin_riscv_cv_simd_extract_b (uint32_t i, const uint8_t sel); -uint32_t __builtin_riscv_cv_simd_extractu_h (uint32_t i, const uint8_t sel); -uint32_t __builtin_riscv_cv_simd_extractu_b (uint32_t i, const uint8_t sel); -uint32_t __builtin_riscv_cv_simd_insert_h (uint32_t i, uint32_t j, const uint8_t sel); -uint32_t __builtin_riscv_cv_simd_insert_b (uint32_t i, uint32_t j, const uint8_t sel); -uint32_t __builtin_riscv_cv_simd_dotup_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_dotup_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_dotup_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_dotup_sc_b (uint32_t i, uint8_t j); -int32_t __builtin_riscv_cv_simd_dotusp_h (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_simd_dotusp_b (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_simd_dotusp_sc_h (uint32_t i, int16_t j); -int32_t __builtin_riscv_cv_simd_dotusp_sc_b (uint32_t i, int8_t j); -int32_t __builtin_riscv_cv_simd_dotsp_h (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_simd_dotsp_b (uint32_t i, uint32_t j); -int32_t __builtin_riscv_cv_simd_dotsp_sc_h (uint32_t i, int16_t j); -int32_t __builtin_riscv_cv_simd_dotsp_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_sdotup_h (uint32_t i, uint32_t j, uint32_t k); -uint32_t __builtin_riscv_cv_simd_sdotup_b (uint32_t i, uint32_t j, uint32_t k); -uint32_t __builtin_riscv_cv_simd_sdotup_sc_h (uint32_t i, uint16_t j, uint32_t k); -uint32_t __builtin_riscv_cv_simd_sdotup_sc_b (uint32_t i, uint8_t j, uint32_t k); -int32_t __builtin_riscv_cv_simd_sdotusp_h (uint32_t i, uint32_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotusp_b (uint32_t i, uint32_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotusp_sc_h (uint32_t i, int16_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotusp_sc_b (uint32_t i, int8_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotsp_h (uint32_t i, uint32_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotsp_b (uint32_t i, uint32_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotsp_sc_h (uint32_t i, int16_t j, int32_t k); -int32_t __builtin_riscv_cv_simd_sdotsp_sc_b (uint32_t i, int8_t j, int32_t k); -uint32_t __builtin_riscv_cv_simd_shuffle_h (uint32_t i, uint32_t flgs); -uint32_t __builtin_riscv_cv_simd_shuffle_sci_h (uint32_t i, const uint8_t flgs); -uint32_t __builtin_riscv_cv_simd_shuffle_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_shuffle_sci_b (uint32_t i, const uint8_t flgs); -uint32_t __builtin_riscv_cv_simd_shuffle2_h (uint32_t i, uint32_t flgs, uint32_t k); -uint32_t __builtin_riscv_cv_simd_shuffle2_b (uint32_t i, uint32_t flgs, uint32_t k); -uint32_t __builtin_riscv_cv_simd_packhi_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_packlo_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_packhi_b (uint32_t i, uint32_t j, uint32_t k); -uint32_t __builtin_riscv_cv_simd_packlo_b (uint32_t i, uint32_t j, uint32_t k); -uint32_t __builtin_riscv_cv_simd_cmpeq_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpeq_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpeq_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmpeq_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmpne_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpne_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpne_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmpne_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmpgt_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgt_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgt_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmpgt_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmpge_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpge_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpge_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmpge_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmplt_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmplt_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmplt_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmplt_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmple_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmple_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmple_sc_h (uint32_t i, int16_t j); -uint32_t __builtin_riscv_cv_simd_cmple_sc_b (uint32_t i, int8_t j); -uint32_t __builtin_riscv_cv_simd_cmpgtu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgtu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgtu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_cmpgtu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_cmpgeu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgeu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpgeu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_cmpgeu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_cmpltu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpltu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpltu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_cmpltu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_cmpleu_h (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpleu_b (uint32_t i, uint32_t j); -uint32_t __builtin_riscv_cv_simd_cmpleu_sc_h (uint32_t i, uint16_t j); -uint32_t __builtin_riscv_cv_simd_cmpleu_sc_b (uint32_t i, uint8_t j); -uint32_t __builtin_riscv_cv_simd_cplxmul_r (uint32_t i, uint32_t j, uint32_t k, const uint8_t shft); -uint32_t __builtin_riscv_cv_simd_cplxmul_i (uint32_t i, uint32_t j, uint32_t k, const uint8_t shft); -uint32_t __builtin_riscv_cv_simd_cplxconj (uint32_t i); -uint32_t __builtin_riscv_cv_simd_subrotmj (uint32_t i, uint32_t j, const uint8_t shft); + +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) + +unsigned long __riscv_cv_simd_add_h(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_simd_add_h(a, b, shft); +} + +unsigned long __riscv_cv_simd_add_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_add_b(a, b); +} + +unsigned long __riscv_cv_simd_add_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_add_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_add_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_add_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_sub_h(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_simd_sub_h(a, b, shft); +} + +unsigned long __riscv_cv_simd_sub_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_sub_b(a, b); +} + +unsigned long __riscv_cv_simd_sub_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_sub_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_sub_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_sub_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_avg_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_avg_h(a, b); +} + +unsigned long __riscv_cv_simd_avg_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_avg_b(a, b); +} + +unsigned long __riscv_cv_simd_avg_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_avg_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_avg_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_avg_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_avgu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_avgu_h(a, b); +} + +unsigned long __riscv_cv_simd_avgu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_avgu_b(a, b); +} + +unsigned long __riscv_cv_simd_avgu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_avgu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_avgu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_avgu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_min_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_min_h(a, b); +} + +unsigned long __riscv_cv_simd_min_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_min_b(a, b); +} + +unsigned long __riscv_cv_simd_min_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_min_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_min_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_min_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_minu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_minu_h(a, b); +} + +unsigned long __riscv_cv_simd_minu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_minu_b(a, b); +} + +unsigned long __riscv_cv_simd_minu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_minu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_minu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_minu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_max_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_max_h(a, b); +} + +unsigned long __riscv_cv_simd_max_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_max_b(a, b); +} + +unsigned long __riscv_cv_simd_max_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_max_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_max_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_max_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_maxu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_maxu_h(a, b); +} + +unsigned long __riscv_cv_simd_maxu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_maxu_b(a, b); +} + +unsigned long __riscv_cv_simd_maxu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_maxu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_maxu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_maxu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_srl_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_srl_h(a, b); +} + +unsigned long __riscv_cv_simd_srl_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_srl_b(a, b); +} + +unsigned long __riscv_cv_simd_srl_sc_h(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_srl_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_srl_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_srl_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_sra_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_sra_h(a, b); +} + +unsigned long __riscv_cv_simd_sra_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_sra_b(a, b); +} + +unsigned long __riscv_cv_simd_sra_sc_h(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_sra_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_sra_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_sra_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_sll_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_sll_h(a, b); +} + +unsigned long __riscv_cv_simd_sll_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_sll_b(a, b); +} + +unsigned long __riscv_cv_simd_sll_sc_h(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_sll_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_sll_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_sll_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_or_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_or_h(a, b); +} + +unsigned long __riscv_cv_simd_or_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_or_b(a, b); +} + +unsigned long __riscv_cv_simd_or_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_or_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_or_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_or_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_xor_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_xor_h(a, b); +} + +unsigned long __riscv_cv_simd_xor_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_xor_b(a, b); +} + +unsigned long __riscv_cv_simd_xor_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_xor_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_xor_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_xor_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_and_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_and_h(a, b); +} + +unsigned long __riscv_cv_simd_and_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_and_b(a, b); +} + +unsigned long __riscv_cv_simd_and_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_and_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_and_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_and_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_abs_h(unsigned long a) { + return __builtin_riscv_cv_simd_abs_h(a); +} + +unsigned long __riscv_cv_simd_abs_b(unsigned long a) { + return __builtin_riscv_cv_simd_abs_b(a); +} + +unsigned long __riscv_cv_simd_neg_h(unsigned long a) { + return __builtin_riscv_cv_simd_neg_h(a); +} + +unsigned long __riscv_cv_simd_neg_b(unsigned long a) { + return __builtin_riscv_cv_simd_neg_b(a); +} + +long __riscv_cv_simd_extract_h(unsigned long a, const uint8_t sel) { + return __builtin_riscv_cv_simd_extract_h(a, sel); +} + +long __riscv_cv_simd_extract_b(unsigned long a, const uint8_t sel) { + return __builtin_riscv_cv_simd_extract_b(a, sel); +} + +unsigned long __riscv_cv_simd_extractu_h(unsigned long a, const uint8_t sel) { + return __builtin_riscv_cv_simd_extractu_h(a, sel); +} + +unsigned long __riscv_cv_simd_extractu_b(unsigned long a, const uint8_t sel) { + return __builtin_riscv_cv_simd_extractu_b(a, sel); +} + +unsigned long __riscv_cv_simd_insert_h(unsigned long a, unsigned long b, + const uint8_t sel) { + return __builtin_riscv_cv_simd_insert_h(a, b, sel); +} + +unsigned long __riscv_cv_simd_insert_b(unsigned long a, unsigned long b, + const uint8_t sel) { + return __builtin_riscv_cv_simd_insert_b(a, b, sel); +} + +unsigned long __riscv_cv_simd_dotup_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotup_h(a, b); +} + +unsigned long __riscv_cv_simd_dotup_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotup_b(a, b); +} + +unsigned long __riscv_cv_simd_dotup_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_dotup_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_dotup_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_dotup_sc_b(a, b); +} + +long __riscv_cv_simd_dotusp_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotusp_h(a, b); +} + +long __riscv_cv_simd_dotusp_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotusp_b(a, b); +} + +long __riscv_cv_simd_dotusp_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_dotusp_sc_h(a, b); +} + +long __riscv_cv_simd_dotusp_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_dotusp_sc_b(a, b); +} + +long __riscv_cv_simd_dotsp_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotsp_h(a, b); +} + +long __riscv_cv_simd_dotsp_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_dotsp_b(a, b); +} + +long __riscv_cv_simd_dotsp_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_dotsp_sc_h(a, b); +} + +long __riscv_cv_simd_dotsp_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_dotsp_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_sdotup_h(unsigned long a, unsigned long b, + unsigned long c) { + return __builtin_riscv_cv_simd_sdotup_h(a, b, c); +} + +unsigned long __riscv_cv_simd_sdotup_b(unsigned long a, unsigned long b, + unsigned long c) { + return __builtin_riscv_cv_simd_sdotup_b(a, b, c); +} + +unsigned long __riscv_cv_simd_sdotup_sc_h(unsigned long a, uint16_t b, + unsigned long c) { + return __builtin_riscv_cv_simd_sdotup_sc_h(a, b, c); +} + +unsigned long __riscv_cv_simd_sdotup_sc_b(unsigned long a, uint8_t b, + unsigned long c) { + return __builtin_riscv_cv_simd_sdotup_sc_b(a, b, c); +} + +long __riscv_cv_simd_sdotusp_h(unsigned long a, unsigned long b, long c) { + return __builtin_riscv_cv_simd_sdotusp_h(a, b, c); +} + +long __riscv_cv_simd_sdotusp_b(unsigned long a, unsigned long b, long c) { + return __builtin_riscv_cv_simd_sdotusp_b(a, b, c); +} + +long __riscv_cv_simd_sdotusp_sc_h(unsigned long a, int16_t b, long c) { + return __builtin_riscv_cv_simd_sdotusp_sc_h(a, b, c); +} + +long __riscv_cv_simd_sdotusp_sc_b(unsigned long a, int8_t b, long c) { + return __builtin_riscv_cv_simd_sdotusp_sc_b(a, b, c); +} + +long __riscv_cv_simd_sdotsp_h(unsigned long a, unsigned long b, long c) { + return __builtin_riscv_cv_simd_sdotsp_h(a, b, c); +} + +long __riscv_cv_simd_sdotsp_b(unsigned long a, unsigned long b, long c) { + return __builtin_riscv_cv_simd_sdotsp_b(a, b, c); +} + +long __riscv_cv_simd_sdotsp_sc_h(unsigned long a, int16_t b, long c) { + return __builtin_riscv_cv_simd_sdotsp_sc_h(a, b, c); +} + +long __riscv_cv_simd_sdotsp_sc_b(unsigned long a, int8_t b, long c) { + return __builtin_riscv_cv_simd_sdotsp_sc_b(a, b, c); +} + +unsigned long __riscv_cv_simd_shuffle_h(unsigned long a, unsigned long flgs) { + return __builtin_riscv_cv_simd_shuffle_h(a, flgs); +} + +unsigned long __riscv_cv_simd_shuffle_sci_h(unsigned long a, + const uint8_t flgs) { + return __builtin_riscv_cv_simd_shuffle_sci_h(a, flgs); +} + +unsigned long __riscv_cv_simd_shuffle_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_shuffle_b(a, b); +} + +unsigned long __riscv_cv_simd_shuffle_sci_b(unsigned long a, + const uint8_t flgs) { + return __builtin_riscv_cv_simd_shuffle_sci_b(a, flgs); +} + +unsigned long __riscv_cv_simd_shuffle2_h(unsigned long a, unsigned long flgs, + unsigned long c) { + return __builtin_riscv_cv_simd_shuffle2_h(a, flgs, c); +} + +unsigned long __riscv_cv_simd_shuffle2_b(unsigned long a, unsigned long flgs, + unsigned long c) { + return __builtin_riscv_cv_simd_shuffle2_b(a, flgs, c); +} + +unsigned long __riscv_cv_simd_packhi_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_packhi_h(a, b); +} + +unsigned long __riscv_cv_simd_packlo_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_packlo_h(a, b); +} + +unsigned long __riscv_cv_simd_packhi_b(unsigned long a, unsigned long b, + unsigned long c) { + return __builtin_riscv_cv_simd_packhi_b(a, b, c); +} + +unsigned long __riscv_cv_simd_packlo_b(unsigned long a, unsigned long b, + unsigned long c) { + return __builtin_riscv_cv_simd_packlo_b(a, b, c); +} + +unsigned long __riscv_cv_simd_cmpeq_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpeq_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpeq_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpeq_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpeq_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmpeq_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpeq_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmpeq_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpne_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpne_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpne_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpne_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpne_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmpne_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpne_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmpne_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgt_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgt_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgt_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgt_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgt_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmpgt_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgt_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmpgt_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpge_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpge_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpge_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpge_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpge_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmpge_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpge_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmpge_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmplt_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmplt_h(a, b); +} + +unsigned long __riscv_cv_simd_cmplt_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmplt_b(a, b); +} + +unsigned long __riscv_cv_simd_cmplt_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmplt_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmplt_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmplt_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmple_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmple_h(a, b); +} + +unsigned long __riscv_cv_simd_cmple_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmple_b(a, b); +} + +unsigned long __riscv_cv_simd_cmple_sc_h(unsigned long a, int16_t b) { + return __builtin_riscv_cv_simd_cmple_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmple_sc_b(unsigned long a, int8_t b) { + return __builtin_riscv_cv_simd_cmple_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgtu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgtu_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgtu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgtu_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgtu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_cmpgtu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgtu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_cmpgtu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgeu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgeu_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgeu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpgeu_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpgeu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_cmpgeu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpgeu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_cmpgeu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpltu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpltu_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpltu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpltu_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpltu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_cmpltu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpltu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_cmpltu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpleu_h(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpleu_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpleu_b(unsigned long a, unsigned long b) { + return __builtin_riscv_cv_simd_cmpleu_b(a, b); +} + +unsigned long __riscv_cv_simd_cmpleu_sc_h(unsigned long a, uint16_t b) { + return __builtin_riscv_cv_simd_cmpleu_sc_h(a, b); +} + +unsigned long __riscv_cv_simd_cmpleu_sc_b(unsigned long a, uint8_t b) { + return __builtin_riscv_cv_simd_cmpleu_sc_b(a, b); +} + +unsigned long __riscv_cv_simd_cplxmul_r(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_simd_cplxmul_r(a, b, c, shft); +} + +unsigned long __riscv_cv_simd_cplxmul_i(unsigned long a, unsigned long b, + unsigned long c, const uint8_t shft) { + return __builtin_riscv_cv_simd_cplxmul_i(a, b, c, shft); +} + +unsigned long __riscv_cv_simd_cplxconj(unsigned long a) { + return __builtin_riscv_cv_simd_cplxconj(a); +} + +unsigned long __riscv_cv_simd_subrotmj(unsigned long a, unsigned long b, + const uint8_t shft) { + return __builtin_riscv_cv_simd_subrotmj(a, b, shft); +} + #endif // defined(__riscv_xcvsimd) #if defined(__cplusplus)