-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect decected AES-NI: LTC_AMD64_SSE4_1 => LTC_HAS_AES_NI: "ltc/ciphers/aes/aesni.c:74:26: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes" #97
Comments
Can you please try CryptX-0.80? |
clang detects AES-NI from skylake only and doesn't detect it from westmere to broadwell (sandybridge, ivybridge, haswell):
On other side it's possible to force turn on AES-NI even if march doesn't support it:
As a simple workaround we can check |
ping @sjaeckel |
I see |
Does the test suite of 0.080 show something like this?
|
How to run it? :-) |
|
On nehalem CPU:
|
It means that AES-SNI support: In theory you can build a binary with AES-NI support but run it on a CPU lacking AES-SNI support (which will be detected in runtime and fall back to SW implementation of AES) |
TBH I never tested that since I don't have any amd64 CPUs w/o AES support, but maybe it's a good time now? ;) |
So it use SW emulation of the AES-NI on my Nehalem? |
Yes, it should fall back to the SW implementation and therefore be a valid test of that functionality. |
If you see
it uses HW AES, if you see
it uses sw implementation of AES. |
not completely right. If you see |
@sjaeckel I am adding compiler options I am afraid that without |
IIRC they're both required since they enable different parts of the API |
OK, I will keep both. Just FYI
|
@VVD to sum it up for you: If you see in the test suite output this
it is the maximum you can achieve during building the CryptX module. You have built a binary that is ready to use HW AES-NI (or fall back to SW implementation when the CPU running this binary does not support AES-NI). |
Thanks! |
FreeBSD 13.2 amd64, CPU Bloomfield and Lynnfield (1st generation of Nehalem 45nm, examples: Core i7 920/930/etc, Core i5 750/760, Core i7 860/870, Xeon X34xx, Xeon E55xx), LLVM 14.0.5, -march=nehalem.
Lynnfield Xeon X3430 with SSE4.1 and without AES-NI:
Bloomfiled Core i7 930 with SSE4.1 and without AES-NI:
Westmere Xeon E5620 with support of the AES-NI:
In src/ltc/headers/tomcrypt_private.h turn on AES_NI if detected SSE4.1, but it's incorrect:
And have build error:
The text was updated successfully, but these errors were encountered: