-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
bn_mul.h: require at least ARMv6 to enable the ARM DSP code #2169
Conversation
Commit 16b1bd8 "bn_mul.h: add ARM DSP optimized MULADDC code" added some ARM DSP instructions that was assumed to always be available when __ARM_FEATURE_DSP is defined to 1. Unfortunately it appears that the ARMv5TE architecture (GCC flag -march=armv5te) supports the DSP instructions, but only in Thumb mode and not in ARM mode, despite defining __ARM_FEATURE_DSP in both cases. This patch fixes the build issue by requiring at least ARMv6 in addition to the DSP feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Please can this be merged. I currently have to carry this patch in the Debian package because mbedTLS won't build on armel without it. |
Unfortunately, the has been released in Mbed TLS 2.14. So this needs a changelog entry and a backport to Mbed TLS 2.16. I'll make those. |
@jcowgill It's cheap for us to add a build to our CI if it uses tools that are already available in our CI environment, but more work to add a new tool. We have |
I think |
@jcowgill The fix to |
* Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Source: meta-openembedded MR: 00000 Type: Integration Disposition: Merged from meta-openembedded ChangeID: 865ecb2 Description: * Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
* Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Source: meta-openembedded MR: 00000 Type: Integration Disposition: Merged from meta-openembedded ChangeID: 0d16b31 Description: * Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
* Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Mbed TLS 2.16.3 is a maintenance release of the Mbed TLS 2.16 branch, and provides bug fixes and minor enhancements. https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.3 Most importantly, this fixes breakage on ARMv5TE platforms: * Fix the build on ARMv5TE in ARM mode to not use assembly instructions that are only available in Thumb mode. Mbed-TLS/mbedtls#2169 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Description
Commit 16b1bd8 "bn_mul.h: add ARM DSP optimized MULADDC code"
added some ARM DSP instructions that was assumed to always be available
when __ARM_FEATURE_DSP is defined to 1. Unfortunately it appears that
the ARMv5TE architecture (GCC flag -march=armv5te) supports the DSP
instructions, but only in Thumb mode and not in ARM mode, despite
defining __ARM_FEATURE_DSP in both cases.
This patch fixes the build issue by requiring at least ARMv6 in addition
to the DSP feature.
Status
READY
Requires Backporting
NO, this is a bug fix for the development branch only, introduced by PR #1618.
Steps to test or reproduce
Build mbedTLS with -march=armv5te -marm