PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / openrisc / test_lf_div.c
blob70b5d1c17b3284ddb6ee62dbcda8eed054de945d
1 #include <stdio.h>
3 int main(void)
5 float a, b, c;
6 float result;
8 b = 1.5;
9 c = 0.5;
10 result = 3.0;
11 __asm
12 ("lf.div.s %0, %1, %2\n\t"
13 : "=r"(a)
14 : "r"(b), "r"(c)
16 if (a != result) {
17 printf("lf.div.s error\n");
18 return -1;
21 /* double a, b, c, res;
23 b = 0x80000000;
24 c = 0x40;
25 result = 0x2000000;
26 __asm
27 ("lf.div.d %0, %1, %2\n\t"
28 : "=r"(a)
29 : "r"(b), "r"(c)
31 if (a != result) {
32 printf("lf.div.d error\n");
33 return -1;
34 }*/
36 return 0;