From 5086ea4b0f58ba72c19553c4a657d7b2c0d8efc2 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Tue, 20 Apr 2021 04:50:28 +0200 Subject: lib/math: Add a `do_div' test module Implement a module for correctness and performance evaluation for the `do_div' function, often handled in an optimised manner by platform code. Use a somewhat randomly generated set of inputs that is supposed to be representative, using the same set of divisors twice, expressed as a constant and as a variable each, so as to verify the implementation for both cases should they be handled by different code execution paths. Reference results were produced with GNU bc. At the conclusion output the total execution time elapsed. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer --- lib/math/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/math/Makefile') diff --git a/lib/math/Makefile b/lib/math/Makefile index be6909e943bd..7456edb864fc 100644 --- a/lib/math/Makefile +++ b/lib/math/Makefile @@ -4,3 +4,5 @@ obj-y += div64.o gcd.o lcm.o int_pow.o int_sqrt.o reciprocal_div.o obj-$(CONFIG_CORDIC) += cordic.o obj-$(CONFIG_PRIME_NUMBERS) += prime_numbers.o obj-$(CONFIG_RATIONAL) += rational.o + +obj-$(CONFIG_TEST_DIV64) += test_div64.o -- cgit v1.2.3