qemu/tests/tcg/mips/user/ase/dsp/test_dsp_r1_shll_s_ph.c
<<
>>
Prefs
   1#include<stdio.h>
   2#include<assert.h>
   3
   4int main()
   5{
   6    int rd, rt, dsp;
   7    int result, resultdsp;
   8
   9    rt        = 0x12345678;
  10    result    = 0x7FFF7FFF;
  11    resultdsp = 0x01;
  12
  13    __asm
  14        ("shll_s.ph %0, %2, 0x0B\n\t"
  15         "rddsp %1\n\t"
  16         : "=r"(rd), "=r"(dsp)
  17         : "r"(rt)
  18        );
  19    dsp = (dsp >> 22) & 0x01;
  20    assert(dsp == resultdsp);
  21    assert(rd  == result);
  22
  23    return 0;
  24}
  25