-
Notifications
You must be signed in to change notification settings - Fork 849
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
[Bug]: Invalid inline asm for ARM32 #8523
Comments
Hi @ribes96, As the author of this code I feel most comfortable responding to this. Can you tell me a little about your project? Thanks, |
The compiler is also happy if I just remove the last line of the macro /* Multiply va by vb and add double size result into: vh | vl */
#define SP_ASM_MUL_ADD_NO(vl, vh, va, vb) \
__asm__ __volatile__ ( \
"umlal %[l], %[h], %[a], %[b] \n\t" \
: [l] "+r" (vl), [h] "+r" (vh) \
: [a] "r" (va), [b] "r" (vb) \
) so maybe this is the solution if, as you say, the instruction doesn't change the flags. As I said, I am not very familiar with inline assembly or the ARM instruction set in general.
|
Hi @ribes96, It can become a bit of 'whack-a-mole' situation with these type of compile errors. Let me know if you can compile now. Sean |
I can compile now |
Hi @ribes96 I will close this ticket as the reported issue has been fixed. Thanks for taking the time to report the bug! Sean :-) |
Contact Details
[email protected]
Version
5.7.6-stable
Description
I am compiling for
ARM32
using gcc4.3.3
I run configure like this
At the end of the configure there is this line
When running
make
, it complains with thisThe relevant line is this
And for my particular build, the macro
SP_ASM_MUL_ADD_NO
uses this expansion(this is
wolfcrypt/src/sp_int.c:1161
)I am not very familiar with inline assembly, but some googling shows that using
cc
for the clobbers would helpIndeed, when I add the
cc
the code does compile fine.In my case, I also had to fix macro
SP_ASM_MUL_SET
(this is
wolfcrypt/src/sp_int.c:1141
)I'm not sure if this is a problem only for old versions of gcc, or if the code is indeed wrong. If the problem is in the code, maybe the fix should be applied also to other parts that I don't happen to catch because my settings don't compile it
Reproduction steps
No response
Relevant log output
The text was updated successfully, but these errors were encountered: