qemu/tests/tcg/mips/mips64-dsp/multu.c
<<
>>
Prefs
   1#include "io.h"
   2
   3int main(void)
   4{
   5    long long rs, rt, ach, acl;
   6    long long result, resulth, resultl;
   7
   8    rs  = 0x00FFBBAA;
   9    rt  = 0x4B231000;
  10    resulth = 0x4b0f01;
  11    resultl = 0x71f8a000;
  12    __asm
  13        ("multu $ac1, %2, %3\n\t"
  14         "mfhi %0, $ac1\n\t"
  15         "mflo %1, $ac1\n\t"
  16         : "=r"(ach), "=r"(acl)
  17         : "r"(rs), "r"(rt)
  18        );
  19    if ((ach != resulth) || (acl != resultl)) {
  20        printf("multu wrong\n");
  21
  22        return -1;
  23    }
  24
  25    return 0;
  26}
  27