From 89b035b3a1880b4699359d8f5947d25051c45656 Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Sat, 27 Sep 2014 05:33:07 +0000 Subject: [PATCH] mips64: run FPU tests only when FPU is available Check whether the target platform is meant to have an FPU before executing tests that make use of a floating-point unit. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14571 --- none/tests/mips64/fpu_arithmetic.vgtest | 1 + none/tests/mips64/fpu_branches.vgtest | 1 + none/tests/mips64/fpu_control_word.vgtest | 1 + none/tests/mips64/fpu_load_store.vgtest | 1 + none/tests/mips64/load_store_unaligned.vgtest | 1 + none/tests/mips64/move_instructions.vgtest | 1 + none/tests/mips64/round.vgtest | 1 + none/tests/mips64/test_fcsr.vgtest | 1 + tests/mips_features.c | 2 +- 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/none/tests/mips64/fpu_arithmetic.vgtest b/none/tests/mips64/fpu_arithmetic.vgtest index 0f1578344f..7efa555568 100644 --- a/none/tests/mips64/fpu_arithmetic.vgtest +++ b/none/tests/mips64/fpu_arithmetic.vgtest @@ -1,2 +1,3 @@ prog: fpu_arithmetic +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/fpu_branches.vgtest b/none/tests/mips64/fpu_branches.vgtest index 2066512197..1854b59cf5 100644 --- a/none/tests/mips64/fpu_branches.vgtest +++ b/none/tests/mips64/fpu_branches.vgtest @@ -1,2 +1,3 @@ prog: fpu_branches +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/fpu_control_word.vgtest b/none/tests/mips64/fpu_control_word.vgtest index 060906c784..619256e3b7 100644 --- a/none/tests/mips64/fpu_control_word.vgtest +++ b/none/tests/mips64/fpu_control_word.vgtest @@ -1,2 +1,3 @@ prog: fpu_control_word +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/fpu_load_store.vgtest b/none/tests/mips64/fpu_load_store.vgtest index e817184bae..d6d3f7dd49 100644 --- a/none/tests/mips64/fpu_load_store.vgtest +++ b/none/tests/mips64/fpu_load_store.vgtest @@ -1,2 +1,3 @@ prog: fpu_load_store +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/load_store_unaligned.vgtest b/none/tests/mips64/load_store_unaligned.vgtest index e5e836c565..f25ccc9906 100644 --- a/none/tests/mips64/load_store_unaligned.vgtest +++ b/none/tests/mips64/load_store_unaligned.vgtest @@ -1,2 +1,3 @@ prog: load_store_unaligned +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/move_instructions.vgtest b/none/tests/mips64/move_instructions.vgtest index c6cc57bdef..19d020efec 100644 --- a/none/tests/mips64/move_instructions.vgtest +++ b/none/tests/mips64/move_instructions.vgtest @@ -1,2 +1,3 @@ prog: move_instructions +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/round.vgtest b/none/tests/mips64/round.vgtest index d5eb00e8f0..a0374b4bf8 100644 --- a/none/tests/mips64/round.vgtest +++ b/none/tests/mips64/round.vgtest @@ -1,2 +1,3 @@ prog: round +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/none/tests/mips64/test_fcsr.vgtest b/none/tests/mips64/test_fcsr.vgtest index c864d253f0..69dba5b377 100644 --- a/none/tests/mips64/test_fcsr.vgtest +++ b/none/tests/mips64/test_fcsr.vgtest @@ -1,2 +1,3 @@ prog: test_fcsr +prereq: ../../../tests/mips_features fpu vgopts: -q diff --git a/tests/mips_features.c b/tests/mips_features.c index d0e01e5fdc..5edb1207d5 100644 --- a/tests/mips_features.c +++ b/tests/mips_features.c @@ -47,7 +47,7 @@ static int mipsCPUInfo(const char *search_string) { static int go(char *feature) { int cpuinfo; - if (strcmp(feature, "hard-float") == 0) { + if (strcmp(feature, "fpu") == 0) { #if defined(__mips_hard_float) /* This is not a runtime detection. If mips_features is built as hard-float, the assumption is that -- 2.47.3