lib/math: Add a `do_div' test module
authorMaciej W. Rozycki <macro@orcam.me.uk>
Tue, 20 Apr 2021 02:50:28 +0000 (04:50 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 21 Apr 2021 11:45:36 +0000 (13:45 +0200)
commit5086ea4b0f58ba72c19553c4a657d7b2c0d8efc2
treefd16d2051b765f90f03bf75f779cd2340cc29ea8
parent1b6bc35a01bd6b874165379255929b7badfdecb5
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 <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
lib/Kconfig.debug
lib/math/Makefile
lib/math/test_div64.c [new file with mode: 0644]