summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-11-09 16:55:30 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-18 04:50:46 +0000
commit543a18ecf75480886e15a7be48e57c9271ab5333 (patch)
tree4b4709853507ebcb92b526ed32c2903e6a2ea5ce /test
parent39bc3a4c0d3132551151298efcf3bf12c3bc10a4 (diff)
downloadchrome-ec-543a18ecf75480886e15a7be48e57c9271ab5333.tar.gz
Revert "rsa: Further optimization of multiplications for Cortex-M0"
This reverts commit ecd0d1b5767c829f4c73a79a9eb6abae343284fb. BUG=b:200823466 TEST=make buildall -j Change-Id: I1229e86f015e1a04ee8026abd2f647d6039125fd Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273423 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/utils.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/utils.c b/test/utils.c
index 28d88764ca..119ce98543 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -360,7 +360,6 @@ static int test_cond_t(void)
static int test_mula32(void)
{
uint64_t r = 0x0;
- uint64_t r2 = 0x0;
uint32_t b = 0x1;
uint32_t c = 0x1;
uint32_t i;
@@ -369,18 +368,15 @@ static int test_mula32(void)
t0 = get_time();
for (i = 0; i < 5000000; i++) {
r = mula32(b, c, r + (r >> 32));
- r2 = mulaa32(b, c, r2 >> 32, r2);
b = (b << 13) ^ (b >> 2) ^ i;
c = (c << 16) ^ (c >> 7) ^ i;
watchdog_reload();
}
t1 = get_time();
- ccprintf("After %d iterations, r=%08x%08x, r2=%08x%08x (time: %d)\n",
- i, (uint32_t)(r >> 32), (uint32_t)r,
- (uint32_t)(r2 >> 32), (uint32_t)r2, t1.le.lo-t0.le.lo);
- TEST_ASSERT(r == 0x9df59b9fb0ab9d96L);
- TEST_ASSERT(r2 == 0x9df59b9fb0beabd6L);
+ ccprintf("After %d iterations, r=%08x%08x (time: %d)\n", i,
+ (uint32_t)(r >> 32), (uint32_t)r, t1.le.lo-t0.le.lo);
+ TEST_ASSERT(r == 0x9df59b9fb0ab9d96L);
/* well okay then */
return EC_SUCCESS;