-
Notifications
You must be signed in to change notification settings - Fork 463
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
uECC_OPTIMIZATION_LEVEL=4 breaks uECC_sign()/uECC_verify() on atmega328p #154
Comments
I found a truth when I was viewing asm_avr.inc:255 and asm_avr_mult_square.inc. The truth is: you write a loooooong asm like FAST_MULT_ASM_. I really feel curious about this, and why? My compiler (avr-gcc 13.2.0) tell me that size of string literal is too large. |
Issue #50 is where asm_avr.inc:255 and asm_avr_mult_square.inc from. It referred to a method to optimize the performance. But @kmackay are you tested this? Maybe it is a issue of avr-gcc? We need a method to let the compiler accept the looooong inline-asm string literal. |
Well, #50 's method is so STUPID. No compiler can accept so huge codes. |
i think (assembler) macros could fix this. |
Yes, i think so. But GCC inline assembler cannot compute the real size of the assemble. (See at GCC document) But if we ignore this, can you fix it with assembler macros? |
Subroutine may works, i think |
I found something: the asm are be divided by some subprocess. Maybe we can define many function to reduce single string literal. |
Fixed. But I think the performance will reduce a little and the code is huge like the past. The code is in https://github.com/L1uTongweiNewAccount/micro-ecc see asm_avr.inc and asm_avr_mult_square.inc I did not tested this so be careful. |
#224 I opened a PR. see this |
test/test_ecdsa.c WORKS with this:-
#define uECC_OPTIMIZATION_LEVEL 2
but FAILS with this:-
#define uECC_OPTIMIZATION_LEVEL 4
The text was updated successfully, but these errors were encountered: