-
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
Backport 2.16: bn_mul.h: require at least ARMv6 to enable the ARM DSP code #2778
Backport 2.16: bn_mul.h: require at least ARMv6 to enable the ARM DSP code #2778
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.
Non-regression test for "bn_mul.h: require at least ARMv6 to enable the ARM DSP code"
Without any -O option, the default is -O0, and then the assembly code is not used, so this would not be a non-regression test for the assembly code that doesn't build.
8784bc5
to
e07b9ff
Compare
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.
This PR is consistent with the original one.
I see a test failure
Is this a known issue? |
@jainvikas8 Oh, DTLS proxy tests consistency was an issue some time ago, I thought that it has already been fixed :) This seems unrelated to the PR. |
The test failure is one instance of one DTLS test, presumably due to a timeout, which is a known problem and obviously unrelated to this PR. So CI is ok. |
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.
This is as good as this PR.
Call the component xxx_arm5vte, because that's what it does. Explain "armel", and more generally why this component exists, in a comment.
560f332
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.
I approve the changes, except for the changelog conflict here and in the base PR, which will need to be resolved.
@k-stachowiak It's ok, we resolve add/add changelog conflicts at merge time. |
Fix the build on ARMv5TE in ARM mode. The assembly code in
bn_mul.h
uses DSP instructions that are not available on this particular architecture, so set the conditional compilation directives to exclude them.Fix originally contributed in #2169 by @aurel32. I rebased to mbedtls-2.16 to facilitate testing and added a changelog entry and a non-regression test.