blob: 414c8bd3f6058278905f4156426c9d8c1a9d7074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#include "io.h"
int main(void)
{
long long rd, rt;
long long result;
rt = 0x80000000;
result = 0x7FFFFFFF;
__asm
("absq_s.w %0, %1\n\t"
: "=r"(rd)
: "r"(rt)
);
if (rd != result) {
printf("absq_s_w.ph wrong\n");
return -1;
}
rt = 0x80030000;
result = 0x7FFD0000;
__asm
("absq_s.w %0, %1\n\t"
: "=r"(rd)
: "r"(rt)
);
if (rd != result) {
printf("absq_s_w.ph wrong\n");
return -1;
}
rt = 0x31036080;
result = 0x31036080;
__asm
("absq_s.w %0, %1\n\t"
: "=r"(rd)
: "r"(rt)
);
if (rd != result) {
printf("absq_s_w.ph wrong\n");
return -1;
}
return 0;
}
|