isa-l/crc/aarch64
Jerry Yu 183385f02f multibinary: Add run-time cpu feature detect for aarch64
Some CPUs  report "illegal instruction" error for the crc test because
they do not support the relevant optional feature . This can be fixed by
introducing CPU feature detection for AArch64 .

The difference with the x86 implementation is the dispatcher . It is based
on the glibc function `getauxval(AT_HWCAP)` and `getauxval(AT_HWCAP2)` , not
registers or instructions .

On a  heterogeneous system (big.LITTLE) , it is dangerous to detect CPU
features using identification registers . And while it is possible to use
architectural feature registers from userspace on recent kernels, this
won't necessarily work with older platforms . Thus we use the HW_CAPs
exported from the kernel (and visible in getauxval) as the solution.

- According to kernel suggestion , getauxval should be used for this purpose .
  - [CPU Feature detection](https://github.com/torvalds/linux/blob/master/Documentation/arm64/cpu-feature-registers.rst)
- According to  AAPCS result/paramter registers should be saved/restore for function call
  - [AAPCS](http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf)
  - [GLibc](https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=blob;f=sysdeps/aarch64/dl-trampoline.S)

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
Change-Id: Ic9abe0d2268ac95537e1abf10acc642fc58a5054
2019-08-26 17:58:42 +08:00
..
crc16_t10dif_copy_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc16_t10dif_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_gzip_refl_hw_fold.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_gzip_refl_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_gzip_refl_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_ieee_norm_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_ieee_norm_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_iscsi_refl_hw_fold.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_iscsi_refl_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_iscsi_refl_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_norm_common_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc32_refl_common_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_ecma_norm_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_ecma_norm_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_ecma_refl_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_ecma_refl_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_iso_norm_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_iso_norm_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_iso_refl_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_iso_refl_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_jones_norm_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_jones_norm_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_jones_refl_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_jones_refl_pmull.S crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_norm_common_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc64_refl_common_pmull.h crc: optimize crc with arm64 assembly 2019-06-21 17:02:16 +08:00
crc_aarch64_dispatcher.c multibinary: Add run-time cpu feature detect for aarch64 2019-08-26 17:58:42 +08:00
crc_multibinary_arm.S multibinary: Add run-time cpu feature detect for aarch64 2019-08-26 17:58:42 +08:00
Makefile.am multibinary: Add run-time cpu feature detect for aarch64 2019-08-26 17:58:42 +08:00