libqtest: Inline g_assert_no_errno()
[qemu/armbru.git] / tests / tcg / mips / mips64-dspr2 / absq_s_qb.c
blobf7aec3e568fd8e403a3bfd6e93b57938d8497e3a
1 #include "io.h"
2 int main()
4 long long input, result, dsp;
5 long long hope;
7 input = 0x701BA35E;
8 hope = 0x701B5D5E;
10 __asm
11 ("absq_s.qb %0, %1\n\t"
12 : "=r"(result)
13 : "r"(input)
15 if (result != hope) {
16 printf("absq_s.qb error\n");
17 return -1;
20 input = 0x801BA35E;
21 hope = 0x7F1B5D5E;
23 __asm
24 ("absq_s.qb %0, %2\n\t"
25 "rddsp %1\n\t"
26 : "=r"(result), "=r"(dsp)
27 : "r"(input)
29 dsp = dsp >> 20;
30 dsp &= 0x01;
31 if (result != hope) {
32 printf("absq_s.qb error\n");
33 return -1;
36 if (dsp != 1) {
37 printf("absq_s.qb error\n");
38 return -1;
41 return 0;