mirror of
https://github.com/intel/isa-l.git
synced 2024-12-13 17:57:08 +01:00
build: Add aarch64 support
Change-Id: If9594936a28355d89edd1a331b3b429dffa44184 Signed-off-by: Yibo Cai <yibo.cai@arm.com>
This commit is contained in:
parent
32b5c4131b
commit
7a44098a98
14
Makefile.am
14
Makefile.am
@ -21,6 +21,7 @@ examples=
|
|||||||
other_tests=
|
other_tests=
|
||||||
lsrc_x86_64=
|
lsrc_x86_64=
|
||||||
lsrc_x86_32=
|
lsrc_x86_32=
|
||||||
|
lsrc_aarch64=
|
||||||
lsrc_base_aliases=
|
lsrc_base_aliases=
|
||||||
lsrc32=
|
lsrc32=
|
||||||
unit_tests32=
|
unit_tests32=
|
||||||
@ -55,6 +56,10 @@ if CPU_X86_32
|
|||||||
libisal_la_SOURCES += ${lsrc_x86_32}
|
libisal_la_SOURCES += ${lsrc_x86_32}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if CPU_AARCH64
|
||||||
|
libisal_la_SOURCES += ${lsrc_aarch64}
|
||||||
|
endif
|
||||||
|
|
||||||
if CPU_UNDEFINED
|
if CPU_UNDEFINED
|
||||||
libisal_la_SOURCES += ${lsrc_base_aliases}
|
libisal_la_SOURCES += ${lsrc_base_aliases}
|
||||||
endif
|
endif
|
||||||
@ -93,19 +98,26 @@ test: $(addsuffix .run,$(unit_tests))
|
|||||||
$<
|
$<
|
||||||
@echo Completed run: $<
|
@echo Completed run: $<
|
||||||
|
|
||||||
# Support for yasm/nasm
|
# Support for yasm/nasm/gas
|
||||||
if USE_YASM
|
if USE_YASM
|
||||||
as_filter = ${srcdir}/tools/yasm-filter.sh
|
as_filter = ${srcdir}/tools/yasm-filter.sh
|
||||||
endif
|
endif
|
||||||
if USE_NASM
|
if USE_NASM
|
||||||
as_filter = ${srcdir}/tools/nasm-filter.sh
|
as_filter = ${srcdir}/tools/nasm-filter.sh
|
||||||
endif
|
endif
|
||||||
|
if CPU_AARCH64
|
||||||
|
as_filter = gcc
|
||||||
|
endif
|
||||||
|
|
||||||
CCAS = $(as_filter)
|
CCAS = $(as_filter)
|
||||||
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
|
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
|
||||||
|
|
||||||
AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${D}
|
AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${D}
|
||||||
|
if CPU_AARCH64
|
||||||
|
AM_CCASFLAGS = ${AM_CFLAGS}
|
||||||
|
else
|
||||||
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} ${src_include} ${DEFS} ${D}
|
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} ${src_include} ${DEFS} ${D}
|
||||||
|
endif
|
||||||
|
|
||||||
.asm.s:
|
.asm.s:
|
||||||
@echo " MKTMP " $@;
|
@echo " MKTMP " $@;
|
||||||
|
@ -28,9 +28,12 @@ AS_CASE([$host_cpu],
|
|||||||
[x86_64], [CPU="x86_64"],
|
[x86_64], [CPU="x86_64"],
|
||||||
[amd64], [CPU="x86_64"],
|
[amd64], [CPU="x86_64"],
|
||||||
[i?86], [CPU="x86_32"],
|
[i?86], [CPU="x86_32"],
|
||||||
|
[aarch64], [CPU="aarch64"],
|
||||||
|
[arm64], [CPU="aarch64"],
|
||||||
)
|
)
|
||||||
AM_CONDITIONAL([CPU_X86_64], [test "$CPU" = "x86_64"])
|
AM_CONDITIONAL([CPU_X86_64], [test "$CPU" = "x86_64"])
|
||||||
AM_CONDITIONAL([CPU_X86_32], [test "$CPU" = "x86_32"])
|
AM_CONDITIONAL([CPU_X86_32], [test "$CPU" = "x86_32"])
|
||||||
|
AM_CONDITIONAL([CPU_AARCH64], [test "$CPU" = "aarch64"])
|
||||||
AM_CONDITIONAL([CPU_UNDEFINED], [test "x$CPU" = "x"])
|
AM_CONDITIONAL([CPU_UNDEFINED], [test "x$CPU" = "x"])
|
||||||
|
|
||||||
if test "$CPU" = "x86_64"; then
|
if test "$CPU" = "x86_64"; then
|
||||||
|
@ -33,6 +33,7 @@ lsrc += \
|
|||||||
|
|
||||||
lsrc_base_aliases += crc/crc_base_aliases.c
|
lsrc_base_aliases += crc/crc_base_aliases.c
|
||||||
lsrc_x86_32 += crc/crc_base_aliases.c
|
lsrc_x86_32 += crc/crc_base_aliases.c
|
||||||
|
lsrc_aarch64 += crc/crc_base_aliases.c
|
||||||
|
|
||||||
lsrc_x86_64 += \
|
lsrc_x86_64 += \
|
||||||
crc/crc16_t10dif_01.asm \
|
crc/crc16_t10dif_01.asm \
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
lsrc += erasure_code/ec_base.c
|
lsrc += erasure_code/ec_base.c
|
||||||
|
|
||||||
lsrc_base_aliases += erasure_code/ec_base_aliases.c
|
lsrc_base_aliases += erasure_code/ec_base_aliases.c
|
||||||
|
lsrc_aarch64 += erasure_code/ec_base_aliases.c
|
||||||
|
|
||||||
lsrc_x86_64 += \
|
lsrc_x86_64 += \
|
||||||
erasure_code/ec_highlevel_func.c \
|
erasure_code/ec_highlevel_func.c \
|
||||||
|
@ -38,6 +38,7 @@ lsrc += igzip/igzip.c \
|
|||||||
|
|
||||||
lsrc_base_aliases += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
|
lsrc_base_aliases += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
|
||||||
lsrc_x86_32 += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
|
lsrc_x86_32 += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
|
||||||
|
lsrc_aarch64 += igzip/igzip_base_aliases.c igzip/proc_heap_base.c
|
||||||
|
|
||||||
lsrc_x86_64 += igzip/igzip_body.asm \
|
lsrc_x86_64 += igzip/igzip_body.asm \
|
||||||
igzip/igzip_finish.asm \
|
igzip/igzip_finish.asm \
|
||||||
|
9
make.inc
9
make.inc
@ -104,7 +104,7 @@ CLEANFILES += $(O) *.o *.a $(all_tests) $(bin_PROGRAMS) $(lib_name) $(so_lib_nam
|
|||||||
|
|
||||||
lsrc += $(lsrc_$(host_cpu))
|
lsrc += $(lsrc_$(host_cpu))
|
||||||
O = bin
|
O = bin
|
||||||
lobj += $(patsubst %.c,%.o,$(patsubst %.asm,%.o,$(lsrc) $(lsrc_intrinsic)))
|
lobj += $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.asm,%.o,$(lsrc) $(lsrc_intrinsic))))
|
||||||
objs = $(addprefix $(O)/,$(notdir $(lobj)))
|
objs = $(addprefix $(O)/,$(notdir $(lobj)))
|
||||||
|
|
||||||
|
|
||||||
@ -172,10 +172,16 @@ $(addsuffix .run,$(all_tests)): %.run : %
|
|||||||
# Other build rules
|
# Other build rules
|
||||||
msg = $(if $(DEBUG),DEBUG) $(patsubst 32,32-bit,$(host_cpu)) $D
|
msg = $(if $(DEBUG),DEBUG) $(patsubst 32,32-bit,$(host_cpu)) $D
|
||||||
|
|
||||||
|
# yasm/nasm assembly files
|
||||||
$(O)/%.o: %.asm
|
$(O)/%.o: %.asm
|
||||||
@echo " ---> Building $< $(msg)"
|
@echo " ---> Building $< $(msg)"
|
||||||
@$(AS) $(ASFLAGS) -o $@ $<
|
@$(AS) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
# gcc assembly files
|
||||||
|
$(O)/%.o: $(host_cpu)/%.S
|
||||||
|
@echo " ---> Building $< $(msg)"
|
||||||
|
@$(COMPILE.c) $(OUTPUT_OPTION) $<
|
||||||
|
|
||||||
$(O)/%.o %.o: %.c
|
$(O)/%.o %.o: %.c
|
||||||
@echo " ---> Building $< $(msg)"
|
@echo " ---> Building $< $(msg)"
|
||||||
@$(COMPILE.c) $(OUTPUT_OPTION) $<
|
@$(COMPILE.c) $(OUTPUT_OPTION) $<
|
||||||
@ -215,6 +221,7 @@ soname = $(so_lib_inst).$(word 1, $(subst ., ,$(version)))
|
|||||||
|
|
||||||
slib: $(so_lib_name)
|
slib: $(so_lib_name)
|
||||||
aobjs += $(addprefix $(O)/,$(patsubst %.asm,%.o,$(filter %.asm,$(notdir $(lsrc) $(lsrc_intrinsic)))))
|
aobjs += $(addprefix $(O)/,$(patsubst %.asm,%.o,$(filter %.asm,$(notdir $(lsrc) $(lsrc_intrinsic)))))
|
||||||
|
aobjs += $(addprefix $(O)/,$(patsubst %.S,%.o,$(filter %.S,$(notdir $(lsrc) $(lsrc_intrinsic)))))
|
||||||
shared_objs += $(addprefix $(O)/shared_ver_,$(patsubst %.c,%.o,$(filter %.c,$(notdir $(lsrc) $(lsrc_intrinsic)))))
|
shared_objs += $(addprefix $(O)/shared_ver_,$(patsubst %.c,%.o,$(filter %.c,$(notdir $(lsrc) $(lsrc_intrinsic)))))
|
||||||
|
|
||||||
$(O)/shared_ver_%.o: %.c
|
$(O)/shared_ver_%.o: %.c
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
lsrc += mem/mem_zero_detect_base.c
|
lsrc += mem/mem_zero_detect_base.c
|
||||||
|
|
||||||
lsrc_base_aliases += mem/mem_zero_detect_base_aliases.c
|
lsrc_base_aliases += mem/mem_zero_detect_base_aliases.c
|
||||||
|
lsrc_aarch64 += mem/mem_zero_detect_base_aliases.c
|
||||||
|
|
||||||
lsrc_x86_64 += mem/mem_zero_detect_avx.asm \
|
lsrc_x86_64 += mem/mem_zero_detect_avx.asm \
|
||||||
mem/mem_zero_detect_sse.asm \
|
mem/mem_zero_detect_sse.asm \
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
lsrc += raid/raid_base.c
|
lsrc += raid/raid_base.c
|
||||||
|
|
||||||
lsrc_base_aliases += raid/raid_base_aliases.c
|
lsrc_base_aliases += raid/raid_base_aliases.c
|
||||||
|
lsrc_aarch64 += raid/raid_base_aliases.c
|
||||||
|
|
||||||
lsrc_x86_64 += \
|
lsrc_x86_64 += \
|
||||||
raid/xor_gen_sse.asm \
|
raid/xor_gen_sse.asm \
|
||||||
|
Loading…
Reference in New Issue
Block a user