repo.or.cz
/
qemu
/
pbrook.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
target-i386: Use mulu2 and muls2
[qemu/pbrook.git]
/
tests
/
tcg
/
openrisc
/
test_lf_rem.c
blob
bd6090d6948aca3287fa7224a8bcaeb720fcce75
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
float
a
,
b
,
c
;
6
float
result
;
7
8
b
=
101.5
;
9
c
=
10
;
10
result
=
1.5
;
11
/* __asm
12
("lf.rem.d %0, %1, %2\n\t"
13
: "=r"(a)
14
: "r"(b), "r"(c)
15
);
16
if (a != result) {
17
printf("lf.rem.d error\n");
18
return -1;
19
}*/
20
21
__asm
22
(
"lf.rem.s %0, %1, %2
\n\t
"
23
:
"=r"
(
a
)
24
:
"r"
(
b
),
"r"
(
c
)
25
);
26
if
(
a
!=
result
) {
27
printf
(
"lf.rem.s error
\n
"
);
28
return
-
1
;
29
}
30
31
return
0
;
32
}