qemu/tests/tcg/mips/mips64-dsp/shra_qh.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rd, rt;
   6    long long res;
   7
   8    rt = 0x8512345654323454;
   9    res = 0xf851034505430345;
  10
  11    __asm
  12        ("shra.qh %0, %1, 0x4\n\t"
  13         : "=r"(rd)
  14         : "r"(rt)
  15        );
  16
  17    if (rd != res) {
  18        printf("shra.qh error\n");
  19        return -1;
  20    }
  21
  22    rt = 0x8512345654323454;
  23    res = 0x8512345654323454;
  24
  25    __asm
  26        ("shra.qh %0, %1, 0x0\n\t"
  27         : "=r"(rd)
  28         : "r"(rt)
  29        );
  30
  31    if (rd != res) {
  32        printf("shra.qh error1\n");
  33        return -1;
  34    }
  35
  36    return 0;
  37}
  38