qemu/tests/tcg/mips/mips64-dspr2/addqh_ph.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rd, rs, rt;
   6    long long result;
   7
   8    rs     = 0x706A13FE;
   9    rt     = 0x13065174;
  10    result = 0x41B832B9;
  11    __asm
  12        ("addqh.ph %0, %1, %2\n\t"
  13         : "=r"(rd)
  14         : "r"(rs), "r"(rt)
  15        );
  16    if (result != rd) {
  17        printf("addqh.ph error!\n");
  18        return -1;
  19    }
  20
  21    rs     = 0x81000100;
  22    rt     = 0xc2000100;
  23    result = 0xffffffffa1800100;
  24    __asm
  25        ("addqh.ph %0, %1, %2\n\t"
  26         : "=r"(rd)
  27         : "r"(rs), "r"(rt)
  28        );
  29    if (result != rd) {
  30        printf("addqh.ph error!\n");
  31        return -1;
  32    }
  33
  34    return 0;
  35}
  36