clang 23.0.0git
riscv_nds.h
Go to the documentation of this file.
1/*===---- riscv_nds.h - Andes intrinsics -----------------------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __RISCV_NDS_H
11#define __RISCV_NDS_H
12
13#include <stdint.h>
14
15#if defined(__cplusplus)
16extern "C" {
17#endif
18
19#define __riscv_intrinsic_xandesbfhcvt 1
20#define __riscv_intrinsic_xandesperf 1
21
22#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
23
24#if defined(__riscv_xandesperf)
25
26#if __riscv_xlen == 32
27
28static __inline__ int32_t __DEFAULT_FN_ATTRS __riscv_nds_ffb_32(uint32_t __a,
29 uint32_t __b) {
30 return __builtin_riscv_nds_ffb_32(__a, __b);
31}
32
33static __inline__ int32_t __DEFAULT_FN_ATTRS
34__riscv_nds_ffzmism_32(uint32_t __a, uint32_t __b) {
35 return __builtin_riscv_nds_ffzmism_32(__a, __b);
36}
37
38static __inline__ int32_t __DEFAULT_FN_ATTRS
39__riscv_nds_ffmism_32(uint32_t __a, uint32_t __b) {
40 return __builtin_riscv_nds_ffmism_32(__a, __b);
41}
42
43static __inline__ int32_t __DEFAULT_FN_ATTRS
44__riscv_nds_flmism_32(uint32_t __a, uint32_t __b) {
45 return __builtin_riscv_nds_flmism_32(__a, __b);
46}
47
48#endif
49
50#if __riscv_xlen == 64
51
52static __inline__ int64_t __DEFAULT_FN_ATTRS __riscv_nds_ffb_64(uint64_t __a,
53 uint64_t __b) {
54 return __builtin_riscv_nds_ffb_64(__a, __b);
55}
56
57static __inline__ int64_t __DEFAULT_FN_ATTRS
58__riscv_nds_ffzmism_64(uint64_t __a, uint64_t __b) {
59 return __builtin_riscv_nds_ffzmism_64(__a, __b);
60}
61
62static __inline__ int64_t __DEFAULT_FN_ATTRS
63__riscv_nds_ffmism_64(uint64_t __a, uint64_t __b) {
64 return __builtin_riscv_nds_ffmism_64(__a, __b);
65}
66
67static __inline__ int64_t __DEFAULT_FN_ATTRS
68__riscv_nds_flmism_64(uint64_t __a, uint64_t __b) {
69 return __builtin_riscv_nds_flmism_64(__a, __b);
70}
71
72#endif
73
74#endif // defined(__riscv_xandesperf)
75
76#if defined(__riscv_xandesbfhcvt)
77
78static __inline__ float __DEFAULT_FN_ATTRS __riscv_nds_fcvt_s_bf16(__bf16 bf) {
79 return __builtin_riscv_nds_fcvt_s_bf16(bf);
80}
81
82static __inline__ __bf16 __DEFAULT_FN_ATTRS __riscv_nds_fcvt_bf16_s(float sf) {
83 return __builtin_riscv_nds_fcvt_bf16_s(sf);
84}
85
86#endif // defined(__riscv_xandesbfhcvt)
87
88#if defined(__cplusplus)
89}
90#endif
91
92#endif // define __RISCV_NDS_H
#define __DEFAULT_FN_ATTRS
static __inline__ vector float vector float __b
Definition altivec.h:578
static __inline__ void int __a
Definition emmintrin.h:4077