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