summaryrefslogtreecommitdiffstats
path: root/tests/tcg/mips/include
diff options
context:
space:
mode:
authorAleksandar Markovic2019-06-20 13:49:17 +0200
committerAleksandar Markovic2019-06-21 11:30:31 +0200
commit8e6fe6b8bab4716b4adf99a9ab52eaa82464b37e (patch)
treecbe5d1049c386471279ba302cbb1c408db251a5e /tests/tcg/mips/include
parenttarget/mips: Fix if-else-switch-case arms checkpatch errors in translate.c (diff)
downloadqemu-8e6fe6b8bab4716b4adf99a9ab52eaa82464b37e.tar.gz
qemu-8e6fe6b8bab4716b4adf99a9ab52eaa82464b37e.tar.xz
qemu-8e6fe6b8bab4716b4adf99a9ab52eaa82464b37e.zip
tests/tcg: target/mips: Include isa/ase and group name in test output
For better appearance and usefullnes, include ISA/ASE name and instruction group name in the output of tests. For example, all this data will be displayed for FMAX_A.W test: | MSA | Float Max Min | FMAX_A.W | | PASS: 80 | FAIL: 0 | elapsed time: 0.16 ms | (the data will be displayed in one row; they are presented here in two rows not to exceed the width of the commit message) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561031359-6727-2-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'tests/tcg/mips/include')
-rw-r--r--tests/tcg/mips/include/test_utils_128.h17
-rw-r--r--tests/tcg/mips/include/test_utils_64.h9
2 files changed, 16 insertions, 10 deletions
diff --git a/tests/tcg/mips/include/test_utils_128.h b/tests/tcg/mips/include/test_utils_128.h
index a828416d4f..2fea6102d1 100644
--- a/tests/tcg/mips/include/test_utils_128.h
+++ b/tests/tcg/mips/include/test_utils_128.h
@@ -30,11 +30,13 @@
#define PRINT_RESULTS 0
-static inline int32_t check_results(const char *instruction_name,
- const uint32_t test_count,
- const double elapsed_time,
- const uint64_t *b128_result,
- const uint64_t *b128_expect)
+static inline int32_t check_results_128(const char *isa_ase_name,
+ const char *group_name,
+ const char *instruction_name,
+ const uint32_t test_count,
+ const double elapsed_time,
+ const uint64_t *b128_result,
+ const uint64_t *b128_expect)
{
#if PRINT_RESULTS
uint32_t ii;
@@ -56,7 +58,8 @@ static inline int32_t check_results(const char *instruction_name,
uint32_t pass_count = 0;
uint32_t fail_count = 0;
- printf("%s: ", instruction_name);
+ printf("| %-10s \t| %-20s\t| %-16s \t|",
+ isa_ase_name, group_name, instruction_name);
for (i = 0; i < test_count; i++) {
if ((b128_result[2 * i] == b128_expect[2 * i]) &&
(b128_result[2 * i + 1] == b128_expect[2 * i + 1])) {
@@ -66,7 +69,7 @@ static inline int32_t check_results(const char *instruction_name,
}
}
- printf("\tPASS: %3d \tFAIL: %3d \telapsed time: %5.2f ms\n",
+ printf(" PASS: %3d \t| FAIL: %3d \t| elapsed time: %5.2f ms \t|\n",
pass_count, fail_count, elapsed_time);
if (fail_count > 0) {
diff --git a/tests/tcg/mips/include/test_utils_64.h b/tests/tcg/mips/include/test_utils_64.h
index ee3828472c..c9609d8281 100644
--- a/tests/tcg/mips/include/test_utils_64.h
+++ b/tests/tcg/mips/include/test_utils_64.h
@@ -30,7 +30,9 @@
#define PRINT_RESULTS 0
-static inline int32_t check_results_64(const char *instruction_name,
+static inline int32_t check_results_64(const char *isa_ase_name,
+ const char *group_name,
+ const char *instruction_name,
const uint32_t test_count,
const double elapsed_time,
const uint64_t *b64_result,
@@ -55,7 +57,8 @@ static inline int32_t check_results_64(const char *instruction_name,
uint32_t pass_count = 0;
uint32_t fail_count = 0;
- printf("%s: ", instruction_name);
+ printf("| %-10s \t| %-20s\t| %-16s \t|",
+ isa_ase_name, group_name, instruction_name);
for (i = 0; i < test_count; i++) {
if (b64_result[i] == b64_expect[i]) {
pass_count++;
@@ -64,7 +67,7 @@ static inline int32_t check_results_64(const char *instruction_name,
}
}
- printf("PASS: %3d FAIL: %3d elapsed time: %5.2f ms\n",
+ printf(" PASS: %3d \t| FAIL: %3d \t| elapsed time: %5.2f ms \t|\n",
pass_count, fail_count, elapsed_time);
if (fail_count > 0) {