PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips32-dspr2 / subu_s_ph.c
blob8e4da4f3e54469d68ddea7ece988975dc4972bde
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rs, rt, dsp;
7 int result, resultdsp;
9 rs = 0x87654321;
10 rt = 0x12345678;
11 result = 0x75310000;
12 resultdsp = 0x01;
14 __asm
15 ("subu_s.ph %0, %2, %3\n\t"
16 "rddsp %1\n\t"
17 : "=r"(rd), "=r"(dsp)
18 : "r"(rs), "r"(rt)
20 dsp = (dsp >> 20) & 0x01;
21 assert(dsp == resultdsp);
22 assert(rd == result);
24 return 0;