-
Notifications
You must be signed in to change notification settings - Fork 265
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
cmake: disable ASM for Windows ARM64 #989
Conversation
With ASM support the builds either exit with an assert or hang (with asserts disabled).
Turns out that the official Windows ARM64 curl.exe exited with an assert when run with a simple command like: `curl https://example.org`. ``` Assertion failed: (i == BN_BITS2) || (h <= (BN_ULONG)1 << i), file \crypto\bn\bn_div.c, line 96 ``` With asserts disabled the same command hung. These warnings hinted to the problem: ``` In file included from libressl/crypto/bn/bn_add.c:65: libressl/crypto/bn/arch/aarch64/bn_arch.h:35:16: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] 35 | : [n]"=r"(n) | ^ libressl/crypto/bn/arch/aarch64/bn_arch.h:34:18: note: use constraint modifier "w" 34 | __asm__ ("clz %[n], %[w]" | ^~~~ | %w[n] libressl/crypto/bn/arch/aarch64/bn_arch.h:36:15: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] 36 | : [w]"r"(w)); | ^ libressl/crypto/bn/arch/aarch64/bn_arch.h:34:24: note: use constraint modifier "w" 34 | __asm__ ("clz %[n], %[w]" | ^~~~ | %w[w] libressl/crypto/bn/arch/aarch64/bn_arch.h:51:37: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] 51 | : [carry]"=r"(carry), [r0]"=r"(r0) | ^ [...] ``` autotools builds have ASM disabled by default for this build case. Ref upstream PR disabling ASM for Windows ARM64 with CMake: libressl/portable#989
There is no assembly on aarch64 to speak of so I don't think doing this
changes much. However, it feels like there is a different issue. Maybe
the windows special with having 32-bit longs is confusing some #ifdefs?
@busterb, could you take a look?
|
There is a long list of Wrongly detected integer sizes in |
FWIW, before: (though this disables ASM differently; without patching LibreSSL.) |
Hey folks, you're right about the LLP64 nature of Windows 64-bit being the core issue here. I remember it being difficult to untangle last time I looked, but this seems like a reasonable workaround until it can be addressed more generally. |
With ASM support the builds either exit with an assert or hang (with asserts disabled).
autotools doesn't enable ASM for Windows ARM64, so it's not affected.
Fixes #987