isa-l/include
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
..
aarch64_multibinary.h multibinary: Add run-time cpu feature detect for aarch64 2019-08-26 17:58:42 +08:00
crc64.h Format only patch from iindent and remove_whitespace 2017-06-26 04:10:47 -04:00
crc.h crc: Add t10dif+copy function 2017-12-18 15:59:17 -07:00
erasure_code.h ec: Fix incorrect min size stated for gf_vect_mad 2019-07-16 15:41:34 -07:00
gf_vect_mul.h build: Add multi-arch autoconf support 2018-12-10 13:40:55 -07:00
igzip_lib.h igzip: export isal_adler32 2019-02-10 13:37:52 -07:00
mem_routines.h mem: Add zero detect memory functions 2018-09-25 14:33:31 -07:00
multibinary.asm build: Fix for mac nasm lack of symbol types 2018-11-29 13:54:36 -07:00
raid.h build: Add multi-arch autoconf support 2018-12-10 13:40:55 -07:00
reg_sizes.asm build: Fix for mac nasm lack of symbol types 2018-11-29 13:54:36 -07:00
test.h test: Fix c99 warn in perf helper functions 2019-03-18 15:07:47 -07:00
types.h types.h: remove [U]INT{8,16,32,64} typedefs 2018-03-29 09:35:25 -07:00
unaligned.h igzip: Remove unaligned stores 2019-03-07 09:27:50 -07:00