36 lines · c
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-exception6 *7 *===-----------------------------------------------------------------------===8 */9 10#ifndef __RISCV_NDS_H11#define __RISCV_NDS_H12 13#if defined(__cplusplus)14extern "C" {15#endif16 17#if defined(__riscv_xandesbfhcvt)18 19#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))20 21static __inline__ float __DEFAULT_FN_ATTRS __riscv_nds_fcvt_s_bf16(__bf16 bf) {22 return __builtin_riscv_nds_fcvt_s_bf16(bf);23}24 25static __inline__ __bf16 __DEFAULT_FN_ATTRS __riscv_nds_fcvt_bf16_s(float sf) {26 return __builtin_riscv_nds_fcvt_bf16_s(sf);27}28 29#endif // defined(__riscv_xandesbfhcvt)30 31#if defined(__cplusplus)32}33#endif34 35#endif // define __RISCV_NDS_H36