diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-03-05 11:49:05 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-03-06 21:32:54 +0000 |
commit | 75f59a47ec90bfd4f21bfbab7536c4ad13847595 (patch) | |
tree | cd02a3f9bed777cb5d389503ce743506c6bdf81e | |
parent | f4f934c10374bad4f49a9fe4f96f6140a2e7f2e0 (diff) | |
download | chrome-ec-75f59a47ec90bfd4f21bfbab7536c4ad13847595.tar.gz |
test: remove 64-bit multiplication
On some CPU cores, the compiler needs an helper to perform the 64-bit
multiplication.
As the only 64-bit multiplication in the code base is not necessary, fix
it rather than adding the helper.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=build for Cortex-M0 platform.
Change-Id: Id5d6b4b6641f81732a456dacb78dee7262f6729d
Reviewed-on: https://chromium-review.googlesource.com/188980
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | test/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/utils.c b/test/utils.c index 8ab31d71c8..9d33a1264f 100644 --- a/test/utils.c +++ b/test/utils.c @@ -99,7 +99,7 @@ static int test_memmove(void) /* Expected about 4x speed gain. Use 3x because it fluctuates */ #ifndef TEST_COVERAGE /* Measuring coverage makes it fluctuate even more, so skip it. */ - TEST_ASSERT((t1.val-t0.val) > (t3.val-t2.val) * 3); + TEST_ASSERT((t1.val-t0.val) > (unsigned)(t3.val-t2.val) * 3); #endif /* Test small moves */ @@ -145,7 +145,7 @@ static int test_memcpy(void) TEST_ASSERT_ARRAY_EQ(buf + dest_offset, buf, len); /* Expected about 4x speed gain. Use 3x because it fluctuates */ - TEST_ASSERT((t1.val-t0.val) > (t3.val-t2.val) * 3); + TEST_ASSERT((t1.val-t0.val) > (unsigned)(t3.val-t2.val) * 3); memcpy(buf + dest_offset + 1, buf + 1, len - 1); TEST_ASSERT_ARRAY_EQ(buf + dest_offset + 1, buf + 1, len - 1); |