-
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
Add architecture detection macros #8093
Add architecture detection macros #8093
Conversation
1e87af5
to
9f2946a
Compare
1f75339
to
7610221
Compare
7610221
to
3e7fce7
Compare
3e7fce7
to
5000ac5
Compare
Now we have arm/x86 32/64 detection Signed-off-by: Jerry Yu <[email protected]>
Signed-off-by: Jerry Yu <[email protected]>
Signed-off-by: Jerry Yu <[email protected]>
Signed-off-by: Jerry Yu <[email protected]>
5000ac5
to
782b966
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.
Several suggested improvements.
As we are adding architecture detection macros globally, it would be good to replace all the architecture checkings with these macros. For example:
Line 59 in 41d689f
#if defined(__aarch64__) |
It might be out of scope of this PR, so it's fine to do the replacement in a sperate PR.
@@ -46,7 +46,7 @@ | |||
|
|||
#include "aesce.h" | |||
|
|||
#if defined(MBEDTLS_HAVE_ARM64) | |||
#if defined(MBEDTLS_ARCH_IS_ARM64) |
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.
In aesni.c
and padlock.c
, we guard the implementations with MBEDTLS_XXX_HAVE_CODE
, I think we should do it similarly.
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.
It is addressed in #7078 .
Yes. I think it is out of scope. It should be replaced in separate PRs |
- duplicate definition - wrong comments - redundant include statement Signed-off-by: Jerry Yu <[email protected]>
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
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
Description
There are many place to detect target architecture, this PR add utility macros for this purpose.
relative to: #7078 .
see also :#7384 (comment)
preceding-PR: #7384
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")