[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 07/14] tests/tcg: target/mips: Extend functionali
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v7 07/14] tests/tcg: target/mips: Extend functionality of MSA wrapper macros |
Date: |
Mon, 4 Mar 2019 22:09:03 +0100 |
From: Aleksandar Markovic <address@hidden>
Add macros that will allow testing cases when one of the source
registers is identical to the destination register.
Signed-off-by: Aleksandar Markovic <address@hidden>
---
tests/tcg/mips/include/wrappers_msa.h | 51 +++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/tests/tcg/mips/include/wrappers_msa.h
b/tests/tcg/mips/include/wrappers_msa.h
index c650ed2..9cffd55 100644
--- a/tests/tcg/mips/include/wrappers_msa.h
+++ b/tests/tcg/mips/include/wrappers_msa.h
@@ -38,6 +38,21 @@ static inline void do_msa_##suffix(void *input, void
*output) \
); \
}
+#define DO_MSA__WD__WD(suffix, mnemonic) \
+static inline void do_msa_##suffix(void *input, void *output) \
+{ \
+ __asm__ volatile ( \
+ "move $t0, %0\n\t" \
+ "ld.d $w11, 0($t0)\n\t" \
+ #mnemonic " $w10, $w10\n\t" \
+ "move $t0, %1\n\t" \
+ "st.d $w10, 0($t0)\n\t" \
+ : \
+ : "r" (input), "r" (output) \
+ : "t0", "memory" \
+ ); \
+}
+
DO_MSA__WD__WS(NLOC_B, nloc.b)
DO_MSA__WD__WS(NLOC_H, nloc.h)
DO_MSA__WD__WS(NLOC_W, nloc.w)
@@ -72,6 +87,42 @@ static inline void do_msa_##suffix(void *input1, void
*input2, \
); \
}
+#define DO_MSA__WD__WD_WT(suffix, mnemonic) \
+static inline void do_msa_##suffix(void *input1, void *input2, \
+ void *output) \
+{ \
+ __asm__ volatile ( \
+ "move $t0, %0\n\t" \
+ "ld.d $w11, 0($t0)\n\t" \
+ "move $t0, %1\n\t" \
+ "ld.d $w12, 0($t0)\n\t" \
+ #mnemonic " $w10, $w10, $w12\n\t" \
+ "move $t0, %2\n\t" \
+ "st.d $w10, 0($t0)\n\t" \
+ : \
+ : "r" (input1), "r" (input2), "r" (output) \
+ : "t0", "memory" \
+ ); \
+}
+
+#define DO_MSA__WD__WS_WD(suffix, mnemonic) \
+static inline void do_msa_##suffix(void *input1, void *input2, \
+ void *output) \
+{ \
+ __asm__ volatile ( \
+ "move $t0, %0\n\t" \
+ "ld.d $w11, 0($t0)\n\t" \
+ "move $t0, %1\n\t" \
+ "ld.d $w12, 0($t0)\n\t" \
+ #mnemonic " $w10, $w11, $w10\n\t" \
+ "move $t0, %2\n\t" \
+ "st.d $w10, 0($t0)\n\t" \
+ : \
+ : "r" (input1), "r" (input2), "r" (output) \
+ : "t0", "memory" \
+ ); \
+}
+
DO_MSA__WD__WS_WT(ILVEV_B, ilvev.b)
DO_MSA__WD__WS_WT(ILVEV_H, ilvev.h)
DO_MSA__WD__WS_WT(ILVEV_W, ilvev.w)
--
2.7.4
- [Qemu-devel] [PATCH v7 04/14] tests/tcg: target/mips: Add test utilities for 32-bit tests, (continued)
[Qemu-devel] [PATCH v7 03/14] tests/tcg: target/mips: Add wrappers for various MSA instructions, Aleksandar Markovic, 2019/03/04
[Qemu-devel] [PATCH v7 05/14] tests/tcg: target/mips: Add test utilities for 64-bit tests, Aleksandar Markovic, 2019/03/04
[Qemu-devel] [PATCH v7 01/14] disas: nanoMIPS: Correct comments to handlers of some DSP instructions, Aleksandar Markovic, 2019/03/04
[Qemu-devel] [PATCH v7 07/14] tests/tcg: target/mips: Extend functionality of MSA wrapper macros,
Aleksandar Markovic <=
[Qemu-devel] [PATCH v7 06/14] tests/tcg: target/mips: Fix test utilities for 128-bit tests, Aleksandar Markovic, 2019/03/04
Re: [Qemu-devel] [PATCH v7 00/14] Misc target/mips fixes and improvements, Aleksandar Rikalo, 2019/03/05