qemu/tests/tcg/mips/mips64-dsp/mulq_rs_qh.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rd, rs, rt, result, dsp, dspresult;
   6    rt = 0x80003698CE8F9201;
   7    rs = 0x800034634BCDE321;
   8    result = 0x7fff16587a530313;
   9
  10    dspresult = 0x01;
  11
  12    __asm
  13        ("mulq_rs.qh %0, %2, %3\n\t"
  14         "rddsp %1\n\t"
  15         : "=r"(rd), "=r"(dsp)
  16         : "r"(rt), "r"(rs)
  17        );
  18
  19    if (rd != result) {
  20        printf("mulq_rs.qh error\n");
  21
  22        return -1;
  23    }
  24
  25    dsp = (dsp >> 21) & 0x01;
  26    if (dsp != dspresult) {
  27        printf("mulq_rs.qh DSPControl Reg ouflag error\n");
  28
  29        return -1;
  30    }
  31
  32    return 0;
  33}
  34