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