Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / openrisc / test_fx.c
blobdf86000d9016fa6e96496fb059e663325f3df181
1 #include <stdio.h>
3 int main(void)
5 int a, b;
6 int result;
8 b = 0x123;
9 result = 1;
10 __asm
11 ("l.ff1 %0, %1\n\t"
12 : "=r"(a)
13 : "r"(b)
15 if (a != result) {
16 printf("ff1 error\n");
17 return -1;
20 b = 0x0;
21 result = 0;
22 __asm
23 ("l.ff1 %0, %1\n\t"
24 : "=r"(a)
25 : "r"(b)
27 if (a != result) {
28 printf("ff1 error\n");
29 return -1;
32 b = 0x123;
33 result = 9;
34 __asm
35 ("l.fl1 %0, %1\n\t"
36 : "=r"(a)
37 : "r"(b)
39 if (a != result) {
40 printf("fl1 error\n");
41 return -1;
44 b = 0x0;
45 result = 0;
46 __asm
47 ("l.fl1 %0, %1\n\t"
48 : "=r"(a)
49 : "r"(b)
51 if (a != result) {
52 printf("fl1 error\n");
53 return -1;
56 return 0;