qemu/tests/tcg/mips/mips32-dsp/shrlv_qb.c
<<
>>
Prefs
   1#include<stdio.h>
   2#include<assert.h>
   3
   4int main()
   5{
   6    int rd, rs, rt;
   7    int result;
   8
   9    rs     = 0x05;
  10    rt     = 0x12345678;
  11    result = 0x00010203;
  12
  13    __asm
  14        ("shrlv.qb %0, %1, %2\n\t"
  15         : "=r"(rd)
  16         : "r"(rt), "r"(rs)
  17        );
  18    assert(rd == result);
  19
  20    rs     = 0x00;
  21    rt     = 0x12345678;
  22    result = 0x12345678;
  23
  24    __asm
  25        ("shrlv.qb %0, %1, %2\n\t"
  26         : "=r"(rd)
  27         : "r"(rt), "r"(rs)
  28        );
  29    assert(rd == result);
  30
  31    return 0;
  32}
  33