Skip to content

Commit 2b0f357

Browse files
author
Simon Hosie
committed
add inline header defines
1 parent b4e5eac commit 2b0f357

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

src/arch/helperrvv.h

+44
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@
5050
#define LOG2VECTLENSP (LOG2VECTLENDP+1)
5151

5252
#define ENABLE_SP
53+
//@#define ENABLE_SP
5354
#define ENABLE_DP
55+
//@#define ENABLE_DP
5456

5557
#if CONFIG != 2
5658
#if defined(ENABLE_RVVM1NOFMA) || defined(ENABLE_RVVM2NOFMA)
5759
#error "RVV NOFMA only supported for CONFIG=2"
5860
#else
5961
#define ENABLE_FMA_SP
62+
//@#define ENABLE_FMA_SP
6063
#define ENABLE_FMA_DP
64+
//@#define ENABLE_FMA_DP
6165
#endif
6266
#endif
6367

@@ -155,9 +159,13 @@ typedef vfloat64m1x4_t tdi_t;
155159
#if SLEEF_RVV_VLEN == 0
156160
#define VECTLENSP (__riscv_vsetvlmax_e32m1())
157161
#define VECTLENDP SLEEF_RVV_DP_RUNTIME_VL()
162+
//@#define VECTLENSP __riscv_vsetvlmax_e32m1()
163+
//@#define VECTLENDP __riscv_vsetvlmax_e64m1()
158164
#else
159165
#define VECTLENSP (SLEEF_RVV_SP_LMUL * SLEEF_RVV_VLEN / sizeof(float))
160166
#define VECTLENDP (SLEEF_RVV_DP_LMUL * SLEEF_RVV_VLEN / sizeof(double))
167+
//@#define VECTLENSP (SLEEF_RVV_SP_LMUL * SLEEF_RVV_VLEN / sizeof(float))
168+
//@#define VECTLENDP (SLEEF_RVV_DP_LMUL * SLEEF_RVV_VLEN / sizeof(double))
161169
#endif
162170
#define SLEEF_RVV_SP_VCAST_VF_F __riscv_vfmv_v_f_f32m1
163171
#define SLEEF_RVV_SP_VCAST_VI2_I __riscv_vmv_v_x_i32m1
@@ -280,9 +288,13 @@ typedef vfloat64m2x4_t tdi_t;
280288
#if SLEEF_RVV_VLEN == 0
281289
#define VECTLENSP (__riscv_vsetvlmax_e32m2())
282290
#define VECTLENDP SLEEF_RVV_DP_RUNTIME_VL()
291+
//@#define VECTLENSP __riscv_vsetvlmax_e32m2()
292+
//@#define VECTLENDP __riscv_vsetvlmax_e64m2()
283293
#else
284294
#define VECTLENSP (SLEEF_RVV_SP_LMUL * SLEEF_RVV_VLEN / sizeof(float))
285295
#define VECTLENDP (SLEEF_RVV_DP_LMUL * SLEEF_RVV_VLEN / sizeof(double))
296+
//@#define VECTLENSP (SLEEF_RVV_SP_LMUL * SLEEF_RVV_VLEN / sizeof(float))
297+
//@#define VECTLENDP (SLEEF_RVV_DP_LMUL * SLEEF_RVV_VLEN / sizeof(double))
286298
#endif
287299
#define SLEEF_RVV_SP_VCAST_VF_F __riscv_vfmv_v_f_f32m2
288300
#define SLEEF_RVV_SP_VCAST_VI2_I __riscv_vmv_v_x_i32m2
@@ -1382,6 +1394,22 @@ static INLINE void vprefetch_v_p(const void *ptr) {}
13821394
#define vxor_vo_vo_vo rvv_sp_vxor_vo_vo_vo
13831395
#endif // ENABLE_RVV_SP
13841396

1397+
//@#ifdef ENABLE_RVV_SP
1398+
//@#define vmask rvv_sp_vmask
1399+
//@#define vopmask rvv_sp_vopmask
1400+
//
1401+
//@#define vcast_vm_i_i rvv_sp_vcast_vm_i_i
1402+
//@#define vcast_vi_vm rvv_sp_vcast_vi_vm
1403+
//@#define vand_vm_vm_vm rvv_sp_vand_vm_vm_vm
1404+
//@#define vor_vm_vm_vm rvv_sp_vor_vm_vm_vm
1405+
//@#define vxor_vm_vm_vm rvv_sp_vxor_vm_vm_vm
1406+
//@#define vandnot_vm_vm_vm rvv_sp_vandnot_vm_vm_vm
1407+
//@#define vand_vo_vo_vo rvv_sp_vand_vo_vo_vo
1408+
//@#define vandnot_vo_vo_vo rvv_sp_vandnot_vo_vo_vo
1409+
//@#define vor_vo_vo_vo rvv_sp_vor_vo_vo_vo
1410+
//@#define vxor_vo_vo_vo rvv_sp_vxor_vo_vo_vo
1411+
//@#endif // ENABLE_RVV_SP
1412+
13851413
// Types and functions that conflict with ENABLE_RVV_SP
13861414
#ifdef ENABLE_RVV_DP
13871415
#define vmask rvv_dp_vmask
@@ -1399,4 +1427,20 @@ static INLINE void vprefetch_v_p(const void *ptr) {}
13991427
#define vxor_vo_vo_vo rvv_dp_vxor_vo_vo_vo
14001428
#endif // ENABLE_RVV_DP
14011429

1430+
//@#ifdef ENABLE_RVV_DP
1431+
//@#define vmask rvv_dp_vmask
1432+
//@#define vopmask rvv_dp_vopmask
1433+
//
1434+
//@#define vcast_vm_i_i rvv_dp_vcast_vm_i_i
1435+
//@#define vcast_vi_vm rvv_dp_vcast_vi_vm
1436+
//@#define vand_vm_vm_vm rvv_dp_vand_vm_vm_vm
1437+
//@#define vor_vm_vm_vm rvv_dp_vor_vm_vm_vm
1438+
//@#define vxor_vm_vm_vm rvv_dp_vxor_vm_vm_vm
1439+
//@#define vandnot_vm_vm_vm rvv_dp_vandnot_vm_vm_vm
1440+
//@#define vand_vo_vo_vo rvv_dp_vand_vo_vo_vo
1441+
//@#define vandnot_vo_vo_vo rvv_dp_vandnot_vo_vo_vo
1442+
//@#define vor_vo_vo_vo rvv_dp_vor_vo_vo_vo
1443+
//@#define vxor_vo_vo_vo rvv_dp_vxor_vo_vo_vo
1444+
//@#endif // ENABLE_RVV_DP
1445+
14021446
#endif // HELPERRVV_H

src/common/keywords.txt

+4
Original file line numberDiff line numberDiff line change
@@ -679,3 +679,7 @@ Sleef_rempitabdp
679679
Sleef_rempitabqp
680680
vcastu_vm_vi
681681
vcastu_vi_vm
682+
rvv_sp_vmask
683+
rvv_dp_vmask
684+
rvv_sp_vopmask
685+
rvv_dp_vopmask

0 commit comments

Comments
 (0)