mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
tests/tcg: target/mips: Add utility function reset_msa_registers()
Add function reset_msa_registers() and utilize it in each MSA test. This is needed to ensure independency of test results on the state of MSA registers before test execution. This also allows for correction of tests for VSHF* instructions, that are now independent on the previous state of MSA registers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-9-git-send-email-aleksandar.markovic@rt-rk.com>
This commit is contained in:
parent
b7c6798220
commit
ca693d1c92
227 changed files with 504 additions and 4 deletions
|
@ -23,6 +23,54 @@
|
|||
#define WRAPPERS_MSA_H
|
||||
|
||||
|
||||
#define RESET_MSA_REGISTER(wi) \
|
||||
__asm__ volatile ( \
|
||||
"xor.v $" #wi ", $" #wi ", $" #wi "\n\t" \
|
||||
: \
|
||||
: \
|
||||
: \
|
||||
)
|
||||
|
||||
|
||||
static inline void reset_msa_registers()
|
||||
{
|
||||
|
||||
RESET_MSA_REGISTER(w0);
|
||||
RESET_MSA_REGISTER(w1);
|
||||
RESET_MSA_REGISTER(w2);
|
||||
RESET_MSA_REGISTER(w3);
|
||||
RESET_MSA_REGISTER(w4);
|
||||
RESET_MSA_REGISTER(w5);
|
||||
RESET_MSA_REGISTER(w6);
|
||||
RESET_MSA_REGISTER(w7);
|
||||
RESET_MSA_REGISTER(w8);
|
||||
RESET_MSA_REGISTER(w9);
|
||||
RESET_MSA_REGISTER(w10);
|
||||
RESET_MSA_REGISTER(w11);
|
||||
RESET_MSA_REGISTER(w12);
|
||||
RESET_MSA_REGISTER(w13);
|
||||
RESET_MSA_REGISTER(w14);
|
||||
RESET_MSA_REGISTER(w15);
|
||||
RESET_MSA_REGISTER(w16);
|
||||
RESET_MSA_REGISTER(w17);
|
||||
RESET_MSA_REGISTER(w18);
|
||||
RESET_MSA_REGISTER(w19);
|
||||
RESET_MSA_REGISTER(w20);
|
||||
RESET_MSA_REGISTER(w21);
|
||||
RESET_MSA_REGISTER(w22);
|
||||
RESET_MSA_REGISTER(w23);
|
||||
RESET_MSA_REGISTER(w24);
|
||||
RESET_MSA_REGISTER(w25);
|
||||
RESET_MSA_REGISTER(w26);
|
||||
RESET_MSA_REGISTER(w27);
|
||||
RESET_MSA_REGISTER(w28);
|
||||
RESET_MSA_REGISTER(w29);
|
||||
RESET_MSA_REGISTER(w30);
|
||||
RESET_MSA_REGISTER(w31);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define DO_MSA__WD__WS(suffix, mnemonic) \
|
||||
static inline void do_msa_##suffix(const void *input, \
|
||||
const void *output) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue