Skip to content

Commit 20511df

Browse files
authored
Merge pull request #3919 from sergei-lewis/risc-v-latest-rvv-intrinsics
update riscv intrinsics for latest spec
2 parents c19dff0 + 9b61be4 commit 20511df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+18633
-2373
lines changed

common_riscv64.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
9191
#define BUFFER_SIZE ( 32 << 20)
9292
#define SEEK_ADDRESS
9393

94-
#if defined(C910V)
95-
#include <riscv_vector.h>
96-
#endif
97-
98-
#if defined(x280)
99-
#include <riscv_vector.h>
94+
#if defined(C910V) || defined(RISCV64_ZVL256B) || defined(__riscv_v)
95+
# include <riscv_vector.h>
96+
# if !defined(DOUBLE)
97+
# define EXTRACT_FLOAT(v) __riscv_vfmv_f_s_f32m1_f32(v)
98+
# else
99+
# define EXTRACT_FLOAT(v) __riscv_vfmv_f_s_f64m1_f64(v)
100+
# endif
101+
#else
102+
# define EXTRACT_FLOAT(v) (v[0])
100103
#endif
101104

102105
#endif

cpuid_riscv64.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7070
/* or implied, of The University of Texas at Austin. */
7171
/*********************************************************************/
7272

73-
#define CPU_GENERIC 0
74-
#define CPU_C910V 1
75-
#define CPU_x280 2
73+
#define CPU_GENERIC 0
74+
#define CPU_C910V 1
75+
#define CPU_RISCV64_ZVL256B 2
7676

7777
static char *cpuname[] = {
7878
"RISCV64_GENERIC",
79-
"C910V"
80-
"x280"
79+
"C910V",
80+
"CPU_RISCV64_ZVL256B"
8181
};
8282

8383
int detect(void){

0 commit comments

Comments
 (0)