qemu/tests/tcg/mips/mips64-dsp/subq_qh.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rd, rs, rt, result, dspreg, dspresult;
   6    rt = 0x123456789ABCDEF0;
   7    rs = 0x123456789ABCDEF0;
   8    result = 0x0;
   9    dspresult = 0x0;
  10
  11    __asm
  12        ("subq.qh %0, %2, %3\n\t"
  13         "rddsp %1\n\t"
  14         : "=r"(rd), "=r"(dspreg)
  15         : "r"(rs), "r"(rt)
  16        );
  17    dspreg = (dspreg >> 20) & 0x1;
  18    if ((rd != result) || (dspreg != dspresult)) {
  19        printf("subq.qh error\n\t");
  20
  21        return -1;
  22    }
  23
  24    return 0;
  25}
  26
  27