qemu/tests/tcg/mips/mips64-dsp/cmpu_lt_ob.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rs, rt, dspreg, dspresult;
   6
   7    rs = 0x123456789ABCDEF0;
   8    rt = 0x123456789ABCDEFF;
   9    dspresult = 0x01;
  10
  11    __asm
  12        ("cmpu.lt.ob %1, %2\n\t"
  13         "rddsp %0"
  14         : "=r"(dspreg)
  15         : "r"(rs), "r"(rt)
  16        );
  17
  18    dspreg = dspreg >> 24;
  19    if (dspreg != dspresult) {
  20        printf("cmpu.lt.ob error\n");
  21
  22        return -1;
  23    }
  24
  25    rs = 0x823156789ABCDEF0;
  26    rt = 0x123456789ABCDEFF;
  27    dspresult = 0x41;
  28
  29    __asm
  30        ("cmpu.lt.ob %1, %2\n\t"
  31         "rddsp %0"
  32         : "=r"(dspreg)
  33         : "r"(rs), "r"(rt)
  34        );
  35
  36    dspreg = dspreg >> 24;
  37    if (dspreg != dspresult) {
  38        printf("cmpu.lt.ob error\n");
  39
  40        return -1;
  41    }
  42
  43    return 0;
  44}
  45