Skip to content

Commit 55d9c43

Browse files
authored
Merge pull request #1049 from zijianli1234/dev
add riscv rvv ci
2 parents 99b40cf + 11b3ebd commit 55d9c43

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,19 @@ jobs:
474474
CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check
475475
CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -march=arch11 -mzvector" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check
476476
477-
- name: MIPS-M68K-RISCV-SPARC (XXH_VECTOR=[ scalar ])
478-
if: ${{ startsWith(matrix.name, 'MIPS') || startsWith(matrix.name, 'M68K') || startsWith(matrix.name, 'RISC-V') || startsWith(matrix.name, 'SPARC') }}
477+
- name: MIPS-M68K-SPARC (XXH_VECTOR=[ scalar ])
478+
if: ${{ startsWith(matrix.name, 'MIPS') || startsWith(matrix.name, 'M68K') || startsWith(matrix.name, 'SPARC') }}
479479
run: |
480480
make clean; LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make check
481481
482+
- name: RISCV (XXH_VECTOR=[scalar, rvv])
483+
if: ${{startsWith(matrix.name, 'RISC-V')}}
484+
run: |
485+
make clean; LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make check
486+
CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=128,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check
487+
CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check
488+
CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=512,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check
489+
482490
- name: LoongArch (XXH_VECTOR=[ scalar, LSX ])
483491
if: ${{ startsWith(matrix.name, 'LoongArch') }}
484492
run: |

xxhash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5944,7 +5944,7 @@ XXH3_initCustomSecret_rvv(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
59445944
seed64, (uint64_t)(-(int64_t)seed64), \
59455945
seed64, (uint64_t)(-(int64_t)seed64)};
59465946
// Cast the default secret to a signed 64-bit pointer for vectorized access
5947-
const int64_t* const xXXH3_kSecret = (const int64_t*)XXH3_kSecret;
5947+
const int64_t* const xXXH3_kSecret = (const int64_t*)((const void*)XXH3_kSecret);
59485948
size_t vl = 0;
59495949
for (size_t i=0; i < XXH3_kSecret_64b_len; i += vl) {
59505950

0 commit comments

Comments
 (0)