diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-03-03 10:12:07 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-06-01 06:22:06 +0000 |
commit | 6cd014b2658f2a709f22b16d06982ff5444cd6db (patch) | |
tree | a45f5e1cc9ef917f426b82a4ba6fcbb881fec879 /core/cortex-m0/build.mk | |
parent | 29db6c1226288ea3eca333503a0d4a70c2729388 (diff) | |
download | chrome-ec-6cd014b2658f2a709f22b16d06982ff5444cd6db.tar.gz |
rsa: Optimization of multiplications for Cortex-M0
We multiply 2 32-bit numbers (and not 64-bit numbers), and then add
another 32-bit number, which makes it possible to optimize the
assembly and save a few instructions.
With -O3, 3072-bit exponent, lower verification time from 122 ms to
104 ms on STM32F072 @48Mhz.
Optimized mac function from Dmitry Grinberg <dmitrygr@google.com>.
BRANCH=poppy
BUG=b:35647963
BUG=b:77608104
TEST=On staff, flash, verification successful
TEST=make test-rsa, make test-rsa3
TEST=Flash test-utils and test-rsa to hammer => pass
Change-Id: I584c54c631a3f59f691849a279b308e8d4b4b22d
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/449024
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1080583
Diffstat (limited to 'core/cortex-m0/build.mk')
-rw-r--r-- | core/cortex-m0/build.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cortex-m0/build.mk b/core/cortex-m0/build.mk index 6a0f44b367..2023bd9607 100644 --- a/core/cortex-m0/build.mk +++ b/core/cortex-m0/build.mk @@ -18,7 +18,7 @@ CFLAGS_CPU+=-flto LDFLAGS_EXTRA+=-flto endif -core-y=cpu.o init.o thumb_case.o div.o lmul.o ldivmod.o uldivmod.o +core-y=cpu.o init.o thumb_case.o div.o lmul.o ldivmod.o mula.o uldivmod.o core-$(CONFIG_COMMON_PANIC_OUTPUT)+=panic.o core-$(CONFIG_COMMON_RUNTIME)+=switch.o task.o |