Compiling with arm-none-eabi-gcc 6.3.1 leads to warnings regarding the asm macros for INNERMUL and PROPCARRY.
$ CFLAGS="-Os -DTFM_ALREADY_SET -DTFM_ARM" CC=arm-none-eabi-gcc make
...
src/mont/fp_montgomery_reduce.c:510:11: warning: matching constraint does not allow a register
INNERMUL;
^~~~~~~~
src/mont/fp_montgomery_reduce.c:515:12: warning: matching constraint does not allow a register
PROPCARRY;
...
This is due to the mismatch of the output & input constraint character. _c[0] is constrained to memory for output and to register for input.
I changed the input constraint to memory, "m".
I tested the implementation with the version showing the warning and the version with the proposed fix both on an Cortex-A5 SoC I have on my desk by verifying an RSA signature. Both worked.
To see if there is any difference for the binary at all, I diffed the disassembly of both static libraries (develop branch vs fixed). There was no difference so I assume arm gcc compiler handeled the mismatch of the constraints already correctly.
Compiling with arm-none-eabi-gcc 6.3.1 leads to warnings regarding the asm macros for INNERMUL and PROPCARRY.
This is due to the mismatch of the output & input constraint character. _c[0] is constrained to memory for output and to register for input.
I changed the input constraint to memory,
"m"
.I tested the implementation with the version showing the warning and the version with the proposed fix both on an Cortex-A5 SoC I have on my desk by verifying an RSA signature. Both worked. To see if there is any difference for the binary at all, I diffed the disassembly of both static libraries (develop branch vs fixed). There was no difference so I assume arm gcc compiler handeled the mismatch of the constraints already correctly.