libqtest: Inline g_assert_no_errno()
[qemu/armbru.git] / tests / tcg / mips / mips64-dspr2 / subu_s_qh.c
blobde7a29e77533b0ad73f46ee6c51764607294eae6
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, dspreg, result, dspresult;
6 rs = 0x1111111111111111;
7 rt = 0x2222222222222222;
8 result = 0x1111111111111111;
9 dspresult = 0x00;
11 __asm("subu_s.qh %0, %2, %3\n\t"
12 "rddsp %1\n\t"
13 : "=r"(rd), "=r"(dspreg)
14 : "r"(rs), "r"(rt)
17 dspreg = ((dspreg >> 20) & 0x01);
18 if ((rd != result) || (dspreg != dspresult)) {
19 printf("subu_s.qh error\n\t");
20 return -1;
24 rs = 0x8888888888888888;
25 rt = 0xa888a888a888a888;
26 result = 0x0000000000000000;
27 dspresult = 0x01;
29 __asm("subu_s.qh %0, %2, %3\n\t"
30 "rddsp %1\n\t"
31 : "=r"(rd), "=r"(dspreg)
32 : "r"(rs), "r"(rt)
35 dspreg = ((dspreg >> 20) & 0x01);
36 if ((rd != result) || (dspreg != dspresult)) {
37 printf("subu_s.qh error\n\t");
38 return -1;
41 return 0;