PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dspr2 / subu_s_ph.c
blobae32cc06f5dd1c32e8aab5cce7dbfa71d2b9561c
1 #include"io.h"
3 int main(void)
5 long long rd, rs, rt, dsp;
6 long long result, resultdsp;
8 rs = 0x87654321;
9 rt = 0x12345678;
10 result = 0x75310000;
11 resultdsp = 0x01;
13 __asm
14 ("subu_s.ph %0, %2, %3\n\t"
15 "rddsp %1\n\t"
16 : "=r"(rd), "=r"(dsp)
17 : "r"(rs), "r"(rt)
19 dsp = (dsp >> 20) & 0x01;
20 if (dsp != resultdsp || rd != result) {
21 printf("subu_s.ph error\n");
22 return -1;
24 return 0;