Enable T1HA0_AESNI_AVAILABLE for AES Supported ARM64 Processor
odidev opened this issue · 1 comments
I am checking into building the pyfasthash package for arm64 and found that it needs to enable T1HA0_AESNI_AVAILABLE for arm64 to build successfully. As already stated in this PR we cannot enable this for arm64 as AES-NI functionalities are not available for all arm64 supported processors.
As per this, the ARMV8-A processor supports AES instruction set. So, I think we can enable the T1HA0_AESNI_AVAILABLE flag for ARMV8-A processors.
If agreed, we can reopen this PR and amend the changes and enable the support for ARMV8-A processors.
Please share your opinion.
The ARMv8-A architecture haven't specific support for AES-NI.
So as I commented before the T1HA0_AESNI_AVAILABLE
can't be enabled for all ARMv8-A (or similar) ARM/AArch64 CPUs, since availability of AES-NI instructions and corresponding compiler intrinsics depends from particular CPU model and it's features.
If you want to offer a corresponding patch in the mainstream, then you need to add to the conditions a check of predefined macros of specific compiler(s) which are responsible for indicating the availability of AES-instructions on the target CPU model.
For instance, the __ARM_FEATURE_CRYPTO
, __AES__
and so on.
Anyway, you could define T1HA0_AESNI_AVAILABLE
via compiler's command line options while build and using the t1ha
in your case(s)/project(s).