qemu/tests/tcg/mips/mips32-dspr2/addqh_r_ph.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     = 0x706A13FE;
  10    rt     = 0x13065174;
  11    result = 0x41B832B9;
  12    __asm
  13        ("addqh_r.ph %0, %1, %2\n\t"
  14         : "=r"(rd)
  15         : "r"(rs), "r"(rt)
  16        );
  17    assert(rd == result);
  18
  19    rs     = 0x81010100;
  20    rt     = 0xc2000100;
  21    result = 0xa1810100;
  22    __asm
  23        ("addqh_r.ph %0, %1, %2\n\t"
  24         : "=r"(rd)
  25         : "r"(rs), "r"(rt)
  26        );
  27    assert(rd == result);
  28
  29    return 0;
  30}
  31