Fix command line interface for math_brute_force (#1145)

Ensure the following forms of command lines are supported, as per usage
message (-h):
 - math_brute_force [<name1> [<name2> ... [<nameN>]]]
 - math_brute_force I [J]

Remove dead/unnecessary code.

Fix regression introduced in f337e0b6 ( Fix command-line function range
for bruteforce  (#1127), 2021-01-29).

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
This commit is contained in:
Marco Antognini
2021-02-05 10:29:45 +00:00
committed by GitHub
parent fad6a005c9
commit b67f6bbb29

View File

@@ -140,7 +140,8 @@ int doTest(const char *name)
const Func *const temp_func = functionList + i;
if (strcmp(temp_func->name, name) == 0)
{
if (i < gStartTestNumber || i > gEndTestNumber)
if ((gStartTestNumber != -1 && i < gStartTestNumber)
|| i > gEndTestNumber)
{
vlog("Skipping function #%d\n", i);
return 0;
@@ -844,10 +845,6 @@ int main(int argc, const char *argv[])
"----------------------------------------\n");
gMTdata = init_genrand(gRandomSeed);
if (gEndTestNumber == 0)
{
gEndTestNumber = functionListCount;
}
FPU_mode_type oldMode;
DisableFTZ(&oldMode);