target/mips: Amend and cleanup MSA TCG tests

Add missing bits and peaces of the tests of the emulation of certain
MSA (non-immediate variants): some tests were missing two last cases;
some instructions were missing wrappers; some test included wrong
headers; some tests were missing altogether; updated some copywright
preambles; do several other minor cleanups.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>
Message-Id: <1555699081-24577-4-git-send-email-aleksandar.markovic@rt-rk.com>
This commit is contained in:
Aleksandar Markovic 2019-04-19 20:37:59 +02:00
parent fd487f83ea
commit 750541c492
155 changed files with 4211 additions and 240 deletions

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MUL_Q.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0xb69bf1d4cc591b07ULL, 0xdc7e3510397df77dULL, },
{ 0x9712fb9b1db7ec38ULL, 0xbccff56b01071259ULL, },
{ 0xfc43001139150d37ULL, 0xef194023f19aecf4ULL, },
{ 0xb69bf1d4cc591b07ULL, 0xdc7e3510397df77dULL, },
{ 0x628a03e2455006e3ULL, 0x65a26eec3ac806bdULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MUL_Q.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0xb69baa39cc590fcdULL, 0xdc7e6df7397c58d9ULL, },
{ 0x9713a7171db7f3a5ULL, 0xbccfb4690107236fULL, },
{ 0xfc439edc3916c1e4ULL, 0xef19389cf19a0fddULL, },
{ 0xb69baa39cc590fcdULL, 0xdc7e6df7397c58d9ULL, },
{ 0x628a97e4455157d3ULL, 0x65a1c5e13ac736e1ULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULR_Q.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0xb69bf1d4cc591b07ULL, 0xdc7f3511397df77eULL, },
{ 0x9713fb9c1db7ec39ULL, 0xbccff56b01081259ULL, },
{ 0xfc44001139160d37ULL, 0xef1a4023f19aecf5ULL, },
{ 0xb69bf1d4cc591b07ULL, 0xdc7f3511397df77eULL, },
{ 0x628a03e3455006e4ULL, 0x65a36eec3ac806beULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULR_Q.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0xb69baa3acc590fcdULL, 0xdc7e6df7397c58daULL, },
{ 0x9713a7171db7f3a6ULL, 0xbccfb46a0107236fULL, },
{ 0xfc439edd3916c1e4ULL, 0xef19389cf19a0fdeULL, },
{ 0xb69baa3acc590fcdULL, 0xdc7e6df7397c58daULL, },
{ 0x628a97e4455157d3ULL, 0x65a1c5e23ac736e2ULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULV.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0x40c6f422ee9fb600ULL, 0x7b583028e316aa80ULL, },
{ 0x80b6c45cb0c20a80ULL, 0x4ff7d850aeb66080ULL, },
{ 0xd0a200c74623ae70ULL, 0xea8758f0dd3e6480ULL, },
{ 0x40c6f422ee9fb600ULL, 0x7b583028e316aa80ULL, },
{ 0x0061e429846184c4ULL, 0xa9e1404091048400ULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULV.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0x76a5ab8089e38100ULL, 0xa1019a60d4dad480ULL, },
{ 0xfbe1883aee787980ULL, 0x821d25438dd09f80ULL, },
{ 0xedbf72842143b470ULL, 0x7f8223caefce5580ULL, },
{ 0x76a5ab8089e38100ULL, 0xa1019a60d4dad480ULL, },
{ 0x4bb436d5b1e9cfc4ULL, 0x12d1ceb0e31ee400ULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULV.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8fc62522929f8100ULL, 0x7a585f288416d480ULL, },
{ 0x78b6f35cb6c27980ULL, 0xb6f78750ceb69f80ULL, },
{ 0xcfa29fc7d323b470ULL, 0xe587adf0113e5580ULL, },
{ 0x8fc62522929f8100ULL, 0x7a585f288416d480ULL, },
{ 0x386153290561cfc4ULL, 0x5ce136403504e400ULL, },
};
gettimeofday(&start, NULL);

View file

@ -1,8 +1,10 @@
/*
* Test program for MSA instruction MULV.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
@ -119,6 +121,8 @@ int32_t main(void)
{ 0xe8bf252289e38100ULL, 0x91ae5f28d4dad480ULL, },
{ 0xb0f0f35cee787980ULL, 0xd67987508dd09f80ULL, },
{ 0x7abb9fc72143b470ULL, 0x11e5adf0efce5580ULL, },
{ 0xe8bf252289e38100ULL, 0x91ae5f28d4dad480ULL, },
{ 0x25775329b1e9cfc4ULL, 0xdfd63640e31ee400ULL, },
};
gettimeofday(&start, NULL);