qemu/tests/tcg/mips/mips64-dsp/dinsv.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rs, rt, dsp;
   6    long long res;
   7
   8    rs = 0x1234567887654321;
   9    rt = 0x1234567812345678;
  10    dsp = 0x2222;
  11    res = 0x1234567812345678;
  12    __asm
  13        ("wrdsp  %1, 0x3\n\t"
  14         "wrdsp %1\n\t"
  15         "dinsv %0, %2\n\t"
  16         : "+r"(rt)
  17         : "r"(dsp), "r"(rs)
  18        );
  19
  20    if (rt != res) {
  21        printf("dinsv error\n");
  22        return -1;
  23    }
  24
  25    return 0;
  26}
  27