qemu/tests/tcg/mips/mips64-dsp/shrav_r_w.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rd, rs, rt;
   6    long long result;
   7
   8    rs     = 0x03;
   9    rt     = 0x87654321;
  10    result = 0xFFFFFFFFF0ECA864;
  11
  12    __asm
  13        ("shrav_r.w %0, %1, %2\n\t"
  14         : "=r"(rd)
  15         : "r"(rt), "r"(rs)
  16        );
  17    if (rd != result) {
  18        printf("shrav_r.w wrong\n");
  19
  20        return -1;
  21    }
  22
  23    return 0;
  24}
  25