Skip to content

Commit 726a6f7

Browse files
daniel-gregorypablodelara
authored andcommitted
build: Add riscv64 support
Use the base implementations for every function. Signed-off-by: Daniel Gregory <[email protected]>
1 parent 633add1 commit 726a6f7

File tree

7 files changed

+21
-0
lines changed

7 files changed

+21
-0
lines changed

Makefile.am

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ other_tests_x86_64=
2929
other_tests_x86_32=
3030
other_tests_aarch64=
3131
other_tests_ppc64le=
32+
other_tests_riscv64=
3233
lsrc_x86_64=
3334
lsrc_x86_32=
3435
lsrc_aarch64=
3536
lsrc_ppc64le=
37+
lsrc_riscv64=
3638
lsrc_base_aliases=
3739
lsrc32=
3840
unit_tests32=
@@ -83,6 +85,12 @@ libisal_la_SOURCES += ${lsrc_ppc64le}
8385
other_tests += ${other_tests_ppc64le}
8486
endif
8587

88+
if CPU_RISCV64
89+
ARCH=-Driscv64
90+
libisal_la_SOURCES += ${lsrc_riscv64}
91+
other_tests += ${other_tests_riscv64}
92+
endif
93+
8694
if CPU_UNDEFINED
8795
libisal_la_SOURCES += ${lsrc_base_aliases}
8896
endif
@@ -131,6 +139,9 @@ endif
131139
if CPU_AARCH64
132140
as_filter = $(CC) -D__ASSEMBLY__
133141
endif
142+
if CPU_RISCV64
143+
as_filter = $(CC) -D__ASSEMBLY__
144+
endif
134145

135146
CCAS = $(as_filter)
136147
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
@@ -142,6 +153,9 @@ AM_CCASFLAGS = ${AM_CFLAGS}
142153
else
143154
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} ${src_include} ${DEFS} ${D}
144155
endif
156+
if CPU_RISCV64
157+
AM_CCASFLAGS = ${AM_CFLAGS}
158+
endif
145159

146160
.asm.s:
147161
@echo " MKTMP " $@;

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ AS_CASE([$host_cpu],
3131
[arm64], [CPU="aarch64"],
3232
[powerpc64le], [CPU="ppc64le"],
3333
[ppc64le], [CPU="ppc64le"],
34+
[riscv64], [CPU="riscv64"],
3435
)
3536
AM_CONDITIONAL([CPU_X86_64], [test "$CPU" = "x86_64"])
3637
AM_CONDITIONAL([CPU_X86_32], [test "$CPU" = "x86_32"])
3738
AM_CONDITIONAL([CPU_AARCH64], [test "$CPU" = "aarch64"])
3839
AM_CONDITIONAL([CPU_PPC64LE], [test "$CPU" = "ppc64le"])
40+
AM_CONDITIONAL([CPU_RISCV64], [test "$CPU" = "riscv64"])
3941
AM_CONDITIONAL([CPU_UNDEFINED], [test "x$CPU" = "x"])
4042

4143
if test "$CPU" = "x86_64"; then

crc/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ lsrc += \
3636
lsrc_base_aliases += crc/crc_base_aliases.c
3737
lsrc_x86_32 += crc/crc_base_aliases.c
3838
lsrc_ppc64le += crc/crc_base_aliases.c
39+
lsrc_riscv64 += crc/crc_base_aliases.c
3940

4041
lsrc_x86_64 += \
4142
crc/crc16_t10dif_01.asm \

erasure_code/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ include erasure_code/ppc64le/Makefile.am
3434
lsrc += erasure_code/ec_base.c
3535

3636
lsrc_base_aliases += erasure_code/ec_base_aliases.c
37+
lsrc_riscv64 += erasure_code/ec_base_aliases.c
3738
lsrc_x86_64 += \
3839
erasure_code/ec_highlevel_func.c \
3940
erasure_code/gf_vect_mul_sse.asm \

igzip/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ lsrc += igzip/igzip.c \
3939
lsrc_base_aliases += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
4040
lsrc_x86_32 += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
4141
lsrc_ppc64le += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
42+
lsrc_riscv64 += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
4243

4344
lsrc_aarch64 += igzip/aarch64/igzip_inflate_multibinary_arm64.S \
4445
igzip/aarch64/igzip_multibinary_arm64.S \

mem/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ lsrc += mem/mem_zero_detect_base.c
3333

3434
lsrc_base_aliases += mem/mem_zero_detect_base_aliases.c
3535
lsrc_ppc64le += mem/mem_zero_detect_base_aliases.c
36+
lsrc_riscv64 += mem/mem_zero_detect_base_aliases.c
3637

3738
lsrc_x86_64 += mem/mem_zero_detect_avx512.asm \
3839
mem/mem_zero_detect_avx2.asm \

raid/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ lsrc += raid/raid_base.c
3333

3434
lsrc_base_aliases += raid/raid_base_aliases.c
3535
lsrc_ppc64le += raid/raid_base_aliases.c
36+
lsrc_riscv64 += raid/raid_base_aliases.c
3637

3738
lsrc_x86_64 += \
3839
raid/xor_gen_sse.asm \

0 commit comments

Comments
 (0)