qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

tests/tcg: target/mips: Extend functionality of MSA wrapper macros

Add macros that will allow testing cases when one of the source
registers is identical to the destination register.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>
Message-Id: <1551800076-8104-8-git-send-email-aleksandar.markovic@rt-rk.com>

+51
+51
tests/tcg/mips/include/wrappers_msa.h
··· 38 38 ); \ 39 39 } 40 40 41 + #define DO_MSA__WD__WD(suffix, mnemonic) \ 42 + static inline void do_msa_##suffix(void *input, void *output) \ 43 + { \ 44 + __asm__ volatile ( \ 45 + "move $t0, %0\n\t" \ 46 + "ld.d $w11, 0($t0)\n\t" \ 47 + #mnemonic " $w10, $w10\n\t" \ 48 + "move $t0, %1\n\t" \ 49 + "st.d $w10, 0($t0)\n\t" \ 50 + : \ 51 + : "r" (input), "r" (output) \ 52 + : "t0", "memory" \ 53 + ); \ 54 + } 55 + 41 56 DO_MSA__WD__WS(NLOC_B, nloc.b) 42 57 DO_MSA__WD__WS(NLOC_H, nloc.h) 43 58 DO_MSA__WD__WS(NLOC_W, nloc.w) ··· 64 79 "move $t0, %1\n\t" \ 65 80 "ld.d $w12, 0($t0)\n\t" \ 66 81 #mnemonic " $w10, $w11, $w12\n\t" \ 82 + "move $t0, %2\n\t" \ 83 + "st.d $w10, 0($t0)\n\t" \ 84 + : \ 85 + : "r" (input1), "r" (input2), "r" (output) \ 86 + : "t0", "memory" \ 87 + ); \ 88 + } 89 + 90 + #define DO_MSA__WD__WD_WT(suffix, mnemonic) \ 91 + static inline void do_msa_##suffix(void *input1, void *input2, \ 92 + void *output) \ 93 + { \ 94 + __asm__ volatile ( \ 95 + "move $t0, %0\n\t" \ 96 + "ld.d $w11, 0($t0)\n\t" \ 97 + "move $t0, %1\n\t" \ 98 + "ld.d $w12, 0($t0)\n\t" \ 99 + #mnemonic " $w10, $w10, $w12\n\t" \ 100 + "move $t0, %2\n\t" \ 101 + "st.d $w10, 0($t0)\n\t" \ 102 + : \ 103 + : "r" (input1), "r" (input2), "r" (output) \ 104 + : "t0", "memory" \ 105 + ); \ 106 + } 107 + 108 + #define DO_MSA__WD__WS_WD(suffix, mnemonic) \ 109 + static inline void do_msa_##suffix(void *input1, void *input2, \ 110 + void *output) \ 111 + { \ 112 + __asm__ volatile ( \ 113 + "move $t0, %0\n\t" \ 114 + "ld.d $w11, 0($t0)\n\t" \ 115 + "move $t0, %1\n\t" \ 116 + "ld.d $w12, 0($t0)\n\t" \ 117 + #mnemonic " $w10, $w11, $w10\n\t" \ 67 118 "move $t0, %2\n\t" \ 68 119 "st.d $w10, 0($t0)\n\t" \ 69 120 : \