repo.or.cz
/
qemu
/
armbru.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git]
/
tests
/
tcg
/
openrisc
/
test_lf_sub.c
blob
5ee9b039102335ad28f0902a2ebb8c3f09515c63
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
float
a
,
b
,
c
;
6
float
result
;
7
8
b
=
10.5
;
9
c
=
1.5
;
10
result
=
9.0
;
11
__asm
12
(
"lf.sub.s %0, %1, %2
\n\t
"
13
:
"=r"
(
a
)
14
:
"r"
(
b
),
"r"
(
c
)
15
);
16
if
(
a
!=
result
) {
17
printf
(
"lf.sub.s error
\n
"
);
18
return
-
1
;
19
}
20
21
/* b = 0x999;
22
c = 0x654;
23
result = 0x345;
24
__asm
25
("lf.sub.d %0, %1, %2\n\t"
26
: "=r"(a)
27
: "r"(b), "r"(c)
28
);
29
if (a != result) {
30
printf("lf.sub.d error\n");
31
return -1;
32
}*/
33
34
return
0
;
35
}