qemu/tests/tcg/mips/mips64-dsp/shilo.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long ach, acl;
   6    long long resulth, resultl;
   7
   8    ach = 0xBBAACCFF;
   9    acl = 0x1C3B001D;
  10
  11    resulth = 0x17755;
  12    resultl = 0xFFFFFFFF99fe3876;
  13
  14    __asm
  15        ("mthi %0, $ac1\n\t"
  16         "mtlo %1, $ac1\n\t"
  17         "shilo $ac1, 0x0F\n\t"
  18         "mfhi %0, $ac1\n\t"
  19         "mflo %1, $ac1\n\t"
  20         : "+r"(ach), "+r"(acl)
  21        );
  22    if ((ach != resulth) || (acl != resultl)) {
  23        printf("shilo wrong\n");
  24
  25        return -1;
  26    }
  27
  28    return 0;
  29}
  30